PageSourceSearch

https://www.e-stayon.com/bundles/-hoazr2lxmqyluhmy80qzvaiyxiry-5pnujxyegj3zi.js

js e-stayon.com collected 2026-10-05 02:58:14 UTC 922,822 bytes, 9,666 lines download raw bytes

1/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */�
vendor: 86,842 bytes, lines 1-2
1
2!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.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:s,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||g(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],a!==(r=e[t])&&(l&&r&&(w.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&w.isPlainObject(n)?n:{},a[t]=w.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},w.extend({expando:"jQuery"+("3.3.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]"!==c.call(e))&&(!(t=i(e))||"function"==typeof(n=f.call(t,"constructor")&&t.constructor)&&p.call(n)===d)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){m(e)},each:function(e,t){var n,r=0;if(C(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?w.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;o<a;o++)(r=!t(e[o],o))!==s&&i.push(e[o]);return i},map:function(e,t,n){var r,i,o=0,s=[];if(C(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return a.apply([],s)},guid:1,support:h}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function C(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!g(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,y,v,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ae(),k=ae(),S=ae(),D=function(e,t){return e===t&&(f=!0),0},N={}.hasOwnProperty,A=[],j=A.pop,q=A.push,L=A.push,H=A.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",I="\\["+M+"*("+R+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+M+"*\\]",W=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+I+")*)|.*)\\)|)",$=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),F=new RegExp("^"+M+"*,"+M+"*"),_=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),z=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),X=new RegExp(W),U=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)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ee=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)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(A=H.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(e){L={apply:A.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,v,m=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=J.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!y||!y.test(e))){if(1!==T)m=t,v=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;while(s--)h[s]="#"+c+" "+ve(h[s]);v=h.join(","),m=K.test(e)&&ge(t.parentNode)||t}if(v)try{return L.apply(r,m.querySelectorAll(v)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(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&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(d=a,h=d.documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],y=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||y.push("~="),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||y.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",W)}),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.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)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return f=!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===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(D),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,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(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===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]||oe.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]&&oe.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&&X.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(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(y){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){x=(d=(l=(c=(f=(p=y)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&y.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?se(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?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===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!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 G.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:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:he(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:he(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=r.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ye(){}ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,a=oe.tokenize=function(e,t){var n,i,o,a,s,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=r.preFilter;while(s){n&&!(i=F.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=_.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(B," ")}),s=s.slice(n.length));for(a in r.filter)!(i=V[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?oe.error(e):k(e,u).slice(0)};function ve(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function me(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[T,s];if(u){while(t=t[r])if((1===t.nodeType||a)&&e(t,n,u))return!0}else while(t=t[r])if(1===t.nodeType||a)if(f=t[b]||(t[b]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===T&&l[1]===s)return p[2]=l[2];if(c[o]=p,p[2]=e(t,n,u))return!0}return!1}}function xe(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r<i;r++)oe(e,t[r],n);return n}function we(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Te(e,t,n,r,i,o){return r&&!r[b]&&(r=Te(r)),i&&!i[b]&&(i=Te(i,o)),se(function(o,a,s,u){var l,c,f,p=[],d=[],h=a.length,g=o||be(t||"*",s.nodeType?[s]:s,[]),y=!e||!o&&t?g:we(g,p,e,s,u),v=n?i||(o?e:h||r)?[]:a:y;if(n&&n(y,v,s,u),r){l=we(v,d),r(l,[],s,u),c=l.length;while(c--)(f=l[c])&&(v[d[c]]=!(y[d[c]]=f))}if(o){if(i||e){if(i){l=[],c=v.length;while(c--)(f=v[c])&&l.push(y[c]=f);i(null,v=[],l,u)}c=v.length;while(c--)(f=v[c])&&(l=i?O(o,f):p[c])>-1&&(o[l]=!(a[l]=f))}}else v=we(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):L.apply(a,v)})}function Ce(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=me(function(e){return e===t},s,!0),f=me(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])p=[me(xe(p),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[b]){for(i=++u;i<o;i++)if(r.relative[e[i].type])break;return Te(u>1&&xe(p),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u<i&&Ce(e.slice(u,i)),i<o&&Ce(e=e.slice(i)),i<o&&ve(e))}p.push(n)}return xe(p)}function Ee(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,u,c){var f,h,y,v=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);m!==k&&null!=(f=C[m]);m++){if(i&&f){h=0,a||f.ownerDocument===d||(p(f),s=!g);while(y=e[h++])if(y(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!y&&f)&&v--,o&&x.push(f))}if(v+=m,n&&m!==v){h=0;while(y=t[h++])y(x,b,a,s);if(o){if(v>0)while(m--)x[m]||b[m]||(b[m]=j.call(u));b=we(b)}L.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}return s=oe.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Ce(t[n]))[b]?r.push(o):i.push(o);(o=S(e,Ee(i,r))).selector=e}return o},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=V.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ve(u)))return L.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var k=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return u.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t<r;t++)if(w.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)w.find(e,i[t],n);return r>1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?w(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),A.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,q=w(r);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(w.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&w(e);if(!D.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(w(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(O[e]||w.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1){n=a.shift();while(++s<o.length)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1)}e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){w.each(n,function(n,r){g(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return w.each(arguments,function(e,t){var n;while((n=w.inArray(t,o,n))>-1)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(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};function I(e){return e}function W(e){throw e}function $(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=r.apply(s,u))===n.promise())throw new TypeError("Thenable self-resolution");l=e&&("object"==typeof e||"function"==typeof e)&&e.then,g(l)?i?l.call(e,a(o,n,I,i),a(o,n,W,i)):(o++,l.call(e,a(o,n,I,i),a(o,n,W,i),a(o,n,I,n.notifyWith))):(r!==I&&(s=void 0,u=[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,c.stackTrace),t+1>=o&&(r!==W&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&($(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)$(i[n],s(n),a.reject);return a.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&B.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_));var z=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(s in n)z(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},X=/^-ms-/,U=/-([a-z])/g;function V(e,t){return t.toUpperCase()}function G(e){return e.replace(X,"ms-").replace(U,V)}var Y=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Q(){this.expando=w.expando+Q.uid++}Q.uid=1,Q.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,i=this.cache(e);if("string"==typeof t)i[G(t)]=n;else for(r in t)i[G(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][G(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(G):(t=G(t))in r?[t]:t.match(M)||[]).length;while(n--)delete r[t[n]]}(void 0===t||w.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&&!w.isEmptyObject(t)}};var J=new Q,K=new Q,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ee=/[A-Z]/g;function te(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Z.test(e)?JSON.parse(e):e)}function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ee,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=te(n)}catch(e){}K.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return K.hasData(e)||J.hasData(e)},data:function(e,t,n){return K.access(e,t,n)},removeData:function(e,t){K.remove(e,t)},_data:function(e,t,n){return J.access(e,t,n)},_removeData:function(e,t){J.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=K.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){n=a.length;while(n--)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=G(r.slice(5)),ne(o,r,i[r]));J.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){K.set(this,e)}):z(this,function(t){var n;if(o&&void 0===t){if(void 0!==(n=K.get(o,e)))return n;if(void 0!==(n=ne(o,e)))return n}else this.each(function(){K.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:w.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?w.queue(this[0],e):void 0===t?this:this.each(function(){var n=w.queue(this,e,t);w._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&w.dequeue(this,e)})},dequeue:function(e){return this.each(function(){w.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=w.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=J.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&w.contains(e.ownerDocument,e)&&"none"===w.css(e,"display")},se=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i};function ue(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return w.css(e,t,"")},u=s(),l=n&&n[3]||(w.cssNumber[t]?"":"px"),c=(w.cssNumber[t]||"px"!==l&&+u)&&ie.exec(w.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)w.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,w.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var le={};function ce(e){var t,n=e.ownerDocument,r=e.nodeName,i=le[r];return i||(t=n.body.appendChild(n.createElement(r)),i=w.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),le[r]=i,i)}function fe(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=J.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ae(r)&&(i[o]=ce(r))):"none"!==n&&(i[o]="none",J.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}w.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?w(this).show():w(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={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,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n<r;n++)J.set(e[n],"globalEval",!t||J.get(t[n],"globalEval"))}var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))w.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+w.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;w.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&w.inArray(o,r)>-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return r.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)De(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.get(e);if(y){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;while(l--)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.hasData(e)&&J.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(M)||[""]).length;while(l--)if(s=Ce.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){f=w.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(J.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n<arguments.length;n++)u[n]=arguments[n];if(t.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){s=w.event.handlers.call(this,t,l),n=0;while((o=s[n++])&&!t.isPropagationStopped()){t.currentTarget=o.elem,r=0;while((a=o.handlers[r++])&&!t.isImmediatePropagationStopped())t.rnamespace&&!t.rnamespace.test(a.namespace)||(t.handleObj=a,t.data=a.data,void 0!==(i=((w.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,u))&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?w(i,this).index(l)>-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(w.Event.prototype,e,{enumerable:!0,configurable:!0,get:g(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[w.expando]?e:new w.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Se()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===Se()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&N(this,"input"))return this.click(),!1},_default:function(e){return N(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},w.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},w.Event=function(e,t){if(!(this instanceof w.Event))return new w.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ee:ke,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&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:ke,isPropagationStopped:ke,isImmediatePropagationStopped:ke,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ee,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ee,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ee,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},w.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,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&&we.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Te.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},w.event.addProp),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){w.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||w.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),w.fn.extend({on:function(e,t,n,r){return De(this,e,t,n,r)},one:function(e,t,n,r){return De(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,w(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=ke),this.each(function(){w.event.remove(this,e,n,t)})}});var Ne=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/<script|<style|<link/i,je=/checked\s*(?:[^=]|=\s*.checked.)/i,qe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)w.event.add(t,i,l[i][n])}K.hasData(e)&&(s=K.access(e),u=w.extend({},s),K.set(t,u))}}function Me(e,t){var n=t.nodeName.toLowerCase();"input"===n&&pe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Re(e,t,n,r){t=a.apply([],t);var i,o,s,u,l,c,f=0,p=e.length,d=p-1,y=t[0],v=g(y);if(v||p>1&&"string"==typeof y&&!h.checkClone&&je.test(y))return e.each(function(i){var o=e.eq(i);v&&(t[0]=y.call(this,i,o.html())),Re(o,t,n,r)});if(p&&(i=xe(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=w.map(ye(i,"script"),He)).length;f<p;f++)l=i,f!==d&&(l=w.clone(l,!0,!0),u&&w.merge(s,ye(l,"script"))),n.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,w.map(s,Oe),f=0;f<u;f++)l=s[f],he.test(l.type||"")&&!J.access(l,"globalEval")&&w.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?w._evalUrl&&w._evalUrl(l.src):m(l.textContent.replace(qe,""),c,l))}return e}function Ie(e,t,n){for(var r,i=t?w.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||w.cleanData(ye(r)),r.parentNode&&(n&&w.contains(r.ownerDocument,r)&&ve(ye(r,"script")),r.parentNode.removeChild(r));return e}w.extend({htmlPrefilter:function(e){return e.replace(Ne,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ye(s),r=0,i=(o=ye(e)).length;r<i;r++)Me(o[r],a[r]);if(t)if(n)for(o=o||ye(e),a=a||ye(s),r=0,i=o.length;r<i;r++)Pe(o[r],a[r]);else Pe(e,s);return(a=ye(s,"script")).length>0&&ve(a,!u&&ye(e,"script")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return z(this,function(e){return void 0===e?w.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 Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(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&&(w.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return z(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&&!Ae.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(ye(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Re(this,arguments,function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(ye(this)),n&&n.replaceChild(t,this))},e)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){w.fn[e]=function(e){for(var n,r=[],i=w(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),w(i[a])[t](n),s.apply(r,n.get());return this.pushStack(r)}});var We=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),$e=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Be=new RegExp(oe.join("|"),"i");!function(){function t(){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%",be.appendChild(l).appendChild(c);var t=e.getComputedStyle(c);i="1%"!==t.top,u=12===n(t.marginLeft),c.style.right="60%",s=36===n(t.right),o=36===n(t.width),c.style.position="absolute",a=36===c.offsetWidth||"absolute",be.removeChild(l),c=null}}function n(e){return Math.round(parseFloat(e))}var i,o,a,s,u,l=r.createElement("div"),c=r.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===c.style.backgroundClip,w.extend(h,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),a}}))}();function Fe(e,t,n){var r,i,o,a,s=e.style;return(n=n||$e(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||w.contains(e.ownerDocument,e)||(a=w.style(e,t)),!h.pixelBoxStyles()&&We.test(a)&&Be.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function _e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}var ze=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ue={position:"absolute",visibility:"hidden",display:"block"},Ve={letterSpacing:"0",fontWeight:"400"},Ge=["Webkit","Moz","ms"],Ye=r.createElement("div").style;function Qe(e){if(e in Ye)return e;var t=e[0].toUpperCase()+e.slice(1),n=Ge.length;while(n--)if((e=Ge[n]+t)in Ye)return e}function Je(e){var t=w.cssProps[e];return t||(t=w.cssProps[e]=Qe(e)||e),t}function Ke(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ze(e,t,n,r,i,o){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+=w.css(e,n+oe[a],!0,i)),r?("content"===n&&(u-=w.css(e,"padding"+oe[a],!0,i)),"margin"!==n&&(u-=w.css(e,"border"+oe[a]+"Width",!0,i))):(u+=w.css(e,"padding"+oe[a],!0,i),"padding"!==n?u+=w.css(e,"border"+oe[a]+"Width",!0,i):s+=w.css(e,"border"+oe[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function et(e,t,n){var r=$e(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(We.test(i)){if(!n)return i;i="auto"}return a=a&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=G(t),u=Xe.test(t),l=e.style;if(u||(t=Je(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=G(t);return Xe.test(t)||(t=Je(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Ve&&(i=Ve[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!ze.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Ue,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a="border-box"===w.css(e,"boxSizing",!1,o),s=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Ke(e,n,s)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-se(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Ke)}),w.fn.extend({css:function(e,t){return z(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a<i;a++)o[t[a]]=w.css(e,t[a],!1,r);return o}return void 0!==n?w.style(e,t,n):w.css(e,t)},e,t,arguments.length>1)}});function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}w.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=w.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):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.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=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[w.cssProps[e.prop]]&&!w.cssHooks[e.prop]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=tt.prototype.init,w.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===r.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,w.fx.interval),w.fx.tick())}function st(){return e.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ct(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),y=J.get(e,"fxshow");n.queue||(null==(a=w._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,w.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],it.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||w.style(e,r)}if((u=!w.isEmptyObject(t))||!w.isEmptyObject(d)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=J.get(e,"display")),"none"===(c=w.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=w.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===w.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in d)u||(y?"hidden"in y&&(g=y.hidden):y=J.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&fe([e],!0),p.done(function(){g||fe([e]),J.remove(e,"fxshow");for(r in d)w.style(e,r,d[r])})),u=lt(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}}function ft(e,t){var n,r,i,o,a;for(n in e)if(r=G(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=w.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function pt(e,t,n){var r,i,o=0,a=pt.prefilters.length,s=w.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=nt||st(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].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:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:nt||st(),duration:n.duration,tweens:[],createTween:function(t,n){var r=w.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(i)return this;for(i=!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(ft(c,l.opts.specialEasing);o<a;o++)if(r=pt.prefilters[o].call(l,e,c,l.opts))return g(r.stop)&&(w._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return w.map(c,lt,l),g(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),w.fx.timer(w.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}w.Animation=w.extend(pt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ue(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){g(e)?(t=e,e=["*"]):e=e.match(M);for(var n,r=0,i=e.length;r<i;r++)n=e[r],pt.tweeners[n]=pt.tweeners[n]||[],pt.tweeners[n].unshift(t)},prefilters:[ct],prefilter:function(e,t){t?pt.prefilters.unshift(e):pt.prefilters.push(e)}}),w.speed=function(e,t,n){var r=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||g(e)&&e,duration:e,easing:n&&t||t&&!g(t)&&t};return w.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in w.fx.speeds?r.duration=w.fx.speeds[r.duration]:r.duration=w.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&w.dequeue(this,r.queue)},r},w.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=w.isEmptyObject(e),o=w.speed(t,n,r),a=function(){var t=pt(this,w.extend({},e),o);(i||J.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.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,i=null!=e&&e+"queueHooks",o=w.timers,a=J.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ot.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||w.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=J.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=w.timers,a=r?r.length:0;for(n.finish=!0,w.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),w.each(["toggle","show","hide"],function(e,t){var n=w.fn[t];w.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ut(t,!0),e,r,i)}}),w.each({slideDown:ut("show"),slideUp:ut("hide"),slideToggle:ut("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){w.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),w.timers=[],w.fx.tick=function(){var e,t=0,n=w.timers;for(nt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||w.fx.stop(),nt=void 0},w.fx.timer=function(e){w.timers.push(e),w.fx.start()},w.fx.interval=13,w.fx.start=function(){rt||(rt=!0,at())},w.fx.stop=function(){rt=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(t,n){return t=w.fx?w.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=r.createElement("input"),t=r.createElement("select").appendChild(r.createElement("option"));e.type="checkbox",h.checkOn=""!==e.value,h.optSelected=t.selected,(e=r.createElement("input")).value="t",e.type="radio",h.radioValue="t"===e.value}();var dt,ht=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return z(this,w.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||w.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return z(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.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)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function vt(e){return(e.match(M)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e?e.match(M)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,mt(this)))});if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=xt(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=mt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:vt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!N(n.parentNode,"optgroup"))){if(t=w(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=w.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=w.inArray(w.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h,v=[i||r],m=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!wt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!y(i)){for(l=d.delegateType||m,wt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||r)&&v.push(u.defaultView||u.parentWindow||e)}a=0;while((s=v[a++])&&!t.isPropagationStopped())h=s,t.type=a>1?l:d.bindType||m,(p=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&p.apply(s,n),(p=c&&s[c])&&p.apply&&Y(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),n)||!Y(i)||c&&g(i[m])&&!y(i)&&((u=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Tt),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,Tt),w.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var Ct=e.location,Et=Date.now(),kt=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var St=/\[\]$/,Dt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||St.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var qt=/%20/g,Lt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mt=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Bt=r.createElement("a");Bt.href=Ct.href;function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(g(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function _t(e,t,n,r){var i={},o=e===Wt;function a(s){var u;return i[s]=!0,w.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function zt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}function Xt(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function Ut(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.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":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,w.ajaxSettings),t):zt(w.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=w.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?w(g):w.event,v=w.Deferred(),m=w.Callbacks("once memory"),x=h.statusCode||{},b={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=Ot.exec(a))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return i&&i.abort(t),k(0,t),this}};if(v.promise(E),h.url=((t||h.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=r.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Bt.protocol+"//"+Bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),_t(It,h,n,E),c)return E;(f=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Mt.test(h.type),o=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(qt,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(kt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Ht,"$1"),d=(kt.test(o)?"&":"?")+"_="+Et+++d),h.url=o+d),h.ifModified&&(w.lastModified[o]&&E.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&E.setRequestHeader("If-None-Match",w.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+$t+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)E.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,E,h)||c))return E.abort();if(C="abort",m.add(h.complete),E.done(h.success),E.fail(h.error),i=_t(Wt,h,n,E)){if(E.readyState=1,f&&y.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=e.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,i.send(b,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(t,n,r,s){var l,p,d,b,T,C=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",E.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=Xt(h,E,r)),b=Ut(h,b,E,l),l?(h.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=T),(T=E.getResponseHeader("etag"))&&(w.etag[o]=T)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,l=!(d=b.error))):(d=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",l?v.resolveWith(g,[p,C,E]):v.rejectWith(g,[E,C,d]),E.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),m.fireWith(g,[E,C]),f&&(y.trigger("ajaxComplete",[E,h]),--w.active||w.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}}),w._evalUrl=function(e){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Vt={0:200,1223:204},Gt=w.ajaxSettings.xhr();h.cors=!!Gt&&"withCredentials"in Gt,h.ajax=Gt=!!Gt,w.ajaxTransport(function(t){var n,r;if(h.cors||Gt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Vt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.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 w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=w("<script>").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)}),r.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Yt=[],Qt=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Yt.pop()||w.expando+"_"+Et++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Qt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=g(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Qt,"$1"+i):!1!==t.jsonp&&(t.url+=(kt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||w.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?w(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Yt.push(i)),a&&g(o)&&o(a[0]),a=o=void 0}),"script"}),h.createHTMLDocument=function(){var e=r.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),w.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,o,a;return t||(h.createHTMLDocument?((i=(t=r.implementation.createHTMLDocument("")).createElement("base")).href=r.location.href,t.head.appendChild(i)):t=r),o=A.exec(e),a=!n&&[],o?[t.createElement(o[1])]:(o=xe([e],t,a),a&&a.length&&w(a).remove(),w.merge([],o.childNodes))},w.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=vt(e.slice(s)),e=e.slice(0,s)),g(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&w.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?w("<div>").append(w.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}}),w.expr.pseudos.animated=function(e){return w.grep(w.timers,function(t){return e===t.elem}).length},w.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=w.css(e,"position"),f=w(e),p={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=w.css(e,"top"),u=w.css(e,"left"),(l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1)?(a=(r=f.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),g(t)&&(t=t.call(e,n,w.extend({},s))),null!=t.top&&(p.top=t.top-s.top+a),null!=t.left&&(p.left=t.left-s.left+i),"using"in t?t.using.call(e,p):f.css(p)}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){w.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===w.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),i.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-w.css(r,"marginTop",!0),left:t.left-i.left-w.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===w.css(e,"position"))e=e.offsetParent;return e||be})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;w.fn[e]=function(r){return z(this,function(e,r,i){var o;if(y(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),w.each(["top","left"],function(e,t){w.cssHooks[t]=_e(h.pixelPosition,function(e,n){if(n)return n=Fe(e,t),We.test(n)?w(e).position()[t]+"px":n})}),w.each({Height:"height",Width:"width"},function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){w.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return z(this,function(t,n,i){var o;return y(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?w.css(t,n,s):w.style(t,n,i,s)},t,a?i:void 0,a)}})}),w.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){w.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),w.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),w.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)}}),w.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),g(e))return r=o.call(arguments,2),i=function(){return e.apply(t||this,r.concat(o.call(arguments)))},i.guid=e.guid=e.guid||w.guid++,i},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=N,w.isFunction=g,w.isWindow=y,w.camelCase=G,w.type=x,w.now=Date.now,w.isNumeric=function(e){var t=w.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return w});var Jt=e.jQuery,Kt=e.$;return w.noConflict=function(t){return e.$===w&&(e.$=Kt),t&&e.jQuery===w&&(e.jQuery=Jt),w},t||(e.jQuery=e.$=w),w});
2
3
4/**************************
5 * Testseek Live API v5.5.0 *
6 **************************
7
8 Generated: 2025-10-24 09:31:29 CEST
9 Config: {
10    "ajax_tracking": "1",
11    "aur": {
12        "aurs": "1",
13        "aurss": "1",
14        "title": "1",
15        "sscore": "1",
16        "sdist": "1",
17        "sfeat": "1",
18        "spc": "1",
19        "sslogo": "1",
20        "sslink": "1",
21        "ssscore": "1",
22        "ssdist": "1",
23        "ssfeat": "1",
24        "ssrec": "1",
25        "aur": false,
26        "min_avg_score": null,
27        "sort": null,
28        "filter_aurss": null
29    },
30    "aur_full_dataset": null,
31    "aureviews": "1",
32    "design": "2",
33    "er": {
34        "summary": "1",
35        "list": "1",
36        "title": "1",
37        "score": "1",
38        "dist": "1",
39        "procons": "1",
40        "awards": "1",
41        "testseek": "0",
42        "poweredby": "1",
43        "count": "5",
44        "lscore": "1",
45        "vote": "1",
46        "awardimg": "1",
47        "extlink": "1",
48        "logo": "0",
49        "frame": "1",
50        "sort": "lang,-date,-review_id",
51        "filter_lang": "",
52        "mcount": null,
53        "lproscons": true,
54        "min_avg_score": null,
55        "have_score": null,
56        "min_score": null
57    },
58    "ereviews": "1",
59    "iconlib": "google",
60    "iconlib_url": true,
61    "key": "68f0e7e6",
62    "match_type": "EAN",
63    "server": "partner.testseek.com",
64    "sort_lang": "21",
65    "text_lang": "21",
66    "ts": 1761291089,
67    "vid": {
68        "list": "1",
69        "vote": "1",
70        "filter": "1",
71        "rows": "1",
72        "sort": "lang,-date,-review_id"
73    },
74    "videos": null
75}
76
77 Templates loaded:
78 * rich_snippet
79 * stars_only
80 * full_ffacf5385a
81
82
83 Included 38 JS-files:
84
85 * asort_num.js
86 * aurss_modal_urls.js
87 * bar_animate.js
88 * config_init.js
89 * ereview_vote.js
90 * extend_aur.js
91 * extend_er.js
92 * feature_animate.js
93 * handle_message.js
94 * handle_respone.js
95 * htmlentities.js
96 * icons.js
97 * init.js
98 * init_css.js
99 * init_font.js
100 * inline_iframe_init.js
101 * listners.js
102 * load_element.js
103 * load_held.js
104 * load_more_aur.js
105 * load_more_er.js
106 * load_template_by_url.js
107 * parseQuery.js
108 * play_video.js
109 * popup.js
110 * render_au_review.js
111 * render_e_review.js
112 * render_element.js
113 * render_finish.js
114 * render_template.js
115 * resize_iframes.js
116 * send_vote.js
117 * svg_graph_load.js
118 * tab_select.js
119 * track_ext_link.js
120 * update_class.js
121 * video_filter.js
122 * video_vote.js
123 * l10n.it-it.js
124 **/
125
126/* Main config */
127if(!window.testseek) window.testseek = {};
128if(!window.testseek.search_version) window.testseek.search_version = "5.5.0";
129if(!window.testseek.key) window.testseek.key = "68f0e7e6";
130if(!window.testseek.ts_domain) window.testseek.ts_domain = "partner.testseek.com";
131if(!window.testseek.lang) window.testseek.lang = "it-it";
132if(!window.testseek.sort_lang) window.testseek.sort_lang = "21";
133if(!window.testseek.show) window.testseek.show = ["base","ers","er","aurss","aurs","aw"];
134if(!window.testseek.er_count) window.testseek.er_count = 5;
135if(!window.testseek.tracking) window.testseek.tracking = true;
136if(!window.testseek.icon_library)
137{
138	window.testseek.icon_library = "google";
139	if(!window.testseek.icon_library_url)
140	{
141		window.testseek.icon_library_url = "https:\/\/fonts.googleapis.com\/icon?family=Material+Icons";
142	}
143}
144if(!window.testseek.templates) window.testseek.templates = {};
145if(!window.testseek.template_by_class) window.testseek.template_by_class = {};
146if(!window.testseek.template_by_class.ts_stars_template) window.testseek.template_by_class.ts_stars_template = "stars_only";
147if(!window.testseek.template_by_class.ts_full_template) window.testseek.template_by_class.ts_main_template = "full_ffacf5385a";
148if(!window.testseek.popup_template) window.testseek.popup_template = "full_ffacf5385a";
149if(!window.testseek.template_by_id) window.testseek.template_by_id = {};
150if(!window.testseek.template_by_id.ts_rich_snippet) window.testseek.template_by_id.ts_rich_snippet = "rich_snippet";
151window.testseek.request_config = {"ajax_tracking":1,"apiversion":"5.5.0","aur":{"aurs":1,"aurss":1,"title":1,"sscore":1,"sdist":1,"sfeat":1,"spc":1,"sslogo":1,"sslink":1,"ssscore":1,"ssdist":1,"ssfeat":1,"ssrec":1,"aur":false,"min_avg_score":null,"sort":null,"filter_aurss":null},"aur_full_dataset":null,"aureviews":1,"cip":1562786119,"design":2,"dl":1,"er":{"summary":1,"list":1,"title":1,"score":1,"dist":1,"procons":1,"awards":1,"testseek":0,"poweredby":1,"count":5,"lscore":1,"vote":1,"awardimg":1,"extlink":1,"logo":0,"frame":1,"sort":"lang,-date,-review_id","filter_lang":"","mcount":null,"lproscons":true,"min_avg_score":null,"have_score":null,"min_score":null},"ereviews":1,"iconlib":"google","iconlib_url":true,"key":"68f0e7e6","match_type":"EAN","r":null,"server":"partner.testseek.com","sort_lang":21,"text_lang":21,"ts":1761291089,"vid":{"list":1,"vote":1,"filter":1,"rows":1,"sort":"lang,-date,-review_id"},"videos":null};
152
153/* Templates: */
154
155window.testseek.templates["rich_snippet"] = "{\n\t\"@context\": \"http:\/\/schema.org\/\",\n\t\"@type\": \"Product\",\n\t\"name\": \"%product_name%\",\n\t\"description\": \"%product_name%\",\n\t\"aggregateRating\": {\n\t\t\"@type\": \"AggregateRating\",\n\t\t\"ratingValue\": \"%ts_score%\",\n\t\t\"bestRating\": \"100\",\n\t\t\"worstRating\": \"0\",\n\t\t\"ratingCount\": \"%ts_score_count%\"\n\t}\n}\n";
156
157window.testseek.templates["stars_only"] = "<div onclick=\"window.testseek.popup('%ts_id%');
157\" style=\"cursor: pointer;\" class=\"ts_hide_stars_if_no_aer_no_aur ts_rate ts_erate %ts_score_class%\" data-score=\"%ts_score%\" title=\"%ts_score%% ottenuto da %ts_score_count% recensioni per %product_name% a Testseek\">\n\t<div class=\"ts_stars_rating\">\n\t\t<span class=\"ts_star1\">%icon_star%<\/span>\n\t\t<span class=\"ts_star2\">%icon_star%<\/span>\n\t\t<span class=\"ts_star3\">%icon_star%<\/span>\n\t\t<span class=\"ts_star4\">%icon_star%<\/span>\n\t\t<span class=\"ts_star5\">%icon_star%<\/span>\n\t\t<span class=\"ts_star_half\">%icon_half_star%<\/span>\n\t\t<span class=\"ts_star_e1\">%icon_empty_star%<\/span>\n\t\t<span class=\"ts_star_e2\">%icon_empty_star%<\/span>\n\t\t<span class=\"ts_star_e3\">%icon_empty_star%<\/span>\n\t\t<span class=\"ts_star_e4\">%icon_empty_star%<\/span>\n\t\t<span class=\"ts_star_e5\">%icon_empty_star%<\/span>\n\t<\/div>\n<\/div>";
158
159window.testseek.templates["full_ffacf5385a"] = " <div class=\"testseek_main ts_hide_entire_section_if_conditions_are_met\"> <div class=\"ts_show_if_popup ts_close_popup\" title=\"close popover\" onclick=\"testseek.close_popup();\">X<\/div> <a class=\"ext_link_ts\" href=\"https:\/\/www.testseek.com\/b2b\/about-us\/certified-reviews-by-testseek\/\" target=\"_blank\"><img class=\"ts_poweredby_img\" src=\"https:\/\/partner.testseek.com\/images\/testsites\/certified_reviews_testseek_blue_white_bg_180x83.png\" alt=\"[Certified by testseek]\" title=\"Queste recensioni sono certificati da Testseek come autentiche e imparziale. I giudizi sono stati analizzati sia da esseri umani e macchine.\" \/><\/a><br style=\"clear: both;\" \/> <ul class=\"testseek_tabs\"> <li class=\"\" data-ts-tab=\"er\" data-ts-value=\"%e_count%\" onclick=\"testseek.tab_select(this, this.parentNode.parentNode);\"><span>Recensioni Esperto (%e_count%)<\/span><\/li> <li class=\"hide_aur_tab_if_condition\" data-ts-tab=\"aur\" data-ts-value=\"%a_count%\" onclick=\"testseek.tab_select(this, this.parentNode.parentNode);\"><span>Recensioni utente (%a_count%)<\/span><\/li> <\/ul> <!-- E-rev --> <div data-ts-tab=\"er\" class=\"ts_tab_content l ts_show_if_erev\"> <div> <h2 class=\"ts_er_top_header\">Recensioni Esperto di %product_name%<\/h2> <\/div> <div class=\"l ts_rate_dist\"> <div class=\"ts_rate ts_erate %e_score_class%\" data-score=\"%e_score%\"> <div class=\"ts_rate_text\"> <svg width=\"104\" height=\"104\" class=\"ts_clock_graph\" data-ts-graph-val=\"%e_score%\" data-id-sufix=\"ers\"> <circle r=\"40\" cy=\"51\" cx=\"51\" fill-opacity=\"0\" stroke=\"#e5e5e5\" stroke-width=\"20\"\/> <circle id=\"fg_ers\" transform=\"rotate(-90 51 51)\" stroke-dasharray=\"0 260\" r=\"40\" cy=\"51\" cx=\"51\" fill-opacity=\"0\" stroke=\"#87d962\" stroke-width=\"20\"\/> <text x=\"51\" y=\"62\" font-size=\"25\" text-anchor=\"middle\" fill=\"black\">%e_score%<\/text> <\/svg> <br\/> %e_count% le recensioni degli esperti <\/div> <\/div> <div class=\"ts_edist ts_200n\"> <h3 class=\"er_dist_header\">Distribuzione delle valutazione esperti<\/h3> <table> <colgroup> <col class=\"ts_edist_col_stars\" \/> <col class=\"ts_edist_col_text\" \/> <col class=\"ts_edist_col_bars\" \/> <\/colgroup> <tbody> <tr> <th class=\"ts_stars_rating\">%icon_star% %icon_star% %icon_star% %icon_star% %icon_star%<\/th> <td>(%escore_5star_count%)<\/td> <td><span class=\"ts_bar_bg\"> <span class=\"bar_fg bar_5s ts_bar_animate\" style=\"width: 0%\" data-ts-graph-val=\"%escore_5star_score%\"><\/span> <\/span><\/td> <\/tr> <tr> <th class=\"ts_stars_rating\">%icon_star% %icon_star% %icon_star% %icon_star% %icon_empty_star%<\/th> <td>(%escore_4star_count%)<\/td> <td><span class=\"ts_bar_bg\"> <span class=\"bar_fg bar_4s ts_bar_animate\" style=\"width: 0%\" data-ts-graph-val=\"%escore_4star_score%\"><\/span> <\/span><\/td> <\/tr> <tr> <th class=\"ts_stars_rating\">%icon_star% %icon_star% %icon_star% %icon_empty_star% %icon_empty_star%<\/th> <td>(%escore_3star_count%)<\/td> <td><span class=\"ts_bar_bg\"> <span class=\"bar_fg bar_3s ts_bar_animate\" style=\"width: 0%\" data-ts-graph-val=\"%escore_3star_score%\"><\/span> <\/span><\/td> <\/tr> <tr> <th class=\"ts_stars_rating\">%icon_star% %icon_star% %icon_empty_star% %icon_empty_star% %icon_empty_star%<\/th> <td>(%escore_2star_count%)<\/td> <td><span class=\"ts_bar_bg\"> <span class=\"bar_fg bar_2s ts_bar_animate\" style=\"width: 0%\" data-ts-graph-val=\"%escore_2star_score%\"><\/span> <\/span><\/td> <\/tr> <tr> <th class=\"ts_stars_rating\">%icon_star% %icon_empty_star% %icon_empty_star% %icon_empty_star% %icon_empty_star%<\/th> <td>(%escore_1star_count%)<\/td> <td><span class=\"ts_bar_bg\"> <span class=\"bar_fg bar_1s ts_bar_animate\" style=\"width: 0%\" data-ts-graph-val=\"%escore_1star_score%\"><\/span> <\/span><\/td> <\/tr> <tr> <th>Non valutato<\/th> <td>(%escore_noscore_count%)<\/td> <td><\/td> <\/tr> <\/tbody> <\/table> <\/div> <\/div> <div class=\"l pros_con pros_con_short ts_show_if_pros_or_cons\"> <div class=\"ts_show_if_pros\"> <h3 class=\"er_proscons_header\">Positivo:<\/h3> <ul class='ts_e_summary_pros_loop'> <li>%pro_name%<\/li> <\/ul> <\/div> <div class=\"ts_show_if_cons\"> <h3 class=\"er_proscons_header\">Negativo:<\/h3> <ul class='ts_e_summary_cons_loop'> <li>%con_name%<\/li> <\/ul> <\/div> <p class=\"more_link\">
159<a onclick=\"var c = this.parentNode.parentNode.classList; if(c.contains('pros_con_long')) {c.remove('pros_con_long'); c.add('pros_con_short');} else {c.remove('pros_con_short'); c.add('pros_con_long');} return false;\" href=\"#\"><span class=\"ts_more\">Tutte Positivo\/Negativo<\/span><span class=\"ts_less\">Meno Positivo\/Negativo<\/span> &raquo;<\/a><\/p> <\/div> <div class=\"l ts_show_if_awards awards_short\"> <h3 class=\"er_awards_header\">Premi di prodotto<\/h3> <div class=\"awards ts_award_loop\"> <div><img alt=\"%award_name%\" title=\"%award_name%\" %award_nop%src=\"%award_url%\" \/><\/div> <\/div> <p class=\"more_link\"><a onclick=\"var c = this.parentNode.parentNode.classList; if(c.contains('awards_long')) {c.remove('awards_long'); c.add('awards_short');} else {c.remove('awards_short'); c.add('awards_long');} return false;\" href=\"#\"><span class=\"ts_more\">Tutti i premi<\/span><span class=\"ts_less\">Meno premi<\/span> &raquo;<\/a><\/p> <\/div> <div class=\"l\"> <h3 class=\"er_list_header\">Recensioni Esperto<\/h3> <\/div> <div class=\"l\"> <div class=\"l ts_ereview_loop\"> <div class=\"l %er_class%\" data-tseek-rev-id=\"%review_id%\"> <div class=\"l r\"> <div class=\"ts_show_if_score ts_stars_rating\" style=\"margin-right: 10px;\" data-score=\"%e_score%\" title=\"%er_org_score% \/ %er_max_score%\"> <span class=\"ts_star1\">%icon_star%<\/span> <span class=\"ts_star2\">%icon_star%<\/span> <span class=\"ts_star3\">%icon_star%<\/span> <span class=\"ts_star4\">%icon_star%<\/span> <span class=\"ts_star5\">%icon_star%<\/span> <span class=\"ts_star_half\">%icon_half_star%<\/span> <span class=\"ts_star_e1\">%icon_empty_star%<\/span> <span class=\"ts_star_e2\">%icon_empty_star%<\/span> <span class=\"ts_star_e3\">%icon_empty_star%<\/span> <span class=\"ts_star_e4\">%icon_empty_star%<\/span> <span class=\"ts_star_e5\">%icon_empty_star%<\/span> <\/div> <div class=\"ts_beside_score\"> <div> <span class=\"ts_show_if_author ts_show_if_date\">Scritto da %er_author%, %er_author_date% @ %er_site%<\/span> <span class=\"ts_show_if_author ts_hide_if_date\">Scritto da %er_author% @ %er_site%<\/span> <span class=\"ts_hide_if_author ts_show_if_date\">Pubblicato %er_author_date% @ %er_site%<\/span> <span class=\"ts_hide_if_author ts_hide_if_date\">Pubblicato @ %er_site%<\/span> <span class=\"flag er_publisher_flag\" %er_nop%style=\"background-position: %er_flag_position%\" title=\"locale: %er_locale%\"><\/span> <\/div> <\/div> <div class=\"l\"> <iframe class=\"ts_iframe ts_inline_html ts_er_comments %er_class%\"> <div class=\"l ts_show_if_good_comment\"> <span class=\"pros_icon\">+<\/span> <p>%er_pro%<\/p> <\/div> <div class=\"l ts_show_if_bad_comment\"> <span class=\"cons_icon\">-<\/span> <p>%er_con%<\/p> <\/div> <div class=\"l ts_show_if_bottomline\"> <span class=\"bottomline_icon\">=<\/span> <p>%er_bottom%<\/p> <\/div> <div class=\"l ts_hide_if_comment_parts\"> <p>%er_comment%<\/p> <\/div> <\/iframe> <\/div> <\/div> <div class=\"l\"> <img class=\"ts_show_if_award ts_award\" alt=\"%award_name%\" %er_nop%src=\"%er_award_image_200%\" \/> <\/div> <div class=\"l\"> <iframe class=\"ts_iframe ts_inline_html %er_class%\"> <p><a class=\"ext_link_ts ext_link_er ts_hide_if_aer_product_url_inactive\" target=\"_blank\" onmousedown=\"testseek.track_this_er_link(this)\" href=\"%er_url%\" data-tseek-site-id=\"%er_site_id%\" data-tseek-rev-id=\"%review_id%\"> <span>Leggi la recensione completa a %er_site% &raquo;<\/span><br \/> <\/a><\/p> <\/iframe> <\/div> <div class=\"l\"> <p> <span>Questa recensione &egrave; stata utile?<\/span> <span class=\"g thumb\" onclick=\"testseek.ereview_vote_up(%review_id%, this)\">%icon_tup%<\/span> <span class=\"ts_vote_up\" data-ts-value=\"%er_up_votes%\">(%er_up_votes%)<\/span> <span class=\"r thumb\" onclick=\"testseek.ereview_vote_down(%review_id%, this)\">%icon_tdown%<\/span> <span class=\"ts_vote_down\" data-ts-value=\"%er_down_votes%\">(%er_down_votes%)<\/span> <span class=\"ts_vote_message\"><\/span> <\/p> <\/div> <\/div> <\/div> <div class=\"l r ts_show_if_partly_loaded\" style=\"text-align: center;\"> <p class=\"er_load_more\" onclick=\"testseek.load_more_er(this.parentNode.parentNode.children[0], 5);\">Vedi 5 pi&ugrave; &raquo;<\/p> <\/div> <\/div> <\/div> <!-- AUR --> <div data-ts-tab=\"aur\" class=\"ts_tab_content ts_show_if_aurev_summary\"> <div class=\"l\"> <h2 class=\"ts_aur_top_header\">Recensioni utente di %product_name%<\/h2> <\/div> <div class=\"l ts_rate_dist\"> <div class=\"ts_rate ts_arate %a_score_class%\" data-score=\"%a_score%\"> <div class=\"ts_stars_rating\"> <span class=\"ts_star1\">%icon_star%<\/span> <span class=\"ts_star2\">%icon_star%<\/span> <span class=\"ts_star3\">%icon_star%<\/span> <span class=\"ts_star4\">%icon_star%<\/span> <span class=\"ts_star5\">%icon_star%<\/span> <span class=\"ts_star_half\">%icon_half_star%<\/span> <span class=\"ts_star_e1\">%icon_empty_star%<\/span> <span class=\"ts_star_e2\">%icon_empty_star%<\/span> <span class=\"ts_star_e3\">%icon_empty_star%<\/span> <span class=\"ts_star_e4\">%icon_empty_star%<\/span> <span class=\"ts_star_e5\">%icon_empty_star%<\/span> <\/div> <div class=\"ts_rate_text\"> %a_count% recensioni utente <\/div> <\/div> <div class=\"ts_adist\"> <h3 class=\"aur_dist_header\">Distribuzione delle voto degli utenti<\/h3> <table> <colgroup> <col class=\"ts_adist_col_stars\" \/> <col class=\"ts_adist_col_text\" \/> <col class=\"ts_adist_col_bars\" \/> <\/colgroup> <tbody> <tr> <th class=\"ts_stars_rating\">%icon_star% %icon_star% %icon_star% %icon_star% %icon_star%<\/th> <td>(%ascore_5star_count%)<\/td> <td><span class=\"ts_bar_bg\"> <span class=\"bar_fg bar_5s ts_bar_animate\" style=\"width: 0%\" data-ts-graph-val=\"%ascore_5star_score%\"><\/span> <\/span><\/td> <\/tr> <tr> <th class=\"ts_stars_rating\">%icon_star% %icon_star% %icon_star% %icon_star% %icon_empty_star%<\/th> <td>(%ascore_4star_count%)<\/td> <td><span class=\"ts_bar_bg\"> <span class=\"bar_fg bar_4s ts_bar_animate\" style=\"width: 0%\" data-ts-graph-val=\"%ascore_4star_score%\"><\/span> <\/span><\/td> <\/tr> <tr> <th class=\"ts_stars_rating\">%icon_star% %icon_star% %icon_star% %icon_empty_star% %icon_empty_star%<\/th> <td>(%ascore_3star_count%)<\/td> <td><span class=\"ts_bar_bg\"> <span class=\"bar_fg bar_3s ts_bar_animate\" style=\"width: 0%\" data-ts-graph-val=\"%ascore_3star_score%\"><\/span> <\/span><\/td> <\/tr> <tr> <th class=\"ts_stars_rating\">%icon_star% %icon_star% %icon_empty_star% %icon_empty_star% %icon_empty_star%<\/th> <td>(%ascore_2star_count%)<\/td> <td><span class=\"ts_bar_bg\"> <span class=\"bar_fg bar_2s ts_bar_animate\" style=\"width: 0%\" data-ts-graph-val=\"%ascore_2star_score%\"><\/span> <\/span><\/td> <\/tr> <tr> <th class=\"ts_stars_rating\">%icon_star% %icon_empty_star% %icon_empty_star% %icon_empty_star% %icon_empty_star%<\/th> <td>(%ascore_1star_count%)<\/td> <td><span class=\"ts_bar_bg\"> <span class=\"bar_fg bar_1s ts_bar_animate\" style=\"width: 0%\" data-ts-graph-val=\"%ascore_1star_score%\"><\/span> <\/span><\/td> <\/tr> <\/tbody> <\/table> <\/div> <\/div> <div class=\"l ts_frate ts_show_if_aurss_features_summary\"> <h3 class=\"aur_feat_header\">Caratteristiche del prodotto rating<\/h3> <ul class=\"ts_aur_summary_feature_loop\"> <li> <span>%aur_sf_name%: %aur_sf_score%<\/span> <\/li> <\/ul> <\/div> <div class=\"l pros_con pros_con_short ts_show_if_aur_pros_or_cons\"> <div> <h3 class=\"aur_proscons_header\">Positivo:<\/h3> <ul class=\"ts_aur_summary_pros_loop\"> <li>%aur_summary_pro_name%<\/li> <\/ul> <\/div> <div> <h3 class=\"aur_proscons_header\">Negativo:<\/h3> <ul class=\"ts_aur_summary_cons_loop\"> <li>%aur_summary_con_name%<\/li> <\/ul> <\/div> <p class=\"more_link\">
159<a onclick=\"var c = this.parentNode.parentNode.classList; if(c.contains('pros_con_long')) {c.remove('pros_con_long'); c.add('pros_con_short');} else {c.remove('pros_con_short'); c.add('pros_con_long');} return false;\" href=\"#\"><span class=\"ts_more\">Tutte Positivo\/Negativo<\/span><span class=\"ts_less\">Meno Positivo\/Negativo<\/span> &raquo;<\/a><\/p> <\/div> <h3 class=\"aurss_headline\">Sintesi per rivenditore<\/h3> <div class=\"l ts_aurss_loop\"> <div class=\"l %aurss_classes%\"> <div class=\"l r\"> <div class=\"ext_link_aur_logo_box\"> <img alt=\"[%aurss_name% logo]\" %aurss_nop%src=\"%aurss_logo%\" class='aurss_logo' \/> <\/div> <div class=\"ts_rate ts_stars_rating\" data-score=\"%aurss_score%\"> <span class=\"ts_star1\">%icon_star%<\/span> <span class=\"ts_star2\">%icon_star%<\/span> <span class=\"ts_star3\">%icon_star%<\/span> <span class=\"ts_star4\">%icon_star%<\/span> <span class=\"ts_star5\">%icon_star%<\/span> <span class=\"ts_star_half\">%icon_half_star%<\/span> <span class=\"ts_star_e1\">%icon_empty_star%<\/span> <span class=\"ts_star_e2\">%icon_empty_star%<\/span> <span class=\"ts_star_e3\">%icon_empty_star%<\/span> <span class=\"ts_star_e4\">%icon_empty_star%<\/span> <span class=\"ts_star_e5\">%icon_empty_star%<\/span> <\/div> <div class=\"ext_link_aur_box ts_hide_if_aurss_product_url_inactive\"> <a class=\"ext_link_ts ext_link_aur\" id=\"%aurss_url%\" href=\"javascript:void(0)\" onclick=\"window.testseek.aurss_modal_urls_onclick(event)\"><span class=\"flag aurss_flag\" %aurss_nop%style=\"background-position: %aurss_flag_position%\" title=\"locale: %aurss_locale%\"><\/span> Leggi tutte le recensioni a %aurss_name% &raquo;<\/a> <\/div> <div id=\"%aurss_product_url_id%-id\" class=\"ts_aurss_product_urls_modal %aurss_product_url_id%\"> <div class=\"ts_aurss_product_urls_modal_content\"> <div class=\"ts_wtb_arrow\"><\/div> <a class=\"ts_wtb_close\" href=\"javascript:void(0)\" onclick=\"window.testseek.aurss_modal_urls_onclick(event)\">&times;<\/a> <img alt=\"[%aurss_name% logo]\" %aurss_nop%src=\"%aurss_logo%\" class='aurss_logo' \/> <br style=\"clear: both;\" \/> <ul class=\"ts_aurss_product_urls_loop\"> <li> <a class=\"ext_link_ts\" target=\"_blank\" onmousedown=\"testseek.track_this_aur_link(this)\" href=\"%aurss_product_url_link%\" data-tseek-aurss-id=\"%track_aurss_id%\" data-tseek-prod-id=\"%track_aurss_product_id%\"> <span class=\"flag aurss_flag\" %aurss_nop%style=\"background-position: %aurss_flag_position%\" title=\"locale: %aurss_locale%\"><\/span> %aurss_product_url_name% &raquo; <\/a> <\/li> <\/ul> <\/div> <\/div> <\/div> <div class=\"l\"> <div class=\"ts_adist\"> <h3 class=\"aur_sumlist_dist_header\">Distribuzione delle voto degli utenti<\/h3> <table> <colgroup> <col \/> <col style=\"width: 50px;\" \/> <col style=\"width: 100px;\" \/> <\/colgroup> <tbody> <tr> <th class=\"ts_stars_rating\">%icon_star% %icon_star% %icon_star% %icon_star% %icon_star%<\/th> <td>(%aurss_score_5star_count%)<\/td> <td><span class=\"ts_bar_bg\"> <span class=\"bar_fg bar_5s ts_bar_animate\" style=\"width: 0%\" data-ts-graph-val=\"%aurss_score_5star_score%\"><\/span> <\/span><\/td> <\/tr> <tr> <th class=\"ts_stars_rating\">%icon_star% %icon_star% %icon_star% %icon_star% %icon_empty_star%<\/th> <td>(%aurss_score_4star_count%)<\/td> <td><span class=\"ts_bar_bg\"> <span class=\"bar_fg bar_4s ts_bar_animate\" style=\"width: 0%\" data-ts-graph-val=\"%aurss_score_4star_score%\"><\/span> <\/span><\/td> <\/tr> <tr> <th class=\"ts_stars_rating\">%icon_star% %icon_star% %icon_star% %icon_empty_star% %icon_empty_star%<\/th> <td>(%aurss_score_3star_count%)<\/td> <td><span class=\"ts_bar_bg\"> <span class=\"bar_fg bar_3s ts_bar_animate\" style=\"width: 0%\" data-ts-graph-val=\"%aurss_score_3star_score%\"><\/span> <\/span><\/td> <\/tr> <tr> <th class=\"ts_stars_rating\">%icon_star% %icon_star% %icon_empty_star% %icon_empty_star% %icon_empty_star%<\/th> <td>(%aurss_score_2star_count%)<\/td> <td><span class=\"ts_bar_bg\"> <span class=\"bar_fg bar_2s ts_bar_animate\" style=\"width: 0%\" data-ts-graph-val=\"%aurss_score_2star_score%\"><\/span> <\/span><\/td> <\/tr> <tr> <th class=\"ts_stars_rating\">%icon_star% %icon_empty_star% %icon_empty_star% %icon_empty_star% %icon_empty_star%<\/th> <td>(%aurss_score_1star_count%)<\/td> <td><span class=\"ts_bar_bg\"> <span class=\"bar_fg bar_1s ts_bar_animate\" style=\"width: 0%\" data-ts-graph-val=\"%aurss_score_1star_score%\"><\/span> <\/span><\/td> <\/tr> <\/tbody> <\/table> <\/div> <!-- FIXME aurss_f_name and score does not work - its not replaced by JS after 5.4.0 xD --> <div class=\"ts_frate ts_show_if_aurss_features\" style=\"width: 190px; display: none\"> <h3 class=\"aur_sumlist_feat_header\">Caratteristiche del prodotto rating<\/h3> <ul class=\"ts_aurss_feature_loop\"> <li> <span>%aurss_f_name%: %aurss_f_score%<\/span> <\/li> <\/ul> <\/div> <div class=\" ts_recomendate ts_show_if_aurss_recommend\"> <h3>Consiglieresti questo prodotto?<\/h3> <div class=\"aur_sumlist_rec_pie\"> <svg width=\"62\" height=\"62\" class=\"ts_clock_graph\" data-ts-graph-val=\"%aurss_recommended_score%\"> <defs> <mask id=\"clock_%aurss_id%\"> <rect fill=\"white\" height=\"62\" width=\"62\" y=\"0\" x=\"0\"\/> <rect fill=\"black\" height=\"60\" width=\"2\" y=\"30\" x=\"30\" rx=\"1\" ey=\"1\" \/> <rect transform=\"rotate(0 31 31)\" fill=\"black\" height=\"60\" width=\"2\" y=\"30\" x=\"30\" id=\"clockarm\" rx=\"1\" ey=\"1\" \/> <\/mask> <\/defs> <g mask=\"url(#clock_%aurss_id%)\"> <rect fill-opacity=\"0\" height=\"60\" width=\"60\" y=\"1\" x=\"1\" \/> <circle id=\"fg1\" r=\"15\" cy=\"31\" cx=\"31\" stroke-width=\"30\" stroke=\"#87d962\" fill-opacity=\"0\" transform=\"rotate(90 31 31)\" stroke-dasharray=\"0 260\" \/> <circle id=\"fg2\" r=\"15\" cy=\"31\" cx=\"31\" stroke-width=\"30\" stroke=\"#de5a5a\" fill-opacity=\"0\" transform=\"scale(-1,1) rotate(90 0 0)\" stroke-dasharray=\"0 260\" \/> <\/g> <\/svg> <\/div> <div class=\"aur_sumlist_rec_pie_explain\"> <span style=\"color: #87d962\">&#x25cf;<\/span>S&igrave; (%aurss_recommended_yes%)<br \/> <span style=\"color: #de5a5a\">&#x25cf;<\/span>No (%aurss_recommended_no%) <\/div> <\/div> <\/div> <\/div> <div class=\"l r ts_show_if_partly_loaded todo_hide_if_no_sc_full_aur\"> <p style=\"text-align: center;\" class=\"aur_load_more\" onclick=\"testseek.load_more_aur(this.parentNode.parentNode.children[0], 5);\">Vedi 5 pi&ugrave; &raquo;<\/p> <\/div> <!-- poslednji div na kraju --> <\/div> <\/div> <\/div> <br style=\"clear: both;\" \/> ";
160
161/* End of Templates */
162
163/* Start of asort_num.js */
164/**
165 * Sorting functions
166 * asort_num() and its subfunction asort_func()
167 */
168
169/**
170 * Sort an objects attributes by its numeric values
171 * NOTICE: attribute order is not required to be preserved by client.
172 *
173 * @param {Object} unsorted_object - object the object to sort
174 * @param {boolean} desc - reverse order?
175 *
176 * @return {Object} - object with sorted attributes
177 *
178 * @depends asort_func
179 **/
180window.testseek.asort_num = function(unsorted_object, desc)
181{
182	// if reverse order
183	if(desc)
184	{
185		// use b - a comparison
186		return window.testseek.asort_func(
187			unsorted_object,
188			function (a, b) {
189				return (b[1] - a[1]);
190			}
191		);
192	}
193	// normal order
194	else
195	{
196		// use a - b comparison
197		return window.testseek.asort_func(
198			unsorted_object,
199			function (a, b) {
200				return (a[1] - b[1]);
201			}
202		);
203	}
204}
205
206/**
207 * Sort an objects attributes by a function
208 * NOTICE: attribute order is not required to be preserved by client.
209 *
210 * @param unsorted_object object the object to sort
211 * @param sort_function callable(a, b) where a[0] and b[0] is the name, and a[1] and b[1] is the value
212 *
213 * @return object with sorted attributes
214 **/
215window.testseek.asort_func = function(unsorted_object, sort_function)
216{
217	// a list for attributes
218	var data = [];
219
220	// loop all attributes
221	for(var key in unsorted_object)
222	{
223		// append list with an array, where index 0 is the attribute name, and index 1 is the attributes value
224		data.push([key, unsorted_object[key]]);
225	}
226
227	// sort attributes by given funktion
228	data.sort(sort_function);
229
230	// create a new object, that will be given the sorted attributes
231	var sorted_object = {};
232
233	// loop list of attributes
234	var data_length = data.length;
235	for(var index = 0; index < data_length; index++)
236	{
237		// attach attributes on the new object
238		sorted_object[data[index][0]] = data[index][1];
239	}
240
241	// return the new object
242	return sorted_object;
243}
244/* End of asort_num.js */
245
246/* Start of aurss_modal_urls.js */
247
248window.testseek.aurss_modal_urls_onresize = function(event) {};
249
250window.testseek.aurss_modal_urls_onclick = function(event) {
251
252    var btnLinkedIn = event.target;
253
254    //if clicked on X, close modal (all), as we don't allow multiple open modals at once
255    if ('ts_wtb_close' === btnLinkedIn.className) {
256        window.testseek.aurss_modal_close(null, 0xff);
257        return;
258    }
259
260    if (!btnLinkedIn.classList.contains('ext_link_aur')) return;
261
262    var btnID = btnLinkedIn.id;
263
264    //handle modal via function
265    window.testseek.aurss_modal_open(btnID + '-modal');
266};
267
268//window.testseek.aurss_modal_close = function (elem = null, closeAll = false) // N/A in WebView mobile browsers
269window.testseek.aurss_modal_close = function (elem, closeAll) {
270
271    var allUrlModals = document.getElementsByClassName('ts_aurss_product_urls_modal');
272
273    for (var urlModalObj in allUrlModals) {
274        if (allUrlModals.hasOwnProperty(urlModalObj)) {
275
276            var eachModal = allUrlModals[urlModalObj];
277
278            //fix for limited Andorid native WebView browsers xD
279            if (!eachModal.id) continue;
280
281            //skip current modal we're dealing with
282            if (!closeAll && eachModal.id === elem.id) continue;
283
284            //reset every other modal visibility
285            eachModal.style.opacity = 0;
286            //reset positions
287            //eachModal.style.right = '0px';
288            eachModal.style.top = '500px';
289            //set z-index
290            eachModal.style.zIndex = -1;
291        }
292    }
293
294};
295
296window.testseek.aurss_modal_open = function (btnID) {
297
298    var allClickedModalsByClassName = document.getElementsByClassName(btnID);
299
300    for (var eachModalToBeOpened in allClickedModalsByClassName) {
301        if (allClickedModalsByClassName.hasOwnProperty(eachModalToBeOpened)) {
302
303            var modalLinkedIn = allClickedModalsByClassName[eachModalToBeOpened];
304
305            //fix for limited Andorid native WebView browsers xD
306            if (!modalLinkedIn.id) continue;
307
308            //Visibility study
309            var isVisibleMijn = modalLinkedIn.style.opacity;
310
311            isVisibleMijn = !isVisibleMijn || '0' === isVisibleMijn ? 1 : 0;
312
313            //set visibility according to user action
314            modalLinkedIn.style.opacity = isVisibleMijn;
315
316            //throw it out of focus when closed
317            if (!isVisibleMijn) {
318                //set z-index
319                modalLinkedIn.style.zIndex = -1;
320                modalLinkedIn.style.top = '500px';
321            }
322            else { //activated
323                //Modal is locked top right
324                modalLinkedIn.style.top = '0px';
325                //modalLinkedIn.style.right = '0px';
326                //set z-index to visible
327                modalLinkedIn.style.zIndex = 1;
328            }
329
330            //close any other active modal, if any
331            window.testseek.aurss_modal_close(modalLinkedIn);
332
333        }
334    }
335
336};/* End of aurss_modal_urls.js */
337
338/* Start of bar_animate.js */
339/**
340 * Animate bars with the class ts_bar_animate
341 *
342 * @attribute data-ts-graph-val int[0-100] % of graph to show
343 **/
344
345window.testseek.bar_animate = function() {
346	// Find all graphs with the class ts_bar_animate
347	var graphs = document.getElementsByClassName('ts_bar_animate');
348
349	// loop all matching graphs
350	for(var g_nr = graphs.length; g_nr > 0;)
351	{
352		var graph = graphs[--g_nr];
353
354		// fetch value from attribute
355		var value = parseFloat(graph.getAttribute('data-ts-graph-val'));
356
357		// if value exists
358		if(value)
359		{
360			// set width using value
361			graph.style.width = value + '%'
362
363			// remove the class, animation done
364			graph.classList.remove('ts_bar_animate');
365		}
366	}
367}
368/* End of bar_animate.js */
369
370/* Start of config_init.js */
371/**
372 * init missing config-settings
373 */
374
375// init data structure
376if(!window.testseek)
377{
378	window.testseek = {};
379}
380
381if(!window.testseek.products)
382{
383	window.testseek.products = {};
384}
385
386if(!window.testseek.mpns)
387{
388	window.testseek.mpns = {};
389}
390
391if(!window.testseek.pids)
392{
393	window.testseek.pids = {};
394}
395
396if(!window.testseek.icecats)
397{
398	window.testseek.icecats = {};
399}
400
401if(!window.testseek.pending)
402{
403	window.testseek.pending = [];
404}
405
406
407// Init config structure
408if(!window.testseek.key)
409{
410	window.testseek.key = "";
411}
412
413if(!window.testseek.lang)
414{
415	window.testseek.lang = "";
416}
417
418if(!window.testseek.sort_lang)
419{
420	window.testseek.sort_lang = "";
421}
422
423if(!window.testseek.er_count && typeof(window.testseek.er_count) != "number")
424{
425	window.testseek.er_count = 15;
426}
427
428/* Nemanja edit: we don't want to hard-code API version, we generate it on the fly or even allow users to make their choice
429if(!window.testseek.search_version)
430{
431	window.testseek.search_version = '5.1';
432}
433*/
434
435if(!window.testseek.ts_domain)
436{
437	window.testseek.ts_domain = 'partner.testseek.com';
438}
439
440if(!window.testseek.verbose)
441{
442	window.testseek.verbose = false;
443}
444
445if(!window.testseek.vote_url)
446{
447	window.testseek.vote_url = 'https://' + window.testseek.ts_domain + '/vote.php?';
448}
449
450if(!window.testseek.search_url)
451{
452	window.testseek.search_url = 'https://' + window.testseek.ts_domain + '/json.php?v=' + window.testseek.search_version + '&key=' + window.testseek.key + (window.testseek.sort_lang ? '&lang=' + window.testseek.sort_lang : (window.testseek.lang ? '&lang=' + window.testseek.lang : ''));
453}
454
455if(!window.testseek.auto_resize_class)
456{
457	window.testseek.auto_resize_class = 'ts_resize';
458}
459
460if(!window.testseek.tracking)
461{
462	window.testseek.tracking = false;
463}
464
465if(!window.testseek.popup_template)
466{
467	window.testseek.popup_template = "";
468}
469
470if(!window.testseek.icon_library)
471{
472	window.testseek.icon_library = '';
473}
474
475if(!window.testseek.icon_library_url)
476{
477	window.testseek.icon_library_url = '';
478}
479
480
481
482if(!window.testseek.filters)
483{
484	window.testseek.filters = {};
485}
486
487if(!window.testseek.filters.er_lang)
488{
489	window.testseek.filters.er_lang = '';
490}
491
492if(!window.testseek.filters.er_have_score)
493{
494	window.testseek.filters.er_have_score = 0;
495}
496
497if(!window.testseek.filters.er_min_score)
498{
499	window.testseek.filters.er_min_score = 0;
500}
501
502if(!window.testseek.filters.product_min_er_score)
503{
504	window.testseek.filters.product_min_er_score = 0;
505}
506
507if(!window.testseek.filters.product_min_aur_score)
508{
509	window.testseek.filters.product_min_aur_score = 0;
510}
511
512if(!window.testseek.filters.er_sort)
513{
514	window.testseek.filters.er_sort = "";
515}
516
517if(!window.testseek.filters.aur_sort)
518{
519	window.testseek.filters.aur_sort = "";
520}
521
522if(!window.testseek.filters.v_sort)
523{
524	window.testseek.filters.v_sort = "";
525}
526
527
528// Init template config
529if(!window.testseek.template_by_class)
530{
531	window.testseek.template_by_class = {};
532}
533
534if(!window.testseek.template_by_id)
535{
536	window.testseek.template_by_id = {};
537}
538
539if(!window.testseek.template_by_tagname)
540{
541	window.testseek.template_by_tagname = {};
542}
543
544if(!window.testseek.templates)
545{
546	window.testseek.templates = {};
547}
548/* End of config_init.js */
549
550/* Start of ereview_vote.js */
551/**
552 * Voteing functions
553 */
554
555/**
556 * Vote up on a expert review
557 *
558 * @param id int review_id of the review to vote on
559 * @param element HTMLElement where to find values to update vote
560 *
561 * @depends send_vote
562 **/
563window.testseek.ereview_vote_up = function(id, element)
564{
565	// define a callback for what to do when ajax respond
566	var callback = function(a, e) {
567		// if ajax-vote succeded
568		if(a.ok)
569		{
570			// find the ts_vote_up-classed element
571			var elements = e.parentNode.getElementsByClassName('ts_vote_up');
572			if(!elements)
573			{
574				return false;
575			}
576			if(!elements[0])
577			{
578				return false;
579			}
580			if(!elements[0].getAttribute)
581			{
582				return false;
583			}
584
585			// fetch the old value from the elemnts attribute data-ts-value
586			var old_value = elements[0].getAttribute('data-ts-value');
587			if(!old_value)
588			{
589				return false;
590			}
591
592			// Set vote-up value to one higher then the old value
593			var current_value = parseInt(elements[0].innerHTML);
594			var new_value = parseInt(old_value) + 1;
595			elements[0].innerHTML = new_value;
596			var changed = (new_value != current_value);
597
598			// find the ts_vote_down-classed element
599			var elements = e.parentNode.getElementsByClassName('ts_vote_down');
600			if(!elements)
601			{
602				return false;
603			}
604			if(!elements[0])
605			{
606				return false;
607			}
608			if(!elements[0].getAttribute)
609			{
610				return false;
611			}
612
613			// fetch the old value from the elemnts attribute data-ts-value
614			var old_value = elements[0].getAttribute('data-ts-value');
615			if(!old_value)
616			{
617				return false;
618			}
619
620			// Restore the vote-down value, decresing it if it was increased by a vote down by this user.
621			elements[0].innerHTML = parseInt(old_value);
622
623			var elements = e.parentNode.getElementsByClassName('ts_vote_message');
624			if(!elements)
625			{
626				return true;
627			}
628			if(!elements[0])
629			{
630				return true;
631			}
632			if(!elements[0].getAttribute)
633			{
634				return true;
635			}
636
637			elements[0].innerHTML = window.testseek.htmlentities(window.testseek.l10n(changed ? 'vote_sucess' : 'vote_only_once'));
638
639			return true;
640		}
641
642		// ajax failed
643		if(window.testseek.verbose)
644		{
645			// log resonse, for debuging
646			console.log(a);
647		}
648
649		return false;
650	}
651
652	// Call send_vote, using prefix ER (Expert Reviews), and type '+' for vote up
653	window.testseek.send_vote('ER', id, '+', callback, element);
654}
655
656/**
657 * Vote down on a expert review
658 *
659 * @param id int review_id of the review to vote on
660 * @param element HTMLElement where to find values to update vote
661 *
662 * @depends send_vote
663 **/
664window.testseek.ereview_vote_down = function(id, element)
665{
666	// define a callback for what to do when ajax respond
667	var callback = function(a, e) {
668		if(a.ok)
669		{
670			// find the ts_vote_down-classed element
671			var elements = e.parentNode.getElementsByClassName('ts_vote_down');
672			if(!elements)
673			{
674				return false;
675			}
676			if(!elements[0])
677			{
678				return false;
679			}
680			if(!elements[0].getAttribute)
681			{
682				return false;
683			}
684
685			// fetch the old value from the elemnts attribute data-ts-value
686			var old_value = elements[0].getAttribute('data-ts-value');
687			if(!old_value)
688			{
689				return false;
690			}
691			var current_value = parseInt(elements[0].innerHTML);
692			var new_value = parseInt(old_value) + 1;
693			elements[0].innerHTML = new_value;
694			var changed = (new_value != current_value);
695
696			// find the ts_vote_up-classed element
697			var elements = e.parentNode.getElementsByClassName('ts_vote_up');
698			if(!elements)
699			{
700				return false;
701			}
702			if(!elements[0])
703			{
704				return false;
705			}
706			if(!elements[0].getAttribute)
707			{
708				return false;
709			}
710
711			// fetch the old value from the elemnts attribute data-ts-value
712			var old_value = elements[0].getAttribute('data-ts-value');
713			if(!old_value)
714			{
715				return false;
716			}
717
718			// Restore the vote-up value, decresing it if it was increased by a vote up by this user.
719			elements[0].innerHTML = parseInt(old_value);
720
721			var elements = e.parentNode.getElementsByClassName('ts_vote_message');
722			if(!elements)
723			{
724				return true;
725			}
726			if(!elements[0])
727			{
728				return true;
729			}
730			if(!elements[0].getAttribute)
731			{
732				return true;
733			}
734
735			elements[0].innerHTML = window.testseek.htmlentities(window.testseek.l10n(changed ? 'vote_sucess' : 'vote_only_once'));
736
737			return true;
738		}
739
740		// ajax failed
741		if(window.testseek.verbose)
742		{
743			// log resonse, for debuging
744			console.log(a);
745		}
746
747		return false;
748	}
749
750	// Call send_vote, using prefix ER (Expert Reviews), and type '-' for vote down
751	window.testseek.send_vote('ER', id, '-', callback, element);
752}
753/* End of ereview_vote.js */
754
755/* Start of extend_aur.js */
756/**
757 * Extend a AU review loop, with more content
758 *
759 * @param loop_base HTMLElement the element to extend, using its .ts.template
760 * @param list array list of review_ids to extend the element with
761 *
762 * @depends render_e_review, render_finish, render_finish_activate
763 **/
764
765window.testseek.extend_aur = function(loop_base, list)
766{
767	// list to store the new generated html
768	var html = [];
769	var list_length = list.length;
770
771	// loop all review_ids in the list
772	for(var row_nr = 0; row_nr < list_length; row_nr++)
773	{
774		var review_id = list[row_nr];
775
776		// if the review is already fetched
777		if(testseek.aur_content[review_id])
778		//if(testseek.ereviews[review_id])
779		{
780			// render the review data, and push it to the html list
781			//items_html.push(window.testseek.render_au_review(loop_base.ts_template, this_aurss_full_review));
782			html.push(window.testseek.render_au_review(loop_base.ts_template, testseek.aur_content[review_id]));
783
784			// if review listed as pending
785			var pending_row = loop_base.pending.indexOf(review_id);
786			if(pending_row > -1)
787			{
788				// remove it from the list of pending
789				loop_base.pending.splice(pending_row, 1);
790			}
791		}
792	}
793
794	// if there are new html
795	if(html.length > 0)
796	{
797		// NOTICE appending innerHTML regenerate all children, not what we want, better to move children
798		// create a real htmlelement
799		var new_html_elements = document.createElement('div');
800
801		// Put all the html inside it
802		new_html_elements.innerHTML += html.join('\n');
803
804		// for all the child elements
805		while(new_html_elements.firstChild)
806		{
807			// move them to real element
808			loop_base.appendChild(new_html_elements.firstChild);
809		}
810
811		// Call the render_finish-function, to activate animations and iframe content
812		window.testseek.render_finish_activate();
813	}
814}
815/* End of extend_aur.js */
816
817/* Start of extend_er.js */
818/**
819 * Extend a ereview-loop, with more content
820 *
821 * @param loop_base HTMLElement the element to extend, using its .ts.template
822 * @param list array list of review_ids to extend the element with
823 *
824 * @depends render_e_review, render_finish, render_finish_activate
825 **/
826
827window.testseek.extend_er = function(loop_base, list)
828{
829	// list to store the new generated html
830	var html = [];
831	var list_length = list.length;
832
833	// loop all review_ids in the list
834	for(var row_nr = 0; row_nr < list_length; row_nr++)
835	{
836		var review_id = list[row_nr];
837
838		// if the review is already fetched
839		if(testseek.ereviews[review_id])
840		{
841			// render the review data, and push it to the html list
842			html.push(window.testseek.render_e_review(loop_base.ts_template, testseek.ereviews[review_id]));
843
844			// if review listed as pending
845			var pending_row = loop_base.pending.indexOf(review_id);
846			if(pending_row > -1)
847			{
848				// remove it from the list of pending
849				loop_base.pending.splice(pending_row, 1);
850			}
851		}
852	}
853
854	// if there are new html
855	if(html.length > 0)
856	{
857		// NOTICE appending innerHTML regenerate all children, not what we want, better to move children
858		// create a real htmlelement
859		var new_html_elements = document.createElement('div');
860
861		// Put all the html inside it
862		new_html_elements.innerHTML += html.join('\n');
863
864		// for all the child elements
865		while(new_html_elements.firstChild)
866		{
867			// move them to real element
868			loop_base.appendChild(new_html_elements.firstChild);
869		}
870
871		// Call the render_finish-function, to activate animations and iframe content
872		window.testseek.render_finish_activate();
873	}
874}
875/* End of extend_er.js */
876
877/* Start of feature_animate.js */
878/**
879 * animate elements with the class ts_feature_animate
880 *
881 * @attribute data-ts-graph-val int[0-100] %-value to show
882 **/
883
884window.testseek.feature_animate = function() {
885	// get all elements with the class ts_feature_animate
886	var graphs = document.getElementsByClassName('ts_feature_animate');
887
888	// loop all matching graphs
889	for(var g_nr = graphs.length; g_nr > 0;)
890	{
891		var graph = graphs[--g_nr];
892
893		// fetch the value from the data-ts-graph-val attribute
894		var value = parseFloat(graph.getAttribute('data-ts-graph-val'));
895
896		// if there is a value
897		if(value)
898		{
899			// fetch all lines
900			var lines = graph.getElementsByTagName("line");
901
902			// fetch the dash-size on the 2nd line (1st is background, 2nd is forground)
903			var sizes = lines[1].getAttribute('stroke-dasharray').split(' ');
904
905			// IE 11 fix, somehow IE replaces the spaces with ','
906			if(sizes.length==1)
907			{
908				sizes = lines[1].getAttribute('stroke-dasharray').split(',');
909			}
910
911			// 1st dash size is the length of 20% (dash-visible)
912			// 2nd dash size is the length of the separator (dash-invisible)
913			// calculate the end position = value% * dash-visible/20% + count-of-separators * dash-invisible
914			var x2 = value * parseFloat(sizes[0]) / 20 + Math.floor(value / 20) * parseFloat(sizes[1]);
915
916			// set the length of the 2nd line (forground)
917			lines[1].setAttribute('x2', x2);
918
919			// for mordern browser
920			if(graph.classList)
921			{
922				// remove animation class, already animated
923				graph.classList.remove('ts_feature_animate');
924			}
925			// Fix for IE 11
926			else
927			{
928				graph.setAttribute("class", (' ' + graph.getAttribute("class") + ' ').replace(/\s+/, ' ').replace(' ts_feature_animate ', ' ') .trim());
929			}
930		}
931	}
932}
933/* End of feature_animate.js */
934
935/* Start of handle_message.js */
936/**
937 * Used to share messages between frames
938 * (Not needed for the moment, as we found other ways to solve thus problems)
939 **/
940
941window.testseek.handle_message = function(e) {
942	try
943	{
944		var data = JSON.parse(e.data);
945	}
946	catch (error)
947	{
948		return false;
949	}
950
951	if(window.testseek.verbose)
952	{
953		console.log(data);
954	}
955	return true;
956}
957/* End of handle_message.js */
958
959/* Start of handle_respone.js */
960/**
961 * parse and store returned data from testseeks api
962 *
963 * @param response the data to parse
964 * @param elements array list of HTMLElement to use load_element after the response is handled
965 *
966 * @depends load_element
967 **/
968
969window.testseek.handle_respone = function(response, elements)
970{
971	// JSON-string? (or JSON parsed object)
972	if(typeof response == "string")
973	{
974		// parse the JSON string in to a object
975		response = JSON.parse(response);
976	}
977
978	// if response have products
979	if(response.products)
980	{
981		// if we already have products, merge needed
982		if(this.products)
983		{
984			// loop all new products
985			for(var key in response.products)
986			{
987				// if we already have that product
988				if(this.products[key])
989				{
990					// TODO: merge
991					if(window.testseek.verbose) {console.log("JS Merge of product, not avaible"); console.log(key); console.log(this.products[key]); console.log(response.products[key]);}
992					this.products[key] = response.products[key];
993					this.products[key].config = response.config;
994				}
995				// if we didn't have that product
996				else
997				{
998					// add it to our list
999					this.products[key] = response.products[key];
1000					this.products[key].config = response.config;
1001				}
1002			}
1003		}
1004		// we don't have products yet
1005		else
1006		{
1007			// just store them as they are
1008			this.products = response.products;
1009		}
1010	}
1011
1012	// response-types that can be simply merged
1013	var simple_merge_categories = ['aurss', 'ereviews', 'mpns', 'pids', 'icecats', 'videos', 'test_sites', 'aur_content'];
1013 //added aur_content
1014	var category_count = simple_merge_categories.length;
1015
1016	// loop thos response-types
1017	for(var row_nr = 0; row_nr < category_count; row_nr++)
1018	{
1019		var cat_key = simple_merge_categories[row_nr];
1020
1021		// if response have this type
1022		if(response[cat_key])
1023		{
1024			// if we already have this type
1025			if(this[cat_key])
1026			{
1027				// loop all entites in the response
1028				for(var key in response[cat_key])
1029				{
1030					// copy that entity into our list
1031					this[cat_key][key] = response[cat_key][key];
1032				}
1033			}
1034			// if we don't have this type
1035			else
1036			{
1037				// copy it all
1038				this[cat_key] = response[cat_key];
1039			}
1040		}
1041	}
1042
1043	// if we have a list of elements to load
1044	if(elements)
1045	{
1046		var element_count = elements.length;
1047
1048		// loop all elements
1049		for(var index = 0; index < element_count; index++)
1050		{
1051			// load the element using load_element()
1052			this.load_element(elements[index], false, true);
1053		}
1054	}
1055}
1056/* End of handle_respone.js */
1057
1058/* Start of htmlentities.js */
1059window.testseek.htmlentities = function(s)
1060{
1061	if(!s) return s;
1062	else if(!s.replace) return s;
1063	else return s
1064		.replace(/&/g, '&amp;')
1065		.replace(/"/g, '&quot;')
1066		.replace(/'/g, '&#39;')
1067		.replace(/</g, '&lt;')
1068		.replace(/>/g, '&gt;')
1069	;
1070}
1071/* End of htmlentities.js */
1072
1073/* Start of icons.js */
1074window.testseek.icons = function(icon) {
1075	switch(window.testseek.icon_library)
1076	{
1077		case 'fa':
1078		{
1079			switch(icon)
1080			{
1081				case 'star':
1082				{
1083					return '<i class="fa fa-star" aria-hidden="true"></i>';
1084				}
1085
1086				case 'empty_star':
1087				{
1088					return '<i class="fa fa-star-o" aria-hidden="true"></i>';
1089				}
1090
1091				case 'half_star':
1092				{
1093					return '<i class="fa fa-star-half-o" aria-hidden="true"></i>';
1094				}
1095
1096				case 'tup':
1097				{
1098					return '<i class="fa fa-thumbs-o-up" aria-hidden="true"></i>';
1099				}
1100
1101				case 'tdown':
1102				{
1103					return '<i class="fa fa-thumbs-o-down" aria-hidden="true"></i>';
1104				}
1105
1106				default:
1107				{
1108					return '';
1109				}
1110			}
1111		}
1112
1113		case 'google':
1114		{
1115			switch(icon)
1116			{
1117				case 'star':
1118				{
1119					return '<i class="material-icons">star</i>';
1120				}
1121
1122				case 'empty_star':
1123				{
1124					return '<i class="material-icons">star_border</i>';
1125				}
1126
1127				case 'half_star':
1128				{
1129					return '<i class="material-icons">star_half</i>';
1130				}
1131
1132				case 'tup':
1133				{
1134					return '<i class="material-icons">thumb_up</i>';
1135				}
1136
1137				case 'tdown':
1138				{
1139					return '<i class="material-icons">thumb_down</i>';
1140				}
1141
1142				default:
1143				{
1144					return '';
1145				}
1146			}
1147		}
1148
1149		case 'bootstrap':
1150		{
1151			switch(icon)
1152			{
1153				// bootstrap don't have half-stars
1154				case 'star':
1155				case 'half_star':
1156				{
1157					return '<i class="glyphicon glyphicon-star"></i>';
1158				}
1159
1160				case 'empty_star':
1161				{
1162					return '<i class="glyphicon glyphicon-star-empty"></i>';
1163				}
1164
1165				case 'tup':
1166				{
1167					return '<i class="glyphicon glyphicon-thumbs-up"></i>';
1168				}
1169
1170				case 'tdown':
1171				{
1172					return '<i class="glyphicon glyphicon-thumbs-down"></i>';
1173				}
1174
1175				default:
1176				{
1177					return '';
1178				}
1179			}
1180		}
1181
1182		case '':
1183		case 'system':
1184		default:
1185		{
1186			switch(icon)
1187			{
1188				// unicode don't have half-stars
1189				case 'star':
1190				case 'half_star':
1191				{
1192					return '&#x2605;';
1193				}
1194
1195				case 'empty_star':
1196				{
1197					return '&#x2606;';
1198				}
1199
1200				case 'tup':
1201				{
1202					return '&#x1f44d;';
1203				}
1204
1205				case 'tdown':
1206				{
1207					return '&#x1f44e;';
1208				}
1209
1210				default:
1211				{
1212					return '';
1213				}
1214			}
1215		}
1216	}
1217}
1218/* End of icons.js */
1219
1220/* Start of init.js */
1221window.testseek.init = function() {
1222	// list of stuff to ask for
1223	var pending = [];
1224
1225	if(this.template_by_class && document.getElementsByClassName)
1226	{
1227		for(var ts_element_class in this.template_by_class)
1228		{
1229			var elements = document.getElementsByClassName(ts_element_class);
1230			var element_count = elements.length;
1231			for(var element_nr = 0; element_nr < element_count; element_nr++)
1232			{
1233				this.load_element(elements[element_nr], this.template_by_class[ts_element_class], true);
1234			}
1235		}
1236	}
1237	if(this.template_by_id)
1238	{
1239		for(var ts_element_id in this.template_by_id)
1240		{
1241			var element = document.getElementById(ts_element_id);
1242			if(element)
1243			{
1244				this.load_element(element, this.template_by_id[ts_element_id], true);
1245			}
1246		}
1247	}
1248	if(this.template_by_tagname)
1249	{
1250		for(var ts_element_tagname in this.template_by_tagname)
1251		{
1252			var elements = document.getElementsByTagName(ts_element_tagname);
1253			var element_count = elements.length;
1254			for(var element_nr = 0; element_nr < element_count; element_nr++)
1255			{
1256				this.load_element(elements[element_nr], this.template_by_tagname[ts_element_class], true);
1257			}
1258		}
1259	}
1260
1261	window.testseek.load_held();
1262
1263	window.testseek.add_listners();
1264}
1265/* End of init.js */
1266
1267/* Start of init_css.js */
1268window.testseek.init_css = function(ts_srv) {
1269    var flagsFanta = 'https://' + ts_srv + '/images/testsites/flag_sprite.png';
1270	var css = [
1271		'.ts_product_na {display: none;}',
1272		'.ts_ereviews_none .ts_show_if_erev {display: none;}',
1273		'.ts_ereviews_have .ts_hide_if_erev {display: none;}',
1274		'.ts_ereviews_no_score .ts_show_if_escore {display: none;}',
1275		'.ts_ereviews_have_score .ts_hide_if_escore {display: none;}',
1276		'.ts_videos_none .ts_show_if_vrev {display: none;}',
1277		'.ts_videos_have .ts_hide_if_vrev {display: none;}',
1278		'.ts_aureviews_na .ts_show_if_aurev {display: none;}',
1279		'.ts_aureviews_summary_na .ts_show_if_aurev_summary {display: none;}',
1280		'.ts_aureviews_none .ts_show_if_aurev {display: none;}',
1281		'.ts_aureviews_none .ts_show_if_aurev_summary {display: none;}',
1282		'.ts_aureviews_have .ts_hide_if_aurev {display: none;}',
1283		'.ts_aureviews_have .ts_hide_if_aurev_summary {display: none;}',
1284		'.ts_aureviews_no_score .ts_show_if_auscore {display: none;}',
1285		'.ts_aureviews_have_score .ts_hide_if_auscore {display: none;}',
1286		'.ts_ureviews_none .ts_show_if_urev {display: none;}',
1287		'.ts_ureviews_have .ts_hide_if_urev {display: none;}',
1288		'.ts_ureviews_no_score .ts_show_if_uscore {display: none;}',
1289		'.ts_ureviews_have_score .ts_hide_if_uscore {display: none;}',
1290		'.ts_videos_none .ts_show_if_videos {display: none;}',
1291		'.ts_videos_have .ts_hide_if_videos {display: none;}',
1292
1293		'.ts_ereviews_any_cons .ts_hide_if_cons {display: none;}',
1294		'.ts_ereviews_no_cons .ts_show_if_cons {display: none;}',
1295		'.ts_ereviews_any_pros .ts_hide_if_pros {display: none;}',
1296		'.ts_ereviews_no_pros .ts_show_if_pros {display: none;}',
1297		'.ts_ereviews_any_cons.ts_ereviews_any_pros .ts_hide_if_pros_and_cons {display: none;}',
1298		'.ts_ereviews_any_cons .ts_hide_if_pros_or_cons {display: none;}',
1299		'.ts_ereviews_any_pros .ts_hide_if_pros_or_cons {display: none;}',
1300        '.ts_aur_no_cons .ts_show_if_aur_pros_or_cons {display: none;}',
1301        '.ts_aur_no_pros .ts_show_if_aur_pros_or_cons {display: none;}',
1302		'.ts_ereviews_no_cons.ts_ereviews_no_pros .ts_show_if_pros_or_cons {display: none;}',
1303		'.ts_ereviews_no_cons .ts_show_if_pros_and_cons {display: none;}',
1304		'.ts_ereviews_no_pros .ts_show_if_pros_and_cons {display: none;}',
1305		'.ts_ereviews_any_award .ts_hide_if_awards {display: none;}',
1306		'.ts_ereviews_no_award .ts_show_if_awards {display: none;}',
1307		'.ts_have_score .ts_hide_if_score {display: none;}',
1308		'.ts_no_score .ts_show_if_score {display: none;}',
1309		'.ts_have_award .ts_hide_if_award {display: none;}',
1310		'.ts_no_award .ts_show_if_award {display: none;}',
1311		'.ts_have_ts_award .ts_hide_if_ts_award {display: none;}',
1312		'.ts_no_ts_award .ts_show_if_ts_award {display: none;}',
1313		'.ts_have_author .ts_hide_if_author {display: none;}',
1314		'.ts_no_author .ts_show_if_author {display: none;}',
1315		'.ts_have_date .ts_hide_if_date {display: none;}',
1316		'.ts_no_date .ts_show_if_date {display: none;}',
1317		'.ts_have_comment .ts_hide_if_comment {display: none;}',
1318		'.ts_no_comment .ts_show_if_comment {display: none;}',
1319		'.ts_comment_have_parts .ts_hide_if_comment_parts {display: none;}',
1320		'.ts_comment_no_parts .ts_show_if_comment_parts {display: none;}',
1321		'.ts_comment_have_good .ts_hide_if_good_comment {display: none;}',
1322		'.ts_comment_no_good .ts_show_if_good_comment {display: none;}',
1323		'.ts_comment_have_bad .ts_hide_if_bad_comment {display: none;}',
1324		'.ts_comment_no_bad .ts_show_if_bad_comment {display: none;}',
1325		'.ts_comment_have_bottom .ts_hide_if_bottomline {display: none;}',
1326		'.ts_comment_no_bottom .ts_show_if_bottomline {display: none;}',
1327		'.ts_comment_have_headline .ts_hide_if_headline {display: none;}',
1328		'.ts_comment_no_headline .ts_show_if_headline {display: none;}',
1329
1330	/*	'.ts_have_sponsored_content .ts_hide_if_sponsored_content {display: none;}',
1331		'.ts_no_sponsored_content .ts_show_if_sponsored_content {display: none;}',*/
1332
1333
1334		'.ts_aurss_no_features .ts_show_if_aurss_features {display: none;}',
1335		'.ts_aurss_have_features .ts_hide_if_aurss_features {display: none;}',
1336        '.ts_aur_features_no_summary .ts_show_if_aurss_features_summary {display: none;}',
1337		'.ts_aurss_no_recommend .ts_show_if_aurss_recommend {display: none;}',
1338		'.ts_aurss_have_recommend .ts_hide_if_aurss_recommend {display: none;}',
1339		'.ts_partly_loaded .ts_show_if_fully_loaded {display: none;}',
1340		'.ts_fully_loaded .ts_show_if_partly_loaded {display: none;}',
1341		'.testseek_main .pros_con_long .ts_more {display: none;}',
1342		'.testseek_main .pros_con_short .ts_less {display: none;}',
1343		'.testseek_main .awards_long .ts_more {display: none;}',
1344		'.testseek_main .awards_short .ts_less {display: none;}',
1345		'.testseek_main .ts_video_longlist .ts_more {display: none;}',
1346		'.testseek_main .ts_video_shortlist .ts_less {display: none;}',
1347
1348        '.ts_stars_tmpl_no_aureviews .ts_hide_stars_if_no_aurss {display: none;}',
1349
1350		'.ts_popup .ts_hide_if_popup {display: none;}',
1351		'.testseek_main .ts_show_if_popup {display: none;}',
1352		'.ts_popup.testseek_main .ts_show_if_popup, .ts_popup .testseek_main .ts_show_if_popup {display: block;}',
1353
1354		'.testseek_main .ts_video_type_hide, .testseek_main .ts_video_language_hide, .testseek_main .ts_video_quality_hide {display: none;}',
1355		'.ts_stars_template .ts_stars {font-size: 24px; position: absolute; display: block; top: 0px; }',
1356		'.ts_stars_template .ts_stars_rating > SPAN > I {font-size: 20px; letter-spacing: -3px; color: #ECC508;}',
1357		'.ts_ereviews_have_score .ts_stars.ts_hide_if_escore {display: none;}',
1358		'.ts_ereviews_no_score .ts_stars.ts_show_if_escore {display: none;}',
1359		'.ts_star1, .ts_star2, .ts_star3, .ts_star4, .ts_star5, .ts_star_half {display: none;}',
1360		'.score_10 .ts_star_half, .score_30 .ts_star_half, .score_50 .ts_star_half, .score_70 .ts_star_half, .score_90 .ts_star_half {display: inline;}',
1361		'.score_20 .ts_star1, .score_30 .ts_star1, .score_40 .ts_star1, .score_50 .ts_star1, .score_60 .ts_star1, .score_70 .ts_star1, .score_80 .ts_star1, .score_90 .ts_star1, .score_100 .ts_star1 {display: inline;}',
1362		'.score_40 .ts_star2, .score_50 .ts_star2, .score_60 .ts_star2, .score_70 .ts_star2, .score_80 .ts_star2, .score_90 .ts_star2, .score_100 .ts_star2 {display: inline;}',
1363		'.score_60 .ts_star3, .score_70 .ts_star3, .score_80 .ts_star3, .score_90 .ts_star3, .score_100 .ts_star3 {display: inline;}',
1364		'.score_80 .ts_star4, .score_90 .ts_star4, .score_100 .ts_star4 {display: inline;}',
1365		'.score_100 .ts_star5 {display: inline;}',
1366		'.score_10 .ts_star_e1, .score_20 .ts_star_e1, .score_30 .ts_star_e1, .score_40 .ts_star_e1, .score_50 .ts_star_e1, .score_60 .ts_star_e1, .score_70 .ts_star_e1, .score_80 .ts_star_e1, .score_90 .ts_star_e1, .score_100 .ts_star_e1 {display: none;}',
1367		'.score_30 .ts_star_e2, .score_40 .ts_star_e2, .score_50 .ts_star_e2, .score_60 .ts_star_e2, .score_70 .ts_star_e2, .score_80 .ts_star_e2, .score_90 .ts_star_e2, .score_100 .ts_star_e2 {display: none;}',
1368		'.score_50 .ts_star_e3, .score_60 .ts_star_e3, .score_70 .ts_star_e3, .score_80 .ts_star_e3, .score_90 .ts_star_e3, .score_100 .ts_star_e3 {display: none;}',
1369		'.score_70 .ts_star_e4, .score_80 .ts_star_e4, .score_90 .ts_star_e4, .score_100 .ts_star_e4 {display: none;}',
1370		'.score_90 .ts_star_e5, .score_100 .ts_star_e5 {display: none;}',
1371
1372		//v5.4.0 new AUR stars rating system xD
1373		'.ts_aur_review_stars_rating i, .ts_aur_review_stars_rating i:hover ~ i {',
1374		'  font-size: 18px;',
1375		'  color: #fc0;',
1376		'  text-shadow: none;',
1377		'  transition: color 200ms,',
1378		'              text-shadow 200ms;',
1379		'  transition-delay: 0;',
1380		'}',
1381		'',
1382		'.ts_aur_review_stars_rating u, .ts_aur_review_stars_rating u:hover ~ u {',
1383		'  font-size: 18px;',
1384		'  cursor: default;',
1385		'  font-style: normal;',
1386		'  text-decoration-line: none;',
1387		'  color: gray;',
1388		'  text-shadow: none;',
1389		'  transition: color 200ms,',
1390		'              text-shadow 200ms;',
1391		'  transition-delay: 0;',
1392		'}',
1393		'',
1394		'.ts_aur_review_stars_rating i {',
1395		'  cursor: default;',
1396		'  font-style: normal;',
1397		'}',
1398
1399		'.testseek_main',
1400		'{',
1401		'	box-sizing: border-box;',
1402		'	padding: 0;',
1403		'	margin: 0;',
1404		'	font-family: "Arial","Helvetica","sans-serif";',
1405		'	color: #6a6a6a;',
1406		'}',
1407		'',
1408		'.testseek_main *',
1409		'{',
1410		'	margin: 0;',
1411		'	padding: 0;',
1412		'	vertical-align: top;',
1413		'	transition-delay: 0s;',
1414		'	transition-duration: 1s;',
1415		'	transition-property: all;',
1416		'	transition-timing-function: ease;',
1417		'}',
1418		'',
1419		'.testseek_main DIV',
1420		'{',
1421		'	display: block;',
1422		'	float: left;',
1423		'	width: auto;',
1424		'	border: none;',
1425		'	line-height: 19px;',
1426		'	box-sizing: border-box;',
1427		'}',
1428		'.testseek_main P',
1429		'{',
1430		'	line-height: 19px;',
1431		'}',
1432		'',
1433		'.testseek_main IFRAME.ts_iframe, .testseek_main DIV.ts_iframe',
1434		'{',
1435		'	width: 100%;',
1436		'	float: left;',
1437		'	border: none;',
1438		'}',
1439		'',
1440		'.ts_inside_iframe',
1441		'{',
1442		'	overflow: hidden;',
1443		'}',
1444		'',
1445		'.testseek_main DIV.l, .testseek_main IFRAME.ts_iframe.l',
1446		'{',
1447		'	clear: both;',
1448		'	width: 100%;',
1449		'	margin-top: 10px;',
1450		'}',
1451		'',
1452		'.testseek_main DIV.l.r, .testseek_main IFRAME.ts_iframe.l.r',
1453		'{',
1454		'	border-top: 1px solid rgb(221, 221, 221);',
1455		'	padding-top: 25px;',
1456		'}',
1457		'.testseek_main DIV.l > DIV.l:first-child',
1458		'{',
1459		'	margin-top: 0;',
1460		'}',
1461		'',
1462		'.testseek_main SPAN.s',
1463		'{',
1464		'	color: orange;',
1465		'	text-shadow: black 1px 1px 1px;',
1466		'	margin-top: -8px;',
1467		'}',
1468		'',
1469		'.testseek_main SPAN.thumb',
1470		'{',
1471		'	font-weight: bold;',
1472		'	font-size: x-large;',
1473		'}',
1474		'',
1475		'.testseek_main .ts_er_top_header',
1476		'{',
1477		'	line-height: 28px;',
1478		'	font-size: 28px;',
1479		'	margin-bottom: 20px;',
1480		'}',
1481		'.ts_popup .ts_er_top_header',
1482		'{',
1483		'	margin-right: 50px;',
1484		'}',
1485		'',
1486		'.testseek_main .ts_aur_top_header',
1487		'{',
1488		'	font-size: 28px;',
1489		'	margin-bottom: 20px;',
1490		'	line-height: 28px;',
1491		'}',
1492		'.testseek_main .videos_top_header',
1493		'{',
1494		'	font-size: 28px;',
1495		'	margin-bottom: 20px;',
1496		'}',
1497		'',
1498		'.testseek_main .aur_rate_header',
1499		'{',
1500		'	margin-bottom: 10px;',
1501		'}',
1502		'',
1503		'.testseek_main .er_dist_header',
1504		'{',
1505		'	margin-bottom: 10px;',
1506		'}',
1507		'',
1508		'.testseek_main .aur_dist_header',
1509		'{',
1510		'	margin-bottom: 10px;',
1511		'}',
1512		'',
1513		'.testseek_main .aur_feat_header',
1514		'{',
1515		'	margin: 20px 0px 10px 0px',
1516		'}',
1517		'',
1518		'.testseek_main .er_proscons_header',
1519		'{',
1520		'	margin-bottom: 0px;',
1521		'}',
1522		'',
1523		'.testseek_main .aur_proscons_header',
1524		'{',
1525		'	margin: 20px 0px 10px 0px',
1526		'}',
1527		'',
1528		'.testseek_main .er_list_header',
1529		'{',
1530		'	margin-bottom: 10px;',
1531		'}',
1532		'',
1533		'.testseek_main .er_awards_header',
1534		'{',
1535		'	margin-bottom: 10px;',
1536		'}',
1537		'',
1538		'.testseek_main .ts_edist TR, .testseek_main .ts_edist TR *, .testseek_main .ts_adist TR, .testseek_main .ts_adist TR *',
1539		'{',
1540		'	height: 20px;',
1541		'	border: none;',
1542		'	padding: 0px;',
1543		'	margin: 0px;',
1544		'}',
1545		'',
1546		'.testseek_main .ts_edist TH, .testseek_main .ts_adist TH',
1547		'{',
1548		'	text-align: left;',
1549		'	font-weight: normal;',
1550		'}',
1551		'',
1552		'.testseek_main .ts_edist SPAN, .testseek_main .ts_adist SPAN',
1553		'{',
1554		'	display: inline-block;',
1555		'}',
1556		'',
1557		'.testseek_main .ts_bar_bg',
1558		'{',
1559		'	background: #e5e5e5;',
1560		'	text-align: left;',
1561		'	overflow: hidden;',
1562		'	height: 20px;',
1563		'	width: 90%;',
1564		'}',
1565		'',
1566		'.testseek_main .ts_bar_bg SPAN',
1567		'{',
1568		'	height: 18px;',
1569		'	width: 100%;',
1570		'	box-shadow: gray 1px 1px 1px;',
1571		'}',
1572		'',
1573		'.testseek_main .pros_icon, .testseek_main .cons_icon, .testseek_main .bottomline_icon, .testseek_main .headline_icon',
1574		'{',
1575		'	float: left;',
1576		'	border-right: solid #e5e5e5 1px;',
1577		'	border-bottom: solid #e5e5e5 1px;',
1578		'	color: white;',
1579		'	background: gray;',
1580		'	font-size: 18px;',
1581		'	vertical-align: middle;',
1582		'	text-align: center;',
1583		'	width: 21px;',
1584		'	height: 21px;',
1585		'	line-height: 1.2em;',
1586		'	font-weight: bold;',
1587		'	margin-right: 10px;',
1588		'	margin-top: 2px;',
1589		'}',
1590		'',
1591		'.testseek_main .bottomline_icon',
1592		'{',
1593		'	font-size: 18px;',
1594		'}',
1595		'.testseek_main .pros_con_short LI',
1596		'{',
1597		'	display: inline-block;',
1598		'	float: left;',
1599		'	line-height: 19px;',
1600		'	font-size: 15px;',
1601		'}',
1602		'',
1603		'.testseek_main .pros_con_short LI:after',
1604		'{',
1605		'	content: ", ";',
1606		'	margin-right: 2px;',
1607		'}',
1608		'.testseek_main .pros_con_short LI:last-child:after',
1609		'{',
1610		'	content: "";',
1611		'	margin-right: 0px;',
1612		'}',
1613		'.testseek_main .pros_con_long .pros_icon, .testseek_main .pros_con_long .cons_icon',
1614		'{',
1615		'	display: none;',
1616		'}',
1617		'',
1618		'.testseek_main .more_link',
1619		'{',
1620		'	display: inline-block;',
1621		'	float: right;',
1622		'	margin-top: 10px;',
1623		'}',
1624		'',
1625		'.testseek_main .more_link A',
1626		'{',
1627		'	color: gray;',
1628		'}',
1629		'',
1630		'.testseek_main .awards_short .awards',
1631		'{',
1632		'	overflow: hidden;',
1633		'	padding-right: 1px;',
1634		'	height: 123px;',
1635		'}',
1636		'.testseek_main .awards DIV',
1637		'{',
1638		'	float: left;',
1639		'	height: 120px;',
1640		'	width: 120px;',
1641		'	line-height: 120px;',
1642		'	margin-right: 5px;',
1643		'	margin-bottom: 5px;',
1644		'	align-items: center;',
1645		'	justify-content: center;',
1646		'}',
1647		'.testseek_main .ts_award_loop IMG[alt*="cnet.co.uk award"], IMG[alt*="cnet.com award"], IMG[alt*="cnet.com.au award"], IMG[alt*="cnetfrance.fr award"], IMG[alt*="pcmag-mideast.com award"], IMG[alt*="pcmag.com award"], IMG[alt*="pcmagazine.ru award"] { display: none; }',
1648		'.testseek_main .ts_e_review IMG[alt*="cnet.co.uk award"], IMG[alt*="cnet.com award"], IMG[alt*="cnet.com.au award"], IMG[alt*="cnetfrance.fr award"], IMG[alt*="pcmag-mideast.com award"], IMG[alt*="pcmag.com award"], IMG[alt*="pcmagazine.ru award"] { display: none; }',
1649		'.testseek_main .awards IMG',
1650		'{',
1651		'	max-height: 120px;',
1652		'	max-width: 120px;',
1653		'	vertical-align: middle;',
1654		'	margin-right: 15px;',
1655		'}',
1656		'',
1657		'.testseek_main IMG.ts_award',
1658		'{',
1659		'	max-height: 120px;',
1660		'	max-width:  120px;',
1661		'	margin: 0px 0px 0px 10px;',
1662		'}',
1663		'',
1664		'.testseek_main .flag',
1665		'{',
1666		'	width: 20px;',
1667		'	height: 13px;',
1668        '   background: url("' + flagsFanta + '");',
1669		'	background-repeat: no-repeat;',
1670		'	vertical-align: middle;',
1671		'	display: inline-block;',
1672		'}',
1673		'',
1674		'.testseek_main .er_publisher_flag',
1675		'{',
1676		'	vertical-align: middle;',
1677		'	margin-right: -20px;',
1678		'	margin-left: 5px;',
1679		'}',
1680		'',
1681		'.testseek_main .ext_link_ts',
1682		'{',
1683		'	vertical-align: middle;',
1684		'	color: #337ab7;',
1685		'	text-decoration: none;',
1686		'}',
1687		'.testseek_main A.ext_link_ts:hover',
1688		'{',
1689		'	color: #23527c;',
1690		'}',
1691		'',
1692		'.testseek_main .er_publisher_logo',
1693		'{',
1694		'	margin-top: 5px;',
1695		'}',
1696		'',
1697		'.testseek_main .er_load_more',
1698		'{',
1699		'	font-size: 28px;',
1700		'	margin-bottom: 20px;',
1701		'}',
1702		'',
1703		'.testseek_main .aur_load_more',
1704		'{',
1705		'	font-size: 22px;',
1706		'	margin-bottom: 20px;',
1707		'}',
1708		'',
1709		'.testseek_main .ts_frate LI',
1710		'{',
1711		'	display: inline-block;',
1712		'	float: left;',
1713		'	margin-right: 10px;',
1714		'}',
1715		'.testseek_main .ts_frate LI SPAN',
1716		'{',
1717		'	width: 140px;',
1718		'}',
1719		'',
1720		'',
1721		'.testseek_main .aurss_flag',
1722		'{',
1723		'	vertical-align: middle;',
1724		'}',
1725		'',
1726		'',
1727		'.testseek_main .aur_sumlist_rate_header',
1728		'{',
1729		'	margin-bottom: 10px;',
1730		'}',
1731		'',
1732		'.testseek_main .aur_sumlist_dist_header',
1733		'{',
1734		'	margin-bottom: 10px;',
1735		'}',
1736		'',
1737		'.testseek_main .aur_sumlist_proscons_header',
1738		'{',
1739		'	margin: 20px 0px 10px 0px',
1740		'}',
1741		'',
1742		'.testseek_main .aur_sumlist_rec_pie',
1743		'{',
1744		'	margin: 15px 30px 0px 0px;',
1745		'}',
1746		'',
1747		'.testseek_main .aur_sumlist_rec_pie_explain',
1748		'{',
1749		'	margin: 23px 0px 13px 0px;',
1750		'}',
1751		'',
1752		'.testseek_main .video_voting',
1753		'{',
1754		'	margin: 15px 0px 0px 0px;',
1755		'}',
1756		'',
1757		'.testseek_main .video_filters',
1758		'{',
1759		'	margin: 15px 0px 0px 0px;',
1760		'	border: 0px;',
1761		'}',
1762		'',
1763		'.testseek_main .ts_video_loop',
1764		'{',
1765		'	margin: 15px 0px 0px 0px;',
1766		'}',
1767		'',
1768		'.testseek_main .ts_video_preivew',
1769		'{',
1770		'	max-width: 100%;',
1771		'}',
1772		'',
1773		'.testseek_main .ts_vid_image',
1774		'{',
1775		'	position: relative;',
1776		'	width: 200px;',
1777		'	height: 150px;',
1778		'	margin: 0px 15px 15px 0px;',
1779
1780		'}',
1781		'',
1782		'.testseek_main .ts_vid_image > *',
1783		'{',
1784		'	position: absolute; top: 0px; left: 0px;',
1785		'}',
1786		'',
1787		'.testseek_main .ts_vid_image > P',
1788		'{',
1789		'	text-align: center;',
1790		'	vertical-align: middle;',
1791		'	width: 200px;',
1792		'	height: 150px;',
1793		'	line-height: 150px;',
1794		'	font-size: 22px;',
1795		'	font-weight: 500',
1796		'	text-shadow: 0px 0px 2px black;',
1797		'	color: white;',
1798		'}',
1799		'',
1800		'.testseek_main .ts_vid_tags > SPAN',
1801		'{',
1802		'	display: block;',
1803		'	margin-top: 4px;',
1804		'	padding: 0px 4px 0px 4px;',
1805		'}',
1806		'',
1807		'.testseek_main .ts_vid_tags .ts_type_tag',
1808		'{',
1809		'	background-color: #6b6b6b;',
1810		'	color: white;',
1811		'}',
1812		'',
1813		'.testseek_main .ts_vid_tags .ts_lang_tag',
1814		'{',
1815		'	background-color: #df4fd7;',
1816		'	color: white;',
1817		'}',
1818		'',
1819		'.testseek_main .ts_vid_tags .ts_video_quality',
1820		'{',
1821		'	background-color: #6e53ed;',
1822		'	color: white;',
1823		'}',
1824		'.testseek_main .ts_video_quality_ .ts_video_quality {display: none;}',
1825		'',
1826		'.testseek_main .ts_video_shortlist .ts_video_loop',
1827		'{',
1828		'	overflow: hidden;',
1829		'	max-height: 150px;',
1830		'}',
1831		'.testseek_main .ts_video_longlist .ts_video_loop',
1832		'{',
1833		'	max-height: none;',
1834		'}',
1835		'.testseek_main .ts_video_shortlist.ts_video_2r .ts_video_loop { max-height: 315px;}',
1836		'.testseek_main .ts_video_shortlist.ts_video_3r .ts_video_loop { max-height: 480px;}',
1837		'.testseek_main .ts_video_shortlist.ts_video_5r .ts_video_loop { max-height: 810px;}',
1838		'',
1839		'.testseek_main .ts_no_score .ts_beside_score',
1840		'{',
1841		'	width: 100%;',
1842		'}',
1843		'.testseek_main .ts_have_score .ts_beside_score',
1844		'{',
1845		'	width: calc(100% - 115px);',
1846		'}',
1847		'.testseek_main .l .ts_er_comments',
1848		'{',
1849		'	margin-left: 10px;',
1850		'}',
1851		'',
1852		'#ts_popup',
1853		'{',
1854		'	position: absolute;',
1855		'	top: 100px;',
1856		'	left: 0px;',
1857		'	right: 0px;',
1858		'	bottom: 0px;',
1859		'	min-height: 100%;',
1860		'	width: 100%;',
1861		'	z-index: 11147;',
1862		'}',
1863		'',
1864		'#ts_popup > #ts_popup_child',
1865		'{',
1866		'	position: relative;',
1867		'	width: calc(100%-20px);',
1868		'	max-width: 1000px;',
1869		'	background: white;',
1870		'	border: solid #66C 2px;',
1871		'	border-radius: 10px;',
1872		'	padding: 35px;',
1873		'	margin-top: 10px;',
1874		'	margin-left: auto;',
1875		'	margin-right: auto;',
1876		'	margin-bottom: 20px;',
1877		'   overflow-y: auto;', //fixes popover with full AUR content xD
1878		'}',
1879		'',
1880		'#ts_popup > #ts_popup_bg',
1881		'{',
1882		'	position: fixed;',
1883		'	top: 0px;',
1884		'	left: 0px;',
1885		'	right: 0px;',
1886		'	bottom: 0px;',
1887		'	background: rgba(0, 0, 0, 0.5);',
1888		'}',
1889		'',
1890		'#ts_popup .ts_close_popup',
1891		'{',
1892		'	position: relative;',
1893		'	top: 15px;',
1894		'	width: 30px;',
1895		'	float: right;',
1896		'   border: solid #e5e5e5 2px;',
1897		'	border-radius: 5px;',
1898		'	text-align: center;',
1899		'	background: #5074fb;',
1900		'	color: white;',
1901		'}',
1902		'',
1903		'#ts_popup .ts_close_popup:hoover',
1904		'{',
1905		'	background: #969696;',
1906		'}',
1907		'',
1908		'.ts_poweredby_img',
1909		'{',
1910		'	border: solid 1px;',
1911		'	border-color: #ccc gray gray #ccc;',
1912		'	border-radius: 5px;',
1913		'	margin-top: 20px;',
1914		'	margin-bottom: 10px;',
1915		'	width: 120px;',
1916		'	height: auto;',
1917		'	display: none;',
1918		'}',
1919		'',
1920		'.ts_ereviews_have .ts_poweredby_img, .ts_videos_have .ts_poweredby_img, .ts_aureviews_have .ts_poweredby_img',
1921		'{',
1922		'	display: inline;',
1923		'}',
1924		'',
1925		'.testseek_main *[onclick] {cursor: pointer;}',
1926		'',
1927
1928		/*
1929		 * Design 2 special
1930		 */
1931
1932		// tabs
1933		'.testseek_tabs {width: 100%; border-bottom: solid #6a6a6a 2px; height: 24px; margin-bottom: 24px;}',
1934		'UL.testseek_tabs {font-size: 0px;}',
1935		'.testseek_tabs LI {display: inline-block; border-bottom: solid white 2px; height: 24px; padding-right: 10px; font-size: 0px;}',
1936		'.testseek_tabs LI > SPAN {display: inline-block; border-bottom: solid #6a6a6a 2px; height: 24px; font-size: 15px;}',
1937		'.testseek_tabs LI:hover > SPAN {color: #6767d1; border-color: #6767d1;}',
1938		'.testseek_tabs LI.selected  > SPAN, .testseek_tabs LI.selected:hover > SPAN {color: #000099; border-color: #000099;}',
1939		'.testseek_main .testseek_tabs * {transition-duration: 0.3s;}',
1940
1941		// bars
1942		'.testseek_main .ts_bar_bg SPAN.bar_fg { background: #6767D1; }',
1943		'.testseek_main SPAN.ts_bar_bg { height: 8px; margin-top: 6px;}',
1944
1945		// Pros & Cons
1946		'.testseek_main .pros_con > DIV {width: 50%; float: left; clear: none;}',
1947		'.testseek_main .pros_con_short UL',
1948		'{',
1949		'	overflow: hidden;',
1950		'	height: 2.4em;',
1951		'	margin-bottom: 2px;',
1952		'}',
1953		'.testseek_main .pros_con UL',
1954		'{',
1955		'	padding-left: 30px;',
1956		'}',
1957
1958		// Awards
1959		'.testseek_main .awards DIV',
1960		'{',
1961		'	border: solid gray 1px;',
1962		'	margin-right: -1px;',
1963		'	padding: 10px 10px;',
1964		'	overflow: hidden;',
1965		'	width: 142px;',
1966		'	height:142px;',
1967		'	text-align: center;',
1968		'	margin-bottom: -1px;',
1969		'}',
1970		'.testseek_main .awards DIV > IMG {margin: 0px;}',
1971		'.testseek_main .awards_short .awards',
1972		'{',
1973		'	overflow: hidden;',
1974		'	height: 142px;',
1975		'}',
1976
1977		'.testseek_main .ts_edist TABLE',
1978		'{',
1979		'	table-layout: fixed;',
1980		'	width: 260px;',
1981		'	border-spacing: 0;',
1982		'}',
1983		'.testseek_main .ts_edist TABLE .ts_edist_col_stars {width: 100px;}',
1984		'.testseek_main .ts_edist TABLE .ts_edist_col_text {width: 50px;}',
1985		'.testseek_main .ts_adist TABLE',
1986		'{',
1987		'	table-layout: fixed;',
1988		'	width: 260px;',
1989		'	margin-right: 10px;',
1990		'	border-spacing: 0;',
1991		'}',
1992		'.testseek_main .ts_adist TABLE .ts_adist_col_stars {width: 100px;}',
1993		'.testseek_main .ts_adist TABLE .ts_adist_col_text {width: 50px;}',
1994
1995		'.testseek_main .ext_link_aur_box { margin-top: 6px; font-weight: bold; font-size: 18px;}',
1996
1997		'.testseek_main .ts_aurss_feature_loop LI {min-width: 180px;}',
1998		'.testseek_main .ts_aur_summary_feature_loop LI {min-width: 180px;
1998  border-right: solid #CCC 1px;}',
1999
2000        //AURSS product links modal pop-over styles v5.2
2001        '.testseek_main .ts_aurss_product_urls_modal {opacity: 0; position: absolute; z-index: -1; right: 0px; top: 500px; max-width: 300px; min-width: 250px; font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;    font-size: 14px; font-style: normal;    font-weight: 400;    line-height: 1.42857143;    text-align: left;    text-align: start;    text-decoration: none;    text-shadow: none;    text-transform: none;    letter-spacing: normal;    word-break: normal;    word-spacing: normal;    word-wrap: normal;    white-space: normal;    background-color: #fff;    border: 1px solid #ccc;  border-radius: 6px;    -webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2);    box-shadow: 0 5px 10px rgba(0,0,0,.2);    line-break: auto;}',
2002        '.testseek_main .ts_aurss_product_urls_modal_content UL {list-style-type: none;}',
2003        '.testseek_main .ts_aurss_product_urls_modal_hide {display: none;}',
2004        '.testseek_main .ts_aurss_product_urls_modal_content {padding: 15px;    max-height: 300px;  overflow: auto;}',
2005        '.testseek_main .ts_aurss_product_urls_modal_content > .ts_wtb_arrow {top: 15%;    left: -11px;    margin-top: -11px;    border-right-color: rgba(0,0,0,.25)!important;    border-left-width: 0!important;    border-width: 11px;}',
2006        '.testseek_main .ts_aurss_product_urls_modal_content > .ts_wtb_arrow, .ts_aurss_product_urls_modal_content > .ts_wtb_arrow:after {position: absolute;    display: block;    width: 0;    height: 0;    border-color: transparent;    border-style: solid;}',
2007        '.testseek_main .ts_aurss_product_urls_modal_content > .ts_wtb_arrow:after {content: "";    border-left-width: 0;    border-width: 10px;    bottom: -10px;    border-right-color: #fff;    border-left-width: 0;    left:1px;}',
2008
2009        '.testseek_main .ts_aurss_product_urls_modal_content > .ts_wtb_close {position: absolute;top: 5px;right: 15px;transition: all 200ms;font-size: 30px;font-weight: bold;text-decoration: none;color: #333;}',
2010        '.testseek_main .ts_aurss_product_urls_modal_content > .ts_wtb_close:hover {color: #06D85F;}',
2011
2012        //Absolutely required for AURSS product modals to work! //test box model below with: background-color: #ffcc33;
2013        '.testseek_main .ts_aurss {position: relative;}',
2014
2015		//v5.2
2016        '.ts_aurss_product_url_inactive .ts_hide_if_aurss_product_url_inactive {display: none;}',
2017        '.ts_stars_tmpl_hide .ts_hide_stars_if_no_aer_no_aur {display: none;}',
2018        '.ts_aur_tab_tmpl2_hide .hide_aur_tab_if_condition {display: none;}',
2019		'.ts_live_api_box_hide .ts_hide_entire_section_if_conditions_are_met {display: none;}',
2020		//v5.3.4 AER inactive links
2021		'.ts_aer_product_url_inactive .ts_hide_if_aer_product_url_inactive {display: none;}',
2022
2023		//v5.4.0 SC full AUR content
2024		//'.ts_no_sc_service .hide_if_no_sc_full_aurZZ {display: none;}',
2025		//TODO FIXME
2026		'.ts_show_if_sc_full_aur {display: block;}',
2027		'.ts_hide_if_sc_full_aur {display: none;}',
2028
2029		//'.hide_if_no_sc_full_aur {display: none;}',
2030
2031        // Font-sizes (incl icon sizes)
2032		'.testseek_main {font-size: 15px; line-height: 1.2em;}',
2033		'.testseek_main .ts_stars_rating, .testseek_main .ts_stars_rating > I, .testseek_main .ts_stars_rating > SPAN, .testseek_main .ts_stars_rating > SPAN > I {color: #ECC508; font-size: 15px;}',
2034
2035		'.testseek_main .ts_rate .ts_stars_rating > SPAN, .testseek_main .ts_rate .ts_stars_rating > SPAN > I,',
2036		'.testseek_main .ts_rate.ts_stars_rating > SPAN, .testseek_main .ts_rate.ts_stars_rating > SPAN > I',
2037		'{color: #ECC508; font-size: 30px;}',
2038		'.testseek_main .ts_e_review .ts_stars_rating {margin-top: 2px;}',
2039		'.testseek_main .thumb, .testseek_main .thumb > I {font-size: 18px;}',
2040		'.testseek_main .ts_e_review, .testseek_main .ts_e_review P, .testseek_main  .ts_summary P {font-size: 14px;}',
2041
2042		'.testseek_main .ts_rate',
2043		'{',
2044		'	width: 180px;',
2045		'	min-width: 170px;',
2046		'	text-align: center;',
2047		'}',
2048		'.testseek_main .ts_erate, .testseek_main .ts_arate {padding-top: 22px;}',
2049		'.testseek_main .ts_rate .starts {height: 32px}',
2050		'.testseek_main .ts_rate .ts_rate_text {margin-left: 5px;}',
2051		'.testseek_main .ts_rate_dist {display: flex;}',
2052		'.testseek_main .ts_edist { flex-grow: 1; font-size: 10px;}',
2053
2054		'.testseek_main .pros_con h3 { margin-bottom: 5px; }',
2055		'.testseek_main .aurss_flag { margin-top: -2px; }',
2056		'.testseek_main .aurss_logo { margin: 0px 10px 0px 0px; }',
2057		'.testseek_main .ts_aurss .ts_rate { margin-right: 10px; }',
2058		'.testseek_main .ts_frate H3, .testseek_main .ts_adist, .testseek_main .ts_frate {margin-bottom: 10px;}',
2059
2060		// dynamic by device size
2061		'@media all and (max-width: 500px)',
2062		'{',
2063		'	.testseek_main .ts_200n',
2064		'	{',
2065		'		width: calc(100% - 180px);',
2066		'	}',
2067		'',
2068		'	.testseek_main .ts_rate_dist',
2069		'	{',
2070		'		display: block;',
2071		'	}',
2072        '.testseek_main .ts_aurss_product_urls_popup { width: 70%; }',
2073		'	.testseek_main .ts_200n,',
2074		'	.testseek_main .pros_con > DIV,',
2075		'	.testseek_main .ts_have_score .ts_beside_score',
2076		'	{',
2077		'		float: none;',
2078		'		clear: both;',
2079		'		width: 100%;',
2080		'	}',
2081		'',
2082		'	.ts_main_template .ts_rate,',
2083		'	.ts_main_template .ts_award',
2084		'	{',
2085		'		float: none;',
2086		'		width: 100%;',
2087		'		margin: auto;',
2088		'		text-align: center;',
2089		'	}',
2090		'',
2091		'	#ts_popup',
2092		'	{',
2093		'		top: 50px;',
2094		'		left: 0px;',
2095		'		right: 0px;',
2096		'		width: 100%;',
2097		'		border: none;',
2098		'	}',
2099		'}',
2100	];
2101
2102	var ts_css = document.getElementById('ts_css');
2103	if(ts_css)
2104	{
2105		ts_css.textContent = css.join("\n");
2106	}
2107	else
2108	{
2109		ts_css = document.createElement('style');
2110		ts_css.id = 'ts_css';
2111		ts_css.type = 'text/css';
2112		ts_css.textContent = css.join("\n");
2113		document.head.appendChild(ts_css);
2114	}
2115}
2116/* End of init_css.js */
2117
2118/* Start of init_font.js */
2119window.testseek.init_font = function() {
2120	var font_element;
2121	font_element = document.getElementById('testseek_font');
2122	if(font_element)
2123	{
2124		font_element.remove();
2125	}
2126
2127	if(!window.testseek.icon_library_url)
2128	{
2129		return true;
2130	}
2131
2132	font_element = document.createElement('link');
2133	font_element.id = 'testseek_font';
2134	font_element.type = 'text/css';
2135	font_element.rel = 'stylesheet';
2136	font_element.href = window.testseek.icon_library_url;
2137
2138	var s = document.getElementsByTagName('script')[0];
2139	s.parentNode.insertBefore(font_element, s);
2140}
2141/* End of init_font.js */
2142
2143/* Start of inline_iframe_init.js */
2144/**
2145 * Load content into src-less iframes
2146 *
2147 * @depends window.testseek.iframe_naming_count
2148 **/
2149
2150window.testseek.inline_iframe_init = function() {
2151	// Make sure we have a iframe name counter
2152	if(!window.testseek.iframe_naming_count)
2153	{
2154		window.testseek.iframe_naming_count = 0;
2155	}
2156
2157	// Fetch a list of all iframes on the page
2158	var iframes = document.getElementsByTagName('iframe');
2159	var iframe_count = iframes.length;
2160
2161	// loop all iframes on the page
2162	for(var f_nr = 0; f_nr < iframe_count; f_nr++)
2163	{
2164		var iframe = iframes[f_nr];
2165
2166		// boolean flag for remember if we handled/done somthing with the current iframe
2167		var updated = false;
2168
2169		// if not already loaded
2170		if(!iframe.ts_html)
2171		{
2172			// and it has a inline content
2173			if(iframe.innerHTML.length)
2174			{
2175				// Store inline content for later use
2176				iframe.ts_html = iframe.innerHTML;
2177				iframe.ts_init_classes = iframe.className;
2178			}
2179			else
2180			{
2181				// skip if no inline content
2182				continue;
2183			}
2184		}
2185
2186		// is this iframe marked as ts_inline_html
2187		if(iframe.classList.contains('ts_inline_html'))
2188		{
2189			// copy the current content (innerHTML content, not contentDocument)
2190			var content = iframe.ts_html;
2191
2192			// skip if no content
2193			if(!content.length)
2194			{
2195				continue;
2196			}
2197
2198			// check if content don't have html = the html is encoded
2199			if(content.indexOf('<') < 0)
2200			{
2201				// create a textarea to use as decoder
2202				var decoder = document.createElement('textarea');
2203
2204				// set the encoded content as the decoders html-value
2205				decoder.innerHTML = content;
2206
2207				// check if the decoders content don't have html = the html was double encoded
2208				if(decoder.value.indexOf('<') < 0)
2209				{
2210					// set the decoded value as the html value of the decoder
2211					decoder.innerHTML = decoder.value;
2212				}
2213
2214				// replace the content with the decode value (or double decoded)
2215				content = decoder.value;
2216			}
2217
2218			// size of body dosn't work in all browser, so using first child, by wraping in in an extra div
2219			content = '<div class="' + iframe.className + '">' + content + '</div>';
2220
2221			// set the new content as the html inside the iframe, inside the body-tag (contentDocument, not just innerHTML)
2222			iframe.contentDocument.body.innerHTML = content;
2223
2224			// add the testseek_main class to the body element
2225			iframe.contentDocument.body.classList.add('testseek_main');
2226			iframe.contentDocument.body.classList.add('ts_inside_iframe');
2227
2228			// remove the todo-class, from the iframe, so we don't redo it
2229			iframe.classList.remove('ts_inline_html');
2230
2231			// remove the old content (innerHTML, not contentDocument)
2232			iframe.innerHTML = "";
2233
2234			// flag as updated
2235			updated = true;
2236		}
2237
2238		if(iframe.classList.contains('ts_inline_full_html'))
2239		{
2240			// copy the current content (innerHTML content, not contentDocument)
2241			var content = iframe.ts_html;
2242
2243			// skip if no content
2244			if(!content.length)
2245			{
2246				continue;
2247			}
2248
2249			// check if content don't have html = the html is encoded
2250			if(content.indexOf('<') < 0)
2251			{
2252				// create a textarea to use as decoder
2253				var decoder = document.createElement('textarea');
2254
2255				// set the encoded content as the decoders html-value
2256				decoder.innerHTML = content;
2257
2258				// check if the decoders content don't have html = the html was double encoded
2259				if(decoder.value.indexOf('<') < 0)
2260				{
2261					// set the decoded value as the html value of the decoder
2262					decoder.innerHTML = decoder.value;
2263				}
2264
2265				// replace the content with the decode value (or double decoded)
2266				content = decoder.value;
2267			}
2268
2269			// set the new content as the html inside the iframe, inside the html-tag (contentDocument, not just innerHTML)
2270			iframe.contentDocument.body.parentNode.innerHTML = content;
2271
2272			// remove the todo-class, from the iframe, so we don't redo it
2273			iframe.classList.remove('ts_inline_full_html');
2274
2275			// remove the old content (innerHTML, not contentDocument)
2276			iframe.innerHTML = "";
2277
2278			// flag as updated
2279			updated = true;
2280		}
2281
2282		// common part for updated iframes
2283		if(updated)
2284		{
2285			// add the ts_iframe class, to the iframe, so we can find it later
2286			iframe.classList.add('ts_iframe');
2287
2288			// We need an id, if we don't have one
2289			if(!iframe.id)
2290			{
2291				// name ifram using our name counter
2292				iframe.id = "ts_iframe_autoname_" + window.testseek.iframe_naming_count;
2293
2294				// increase counter, to avoid duplicate names
2295				window.testseek.iframe_naming_count++;
2296			}
2297
2298			// TODO keep one
2299			// store name inside iframe, so it kan use it when asking for a resize
2300			iframe.name = iframe.id;
2301			iframe.contentDocument.name = iframe.id;
2302			iframe.contentDocument.body.name = iframe.id;
2303			iframe.contentWindow.name = iframe.id;
2304
2305			// find the css element
2306			var ts_css = document.getElementById('ts_css');
2307
2308			// clone the css element
2309			var iframe_css = ts_css.cloneNode();
2310			iframe_css.innerHTML = ts_css.innerHTML;
2311
2312			// put cloned css inside iframe
2313			iframe.contentDocument.head.appendChild(iframe_css);
2314
2315			// Auto adjust size when iframe done loading
2316			iframe.onload = function(event) {
2317				if(event.target.contentDocument.body.firstChild)
2318				{
2319					event.target.height = (10 + event.target.contentDocument.body.firstChild.offsetHeight) + 'px';
2320				}
2321			};
2322
2323			// Auto adjust size now, as onload may not be triggered
2324			iframe.height = (10 + iframe.contentDocument.body.firstChild.offsetHeight) + 'px';
2325
2326			// share the testseek javascript object
2327			iframe.contentDocument.testseek = window.testseek;
2328		}
2329	}
2330}
2331/* End of inline_iframe_init.js */
2332
2333/* Start of listners.js */
2334window.testseek.add_listners = function()
2335{
2336	// run only once
2337	if(!window.testseek.liseners_added)
2338	{
2339		window.testseek.liseners_added = true;
2340
2341		if(window.addEventListener)
2342		{
2343			// window.addEventListener("message", window.testseek.handle_message, false);
2344			window.addEventListener("resize", window.testseek.resize_iframes, false);
2345			//window.addEventListener("resize", window.testseek.aurss_modal_urls_onresize, false);
2346			//window.addEventListener("click", window.testseek.aurss_modal_urls_onclick, false);
2347		}
2348		else
2349		{
2350			// window.attachEvent("onmessage", window.testseek.handle_message);
2351			window.attachEvent("onresize", window.testseek.resize_iframes);
2352			//window.attachEvent("onresize", window.testseek.aurss_modal_urls_onresize);
2353			//window.attachEvent("onclick", window.testseek.aurss_modal_urls_onclick);
2354		}
2355
2356		if(this.auto_resize_class)
2357		{
2358			var elements = document.getElementsByClassName(this.auto_resize_class);
2359			var element_count = elements.length;
2360			for(var element_nr = 0; element_nr < element_count; element_nr++)
2361			{
2362				if(window.addEventListener)
2363				{
2364					elements[element_nr].addEventListener("click", window.testseek.delayed_resize_iframes, false);
2365				}
2366				else
2367				{
2368					elements[element_nr].attachEvent("onclick", window.testseek.delayed_resize_iframes);
2369				}
2370			}
2371		}
2372	}
2373}
2374
2375window.testseek.remove_listners = function()
2376{
2377	if(window.addEventListener)
2378	{
2379		// window.removeEventListener("message", window.testseek.handle_message, false);
2380		window.removeEventListener("resize", window.testseek.resize_iframes, false);
2381		//window.removeEventListener("resize", window.testseek.aurss_modal_urls_onresize, false);
2382        //window.removeEventListener("click", window.testseek.aurss_modal_urls_onclick, false);
2383	}
2384	else
2385	{
2386		// window.detachEvent("onmessage", window.testseek.handle_message);
2387		window.detachEvent("onresize", window.testseek.resize_iframes);
2388		//window.detachEvent("onresize", window.testseek.aurss_modal_urls_onresize);
2389        //window.detachEvent("onclick", window.testseek.aurss_modal_urls_onclick);
2390	}
2391
2392	if(this.auto_resize_class)
2393	{
2394		var elements = document.getElementsByClassName(this.auto_resize_class);
2395		var element_count = elements.length;
2396		for(var element_nr = 0; element_nr < element_count; element_nr++)
2397		{
2398			if(window.addEventListener)
2399			{
2400				window.removeEventListener("click", window.testseek.delayed_resize_iframes, false);
2401			}
2402			else
2403			{
2404				window.detachEvent("onclick", window.testseek.delayed_resize_iframes);
2405			}
2406		}
2407	}
2408
2409	window.testseek.liseners_added = false;
2410}
2411/* End of listners.js */
2412
2413/* Start of load_element.js */
2414/**
2415 * Try to apply template to an element, or fetch missing information
2416 *
2417 * @param element HTMLElement object to apply template to
2418 * @param template_name String name of the template to use, should be found in testseek.template[template_name]
2419 * @param hold boolean Don't send ajax if missing, (collect more missing first, call load_held later)
2420 *
2421 * @depends parseQuery, render_element, pending, load_held, data(pids, mpns, icecats)
2422 **/
2423
2424window.testseek.load_element = function(element, template_name, hold)
2425{
2426	// temporarye variable to dump stuff, before deciding to use it or not
2427	var test = false;
2428
2429	// object that collect the serach-parameters
2430	var search = {};
2431
2432	// count of collected serach-parameters
2433	var parameter_count = 0;
2434
2435	// variable to store the testseek-product-id if avaible
2436	var ts_id = false;
2437
2438	// not found yet
2439	if(!ts_id)
2440	{
2441		// try to fetch the attribute data-ts-id: testseek-product-id
2442		test = element.getAttribute('data-ts-id');
2443		if(test)
2444		{
2445			// store as search parameter
2446			search.id = test;
2447
2448			// count as search-paramter
2449			parameter_count++;
2450
2451			// remember the id
2452			ts_id = test;
2453		}
2454	}
2455
2456	// not found yet
2457	if(!ts_id)
2458	{
2459		// try to fetch the attribute data-ts-pid: Partner product id
2460		test = element.getAttribute('data-ts-pid');
2461		if(test)
2462		{
2463			// store as search parameter
2464			search.pid = test;
2465
2466			// count as search-paramter
2467			parameter_count++;
2468
2469			// do we already know the testseek product id?
2470			if(window.testseek.pids[test])
2471			{
2472				// remember the id
2473				ts_id = window.testseek.pids[test];
2474			}
2475		}
2476	}
2477
2478	// not found yet
2479	if(!ts_id)
2480	{
2481		test = element.getAttribute('data-ts-mpn');
2482		if(test)
2483		{
2484			// store as search parameter
2485			search.mpn = test;
2486
2487			// count as search-paramter
2488			parameter_count++;
2489
2490			// do we already know the testseek product id?
2491			if(window.testseek.mpns[test])
2492			{
2493				// remember the id
2494				ts_id = window.testseek.mpns[test];
2495			}
2496		}
2497	}
2498
2499	// not found yet
2500	if(!ts_id)
2501	{
2502		test = element.getAttribute('data-ts-ean');
2503		if(test)
2504		{
2505			// store as search parameter
2506			search.ean = test;
2507
2508			// count as search-paramter
2509			parameter_count++;
2510
2511			// do we already know the testseek product id?
2512			if(window.testseek.mpns[test])
2513			{
2514				// remember the id
2515				ts_id = window.testseek.mpns[test];
2516			}
2517		}
2518	}
2519
2520	// not found yet
2521	if(!ts_id)
2522	{
2523		test = element.getAttribute('data-ts-icecat');
2524		if(test)
2525		{
2526			// store as search parameter
2527			search.icecat = test;
2528
2529			// count as search-paramter
2530			parameter_count++;
2531
2532			// do we already know the testseek product id?
2533			if(window.testseek.icecats[test])
2534			{
2535				// remember the id
2536				ts_id = window.testseek.icecats[test];
2537			}
2538		}
2539	}
2540
2541	// found something to use in search?
2542	if(parameter_count)
2543	{
2544		// Try to also metch manufacture
2545		test = element.getAttribute('data-ts-man');
2546		if(test)
2547		{
2548			// store as search parameter
2549			search.man = test;
2550
2551			// count as search-paramter
2552			parameter_count++;
2553		}
2554	}
2555	// no parameters found
2556	else
2557	{
2558		// check for parametsers in href, like our old apis, if none there either
2559		if(!element.search)
2560		{
2561			// exit negativly
2562			return false;
2563		}
2564
2565		// parse query part of href
2566		var query = window.testseek.parseQuery(element.search);
2567
2568		// query have ts_id, testseek product id?
2569		if(query.ts_id)
2570		{
2571			// store as search parameter
2572			search.id = query.ts_id;
2573
2574			// count as search-paramter
2575			parameter_count++;
2576
2577			// remember the id
2578			ts_id = query.ts_id;
2579		}
2580
2581		// query have pid, partner product id?
2582		if(query.ts_pid)
2583		{
2584			// store as search parameter
2585			search.pid = query.ts_pid;
2586
2587			// count as search-paramter
2588			parameter_count++;
2589
2590			if(window.testseek.pids[query.ts_pid])
2591			{
2592				ts_id = window.testseek.pids[query.ts_pid];
2593			}
2594		}
2595
2596		// query have mpn, manufacture part number?
2597		if(query.ts_mpn)
2598		{
2599			// store as search parameter
2600			search.mpn = query.ts_mpn;
2601
2602			// count as search-paramter
2603			parameter_count++;
2604
2605			if(window.testseek.mpns[query.ts_mpn])
2606			{
2607				ts_id = window.testseek.mpns[query.ts_mpn];
2608			}
2609		}
2610
2611		// query have ean, International(/European) Article Number?
2612		if(query.ts_ean)
2613		{
2614			// store as search parameter
2615			search.ean = query.ts_ean;
2616
2617			// count as search-paramter
2618			parameter_count++;
2619
2620			if(window.testseek.mpns[query.ts_ean])
2621			{
2622				ts_id = window.testseek.mpns[query.ts_ean];
2623			}
2624		}
2625
2626		// query have icecatid?
2627		if(query.ts_icecatid)
2628		{
2629			// store as search parameter
2630			search.icecat = query.ts_icecatid;
2631
2632			// count as search-paramter
2633			parameter_count++;
2634
2635			if(window.testseek.icecats[query.ts_icecatid])
2636			{
2637				ts_id = window.testseek.icecats[query.ts_icecatid];
2638			}
2639		}
2640
2641		// still no search parameters
2642		if(!parameter_count)
2643		{
2644			// exit negativly
2645			return false;
2646		}
2647
2648		// do it have a manufacture parameter?
2649		if(query.ts_man)
2650		{
2651			// store as search parameter
2652			search.man = query.ts_man;
2653
2654			// count as search-paramter
2655			parameter_count++;
2656		}
2657	}
2658
2659	// Make sure we have a ts-object on the element, if missing add, and store original classname
2660	if(!element.ts)
2661	{
2662		element.ts = {
2663			"className": '' + element.className
2664		};
2665	}
2666
2667	// Make sure we have a ts_id in that ts-obejct
2668	if(!element.ts.ts_id)
2669	{
2670		element.ts.ts_id = false;
2671	}
2672
2673	// remember last search
2674	element.ts.search = search;
2675
2676	// Do we know the testseek product id?
2677	if(ts_id)
2678	{
2679		// store it on element (lowercase)
2680		element.ts.ts_id = ts_id.toLowerCase();
2681	}
2682	else
2683	{
2684		// store the boolean on the element
2685		element.ts.ts_id = ts_id;
2686	}
2687
2688	// if we got a new template_name (!(element.ts.template_name && !template_name))
2689	if(template_name || !element.ts.template_name)
2690	{
2691		// store template name on element
2692		element.ts.template_name = template_name;
2693	}
2694
2695	// succed on render the element
2696	if(element.ts.ts_id && window.testseek.render_element(element))
2697	{
2698		// exit positivly
2699		return true;
2700	}
2701	// render failed, maybe we need to send an ajax first :-)
2702	else
2703	{
2704		// Add to list of pending elements
2705		window.testseek.pending.push(element);
2706
2707		// load now? (or hold)
2708		if(!hold)
2709		{
2710			// Load all elements thats currently on hold
2711			window.testseek.load_held();
2712		}
2713	}
2714}
2715/* End of load_element.js */
2716
2717/* Start of load_held.js */
2718window.testseek.load_held = function()
2719{
2720	var ts = this;
2721	var time = (new Date()).getTime();
2722	var searches = [];
2723	var elements = [];
2724
2725	var pending = this.pending;
2726	this.pending = [];
2727	var pending_count = pending.length;
2728	for(var index = 0; index < pending_count; index++)
2729	{
2730//		if(!pending[index].ts.time || pending[index].ts.time < time - 5000)
2731//above was used to lower impact on live servers, but 5 sec wait time lowers UX score
2732// test		if(!pending[index].ts.time || pending[index].ts.time < time - 8000)
2733		if(!pending[index].ts.time || pending[index].ts.time < time - 300)
2734		{
2735			pending[index].ts.time = time;
2736			searches.push(pending[index].ts.search);
2737			elements.push(pending[index]);
2738		}
2739	}
2740
2741	if(searches.length)
2742	{
2743		var ajax = new XMLHttpRequest();
2744		ajax.onreadystatechange = function() {
2745			if(ajax.readyState == /* XMLHttpRequest.DONE */ 4)
2746			{
2747				if(ajax.status == 200)
2748				{
2749					if(ajax.responseJSON)
2750					{
2751						ts.handle_respone(ajax.responseJSON, elements);
2752					}
2753					else
2754					{
2755						ts.handle_respone(ajax.responseText, elements);
2756					}
2757				}
2758				else if(window.testseek.verbose)
2759				{
2760					console.log(ajax.status);
2761					console.log(ajax);
2762				}
2763			}
2764		};
2765
2766		ajax.open("POST", window.testseek.search_url, true);
2767		ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
2768		var parameters = "erc=" + parseInt(window.testseek.er_count);
2769		parameters += "&vrc=500";
2770		if(window.testseek.filters.er_lang)
2771		{
2772			parameters += "&er_lang=" + encodeURIComponent(window.testseek.filters.er_lang);
2773		}
2774		if(window.testseek.filters.er_have_score)
2775		{
2776			parameters += "&er_have_score=" + parseInt(window.testseek.filters.er_have_score);
2777		}
2778		if(window.testseek.filters.er_min_score)
2779		{
2780			parameters += "&er_min_score=" + parseFloat(window.testseek.filters.er_min_score);
2781		}
2782		if(window.testseek.filters.er_sort)
2783		{
2784			parameters += "&er_sort=" + encodeURIComponent(window.testseek.filters.er_sort);
2785		}
2786		if(window.testseek.filters.aur_sort)
2787		{
2788			parameters += "&aur_sort=" + encodeURIComponent(window.testseek.filters.aur_sort);
2789		}
2790		if(window.testseek.filters.filter_aurss) //Nemanja add-on for v5.2
2791		{
2792			parameters += "&filter_aurss=" + encodeURIComponent(window.testseek.filters.filter_aurss);
2793		}
2794		if(window.testseek.filters.v_sort)
2795		{
2796			parameters += "&v_sort=" + encodeURIComponent(window.testseek.filters.v_sort);
2797		}
2798		if(window.testseek.show)
2799		{
2800			parameters += "&show=" + encodeURIComponent(window.testseek.show.join(','));
2801		}
2802		parameters += "&json=" + encodeURIComponent(JSON.stringify(searches));
2803		ajax.send(parameters);
2804	}
2805}
2806/* End of load_held.js */
2807
2808/* Start of load_more_aur.js */
2809/**
2810 * Load and extend a AUreview-loop with more content
2811 *
2812 * @param loop_base HTMLElement the element to extend, using its .ts.template
2813 * @param count int number of reviews to extend it with
2814 *
2815 * @depends search_url, handle_respone, extend_er
2816 **/
2817
2818window.testseek.load_more_aur = function(loop_base, count)
2819{
2820	//console.log('davajce', loop_base, count, 'cekalica', loop_base.pending); //return;
2821	// if there is more reviews pending to be loaded
2822	if (loop_base.pending.length > 0)
2823	{
2824		// try to slice the right number of review_ids of the pending list
2825		var list = loop_base.pending.slice(0, count);
2826		var list_length = list.length;
2827
2828		//console.log('strlen', list, list_length);return;
2829
2830		// make a list of pending review_ids that needs to be loaded
2831		var missing = [];
2832
2833		// loop the sliced list of review_ids
2834		for(var row_nr = 0; row_nr < list_length; row_nr++)
2835		{
2836			var review_id = list[row_nr];
2837
2838			// if review isn't pre-loaded
2839			if(!testseek.aur_content[review_id])
2840			{
2841				// add it to the list of missing
2842				missing.push(review_id);
2843			}
2844		}
2845
2846		// at least one is missing, use ajax
2847		if(missing.length > 0)
2848		{
2849			// create an ajax object
2850			var ajax = new XMLHttpRequest();
2851
2852			// add a listner to catch when request done
2853			ajax.onreadystatechange = function() {
2854				// ignore all states except DONE
2855				if(ajax.readyState == /* XMLHttpRequest.DONE */ 4)
2856				{
2857					// if ok response (http code 200)
2858					if(ajax.status == 200)
2859					{
2860						// answer has a parsed JSON
2861						if(ajax.responseJSON)
2862						{
2863							// call the response-handler with the parsed JSON
2864							window.testseek.handle_respone(ajax.responseJSON, []);
2865						}
2866						else
2867						{
2868							// call the response-handler with the JSON-string
2869							window.testseek.handle_respone(ajax.responseText, []);
2870						}
2871
2872						// Extend the element with the new reviews
2873						window.testseek.extend_aur(loop_base, list);
2874					}
2875					// other response
2876					else if(window.testseek.verbose)
2877					{
2878						// Log
2879						console.log(ajax.status);
2880						console.log(ajax);
2881					}
2882				}
2883			};
2884
2885			// Send ajax
2886			ajax.open("POST", window.testseek.search_url, true);
2887			ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
2888			ajax.send("aur_ids=" + missing.join(','));
2889		}
2890		// all reviews are already loaded
2891		else
2892		{
2893			// Extend the element with the new reviews
2894			window.testseek.extend_aur(loop_base, list);
2895		}
2896	}
2897}
2898/* End of load_more_aur.js */
2899
2900/* Start of load_more_er.js */
2901/**
2902 * Load and extend a ereview-loop with more content
2903 *
2904 * @param loop_base HTMLElement the element to extend, using its .ts.template
2905 * @param count int number of reviews to extend it with
2906 *
2907 * @depends search_url, handle_respone, extend_er
2908 **/
2909
2910window.testseek.load_more_er = function(loop_base, count)
2911{
2912	console.log('davajce', loop_base, count, loop_base.pending.length); //return;
2913	// if there is more reviews pending to be loaded
2914	if(loop_base.pending.length > 0)
2915	{
2916		// try to slice the right number of review_ids of the pending list
2917		var list = loop_base.pending.slice(0, count);
2918		var list_length = list.length;
2919
2920		// make a list of pending review_ids that needs to be loaded
2921		var missing = [];
2922
2923		// loop the sliced list of review_ids
2924		for(var row_nr = 0; row_nr < list_length; row_nr++)
2925		{
2926			var review_id = list[row_nr];
2927
2928			//console.log('kako ovo ima?? ER', testseek.ereviews);
2929			// if review isn't loaded
2930			if(!testseek.ereviews[review_id])
2931			{
2932				// add it to the list of missing
2933				missing.push(review_id);
2934			}
2935		}
2936
2937		// at least one is missing, use ajax
2938		if(missing.length > 0)
2939		{
2940			// create an ajax object
2941			var ajax = new XMLHttpRequest();
2942
2943			// add a listner to catch when request done
2944			ajax.onreadystatechange = function() {
2945				// ignore all states except DONE
2946				if(ajax.readyState == /* XMLHttpRequest.DONE */ 4)
2947				{
2948					// if ok response (http code 200)
2949					if(ajax.status == 200)
2950					{
2951						// answer has a parsed JSON
2952						if(ajax.responseJSON)
2953						{
2954							// call the response-handler with the parsed JSON
2955							window.testseek.handle_respone(ajax.responseJSON, []);
2956						}
2957						else
2958						{
2959							// call the response-handler with the JSON-string
2960							window.testseek.handle_respone(ajax.responseText, []);
2961						}
2962
2963						// Extend the element with the new reviews
2964						window.testseek.extend_er(loop_base, list);
2965					}
2966					// other response
2967					else if(window.testseek.verbose)
2968					{
2969						// Log
2970						console.log(ajax.status);
2971						console.log(ajax);
2972					}
2973				}
2974			};
2975
2976			// Send ajax
2977			ajax.open("POST", window.testseek.search_url, true);
2978			ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
2979			ajax.send("er_ids=" + missing.join(','));
2980		}
2981		// all reviews are already loaded
2982		else
2983		{
2984			// Extend the element with the new reviews
2985			window.testseek.extend_er(loop_base, list);
2986		}
2987	}
2988}
2989/* End of load_more_er.js */
2990
2991/* Start of load_template_by_url.js */
2992window.testseek.load_template_by_url = function(template_name, url) {
2993	var ajax = new XMLHttpRequest();
2994	ajax.onreadystatechange = function() {
2995		if(ajax.readyState == /* XMLHttpRequest.DONE */ 4)
2996		{
2997			if(ajax.status == 200)
2998			{
2999				window.testseek.templates[template_name] = ajax.responseText;
3000				if(window.testseek.verbose)
3001				{
3002					console.log(['template loaded', template_name]);
3003				}
3004				window.testseek.load_held();
3005			}
3006			else if(window.testseek.verbose);
3007			{
3008				console.log(ajax.status);
3009				console.log(ajax);
3010			}
3011		}
3012	};
3013
3014	ajax.open("GET", url, true);
3015	ajax.send();
3016}
3017/* End of load_template_by_url.js */
3018
3019/* Start of parseQuery.js */
3020window.testseek.parseQuery = function(url_query)
3021{
3022	var result = {};
3023	var pair;
3024	var key;
3025	var value;
3026	var vars = url_query.split('&');
3027	var var_count = vars.length;
3028
3029	for(var i = 0; i < var_count; i++)
3030	{
3031		pair = vars[i].split('=');
3032		key = decodeURIComponent(pair[0]);
3033		if(pair.length == 1)
3034		{
3035			value = "";
3036		}
3037		else
3038		{
3039			value = decodeURIComponent(pair.slice(1).join("="));
3040		}
3041
3042		if(key.substr(key, key.length - 2) == "[]")
3043		{
3044			key = key.substr(key, 0, key.length - 2);
3045			if(!result[key] || !result[key].push)
3046			{
3047				result[key] = [];
3048			}
3049			result[key].psuh(value);
3050		}
3051		else
3052		{
3053			result[key] = value;
3054		}
3055	}
3056
3057	return result;
3058}
3059/* End of parseQuery.js */
3060
3061/* Start of play_video.js */
3062window.testseek.play_video = function(id, element) {
3063	var video = window.testseek.videos[id];
3064	if(video)
3065	{
3066		element.setAttribute('data-ts-video-id', id);
3067		element.setAttribute('src', video.video_url.replace("https://www.youtube.com/watch?v=", "https://www.youtube.com/embed/") + '?autoplay=1');
3068		return true;
3069	}
3070	return false;
3071}
3072/* End of play_video.js */
3073
3074/* Start of popup.js */
3075window.testseek.close_popup = function(ts_id, template) {
3076	var ts_popup = document.getElementById('ts_popup');
3077	var ts_popup_child = document.getElementById('ts_popup_child');
3078	if(!ts_popup)
3079	{
3080		return true;
3081	}
3082	ts_popup.style.display = 'none';
3083	ts_popup_child.innerHTML = '';
3084
3085	return true;
3086}
3087
3088window.testseek.popup = function(ts_id, template) {
3089	var ts_popup = document.getElementById('ts_popup');
3090	var ts_popup_child = document.getElementById('ts_popup_child');
3091	var new_ts_popup = !ts_popup;
3092	if(new_ts_popup)
3093	{
3094		ts_popup = document.createElement("DIV");
3095		ts_popup.id = 'ts_popup';
3096		ts_popup.className = 'ts_popup';
3097		ts_popup.ts = {"className": '' + ts_popup.className};
3098
3099		var ts_popup_bg = document.createElement("DIV");
3100		ts_popup_bg.id = 'ts_popup_bg';
3101		ts_popup_bg.className = 'ts_popup_bg';
3102		ts_popup_bg.ts = {"className": '' + ts_popup.className};
3103		ts_popup.appendChild(ts_popup_bg);
3104		ts_popup_bg.onclick = window.testseek.close_popup;
3105
3106		ts_popup_child = document.createElement("DIV");
3107		ts_popup_child.id = 'ts_popup_child';
3108		ts_popup_child.className = 'ts_popup_child';
3109		ts_popup_child.ts = {"className": '' + ts_popup.className};
3110		ts_popup.appendChild(ts_popup_child);
3111	}
3112	else
3113	{
3114		ts_popup.className = ts_popup.ts.className;
3115		ts_popup.style.display = 'block';
3116
3117		ts_popup_child.className = ts_popup_child.ts.className;
3118		ts_popup_child.style.display = 'block';
3119	}
3120
3121//loading our owl animation in case there's a queuee
3122		ts_popup_child.innerHTML = '<img style="display:block;margin-left:auto;margin-right:auto;" title="Loading..." src="https://' + window.testseek.ts_domain + '/templates/v2/images/flying_owl.g
3122if' + '"><h3 style="text-align:center;">Loading...</h3>';
3123
3124	ts_popup_child.setAttribute('data-ts-id', ts_id);
3125	ts_popup_child.ts.ts_id = ts_id;
3126	if(template)
3127	{
3128		ts_popup_child.ts.template_name = template;
3129	}
3130	else if(window.testseek.popup_template)
3131	{
3132		ts_popup_child.ts.template_name = window.testseek.popup_template;
3133	}
3134	else
3135	{
3136		if(window.testseek.verbose)
3137		{
3138			console.log("No popup template selected");
3139		}
3140		return false;
3141	}
3142
3143	window.testseek.pending.push(ts_popup_child);
3144	if(new_ts_popup)
3145	{
3146		document.body.appendChild(ts_popup);
3147	}
3148	ts_popup_child.scrollIntoView();
3149	return window.testseek.load_held();
3150}
3151/* End of popup.js */
3152
3153/* Start of render_au_review.js */
3154/*
3155Rendering of full AUR - NFR June 2021.
3156*/
3157window.testseek.render_au_review = function(template, review)
3158{
3159	//console.log('aurevObj', review);
3160
3161	//decompile object
3162	aurss_product_reviews_aureview_id = review.aureview_id;
3163	aurss_product_reviews_author = review.author_name;
3164	aurss_product_reviews_date = review.publish_date;
3165	aurss_product_reviews_stars = review.stars;
3166	aurss_product_reviews_headline = review.headline;
3167	aurss_product_reviews_text = review.text_comment;
3168	aurss_product_reviews_good = review.text_good;
3169	aurss_product_reviews_bad = review.text_bad;
3170	aurss_product_reviews_bottomline = review.text_bottomline;
3171	aurss_product_reviews_aurss_name = review.aurss_name;
3172	//TODO perhaps link original AURSS product URL as well?
3173
3174
3175	//FIXME only testing
3176	/*aurss_product_reviews_good = aurss_product_reviews_good ? aurss_product_reviews_good : 'Good!';
3177	aurss_product_reviews_bad = aurss_product_reviews_bad ? aurss_product_reviews_bad : 'Bad!';
3178	aurss_product_reviews_bottomline = aurss_product_reviews_bottomline ? aurss_product_reviews_bottomline : 'Bottom!';
3179	aurss_product_reviews_headline = aurss_product_reviews_headline ? aurss_product_reviews_headline : 'Head!';*/
3180
3181
3182	//var test_site = window.testseek.test_sites[review.test_site_id];
3183	var l = aurss_product_reviews_aureview_id;
3184	var flag_position = [-20 * (l % 10), 'px ', -13 * (l - (l % 10)) / 10, 'px'].join('');
3185	var classes = ['ts_e_review', 'ts_no_award', 'ts_comment_have_parts', 'ts_comment_have_sc_full_aur'];
3186
3187	//if(aurss_product_reviews_bad || aurss_product_reviews_good || aurss_product_reviews_bottomline || aurss_product_reviews_headline)
3188	if(aurss_product_reviews_bad || aurss_product_reviews_good || aurss_product_reviews_bottomline)
3189	{
3190		//classes.push('ts_comment_have_parts');
3191	//	classes.push('ts_have_comment');
3192	}
3193
3194	if(aurss_product_reviews_text)
3195	{
3196		//classes.push('ts_comment_no_parts');
3197		classes.push('ts_have_comment');
3198	}
3199	else
3200	{
3201		classes.push('ts_no_comment');
3202		//classes.push('ts_comment_no_parts');
3203	}
3204
3205	//aurss_product_reviews_bad = 'numerose ore di costruzione...';
3206	if(aurss_product_reviews_bad)
3207	{
3208		classes.push('ts_comment_have_bad');
3209	}
3210	else
3211	{
3212		classes.push('ts_comment_no_bad');
3213	}
3214
3215	//aurss_product_reviews_good = 'znznznz';
3216	if(aurss_product_reviews_good)
3217	{
3218		classes.push('ts_comment_have_good');
3219	}
3220	else
3221	{
3222		classes.push('ts_comment_no_good');
3223	}
3224
3225	if(aurss_product_reviews_bottomline)
3226	{
3227		classes.push('ts_comment_have_bottom');
3228	}
3229	else
3230	{
3231		classes.push('ts_comment_no_bottom');
3232	}
3233
3234	if(aurss_product_reviews_headline)
3235	{
3236		classes.push('ts_comment_have_headline');
3237	}
3238	else
3239	{
3240		classes.push('ts_comment_no_headline');
3241	}
3242
3243	if(aurss_product_reviews_stars)
3244	{
3245		classes.push('ts_have_score');
3246		//classes.push('ts_no_score');
3247
3248	/*	loveWillTearUsApart = Math.round(aurss_product_reviews_stars / 5) * 100;
3249		var kita = 4/5 * 100;
3250
3251		console.log('kita?', kita, 'legooo skor', aurss_product_reviews_aureview_id, aurss_product_reviews_stars, loveWillTearUsApart);
3252
3253		stabre = 'score_' + loveWillTearUsApart;
3254
3255		console.log('eeek??', stabre);*/
3256
3257
3258		//classes.push('score_' + Math.round(aurss_product_reviews_stars / 10) * 10);
3259		//classes.push('score_' + aurss_product_reviews_stars);
3260		//TODO use MAX score here where 5
3261		//console.log(aurss_product_reviews_stars, aurss_product_reviews_stars / 5 * 100);
3262
3263		classes.push('score_' + aurss_product_reviews_stars / 5 * 100);
3264		//classes.push('score_' + Math.round(100 * aurss_product_reviews_stars) / 10);
3265		//console.log('zvezdice', aurss_product_reviews_stars, Math.round(aurss_product_reviews_stars / 10) * 10);
3266	}
3267	else
3268	{
3269		classes.push('ts_no_score');
3270	}
3271
3272	//loveWillTearUsApart = stabre = null;
3273
3274	if(aurss_product_reviews_author)
3275	{
3276		classes.push('ts_have_author');
3277	}
3278	else
3279	{
3280		classes.push('ts_no_author');
3281	}
3282
3283	if(aurss_product_reviews_date)
3284	{
3285		classes.push('ts_have_date');
3286	}
3287	else
3288	{
3289		classes.push('ts_no_date');
3290	}
3291
3292	//var starsTMPL = '<span class="ts_aur_review_stars_rating"><i>★</i><i>★</i><i>★</i><u class="ts-empty-star">★</u><u class="ts-empty-star">★</u></span>';
3293	//test aurss_product_reviews_stars
3294	//aurss_product_reviews_stars = 2;
3295	//console.log('stars kolko?', aurss_product_reviews_stars);
3296	//TODO tmp hardcocde max, take it from AUreview itself!
3297	var maxStarsAUR = 5;
3298	var emptyStarsCnt = maxStarsAUR - aurss_product_reviews_stars;
3299	var starsBuffer = '';
3300	var emptyStarsBuffer = '';
3301
3302	//first populate full stars
3303	for (var star = 1; star <= aurss_product_reviews_stars; star++)
3304	{
3305		starsBuffer = starsBuffer + '<i>★</i>';
3306	}
3307
3308	//then empty stars
3309	for (var emptyStar = 1; emptyStar <= emptyStarsCnt; emptyStar++)
3310	{
3311		emptyStarsBuffer = emptyStarsBuffer + '<u class="ts-empty-star">★</u>'
3312	}
3313	//TODO think about half stars for the future?
3314
3315	var finalStarsBuffer = starsBuffer + emptyStarsBuffer;
3316	var starsTMPL = '<span title="' + aurss_product_reviews_stars + ' / ' + maxStarsAUR + '" class="ts_aur_review_stars_rating">%starsInside%</span>';
3317	starsTMPL = starsTMPL.replace('%starsInside%', finalStarsBuffer);
3318	//console.log('eee??', starsBuffer, emptyStarsBuffer, finalStarsBuffer, starsTMPL);
3319
3320	//x.style.display = "block";
3321	//Hide inactive product URLs, see GitLab #332
3322	//!review.url && classes.push('ts_aer_product_url_inactive');
3323	// shortcode for htmlentities()
3324	var he = window.testseek.htmlentities;
3325	return template
3326				.replace(/%ts_aur_review_stars_rating%/g, starsTMPL)
3327				.replace(/%aureview_id%/g, 1 * aurss_product_reviews_aureview_id)
3328				.replace(/%aur_full_class%/g, he(classes.join(' ')))
3329				.replace(/%er_author%/g,  	he(aurss_product_reviews_author))
3330				//.replace(/%ts_show_if_sc_full_aur%/g, '')
3331				.replace(/%er_author_date%/g, he(aurss_product_reviews_date))
3332				.replace(/%er_site%/g, he(aurss_product_reviews_aurss_name))
3333				.replace(/%aur_stars_score%/g, Math.round(aurss_product_reviews_stars))
3334				.replace(/%aur_stars_class%/g, 'stammered') //xD
3335				.replace(/%aurss_product_reviews_good%/g, he(aurss_product_reviews_good))
3336				.replace(/%aurss_product_reviews_bad%/g, he(aurss_product_reviews_bad))
3337				.replace(/%aurss_product_reviews_bottomline%/g, he(aurss_product_reviews_bottomline))
3338				.replace(/%aurss_product_reviews_headline%/g, he(aurss_product_reviews_headline))
3339				.replace(/%aurss_product_reviews_text%/g, he(aurss_product_reviews_text));
3340};/* End of render_au_review.js */
3341
3342/* Start of render_e_review.js */
3343window.testseek.render_e_review = function(template, review)
3344{
3345	var test_site = window.testseek.test_sites[review.test_site_id];
3346	var l = review.language_id;
3347	var flag_position = [-20 * (l % 10), 'px ', -13 * (l - (l % 10)) / 10, 'px'].join('');
3348	var classes = ['ts_e_review'];
3349	if(review.test_comment_bad || review.test_comment_good || review.test_comment_bottomline)
3350	{
3351		classes.push('ts_comment_have_parts');
3352		classes.push('ts_have_comment');
3353	}
3354	else if(review.test_comment)
3355	{
3356		classes.push('ts_comment_no_parts');
3357		classes.push('ts_have_comment');
3358	}
3359	else
3360	{
3361		classes.push('ts_no_comment');
3362		classes.push('ts_comment_no_parts');
3363	}
3364	if(review.test_comment_bad)
3365	{
3366		classes.push('ts_comment_have_bad');
3367	}
3368	else
3369	{
3370		classes.push('ts_comment_no_bad');
3371	}
3372	if(review.test_comment_good)
3373	{
3374		classes.push('ts_comment_have_good');
3375	}
3376	else
3377	{
3378		classes.push('ts_comment_no_good');
3379	}
3380	if(review.test_comment_bottomline)
3381	{
3382		classes.push('ts_comment_have_bottom');
3383	}
3384	else
3385	{
3386		classes.push('ts_comment_no_bottom');
3387	}
3388
3389	if(review.score)
3390	{
3391		classes.push('ts_have_score');
3392		classes.push('score_' + Math.round(review.score / 10) * 10);
3393	}
3394	else
3395	{
3396		classes.push('ts_no_score');
3397	}
3398
3399	if(review.award_image)
3400	{
3401		classes.push('ts_have_award');
3402	}
3403	else
3404	{
3405		classes.push('ts_no_award');
3406	}
3407
3408	if(review.test_author)
3409	{
3410		classes.push('ts_have_author');
3411	}
3412	else
3413	{
3414		classes.push('ts_no_author');
3415	}
3416
3417	if(review.publish_date)
3418	{
3419		classes.push('ts_have_date');
3420	}
3421	else
3422	{
3423		classes.push('ts_no_date');
3424	}
3425
3426	//Hide inactive product URLs, see GitLab #332
3427	!review.url && classes.push('ts_aer_product_url_inactive');
3428
3429	// shortcode for htmlentities()
3430	var he = window.testseek.htmlentities;
3431
3432	return template
3433				.replace(/%review_id%/g, 1 * review.review_id)
3434				.replace(/%er_class%/g, he(classes.join(' ')))
3435				.replace(/%er_author%/g,  	he(review.test_author))
3436				.replace(/%er_author_date%/g, he(review.publish_date))
3437				.replace(/%er_award_image%/g, he(review.award_image_url))
3438				.replace(/%er_award_image_200%/g, review.award_image_200_url)
3439				.replace(/%award_name%/g, he(review.award_name))
3440				.replace(/%er_award_name%/g, he(review.award_image_name))
3441				.replace(/%er_bottom%/g, he(review.test_comment_bottomline))
3442				.replace(/%er_comment%/g, he(review.test_comment))
3443				.replace(/%er_con%/g, he(review.test_comment_bad))
3444				.replace(/%er_flag_position%/g, flag_position)
3445				.replace(/%er_locale%/g, he(review.locale_id))
3446				.replace(/%er_pro%/g, he(review.test_comment_good))
3447				.replace(/%er_score_float%/g, 1 * review.score)
3448				.replace(/%er_score%/g, Math.round(review.score))
3449				.replace(/%er_org_score%/g, Math.round(review.org_score))
3450				.replace(/%er_max_score%/g, Math.round(review.max_score))
3451				.replace(/%er_site_id%/g, 1 * review.test_site_id)
3452				.replace(/%er_site%/g, he(test_site.name))
3453				.replace(/%er_site_logo%/g, he(test_site.logo_url))
3454				.replace(/%er_url%/g, he(review.url))
3455				.replace(/%er_up_votes%/g, 1 * review.up_votes)
3456				.replace(/%er_down_votes%/g, 1 * review.down_votes)
3457};
3458
3459
3460/* End of render_e_review.js */
3461
3462/* Start of render_element.js */
3463window.testseek.render_element = function(element)
3464{
3465	if(!element.ts)
3466	{
3467		if(window.testseek.verbose)
3468		{
3469			console.log(['No parameters', element]);
3470		}
3471		return false;
3472	}
3473
3474	if(!element.ts.ts_id)
3475	{
3476		if(window.testseek.verbose)
3477		{
3478			console.log(['No Product', element]);
3479		}
3480		return false;
3481	}
3482
3483	if(!this.products[element.ts.ts_id])
3484	{
3485		if(window.testseek.verbose)
3486		{
3487			console.log(['Product not loaded', element.ts.ts_id, element]);
3488		}
3489		return false;
3490	}
3491
3492	if(!element.ts.template_name)
3493	{
3494		if(window.testseek.verbose)
3495		{
3496			console.log(['No template', element]);
3497		}
3498		return false;
3499	}
3500
3501	if(!this.templates[element.ts.template_name])
3502	{
3503		if(window.testseek.verbose)
3504		{
3505			console.log(['Template not loaded', element.ts.template_name, element]);
3506		}
3507		return false;
3508	}
3509
3510	if(element.tagName == 'A' || (element.tagName == 'SCRIPT' && element.parentNode.tagName != 'HEAD'))
3511	{
3512		var new_element = document.createElement('DIV');
3513		new_element.ts = element.ts;
3514		new_element.className = element.className;
3515		new_element.style = element.style;
3516		element.parentNode.replaceChild(new_element, element);
3517		element = new_element;
3518	}
3519	this.update_class(element, this.products[element.ts.ts_id]);
3520	this.render_template(element.ts.template_name, this.products[element.ts.ts_id], element);
3521
3522	window.testseek.render_finish_activate();
3523
3524	return true;
3525}
3526/* End of render_element.js */
3527
3528/* Start of render_finish.js */
3529window.testseek.render_finish_activate = function()
3530{
3531	if(window.testseek.verbose)
3532	{
3533		console.log('render_finish_activate()');
3534	}
3535	if(window.testseek.after_render_timer)
3536	{
3537		clearTimeout(window.testseek.after_render_timer);
3538	}
3539	window.testseek.after_render_timer = setTimeout(
3540		function() {
3541			window.testseek.render_finish();
3542			window.testseek.after_render_timer = null;
3543		},
3544		300
3545	);
3546}
3547
3548window.testseek.render_finish = function()
3549{
3550	if(window.testseek.verbose)
3551	{
3552		console.log('render_finish()');
3553	}
3554	window.testseek.inline_iframe_init();
3555	testseek.svg_graph_load();
3556	window.testseek.bar_animate();
3557	window.testseek.feature_animate();
3558	//console.log('Disabled - neither ER nor AUR tabs takes precedence');
3559	//window.testseek.tab_select_init(); //disabled in v5.5.0
3560
3561	setTimeout(window.testseek.resize_iframes, 800);
3562}
3563/* End of render_finish.js */
3564
3565/* Start of render_template.js */
3566window.testseek.render_template = function(template_name, product_data, element)
3567{
3568	if(!this.templates[template_name])
3569	{
3570		console.log("Template missing: " + template_name);
3571		return template_name;
3572	}
3573
3574	// shortname for htmlentities()
3575	var he = window.testseek.htmlentities;
3576
3577	var a_score_count = (product_data.astars_1 || 0) + (product_data.astars_2 || 0) + (product_data.astars_3 || 0) + (product_data.astars_4 || 0) + (product_data.astars_5);
3578
3579	var our_awards = ["","award_ed_choice_200x186.png","award_most_awarded_200x186.png","award_best_rank_200x186.png","award_good_buy_200x186.png","award_recommended_200x186.png"];
3580
3581	var first_video_url = '';
3582	var type_options = [];
3583	var language_options = [];
3584	var quality_options = [];
3585	if(product_data.videos && product_data.videos[0])
3586	{
3587		var first_video = window.testseek.videos[product_data.videos[0]];
3588
3589		if(first_video)
3590		{
3591			first_video_url = first_video.video_url.replace("https://www.youtube.com/watch?v=", "https://www.youtube.com/embed/");
3592		}
3593		else
3594		{
3595			first_video = {video_id: 0, up_votes: 0, down_votes: 0};
3596		}
3597
3598		var video_count = product_data.videos.length;
3599		var video_types = {};
3600		var video_languages = {};
3601		var video_qualities = {};
3602		for(video_nr = 0; video_nr < video_count; video_nr++)
3603		{
3604			var current_video = window.testseek.videos[product_data.videos[video_nr]];
3605
3606			if(current_video)
3607			{
3608				if(video_types[current_video.video_type_name])
3609				{
3610					video_types[current_video.video_type_name]++;
3611				}
3612				else
3613				{
3614					video_types[current_video.video_type_name] = 1;
3615				}
3616
3617				var video_locale = current_video.locale_id.split('-')[0];
3618				if(video_languages[video_locale])
3619				{
3620					video_languages[video_locale].count++;
3621				}
3622				else
3623				{
3624					var video_lang = current_video.locale_descr.split(' - ')[0];
3625					video_languages[video_locale] = {count: 1, name: video_lang};
3626				}
3627
3628				if(video_qualities[current_video.video_quality])
3629				{
3630					video_qualities[current_video.video_quality]++;
3631				}
3632				else
3633				{
3634					video_qualities[current_video.video_quality] = 1;
3635				}
3636			}
3637		}
3638
3639		var l10n = window.testseek.l10n;
3640		if(video_count)
3641		{
3642			video_types = window.testseek.asort_num(video_types, true);
3643			video_languages = window.testseek.asort_func(
3644				video_languages,
3645				function(a, b) {
3646					// b - a => DESC
3647					return b[1].count - a[1].count;
3648				}
3649			);
3650			video_qualities = window.testseek.asort_num(video_qualities, true);
3651
3652			for(var video_type in video_types)
3653			{
3654				type_options.push('<option value="' + he(video_type) + '">' + he(l10n('video_type_' + video_type)) + ' (' + he(video_types[video_type]) + ')</option>');
3655			}
3656			for(var video_locale in video_languages)
3657			{
3658				language_options.push('<option value="' + he(video_locale) + '">' + he(video_languages[video_locale].name) + ' (' + he(video_languages[video_locale].count) + ')</option>');
3659			}
3660			for(var video_quality in video_qualities)
3661			{
3662				if(video_quality)
3663				{
3664					quality_options.push('<option value="' + he(video_quality) + '">
3664' + he(video_quality) + ' (' + he(video_qualities[video_quality]) + ')</option>');
3665				}
3666			}
3667		}
3668	}
3669	else
3670	{
3671		first_video = {video_id: 0, up_votes: 0, down_votes: 0};
3672	}
3673
3674
3675	//var stars_tmpl_visibility_class = 'ts_hide_stars_tmpl';//abandon
3676	//var a_score_class = 'score_' + Math.round(product_data.aur_avg_score_subset / 10) * 10;
3677/*	product_data.aur_avg_score = 49;
3678	console.log(product_data.aur_avg_score);*/
3679	var a_score_class = 'score_' + Math.round(product_data.aur_avg_score / 10) * 10; //display score class from real subset (filtered AURSS)
3680	var e_score_class = 'score_' + Math.round(product_data.aer_avg_score_subset / 10) * 10;
3681
3682	//a_score_class = ath.round(product_data.aer_avg_score_subset / 10) * 10;;
3683	//console.log('jooj', a_score_class, Math.round(product_data.aur_avg_score));
3684
3685
3686	// auto stars
3687
3688    var aurScoreTooLow = window.testseek.filters.product_min_aur_score > product_data.aur_avg_score; //this is real subset to compare against
3689
3690    //var aur_avaible = product_data.config.show.aurss && testseek.request_config.aureviews && product_data.aur_count_subset > 0;
3691	var aur_avaible = product_data.config.show.aurss && testseek.request_config.aureviews && product_data.aur_score_count_subset > 0 && !aurScoreTooLow; //aur_score_count_subset is the real subset
3692	//var er_avaible = product_data.config.show.ers && testseek.request_config.ereviews && product_data.aer_count_all > 0;
3693	var er_avaible = product_data.config.show.ers && testseek.request_config.ereviews && product_data.aer_count_subset > 0;
3694	if(aur_avaible)
3695	{
3696		if(er_avaible)
3697		{
3698			// combine scores AER + AUR
3699
3700            var aerAvgScoreSubset = product_data.aer_avg_score_subset;
3701            var aurAvgScore = product_data.aur_avg_score;
3702
3703            //If AER scores are N/A (0x00), do not use them for avg score calculation, use only AUR scores which by default must always have score ratings
3704			var avg_score = aerAvgScoreSubset ? (aerAvgScoreSubset + aurAvgScore)/2 : aurAvgScore;
3705			//var avg_score = (product_data.aur_avg_score + product_data.aer_avg_score_subset)/2;  //use score from real subset (filtered AURSS)
3706
3707			var avg_class = 'score_' + Math.round(avg_score / 10) * 10;
3708			//auto_stars = {type: 'aur+er', count: product_data.aur_count_subset + product_data.aer_count_all, score: Math.round(100 * avg_score)/100, class: avg_class};
3709			auto_stars = {type: 'aur+er', count: product_data.aur_count_subset + product_data.aer_count_subset, score: Math.round(100 * avg_score)/100, class: avg_class};
3710		}
3711		else
3712		{
3713			//auto_stars = {type: 'aur', count: product_data.aur_count_subset, score: Math.round(100 * product_data.aur_avg_score_subset)/100, class: a_score_class};
3714			auto_stars = {type: 'aur', count: product_data.aur_count_subset, score: Math.round(100 * product_data.aur_avg_score)/100, class: a_score_class};  //display score class from real subset (filtered AURSS)
3715		}
3716	}
3717	// only E-reviews avaible?
3718	// + fallback expert reviews --> Nemanja Q: what is the purpose of fallback to AER ratings when we needed AUR?!
3719	else
3720	{
3721		//auto_stars = {type: 'expert', count: product_data.aer_count_all, score: Math.round(100 * product_data.aer_avg_score_subset)/100, class: e_score_class};
3722		auto_stars = {type: 'expert', count: product_data.aer_count_subset, score: Math.round(100 * product_data.aer_avg_score_subset)/100, class: e_score_class};
3723	}
3724
3725	/*console.log('autopark pre', auto_stars);
3726	auto_stars.score = 60.55;
3727	auto_stars.count = 11;
3728	auto_stars.class = 'score_70';
3729	console.log('autopark posle', auto_stars);*/
3730
3731	//console.log('autopark posle', auto_stars);
3732
3733	element.innerHTML = this.templates[template_name]
3734		// Base values
3735		.replace(/%product_name%/g, he(product_data.product_name))
3736		.replace(/%product_url%/g, he(product_data.url))
3737		.replace(/%ts_id%/g, he(product_data.our_article_id.toLowerCase()))
3738		.replace(/%ts_award_id%/g, 1 * product_data.our_award_id)
3739		.replace(/%ts_award_url%/g, he(product_data.our_award_id ? 'https://' + testseek.ts_domain + '/images/' + our_awards[product_data.our_award_id] : ''))
3740
3741		// Icons
3742		.replace(/%icon_star%/g, this.icons('star'))
3743		.replace(/%icon_half_star%/g, this.icons('half_star'))
3744		.replace(/%icon_empty_star%/g, this.icons('empty_star'))
3745		.replace(/%icon_tup%/g, this.icons('tup'))
3746		.replace(/%icon_tdown%/g, this.icons('tdown'))
3747
3748		// TS-score, auto between aur and expert score
3749		.replace(/%ts_score%/g, 1 * auto_stars.score)
3750		.replace(/%ts_score_class%/g, auto_stars.class)
3751		.replace(/%ts_score_count%/g, 1 * auto_stars.count)
3752        //.replace(/%stars_tmpl_visibility_class%/g, stars_tmpl_visibility_class) //abandon
3753
3754		// E-summary
3755		//.replace(/%e_count%/g, 1 * product_data.aer_count_all)
3756		.replace(/%e_count%/g, 1 * product_data.aer_count_subset) //show subset, instead of global raw value from DB
3757		.replace(/%e_score%/g, Math.round(product_data.aer_avg_score_subset))
3758		.replace(/%e_score_class%/g, e_score_class)
3759		.replace(/%e_full_score%/g, 1 * product_data.aer_avg_score_all)
3760		.replace(/%e_score_count%/g, 1 * product_data.aer_score_count_subset)
3761		.replace(/%escore_5star_score%/g, product_data.aer_score_count_subset ? 100 * product_data.estars_5 / product_data.aer_score_count_subset : 0)
3762		.replace(/%escore_4star_score%/g, product_data.aer_score_count_subset ? 100 * product_data.estars_4 / product_data.aer_score_count_subset : 0)
3763		.replace(/%escore_3star_score%/g, product_data.aer_score_count_subset ? 100 * product_data.estars_3 / product_data.aer_score_count_subset : 0)
3764		.replace(/%escore_2star_score%/g, product_data.aer_score_count_subset ? 100 * product_data.estars_2 / product_data.aer_score_count_subset : 0)
3765		.replace(/%escore_1star_score%/g, product_data.aer_score_count_subset ? 100 * product_data.estars_1 / product_data.aer_score_count_subset : 0)
3766		.replace(/%escore_5star_count%/g, 1 * product_data.estars_5)
3767		.replace(/%escore_4star_count%/g, 1 * product_data.estars_4)
3768		.replace(/%escore_3star_count%/g, 1 * product_data.estars_3)
3769		.replace(/%escore_2star_count%/g, 1 * product_data.estars_2)
3770		.replace(/%escore_1star_count%/g, 1 * product_data.estars_1)
3771		.replace(/%escore_noscore_count%/g, 1 * product_data.estars_0)
3772
3773		// A-review summary
3774		.replace(/%a_count%/g, 1 * product_data.aur_count_subset)
3775		//.replace(/%a_score%/g, Math.round(product_data.aur_avg_score_subset))
3776		.replace(/%a_score%/g, product_data.aur_avg_score ? Math.round(product_data.aur_avg_score) : 0x00) //display score from real subset 
3776(filtered AURSS)
3777		.replace(/%a_score_class%/g, a_score_class)
3778		.replace(/%ascore_5star_score%/g, a_score_count ? 100 * product_data.astars_5 / a_score_count : 0)
3779		.replace(/%ascore_4star_score%/g, a_score_count ? 100 * product_data.astars_4 / a_score_count : 0)
3780		.replace(/%ascore_3star_score%/g, a_score_count ? 100 * product_data.astars_3 / a_score_count : 0)
3781		.replace(/%ascore_2star_score%/g, a_score_count ? 100 * product_data.astars_2 / a_score_count : 0)
3782		.replace(/%ascore_1star_score%/g, a_score_count ? 100 * product_data.astars_1 / a_score_count : 0)
3783		.replace(/%ascore_5star_count%/g, 1 * product_data.astars_5 || 0)
3784		.replace(/%ascore_4star_count%/g, 1 * product_data.astars_4 || 0)
3785		.replace(/%ascore_3star_count%/g, 1 * product_data.astars_3 || 0)
3786		.replace(/%ascore_2star_count%/g, 1 * product_data.astars_2 || 0)
3787		.replace(/%ascore_1star_count%/g, 1 * product_data.astars_1 || 0)
3788
3789		// Video summary/preview
3790		.replace(/%v_count%/g, 1 * product_data.videos_count_all)
3791		.replace(/%first_video_url%/g, he(first_video_url))
3792		.replace(/%first_video_id%/g, 1 * first_video.video_id)
3793		.replace(/%first_video_up_votes%/g, 1 * first_video.up_votes)
3794		.replace(/%first_video_down_votes%/g, 1 * first_video.down_votes)
3795		.replace(/%video_type_options%/g, type_options.join("\n"))
3796		.replace(/%video_language_options%/g, language_options.join("\n"))
3797		.replace(/%video_quality_options%/g, quality_options.join("\n"));
3798
3799	if ('rich_snippet' === template_name) {
3800		//console.log(template_name, element.id, element.tsHideRS, element.innerHTML, element);
3801
3802		//hide entire rich snippet node when no AER and no AUR ratings are available, flag is set elsewhere - in update_class() method)
3803		if (element.tsHideRS && element.hasChildNodes()) element.removeChild(element.childNodes[0]);
3804
3805		//if (element.tsHideRS) element.innerHTML = '';
3806
3807		/*if (element.tsHideRS){
3808			while (element.firstChild) {
3809				element.removeChild(element.lastChild);
3810			}
3811		}*/
3812
3813		//console.log('posle?', element.tsHideRS, element);
3814	}
3815
3816	// E-summary Pro loop
3817	var loop_elements = element.getElementsByClassName('ts_e_summary_pros_loop');
3818	if(loop_elements)
3819	{
3820		var element_count = loop_elements.length;
3821		for(var element_nr = 0; element_nr < element_count; element_nr++)
3822		{
3823			var loop_base = loop_elements[element_nr];
3824			loop_base.items_loaded = 0;
3825
3826			if(!loop_base.ts_template)
3827			{
3828				loop_base.ts_template = loop_base.innerHTML.replace(/%pro_nop%/g, '');
3829			}
3830
3831			var items_html = [];
3832
3833			if(product_data.e_pros)
3834			{
3835				var pro_count = product_data.e_pros.length;
3836				for(var pro_nr = 0; pro_nr < pro_count; pro_nr++)
3837				{
3838					items_html.push(
3839						loop_base.ts_template
3840							.replace(/%pro_name%/g, he(product_data.e_pros[pro_nr]))
3841					);
3842				}
3843			}
3844
3845			loop_base.innerHTML = items_html.join('\n');
3846			loop_base.items_loaded += items_html.length;
3847		}
3848	}
3849
3850	// E-summary Con loop
3851	var loop_elements = element.getElementsByClassName('ts_e_summary_cons_loop');
3852	if(loop_elements)
3853	{
3854		var element_count = loop_elements.length;
3855		for(var element_nr = 0; element_nr < element_count; element_nr++)
3856		{
3857			var loop_base = loop_elements[element_nr];
3858			loop_base.items_loaded = 0;
3859
3860			if(!loop_base.ts_template)
3861			{
3862				loop_base.ts_template = loop_base.innerHTML.replace(/%con_nop%/g, '');
3863			}
3864
3865			var items_html = [];
3866
3867			if(product_data.e_cons)
3868			{
3869				var con_count = product_data.e_cons.length;
3870				for(var con_nr = 0; con_nr < con_count; con_nr++)
3871				{
3872					items_html.push(
3873						loop_base.ts_template
3874							.replace(/%con_name%/g, he(product_data.e_cons[con_nr]))
3875					);
3876				}
3877			}
3878
3879			loop_base.innerHTML = items_html.join('\n');
3880			loop_base.items_loaded += items_html.length;
3881		}
3882	}
3883
3884	// E-summary award loop
3885	var loop_elements = element.getElementsByClassName('ts_award_loop');
3886	if(loop_elements)
3887	{
3888		var element_count = loop_elements.length;
3889		for(var element_nr = 0; element_nr < element_count; element_nr++)
3890		{
3891			var loop_base = loop_elements[element_nr];
3892			loop_base.items_loaded = 0;
3893
3894			if(!loop_base.ts_template)
3895			{
3896				loop_base.ts_template = loop_base.innerHTML.replace(/%award_nop%/g, '');
3897			}
3898
3899			var items_html = [];
3900
3901			if(product_data.awards)
3902			{
3903				var award_count = product_data.awards.length;
3904				for(var award_nr = 0; award_nr < award_count; award_nr++)
3905				{
3906					var product_award = product_data.awards[award_nr];
3907					items_html.push(
3908						loop_base.ts_template
3909							.replace(/%award_name%/g, he(product_award.name))
3910							.replace(/%award_url%/g, he(product_award.image_url))
3911					);
3912				}
3913			}
3914
3915			loop_base.innerHTML = items_html.join('\n');
3916			loop_base.items_loaded += items_html.length;
3917		}
3918	}
3919
3920	// A-review summary Features loop
3921	var loop_elements = element.getElementsByClassName('ts_aur_summary_feature_loop');
3922	if(loop_elements)
3923	{
3924		var element_count = loop_elements.length;
3925		for(var element_nr = 0; element_nr < element_count; element_nr++)
3926		{
3927			var loop_base = loop_elements[element_nr];
3928			loop_base.items_loaded = 0;
3929
3930			if(!loop_base.ts_template)
3931			{
3932				loop_base.ts_template = loop_base.innerHTML.replace(/%aur_sf_nop%/g, '');
3933			}
3934
3935			var items_html = [];
3936
3937			if(product_data.aur_features)
3938			{
3939				for(var feature_name in product_data.aur_features)
3940				{
3941					var features = product_data.aur_features[feature_name];
3942					items_html.push(
3943						loop_base.ts_template
3944							.replace(/%aur_sf_name%/g, he(feature_name))
3945							.replace(/%aur_sf_score%/g, Math.round(features.sum / features.count))
3946							.replace(/%aur_sf_score_count%/g, 1 * features.count)
3947							.replace(/%aur_sf_score_sum%/g, 1 * features.sum)
3948					);
3949				}
3950			}
3951
3952			loop_base.innerHTML = items_html.join('\n');
3953			loop_base.items_loaded += items_html.length;
3954		}
3955	}
3956
3957	// A-review summary Pro loop
3958	var loop_elements = element.getElementsByClassName('ts_aur_summary_pros_loop');
3959	if(loop_elements)
3960	{
3961        //var prosConsBoxID = document.getElementById('ts_aur_pros_cons_box');
3962
3963		var element_count = loop_elements.length;
3964		for(var element_nr = 0; element_nr < element_count; element_nr++)
3965		{
3966			var loop_base = loop_elements[element_nr];
3967			loop_base.items_loaded = 0;
3968
3969			if(!loop_base.ts_template)
3970			{
3971				loop_base.ts_template = loop_base.innerHTML.replace(/%aur_summary_pro_nop%/g, '');
3972			}
3973
3974			var items_html = [];
3975
3976			if(product_data.a_pros.length)
3977			{
3978				var pro_count = product_data.a_pros.length;
3979				for(var pro_nr = 0; pro_nr < pro_count; pro_nr++)
3980				{
3981					items_html.push(
3982						loop_base.ts_template.replace(
3983							/%aur_summary_pro_name%/g,
3984							he(product_data.a_pros[pro_nr].t) +
3985								(
3986									product_data.a_pros[pro_nr].c > 1 ?
3987									' (' + product_data.a_pros[pro_nr].c + ')' :
3988									''
3989								)
3990						)
3991					);
3992				}
3993			}
3994			/*else {
3995                console.log('no a_pros found in ts_aur_summary_pros_loop!');
3996			}*/
3997
3998			loop_base.innerHTML = items_html.join('\n');
3999			loop_base.items_loaded += items_html.length;
4000		}
4001	}
4002
4003	// A-review summary Con loop
4004	var loop_elements = element.getElementsByClassName('ts_aur_summary_cons_loop');
4005	if(loop_elements)
4006	{
4007		var element_count = loop_elements.length;
4008		for(var element_nr = 0; element_nr < element_count; element_nr++)
4009		{
4010			var loop_base = loop_elements[element_nr];
4011			loop_base.items_loaded = 0;
4012
4013			if(!loop_base.ts_template)
4014			{
4015				loop_base.ts_template = loop_base.innerHTML.replace(/%aur_summary_con_nop%/g, '');
4016			}
4017
4018			var items_html = [];
4019
4020			if(product_data.a_cons)
4021			{
4022				var con_count = product_data.a_cons.length;
4023				for(var con_nr = 0; con_nr < con_count; con_nr++)
4024				{
4025					items_html.push(
4026						loop_base.ts_template.replace(
4027							/%aur_summary_con_name%/g,
4028							he(product_data.a_cons[con_nr].t) +
4029								(
4030									product_data.a_cons[con_nr].c > 1 ?
4031									' (' + product_data.a_cons[con_nr].c + ')' :
4032									''
4033								)
4034						)
4035					);
4036				}
4037			}
4038
4039			loop_base.innerHTML = items_html.join('\n');
4040			loop_base.items_loaded += items_html.length;
4041		}
4042	}
4043
4044	// Aurss loop
4045	var loop_elements = element.getElementsByClassName('ts_aurss_loop');
4046	if(loop_elements)
4047	{
4048		var element_count = loop_elements.length;
4049		for(var element_nr = 0; element_nr < element_count; element_nr++)
4050		{
4051			var loop_base = loop_elements[element_nr];
4052			loop_base.items_loaded = 0;
4053
4054			if(!loop_base.ts_template)
4055			{
4056				loop_base.ts_template = loop_base.innerHTML.replace(/%aurss_nop%/g, '');
4057			}
4058
4059			var items_html = [];
4060
4061			if(product_data.aurss)
4062			{
4063				for(var aurss_id in product_data.aurss)
4064				{
4065					var aurss = this.aurss[aurss_id];
4066					var product_aurss = product_data.aurss[aurss_id];
4067					if(!product_aurss.score_count)
4068					{
4069						continue;
4070					}
4071					var l = aurss.language_id;
4072					var flag_position = [-20 * (l % 10), 'px ', -13 * (l - (l % 10)) / 10, 'px'].join('');
4073					var aurss_classes = [];
4074					aurss_classes.push('ts_aurss');
4075					aurss_classes.push(product_aurss.features ? 'ts_aurss_have_features' : 'ts_aurss_no_features');
4076					aurss_classes.push(product_aurss.recommend_yes ? 'ts_aurss_have_recommend' : 'ts_aurss_no_recommend');
4077					//aurss_classes.push('score_' + Math.round(product_aurss.score_sum / product_aurss.score_count / 10) * 10);
4078                    aurss_classes.push('score_' + Math.round(product_aurss.aurss_score / 10 ) * 10);
4079
4080                    //Get assoc array of product URLs from API response, see GitLab #312
4081                    //const product_page_urls = product_aurss.product_page_urls ? product_aurss.product_page_urls : null;
4082                    var product_page_urls = product_aurss.product_page_urls ? product_aurss.product_page_urls : null;
4083
4084                    //Get assoc array of AUR content data from API response
4085                    //var product_aurss_full_content = product_aurss.reviews ? product_aurss.reviews : null;
4086                    //var product_aurss_full_content = product_data.aur_content ? product_data.aur_content : null;
4087					//console.log('kude si', product_data); // product_data, testseek.aur_content);
4088                    var product_aurss_full_content = product_data.aur_content ? product_data.aur_content : null;
4089                    var product_aurss_reviews_list = product_aurss.aureviews ? product_aurss.aureviews : null;
4090                    //console.table(product_aur_full_content);
4091
4092                    //if (!product_aurss.product_page_urls) aurss_classes.push('ts_aurss_product_url_inactive');
4093                    //if (!product_page_urls) aurss_classes.push('ts_aurss_product_url_inactive');
4094
4095					//Hide inactive product URLs, see GitLab #312
4096					!product_page_urls && aurss_classes.push('ts_aurss_product_url_inactive');
4097
4098					//Generate linked-in hash tags, see GitLab #312
4099                    //let aurss_linked_in = '#';
4100                    //if (product_aurss.aurss_product_linked_in) aurss_linked_in = aurss_linked_in + product_aurss.aurss_product_linked_in;
4101                    if (product_aurss.aurss_product_linked_in) aurss_linked_in = product_aurss.aurss_product_linked_in; //consists of: OAID + AURSS_ID
4102                    else aurss_linked_in = null;
4103
4104					var current_aurss_html = loop_base.ts_template
4105						.replace(/%aurss_classes%/g, he(aurss_classes.join(' ')))
4106						.replace(/%aurss_id%/g, 1 * aurss.aurss_id)
4107						//.replace(/%aurss_product_id%/g, he(product_aurss.aurss_product_id)) //Nemanja note: this is now deprecated (we have treatment below for each AURSS product)
4108						.replace(/%aurss_url%/g, he(aurss_linked_in)) //used for clickable hashtag link
4109                        //.replace(/%aurss_product_url_id%/g, he(product_aurss.aurss_product_linked_in)) //used for element ID only to match hashtag link from above
4110                        .replace(/%aurss_product_url_id%/g, he(aurss_linked_in) + '-modal') //used for element ID only to match hashtag link from above
4111						.replace(/%aurss_flag_position%/g, flag_position)
4112						.replace(/%aurss_logo%/g, he(aurss.logo_url))
4113						.replace(/%aurss_name%/g, he(aurss.aurss_name))
4114						//.replace(/%aurss_locale%/g, he(`${aurss.locale_id} (${aurss.locale_descr})`)) //heredoc or ES6 templates does not work in old browsers - as it is ES6 only feature xD
4115						.replace(/%aurss_locale%/g, he(aurss.locale_id + ' (' + aurss.locale_descr + ')'))
4116						.replace(/%aurss_recommended_yes%/g, product_aurss.recommend_yes ? 1 * product_aurss.recommend_yes : 0)
4117						.replace(/%aurss_recommended_no%/g, product_aurss.recommend_no ? 1 * product_aurss.recommend_no : 0)
4118						.replace(/%aurss_recommended_score%/g, product_aurss.recommend_yes ? (product_aurss.recommend_no ? Math.round(100 * product_aurss.recommend_yes / (product_aurss.recommend_yes + product_aurss.recommend_no)) : 100): 0)
4119						.replace(/%aurss_recommended_sum%/g, product_aurss.recommend_yes ? 1 * product_aurss.recommend_yes + 1 * product_aurss.recommend_no : 0)
4120						//.replace(/%aurss_score%/g, Math.round(product_aurss.score_sum / product_aurss.score_count))
4121                        .replace(/%aurss_score%/g, Math.round(product_aurss.aurss_score))
4122						.replace(/%aurss_score_1star_count%/g, 1 * product_aurss.stars_1 || 0)
4123						.replace(/%aurss_score_1star_score%/g, 100 * product_aurss.stars_1 / product_aurss.score_count || 0)
4124						.replace(/%aurss_score_2star_count%/g, 1 * product_aurss.stars_2 || 0)
4125						.replace(/%aurss_score_2star_score%/g, 100 * product_aurss.stars_2 / product_aurss.score_count || 0)
4126						.replace(/%aurss_score_3star_count%/g, 1 * product_aurss.stars_3 || 0)
4127						.replace(/%aurss_score_3star_score%/g, 100 * product_aurss.stars_3 / product_aurss.score_count || 0)
4128						.replace(/%aurss_score_4star_count%/g, 1 * product_aurss.stars_4 || 0)
4129						.replace(/%aurss_score_4star_score%/g, 100 * product_aurss.stars_4 / product_aurss.score_count || 0)
4130						.replace(/%aurss_score_5star_count%/g, 1 * product_aurss.stars_5 || 0)
4131						.replace(/%aurss_score_5star_score%/g, 100 * product_aurss.stars_5 / product_aurss.score_count || 0);
4132
4133
4134					loop_base.innerHTML = current_aurss_html;
4135
4136
4137					// ### Aurss product URLs loop begin ###
4138
4139					//Get desired loop element
4140					var loop_aurss_product_urls = loop_base.getElementsByClassName('ts_aurss_product_urls_loop');
4141					if (loop_aurss_product_urls){
4142						//const count_aurss_product_urls = loop_aurss_product_urls.length;
4143						var count_aurss_product_urls = loop_aurss_product_urls.length;
4144						//for (let i = 0; i < count_aurss_product_urls; i++) {
4145						for (var i = 0; i < count_aurss_product_urls; i++) {
4146							//let each = null;
4147							var each = null;
4148							each = loop_aurss_product_urls[i];
4149							each.items_loaded = 0;
4150
4151                            if (!each.ts_template) each.ts_template = each.innerHTML.replace(/%aurss_f_nop%/g, '');
4152
4153                            //let urlsArray = [];
4154                            var urlsArray = [];
4155                            //let aurss_product_url_name, aurss_product_url_link = null;
4156                            var aurss_product_url_name, aurss_product_url_link = null;
4157
4158                            if (product_page_urls) {
4159
4160                                for (this_aurss_product_id in product_page_urls) {
4161
4162                                    if (product_page_urls.hasOwnProperty(this_aurss_product_id)) {
4163
4164                                    	//Bind URL name and link for each product URL
4165                                        aurss_product_url_name = product_page_urls[this_aurss_product_id].product_name_export;
4166                                        aurss_product_url_link = product_page_urls[this_aurss_product_id].product_page_url;
4167
4168                                        //fill our tmp array
4169                                        urlsArray.push(
4170                                        	each.ts_template
4171												.replace(/%aurss_product_url_name%/g, he(aurss_product_url_name))
4172												.replace(/%aurss_product_url_link%/g, he(aurss_product_url_link))
4173												.replace(/%track_aurss_id%/g, he(aurss.aurss_id)) //TODO this is not used at all for tracking xD
4174												.replace(/%track_aurss_product_id%/g, he(this_aurss_product_id)) //TODO this is not used at all for tracking xD
4175										);
4176                                    }
4177                                }
4178                            }
4179                            each.innerHTML = urlsArray.join('\n'); //join array by LF
4180                            each.items_loaded += urlsArray.length; //???
4181                        }
4182					}
4183                    // ### Aurss product URLs loop end ###
4184
4185					// ### Aurss reviews loop begin ###
4186					var loop_elements = element.getElementsByClassName('ts_aurss_product_reviews_loop');
4187					//console.log('kolko AUR pocetak', loop_elements.length);
4188					if(loop_elements.length)
4189					{
4190						//console.log('hmmmm BUGGAN elementa', loop_elements);
4191						var element_count = loop_elements.length;
4192						//console.log('kolko AUR', element_count);
4193						for(var element_nr = 0; element_nr < element_count; element_nr++)
4194						{
4195							//console.log('vrteska duplo zasto', element_nr, element_count);
4196							var loop_base = loop_elements[element_nr];
4197							//console.log('loop base AUR loaded before', loop_base.items_loaded);
4198							loop_base.items_loaded = 0;
4199							loop_base.pending = [];
4200							//console.log('loop base after', loop_base);
4201							//console.log('loop base AUR loaded after', loop_base.items_loaded);
4202
4203							//console.log('tmpl AUR before', loop_base.ts_template);
4204							if(!loop_base.ts_template)
4205							{
4206								//loop_base.ts_template = loop_base.innerHTML.replace(/%er_nop%/g, '');
4207								loop_base.ts_template = loop_base.innerHTML.replace(/%aur_sc_nop%/g, '');
4208								//loop_base.ts_template = loop_base.innerHTML.replace(/%sc_full_aur_class%/g, 'hide_if_no_sc_full_aur');
4209								loop_base.ts_id = product_data.our_article_id; //not needed here...
4210							}
4211							//console.log('tmpl AUR after', loop_base.ts_template, loop_base.ts_id);
4212
4213							var items_html = [];
4214
4215							if (product_aurss_reviews_list) {
4216
4217								for (this_aurss_product_id in product_aurss_reviews_list) {
4218									if (product_aurss_reviews_list.hasOwnProperty(this_aurss_product_id)) {
4219										for (var io = 0; io < product_aurss_reviews_list[this_aurss_product_id].length; io++) {
4220											var this_aurss_review_id = product_aurss_reviews_list[this_aurss_product_id][io];
4221											//console.log('io', io, 'val??', this_aurss_review_id);
4222											//buffer review data from full content obj
4223											//console.log('full aur cont obj', product_aurss_full_content);
4224											if (product_aurss_full_content.hasOwnProperty(this_aurss_review_id)){
4225
4226												this_aurss_full_review = product_aurss_full_content[this_aurss_review_id];
4227												//add AUrev ID
4228												//aurss_review_id is now injected via back-end object
4229												//this_aurss_full_review.aureview_id = this_aurss_review_id;
4230												//Add AURSS name
4231												//aurss_name is now injected via back-end object
4232												//this_aurss_full_review.aurss_name = aurss.aurss_name;
4233
4234												//push preloaded data
4235												items_html.push(window.testseek.render_au_review(loop_base.ts_template, this_aurss_full_review));
4236												//AURreviewsArray.push(window.testseek.render_au_review(eachAUR.ts_template, this_aurss_full_review));
4237												//console.log('loaded', this_aurss_full_review);
4238											}
4239											else loop_base.pending.push(this_aurss_review_id);
4240											//else eachAUR.pending.push(this_aurss_review_id);
4241										}
4242									}
4243								}
4244							}
4245
4246							//ovaj ga duplira - zasto? pa zato sto inject-uje items_html array ponovo :)
4247							//loop_base.innerHTML = items_html.join('\n');
4248							loop_base.innerHTML = '';
4249							loop_base.items_loaded += items_html.length;
4250
4251
4252							/*items_html.push(
4253								loop_base.ts_template
4254											.replace(/%ts_show_if_sc_full_aur%/g, 'ts_show_if_sc_full_aur'));*/
4255							//loop_base.innerHTML = items_html.join('\n');
4256
4257							if (loop_base.pending.length > 0)
4258							{
4259								//console.log('pending AUR...', loop_base.pending.length, 'loaded AUR', loop_base.items_loaded);
4260								loop_base.parentNode.classList.add('ts_partly_loaded');
4261							}
4262							else
4263							{
4264								//console.log('100% loaded AUR, no more pending!', loop_base.pending.length, 'loaded AUR final:', loop_base.items_loaded);
4265								loop_base.parentNode.classList.add('ts_fully_loaded');
4266							}
4267
4268							//console.log('loop base AUR loaded after', loop_base.items_loaded);
4269
4270							//console.log('cekalica ER', loop_base.pending.length, 'loaded', loop_base.items_loaded);
4271
4272							//loop_base.innerHTML = loop_base.ts_template.replace(/%sc_full_aur_class%/g, 'hide_if_no_sc_full_aur');
4273							//loop_base.innerHTML = items_html.replace(/%sc_full_aur_class%/g, 'hide_if_no_sc_full_aur');
4274							//items_html.push(loop_base.ts_template.replace(/%sc_full_aur_class%/g, 'hide_if_no_sc_full_aur'));
4275									//.replace(/%aurss_f_name%/g, he(feature_name)));
4276
4277						}
4278
4279					}
4280					//else console.log('nema BUGGAN elementa', loop_elements);
4281					// ### Aurss reviews loop end ###
4282
4283					// Aurss Features loop
4284					var loop_elements_2 = loop_base.getElementsByClassName('ts_aurss_feature_loop');
4285					if(loop_elements_2)
4286					{
4287						var element_count_2 = loop_elements_2.length;
4288						for(var element_nr_2 = 0; element_nr_2 < element_count_2; element_nr_2++)
4289						{
4290							var loop_base_2 = loop_elements_2[element_nr_2];
4291							loop_base_2.items_loaded = 0;
4292
4293							if(!loop_base_2.ts_template)
4294							{
4295								loop_base_2.ts_template = loop_base_2.innerHTML.replace(/%aurss_f_nop%/g, '');
4296							}
4297
4298							var items_html_2 = [];
4299
4300							if(product_aurss.features)
4301							{
4302								for(var feature_name in product_aurss.features)
4303								{
4304									var features = product_aurss.features[feature_name];
4305									items_html_2.push(
4306										loop_base_2.ts_template
4307											.replace(/%aurss_f_name%/g, he(feature_name))
4308											.replace(/%aurss_f_score%/g, Math.round(features.sum / features.count))
4309											.replace(/%aurss_f_score_count%/g, 1 * features.count)
4310											.replace(/%aurss_f_score_sum%/g, 1 * features.sum)
4311									);
4312								}
4313							}
4314							loop_base_2.innerHTML = items_html_2.join('\n');
4315							loop_base_2.items_loaded += items_html_2.length;
4316						}
4317						items_html.push(loop_base.innerHTML);
4318					}
4319					else
4320					{
4321						items_html.push(current_aurss_html);
4322					}
4323				}
4324			}
4325			/*else {
4326				console.log('NO AURSS! hide it');
4327			}*/
4328
4329			loop_base.innerHTML = items_html.join('\n');
4330			loop_base.items_loaded += items_html.length;
4331		}
4332	}
4333
4334	// E-review Loop
4335	var loop_elements = element.getElementsByClassName('ts_ereview_loop');
4336	if(loop_elements)
4337	{
4338		var element_count = loop_elements.length;
4339		//console.log('kolko ER', element_count); //1 a zatim 0 ???
4340		for(var element_nr = 0; element_nr < element_count; element_nr++)
4341		{
4342			var loop_base = loop_elements[element_nr];
4343			//console.log('loop base before', loop_base);
4344			loop_base.items_loaded = 0;
4345			loop_base.pending = [];
4346			//console.log('loop base after', loop_base);
4347
4348			//console.log('tmpl before', loop_base.ts_template);
4349			if(!loop_base.ts_template)
4350			{
4351				loop_base.ts_template = loop_base.innerHTML.replace(/%er_nop%/g, '');
4352				loop_base.ts_id = product_data.our_article_id;
4353			}
4354			//console.log('tmpl after', loop_base.ts_template);
4355
4356			var items_html = [];
4357
4358			// TODO: move to a review load function
4359			if(product_data.ereviews)
4360			{
4361				var review_count = product_data.ereviews.length;
4362				for(var rev_nr = 0; rev_nr < review_count; rev_nr++)
4363				{
4364					var review_id = product_data.ereviews[rev_nr];
4365					var review = this.ereviews[review_id];
4366					if(!review)
4367					{
4368						loop_base.pending.push(review_id);
4369					}
4370					else
4371					{
4372						items_html.push(window.testseek.render_e_review(loop_base.ts_template, review));
4373					}
4374				}
4375			}
4376
4377			loop_base.innerHTML = items_html.join('\n');
4378			loop_base.items_loaded += items_html.length;
4379
4380			if(loop_base.pending.length > 0)
4381			{
4382				//console.log('pending...', loop_base.pending.length, 'loaded', loop_base.items_loaded);
4383				loop_base.parentNode.classList.add('ts_partly_loaded');
4384			}
4385			else
4386			{
4387				//console.log('100% loaded, no more pending!', loop_base.pending.length, 'loaded', loop_base.items_loaded);
4388				loop_base.parentNode.classList.add('ts_fully_loaded');
4389			}
4390
4391			//console.log('cekalica ER', loop_base.pending.length, 'loaded', loop_base.items_loaded);
4392		}
4393	}
4394
4395
4396	// Video loop
4397	var loop_elements = element.getElementsByClassName('ts_video_loop');
4398	if(loop_elements)
4399	{
4400		var element_count = loop_elements.length;
4401		for(var element_nr = 0; element_nr < element_count; element_nr++)
4402		{
4403			var loop_base = loop_elements[element_nr];
4404			loop_base.items_loaded = 0;
4405
4406			if(!loop_base.ts_template)
4407			{
4408				loop_base.ts_template = loop_base.innerHTML.replace(/%vid_nop%/g, '');
4409			}
4410
4411			var items_html = [];
4412
4413			// TODO: move to a review load function
4414			if(product_data.videos)
4415			{
4416				var video_count = product_data.videos.length;
4417				for(var vid_nr = 0; vid_nr < video_count; vid_nr++)
4418				{
4419					var video_id = 1 * product_data.videos[vid_nr];
4420					var video = this.videos[video_id];
4421					if(video)
4422					{
4423						items_html.push(
4424							loop_base.ts_template
4425								.replace(/%vid_id%/g, video_id)
4426								.replace(/%vid_site_yid%/g, he(video.video_url))
4427								.replace(/%vid_name%/g, he(video.video_name))
4428								.replace(/%vid_desc%/g, he(video.video_description))
4429								.replace(/%vid_pub%/g, he(video.publish_date))
4430								.replace(/%vid_len%/g, he(video.video_length))
4431								.replace(/%vid_auth%/g, he(video.test_author))
4432								.replace(/%vid_image%/g, he(video.image_url))
4433								.replace(/%vid_thumb%/g, he(video.thumb_url))
4434								.replace(/%vid_type%/g, he(video.video_type_name))
4435								.replace(/%vid_type_name%/g, he(l10n('video_type_' + video.video_type_name)))
4436								.replace(/%vid_lang%/g, he(video.locale_id.split('-')[0]))
4437								.replace(/%vid_lang_name%/g, he(video.locale_descr.split(' - ')[0]))
4438								.replace(/%vid_quality%/g, he(video.video_quality))
4439								.replace(/%vid_site_id%/g, 1 * video.test_site_id)
4440								.replace(/%vid_url%/g, he(video.video_url.replace("https://www.youtube.com/watch?v=", "https://www.youtube.com/embed/")))
4441						);
4442					}
4443					else
4444					{
4445						break;
4446					}
4447				}
4448			}
4449
4450			loop_base.innerHTML = items_html.join('\n');
4451			loop_base.items_loaded += items_html.length;
4452		}
4453	}
4454};
4455
4456
4457/* End of render_template.js */
4458
4459/* Start of resize_iframes.js */
4460window.testseek.resize_iframes = function()
4461{
4462	var stat = {ok: 0, new: 0, lost: 0};
4463	var ifs = document.getElementsByClassName('ts_iframe');
4464	var frame_count = ifs.length;
4465	for(var if_nr = 0; if_nr < frame_count; if_nr++)
4466	{
4467		var iframe = ifs[if_nr];
4468
4469		// do we have an element to calculate height from?
4470		if(iframe.contentDocument.body.firstChild)
4471		{
4472			// Set new height
4473			var height = (10 + iframe.contentDocument.body.firstChild.offsetHeight) + 'px';
4474			iframe.height = height
4475			iframe.style.height = height;
4476			stat.ok++;
4477		}
4478		// did we have an element?
4479		else if(iframe.ts_html)
4480		{
4481			// reset iframe, and trigger a inline_iframe_init() after the loop to restore it
4482			iframe.className = iframe.ts_init_classes;
4483			stat.lost++;
4484		}
4485		else
4486		{
4487			 stat.new++;
4488		}
4489	}
4490	//console.log(["resize_iframes", stat]);
4491	// if we lost some iframe, trigger init to restore them
4492	if(stat.lost > 0)
4493	{
4494		testseek.inline_iframe_init();
4495	}
4496}
4497
4498window.testseek.delayed_resize_iframes = function(ms)
4499{
4500	if(typeof ms != "number")
4501	{
4502		ms = 500;
4503	}
4504	else if(ms <= 0)
4505	{
4506		ms = 500;
4507	}
4508	setTimeout(window.testseek.resize_iframes, ms);
4509}
4510/* End of resize_iframes.js */
4511
4512/* Start of send_vote.js */
4513/**
4514 * Send vote using ajax
4515 *
4516 * @param type string ER for expert reviews, VID for video reviews, and may support more
4517 * @param id int id number of the entity of the given type
4518 * @param sign char '+' for up-votes, '-' for downvotes
4519 * @param callback callable function to call when ajax returns
4520 * @param element any used as 2nd parameter when callback is called
4521 *
4522 * @depends vote_url
4523 **/
4524
4525window.testseek.send_vote = function(type, id, sign, callback, element)
4526{
4527	// concat type, sign and id, to get the vote string
4528	var vote_string = type + sign + id;
4529
4530	// create an ajax object
4531	var ajax = new XMLHttpRequest();
4532
4533	// add a listner to catch when request done
4534	ajax.onreadystatechange = function() {
4535		// ignore all states except DONE
4536		if(ajax.readyState == /* XMLHttpRequest.DONE */ 4)
4537		{
4538			// if ok response (http code 200)
4539			if(ajax.status == 200)
4540			{
4541				// if callback was provided
4542				if(callback)
4543				{
4544					// answer has a parsed JSON
4545					if(ajax.responseJSON)
4546					{
4547						// Call the callback with json and elemnt as argument
4548						callback(ajax.responseJSON, element);
4549					}
4550					else
4551					{
4552						// Parse the respone to json, and call the callback with the json and elemnt as argument
4553						callback(JSON.parse(ajax.responseText), element);
4554					}
4555				}
4556				else if(window.testseek.verbose)
4557				{
4558					// just log the response
4559					console.log(ajax.status);
4560					console.log(ajax);
4561				}
4562			}
4563
4564			// other responses, and there is a callback provided
4565			else if(callback)
4566			{
4567				// Call the callback with a negative json and elemnt as argument
4568				callback({"ok": false}, element);
4569			}
4570		}
4571	};
4572
4573	// Send request
4574	ajax.open("POST", window.testseek.vote_url + vote_string, true);
4575	ajax.send();
4576}
4577/* End of send_vote.js */
4578
4579/* Start of svg_graph_load.js */
4580window.testseek.svg_graph_load = function() {
4581	var graphs = document.getElementsByClassName('ts_clock_graph');
4582	for(var g_nr = graphs.length; g_nr > 0;)
4583	{
4584		var graph = graphs[--g_nr];
4585		var value = parseFloat(graph.getAttribute('data-ts-graph-val'));
4586		var sufix = graph.getAttribute('data-id-sufix');
4587		if(sufix)
4588		{
4589			sufix = '_' + sufix;
4590		}
4591		else
4592		{
4593			sufix = '';
4594		}
4595
4596		if(value)
4597		{
4598			var fg = graph.getElementById('fg' + sufix);
4599			var fg1 = graph.getElementById('fg1' + sufix);
4600			var fg2 = graph.getElementById('fg2' + sufix);
4601			var clockarm = graph.getElementById('clockarm' + sufix);
4602
4603			if(fg)
4604			{
4605				if(value < 20)
4606				{
4607					fg.setAttribute('stroke', '#de5a5a');
4608				}
4609				else if(value < 40)
4610				{
4611					fg.setAttribute('stroke', '#fba7a7');
4612				}
4613				else if(value < 60)
4614				{
4615					fg.setAttribute('stroke', '#f1bf70');
4616				}
4617				else if(value < 80)
4618				{
4619					fg.setAttribute('stroke', '#87d962');
4620				}
4621				else
4622				{
4623					fg.setAttribute('stroke', '#5dab39');
4624				}
4625
4626				fg1 = fg;
4627			}
4628
4629			if(fg1)
4630			{
4631				var r = parseFloat(fg1.getAttribute('r'));
4632				var rv = 0.02 * r * Math.PI * value;
4633				var rv2 = 0.02 * r * Math.PI * (100 - value);
4634				fg1.setAttribute('stroke-dasharray', [rv, rv2].join(' '));
4635
4636				if(fg2)
4637				{
4638					fg2.setAttribute('stroke-dasharray', [rv2, rv].join(' '));
4639				}
4640
4641				if(clockarm)
4642				{
4643					var clockarm_transform = clockarm.getAttribute('transform');
4644
4645					// IE 11 fix
4646					if(clockarm_transform == 'rotate(0)')
4647					{
4648						clockarm_transform = 'rotate(0 ' + fg2.getAttribute('cx') + ' ' + fg2.getAttribute('cy') + ')';
4649					}
4650
4651					clockarm_transform = clockarm_transform.replace(/rotate\([0-9.,]+ /, 'rotate(' + 3.6 * value + ' ');
4652					clockarm.setAttribute('transform', clockarm_transform);
4653				}
4654			}
4655
4656			// modern browsers
4657			if(graph.classList)
4658			{
4659				graph.classList.remove('ts_clock_graph');
4660			}
4661			// Walkaround for IE 11
4662			else
4663			{
4664				graph.setAttribute("class", (' ' + graph.getAttribute("class") + ' ').replace(/\s+/, ' ').replace(' ts_clock_graph ', ' ') .trim());
4665			}
4666		}
4667	}
4668}
4669/* End of svg_graph_load.js */
4670
4671/* Start of tab_select.js */
4672window.testseek.tab_select = function(tab_element, content_container) {
4673	var selected_key = tab_element.getAttribute('data-ts-tab');
4674	var tab_count = tab_element.parentNode.children.length;
4675
4676	for(var ci = 0; ci < tab_count; ci++)
4677	{
4678		var tab_child = tab_element.parentNode.children[ci];
4679		tab_child.classList.remove('selected');
4680	}
4681	tab_element.classList.add('selected');
4682
4683	var content_container_count = content_container.children.length;
4684	for(var ci = 0; ci < content_container_count; ci++)
4685	{
4686		var content_child = content_container.children[ci];
4687		var content_child_key = content_child.getAttribute('data-ts-tab');
4688
4689		if(!content_child_key)
4690		{
4691			continue;
4692		}
4693
4694		if(typeof(content_child.display_type) == 'undefined')
4695		{
4696			content_child.display_type = content_child.style.display;
4697			if(content_child.display_type == 'none')
4698			{
4699				content_child.display_type = 'block';
4700			}
4701		}
4702
4703		if(content_child_key == selected_key)
4704		{
4705			content_child.style.display = content_child.display_type;
4706		}
4707		else
4708		{
4709			content_child.style.display = 'none';
4710		}
4711	}
4712}
4713
4714window.testseek.tab_select_init = function() {
4715	var tab_containers = document.getElementsByClassName('testseek_tabs');
4716	var tab_containers_count = tab_containers.length;
4717
4718	for(var tci = 0; tci < tab_containers_count; tci++)
4719	{
4720		var best_tab = null;
4721		var tab_container = tab_containers[tci];
4722		var tab_container_
4722count = tab_container.children.length;
4723
4724		for(var ci = 0; ci < tab_container_count; ci++)
4725		{
4726			var tab_child = tab_container.children[ci];
4727			var tab_child_key = tab_child.getAttribute('data-ts-tab');
4728			var tab_child_value = tab_child.getAttribute('data-ts-value');
4729
4730			if(!tab_child_key)
4731			{
4732				continue;
4733			}
4734
4735			if(parseInt(tab_child_value) > 0)
4736			{
4737				best_tab = tab_child;
4738				break;
4739			}
4740			else if(!best_tab)
4741			{
4742				best_tab = tab_child;
4743			}
4744		}
4745
4746		if(best_tab)
4747		{
4748			best_tab.click();
4749		}
4750	}
4751}
4752/* End of tab_select.js */
4753
4754/* Start of track_ext_link.js */
4755window.testseek.track_ext_link = function(url, type, id1, id2)
4756{
4757	if(window.testseek.tracking)
4758	{
4759		window.testseek.click_count++;
4760
4761		var ajax = new XMLHttpRequest();
4762		ajax.onreadystatechange = function() {
4763			if(window.testseek.verbose)
4764			{
4765				console.log(ajax.responseText);
4766			}
4767		};
4768
4769		ajax.open("POST", window.testseek.search_url, true);
4770		ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
4771		var parameters = "track[type]=" + encodeURIComponent(type);
4772		parameters += "&track[id1]=" + parseInt(id1);
4773		//console.log(id1, id2); //Nemanja note: see what to do with such conception
4774		parameters += "&track[id2]=" + parseInt(id2); //Nemanja note: OMG FFS. AURSS links are often strings!
4775		parameters += "&track[count]=" + window.testseek.click_count;
4776		parameters += "&track[url]=" + encodeURIComponent(url);
4777		ajax.send(parameters);
4778	}
4779
4780	return true;
4781}
4782
4783window.testseek.click_count = 0;
4784
4785window.testseek.track_er_link = function(url, review_id, test_site_id)
4786{
4787	return window.testseek.track_ext_link(url, 'er_link', review_id, test_site_id);
4788}
4789
4790window.testseek.track_aur_link = function(url, aurss_id, product_id)
4791{
4792	return window.testseek.track_ext_link(url, 'aur_link', aurss_id, product_id);
4793}
4794
4795window.testseek.track_ts_link = function(url)
4796{
4797	return window.testseek.track_ext_link(url, 'ts_link', 0, 0);
4798}
4799
4800window.testseek.track_this_er_link = function(element)
4801{
4802	return window.testseek.track_er_link(element.href, element.getAttribute('data-tseek-rev-id'), element.getAttribute('data-tseek-site-id'));
4803}
4804
4805window.testseek.track_this_aur_link = function(element)
4806{
4807	return window.testseek.track_aur_link(element.href, element.getAttribute('data-tseek-aurss-id'), element.getAttribute('data-tseek-prod-id'));
4808}
4809
4810window.testseek.track_this_ts_link = function(element)
4811{
4812	return window.testseek.track_ts_link(element.href);
4813}
4814/* End of track_ext_link.js */
4815
4816/* Start of update_class.js */
4817window.testseek.update_class = function(element, product_data)
4818{
4819	var noAER = false;
4820	var noAUR = false;
4821
4822	//define default property value when rich snippet is loaded
4823	if ('ts_rich_snippet' === element.id) element.tsHideRS = false;
4824
4825	var classes = [];
4826	if(element.ts.className)
4827	{
4828		classes.push(element.ts.className);
4829	}
4830
4831	if(!product_data || !product_data.config)
4832	{
4833		classes.push("ts_product_na");
4834		element.className = classes.join(' ');
4835	}
4836
4837	var s = product_data.config.show;
4838
4839	if(!s.base)
4840	{
4841		classes.push("ts_base_na");
4842	}
4843
4844	if(!s.er && !s.ers)
4845	{
4846		classes.push("ts_ereviews_na");
4847        noAER = true;
4848	}
4849	// no reviews
4850	else if(product_data.aer_count_all <= 0)
4851	{
4852		classes.push("ts_ereviews_none");
4853		classes.push("ts_ereviews_no_score");
4854        noAER = true;
4855	}
4856	// ereviews without score
4857	else if(product_data.aer_avg_score_subset <= 0)
4858	{
4859		classes.push("ts_ereviews_have");
4860		classes.push("ts_ereviews_no_score");
4861        //do not hide in this case - show even if no score
4862
4863		//buf if we don't have any reviews either. hide it!
4864		if (!product_data.ereviews) {
4865		    noAER = true;
4866            classes.push("ts_ereviews_none"); //TODO put this in down below IF: if noAER...
4867        }
4868	}
4869	// pretend we don't have reviews, if score to low
4870	else if(window.testseek.filters.product_min_er_score > product_data.aer_avg_score_subset)
4871	{
4872		classes.push("ts_ereviews_none");
4873		classes.push("ts_ereviews_no_score");
4874        noAER = true;
4875	}
4876	// ereviews with score
4877	else
4878	{
4879		classes.push("ts_ereviews_have");
4880		classes.push("ts_ereviews_have_score");
4881	}
4882
4883	if(product_data.e_cons && product_data.e_cons.length > 0)
4884	{
4885		classes.push("ts_ereviews_any_cons");
4886	}
4887	else
4888	{
4889		classes.push("ts_ereviews_no_cons");
4890	}
4891	if(product_data.e_pros && product_data.e_pros.length > 0)
4892	{
4893		classes.push("ts_ereviews_any_pros");
4894	}
4895	else
4896	{
4897		classes.push("ts_ereviews_no_pros");
4898	}
4899
4900	//AUR pros & cons - Nemanja add-on
4901	if(!product_data.a_pros || 0 === product_data.a_pros.length)
4902    {
4903        classes.push("ts_aur_no_pros");
4904    }
4905
4906    if(!product_data.a_cons || 0 === product_data.a_cons.length)
4907    {
4908        classes.push("ts_aur_no_cons");
4909    }
4910
4911    if(!product_data.aur_features || 0 === product_data.aur_features.length)
4912    {
4913        classes.push("ts_aur_features_no_summary");
4914    }
4915
4916	if(product_data.awards && product_data.awards.length > 0)
4917	{
4918		classes.push("ts_ereviews_any_award");
4919	}
4920	else
4921	{
4922		classes.push("ts_ereviews_no_award");
4923	}
4924
4925	if(!s.vid)
4926	{
4927		classes.push("ts_videos_na");
4928	}
4929	else if(product_data.videos_count_all > 0)
4930	{
4931		classes.push("ts_videos_have");
4932	}
4933	else
4934	{
4935		classes.push("ts_videos_none");
4936	}
4937
4938
4939	if(!s.aur)
4940	{
4941		classes.push("ts_aureviews_na"); //WTF??
4942        //noAUR = true;
4943	}
4944
4945	//if(!s.aurs || !product_data.aurss) //Nemanja add-on 2nd condition: Hide entire section if no AURSS was found in web service response (AURSS filtered by user choice)
4946	if(!s.aurs)
4947	{
4948		classes.push("ts_aureviews_summary_na");
4949
4950        noAUR = true;
4951
4952       //console.log('!s.aurs');
4953	}
4954	else if(product_data.aur_count_subset > 0) //Note: this is now both subset and global value (if no filters are applied)
4955	{
4956		//if(product_data.avg_aur_score <= 0)
4957		if(product_data.aur_avg_score <= 0) //this is real subset value
4958		{
4959			//classes.push("ts_aureviews_have");
4960            classes.push("ts_aureviews_none");
4961            classes.push("ts_aureviews_no_score");
4962            noAUR = true;
4963            //console.log('product_data.aur_avg_score <= 0');
4964		}
4965		// pretend we don't have reviews, if score to low
4966		//else if(window.testseek.filters.product_min_aur_score > product_data.avg_aur_score)
4967		else if(window.testseek.filters.product_min_aur_score > product_data.aur_avg_score) //this is real subset to compare against
4968		{
4969			classes.push("ts_aureviews_none");
4970			classes.push("ts_aureviews_no_score");
4971            //for tmpl2 (Business), hide AUR tab xD
4972            classes.push('ts_aur_tab_tmpl2_hide');
4973            noAUR = true;
4974            //console.log('pretend we don\'t have reviews, if score to low:', window.testseek.filters.product_min_aur_score, product_data.aur_avg_score);
4975		}
4976		else
4977		{
4978			classes.push("ts_aureviews_have");
4979			classes.push("ts_aureviews_have_score");
4980            //console.log('??? ELSE aur_count_subset, score have aurev have');
4981            //noAUR = true;
4982		}
4983	}
4984	else
4985	{
4986		classes.push("ts_aureviews_none");
4987		classes.push("ts_aureviews_no_score");
4988        noAUR = true;
4989        //console.log('ELSE AUR, score NO aurev none, EOL');
4990        /*console.log('ELSE AUR??');
4991        console.log(s);
4992        return;*/
4993	}
4994
4995    if(!s.ur)
4996	{
4997		classes.push("ts_ureviews_na");
4998	}
4999	else
5000	{
5001		classes.push("ts_ureviews_na");
5002	}
5003
5004	if(product_data.our_award_id)
5005	{
5006		classes.push('ts_have_ts_award');
5007	}
5008	else
5009	{
5010		classes.push('ts_no_ts_award');
5011	}
5012
5013
5014    //no AER, no AUR, hide it completely
5015    if (noAER && noAUR) {
5016        //console.log('NO AUR, NO AER, HIDE BOX', product_data.our_article_id, noAER, noAUR);
5017
5018        //hide entire box for stars tmpl
5019        classes.push('ts_stars_tmpl_hide');
5020
5021        //hide entire box for embedded tmpl
5022        classes.push('ts_live_api_box_hide');
5023
5024		//hide entire rich snippet node when no AER and no AUR ratings are available
5025		if ('ts_rich_snippet' === element.id){
5026
5027			//console.log('update class trigger! NO AUR NOR AER data, hide LD+JSON element!', element.id);
5028
5029			//hide entire node by setting this element property
5030			element.tsHideRS = true;
5031		}
5032
5033    }
5034
5035    element.className = classes.join(' ');
5036
5037}
5038/* End of update_class.js */
5039
5040/* Start of video_filter.js */
5041window.testseek.video_filter = function(filter_type, select, frame) {
5042	var class_prefix = 'ts_video_' + filter_type + '_';
5043	var selected = select.value;
5044	var videos = frame.getElementsByClassName('ts_video');
5045	var video_count = videos.length;
5046	for(video_nr = 0; video_nr < video_count; video_nr++)
5047	{
5048		var video = videos[video_nr];
5049		if(select.value && !video.classList.contains(class_prefix + select.value))
5050		{
5051			video.classList.add(class_prefix + 'hide');
5052		}
5053		else
5054		{
5055			video.classList.remove(class_prefix + 'hide');
5056		}
5057	}
5058}
5059/* End of video_filter.js */
5060
5061/* Start of video_vote.js */
5062window.testseek.video_vote_up = function(id, element)
5063{
5064	var callback = function(a, e) {
5065		if(a.ok)
5066		{
5067			var elements = e.parentNode.getElementsByClassName('ts_vote_up');
5068			if(!elements)
5069			{
5070				return false;
5071			}
5072			if(!elements[0])
5073			{
5074				return false;
5075			}
5076			if(!elements[0].getAttribute)
5077			{
5078				return false;
5079			}
5080			var old_value = elements[0].getAttribute('data-ts-value');
5081			if(!old_value)
5082			{
5083				return false;
5084			}
5085			var current_value = parseInt(elements[0].innerHTML);
5086			var new_value = parseInt(old_value) + 1;
5087			elements[0].innerHTML = new_value;
5088			var changed = (new_value != parseInt(current_value));
5089
5090			var elements = e.parentNode.getElementsByClassName('ts_vote_down');
5091			if(!elements)
5092			{
5093				return false;
5094			}
5095			if(!elements[0])
5096			{
5097				return false;
5098			}
5099			if(!elements[0].getAttribute)
5100			{
5101				return false;
5102			}
5103			var old_value = elements[0].getAttribute('data-ts-value');
5104			if(!old_value)
5105			{
5106				return false;
5107			}
5108			elements[0].innerHTML = parseInt(old_value);
5109
5110			var elements = e.parentNode.getElementsByClassName('ts_vote_message');
5111			if(!elements)
5112			{
5113				return true;
5114			}
5115			if(!elements[0])
5116			{
5117				return true;
5118			}
5119			if(!elements[0].getAttribute)
5120			{
5121				return true;
5122			}
5123
5124			elements[0].innerHTML = window.testseek.l10n(changed ? 'vote_sucess' : 'vote_only_once');
5125
5126			return true;
5127		}
5128
5129		if(window.testseek.verbose)
5130		{
5131			console.log(a);
5132		}
5133
5134		return false;
5135	}
5136
5137	window.testseek.send_vote('VID', id, '+', callback, element);
5138}
5139
5140window.testseek.video_vote_down = function(id, element)
5141{
5142	var callback = function(a, e) {
5143		if(a.ok)
5144		{
5145			var elements = e.parentNode.getElementsByClassName('ts_vote_down');
5146			if(!elements)
5147			{
5148				return false;
5149			}
5150			if(!elements[0])
5151			{
5152				return false;
5153			}
5154			if(!elements[0].getAttribute)
5155			{
5156				return false;
5157			}
5158			var old_value = elements[0].getAttribute('data-ts-value');
5159			if(!old_value)
5160			{
5161				return false;
5162			}
5163			var current_value = parseInt(elements[0].innerHTML);
5164			var new_value = parseInt(old_value) + 1;
5165			elements[0].innerHTML = new_value;
5166			var changed = (new_value != parseInt(current_value));
5167
5168			var elements = e.parentNode.getElementsByClassName('ts_vote_up');
5169			if(!elements)
5170			{
5171				return false;
5172			}
5173			if(!elements[0])
5174			{
5175				return false;
5176			}
5177			if(!elements[0].getAttribute)
5178			{
5179				return false;
5180			}
5181			var old_value = elements[0].getAttribute('data-ts-value');
5182			if(!old_value)
5183			{
5184				return false;
5185			}
5186			elements[0].innerHTML = parseInt(old_value);
5187
5188			var elements = e.parentNode.getElementsByClassName('ts_vote_message');
5189			if(!elements)
5190			{
5191				return true;
5192			}
5193			if(!elements[0])
5194			{
5195				return true;
5196			}
5197			if(!elements[0].getAttribute)
5198			{
5199				return true;
5200			}
5201
5202			elements[0].innerHTML = window.testseek.l10n(changed ? 'vote_sucess' : 'vote_only_once');
5203
5204			return true;
5205		}
5206
5207		if(window.testseek.verbose)
5208		{
5209			console.log(a);
5210		}
5211
5212		return false;
5213	}
5214
5215	window.testseek.send_vote('VID', id, '-', callback, element);
5216}
5217
5218window.testseek.refresh_video_voting = function(id, element) {
5219	var video = window.testseek.videos[id];
5220	if(video)
5221	{
5222		var up = element.getElementsByClassName('ts_vote_up');
5223		var down = element.getElementsByClassName('ts_vote_up');
5224		if(up[0])
5225		{
5226			up[0].setAttribute('data-ts-value', video.up_votes);
5227			up[0].innerHTML = 1 * video.up_votes;
5228		}
5229		if(dows[0])
5230		{
5231			down[0].setAttribute('data-ts-value', video.down_votes);
5232			down[0].innerHTML = 1 * video.down_votes;
5233		}
5234	}
5235}
5236/* End of video_vote.js */
5237
5238/* Start of l10n.21.js */
5239/**
5240 * Translations
5241 *
5242 * @param tr_key String translation key string
5243 *
5244 * @return String translation (this version: Proper English)
5245 */
5246
5247window.testseek.l10n = function(tr_key)
5248{
5249	// lookup the english key string
5250	switch(tr_key)
5251	{
5252		// video_types:
5253		case 'video_type_review':
5254			return "Review";
5255
5256		case 'video_type_unboxing':
5257			return "Unboxing";
5258
5259		case 'video_type_official':
5260			return "Ufficiale";
5261
5262		case 'video_type_guide':
5263			return "Guida";
5264
5265		case 'vote_sucess':
5266			return "Grazie! il tuo voto \u00e8 stato registrato";
5267
5268		case 'vote_only_once':
5269			return "Puoi votare solo una volta per ogni recensione";
5270
5271		// Unknown: types
5272		default:
5273			return tr_key;
5274	}
5275}/* End of l10n.21.js */
5276
5277	/* init */
5278	window.testseek.init();
5279	window.testseek.init_css(window.testseek.ts_domain);
5280	window.testseek.init_font();
5281
5282if (Array.prototype.first === undefined)
5283    Array.prototype.first = function (getValue, d = null) {
5284        const obj = this.find(() => true)
5285        if (obj)
5286            if (typeof getValue === 'function')
5287                return getValue(obj) || d
5288            else
5289                return obj
5290        else
5291            return d
5292    };
5293
5294if (Array.prototype.last === undefined)
5295    Array.prototype.last = function (getValue, d = null) {
5296        const obj = this[this.length - 1]
5297        if (obj) {
5298            if (typeof getValue === 'function')
5299                return getValue(obj) || d
5300            else
5301                return obj
5302        }
5303        else
5304            return d
5305    };
5306
5307if (Array.prototype.min === undefined)
5308    Array.prototype.min = function (getValue, d = 0) {
5309        const minValue = this.reduce((min, value) => Math.min(min, getValue ? getValue(value) : value), Number.MAX_SAFE_INTEGER)
5310        return minValue === Number.MAX_SAFE_INTEGER ? d : minValue
5311    };
5312
5313if (Array.prototype.max === undefined)
5314    Array.prototype.max = function (getValue, d = 0) {
5315        const maxValue = this.reduce((max, value) => Math.max(max, getValue ? getValue(value) : value), Number.MIN_SAFE_INTEGER)
5316        return maxValue === Number.MIN_SAFE_INTEGER ? d : maxValue
5317    };
5318
5319if (Array.prototype.sum === undefined)
5320    Array.prototype.sum = function (getValue) {
5321        return this.reduce((sum, value) => sum + (getValue ? getValue(value) : value), 0)
5322    };
5323
5324if (Array.prototype.group === undefined)
5325    Array.prototype.group = function (getKey) {
5326        return Object.values(this.reduce((map, item) => {
5327            const key = getKey(item)
5328            const collection = map[key]
5329            if (!collection)
5330                map[key] = { key, values: [item] }
5331            else
5332                collection.values.push(item)
5333            return map
5334        }, {}))
5335    };
5336
5337if (Array.prototype.flatten === undefined)
5338    Array.prototype.flatten = function () {
5339        return this.reduce((r, e) => (Array.isArray(e) ? (r = r.concat(e.flatten())) : r.push(e) && r), [])
5340    };
5341
5342if (Array.prototype.orderby === undefined) {
5343    const compare = function (valueA, valueB, collator) {
5344        if (valueA == null)
5345            valueA = null
5346        if (valueB == null)
5347            valueB = null
5348        if (typeof valueA === 'string' && typeof valueB === 'string')
5349            return collator.compare(valueA, valueB)
5350        if (valueA < valueB)
5351            return -1
5352        else if (valueA > valueB)
5353            return 1
5354        else
5355            return 0
5356    };
5357    Array.prototype.orderby = function () {
5358        const properties = [...arguments]
5359        const collator = new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' })
5360        return [...this].sort((a, b) => {
5361            if (!properties.length)
5362                return compare(a, b, collator)
5363            let result = 0
5364            for (let i = 0; i < properties.length; i++) {
5365                result = compare(properties[i](a), properties[i](b), collator)
5366                if (result !== 0)
5367                    return result
5368            }
5369            return result
5370        })
5371    };
5372}
5373
5374if (Array.prototype.toDictionary === undefined)
5375    Array.prototype.toDictionary = function (getKey, getValue = x => x) {
5376        return this.reduce((map, item) => {
5377            const key = getKey(item)
5378            if (!map[key])
5379                map[key] = getValue(item)
5380            return map
5381        }, {})
5382    };
5383
5384if (Array.prototype.any === undefined)
5385    Array.prototype.any = function (predicate = () => true) {
5386        if (!this.length)
5387            return false
5388        return !!this.filter(predicate).length
5389    };
5390
5391if (Array.prototype.all === undefined)
5392    Array.prototype.all = function (predicate = () => true) {
5393        if (!this.length)
5394            return false
5395        return this.filter(predicate).length === this.length
5396    };
5397
5398if (Array.prototype.distinct === undefined)
5399    Array.prototype.distinct = function () {
5400        return [...(new Set(this))]
5401    };
5402
5403(function (a) { var r = a.fn.domManip, d = "_tmplitem", q = /^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /, b = {}, f = {}, e, p = { key: 0, data: {} }, h = 0, c = 0, l = []; function g(e, d, g, i) { var c = { data: i || (d ? d.data : {}), _wrap: d ? d._wrap : null, tmpl: null, parent: d || null, nodes: [], calls: u, nest: w, wrap: x, html: v, update: t }; e && a.extend(c, e, { nodes: [], parent: d }); if (g) { c.tmpl = g; c._ctnt = c._ctnt || c.tmpl(a, c); c.key = ++h; (l.length ? f : b)[h] = c } return c } a.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function (f, d) { a.fn[f] = function (n) { var g = [], i = a(n), k, h, m, l, j = this.length === 1 && this[0].parentNode; e = b || {}; if (j && j.nodeType === 11 && j.childNodes.length === 1 && i.length === 1) { i[d](this[0]); g = this } else { for (h = 0, m = i.length; h < m; h++) { c = h; k = (h > 0 ? this.clone(true) : this).get(); a.fn[d].apply(a(i[h]), k); g = g.concat(k) } c = 0; g = this.pushStack(g, f, i.selector) } l = e; e = null; a.tmpl.complete(l); return g } }); a.fn.extend({ tmpl: function (d, c, b) { return a.tmpl(this[0], d, c, b) }, tmplItem: function () { return a.tmplItem(this[0]) }, template: function (b) { return a.template(b, this[0]) }, domManip: function (d, l, j) { if (d[0] && d[0].nodeType) { var f = a.makeArray(arguments), g = d.length, i = 0, h; while (i < g && !(h = a.data(d[i++], "tmplItem"))); if (g > 1) f[0] = [a.makeArray(d)]; if (h && c) f[2] = function (b) { a.tmpl.afterManip(this, b, j) }; r.apply(this, f) } else r.apply(this, arguments); c = 0; !e && a.tmpl.complete(b); return this } }); a.extend({ tmpl: function (d, h, e, c) { var j, k = !c; if (k) { c = p; d = a.template[d] || a.template(null, d); f = {} } else if (!d) { d = c.tmpl; b[c.key] = c; c.nodes = []; c.wrapped && n(c, c.wrapped); return a(i(c, null, c.tmpl(a, c))) } if (!d) return []; if (typeof h === "function") h = h.call(c || {}); e && e.wrapped && n(e, e.wrapped); j = a.isArray(h) ? a.map(h, function (a) { return a ? g(e, c, d, a) : null }) : [g(e, c, d, h)]; return k ? a(i(c, null, j)) : j }, tmplItem: function (b) { var c; if (b instanceof a) b = b[0]; while (b && b.nodeType === 1 && !(c = a.data(b, "tmplItem")) && (b = b.parentNode)); return c || p }, template: function (c, b) { if (b) { if (typeof b === "string") b = o(b); else if (b instanceof a) b = b[0] || {}; if (b.nodeType) b = a.data(b, "tmpl") || a.data(b, "tmpl", o(b.innerHTML)); return typeof c === "string" ? (a.template[c] = b) : b } return c ? typeof c !== "string" ? a.template(null, c) : a.template[c] || a.template(null, q.test(c) ? c : a(c)) : null }, encode: function (a) { return ("" + a).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;") } }); a.extend(a.tmpl, { tag: { tmpl: { _default: { $2: "null" }, open: "if($notnull_1){_=_.concat($item.nest($1,$2));}" }, wrap: { _default: { $2: "null" }, open: "$item.calls(_,$1,$2);_=[];", close: "call=$item.calls();_=call._.concat($item.wrap(call,_));" }, each: { _default: { $2: "$index, $value" }, open: "if($notnull_1){$.each($1a,function($2){with(this){", close: "}});}" }, "if": { open: "if(($notnull_1) && $1a){", close: "}" }, "else": { _default: { $1: "true" }, open: "}else if(($notnull_1) && $1a){" }, html: { open: "if($notnull_1){_.push($1a);}" }, "=": { _default: { $1: "$data" }
5403, open: "if($notnull_1){_.push($.encode($1a));}" }, "!": { open: "" } }, complete: function () { b = {} }, afterManip: function (f, b, d) { var e = b.nodeType === 11 ? a.makeArray(b.childNodes) : b.nodeType === 1 ? [b] : []; d.call(f, b); m(e); c++ } }); function i(e, g, f) { var b, c = f ? a.map(f, function (a) { return typeof a === "string" ? e.key ? a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g, "$1 " + d + '="' + e.key + '" $2') : a : i(a, e, a._ctnt) }) : e; if (g) return c; c = c.join(""); c.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/, function (f, c, e, d) { b = a(e).get(); m(b); if (c) b = j(c).concat(b); if (d) b = b.concat(j(d)) }); return b ? b : j(c) } function j(c) { var b = document.createElement("div"); b.innerHTML = c; return a.makeArray(b.childNodes) } function o(b) { return new Function("jQuery", "$item", "var $=jQuery,call,_=[],$data=$item.data;with($data){_.push('" + a.trim(b).replace(/([\\'])/g, "\\$1").replace(/[\r\t\n]/g, " ").replace(/\$\{([^\}]*)\}/g, "{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g, function (m, l, j, d, b, c, e) { var i = a.tmpl.tag[j], h, f, g; if (!i) throw "Template command not found: " + j; h = i._default || []; if (c && !/\w$/.test(b)) { b += c; c = "" } if (b) { b = k(b); e = e ? "," + k(e) + ")" : c ? ")" : ""; f = c ? b.indexOf(".") > -1 ? b + c : "(" + b + ").call($item" + e : b; g = c ? f : "(typeof(" + b + ")==='function'?(" + b + ").call($item):(" + b + "))" } else g = f = h.$1 || "null"; d = k(d); return "');" + i[l ? "close" : "open"].split("$notnull_1").join(b ? "typeof(" + b + ")!=='undefined' && (" + b + ")!=null" : "true").split("$1a").join(g).split("$1").join(f).split("$2").join(d ? d.replace(/\s*([^\(]+)\s*(\((.*?)\))?/g, function (d, c, b, a) { a = a ? "," + a + ")" : b ? ")" : ""; return a ? "(" + c + ").call($item" + a : d }) : h.$2 || "") + "_.push('" }) + "');}return _;") } function n(c, b) { c._wrap = i(c, true, a.isArray(b) ? b : [q.test(b) ? b : a(b).html()]).join("") } function k(a) { return a ? a.replace(/\\'/g, "'").replace(/\\\\/g, "\\") : null } function s(b) { var a = document.createElement("div"); a.appendChild(b.cloneNode(true)); return a.innerHTML } function m(o) { var n = "_" + c, k, j, l = {}, e, p, i; for (e = 0, p = o.length; e < p; e++) { if ((k = o[e]).nodeType !== 1) continue; j = k.getElementsByTagName("*"); for (i = j.length - 1; i >= 0; i--)m(j[i]); m(k) } function m(j) { var p, i = j, k, e, m; if (m = j.getAttribute(d)) { while (i.parentNode && (i = i.parentNode).nodeType === 1 && !(p = i.getAttribute(d))); if (p !== m) { i = i.parentNode ? i.nodeType === 11 ? 0 : i.getAttribute(d) || 0 : 0; if (!(e = b[m])) { e = f[m]; e = g(e, b[i] || f[i], null, true); e.key = ++h; b[h] = e } c && o(m) } j.removeAttribute(d) } else if (c && (e = a.data(j, "tmplItem"))) { o(e.key); b[e.key] = e; i = a.data(j.parentNode, "tmplItem"); i = i ? i.key : 0 } if (e) { k = e; while (k && k.key != i) { k.nodes.push(j); k = k.parent } delete e._ctnt; delete e._wrap; a.data(j, "tmplItem", e) } function o(a) { a = a + n; e = l[a] = l[a] || g(e, b[e.parent.key + n] || e.parent, null, true) } } } function u(a, d, c, b) { if (!a) return l.pop(); l.push({ _: a, tmpl: d, item: this, data: c, options: b }) } function w(d, c, b) { return a.tmpl(a.template(d), c, b, this) } function x(b, d) { var c = b.options || {}; c.wrapped = d; return a.tmpl(a.template(b.tmpl), b.data, c, b.item) } function v(d, c) { var b = this._wrap; return a.map(a(a.isArray(b) ? b.join("") : b).filter(d || "*"), function (a) { return c ? a.innerText || a.textContent : a.outerHTML || s(a) }) } function t() { var b = this.nodes; a.tmpl(null, null, null, this).insertBefore(b[0]); a(b).remove() } })(jQuery)
5404/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
5405 * https://jqueryvalidation.org/
5406 * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
5407!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!c.settings.submitHandler||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element
vendor: 12,864 bytes, line 5407
5407(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(null!=j&&(!j.form&&j.hasAttribute("contenteditable")&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){!this.form&&this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name"));var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=d),!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);if("function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f){if(j=f.call(b,j),"string"!=typeof j)throw new TypeError("The normalizer should return a string value.");delete g.normalizer}for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=".  Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){"string"==typeof c&&(c={method:c});var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.n
5407ame],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);
vendor: 4,085 bytes, line 5407
5407return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)}
5407,url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a});
5408// Unobtrusive validation support library for jQuery and jQuery Validate
5409// Copyright (C) Microsoft Corporation. All rights reserved.
5410// @version v3.2.10
5411!function(a){"function"==typeof define&&define.amd?define("jquery.validate.unobtrusive",["jquery-validation"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery-validation")):jQuery.validator.unobtrusive=a(jQuery)}(function(a){function e(a,e,n){a.rules[e]=n,a.message&&(a.messages[e]=a.message)}function n(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function t(a){return a.replace(/([!"#$%&'()*+,.\/:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function r(a){return a.substr(0,a.lastIndexOf(".")+1)}function i(a,e){return 0===a.indexOf("*.")&&(a=a.replace("*.",e)),a}function o(e,n){var r=a(this).find("[data-valmsg-for='"+t(n[0].name)+"']"),i=r.attr("data-valmsg-replace"),o=i?a.parseJSON(i)!==!1:null;r.removeClass("field-validation-valid").addClass("field-validation-error"),e.data("unobtrusiveContainer",r),o?(r.empty(),e.removeClass("input-validation-error").appendTo(r)):e.hide()}function d(e,n){var t=a(this).find("[data-valmsg-summary=true]"),r=t.find("ul");
5411r&&r.length&&n.errorList.length&&(r.empty(),t.addClass("validation-summary-errors").removeClass("validation-summary-valid"),a.each(n.errorList,function(){a("<li />").html(this.message).appendTo(r)}))}function s(e){var n=e.data("unobtrusiveContainer");if(n){var t=n.attr("data-valmsg-replace"),r=t?a.parseJSON(t):null;n.addClass("field-validation-valid").removeClass("field-validation-error"),e.removeData("unobtrusiveContainer"),r&&n.empty()}}function l(e){var n=a(this),t="__jquery_unobtrusive_validation_form_reset";if(!n.data(t)){n.data(t,!0);try{n.data("validator").resetForm()}finally{n.removeData(t)}n.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors"),n.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}}function u(e){var n=a(e),t=n.data(v),r=a.proxy(l,e),i=f.unobtrusive.options||{},u=function(n,t){var r=i[n];r&&a.isFunction(r)&&r.apply(e,t)};return t||(t={options:{errorClass:i.errorClass||"input-validation-error",errorElement:i.errorElement||"span",errorPlacement:function(){o.apply(e,arguments),u("errorPlacement",arguments)},invalidHandler:function(){d.apply(e,arguments),u("invalidHandler",arguments)},messages:{},rules:{},success:function(){s.apply(e,arguments),u("success",arguments)}},attachValidation:function(){n.off("reset."+v,r).on("reset."+v,r).validate(this.options)}
5411,validate:function(){return n.validate(),n.valid()}},n.data(v,t)),t}var m,f=a.validator,v="unobtrusiveValidation";return f.unobtrusive={adapters:[],parseElement:function(e,n){var t,r,i,o=a(e),d=o.parents("form")[0];d&&(t=u(d),t.options.rules[e.name]=r={},t.options.messages[e.name]=i={},a.each(this.adapters,function(){var n="data-val-"+this.name,t=o.attr(n),s={};void 0!==t&&(n+="-",a.each(this.params,function(){s[this]=o.attr(n+this)}),this.adapt({element:e,form:d,message:t,params:s,rules:r,messages:i}))}),a.extend(r,{__dummy__:!0}),n||t.attachValidation())},parse:function(e){var n=a(e),t=n.parents().addBack().filter("form").add(n.find("form")).has("[data-val=true]");n.find("[data-val=true]").each(function(){f.unobtrusive.parseElement(this,!0)}),t.each(function(){var a=u(this);a&&a.attachValidation()})}},m=f.unobtrusive.adapters,m.add=function(a,e,n){return n||(n=e,e=[]),this.push({name:a,params:e,adapt:n}),this},m.addBool=function(a,n){return this.add(a,function(t){e(t,n||a,!0)})},m.addMinMax=function(a,n,t,r,i,o){return this.add(a,[i||"min",o||"max"],function(a){var i=a.params.min,o=a.params.max;i&&o?e(a,r,[i,o]):i?e(a,n,i):o&&e(a,t,o)})},m.addSingleVal=function(a,n,t){return this.add(a,[n||"val"],function(r){e(r,t||a,r.params[n])})},f.addMethod("__dummy__",function(a,e,n){return!0}),f.addMethod("regex",function(a,e,n){var t;return!!this.optional(e)||(t=new RegExp(n).exec(a),t&&0===t.index&&t[0].length===a.length)}),f.addMethod("nonalphamin",function(a,e,n){var t;return n&&(t=a.match(/\W/g),t=t&&t.length>=n),t}),f.methods.extension?(m.addSingleVal("accept","mimtype"),m.addSingleVal("extension","extension")):m.addSingleVal("extension","extension","accept"),m.addSingleVal("regex","pattern"),m.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"),m.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range"),m.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength"),m.add("equalto",["other"],function(n){var o=r(n.element.name),d=n.params.other,s=i(d,o),l=a(n.form).find(":input").filter("[name='"+t(s)+"']")[0];e(n,"equalTo",l)}),m.add("required",function(a){"INPUT"===a.element.tagName.toUpperCase()&&"CHECKBOX"===a.element.type.toUpperCase()||e(a,"required",!0)}),m.add("remote",["url","type","additionalfields"],function(o){var d={url:o.params.url,type:o.params.type||"GET",data:{}},s=r(o.element.name);a.each(n(o.params.additionalfields||o.element.name),function(e,n){var r=i(n,s);d.data[r]=function(){var e=a(o.form).find(":input").filter("[name='"+t(r)+"']");return e.is(":checkbox")?e.filter(":checked").val()||e.filter(":hidden").val()||"":e.is(":radio")?e.filter(":checked").val()||"":e.val()}}),e(o,"remote",d)}),m.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&e(a,"minlength",a.params.min),a.params.nonalphamin&&e(a,"nonalphamin",a.params.nonalphamin),a.params.regex&&e(a,"regex",a.params.regex)}),m.add("fileextensions",["extensions"],function(a){e(a,"extension",a.params.extensions)}),a(function(){f.unobtrusive.parse(document)}),f.unobtrusive});
5412/*! jQuery UI - v1.12.1 - 2018-06-15
5413* http://jqueryui.com
5414* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/draggable.js, widgets/droppable.js, widgets/resizable.js, widgets/selectable.js, widgets/sortable.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/selectmenu.js, widgets/slider.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js
5415* Copyright jQuery Foundation and other contributors; Licensed MIT */
5416
5417(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function s(){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","Frid
5417ay","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},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isDisabledDatepicker(p.inline?p.dpDiv.parent()[0]:p.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var l=0,h=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},l=e.split(".")[0];e=e.split(".")[1];var h=l+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},n=t[l][e],o=t[l][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:l,widgetName:e,widgetFullName:h}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=h.call(arguments,1),o=0,a=n.length;a>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,a=h.call(arguments,1),r=this;return o?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(r=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,a),i!==o&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+n+"'")}):r=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),r}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=l++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t
vendor: 9,589 bytes, line 5417
5417(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType,o=!s&&!n;return{element:i,isWindow:s,isDocument:n,offset:o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return d.apply(this,arguments);n=t.extend({},n);var u,p,f,g,m,_,v=t(n.of),b=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(b),w=(n.collision||"flip").split(" "),k={};return _=s(v),v[0].preventDefault&&(n.at="left top"),p=_.width,f=_.height,g=_.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):l.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=l.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===n.at[0]?m.left+=p:"center"===n.at[0]&&(m.left+=p/2),"bottom"===n.at[1]?m.top+=f:"center"===n.at[1]&&(m.top+=f/2),u=e(k.at,p,f),m.left+=u[0],m.top+=u[1],this.each(function(){var s,r,l=t(this),h=l.outerWidth(),c=l.outerHeight(),d=i(this,"marginLeft"),_=i(this,"marginTop"),x=h+d+i(this,"marginRight")+y.width,C=c+_+i(this,"marginBottom")+y.height,D=t.extend({},m),T=e(k.my,l.outerWidth(),l.outerHeight());"right"===n.my[0]?D.left-=h:"center"===n.my[0]&&(D.left-=h/2),"bottom"===n.my[1]?D.top-=c:"center"===n.my[1]&&(D.top-=c/2),D.left+=T[0],D.top+=T[1],s={marginLeft:d,marginTop:_},t.each(["left","top"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:h,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[u[0]+T[0],u[1]+T[1]],my:n.my,at:n.at,within:b,elem:l})}),n.using&&(r=function(t){var e=g.left-D.left,i=e+p-h,s=g.top-D.top,r=s+f-c,u={target:{element:v,left:g.left,top:g.top,width:p,height:f},element:{element:l,left:D.left,top:D.top,width:h,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};h>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),l.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>
vendor: 8,475 bytes, line 5417
54170?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,s){var n,o,a,r,l,h=i.nodeName.toLowerCase();return"area"===h?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(h)?(r=!i.disabled,r&&(l=t(i).closest("fieldset")[0],l&&(r=!l.disabled))):r="a"===h?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var c=!1;t(document).on("mouseup",function(){c=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!c){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),c=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,c=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])}
vendor: 5,773 bytes, line 5417
5417,call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blurActiveElement(e),this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]),s=t(e.target);s.closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}
vendor: 4,537 bytes, lines 5417-5418
5417),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)
5418},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),l=t.pageX,h=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(h=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>
vendor: 4,136 bytes, line 5418
5418i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(l=this.originalPageX),"x"===a.axis&&(h=this.originalPageY)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}
vendor: 4,135 bytes, line 5418
5418),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&"HTML"!==a.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+a.offsetHeight-e.pageY<n.scrollSensitivity?a.scrollTop=o=a.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+a.offsetWidth-e.pageX<n.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(r).scrollTop()<n.scrollSensitivity?o=t(r).scrollTop(t(r).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<n.scrollSensitivity&&(o=t(r).scrollTop(t(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(r).scrollLeft()<n.scrollSensitivity?o=t(r).scrollLeft(t(r).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<n.scrollSensitivity&&(o=t(r).scrollLeft(t(r).scrollLeft()+n.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,o,a,r,l,h,c,u,d,p,f=s.options,g=f.snapTolerance,m=i.offset.left,_=m+s.helperProportions.width,v=i.offset.top,b=v+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--)l=s.snapElements[d].left-s.margins.left,h=l+s.snapElements[d].width,c=s.snapElements[d].top-s.margins.top,u=c+s.snapElements[d].height,l-g>_||m>h+g||c-g>b||v>u+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=g>=Math.abs(c-b),o=g>=Math.abs(u-v),a=g>=Math.abs(l-_),r=g>=Math.abs(h-m),n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left)),p=n||o||a||r,"outer"!==f.snapMode&&(n=g>=Math.abs(c-v),o=g>=Math.abs(u-b),a=g>=Math.abs(l-m),r=g>=Math.abs(h-_),n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(n=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",o
vendor: 19,567 bytes, line 5418
5418ptions:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],void 0):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&u(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var u=t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,s,n){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,r=o+e.helperProportions.width,l=a+e.helperProportions.height,h=i.offset.left,c=i.offset.top,u=h+i.proportions().width,d=c+i.proportions().height;switch(s){case"fit":return o>=h&&u>=r&&a>=c&&d>=l;case"intersect":return o+e.helperProportions.width/2>h&&u>r-e.helperProportions.width/2&&a+e.helperProportions.height/2>c&&d>l-e.helperProportions.height/2;case"pointer":return t(n.pageY,c,i.proportions().height)&&t(n.pageX,h,i.proportions().width);case"touch":return(a>=c&&d>=a||l>=c&&d>=l||c>a&&l>d)&&(o>=h&&u>=o||r>=h&&u>=r||h>o&&r>u);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&u(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=u(e,this,this.options.tolerance,i),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===n}),o.length&&(s=t(o[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},t.uiBackCompat!==!1&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),t.ui.droppable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<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.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",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(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".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=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("<div>"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,l=this._change[o];return this._updatePrevProperties(),l?(i=l.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,l,h=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,l=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,h.animate||this.element.css(t.extend(a,{top:l,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!h.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=r-e.minWidth),s&&h&&(t.left=r-e.maxWidth),a&&c&&(t.top=l-e.minHeight),n&&c&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,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}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,l={width:i.size.width-r,height:i.size.height-a},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(l,c&&h?{top:c,left:h}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,l=t(this).resizable("instance"),h=l.options,c=l.element,u=h.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(l.containerElement=t(d),/document/.test(u)||u===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}
vendor: 2,895 bytes, line 5418
5418):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=l._num(e.css("padding"+s))}),l.containerOffset=e.offset(),l.containerPosition=e.position(),l.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=l.containerOffset,n=l.containerSize.height,o=l.containerSize.width,a=l._hasScroll(d,"left")?d.scrollWidth:o,r=l._hasScroll(d)?d.scrollHeight:n,l.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,l=a.containerOffset,h=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=l),h.left<(a._helper?l.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-l.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?l.left:0),h.top<(a._helper?l.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-l.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?l.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-l.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-l.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),l=a.outerWidth()-e.sizeDiff.width,h=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:l,height:h}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:l,height:h})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left
vendor: 6,179 bytes, lines 5418-5419
5418:s.position.left-a.left||0};
5419t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,l="number"==typeof s.grid?[s.grid,s.grid]:s.grid,h=l[0]||1,c=l[1]||1,u=Math.round((n.width-o.width)/h)*h,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,g=s.maxWidth&&p>s.maxWidth,m=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=l,_&&(p+=h),v&&(f+=c),g&&(p-=h),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-h)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-h>0?(i.size.width=p,i.position.left=a.left-u):(p=h-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),s=i.offset(),n={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:n.left,top:n.top,right:n.left+i.outerWidth(),bottom:n.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),i._removeClass(n.$element,s?"ui-unselecting":"ui-selected")._addClass(n.$element,s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,l=e.pageY;return o>r&&(i=r,r=o,o=i),a>l&&(i=l,l=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:l-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),h=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===n.tolerance?h=!(c.left>r||o>c.right||c.top>l||a>c.bottom):"fit"===n.tolerance&&(h=c.left>o&&r>c.right&&c.top>a&&l>c.bottom),h?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1
vendor: 8,517 bytes, line 5419
5419}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),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},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.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(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),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"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].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(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,
vendor: 3,966 bytes, line 5419
5419l=r+t.height,h=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+h>r&&l>s+h,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&l>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),o=s&&n;return o?(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1)):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],l=[],h=this._connectWith();if(h&&e)for(s=h.length-1;s>=0;s--)for(o=t(h[s],this.document[0]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&l.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=l.length-1;s>=0;s--)l[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,l,h,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i],this.document[0]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,h=r.length;h>s;s++)l=t(r[s]),l.data(this.widgetName+"-item",a),c.push({item:l,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);
vendor: 1,142 bytes, line 5419
5419if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]);return e._addClass(n,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHe
vendor: 6,847 bytes, line 5419
5419ight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td>&#160;</td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,a,r,l,h,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,c=d.floating||this._isFloating(this.currentItem),a=c?"left":"top",r=c?"width":"height",u=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(l=this.items[s].item.offset()[a],h=!1,e[u]-l>this.items[s][r]/2&&(h=!0),n>Math.abs(e[u]-l)&&(n=Math.abs(e[u]-l),o=this.items[s],this.direction=h?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[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")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.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 e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(r[0].tagName);
vendor: 13,976 bytes, lines 5419-5420
5419return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].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,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> 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},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,s=this.options.icons;s&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+s.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,s.header)._addClass(i,null,s.activeHeader)._addClass(this.headers,"ui-accordion-icons"))
5420},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void 0)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),s=e.next(),n=s.uniqueId().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,s,n=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],l=r&&n.collapsible,h=l?t():a.next(),c=o.next(),u={oldHeader:o,oldPanel:c,newHeader:l?t():a,newPanel:h};e.preventDefault(),r&&!n.collapsible||this._trigger("beforeActivate",e,u)===!1||(n.active=l?!1:this.headers.index(a),this.active=r?t():a,this._toggle(u),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.activeHeader)._addClass(i,null,n.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),n.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeClass(s,null,n.icons.header)._addClass(s,null,n.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var s,n,o,a=this,r=0,l=t.css("box-sizing"),h=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},u=h&&c.down||c,d=function(){a._toggleComplete(i)};return"number"==typeof u&&(o=u),"string"==typeof u&&(n=u),n=n||u.easing||c.easing,o=o||u.duration||c.duration,e.length?t.length?(s=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(this.showProps,{duration:o,easing:n,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===l&&(r+=i.now):"content"!==a.options.heightStyle&&(i.now=Math.round(s-e.outerHeight()-r),r=0)}}),void 0):e.animate(this.hideProps,o,n,d):t.animate(this.showProps,o,n,d)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)}
vendor: 5,536 bytes, line 5420
5420)},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("<span>").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","fal
5420se")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}}),t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;
vendor: 7,911 bytes, line 5420
5420this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete;var 
vendor: 10,135 bytes, lines 5420-5421
5420d=/ui-corner-([a-z]){2,6}/g;t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(s,n){var o,a={};return n?"controlgroupLabel"===s?(o=e.element.find(n),o.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),i=i.concat(o.get()),void 0):(t.fn[s]&&(a=e["_"+s+"Options"]?e["_"+s+"Options"]("middle"):{classes:{}},e.element.find(n).each(function(){var n=t(this),o=n[s]("instance"),r=t.widget.extend({},a);if("button"!==s||!n.parent(".ui-spinner").length){o||(o=n[s]()[s]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),n[s](r);var l=n[s]("widget");t.data(l[0],"ui-controlgroup-data",o?o:n[s]("instance")),i.push(l[0])}})),void 0):void 0}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this),s=i.data("ui-controlgroup-data");s&&s[e]&&s[e]()})},_updateCornerClass:function(t,e){var i="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",s=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,i),this._addClass(t,null,s)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e?"auto":!1,classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var s={};return t.each(e,function(n){var o=i.options.classes[n]||"";o=t.trim(o.replace(d,"")),s[n]=(o+" "+e[n]).replace(/\s+/g," ")}),s},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?(this._callChildMethod(e?"disable":"enable"),void 0):(this.refresh(),void 0)},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,s){var n=e[s]().data("ui-controlgroup-data");if(n&&i["_"+n.widgetName+"Options"]){var o=i["_"+n.widgetName+"Options"](1===e.length?"only":s);o.classes=i._resolveClassesValues(o.classes,n),n.element[n.widgetName](o)}else i._updateCornerClass(e[s](),s)}),this._callChildMethod("refresh"))}}),t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,s=this,n=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){s.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(n.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(n.disabled=e),n},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,i=this.element[0].name,s="input[name='"+t.ui.escapeSelector(i)+"']";return i?(e=this.form.length?t(this.form[0].elements).filter(s):t(s).filter(function(){return 0===t(this).form().length}),e.not(this.element)):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){return"label"!==t||e?(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),this.element[0].disabled=e,void 0):(this.refresh(),void 0)):void 0},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)
5421},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio,t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),t=this.element[0].disabled,null!=t&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var s="iconPosition"!==e,n=s?this.options.iconPosition:i,o="top"===n||"bottom"===n;this.icon?s&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),s&&this._addClass(this.icon,null,i),this._attachIcon(n),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconS
vendor: 6,540 bytes, line 5421
5421pace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(n))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),t.uiBackCompat!==!1&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){return"text"===t?(this._super("showLabel",e),void 0):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments),void 0)}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),t.ui.button,t.extend(t.ui,{datepicker:{version:"1.12.1"}});var p;t.extend(s.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return a(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var s=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.on("focus",this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,o){var r,l,h,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>
5421"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),a(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(l=document.documentElement.clientWidth,h=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+c,h/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),p===n&&(p=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,o,r,l,h=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):h?"all"===i?t.extend({},h.settings):this._get(h,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),h&&(this._curInst===h&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(h,"min"),l=this._getMinMaxDate(h,"max"),a(h.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(h.settings.minDate=this._formatDate(h,r)),null!==l&&void 0!==n.dateFormat&&void 0===n.maxDate&&(h.settings.maxDate=this._formatDate(h,l)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),h),this._autoSize(h),this._setDate(h,o),this._updateAlternate(h),this._updateDatepicker(h)),void 0)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0}
vendor: 12,185 bytes, line 5421
5421,_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var s,n,o,r,l,h,c;s=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==s&&(t.datepicker._curInst.dpDiv.stop(!0,!0),s&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(s,"beforeShow"),o=n?n.apply(e,[e,s]):{},o!==!1&&(a(s.settings,o),s.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(s),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),l={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(s),l=t.datepicker._checkOffset(s,l,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),s.inline||(h=t.datepicker._get(s,"showAnim"),c=t.datepicker._get(s,"duration"),s.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?s.dpDiv.show(h,t.datepicker._get(s,"showOptions"),c):s.dpDiv[h||"show"](h?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s))}},_updateDatepicker:function(e){this.maxRows=4,p=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],a=17,r=e.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),h=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>l&&l>n?Math.abs(i.left+n-l):0),i.top-=Math.min(i.top,i.top+o>h&&h>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,o,a,r,l=0,h=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),a=i.substring(l).match(o);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},k=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];return i.substr(l,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],l+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},x=function(){if(i.charAt(l)!==e.charAt(n))throw"Unexpected literal at position "+l;l++};for(n=0;e.length>n;n++)if(b)"'"!==e.charAt(n)||y("'")?x():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":k("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=k("M",p,f);break;case"y":g=w("y");break;case"@":r=new Date(w("@")),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(i.length>l&&(a=i.substr(l),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),v>-1)for(m=1,_=v;;){if(o=this._getDaysInMonth(g,m-1),o>=_)break;m++,_-=o}if(r=this._daylightSavingAdjust(new Date(g,m-1,_)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},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:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},h=function(t,e,i){var s=""+e;if(l(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return l(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||l("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=h("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=h("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=h("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=l("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,h=l.exec(i);h;){switch(h[2]||"d"){case"d":case"D":r+=parseInt(h[1],10);break;case"w":case"W":r+=7*parseInt(h[1],10);break;case"m":case"M":a+=parseInt(h[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(h[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}h=l.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null}
vendor: 6,674 bytes, lines 5421-5422
5421,_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,l,h,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,T,I,M,P,S,N,H,z,A,O,E,W,F,L,R=new Date,Y=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),B=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),X=this._get(t,"stepMonths"),$=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),J=this._getMinMaxDate(t,"min"),Q=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),Q)for(e=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-U[0]*U[1]+1,Q.getDate())),e=J&&J>e?J:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-X,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+X,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:Y,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,l=t.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(t,"closeText")+"</button>",h=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(B?l:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(B?"":l)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,C=0;U[1]>C;C++){if(D=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),T=" ui-corner-all",I="",$){if(I+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:I+=" ui-datepicker-group-first",T=" ui-corner-"+(B?"right":"left");
5422break;case U[1]-1:I+=" ui-datepicker-group-last",T=" ui-corner-"+(B?"left":"right");break;default:I+=" ui-datepicker-group-middle",T=""}I+="'>"}for(I+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+T+"'>"+(/all|left/.test(T)&&0===k?B?o:s:"")+(/all|right/.test(T)&&0===k?B?s:o:"")+this._generateMonthYearHeader(t,Z,te,J,Q,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",M=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)P=(w+c)%7,M+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[P]+"'>"+p[P]+"</span></th>";for(I+=M+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),N=(this._getFirstDayOfMonth(te,Z)-c+7)%7,H=Math.ceil((N+S)/7),z=$?this.maxRows>H?this.maxRows:H:H,this.maxRows=z,A=this._daylightSavingAdjust(new Date(te,Z,1-N)),O=0;z>O;O++){for(I+="<tr>",E=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(A)+"</td>":"",w=0;7>w;w++)W=m?m.apply(t.input?t.input[0]:null,[A]):[!0,""],F=A.getMonth()!==Z,L=F&&!v||!W[0]||J&&J>A||Q&&A>Q,E+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(A.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===A.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+W[1]+(A.getTime()===G.getTime()?" "+this._currentClass:"")+(A.getTime()===Y.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!W[2]?"":" title='"+W[2].replace(/'/g,"&#39;")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+A.getMonth()+"' data-year='"+A.getFullYear()+"'")+">"+(F&&!_?"&#xa0;":L?"<span class='ui-state-default'>"+A.getDate()+"</span>":"<a class='ui-state-default"+(A.getTime()===Y.getTime()?" ui-state-highlight":"")+(A.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+A.getDate()+"</a>")+"</td>",A.setDate(A.getDate()+1),A=this._daylightSavingAdjust(A);I+=E+"</tr>"}Z++,Z>11&&(Z=0,te++),I+="</tbody></table>"+($?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=I}y+=x}return y+=h,t._keyEvent=!1,y}
vendor: 10,311 bytes, line 5422
5422,_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var l,h,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!l||c>=s.getMonth())&&(!h||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&_?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!_)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new s,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker,t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},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},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,n);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),s=!0),s&&!i&&this._trigger("focus",e),s},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]),i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),void 0;if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){n.trigger("focus")}),e.preventDefault()):(this._delay(function(){s.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prepe
vendor: 8,965 bytes, line 5422
5422ndTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this._removeClass(this.uiDialog,"ui-dialog-buttons"),void 0):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,o={icon:s.icon,iconPosition:s.iconPosition,showLabel:s.showLabel,icons:s.icons,text:s.text},delete s.click,delete s.icon,delete s.iconPosition,delete s.showLabel,delete s.icons,"boolean"==typeof s.text&&delete s.text,t("<button></button>",s).button(o).appendTo(e.uiButtonSet).on("click",function(){n.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){i._addClass(t(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){var a=o.offset.left-i.document.scrollLeft(),r=o.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" "+"top"+(r>=0?"+":"")+r,of:i.window},i._removeClass(t(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){i._addClass(t(this),"ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){var a=i.uiDialog.offset(),r=a.left-i.document.scrollLeft(),l=a.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(l>=0?"+":"")+l,of:i.window},i._removeClass(t(this),"ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,s=!1,n={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,i){var s,n,o=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&(s=o.is(":data(ui-draggable)"),s&&!i&&o.draggable("destroy"),!s&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(n=o.is(":data(ui-resizable)"),n&&!i&&o.resizable("destroy"),n&&"string"==typeof i&&o.resizable("option","handles",i),n||i===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),t.ui.dialog,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),void 0)},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")
vendor: 9,691 bytes, line 5422
5422}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,s=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(s).appendTo(this.button),this.options.width!==!1&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var s=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&s.index!==e.focusIndex&&(e._trigger("focus",t,{item:s}),e.isOpen||e._select(s,t)),e.focusIndex=s.index,e.button.attr("aria-activedescendant",e.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var s=this,n="";t.each(i,function(i,o){var a;o.optgroup!==n&&(a=t("<li>",{text:o.optgroup}),s._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),n=o.optgroup),s._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var s=t("<li>"),n=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(s,null,"ui-state-disabled"),this._setText(n,i.label),s.append(n).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),n+=":not(.ui-state-disabled)"),s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](n).eq(-1):i[t+"All"](n).eq(0),s.length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;return t===!1?(this.button.css("width",""),void 0):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t),void 0)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,s=[];e.each(function(e,n){s.push(i._parseOption(t(n),e))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1
vendor: 9,835 bytes, lines 5422-5423
5422},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)
5423},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,l,h,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),l=o.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.round((t-e)/i)*i;t=s+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](c,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),i=this._start(e,a),i===!1))return}switch(o=this.options.step,s=n=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,a,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))
vendor: 12,655 bytes, line 5423
5423}}}),t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);null!=n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var e=this.element[0]===t.ui.safeActiveElement(this.document[0]);e||(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,s,n;return"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,this.element.val(this._format(i)),void 0):(("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(s=this.buttons.first().find(".ui-icon"),this._removeClass(s,null,this.options.icons.up),this._addClass(s,null,e.up),n=this.buttons.last().find(".ui-icon"),this._removeClass(n,null,this.options.icons.down),this._addClass(n,null,e.down)),this._super(t,e),void 0)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:r(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null===t?!1:t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:r(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:r(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:r(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:r(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(r(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),t.uiBackCompat!==!1&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),t.ui.spinner,t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,s;i=e.href.replace(t,""),s=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return e.hash.length>1&&i===s}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){return t(n).attr("aria-controls")===s?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=i?!1:0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e),void 0)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,s){var n,o,a,r=t(s).uniqueId().attr("id"),
vendor: 593 bytes, line 5423
5423l=t(s).closest("li"),h=l.attr("aria-controls");e._isLocal(s)?(n=s.hash,a=n.substring(1),o=e.element.find(e._sanitizeSelector(n))):(a=l.attr("aria-controls")||t({}).uniqueId()[0].id,n="#"+a,o=e.element.find(n),o.length||(o=e._createPanel(a),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),h&&l.data("ui-tabs-aria-controls",h),l.attr({"aria-controls":a,"aria-labelledby":r}),o.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)
vendor: 7,933 bytes, line 5423
5423),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,s,n;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),n=0;s=this.tabs[n];n++)i=t(s),e===!0||-1!==t.inArray(n,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,e===!0)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,l=r?t():this._getPanelForTab(o),h=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:h,newTab:r?t():o,newPanel:l};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),h.length||l.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){o._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){o._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;i!==!1&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(i!==!0){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,n=this.tabs.eq(e),o=n.find(".ui-tabs-anchor"),a=this._getPanelForTab(n),r={tab:n,panel:a},l=function(t,e){"abort"===e&&s.panels.stop(!1,!0),s._removeClass(n,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,n){setTimeout(function(){a.html(t),s._trigger("load",i,r),l(n,e)},1)}).fail(function(t,e){setTimeout(function(){l(t,e)},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.uiBackCompat!==!1&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),t.ui.tabs,t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var s=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);return e.is("[title]")?e.data("ui-tooltip-title",e.attr("title")).removeAttr("title"):void 0}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}
vendor: 5,266 bytes, lines 5423-5424
5423),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s||s.nodeType||s.jquery?this._open(e,t,s):(i=s.call(t[0],function(i){n._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),i&&this._open(e,t,i),void 0)},_open:function(e,i,s){function n(t){h.of=t,a.is(":hidden")||a.position(h)}var o,a,r,l,h=t.extend({},this.options.position);if(s){if(o=this._find(i))return o.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),a=o.tooltip,this._addDescribedBy(i,a.attr("id")),a.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),l=t("<div>").html(a.find(".ui-tooltip-content").html()),l.removeAttr("name").find("[name]").removeAttr("name"),l.removeAttr("id").find("[id]").removeAttr("id"),l.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:n}),n(e)):a.position(t.extend({of:i},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){a.is(":visible")&&(n(h.of),clearInterval(r))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,i){var s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);return o?(i=o.tooltip,o.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]
5424}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),s=t("<div>").appendTo(i),n=i.uniqueId().attr("id");return this._addClass(s,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),t.uiBackCompat!==!1&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip;var f="ui-effects-",g="ui-effects-style",m="ui-effects-animated",_=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=h(),n=s._rgba=[];return i=i.toLowerCase(),f(l,function(t,o){var a,r=o.re.exec(i),l=r&&o.parse(r),h=o.space||"rgba";return l?(a=s[h](l),s[c[h].cache]=a[c[h].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"}
vendor: 4,539 bytes, line 5424
5424,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"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=h.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=t.extend(h.prototype,{parse:function(n,a,r,l){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,l],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof h?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=h(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=h(t),n=s._space(),o=c[n],a=0===this.alpha()?h("transparent"):this,r=a[o.cache]||o.to(a._rgba),l=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],h=s[o],c=u[n.type]||{};null!==h&&(null===a?l[o]=h:(c.mod&&(h-a>c.mod/2?a+=c.mod:a-h>c.mod/2&&(a-=c.mod)),l[o]=i((h-a)*e+a,n)))}),this[n](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(e)._rgba;return h(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),l=Math.min(s,n,o),h=r-l,c=r+l,u=.5*c;return e=l===r?0:s===r?60*(n-o)/h+360:n===r?60*(o-s)/h+120:60*(s-n)/h+240,i=0===h?0:.5>=u?h/c:h/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,l=n.to,c=n.from;h.fn[s]=function(s){if(l&&!this[a]&&(this[a]=l(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=h(c(d)),n[a]=d,n):h(d)},f(o,function(e,i){h.fn[e]||(h.fn[e]=function(n){var o,a=t.type(n),l="alpha"===e?this._hsla?"hsla":"rgba":s,h=this[l](),c=h[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),h[i.idx]=n,this[l](h)))})})}),h.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=h(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(l){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}}
vendor: 15,839 bytes, line 5424
5424,o=t.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"}}(_),function(){function e(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isNaN(parseFloat(o)))&&(a[s]=o));return a}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(_.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,a,r){var l=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",h=l.children?a.find("*").addBack():a;h=h.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(s,function(t,e){n[e]&&a[e+"Class"](n[e])})},o(),h=h.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",r),h=h.map(function(){var e=this,i=t.Deferred(),s=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,h.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,n,o,a){return"boolean"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),n=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=n.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(m)||e(i)}}(t.expr.filters.animated)),t.uiBackCompat!==!1&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;s>i;i++)null!==e[i]&&t.data(f+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;n>s;s++)null!==e[s]&&(i=t.data(f+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,n="vertical"!==i?(e||100)/100:1;return{height:t.height()*n,width:t.width()*s,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(g,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(g)||"",t.removeData(g)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),n=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),"float":e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(f+"placeholder",i)),e.css({position:s,left:n.left,top:n.top}),i},removePlaceholder:function(t){var e=f+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(m),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),a()}function a(){t.isFunction(l)&&l.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=c.shift(),t.uiBackCompat===!1||o?"none"===s.mode?(r[h](),a()):n.call(r[0],s,i):(r.is(":hidden")?"hide"===h:"show"===h)?(r[h](),a()):n.call(r[0],s,a)}var s=e.apply(this,arguments),n=t.effects.effect[s.effect],o=n.mode,a=s.queue,r=a||"fx",l=s.complete,h=s.mode,c=[],u=function(e){var i=t(this),s=t.effects.mode(i,h)||o;i.data(m,!0),c.push(s),o&&("show"===s||s===o&&"hide"===s)&&i.show(),o&&"none"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!n?h?this[h](s.duration,l):this.each(function(){l&&l.call(this)}):a===!1?this.each(u).each(i):this.queue(r,u).queue(r,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,l=o?a.scrollLeft():0,h=n.offset(),c={top:h.top-r,left:h.left-l,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-l,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}();var v=t.effects;t.effects.define("blind","hide",function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=t(this),o=e.direction||"up",a=n.cssClip(),r={clip:t.extend({},a)},l=t.effects.createPlaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],"show"===e.mode&&(n.cssClip(r.clip),l&&l.css(t.effects.clipToBox(r)),r.clip=a),l&&l.animate(t.effects.clipToBox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var s,n,o,a=t(this),r=e.mode,l="hide"===r,h="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(h||l?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",_="up"===c||"left"===c,v=0,b=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),h&&(n={opacity:1},n[m]=o,a.css("opacity",0).css(m,_?2*-u:2*u).animate(n,f,g)),l&&(u/=Math.pow(2,d-1)),n={},n[m]=o;d>v;v++)s={},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g).animate(n,f,g),u=l?2*u:u/2;l&&(s={opacity:0},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define("clip","hide",function(e,i){var s,n={},o=t(this),a=e.direction||"vertical",r="both"===a,l=r||"horizontal"===a,h=r||"vertical"===a;s=o.cssClip(),n.clip={top:h?(s.bottom-s.top)/2:s.top,right:l?(s.right-s.left)/2:s.right,bottom:h?(s.bottom-s.top)/2:s.bottom,left:l?(s.right-s.left)/2:s.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(n.clip),n.clip=s),o.animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var s,n=t(this),o=e.mode,a="show"===o,r=e.direction||"left",l="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r?"-=":"+=",c="+="===h?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(n),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,u[l]=h+s,a&&(n.css(u),u[l]=c+s,u.opacity=1),n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),i()}var o,a,r,l,h,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,g="show"===f,m=p.show().css("visibility","hidden").offset(),_=Math.ceil(p.outerWidth()/d),v=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(l=m.top+o*v,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*_,h=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*_,top:-o*v}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:_,height:v,left:r+(g?h*_:0),top:l+(g?c*v:0),opacity:g?0:1}).animate({left:r+(g?0:h*_),top:l+(g?0:c*v),opacity:g?1:0},e.duration||500,e.easing,s)}),t.effects.define("fade","toggle",function(e,i){var s="show"===e.mode;t(this).css("opacity",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=e.size||15,l=/([0-9]+)%/.exec(r),h=!!e.horizFirst,c=h?["right","bottom"]:["bottom","right"],u=e.duration/2,d=t.effects.createPlaceholder(s),p=s.cssClip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[c[0]],p[c[1]]],_=s.queue().length;l&&(r=parseInt(l[1],10)/100*m[a?0:1]),f.clip[c[0]]=r,g.clip[c[0]]=r,g.clip[c[1]]=0,o&&(s.cssClip(g.clip),d&&d.css(t.effects.clipToBox(g)),g.clip=p),s.queue(function(i){d&&d.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(g),u,e.easing),i()}).animate(f,u,e.easing).animate(g,u,e.easing).queue(i),t.effects.unshift(s,_,4)}),t.effects.define("highlight","show",function(e,i){var s=t(this),n={backgroundColor:s.css("backgroundColor")};"hide"===e.mode&&(n.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var s,n,o,a=t(this),r=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=a.css("position"),g=a.position(),m=t.effects.scaledDimensions(a),_=e.from||m,v=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===c&&(o=_,_=v,v=o),n={from:{y:_.height/m.height,x:_.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},("box"===d||"both"===d)&&(n.from.y!==n.to.y&&(_=t.effects.setTransition(a,l,n.from.y,_),v=t.effects.setTransition(a,l,n.to.y,v)),n.from.x!==n.to.x&&(_=t.effects.setTransition(a,h,n.from.x,_),v=t.effects.setTransition(a,h,n.to.x,v))),("content"===d||"both"===d)&&n.from.y!==n.to.y&&(_=t.effects.setTransition(a,r,n.from.y,_),v=t.effects.setTransition(a,r,n.to.y,v)),p&&(s=t.effects.getBaseline(p,m),_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left,v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left),a.css(_),("content"===d||"both"===d)&&(l=l.concat(["marginTop","marginBottom"]).concat(r),h=h.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),s=t.effects.scaledDimensions(i),o={height:s.height*n.from.y,width:s.width*n.from.x,outerHeight:s.outerHeight*n.from.y,outerWidth:s.outerWidth*n.from.x}
5424,a={height:s.height*n.to.y,width:s.width*n.to.x,outerHeight:s.height*n.to.y,outerWidth:s.width*n.to.x};n.from.y!==n.to.y&&(o=t.effects.setTransition(i,l,n.from.y,o),a=t.effects.setTransition(i,l,n.to.y,a)),n.from.x!==n.to.x&&(o=t.effects.setTransition(i,h,n.from.x,o),a=t.effects.setTransition(i,h,n.to.x,a)),u&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){u&&t.effects.restoreStyle(i)})})),a.animate(v,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===v.opacity&&a.css("opacity",_.opacity),u||(a.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var s=t(this),n=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==n?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)}),t.effects.define("pulsate","show",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=o||a,l=2*(e.times||5)+(r?1:0),h=e.duration/l,c=0,u=1,d=s.queue().length;for((o||!s.is(":visible"))&&(s.css("opacity",0).show(),c=1);l>u;u++)s.animate({opacity:c},h,e.easing),c=1-c;s.animate({opacity:c},h,e.easing),s.queue(i),t.effects.unshift(s,d,l+1)}),t.effects.define("shake",function(e,i){var s=1,n=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,l=2*r+1,h=Math.round(e.duration/l),c="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,d={},p={},f={},g=n.queue().length;for(t.effects.createPlaceholder(n),d[c]=(u?"-=":"+=")+a,p[c]=(u?"+=":"-=")+2*a,f[c]=(u?"-=":"+=")+2*a,n.animate(d,h,e.easing);r>s;s++)n.animate(p,h,e.easing).animate(f,h,e.easing);n.animate(p,h,e.easing).animate(d,h/2,e.easing).queue(i),t.effects.unshift(n,g,l+1)}),t.effects.define("slide","show",function(e,i){var s,n,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,u=e.distance||o["top"===h?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),s=o.cssClip(),n=o.position()[h],d[h]=(c?-1:1)*u+n,d.clip=o.cssClip(),d.clip[a[l][1]]=d.clip[a[l][0]],"show"===r&&(o.cssClip(d.clip),o.css(h,d[h]),d.clip=s,d[h]=n),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});var v;t.uiBackCompat!==!1&&(v=t.effects.define("transfer",function(e,i){t(this).transfer(e,i)}))});
5425/*! jQuery Migrate v3.0.1 | (c) jQuery Foundation and other contributors | jquery.org/license */
5426
5427void 0 === jQuery.migrateMute && (jQuery.migrateMute = !0), function(e) {
5428    "function" == typeof define && define.amd ? define([ "jquery" ], window, e) : "object" == typeof module && module.exports ? module.exports = e(require("jquery"), window) : e(jQuery, window);
5429}(function(e, t) {
5430    "use strict";
5431    function r(r) {
5432        var n = t.console;
5433        o[r] || (o[r] = !0, e.migrateWarnings.push(r), n && n.warn && !e.migrateMute && (n.warn("JQMIGRATE: " + r), 
5434        e.migrateTrace && n.trace && n.trace()));
5435    }
5436    function n(e, t, n, a) {
5437        Object.defineProperty(e, t, {
5438            configurable: !0,
5439            enumerable: !0,
5440            get: function() {
5441                return r(a), n;
5442            },
5443            set: function(e) {
5444                r(a), n = e;
5445            }
5446        });
5447    }
5448    function a(e, t, n, a) {
5449        e[t] = function() {
5450            return r(a), n.apply(this, arguments);
5451        };
5452    }
5453    e.migrateVersion = "3.0.1", function() {
5454        var r = /^[12]\./;
5455        t.console && t.console.log && (e && !r.test(e.fn.jquery) || t.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"), 
5456        e.migrateWarnings && t.console.log("JQMIGRATE: Migrate plugin loaded multiple times"), 
5457        t.console.log("JQMIGRATE: Migrate is installed" + (e.migrateMute ? "" : " with logging active") + ", version " + e.migrateVersion));
5458    }();
5459    var o = {};
5460    e.migrateWarnings = [], void 0 === e.migrateTrace && (e.migrateTrace = !0), e.migrateReset = function() {
5461        o = {}, e.migrateWarnings.length = 0;
5462    }, "BackCompat" === t.document.compatMode && r("jQuery is not compatible with Quirks Mode");
5463    var i = e.fn.init, s = e.isNumeric, u = e.find, c = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/, l = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;
5464    e.fn.init = function(e) {
5465        var t = Array.prototype.slice.call(arguments);
5466        return "string" == typeof e && "#" === e && (r("jQuery( '#' ) is not a valid selector"), 
5467        t[0] = []), i.apply(this, t);
5468    }, e.fn.init.prototype = e.fn, e.find = function(e) {
5469        var n = Array.prototype.slice.call(arguments);
5470        if ("string" == typeof e && c.test(e)) try {
5471            t.document.querySelector(e);
5472        } catch (a) {
5473            e = e.replace(l, function(e, t, r, n) {
5474                return "[" + t + r + '"' + n + '"]';
5475            });
5476            try {
5477                t.document.querySelector(e), r("Attribute selector with '#' must be quoted: " + n[0]), 
5478                n[0] = e;
5479            } catch (e) {
5480                r("Attribute selector with '#' was not fixed: " + n[0]);
5481            }
5482        }
5483        return u.apply(this, n);
5484    };
5485    var d;
5486    for (d in u) Object.prototype.hasOwnProperty.call(u, d) && (e.find[d] = u[d]);
5487    e.fn.size = function() {
5488        return r("jQuery.fn.size() is deprecated and removed; use the .length property"), 
5489        this.length;
5490    }, e.parseJSON = function() {
5491        return r("jQuery.parseJSON is deprecated; use JSON.parse"), JSON.parse.apply(null, arguments);
5492    }, e.isNumeric = function(t) {
5493        var n = s(t), a = function(t) {
5494            var r = t && t.toString();
5495            return !e.isArray(t) && r - parseFloat(r) + 1 >= 0;
5496        }(t);
5497        return n !== a && r("jQuery.isNumeric() should not be called on constructed objects"), 
5498        a;
5499    }, a(e, "holdReady", e.holdReady, "jQuery.holdReady is deprecated"), a(e, "unique", e.uniqueSort, "jQuery.unique is deprecated; use jQuery.uniqueSort"), 
5500    n(e.expr, "filters", e.expr.pseudos, "jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"), 
5501    n(e.expr, ":", e.expr.pseudos, "jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos");
5502    var p = e.ajax;
5503    e.ajax = function() {
5504        var e = p.apply(this, arguments);
5505        return e.promise && (a(e, "success", e.done, "jQXHR.success is deprecated and removed"), 
5506        a(e, "error", e.fail, "jQXHR.error is deprecated and removed"), a(e, "complete", e.always, "jQXHR.complete is deprecated and removed")), 
5507        e;
5508    };
5509    var f = e.fn.removeAttr, y = e.fn.toggleClass, m = /\S+/g;
5510    e.fn.removeAttr = function(t) {
5511        var n = this;
5512        return e.each(t.match(m), function(t, a) {
5513            e.expr.match.bool.test(a) && (r("jQuery.fn.removeAttr no longer sets boolean properties: " + a), 
5514            n.prop(a, !1));
5515        }), f.apply(this, arguments);
5516    }, e.fn.toggleClass = function(t) {
5517        return void 0 !== t && "boolean" != typeof t ? y.apply(this, arguments) : (r("jQuery.fn.toggleClass( boolean ) is deprecated"), 
5518        this.each(function() {
5519            var r = this.getAttribute && this.getAttribute("class") || "";
5520            r && e.data(this, "__className__", r), this.setAttribute && this.setAttribute("class", r || !1 === t ? "" : e.data(this, "__className__") || "");
5521        }));
5522    };
5523    var h = !1;
5524    e.swap && e.each([ "height", "width", "reliableMarginRight" ], function(t, r) {
5525        var n = e.cssHooks[r] && e.cssHooks[r].get;
5526        n && (e.cssHooks[r].get = function() {
5527            var e;
5528            return h = !0, e = n.apply(this, arguments), h = !1, e;
5529        });
5530    }), e.swap = function(e, t, n, a) {
5531        var o, i, s = {};
5532        h || r("jQuery.swap() is undocumented and deprecated");
5533        for (i in t) s[i] = e.style[i], e.style[i] = t[i];
5534        o = n.apply(e, a || []);
5535        for (i in t) e.style[i] = s[i];
5536        return o;
5537    };
5538    var g = e.data;
5539    e.data = function(t, n, a) {
5540        var o;
5541        if (n && "object" == typeof n && 2 === arguments.length) {
5542            o = e.hasData(t) && g.call(this, t);
5543            var i = {};
5544            for (var s in n) s !== e.camelCase(s) ? (r("jQuery.data() always sets/gets camelCased names: " + s), 
5545            o[s] = n[s]) : i[s] = n[s];
5546            return g.call(this, t, i), n;
5547        }
5548        return n && "string" == typeof n && n !== e.camelCase(n) && (o = e.hasData(t) && g.call(this, t)) && n in o ? (r("jQuery.data() always sets/gets camelCased names: " + n), 
5549        arguments.length > 2 && (o[n] = a), o[n]) : g.apply(this, arguments);
5550    };
5551    var v = e.Tween.prototype.run, j = function(e) {
5552        return e;
5553    };
5554    e.Tween.prototype.run = function() {
5555        e.easing[this.easing].length > 1 && (r("'jQuery.easing." + this.easing.toString() + "' should use only one argument"), 
5556        e.easing[this.easing] = j), v.apply(this, arguments);
5557    }, e.fx.interval = e.fx.interval || 13, t.requestAnimationFrame && n(e.fx, "interval", e.fx.interval, "jQuery.fx.interval is deprecated");
5558    var Q = e.fn.load, b = e.event.add, w = e.event.fix;
5559    e.event.props = [], e.event.fixHooks = {}, n(e.event.props, "concat", e.event.props.concat, "jQuery.event.props.concat() is deprecated and removed"), 
5560    e.event.fix = function(t) {
5561        var n, a = t.type, o = this.fixHooks[a], i = e.event.props;
5562        if (i.length) for (r("jQuery.event.props are deprecated and removed: " + i.join()); i.length; ) e.event.addProp(i.pop());
5563        if (o && !o._migrated_ && (o._migrated_ = !0, r("jQuery.event.fixHooks are deprecated and removed: " + a), 
5564        (i = o.props) && i.length)) for (;i.length; ) e.event.addProp(i.pop());
5565        return n = w.call(this, t), o && o.filter ? o.filter(n, t) : n;
5566    }, e.event.add = function(e, n) {
5567        return e === t && "load" === n && "complete" === t.document.readyState && r("jQuery(window).on('load'...) called after load event occurred"), 
5568        b.apply(this, arguments);
5569    }, e.each([ "load", "unload", "error" ], function(t, n) {
5570        e.fn[n] = function() {
5571            var e = Array.prototype.slice.call(arguments, 0);
5572            return "load" === n && "string" == typeof e[0] ? Q.apply(this, e) : (r("jQuery.fn." + n + "() is deprecated"), 
5573            e.splice(0, 0, n), arguments.length ? this.on.apply(this, e) : (this.triggerHandler.apply(this, e), 
5574            this));
5575        };
5576    }), 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) {
5577        e.fn[n] = function(e, t) {
5578            return r("jQuery.fn." + n + "() event shorthand is deprecated"), arguments.length > 0 ? this.on(n, null, e, t) : this.trigger(n);
5579        };
5580    }), e(function() {
5581        e(t.document).triggerHandler("ready");
5582    }), e.event.special.ready = {
5583        setup: function() {
5584            this === t.document && r("'ready' event is deprecated");
5585        }
5586    }, e.fn.extend({
5587        bind: function(e, t, n) {
5588            return r("jQuery.fn.bind() is deprecated"), this.on(e, null, t, n);
5589        },
5590        unbind: function(e, t) {
5591            return r("jQuery.fn.unbind() is deprecated"), this.off(e, null, t);
5592        },
5593        delegate: function(e, t, n, a) {
5594            return r("jQuery.fn.delegate() is deprecated"), this.on(t, e, n, a);
5595        },
5596        undelegate: function(e, t, n) {
5597            return r("jQuery.fn.undelegate() is deprecated"), 1 === arguments.length ? this.off(e, "**") : this.off(t, e || "**", n);
5598        },
5599        hover: function(e, t) {
5600            return r("jQuery.fn.hover() is deprecated"), this.on("mouseenter", e).on("mouseleave", t || e);
5601        }
5602    });
5603    var x = e.fn.offset;
5604    e.fn.offset = function() {
5605        var n, a = this[0], o = {
5606            top: 0,
5607            left: 0
5608        };
5609        return a && a.nodeType ? (n = (a.ownerDocument || t.document).documentElement, e.contains(n, a) ? x.apply(this, arguments) : (r("jQuery.fn.offset() requires an element connected to a document"), 
5610        o)) : (r("jQuery.fn.offset() requires a valid DOM element"), o);
5611    };
5612    var k = e.param;
5613    e.param = function(t, n) {
5614        var a = e.ajaxSettings && e.ajaxSettings.traditional;
5615        return void 0 === n && a && (r("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"), 
5616        n = a), k.call(this, t, n);
5617    };
5618    var A = e.fn.andSelf || e.fn.addBack;
5619    e.fn.andSelf = function() {
5620        return r("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"), 
5621        A.apply(this, arguments);
5622    };
5623    var S = e.Deferred, q = [ [ "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") ] ];
5624    return e.Deferred = function(t) {
5625        var n = S(), a = n.promise();
5626        return n.pipe = a.pipe = function() {
5627            var t = arguments;
5628            return r("deferred.pipe() is deprecated"), e.Deferred(function(r) {
5629                e.each(q, function(o, i) {
5630                    var s = e.isFunction(t[o]) && t[o];
5631                    n[i[1]](function() {
5632                        var t = s && s.apply(this, arguments);
5633                        t && e.isFunction(t.promise) ? t.promise().done(r.resolve).fail(r.reject).progress(r.notify) : r[i[0] + "With"](this === a ? r.promise() : this, s ? [ t ] : arguments);
5634                    });
5635                }), t = null;
5636            }).promise();
5637        }, t && t.call(n, n), n;
5638    }, e.Deferred.exceptionHook = S.exceptionHook, e;
5639});
5640//https://www.npmjs.com/package/array-reverse-polyfill
5641
5642;(function () {
5643    function buggy() {
5644        function detect() {
5645            var a = [0, 1];
5646            a.reverse();
5647            return a[0] === 0;
5648        }
5649
5650        return detect() || detect();
5651    }
5652
5653    if (!buggy()) return;
5654
5655    Array.prototype._reverse = Array.prototype.reverse;
5656
5657    Array.prototype.reverse = function reverse() {
5658        if (Array.isArray(this)) this.length = this.length;
5659        return Array.prototype._reverse.call(this);
5660    };
5661
5662    var nonenum = { enumerable: false };
5663
5664    Object.defineProperties(Array.prototype, {
5665        _reverse: nonenum,
5666        reverse: nonenum
5667    });
5668})();
5669/*
5670** nopCommerce custom js functions
5671*/
5672
5673
5674
5675function OpenWindow(query, w, h, scroll) {
5676    var l = (screen.width - w) / 2;
5677    var t = (screen.height - h) / 2;
5678
5679    winprops = 'resizable=0, height=' + h + ',width=' + w + ',top=' + t + ',left=' + l + 'w';
5680    if (scroll) winprops += ',scrollbars=1';
5681    var f = window.open(query, "_blank", winprops);
5682}
5683
5684function setLocation(url) {
5685    window.location.href = url;
5686}
5687
5688function displayAjaxLoading(display) {
5689    if (display) {
5690        $('.ajax-loading-block-window').show();
5691    }
5692    else {
5693        $('.ajax-loading-block-window').hide('slow');
5694    }
5695}
5696
5697function displayPopupNotification(message, messagetype, modal) {
5698    //types: success, error, warning
5699    var container;
5700    if (messagetype == 'success') {
5701        //success
5702        container = $('#dialog-notifications-success');
5703    }
5704    else if (messagetype == 'error') {
5705        //error
5706        container = $('#dialog-notifications-error');
5707    }
5708    else if (messagetype == 'warning') {
5709        //warning
5710        container = $('#dialog-notifications-warning');
5711    }
5712    else {
5713        //other
5714        container = $('#dialog-notifications-success');
5715    }
5716
5717    //we do not encode displayed message
5718    var htmlcode = '';
5719    if ((typeof message) == 'string') {
5720        htmlcode = '<p>' + message + '</p>';
5721    } else {
5722        for (var i = 0; i < message.length; i++) {
5723            htmlcode = htmlcode + '<p>' + message[i] + '</p>';
5724        }
5725    }
5726
5727    container.html(htmlcode);
5728
5729    var isModal = (modal ? true : false);
5730    container.dialog({
5731        modal: isModal,
5732        width: 350
5733    });
5734}
5735function displayJoinedPopupNotifications(notes) {
5736    if (Object.keys(notes).length === 0) return;
5737
5738    var container = $('#dialog-notifications-success');
5739    var htmlcode = document.createElement('div');
5740
5741    for (var note in notes) {
5742        if (notes.hasOwnProperty(note)) {
5743            var messages = notes[note];
5744
5745            for (var i = 0; i < messages.length; ++i) {
5746                var elem = document.createElement("div");
5747                elem.innerHTML = messages[i];
5748                elem.classList.add('popup-notification');
5749                elem.classList.add(note);
5750
5751                htmlcode.append(elem);
5752            }
5753        }
5754    }
5755
5756    container.html(htmlcode);
5757    container.dialog({
5758        width: 350,
5759        modal: true
5760    });
5761}
5762function displayPopupContentFromUrl(url, title, modal, width) {
5763    var isModal = (modal ? true : false);
5764    var targetWidth = (width ? width : 550);
5765    var maxHeight = $(window).height() - 20;
5766
5767    $('<div></div>').load(url)
5768        .dialog({
5769            modal: isModal,
5770            width: targetWidth,
5771            maxHeight: maxHeight,
5772            title: title,
5773            close: function(event, ui) {
5774                $(this).dialog('destroy').remove();
5775            }
5776        });
5777}
5778
5779function displayBarNotification(message, messagetype, timeout) {
5780
5781    $.notify(
5782        {
5783            icon: (messagetype == 'warning') ? 'glyphicon glyphicon-exclamation-sign' : (messagetype == 'error') ? 'glyphicon glyphicon-exclamation-sign' : 'glyphicon glyphicon-ok-sign',
5784            message: '<strong class="danger-caratteri">' + message + '</strong>'
5785        },
5786        {
5787            type: (messagetype == 'warning') ? 'warning' : (messagetype == 'error') ? 'danger' : 'success',
5788            placement: {
5789                align: 'left'
5790            }
5791        })                    
5792
5793    //var notificationTimeout;
5794
5795    //var messages = typeof message === 'string' ? [message] : message;
5796    //if (messages.length === 0)
5797    //    return;
5798
5799    ////types: success, error, warning
5800    //var cssclass = ['success', 'error', 'warning'].indexOf(messagetype) !== -1 ? messagetype : 'success';
5801
5802    ////remove previous CSS classes and notifications
5803    //$('#bar-notification')
5804    //  .removeClass('success')
5805    //  .removeClass('error')
5806    //  .removeClass('warning');
5807    //$('.bar-notification').remove();
5808
5809    ////add new notifications
5810    //var htmlcode = document.createElement('div');
5811    //htmlcode.classList.add('bar-notification', cssclass);
5812
5813    ////add close button for notification
5814    //var close = document.createElement('span');
5815    //close.classList.add('close');
5816    //close.setAttribute('title', document.getElementById('bar-notification').dataset.close);
5817
5818    //for (var i = 0; i < messages.length; i++) {
5819    //    var content = document.createElement('p');
5820    //    content.classList.add('content');
5821    //    content.innerHTML = messages[i];
5822
5823    //    htmlcode.append(content);
5824    //}
5825    
5826    //htmlcode.append(close);
5827
5828    //$('#bar-notification')
5829    //    .append(htmlcode);
5830
5831    //$(htmlcode)
5832    //    .fadeIn('slow')
5833    //    .on('mouseenter', function() {
5834    //        clearTimeout(notificationTimeout);
5835    //    });
5836
5837    ////callback for notification removing
5838    //var removeNoteItem = function () {
5839    //    htmlcode.remove();
5840    //};
5841
5842    //$(close).on('click', function () {
5843    //    $(htmlcode).fadeOut('slow', removeNoteItem);
5844    //});
5845
5846    ////timeout (if set)
5847    //if (timeout > 0) {
5848    //    notificationTimeout = setTimeout(function () {
5849    //        $(htmlcode).fadeOut('slow', removeNoteItem);
5850    //    }, timeout);
5851    //}
5852}
5853
5854function htmlEncode(value) {
5855    return $('<div/>').text(value).html();
5856}
5857
5858function htmlDecode(value) {
5859    return $('<div/>').html(value).text();
5860}
5861
5862
5863// CSRF (XSRF) security
5864function addAntiForgeryToken(data) {
5865    //if the object is undefined, create a new one.
5866    if (!data) {
5867        data = {};
5868    }
5869    //add token
5870    var tokenInput = $('input[name=__RequestVerificationToken]');
5871    if (tokenInput.length) {
5872        data.__RequestVerificationToken = tokenInput.val();
5873    }
5874    return data;
5875};
5876/*
5877** nopCommerce ajax cart implementation
5878*/
5879
5880
5881var AjaxCart = {
5882    loadWaiting: false,
5883    usepopupnotifications: false,
5884    topcartselector: '',
5885    topwishlistselector: '',
5886    flyoutcartselector: '',
5887
5888    init: function (usepopupnotifications, topcartselector, topwishlistselector, flyoutcartselector) {
5889        this.loadWaiting = false;
5890        this.usepopupnotifications = usepopupnotifications;
5891        this.topcartselector = topcartselector;
5892        this.topwishlistselector = topwishlistselector;
5893        this.flyoutcartselector = flyoutcartselector;
5894    },
5895
5896    setLoadWaiting: function (display) {
5897        displayAjaxLoading(display);
5898        this.loadWaiting = display;
5899    },
5900
5901    //add a product to the cart/wishlist from the catalog pages
5902    addproducttocart_catalog: function (urladd, async = true) {
5903        if (this.loadWaiting != false) {
5904            return;
5905        }
5906        this.setLoadWaiting(true);
5907
5908        $.ajax({
5909            cache: false,
5910            async: async,
5911            url: urladd,
5912            type: "POST",
5913            success: this.success_process,
5914            complete: this.resetLoadWaiting,
5915            error: this.ajaxFailure
5916        });
5917    },
5918
5919    //add a product to the cart/wishlist from the product details page
5920    addproducttocart_details: function (urladd, formselector, async = true) {
5921        if (this.loadWaiting != false) {
5922            return;
5923        }
5924        this.setLoadWaiting(true);
5925
5926        $.ajax({
5927            cache: false,
5928            async: async,
5929            url: urladd,
5930            data: $(formselector).serialize(),
5931            type: "POST",
5932            success: this.success_process,
5933            complete: this.resetLoadWaiting,
5934            error: this.ajaxFailure
5935        });
5936    },
5937
5938    //add a product to compare list
5939    addproducttocomparelist: function (urladd) {
5940        if (this.loadWaiting != false) {
5941            return;
5942        }
5943        this.setLoadWaiting(true);
5944
5945        $.ajax({
5946            cache: false,
5947            url: urladd,
5948            type: "POST",
5949            success: this.success_process,
5950            complete: this.resetLoadWaiting,
5951            error: this.ajaxFailure
5952        });
5953    },
5954
5955    success_process: function (response) {
5956        const productBase = $('.product-details-page').data('productid')
5957        const productAdded = response.productId
5958
5959        if (response.updatetopcartsectionhtml) {
5960            var sku = ''
5961            var settoreMetropolis = ''
5962            var famigliaMetropolis = ''
5963            var name = ''
5964            var brand = ''
5965            var category = ''
5966            var breadcrumb = []
5967            var prezzo = 0
5968            var qnt = 1
5969
5970            // Non registro l'evento di aggiunta al carrello dei prodotti associati
5971            if (productBase) {
5972                $.get('/frontend/GetSkuPriceById?id=' + productBase, function (data) {
5973                    sku = data.Item1
5974                    name = data.Item3
5975                    brand = data.Item4
5976                    category = data.Item5
5977                    breadcrumb = data.Item6
5978                    settoreMetropolis = data.Item7
5979                    famigliaMetropolis = data.Rest.Item1
5980                    prezzo = data.Item2
5981                    qnt = parseInt($('.add-to-cart-qty-wrapper .qty-input').val() || 1)
5982
5983                    if (typeof fbq !== "undefined") {
5984                        fbq('track', 'AddToCart', {
5985                            content_type: 'product',
5986                            content_ids: [sku]
5987                        });
5988                    }
5989                    if (typeof oaiq !== "undefined") {
5990                        // OpenAI vuole importi interi in centesimi
5991                        oaiq('measure', 'items_added', {
5992                            type: 'contents',
5993                            amount: Math.round(prezzo * 100) * qnt,
5994                            currency: 'EUR',
5995                            contents: [{ id: sku, name: name, content_type: 'product', quantity: qnt }]
5996                        });
5997                    }
5998                    if (typeof gtag !== "undefined") {
5999                        gtag('event', 'add_to_cart', {
6000                            'send_to': [
6001                                'AW-635734383'
6002                            ],
6003                            'value': prezzo,
6004                            'currency': 'EUR',
6005                            'items': [
6006                                {
6007                                    'id': sku,
6008                                    'name': name,
6009                                    'google_business_vertical': 'retail'
6010                                }]
6011                        });
6012
6013                        // The new Google Analytics 4 ecommerce implementation.
6014                        gtag('event', 'add_to_cart', {
6015                            'send_to': 'G-XPD3MPJT10',
6016                            'value': prezzo,
6017                            'currency': 'EUR',
6018                            'items': [
6019                                {
6020                                    'item_id': sku,
6021                                    'item_name': name,
6022                                    'item_brand': brand,
6023                                    'item_category': breadcrumb[0] ? breadcrumb[0].Name : "",
6024                                    'item_category2': breadcrumb[1] ? breadcrumb[1].Name : "",
6025                                    'item_category3': breadcrumb[2] ? breadcrumb[2].Name : "",
6026                                    'item_category4': settoreMetropolis,
6027                                    'item_category5': famigliaMetropolis,
6028                                    'item_price': prezzo,
6029                                    'price': prezzo,
6030                                    'quantity': qnt
6031                                }]
6032                        });
6033                    }
6034                })
6035            }
6036
6037            if (typeof oct8ne !== "undefined") {
6038                oct8ne.update("cart")
6039            }
6040
6041            $(AjaxCart.topcartselector).html(response.updatetopcartsectionhtml);
6042        }
6043        if (response.updatetopwishlistsectionhtml) {
6044            $.get('/frontend/GetSkuPriceById?id=' + productBase, function (data) {
6045                sku = data.Item1
6046                name = data.Item3
6047                brand = data.Item4
6048                category = data.Item5
6049                breadcrumb = data.Item6
6050                settoreMetropolis = data.Item7
6051                famigliaMetropolis = data.Rest.Item1
6052                prezzo = data.Item2
6053                qnt = 1
6054
6055                if (typeof gtag !== "undefined") {
6056                    gtag('event', 'add_to_wishlist', {
6057                        'send_to': 'G-XPD3MPJT10',
6058                        'value': prezzo,
6059                        'currency': 'EUR',
6060                        'items': [
6061                            {
6062                                'item_id': sku,
6063                                'item_name': name,
6064                                'item_brand': brand,
6065                                'item_category': breadcrumb[0] ? breadcrumb[0].Name : "",
6066                                'item_category2': breadcrumb[1] ? breadcrumb[1].Name : "",
6067                                'item_category3': breadcrumb[2] ? breadcrumb[2].Name : "",
6068                                'item_category4': settoreMetropolis,
6069                                'item_category5': famigliaMetropolis,
6070                                'item_price': prezzo,
6071                                'price': prezzo,
6072                                'quantity': qnt
6073                            }]
6074                    });
6075                }
6076            })
6077
6078            if (typeof fbq !== "undefined") {
6079                fbq('track', 'AddToWishlist');
6080            }
6081
6082            if (typeof oct8ne !== "undefined") {
6083                oct8ne.update("wishlist")
6084            }
6085
6086            $(AjaxCart.topwishlistselector).html(response.updatetopwishlistsectionhtml);
6087        }
6088        if (response.updateflyoutcartsectionhtml) {
6089            $(AjaxCart.flyoutcartselector).replaceWith(response.updateflyoutcartsectionhtml);
6090        }
6091        if (response.message) {
6092            //display notification
6093            if (response.success == true) {
6094                //success
6095                if (AjaxCart.usepopupnotifications == true) {
6096                    displayPopupNotification(response.message, 'success', true);
6097                }
6098                else {
6099                    //specify timeout for success messages
6100                    displayBarNotification(response.message, 'success', 3500);
6101                }
6102
6103                var $bannerOverviewEstendoChecked = $('.banner-overview-estendo .estendo .check input:checked')
6104                var $estendoSelected = $bannerOverviewEstendoChecked.first()
6105
6106                var $popUpEstendo = $('.popUpEstendo')
6107                var popUpEstendo = $popUpEstendo.attr('id')
6108
6109                if (response.updatetopcartsectionhtml && typeof MicroModal !== "undefined" &&
6110                    (($popUpEstendo.find('.estendo').length > 0 && $bannerOverviewEstendoChecked.length <= 0) ||
6111                        ($popUpEstendo.find('#estendo-cross-sell .c-product').length > 0)
6112                    )) {
6113                    $popUpEstendo.find('.btn-add-estensione').data('item', response.cartItemId)
6114                    $popUpEstendo.find('.btn-add-estensione').attr('data-item', response.cartItemId)
6115
6116                    if (!$popUpEstendo.is(':visible')) {
6117                        if (typeof setRightContentPopUpEstendo === "function") {
6118                            if ($popUpEstendo.find('.estendo').length > 0)
6119                                setRightContentPopUpEstendo('#popup-estendo-index', false, false)
6120                            else
6121                                setRightContentPopUpEstendo('#popup-estendo-altro', false, false)
6122                        }
6123
6124                        let $estendoVideo = $popUpEstendo.find('#estendo-video')
6125
6126                        MicroModal.show(popUpEstendo, {
6127                            onShow: function () {
6128                                if ($estendoVideo.length > 0)
6129                                    $estendoVideo[0].play()
6130                            },
6131                            onClose: function () {
6132                                if ($estendoVideo.length > 0)
6133                                    $estendoVideo[0].pause();
6134                                setTimeout(function () {
6135                                    $popUpEstendo.remove()
6136                                }, 500)
6137                            }
6138                        })
6139                    }
6140                }
6141
6142                if ($bannerOverviewEstendoChecked.length > 0 && productAdded == productBase) {
6143                    const cartItemId = response.cartItemId
6144                    const serviceId = $estendoSelected.data('associatedproductid')
6145                    const group = $estendoSelected.data('service-group')
6146                    const serviceType = $estendoSelected.data('service-type')
6147
6148                    const quantity = $('.add-to-cart-qty-wrapper .qty-input').val() || 1
6149                    const data = {
6150                        cartItemId,
6151                        serviceId,
6152                        group,
6153                        serviceType,
6154                        quantity
6155                    }
6156
6157                    if (serviceId && serviceId != 0 && cartItemId) {
6158                        $.ajax({
6159                            url: '/ShoppingCart/AddService',
6160                            data: data,
6161                            type: 'POST',
6162                            success: function () {
6163                                displayBarNotification('Estensione di garanzia aggiunta con successo', 'success', 3500)
6164
6165                                var sku = ''
6166                                var prezzo = 0
6167                                $.get('/frontend/GetSkuPriceById?id=' + serviceId, function (data) {
6168                                    sku = data.Item1
6169                                    prezzo = data.Item2
6170                                    if (typeof gtag !== "undefined") {
6171                                        gtag('event', 'Aggiunta estensione di garanzia da pop up', {
6172                                            'event_category': 'Processo di acquisto',
6173                                            'event_label': sku,
6174                                            'value': prezzo
6175                                        })
6176                                    }
6177
6178                                    let $popUpEstendoAltro = $popUpEstendo.find('.popup-estendo-altro')
6179
6180                                    if ($popUpEstendoAltro.length > 0) {
6181                                        if ($popUpEstendoAltro.find('.c-product').length <= 0) {
6182                                            $popUpEstendoAltro.remove()
6183                                        }
6184                                    }
6185                                    $popUpEstendoAltro = $popUpEstendo.find('.popup-estendo-altro')
6186
6187                                    if ($popUpEstendoAltro.length > 0) {
6188                                        const $container = $popUpEstendo.find('.modal__container')
6189                                        const $estendoIndex = $container.find('#popup-estendo-index')
6190                                        const $estendoDettagli = $container.find('.popup-estendo-dettagli')
6191
6192                                        const $addToCartAltro = $popUpEstendoAltro.find('input.add-to-cart-button')
6193
6194                                        $addToCartAltro.removeClass('added')
6195                                        $addToCartAltro.val('Aggiungi')
6196
6197                                        $estendoIndex.css('display', 'none')
6198                                        $estendoDettagli.css('display', 'none')
6199                                        $popUpEstendoAltro.css('display', 'flex')
6200                                        $popUpEstendoAltro.css('opacity', 1)
6201
6202                                        MicroModal.show(popUpEstendo, {
6203                                            onShow: function () {
6204                                                $popUpEstendo.find('#estendo-video')[0].play();
6205                                            },
6206                                            onClose: function () {
6207                                                $popUpEstendo.find('#estendo-video')[0].pause();
6208                                                setTimeout(function () {
6209                                                    $popUpEstendo.remove()
6210                                                }, 500)
6211                                            }
6212                                        })
6213                                    }
6214                                    else {
6215                                        window.location.href = '/cart'
6216                                    }
6217                                })
6218                            },
6219                            error: () => displayBarNotification('Errore aggiunta estensione di garanzia', 'error', 3500)
6220                        })
6221                    }
6222                }
6223            }
6224            else {
6225                //error
6226                if (AjaxCart.usepopupnotifications == true) {
6227                    displayPopupNotification(response.message, 'error', true);
6228                }
6229                else {
6230                    //no timeout for errors
6231                    displayBarNotification(response.message, 'error', 0);
6232                }
6233            }
6234            return false;
6235        }
6236        if (response.redirect) {
6237            location.href = response.redirect;
6238            return true;
6239        }
6240        return false;
6241    },
6242
6243    resetLoadWaiting: function () {
6244        AjaxCart.setLoadWaiting(false);
6245    },
6246
6247    ajaxFailure: function () {
6248        alert('Failed to add the product. Please refresh the page and try one more time.');
6249    }
6250};
6251/*
6252** nopCommerce country select js functions
6253*/
6254+function ($) {
6255    'use strict';
6256    if ('undefined' == typeof (jQuery)) {
6257        throw new Error('jQuery JS required');
6258    }
6259    function countrySelectHandler() {
6260        var $this = $(this);
6261        var selectedItem = $this.val();
6262        var stateProvince = $($this.data('stateprovince'));
6263        var loading = $($this.data('loading'));
6264        loading.show();
6265        $.ajax({
6266            cache: false,
6267            type: "GET",
6268            url: $this.data('url'),
6269            data: { 
6270              'countryId': selectedItem,
6271              'addSelectStateItem': "true" 
6272            },
6273            success: function (data, textStatus, jqXHR) {
6274                stateProvince.html('');
6275                $.each(data,
6276                    function (id, option) {
6277                        stateProvince.append($('<option></option>').val(option.id).html(option.name));
6278                    });
6279
6280                stateProvince.selectpicker('refresh');
6281                stateProvince.selectpicker('render');
6282            },
6283            error: function (jqXHR, textStatus, errorThrown) {
6284                alert('Failed to retrieve states.');
6285            },
6286            complete: function (jqXHR, textStatus) {
6287                loading.hide();
6288            }
6289        });
6290    }
6291    if ($(document).has('[data-trigger="country-select"]')) {
6292        $('select[data-trigger="country-select"]').change(countrySelectHandler);
6293    }
6294    $.fn.countrySelect = function () {
6295        this.each(function () {
6296            $(this).change(countrySelectHandler);
6297        });
6298    }
6299}(jQuery); 
6300;(function (b) { b.fn.swipeEvents = function () { return this.each(function () { function f(c) { var a = c.originalEvent.touches; a && a.length && (c = g - a[0].pageX, a = h - a[0].pageY, 50 <= c && (d = !1, e.trigger("swipeLeft")), -50 >= c && (d = !1, e.trigger("swipeRight")), 50 <= a && (d = !1, b("body").animate({ scrollTop: b(document).scrollTop() + 4.5 * a }, 500), e.trigger("swipeUp")), -50 >= a && (d = !1, b("body").animate({ scrollTop: b(document).scrollTop() + 4.5 * a }, 500), e.trigger("swipeDown")), 50 <= Math.abs(c) || 50 <= Math.abs(a)) && (d = !1, e.unbind("touchmove", f)) } var g, h, d = !1, e = b(this); e.bind("touchstart", function (c) { var a = c.originalEvent.touches; a && a.length && (g = a[0].pageX, h = a[0].pageY, e.bind("touchmove", f)); d = !0; setTimeout(function () { if (d) if ("nivo-prevNav" == b(c.target).attr("class")) b(".nivo-prevNav").trigger("click"); else if ("nivo-nextNav" == b(c.target).attr("class")) b(".nivo-nextNav").trigger("click"); else { var a = b(c.target).attr("href") || b(c.target).closest(".product-ribbon").attr("href") || b(c.target).closest(".item-picture .thumb-img").attr("href") || b(c.target).find(".item-picture").find(".thumb-img").attr("href"); void 0 != a && window.open(a, "_self") } }, 200); c.preventDefault() }) }) } })(jQuery);
6301!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.o
vendor: 3,442 bytes, line 6301
6301ptions.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.
6301slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:
6301parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"}
6301,e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0}
vendor: 5,619 bytes, line 6301
6301,100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};
6301!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}
6301):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+
6301o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
6301,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}});
6302
6303$(document).ready(function () {
6304    var a = $(".jCarouselMainWrapper");
6305    var prodottiScelti = false
6306    var bestsellersPerCategoria = false
6307    var prodottiCorrelati = false
6308
6309    0 !== a.length && a.each(function () {
6310        var i = $(this),
6311            e = $(this).find(".slick-carousel"),
6312            r = $(this).attr("id"),
6313            o = e.attr("data-numberOfVisibleItems");
6314        e.on("init", function () {
6315            $.event.trigger({
6316                type: "newProductsAddedToPageEvent"
6317            }), $(".carousel-title").show(), i.find(".loading-overlay").hide()
6318
6319            if ($('.home-page').length > 0 && $('.prodotti-scelti-per-te .item-grid.slick-initialized').length > 0 && !prodottiScelti) {
6320                prodottiScelti = true
6321                $.post('/frontend/GetRelatedViewedProducts', function (data) {
6322                    var prodottiSceltiPerTe = data.prodotti
6323
6324                    var elementiDaAggiungere = []
6325
6326                    $(prodottiSceltiPerTe).each(function (index, prodotto) {
6327
6328                        var scontoPercentuale = 0
6329                        if (prodotto.VecchioPrezzo > 0 && prodotto.VecchioPrezzo > prodotto.PrezzoAttuale) {
6330                            scontoPercentuale = Math.trunc((prodotto.VecchioPrezzo - prodotto.PrezzoAttuale) * 100 / prodotto.VecchioPrezzo)
6331                        }
6332
6333                        var scontoPercentualeAdvisedPrice = 0
6334                        if (prodotto.ListinoIndustria > 0 && prodotto.ListinoIndustria > prodotto.PrezzoAttuale) {
6335                            scontoPercentualeAdvisedPrice = Math.trunc((prodotto.ListinoIndustria - prodotto.PrezzoAttuale) * 100 / prodotto.ListinoIndustria)
6336                        }
6337
6338                        if (prodotto.Promozione && prodotto.Promozione.Dal)
6339                            prodotto.Promozione.Dal = $.datepicker.formatDate('dd/mm', new Date(prodotto.Promozione.Dal))
6340                        if (prodotto.Promozione && prodotto.Promozione.Al)
6341                            prodotto.Promozione.Al = $.datepicker.formatDate('dd/mm', new Date(prodotto.Promozione.Al))
6342
6343                        var template = $('#productBoxTemplate').tmpl({
6344                            Id: prodotto.Id,
6345                            SeName: prodotto.SeName,
6346                            Nome: prodotto.Nome,
6347                            Codice: prodotto.Codice,
6348							EAN: prodotto.EAN,
6349                            Descrizione: prodotto.Descrizione,
6350                            Categoria: prodotto.Categoria,
6351							NCapsule: prodotto.NCapsule,
6352							PrezzoCapsula: prodotto.PrezzoCapsula,
6353                            Produttore: prodotto.Produttore,
6354                            Immagine: encodeURI(prodotto.Immagine),
6355                            WebP: prodotto.WebP,
6356                            PrezzoAttuale: prodotto.PrezzoAttuale,
6357                            PrezzoAttualeUnits: prodotto.PrezzoAttualeUnits,
6358                            PrezzoAttualeDecimal: prodotto.PrezzoAttualeDecimal,
6359                            VecchioPrezzo: prodotto.VecchioPrezzo,
6360                            VecchioPrezzoTemplate: prodotto.VecchioPrezzoTemplate,
6361							CurrencySymbol: prodotto.CurrencySymbol,
6362                            ScontoPercentuale: scontoPercentuale,
6363                            DisableBuyButton: prodotto.DisableBuyButton,
6364                            DisableWishlistButton: prodotto.DisableWishlistButton,
6365                            Promozione: prodotto.Promozione,
6366							ManageInventoryMethodId: prodotto.ManageInventoryMethodId,
6367							ProductTypeId: prodotto.ProductTypeId,
6368                            StockQuantity: prodotto.StockQuantity,
6369                            EtichettaEnergetica: prodotto.EtichettaEnergetica,
6370                            AvailableForPreOrder: prodotto.AvailableForPreOrder,
6371                            ListinoIndustria: prodotto.ListinoIndustria,
6372                            ScontoPercentualeAdvisedPrice: scontoPercentuale > 5 || parseBool(prodotto.Sottocosto) ? scontoPercentualeAdvisedPrice : 0,
6373                            StyleAdvisedPrice: scontoPercentuale > 5 ? "style=color:gray;" : "",
6374							Availability: prodotto.Availability
6375                        })
6376
6377                        elementiDaAggiungere.push(template)
6378                    })
6379
6380                    $('.prodotti-scelti-per-te .item-grid').slick('slickAdd', elementiDaAggiungere)
6381
6382                    fixCenterMode(e)
6383
6384                    if (prodottiSceltiPerTe.length <= 0)
6385                        $('.prodotti-scelti-per-te').remove()
6386
6387                    $.event.trigger({
6388                        type: "newProductsAddedToPageEvent"
6389                    }), $(".carousel-title").show(), i.find(".loading-overlay").hide()
6390					
6391					if (window.testseek) {
6392						window.testseek.remove_listners();
6393						window.testseek.init();
6394					}
6395                })
6396            }
6397
6398            if ($('.bestsellers-category .item-grid.slick-initialized').length > 0 && !bestsellersPerCategoria) {
6399                bestsellersPerCategoria = true
6400                var idCategoria = $('.category-page').data('idcategoria')
6401
6402                var elementiDaAggiungere = []
6403
6404                $.post('/frontend/GetBestsellersProductsPerCategory', { idCat: idCategoria }, function (data) {
6405                    var prodottiBestsellersPerCategoria = data.prodotti
6406
6407                    $(prodottiBestsellersPerCategoria).each(function (index, prodotto) {
6408
6409                        var scontoPercentuale = 0
6410                        if (prodotto.VecchioPrezzo > 0 && prodotto.VecchioPrezzo > prodotto.PrezzoAttuale) {
6411                            scontoPercentuale = Math.trunc((prodotto.VecchioPrezzo - prodotto.PrezzoAttuale) * 100 / prodotto.VecchioPrezzo)
6412                        }
6413
6414                        var scontoPercentualeAdvisedPrice = 0
6415                        if (prodotto.ListinoIndustria > 0 && prodotto.ListinoIndustria > prodotto.PrezzoAttuale) {
6416                            scontoPercentualeAdvisedPrice = Math.trunc((prodotto.ListinoIndustria - prodotto.PrezzoAttuale) * 100 / prodotto.ListinoIndustria)
6417                        }
6418
6419                        if (prodotto.Promozione && prodotto.Promozione.Dal)
6420                            prodotto.Promozione.Dal = $.datepicker.formatDate('dd/mm', new Date(prodotto.Promozione.Dal))
6421                        if (prodotto.Promozione && prodotto.Promozione.Al)
6422                            prodotto.Promozione.Al = $.datepicker.formatDate('dd/mm', new Date(prodotto.Promozione.Al))
6423
6424                        var template = $('#productBoxTemplate').tmpl({
6425                            Id: prodotto.Id,
6426                            SeName: prodotto.SeName,
6427                            Nome: prodotto.Nome,
6428                            Codice: prodotto.Codice,
6429							EAN: prodotto.EAN,
6430                            Descrizione: prodotto.Descrizione,
6431                            Categoria: prodotto.Categoria,
6432							NCapsule: prodotto.NCapsule,
6433							PrezzoCapsula: prodotto.PrezzoCapsula,
6434                            Produttore: prodotto.Produttore,
6435                            Immagine: encodeURI(prodotto.Immagine),
6436                            WebP: prodotto.WebP,
6437                            PrezzoAttuale: prodotto.PrezzoAttuale,
6438                            PrezzoAttualeUnits: prodotto.PrezzoAttualeUnits,
6439                            PrezzoAttualeDecimal: prodotto.PrezzoAttualeDecimal,
6440                            VecchioPrezzo: prodotto.VecchioPrezzo,
6441                            VecchioPrezzoTemplate: prodotto.VecchioPrezzoTemplate,
6442                            CurrencySymbol: prodotto.CurrencySymbol,
6443                            ScontoPercentuale: scontoPercentuale,
6444                            DisableBuyButton: prodotto.DisableBuyButton,
6445                            DisableWishlistButton: prodotto.DisableWishlistButton,
6446                            Promozione: prodotto.Promozione,
6447							ManageInventoryMethodId: prodotto.ManageInventoryMethodId,
6448							ProductTypeId: prodotto.ProductTypeId,
6449                            StockQuantity: prodotto.StockQuantity,
6450                            EtichettaEnergetica: prodotto.EtichettaEnergetica,
6451                            AvailableForPreOrder: prodotto.AvailableForPreOrder,
6452                            ListinoIndustria: prodotto.ListinoIndustria,
6453                            ScontoPercentualeAdvisedPrice: scontoPercentuale > 5 || parseBool(prodotto.Sottocosto) ? scontoPercentualeAdvisedPrice : 0,
6454                            StyleAdvisedPrice: scontoPercentuale > 5 ? "style=color:gray;" : "",
6455							Availability: prodotto.Availability
6456                        })
6457
6458                        elementiDaAggiungere.push(template)
6459                    })
6460
6461                    $('.bestsellers-category .item-grid').slick('slickAdd', elementiDaAggiungere)
6462
6463                    fixCenterMode(e)
6464
6465                    if (prodottiBestsellersPerCategoria.length <= 0)
6466                        $('.bestsellers-category').remove()
6467
6468                    $.event.trigger({
6469                        type: "newProductsAddedToPageEvent"
6470                    }), $(".carousel-title").show(), i.find(".loading-overlay").hide()
6471					
6472					if (window.testseek) {
6473						window.testseek.remove_listners();
6474						window.testseek.init();
6475					}					
6476                })
6477            }
6478
6479            if ($('.product-details-page').length > 0 && $('.prodotti-correlati .item-grid.slick-initialized').length > 0 && !prodottiScelti) {
6480                prodottiCorrelati = true
6481                $.post('/frontend/GetRelatedProductsByProduct?idProdotto=' + $('.product-details-page').data('productid'), function (data) {
6482                    var prodottiCorrelati = data.prodotti
6483
6484                    var elementiDaAggiungere = []
6485
6486                    $(prodottiCorrelati).slice(0, 6).each(function (index, prodotto) {
6487
6488                        var scontoPercentuale = 0
6489                        if (prodotto.VecchioPrezzo > 0 && prodotto.VecchioPrezzo > prodotto.PrezzoAttuale) {
6490                            scontoPercentuale = Math.trunc((prodotto.VecchioPrezzo - prodotto.PrezzoAttuale) * 100 / prodotto.VecchioPrezzo)
6491                        }
6492
6493                        var scontoPercentualeAdvisedPrice = 0
6494                        if (prodotto.ListinoIndustria > 0 && prodotto.ListinoIndustria > prodotto.PrezzoAttuale) {
6495                            scontoPercentualeAdvisedPrice = Math.trunc((prodotto.ListinoIndustria - prodotto.PrezzoAttuale) * 100 / prodotto.ListinoIndustria)
6496                        }
6497
6498                        if (prodotto.Promozione && prodotto.Promozione.Dal)
6499                            prodotto.Promozione.Dal = $.datepicker.formatDate('dd/mm', new Date(prodotto.Promozione.Dal))
6500                        if (prodotto.Promozione && prodotto.Promozione.Al)
6501                            prodotto.Promozione.Al = $.datepicker.formatDate('dd/mm', new Date(prodotto.Promozione.Al))
6502
6503                        var template = $('#productBoxTemplate').tmpl({
6504                            Id: prodotto.Id,
6505                            SeName: prodotto.SeName,
6506                            Nome: prodotto.Nome,
6507                            Codice: prodotto.Codice,
6508							EAN: prodotto.EAN,
6509                            Descrizione: prodotto.Descrizione,
6510                            Categoria: prodotto.Categoria,
6511							NCapsule: prodotto.NCapsule,
6512							PrezzoCapsula: prodotto.PrezzoCapsula,
6513                            Produttore: prodotto.Produttore,
6514                            Immagine: encodeURI(prodotto.Immagine),
6515                            WebP: prodotto.WebP,
6516                            PrezzoAttuale: prodotto.PrezzoAttuale,
6517                            PrezzoAttualeUnits: prodotto.PrezzoAttualeUnits,
6518                            PrezzoAttualeDecimal: prodotto.PrezzoAttualeDecimal,
6519                            VecchioPrezzo: prodotto.VecchioPrezzo,
6520                            VecchioPrezzoTemplate: prodotto.VecchioPrezzoTemplate,
6521                            CurrencySymbol: prodotto.CurrencySymbol,
6522                            ScontoPercentuale: scontoPercentuale,
6523                            DisableBuyButton: prodotto.DisableBuyButton,
6524                            DisableWishlistButton: prodotto.DisableWishlistButton,
6525                            Promozione: prodotto.Promozione,
6526							ManageInventoryMethodId: prodotto.ManageInventoryMethodId,
6527							ProductTypeId: prodotto.ProductTypeId,
6528                            StockQuantity: prodotto.StockQuantity,
6529                            EtichettaEnergetica: prodotto.EtichettaEnergetica,
6530                            AvailableForPreOrder: prodotto.AvailableForPreOrder,
6531                            ListinoIndustria: prodotto.ListinoIndustria,
6532                            ScontoPercentualeAdvisedPrice: scontoPercentuale > 5 || parseBool(prodotto.Sottocosto) ? scontoPercentualeAdvisedPrice : 0,
6533                            StyleAdvisedPrice: scontoPercentuale > 5 ? "style=color:gray;" : "",
6534							Availability: prodotto.Availability
6535                        })    
6536
6537                        elementiDaAggiungere.push(template)					
6538                    })
6539
6540                    $('.prodotti-correlati .item-grid').slick('slickAdd', elementiDaAggiungere)
6541
6542                    fixCenterMode($('.prodotti-correlati .item-grid'))
6543
6544                    if (prodottiCorrelati.length <= 0)
6545                        $('.prodotti-correlati').remove()
6546
6547                    $.event.trigger({
6548                        type: "newProductsAddedToPageEvent"
6549                    }), $(".carousel-title").show(), i.find(".loading-overlay").hide()
6550					
6551					if (window.testseek) {
6552						window.testseek.remove_listners();
6553						window.testseek.init();
6554					}
6555                })
6556            }
6557        });
6558        $("#" + r + " img").each(function () {
6559            var a = $(this);
6560            a.attr("data-lazyloadsrc") && (a.attr("data-lazy", a.attr("data-lazyloadsrc")), a.removeAttr("data-lazyloadsrc"))
6561        });
6562        var n, s;
6563
6564        function a() {
6565            if (sevenSpikesCore.isInViewPort(i)) {
6566                if (!s) {
6567
6568                    e.slick({});
6569                    var a = e.slick("getSlick"),
6570                        t = a.slideCount;
6571                    o < t && a.options.arrows && $("#" + r + " .carousel-title").addClass("has-navigation"), s = !0
6572															
6573					e.on('afterChange', function(event, slick, direction){
6574						if (window.testseek) {
6575							window.testseek.remove_listners();
6576							window.testseek.init();
6577						}
6578					});
6579                }
6580                n.off("scroll." + r)
6581            }
6582        }
6583        n = $(window), s = !1, a(), n.on("scroll." + r, a)
6584    })
6585});
6586
6587$(window).on('resize', function () {
6588    $('.slick-carousel').each(function (index, carousel) {
6589        var $carousel = $(carousel)
6590        fixCenterMode($carousel)
6591    })
6592})
6593
6594function fixCenterMode($slickCarousel) {
6595    if ($slickCarousel.find('.carousel-item').length == 1) {
6596        $slickCarousel.slick('slickSetOption', 'centerMode', false)
6597    }
6598}
6599/*! jQuery JSON plugin 2.4.0 | code.google.com/p/jquery-json */
6600;(function($){'use strict';var escape=/["\\\x00-\x1f\x7f-\x9f]/g,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},hasOwn=Object.prototype.hasOwnProperty;$.toJSON=typeof JSON==='object'&&JSON.stringify?JSON.stringify:function(o){if
6600(o===null){return'null';}
6601var pairs,k,name,val,type=$.type(o);if(type==='undefined'){return undefined;}
6602if(type==='number'||type==='boolean'){return String(o);}
6603if(type==='string'){return $.quoteString(o);}
6604if(typeof o.toJSON==='function'){return $.toJSON(o.toJSON());}
6605if(type==='date'){var month=o.getUTCMonth()+1,day=o.getUTCDate(),year=o.getUTCFullYear(),hours=o.getUTCHours(),minutes=o.getUTCMinutes(),seconds=o.getUTCSeconds(),milli=o.getUTCMilliseconds();if(month<10){month='0'+month;}
6606if(day<10){day='0'+day;}
6607if(hours<10){hours='0'+hours;}
6608if(minutes<10){minutes='0'+minutes;}
6609if(seconds<10){seconds='0'+seconds;}
6610if(milli<100){milli='0'+milli;}
6611if(milli<10){milli='0'+milli;}
6612return'"'+year+'-'+month+'-'+day+'T'+
6613hours+':'+minutes+':'+seconds+'.'+milli+'Z"';}
6614pairs=[];if($.isArray(o)){for(k=0;k<o.length;k++){pairs.push($.toJSON(o[k])||'null');}
6615return'['+pairs.join(',')+']';}
6616if(typeof o==='object'){for(k in o){if(hasOwn.call(o,k)){type=typeof k;if(type==='number'){name='"'+k+'"';}else if(type==='string'){name=$.quoteString(k);}else{continue;}
6617type=typeof o[k];if(type!=='function'&&type!=='undefined'){val=$.toJSON(o[k]);pairs.push(name+':'+val);}}}
6618return'{'+pairs.join(',')+'}';}};$.evalJSON=typeof JSON==='object'&&JSON.parse?JSON.parse:function(str){return eval('('+str+')');};$.secureEvalJSON=typeof JSON==='object'&&JSON.parse?JSON.parse:function(str){var filtered=str.replace(/\\["\\\/bfnrtu]/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,'');if(/^[\],:{}\s]*$/.test(filtered)){return eval('('+str+')');}
6619throw new SyntaxError('Error parsing JSON, source is not valid.');};$.quoteString=function(str){if(str.match(escape)){return'"'+str.replace(escape,function(a){var c=meta[a];if(typeof c==='string'){return c;}
6620c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';}
6621return'"'+str+'"';};}(jQuery));
6622;(function ($, ssCore) {
6623
6624    var isMenuInitialized = false;
6625
6626    // needed for unsupported methods in some browsers i.e IE11
6627    (function () {
6628        // Compatibility fallback for "trim"
6629        if (typeof String.prototype.trim !== 'function') {
6630            String.prototype.trim = function () {
6631                return this.replace(/^\s+|\s+$/g, '');
6632            };
6633        }
6634
6635        // Compatibility fallback for "startsWith"
6636        if (typeof String.prototype.startsWith !== 'function') {
6637            String.prototype.startsWith = function (needle) {
6638                return this.indexOf(needle) === 0;
6639            };
6640        }
6641    })();
6642
6643    function isMobileDeviceInternal() {
6644        var isMobile = {
6645            Android: function () {
6646                return navigator.userAgent.match(/Android/i);
6647            },
6648            BlackBerry: function () {
6649                return navigator.userAgent.match(/BlackBerry/i);
6650            },
6651            iOS: function () {
6652                return navigator.userAgent.match(/iPhone|iPad|iPod/i);
6653            },
6654            Opera: function () {
6655                return navigator.userAgent.match(/Opera Mini/i);
6656            },
6657            Windows: function () {
6658                return navigator.userAgent.match(/IEMobile/i);
6659            },
6660            any: function () {
6661                return (this.Android() || this.BlackBerry() || this.iOS() || this.Opera() || this.Windows()) ? true : false;
6662            }
6663        };
6664
6665        return isMobile.any();
6666    }
6667
6668    ssCore.isInViewPort = function (element) {
6669
6670        var elementTop = $(element).offset().top;
6671        var elementBottom = elementTop + $(element).outerHeight();
6672
6673        var viewportTop = $(window).scrollTop();
6674        var viewportBottom = viewportTop + $(window).height();
6675
6676        var isElementInViewPort = elementBottom > viewportTop && elementTop < (viewportBottom + 100);
6677
6678        if (isElementInViewPort) {
6679
6680            return $(element).is(':visible');
6681        }
6682
6683        return isElementInViewPort;
6684    };
6685
6686    ssCore.loadImagesOnScroll = function () {
6687
6688        var windowObj = $(window);
6689
6690        var lazyLoadImages = function () {
6691
6692            $('img[data-lazyloadsrc]').not('[loadedimage]').each(function () {
6693
6694                var that = $(this);
6695
6696                /* 
6697                    * we do not lazy load images from JCarousel
6698                    * since they will be loaded by the slick slider 
6699                    */
6700                var isInJCarousel = that.parents()
6701                    .filter(function () {
6702
6703                        return $(this).hasClass('jCarouselMainWrapper');
6704                    }).length > 0;
6705
6706                if (isInJCarousel) {
6707
6708                    return;
6709                }
6710
6711                if (ssCore.isInViewPort(that)) {
6712                    that.attr('src', that.attr('data-lazyloadsrc'));
6713
6714                    that.attr('loadedimage', 'true');
6715                }
6716            });
6717        };
6718
6719        $(document).ready(function () {
6720
6721            lazyLoadImages();
6722
6723            windowObj.on('scroll.lazyLoadImages', lazyLoadImages);
6724        });
6725
6726        $(document).on('nopAjaxFiltersFiltrationCompleteEvent nopAjaxCartProductAddedToCartEvent nopQuickViewDataShownEvent newProductsAddedToPageEvent', lazyLoadImages);
6727    };
6728
6729    $.fn.extend({
6730        // custom select
6731        simpleSelect: function () {
6732            return this.each(function () {
6733                var that = $(this);
6734
6735                if (that.parent().hasClass('select-wrap')) {
6736                    return;
6737                }
6738
6739                that.wrap('<div class="select-wrap"></div>')
6740                    .after('<span class="select-box">' + '<span class="select-inner">' + that.find(':selected').text() + '</span>' + '</span>');
6741
6742                that.change(function () {
6743                    that.next().children('.select-inner').text(that.find(':selected').text());
6744                });
6745            });
6746        }
6747    });
6748
6749    // Properties
6750    ssCore.isRtl = $('#isRtlEnabled').val() === 'true';
6751    ssCore.isMobileDevice = isMobileDeviceInternal();
6752    ssCore.isMobile = isMobileDeviceInternal;
6753
6754    // Methods
6755    ssCore.AntiSpam = function (emailName, emailDomain) {
6756        window.location.href = 'mailto:' + emailName + '@' + emailDomain;
6757    };
6758
6759    ssCore.getAttrValFromDom = function (elementSelector, elementAttribute, defaultValue) {
6760        var value = $(elementSelector).attr(elementAttribute);
6761
6762        if (value == undefined || value === '') {
6763            //if (window.console) {
6764            //    console.log('"' + elementAttribute + '" was not found.');
6765            //}
6766
6767            if (defaultValue != undefined) {
6768                value = defaultValue;
6769            } else {
6770                value = '';
6771            }
6772        }
6773
6774        return value;
6775    };
6776
6777    ssCore.getHiddenValFromDom = function (elementSelector, defaultValue) {
6778        var value = $(elementSelector).val();
6779
6780        if (value == undefined || value === '') {
6781            if (defaultValue != undefined) {
6782                value = defaultValue;
6783            } else {
6784                value = '';
6785            }
6786        }
6787
6788        return value;
6789    };
6790
6791    ssCore.getUrlVar = function (name) {
6792        var vars = [], hash;
6793        var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
6794
6795        for (var i = 0; i < hashes.length; i++) {
6796            hash = hashes[i].split('=');
6797            vars.push(hash[0]);
6798            vars[hash[0]] = hash[1];
6799
6800            if (name != null && hash[0] === name) {
6801                return hash[1];
6802            }
6803        }
6804
6805        if (name != null) {
6806            return null;
6807        }
6808
6809        return vars;
6810    };
6811
6812    ssCore.getViewPort = function () {
6813        var e = window, a = 'inner';
6814        if (!('innerWidth' in window)) {
6815            a = 'client';
6816            e = document.documentElement || document.body;
6817        }
6818
6819        var result = { width: e[a + 'Width'], height: e[a + 'Height'] };
6820
6821        return result;
6822    };
6823
6824    ssCore.prepareTopMenu = function () {
6825        var menuListItems = '.mega-menu li, .top-menu li';
6826
6827        if (isMenuInitialized) {
6828            $('.menu-title').off('click.ssCore');
6829            $('.plus-button').off('click.ssCore');
6830            $(menuListItems).off('mouseenter.ssCore mouseleave.ssCore');
6831
6832            $('.top-menu').removeAttr('style');
6833            $('.sublist-wrap.active').removeClass('active');
6834            $('.plus-button.close').removeClass('close');
6835            $('.menu-title.close').removeClass('close');
6836        }
6837
6838        isMenuInitialized = true;
6839
6840        var breakPointWidth = window.themeSettings && window.themeSettings['themeBreakpoint'] || 980;
6841        var isAccordionMenu = window.themeSettings && window.themeSettings['isAccordionMenu'] || false;
6842
6843        var viewportWidth = ssCore.getViewPort().width;
6844
6845        $('.menu-title').on('click.ssCore', function () {
6846
6847            $(this).toggleClass('close', !$(this).hasClass('close'));
6848
6849            $(this).siblings('.top-menu, .mega-menu-responsive').slideToggle('fast', function () {
6850                $(this).css('overflow', '');
6851            });
6852
6853            if (!isAccordionMenu) {
6854                //adds the PERFECT SCROLL to the whole mobile menu
6855                $('.header-menu, .sublist-wrap').perfectScrollbar({
6856                    swipePropagation: false,
6857                    wheelSpeed: 1,
6858                    suppressScrollX: true
6859                });
6860            }
6861        });
6862
6863        $('.plus-button').on('click.ssCore', function (e) {
6864            e.stopPropagation();
6865
6866            var thisPlusButton = $(this);
6867
6868            thisPlusButton.toggleClass('close', !thisPlusButton.hasClass('close'));
6869
6870            var sublist = thisPlusButton.siblings('.sublist-wrap');
6871
6872            if (sublist.hasClass('active')) {
6873
6874                sublist.removeClass('active');
6875            } else {
6876                if (!isAccordionMenu) {
6877
6878                    thisPlusButton.parents().eq(2).animate({ scrollTop: 0 }, 180, function () {
6879                        sublist.addClass('active');
6880                    });
6881                } else {
6882                    sublist.addClass('active');
6883                }
6884            }
6885
6886            if (!isAccordionMenu) {
6887                //removes the PERFECT SCROLL when opening inner level and add again when closing it
6888                thisPlusButton.parents().eq(2).perfectScrollbar('destroy');
6889            }
6890        });
6891
6892        if (viewportWidth > breakPointWidth) {
6893
6894            $('.sublist-wrap.active').removeClass('active');
6895            $('.plus-button.close').removeClass('close');
6896
6897            $(menuListItems).each(function () {
6898
6899                var menuElement = $(this).parents('ul').last();
6900                var showDropdownsOnClick = menuElement.attr('data-enableClickForDropDown') === 'true';
6901
6902                if (!showDropdownsOnClick) {
6903                    var mouseEnterTimeout, mouseLeaveTimeout;
6904
6905                    $(this).on('mouseenter.ssCore', function () {
6906                        var that = $(this);
6907                        clearTimeout(mouseLeaveTimeout);
6908                        mouseEnterTimeout = setTimeout(function () {
6909                            $('a', that).first().addClass('hover');
6910                            $('.sublist-wrap, .dropdown', that).first().addClass('active');
6911                        }, 180);
6912                    }
6912).on('mouseleave.ssCore', function () {
6913                        var that = $(this);
6914                        clearTimeout(mouseEnterTimeout);
6915                        mouseLeaveTimeout = setTimeout(function () {
6916                            $('a', that).first().removeClass('hover');
6917                            $('.sublist-wrap, .dropdown', that).first().removeClass('active');
6918                        }, 180);
6919                    });
6920                }
6921            });
6922        } else {
6923
6924            $(menuListItems).off('mouseenter.ssCore mouseleave.ssCore');
6925            $('.sublist-wrap.active').removeClass('active');
6926            $('.plus-button.close').removeClass('close');
6927        }
6928    };
6929
6930    ssCore.loadImagesOnScroll();
6931})(jQuery, window.sevenSpikesCore = window.sevenSpikesCore || {});
6932!function(t,r,o){function e(){var t=o.getAttrValFromDom(i,"data-productPagePicturesParentContainerSelector"),e=[],a={},d=o.getAttrValFromDom(i,"data-productId");if(d&&d>0&&t){var n=r(t).find(".product-ribbon");n&&0!==n.length||(a.productId=d,a.productElement=r(t))}return r(c).each(function(){var t=r(this).find(".product-ribbon");if(!t||0===t.length){var o=r(this).attr("data-productid");if(o&&o>0){var a={productId:o,productElement:r(this)};e.push(a)}}}),{productPage:a,categoryPageProducts:e}}function a(t,e,a){var d;if(e.productElement){if(a){if(!(d=o.getAttrValFromDom(i,"data-productPageBugPictureContainerSelector")))return}else if(!(d=o.getAttrValFromDom(i,"data-productBoxPictureContainerSelector")))return;var n=e.productElement.find(d);if(n.parent().hasClass(u))return;if(n&&e.productId&&e.productId>0){var c,p=e.productId;(c=a?r(t).filter("div[data-productId='"+p+"']"):r(t).filter("a[data-productId='"+p+"']"))&&c.length>0&&(n.wrap('<div class="'+u+'"></div>'),n.after(c))}}}function d(t,r){if(r&&r.productPage&&r.productPage.productId&&a(t,r.productPage,!0),r&&r.categoryPageProducts&&r.categoryPageProducts.length>0)for(var o=0;o<r.categoryPageProducts.length;o++)a(t,r.categoryPageProducts[o])}function n(){return o.getAttrValFromDom("#product-ribbon-info","data-retrieveproductribbonsurl")}var c,u="ribbon-wrapper",i="#product-ribbon-info";t.showRibbons=function(){var t=0,o=[],a=e();if(a&&a.productPage&&a.productPage.productId&&(t=a.productPage.productId),a&&a.categoryPageProducts&&a.categoryPageProducts.length>0)for(var c=0;c<a.categoryPageProducts.length;c++){var u=a.categoryPageProducts[c];u.hasOwnProperty("productId")&&o.push(u.productId)}if(t||0!==o.length){r.isNumeric(t)||(t=0);var i={productPageId:t,categoryPageIds:o},p=n();r.ajax({type:"POST",data:r.toJSON(i),contentType:"application/json; charset=utf-8",url:p}).done(function(t){t&&(d(t,a),r.event.trigger({type:"nopProductRibbonsLoadingCompleteEvent"}))})}},r(document).ready(function(){(c=o.getAttrValFromDom(i,"data-productBoxSelector"))&&t.showRibbons()}),r(document).on("nopAjaxFiltersFiltrationCompleteEvent newProductsAddedToPageEvent",nopProductRibbons.showRibbons)}(window.nopProductRibbons=window.nopProductRibbons||{},jQuery,sevenSpikesCore);
6933!function (i, e) { i(document).ready(function () { i(".mega-menu").each(function () { !function (n) { var e = "click.megaMenuEvent", o = "click.megaMenuDocumentEvent"; if (n.one("mouseover", function () { n.find("img.lazy").each(function () { var n = i(this); n.attr("src", n.attr("data-original")) }) }), "true" === n.attr("data-enableClickForDropDown")) { var t = n.children("li").children(".dropdown, .sublist-wrap"); t.siblings("a").on("click", function (n) { n.preventDefault() }), t.click(function (n) { n.stopPropagation() }), n.children("li").off(e).on(e, function (n) { n.stopPropagation(); var e = i(this).children(".dropdown, .sublist-wrap"); t.not(e).removeClass("active"), e.toggleClass("active") }), i(document).off(o).on(o, function () { t.removeClass("active") }) } }(i(this)) }), i(".mega-menu-responsive .labelfornextplusbutton").on("click", function () { i(this).next(".plus-button").click() }), e.prepareTopMenu() }), i(document).on("themeBreakpointPassed7Spikes", function (n) { n.isInitialLoad || e.prepareTopMenu() }) }(jQuery, sevenSpikesCore);
6934
6935//$(document).on('click', '.header-menu a[data-href]', function () {
6936//	location.href = $(this).data('href')
6937//})
6938//$(document).on("mousedown", ".header-menu a[data-href]", function (e) {
6939//    if (e && (e.which == 2 || e.button == 4)) {
6940//        window.open($(this).data('href'))
6941//    }
6942//})
6943!function(doc,win){if("function"!=typeof doc.createEvent)return;
vendor: 4,304 bytes, lines 6943-6949
6943function pointerEvent(type){var lo=type.toLowerCase(),ms="MS"+type;return navigator.msPointerEnabled?ms:!!window.PointerEvent&&lo}function touchEvent(name){return"on"+name in window&&name}function isTheSameFingerId(e){return!e.pointerId||void 0===pointerId||e.pointerId===pointerId}function setListener(elm,events,callback){for(var eventsArray=events.split(" "),i=eventsArray.length;i--;)elm.addEventListener(eventsArray[i],callback,!1)}function getPointerEvent(event){var hasTargetTouches=Boolean(event.targetTouches&&event.targetTouches.length);switch(!0){case Boolean(event.target.touches):return event.target.touches[0];case hasTargetTouches&&void 0!==event.targetTouches[0].pageX:return event.targetTouches[0];case hasTargetTouches&&Boolean(event.targetTouches[0].touches):return event.targetTouches[0].touches[0];default:return event}}function isMultipleTouches(event){return 1<(event.targetTouches||event.target.touches||[]).length}function getTimestamp(){return(new Date).getTime()}function sendEvent(elm,eventName,originalEvent,data){var customEvent=doc.createEvent("Event");if(customEvent.originalEvent=originalEvent,(data=data||{}).x=currX,data.y=currY,defaults.useJquery&&(customEvent=jQuery.Event(eventName,{originalEvent:originalEvent}),jQuery(elm).trigger(customEvent,data)),customEvent.initEvent){for(var key in data)customEvent[key]=data[key];customEvent.initEvent(eventName,!0,!0),elm.dispatchEvent(customEvent)}for(;elm;)elm["on"+eventName]&&elm["on"+eventName](customEvent),elm=elm.parentNode}var pointerId,currX,currY,cachedX,cachedY,timestamp,target,dblTapTimer,longtapTimer,defaults={useJquery:!win.IGNORE_JQUERY&&"undefined"!=typeof jQuery,swipeThreshold:win.SWIPE_THRESHOLD||100,tapThreshold:win.TAP_THRESHOLD||150,dbltapThreshold:win.DBL_TAP_THRESHOLD||200,longtapThreshold:win.LONG_TAP_THRESHOLD||1e3,tapPrecision:win.TAP_PRECISION/2||30,justTouchEvents:win.JUST_ON_TOUCH_DEVICES},wasTouch=!1,touchevents_touchstart=touchEvent("touchstart")||pointerEvent("PointerDown"),touchevents_touchend=touchEvent("touchend")||pointerEvent("PointerUp"),touchevents_touchmove=touchEvent("touchmove")||pointerEvent("PointerMove"),tapNum=0;setListener(doc,touchevents_touchstart+(defaults.justTouchEvents?"":" mousedown"),function(e){if(isTheSameFingerId(e)&&!isMultipleTouches(e)&&(pointerId=e.pointerId,"mousedown"!==e.type&&(wasTouch=!0),"mousedown"!==e.type||!wasTouch)){var pointer=getPointerEvent(e);cachedX=currX=pointer.pageX,cachedY=currY=pointer.pageY,longtapTimer=setTimeout(function(){sendEvent(e.target,"longtap",e),target=e.target},defaults.longtapThreshold),timestamp=getTimestamp(),tapNum++}}),setListener(doc,touchevents_touchend+(defaults.justTouchEvents?"":" mouseup"),function(e){if(isTheSameFingerId(e)&&!isMultipleTouches(e))if(pointerId=void 0,"mouseup"===e.type&&wasTouch)wasTouch=!1;else{var eventsArr=[],now=getTimestamp(),deltaY=cachedY-currY,deltaX=cachedX-currX;if(clearTimeout(dblTapTimer),clearTimeout(longtapTimer),deltaX<=-defaults.swipeThreshold&&eventsArr.push("swiperight"),deltaX>=defaults.swipeThreshold&&eventsArr.push("swipeleft"),deltaY<=-defaults.swipeThreshold&&eventsArr.push("swipedown"),deltaY>=defaults.swipeThreshold&&eventsArr.push("swipeup"),eventsArr.length){for(var i=0;i<eventsArr.length;i++){var eventName=eventsArr[i];sendEvent(e.target,eventName,e,{distance:{x:Math.abs(deltaX),y:Math.abs(deltaY)}})}tapNum=0}else cachedX>=currX-defaults.tapPrecision&&cachedX<=currX+defaults.tapPrecision&&cachedY>=currY-defaults.tapPrecision&&cachedY<=currY+defaults.tapPrecision&&0<=timestamp+defaults.tapThreshold-now&&(sendEvent(e.target,2<=tapNum&&target===e.target?"dbltap":"tap",e),target=e.target),dblTapTimer=setTimeout(function(){tapNum=0},defaults.dbltapThreshold)}}),setListener(doc,touchevents_touchmove+(defaults.justTouchEvents?"":" mousemove"),function(e){if(isTheSameFingerId(e)&&("mousemove"!==e.type||!wasTouch)){var pointer=getPointerEvent(e);currX=pointer.pageX,currY=pointer.pageY}}),win.tocca=function(options){for(var opt in options)defaults[opt]=options[opt];return defaults}}(document,window);
6944
6945;(function ($) {    
6946    $(document).ready(function () {
6947        $('.anywhere-sliders-nivo-slider').each(function () {
6948            var that = $(this);
6949            var numberOfImages = parseInt(that.attr('data-imagesCount'));
6950            var nivoSliderId = that.attr('data-sliderHtmlElementId');
6951            var imagesString = that.attr('data-imagesString');
6952            var effect = that.attr('data-effect');
6953            var slices = parseInt(that.attr('data-slices')) || 15;
6954            var boxCols = parseInt(that.attr('data-boxCols')) || 8;
6955            var boxRows = parseInt(that.attr('data-boxRows')) || 4;
6956            var animSpeed = parseInt(that.attr('data-animSpeed')) || 500;
6957            var pauseTime = parseInt(that.attr('data-pauseTime'));
6958            var stopAutoSlide = false;
6959            if (pauseTime === 0) {
6960                stopAutoSlide = true;
6961            }
6962            var directionNav = that.attr('data-directionNav') === 'true';
6963            var controlNav = that.attr('data-controlNav') === 'true';
6964            var controlNavThumbs = that.attr('data-controlNavThumbs') === 'true';
6965            var pauseOnHover = that.attr('data-pauseOnHover') === 'true';
6966            var prevText = that.attr('data-prevText');
6967            var nextText = that.attr('data-nextText');
6968            var mobileBreakpoint = that.attr('data-mobileBreakpoint');
6969
6970            if (isNaN(numberOfImages) || numberOfImages <= 0) {
6971                return;
6972            }
6973
6974            if (numberOfImages > 1) {
6975                if ($('#' + nivoSliderId).closest('.theme-home-page-main-slider').length > 0) {
6976                    $('body').append(`
6977                        <style>
6978                            .home-page-body .slider-wrapper.theme-home-page-main-slider .nivo-controlNav a.nivo-control.active .line .progress {                
6979                                -webkit-animation-duration: ${pauseTime/1000}s;
6980                                -moz-animation-duration: ${pauseTime/1000}s;
6981                            }
6982                        </style>
6983                    `)
6984                }
6985
6986                $('#' + nivoSliderId).html(imagesString).nivoSlider({
6987                    effect: effect, // Specify sets like: 'fold,fade,sliceDown'
6988                    slices: slices, // For slice animations
6989                    boxCols: boxCols, // For box animations
6990                    boxRows: boxRows, // For box animations
6991                    animSpeed: animSpeed, // Slide transition speed
6992                    pauseTime: pauseTime, // How long each slide will show
6993                    startSlide: 0, // Set starting Slide (0 index)
6994                    directionNav: directionNav, // Next & Prev navigation
6995                    controlNav: controlNav, // 1,2,3... navigation
6996                    controlNavThumbs: controlNavThumbs, // Use thumbnails for Control Nav
6997                    pauseOnHover: pauseOnHover, // Stop animation while hovering
6998                    manualAdvance: stopAutoSlide, // Force manual transitions
6999                    prevText: prevText, // Prev directionNav text
7000                    nextText: nextText, // Next directionNav text
7001                    randomStart: false, // Start on a random slide
7002                    mobileBreakpoint: mobileBreakpoint,                    
7003                    afterLoad: function () {
7004                        $(document).trigger({ type: 'nopAnywhereSlidersFinishedLoading', targetId: nivoSliderId });
7005
7006                        if ($(window).width() <= 984) {
7007                            if (!$('.home-page-body .slider-wrapper.theme-home-page-main-slider .nivo-controlNav').hasClass('slick-slider')) {
7008                                $('.home-page-body .slider-wrapper.theme-home-page-main-slider .nivo-controlNav').slick({
7009                                    dots: true,
7010                                    customPaging: function (slider, i) {
7011                                        return '<button type="button" class="nivo-control"></a>'
7012                                    },
7013                                    arrows: false,
7014                                    adaptiveHeight: true,
7015                                    infinite: false
7016                                })
7017                            }                            
7018                        }
7019                    }
7020                });
7021            } else {
7022                $(document).trigger({ type: 'nopAnywhereSlidersFinishedLoading', targetId: nivoSliderId });
7023            }
7024        });
7025
7026        // Carousel 2D Slider
7027        $('.anywhere-sliders-carousel2d-slider').each(function () {
7028            var that = $(this);
7029            var nivoSliderId = that.attr('data-sliderHtmlElementId');
7030            var width = parseInt(that.attr('data-width')) || 400;
7031            var height = parseInt(that.attr('data-height')) || 300;
7032            var navigation = that.attr('data-navigation') === 'true';
7033            var delay = parseInt(that.attr('data-delay')) || 3000;
7034            var links = that.attr('data-links') === 'true';
7035            var hoverPause = that.attr('data-hoverPause') === 'true';
7036
7037            $('#' + nivoSliderId).coinslider({
7038                width: width,
7039                height: height,
7040                navigation: navigation,
7041                delay: delay,
7042                effect: 'straight',
7043                links: links,
7044                hoverPause: hoverPause
7045            });
7046
7047            $('#' + nivoSliderId).swipeEvents().bind('swipeLeft', function () {
7048                $('.cs-prev').trigger('click');
7049            }).bind('swipeRight', function () {
7050                $('.cs-next').trigger('click');
7051            });
7052        });
7053    })
7054
7055    $(window).on('resize', function () {
7056        if ($(window).width() <= 984) {
7057            if (!$('.home-page-body .slider-wrapper.theme-home-page-main-slider .nivo-controlNav').hasClass('slick-slider')) {
7058                $('.home-page-body .slider-wrapper.theme-home-page-main-slider .nivo-controlNav').slick({
7059                    dots: true,
7060                    arrows: false,
7061                    adaptiveHeight: true,
7062                    infinite: false
7063                })
7064            }            
7065        }
7066        else {
7067            if ($('.home-page-body .slider-wrapper.theme-home-page-main-slider .nivo-controlNav').hasClass('slick-slider')) {
7068                $('.home-page-body .slider-wrapper.theme-home-page-main-slider .nivo-controlNav').slick('unslick')
7069            }
7070        }
7071    })
7072
7073    var iprogress = 0
7074    function moveProgress($target, time) {
7075        if (iprogress == 0) {
7076            iprogress = 1
7077            var elem = $target[0]
7078            var width = 1
7079            var id = setInterval(frame, time / 100)
7080            function frame() {
7081                if (width >= 100) {
7082                    clearInterval(id);
7083                    iprogress = 0;
7084                    elem.style.width = 0 + "%";
7085                } else {
7086                    width++
7087                    elem.style.width = width + "%";
7088                }
7089            }
7090        }
7091    }
7092})(jQuery);
7093/*!
7094 * FooTable - Awesome Responsive Tables
7095 * Version : 2.0.1.2
7096 * http://fooplugins.com/plugins/footable-jquery/
7097 *
7098 * Requires jQuery - http://jquery.com/
7099 *
7100 * Copyright 2013 Steven Usher & Brad Vincent
7101 * Released under the MIT license
7102 * You are free to use FooTable in commercial projects as long as this copyright header is left intact.
7103 *
7104 * Date: 21 Sep 2013
7105 */
7106
7107$(document).ready(function(){var a=".order-summary-content .cart, .wishlist-content .cart, .return-request-page .data-table",e=".update-cart-button, .update-wishlist-button, .submit-return-request-button";$(a).length<1||$(e).length<1||$(e).one("click",function(){$(a).find("tr").not(".footable-row-detail").find("input, select").each(function(){var e=$
7107(this),t=$(a).find("input, select").filter('[name="'+e.attr("name")+'"]').not(e);"checkbox"==e.attr("type")&&(t=t.filter('[value="'+e.attr("value")+'"]')),0<t.length&&("checkbox"==e.attr("type")?e.attr("checked",t.first().is(":checked")):e.val(t.first().val()),t.remove())})})}),function(m,i,e){i.footable={options:{delay:100,breakpoints:{w410:410,w480:480,w580:580,w768:768,w980:980,w1000:1e3},parsers:{alpha:function(e){return m(e).data("value")||m.trim(m(e).text())},numeric:function(e){var t=m(e).data("value")||m(e).text().replace(/[^0-9.\-]/g,"");return t=parseFloat(t),isNaN(t)&&(t=0),t}},addRowToggle:!0,calculateWidthOverride:null,toggleSelector:" > tbody > tr:not(.footable-row-detail)",columnDataSelector:"> thead > tr:last-child > th, > thead > tr:last-child > td",detailSeparator:":",toggleHTMLElement:"<span />",createGroupedDetail:function(e){for(var t={_none:{name:null,data:[]}},a=0;a<e.length;a++){var o=e[a].group;null!==o?(o in t||(t[o]={name:e[a].groupName||e[a].group,data:[]}),t[o].data.push(e[a])):t._none.data.push(e[a])}return t},createDetail:function(e,t,a,o,i){var n=a(t);for(var r in n)if(0!==n[r].data.length){"_none"!==r&&e.append('<div class="'+i.detailInnerGroup+'">'+n[r].name+"</div>");for(var l=0;l<n[r].data.length;l++){var d=n[r].data[l].name?o:"";e.append('<div class="'+i.detailInnerRow+'"><div class="'+i.detailInnerName+'">'+n[r].data[l].name+d+'</div><div class="'+i.detailInnerValue+'">'+n[r].data[l].display+"</div></div>")}}},classes:{main:"footable",loading:"footable-loading",loaded:"footable-loaded",toggle:"footable-toggle",disabled:"footable-disabled",detail:"footable-row-detail",detailCell:"footable-row-detail-cell",detailInner:"footable-row-detail-inner",detailInnerRow:"footable-row-detail-row",detailInnerGroup:"footable-row-detail-group",detailInnerName:"footable-row-detail-name",detailInnerValue:"footable-row-detail-value",detailShow:"footable-detail-show"},triggers:{initialize:"footable_initialize",resize:"footable_resize",redraw:"footable_redraw",toggleRow:"footable_toggle_row",expandFirstRow:"footable_expand_first_row",expandAll:"footable_expand_all",collapseAll:"footable_collapse_all"},events:{alreadyInitialized:"footable_already_initialized",initializing:"footable_initializing",initialized:"footable_initialized",resizing:"footable_resizing",resized:"footable_resized",redrawn:"footable_redrawn",breakpoint:"footable_breakpoint",columnData:"footable_column_data",rowDetailUpdating:"footable_row_detail_updating",rowDetailUpdated:"footable_row_detail_updated",rowCollapsed:"footable_row_collapsed",rowExpanded:"footable_row_expanded",rowRemoved:"footable_row_removed",reset:"footable_reset"},debug:!1,log:null},version:{major:0,minor:5,toString:function(){return i.footable.version.major+"."+i.footable.version.minor},parse:function(e){return version=/(\d+)\.?(\d+)?\.?(\d+)?/.exec(e),{major:parseInt(version[1],10)||0,minor:parseInt(version[2],10)||0,patch:parseInt(version[3],10)||0}}},plugins:{_validate:function(e){if(!m.isFunction(e))return!0===i.footable.options.debug&&console.error('Validation failed, expected type "function", received type "{0}".',typeof e),!1;var t=new e;return"string"!=typeof t.name?(!0===i.footable.options.debug&&console.error('Validation failed, plugin does not implement a string property called "name".',t),!1):m.isFunction(t.init)?(!0===i.footable.options.debug&&console.log('Validation succeeded for plugin "'+t.name+'".',t),!0):(!0===i.footable.options.debug&&console.error('Validation failed, plugin "'+t.name+'" does not implement a function called "init".',t),!1)},registered:[],register:function(e,t){i.footable.plugins._validate(e)&&(i.footable.plugins.registered.push(e),"object"==typeof t&&m.extend(!0,i.footable.options,t))},load:function(e){var t,a,o=[];for(a=0;a<i.footable.plugins.registered.length;a++)try{t=i.footable.plugins.registered[a],o.push(new t(e))}catch(e){!0===i.footable.options.debug&&console.error(e)}return o},init:function(e){for(var t=0;t<e.plugins.length;t++)try{e.plugins[t].init(e)}catch(e){!0===i.footable.options.debug&&console.error(e)}}}};var a=0;function o(){var a=this;a.id=null,a.busy=!1,a.start=function(e,t){a.busy||(a.stop(),a.id=setTimeout(function(){e(),a.id=null,a.busy=!1},t),a.busy=!0)},a.stop=function(){null!==a.id&&(clearTimeout(a.id),a.id=null,a.busy=!1)}}function n(e,t,a){var p=this;p.id=a,p.table=e,p.options=t,p.breakpoints=[],p.breakpointNames="",p.columns={},p.plugins=i.footable.plugins.load(p);var g=p.options,s=g.classes,b=g.events,u=g.triggers,h=0;return p.timers={resize:new o,register:function(e){return p.timers[e]=new o,p.timers[e]}},p.init=function(){var e=m(i),t=m(p.table);if(i.footable.plugins.init(p),t.hasClass(s.loaded))p.raise(b.alreadyInitialized);else{for(var a in p.raise(b.initializing),t.addClass(s.loading),t.find(g.columnDataSelector).each(function(){var e=p.getColumnData(this);p.columns[e.index]=e}),g.breakpoints)p.breakpoints.push({name:a,width:g.breakpoints[a]}),p.breakpointNames+=a+" ";p.breakpoints.sort(function(e,t){return e.width-t.width}),t.unbind(u.initialize).bind(u.initialize,function(){t.removeData("footable_info"),t.data("breakpoint",""),t.trigger(u.resize),t.removeClass(s.loading),t.addClass(s.loaded).addClass(s.main),p.raise(b.initialized)}).unbind(u.redraw).bind(u.redraw,function(){p.redraw()}).unbind(u.resize).bind(u.resize,function(){p.resize()}).unbind(u.expandFirstRow).bind(u.expandFirstRow,function(){t.find(g.toggleSelector).first().not("."+s.detailShow).trigger(u.toggleRow)}).unbind(u.expandAll).bind(u.expandAll,function(){t.find(g.toggleSelector).not("."+s.detailShow).trigger(u.toggleRow)}).unbind(u.collapseAll).bind(u.collapseAll,function(){t.find("."+s.detailShow).trigger(u.toggleRow)}),t.trigger(u.initialize),e.bind("resize.footable",function(){p.timers.resize.stop(),p.timers.resize.start(function(){p.raise(u.resize)},g.delay)})}},p.addRowToggle=function(){if(g.addRowToggle){var e=m(p.table),t=!1;for(var a in e.find("span."+s.toggle).remove(),p.columns){var o=p.columns[a];if(o.toggle){t=!0;var i="> tbody > tr:not(."+s.detail+",."+s.disabled+") > td:nth-child("+(parseInt(o.index,10)+1)+")";return void e.find(i).not("."+s.detailCell).prepend(m(g.toggleHTMLElement).addClass(s.toggle))}}t||e.find("> tbody > tr:not(."+s.detail+",."+s.disabled+") > td:first-child").not("."+s.detailCell).prepend(m(g.toggleHTMLElement).addClass(s.toggle))}},p.setColumnClasses=function(){for(var e in $table=m(p.table),p.columns){var t=p.c
7107olumns[e];if(null!==t.className){var a="",o=!0;m.each(t.matches,function(e,t){o||(a+=", "),a+="> tbody > tr:not(."+s.detail+") > td:nth-child("+(parseInt(t,10)+1)+")",o=!1}),$table.find(a).not("."+s.detailCell).addClass(t.className)}}},p.bindToggleSelectors=function(){var t=m(p.table);p.hasAnyBreakpointColumn()&&(t.find(g.toggleSelector).unbind(u.toggleRow).bind(u.toggleRow,function(e){var t=m(this).is("tr")?m(this):m(this).parents("tr:first");p.toggleDetail(t)}),t.find(g.toggleSelector).unbind("click.footable").bind("click.footable",function(e){t.is(".breakpoint")&&m(e.target).is("td,."+s.toggle)&&m(this).trigger(u.toggleRow)}))},p.parse=function(e,t){return(g.parsers[t.type]||g.parsers.alpha)(e)},p.getColumnData=function(e){var t=m(e),a=t.data("hide"),o=t.index();a=a||"",a=jQuery.map(a.split(","),function(e){return jQuery.trim(e)});var i={index:o,hide:{},type:t.data("type")||"alpha",name:t.data("name")||m.trim(t.text()),ignore:t.data("ignore")||!1,toggle:t.data("toggle")||!1,className:t.data("class")||null,matches:[],names:{},group:t.data("group")||null,groupName:null};if(null!==i.group){var n=m(p.table).find('> thead > tr.footable-group-row > th[data-group="'+i.group+'"], > thead > tr.footable-group-row > td[data-group="'+i.group+'"]').first();i.groupName=p.parse(n,{type:"alpha"})}var r=parseInt(t.prev().attr("colspan")||0,10);h+=1<r?r-1:0;var l=parseInt(t.attr("colspan")||0,10),d=i.index+h;if(1<l){var s=t.data("names");s=(s=s||"").split(",");for(var u=0;u<l;u++)i.matches.push(u+d),u<s.length&&(i.names[u+d]=s[u])}else i.matches.push(d);i.hide.default="all"===t.data("hide")||0<=m.inArray("default",a);var f=!1;for(var c in g.breakpoints)i.hide[c]="all"===t.data("hide")||0<=m.inArray(c,a),f=f||i.hide[c];return i.hasBreakpoint=f,p.raise(b.columnData,{column:{data:i,th:e}}).column.data},p.getViewportWidth=function(){return window.innerWidth||(document.body?document.body.offsetWidth:0)},p.calculateWidth=function(e,t){return jQuery.isFunction(g.calculateWidthOverride)?g.calculateWidthOverride(e,t):(t.viewportWidth<t.width&&(t.width=t.viewportWidth),t.parentWidth<t.
7107width&&(t.width=t.parentWidth),t)},p.hasBreakpointColumn=function(e){for(var t in p.columns)if(p.columns[t].hide[e]){if(p.columns[t].ignore)continue;return!0}return!1},p.hasAnyBreakpointColumn=function(){for(var e in p.columns)if(p.columns[e].hasBreakpoint)return!0;return!1},p.resize=function(){var e=m(p.table);if(e.is(":visible")&&p.hasAnyBreakpointColumn()){var t={width:e.width(),viewportWidth:p.getViewportWidth(),parentWidth:e.parent().width()};t=p.calculateWidth(e,t);var a=e.data("footable_info");if(e.data("footable_info",t),p.raise(b.resizing,{old:a,info:t}),!a||a&&a.width&&a.width!==t.width){for(var o,i=null,n=0;n<p.breakpoints.length;n++)if((o=p.breakpoints[n])&&o.width&&t.width<=o.width){i=o;break}var r=null===i?"default":i.name,l=p.hasBreakpointColumn(r),d=e.data("breakpoint");e.data("breakpoint",r).removeClass("default breakpoint").removeClass(p.breakpointNames).addClass(r+(l?" breakpoint":"")),r!==d&&(e.trigger(u.redraw),p.raise(b.breakpoint,{breakpoint:r,info:t}))}p.raise(b.resized,{old:a,info:t})}},p.redraw=function(){p.addRowToggle(),p.bindToggleSelectors(),p.setColumnClasses();var l=m(p.table),d=l.data("breakpoint"),t=p.hasBreakpointColumn(d);l.find("> tbody > tr:not(."+s.detail+")").data("detail_created",!1).end().find("> thead > tr:last-child > th").each(function(){var e=p.columns[m(this).index()],o="",i=!0;m.each(e.matches,function(e,t){i||(o+=", ");var a=t+1;o+="> tbody > tr:not(."+s.detail+") > td:nth-child("+a+")",o+=", > tfoot > tr:not(."+s.detail+") > td:nth-child("+a+")",o+=", > colgroup > col:nth-child("+a+")",i=!1}),o+=', > thead > tr[data-group-row="true"] > th[data-group="'+e.group+'"]';var t=l.find(o).add(this);if(!1===e.hide[d]?t.show():t.hide(),1===l.find("> thead > tr.footable-group-row").length){var a=l.find('> thead > tr:last-child > th[data-group="'+e.group+'"]:visible, > thead > tr:last-child > th[data-group="'+e.group+'"]:visible'),n=l.find('> thead > tr.footable-group-row > th[data-group="'+e.group+'"], > thead > tr.footable-group-row > td[data-group="'+e.group+'"]'),r=0;m.each(a,function(){r+=parseInt(m(this).attr("colspan")||1,10)}),0<r?n.attr("colspan",r).show():n.hide()}}).end().find("> tbody > tr."+s.detailShow).each(function(){p.createOrUpdateDetailRow(this)}),l.find("> tbody > tr."+s.detailShow+":visible").each(function(){var e=m(this).next();e.hasClass(s.detail)&&(t?e.show():e.hide())}),l.find("> thead > tr > th.footable-last-column, > tbody > tr > td.footable-last-column").removeClass("footable-last-column"),l.find("> thead > tr > th.footable-first-column, > tbody > tr > td.footable-first-column").removeClass("footable-first-column"),l.find("> thead > tr, > tbody > tr").find("> th:visible:last, > td:visible:last").addClass("footable-last-column").end().find("> th:visible:first, > td:visible:first").addClass("footable-first-column"),p.raise(b.redrawn)},p.toggleDetail=function(e){var t=e.jquery?e:m(e),a=t.next();t.hasClass(s.detailShow)?(t.removeClass(s.detailShow),a.hasClass(s.detail)&&a.hide(),p.raise(b.rowCollapsed,{row:t[0]})):(p.createOrUpdateDetailRow(t[0]),t.addClass(s.detailShow).next().show(),p.raise(b.rowExpanded,{row:t[0]}),m.event.trigger("footableRowOpened"))},p.removeRow=function(e){var t=e.jquery?e:m(e);t.hasClass(s.detail)&&(t=t.prev());var a=t.next();!0===t.data("detail_created")&&a.remove(),t.remove(),p.raise(b.rowRemoved)},p.appendRow=function(e){var t=e.jquery?e:m(e);m(p.table).find("tbody").append(t),p.redraw()},p.getColumnFromTdIndex=function(e){var t=null;for(var a in p.columns)if(0<=m.inArray(e,p.columns[a].matches)){t=p.columns[a];break}return t},p.createOrUpdateDetailRow=function(e){var t,a=m(e),o=a.next(),i=[];if(!0===a.data("detail_created"))return!0;if(a.is(":hidden"))return!1;if(p.raise(b.rowDetailUpdating,{row:a,detail:o}),a.find("> td:hidden").each(function(){var e=m(this).index(),t=p.getColumnFromTdIndex(e),a=t.name;return!0===t.ignore||(e in t.names&&(a=t.names[e]),i.push({name:a,value:p.parse(this,t),display:m.trim(m(this).html()),group:t.group,groupName:t.groupName})),!0}),0===i.length)return!1;var n=a.find("> td:visible").length,r=o.hasClass(s.detail);return r||(o=m('<tr class="'+s.detail+'"><td class="'+s.detailCell+'"><div class="'+s.detailInner+'"></div></td></tr>'),a.after(o)),o.find("> td:first").attr("colspan",n),t=o.find("."+s.detailInner).empty(),g.createDetail(t,i,g.createGroupedDetail,g.detailSeparator,s),a.data("detail_created",!0),p.raise(b.rowDetailUpdated,{row:a,detail:o}),!r},p.raise=function(e,t){!0===p.options.debug&&m.isFunction(p.options.log)&&p.options.log(e,"event"),t=t||{};var a={ft:p};m.extend(!0,a,t);var o=m.Event(e,a);return o.ft||m.extend(!0,o,a),m(p.table).trigger(o),o},p.reset=function(){var e=m(p.table);e.removeData("footable_info").data("breakpoint","").removeClass(s.loading).removeClass(s.loaded),e.find(g.toggleSelector).unbind(u.toggleRow).unbind("click.footable"),e.find("> tbody > tr").removeClass(s.detailShow),e.find("> tbody > tr."+s.detail).remove(),p.raise(b.reset)},p.init(),p}m.fn.footable=function(e){e=e||{};var t=m.extend(!0,{},i.footable.options,e);return this.each(function(){var e=new n(this,t,++a);m(this).data("footable",e)})}}(jQuery,window);
7108/*! perfect-scrollbar - v0.5.8
7109* http://noraesae.github.com/perfect-scrollbar/
7110* Copyright (c) 2014 Hyunje Alex Jun; Licensed MIT */
7111;(function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)})(function(e){"use strict";function t(e){return"string"==typeof e?parseInt(e,10):~~e}var o={wheelSpeed:1,wheelPropagation:!1,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,useKeyboard:!0,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,includePadding:!1},n=0,r=function(){var e=n++;return function(t){var o=".perfect-scrollbar-"+e;return t===void 0?o:t+o}},l="WebkitAppearance"in document.documentElement.style;e.fn.perfectScrollbar=function(n,i){return this.each(function(){function a(e,o){var n=e+o,r=D-R;j=0>n?0:n>r?r:n;var l=t(j*(Y-D)/(D-R));M.scrollTop(l)}function s(e,o){var n=e+o,r=E-k;W=0>n?0:n>r?r:n;var l=t(W*(C-E)/(E-k));M.scrollLeft(l)}function c(e){return P.minScrollbarLength&&(e=Math.max(e,P.minScrollbarLength)),P.maxScrollbarLength&&(e=Math.min(e,P.maxScrollbarLength)),e}function u(){var e={width:I};e.left=B?M.scrollLeft()+E-C:M.scrollLeft(),N?e.bottom=_-M.scrollTop():e.top=Q+M.scrollTop(),H.css(e);var t={top:M.scrollTop(),height:A};Z?t.right=B?C-M.scrollLeft()-V-J.outerWidth():V-M.scrollLeft():t.left=B?M.scrollLeft()+2*E-C-$-J.outerWidth():$+M.scrollLeft(),G.css(t),U.css({left:W,width:k-z}),J.css({top:j,height:R-et})}function d(){M.removeClass("ps-active-x"),M.removeClass("ps-active-y"),E=P.includePadding?M.innerWidth():M.width(),D=P.includePadding?M.innerHeight():M.height(),C=M.prop("scrollWidth"),Y=M.prop("scrollHeight"),!P.suppressScrollX&&C>E+P.scrollXMarginOffset?(X=!0,I=E-F,k=c(t(I*E/C)),W=t(M.scrollLeft()*(I-k)/(C-E))):(X=!1,k=0,W=0,M.scrollLeft(0)),!P.suppressScrollY&&Y>D+P.scrollYMarginOffset?(O=!0,A=D-tt,R=c(t(A*D/Y)),j=t(M.scrollTop()*(A-R)/(Y-D))):(O=!1,R=0,j=0,M.scrollTop(0)),W>=I-k&&(W=I-k),j>=A-R&&(j=A-R),u(),X&&M.addClass("ps-active-x"),O&&M.addClass("ps-active-y")}function p(){var t,o,n=function(e){s(t,e.pageX-o),d(),e.stopPropagation(),e.preventDefault()},r=function(){H.removeClass("in-scrolling"),e(q).unbind(K("mousemove"),n)};U.bind(K("mousedown"),function(l){o=l.pageX,t=U.position().left,H.addClass("in-scrolling"),e(q).bind(K("mousemove"),n),e(q).one(K("mouseup"),r),l.stopPropagation(),l.preventDefault()}),t=o=null}function f(){var t,o,n=function(e){a(t,e.pageY-o),d(),e.stopPropagation(),e.preventDefault()},r=function(){G.removeClass("in-scrolling"),e(q).unbind(K("mousemove"),n)};J.bind(K("mousedown"),function(l){o=l.pageY,t=J.position().top,G.addClass("in-scrolling"),e(q).bind(K("mousemove"),n),e(q).one(K("mouseup"),r),l.stopPropagation(),l.preventDefault()}),t=o=null}function v(e,t){var o=M.scrollTop();if(0===e){if(!O)return!1;if(0===o&&t>0||o>=Y-D&&0>t)return!P.wheelPropagation}var n=M.scrollLeft();if(0===t){if(!X)return!1;if(0===n&&0>e||n>=C-E&&e>0)return!P.wheelPropagation}return!0}function g(e,t){var o=M.scrollTop(),n=M.scrollLeft(),r=Math.abs(e),l=Math.abs(t);if(l>r){if(0>t&&o===Y-D||t>0&&0===o)return!P.swipePropagation}else if(r>l&&(0>e&&n===C-E||e>0&&0===n))return!P.swipePropagation;return!0}function b(){function e(e){var t=e.originalEvent.deltaX,o=-1*e.originalEvent.deltaY;return(t===void 0||o===void 0)&&(t=-1*e.originalEvent.wheelDeltaX/6,o=e.originalEvent.wheelDeltaY/6),e.originalEvent.deltaMode&&1===e.originalEvent.deltaMode&&(t*=10,o*=10),t!==t&&o!==o&&(t=0,o=e.originalEvent.wheelDelta),[t,o]}function t(t){if(l||!(M.find("select:focus").length>0)){var n=e(t),r=n[0],i=n[1];o=!1,P.useBothWheelAxes?O&&!X?(i?M.scrollTop(M.scrollTop()-i*P.wheelSpeed):M.scrollTop(M.scrollTop()+r*P.wheelSpeed),o=!0):X&&!O&&(r?M.scrollLeft(M.scrollLeft()+r*P.wheelSpeed):M.scrollLeft(M.scrollLeft()-i*P.wheelSpeed),o=!0):(M.scrollTop(M.scrollTop()-i*P.wheelSpeed),M.scrollLeft(M.scrollLeft()+r*P.wheelSpeed)),d(),o=o||v(r,i),o&&(t.stopPropagation(),t.preventDefault())}}var o=!1;window.onwheel!==void 0?M.bind(K("wheel"),t):window.onmousewheel!==void 0&&M.bind(K("mousewheel"),t)}function h(){var t=!1;M.bind(K("mouseenter"),function(){t=!0}),M.bind(K("mouseleave"),function(){t=!1});var o=!1;e(q).bind(K("keydown"),function(n){if((!n.isDefaultPrevented||!n.isDefaultPrevented())&&t){for(var r=document.activeElement?document.activeElement:q.activeElement;r.shadowRoot;)r=r.shadowRoot.activeElement;if(!e(r).is(":input,[contenteditable]")){var l=0,i=0;switch(n.which){case 37:l=-30;break;case 38:i=30;break;case 39:l=30;break;case 40:i=-30;break;case 33:i=90;break;case 32:case 34:i=-90;break;case 35:i=n.ctrlKey?-Y:-D;break;case 36:i=n.ctrlKey?M.scrollTop():D;break;default:return}M.scrollTop(M.scrollTop()-i),M.scrollLeft(M.scrollLeft()+l),o=v(l,i),o&&n.preventDefault()}}})}function w(){function e(e){e.stopPropagation()}J.bind(K("click"),e),G.bind(K("click"),function(e){var o=t(R/2),n=e.pageY-G.offset().top-o,r=D-R,l=n/r;0>l?l=0:l>1&&(l=1),M.scrollTop((Y-D)*l)}),U.bind(K("click"),e),H.bind(K("click"),function(e){var o=t(k/2),n=e.pageX-H.offset().left-o,r=E-k,l=n/r;0>l?l=0:l>1&&(l=1),M.scrollLeft((C-E)*l)})}function m(){function t(){var e=window.getSelection?window.getSelection():document.getSlection?document.getSlection():{rangeCount:0};return 0===e.rangeCount?null:e.getRangeAt(0).commonAncestorContainer}function o(){r||(r=setInterval(function(){return x()?(M.scrollTop(M.scrollTop()+l.top),M.scrollLeft(M.scrollLeft()+l.left),d(),void 0):(clearInterval(r),void 0)},50))}function n(){r&&(clearInterval(r),r=null),H.removeClass("in-scrolling"),G.removeClass("in-scrolling")}var r=null,l={top:0,left:0},i=!1;e(q).bind(K("selectionchange"),function(){e.contains(M[0],t())?i=!0:(i=!1,n())}),e(window).bind(K("mouseup"),function(){i&&(i=!1,n())}),e(window).bind(K("mousemove"),function(e){if(i){var t={x:e.pageX,y:e.pageY},r=M.offset(),a={left:r.left,right:r.left+M.outerWidth(),top:r.top,bottom:r.to
7111p+M.outerHeight()};t.x<a.left+3?(l.left=-5,H.addClass("in-scrolling")):t.x>a.right-3?(l.left=5,H.addClass("in-scrolling")):l.left=0,t.y<a.top+3?(l.top=5>a.top+3-t.y?-5:-20,G.addClass("in-scrolling")):t.y>a.bottom-3?(l.top=5>t.y-a.bottom+3?5:20,G.addClass("in-scrolling")):l.top=0,0===l.top&&0===l.left?n():o()}})}function T(t,o){function n(e,t){M.scrollTop(M.scrollTop()-t),M.scrollLeft(M.scrollLeft()-e),d()}function r(){h=!0}function l(){h=!1}function i(e){return e.originalEvent.targetTouches?e.originalEvent.targetTouches[0]:e.originalEvent}function a(e){var t=e.originalEvent;return t.targetTouches&&1===t.targetTouches.length?!0:t.pointerType&&"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE?!0:!1}function s(e){if(a(e)){w=!0;var t=i(e);p.pageX=t.pageX,p.pageY=t.pageY,f=(new Date).getTime(),null!==b&&clearInterval(b),e.stopPropagation()}}function c(e){if(!h&&w&&a(e)){var t=i(e),o={pageX:t.pageX,pageY:t.pageY},r=o.pageX-p.pageX,l=o.pageY-p.pageY;n(r,l),p=o;var s=(new Date).getTime(),c=s-f;c>0&&(v.x=r/c,v.y=l/c,f=s),g(r,l)&&(e.stopPropagation(),e.preventDefault())}}function u(){!h&&w&&(w=!1,clearInterval(b),b=setInterval(function(){return x()?.01>Math.abs(v.x)&&.01>Math.abs(v.y)?(clearInterval(b),void 0):(n(30*v.x,30*v.y),v.x*=.8,v.y*=.8,void 0):(clearInterval(b),void 0)},10))}var p={},f=0,v={},b=null,h=!1,w=!1;t&&(e(window).bind(K("touchstart"),r),e(window).bind(K("touchend"),l),M.bind(K("touchstart"),s),M.bind(K("touchmove"),c),M.bind(K("touchend"),u)),o&&(window.PointerEvent?(e(window).bind(K("pointerdown"),r),e(window).bind(K("pointerup"),l),M.bind(K("pointerdown"),s),M.bind(K("pointermove"),c),M.bind(K("pointerup"),u)):window.MSPointerEvent&&(e(window).bind(K("MSPointerDown"),r),e(window).bind(K("MSPointerUp"),l),M.bind(K("MSPointerDown"),s),M.bind(K("MSPointerMove"),c),M.bind(K("MSPointerUp"),u)))}function y(){M.bind(K("scroll"),function(){d()})}function L(){M.unbind(K()),e(window).unbind(K()),e(q).unbind(K()),M.data("perfect-scrollbar",null),M.data("perfect-scrollbar-update",null),M.data("perfect-scrollbar-destroy",null),U.remove(),J.remove(),H.remove(),G.remove(),M=H=G=U=J=X=O=E=D=C=Y=k=W=_=N=Q=R=j=V=Z=$=B=K=null}function S(){d(),y(),p(),f(),w(),m(),b(),(ot||nt)&&T(ot,nt),P.useKeyboard&&h(),M.data("perfect-scrollbar",M),M.data("perfect-scrollbar-update",d),M.data("perfect-scrollbar-destroy",L)}var P=e.extend(!0,{},o),M=e(this),x=function(){return!!M};if("object"==typeof n?e.extend(!0,P,n):i=n,"update"===i)return M.data("perfect-scrollbar-update")&&M.data("perfect-scrollbar-update")(),M;if("destroy"===i)return M.data("perfect-scrollbar-destroy")&&M.data("perfect-scrollbar-destroy")(),M;if(M.data("perfect-scrollbar"))return M.data("perfect-scrollbar");M.addClass("ps-container");var E,D,C,Y,X,k,W,I,O,R,j,A,B="rtl"===M.css("direction"),K=r(),q=this.ownerDocument||document,H=e("<div class='ps-scrollbar-x-rail'>").appendTo(M),U=e("<div class='ps-scrollbar-x'>").appendTo(H),_=t(H.css("bottom")),N=_===_,Q=N?null:t(H.css("top")),z=t(H.css("borderLeftWidth"))+t(H.css("borderRightWidth")),F=t(H.css("marginLeft"))+t(H.css("marginRight")),G=e("<div class='ps-scrollbar-y-rail'>").appendTo(M),J=e("<div class='ps-scrollbar-y'>").appendTo(G),V=t(G.css("right")),Z=V===V,$=Z?null:t(G.css("left")),et=t(G.css("borderTopWidth"))+t(G.css("borderBottomWidth")),tt=t(G.css("marginTop"))+t(G.css("marginBottom")),ot="ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,nt=null!==window.navigator.msMaxTouchPoints;return S(),M})}});
7112! function(d, n, e) {
7113    "use strict";
7114    e.attachDetach = function(e) {
7115        var r = d.extend({}, {
7116            blocks: [],
7117            defaultInsertAction: "appendTo"
7118        }, e);
7119
7120        function t(e, t, n, o) {
7121            o = o || r.defaultInsertAction, i(d(t))[o](n)
7122        }
7123
7124        function i(e) {
7125            return e.data("theme_data_placeholder", d('<span style="display: none;" />').insertAfter(e)), e.detach()
7126        }
7127        return {
7128            init: function() {
7129                d.each(r.blocks, function(e, n) {
7130                    if (n.insertAction = n.insertAction || r.defaultInsertAction, n.multipleContentElements && n.parentHolder) {
7131                        var o = n.traversingFunction || "find";
7132                        d(n.content).each(function() {
7133                            var e = d(this),
7134                                t = e.parents(n.parentHolder)[o](n.elementToAttach);
7135                            i(e)[n.insertAction](t)
7136                        })
7137                    } else i(d(n.content))[n.insertAction](n.elementToAttach)
7138                }), d(document).on("detachElement.theme", t)
7139            },
7140            destroy: function() {
7141                d(":data(theme_data_placeholder)").each(function() {
7142                    ! function(e) {
7143                        e.data("theme_data_placeholder") && (e.insertBefore(e.data("theme_data_placeholder")), e.data("theme_data_placeholder").remove(), e.removeData("theme_data_placeholder"))
7144                    }(d(this))
7145                }), d(document).off("detachElement.theme", t)
7146            }
7147        }
7148    }, e.customProductReviewRatingIcons = function(e) {
7149        var t = d.extend({}, {
7150            reviewRatingIconsInputSelector: '.write-review .review-rating input[type="radio"]',
7151            classToApply: "checked"
7152        }, e);
7153
7154        function n() {
7155            d("input:not(:checked)").parent().removeClass(t.classToApply), d("input:checked").parent().addClass(t.classToApply).prevAll().addClass(t.classToApply)
7156        }
7157        return {
7158            init: function() {
7159                d(document).on("click.theme.reviewRatingIcons", t.reviewRatingIconsInputSelector, n)
7160            },
7161            destroy: function() {
7162                d(document).off("click.theme.reviewRatingIcons", t.reviewRatingIconsInputSelector, n)
7163            }
7164        }
7165    }, e.deviceClass = function(e) {
7166        var t = d.extend({}, {
7167            elementToApply: "body",
7168            mobileClassToApply: "mobile-device",
7169            desktopClassToApply: "desktop-device"
7170        }, e);
7171        return {
7172            init: function() {
7173                var e = n.isMobileDevice ? t.mobileClassToApply : t.desktopClassToApply;
7174                d(t.elementToApply).addClass(e)
7175            },
7176            destroy: function() {
7177                var e = n.isMobileDevice ? t.mobileClassToApply : t.desktopClassToApply;
7178                d(t.elementToApply).removeClass(e)
7179            }
7180        }
7181    }, e.equalizer = function(e) {
7182        var t = {
7183                isAlreadyDestroyed: !1,
7184                windowDelay: null,
7185                windowWidth: 0,
7186                windowTimeout: 50
7187            },
7188            r = {
7189                target: null,
7190                byRow: !0,
7191                property: "height",
7192                measurementFunction: "outerHeight",
7193                includeMargin: !1
7194            },
7195            i = {
7196                target: null,
7197                byRow: !1,
7198                property: "width",
7199                measurementFunction: "outerWidth",
7200                includeMargin: !1
7201            },
7202            n = d.extend({}, {
7203                blocks: []
7204            }, e);
7205
7206        function o() {
7207            t.isAlreadyDestroyed || d.each(n.blocks, function(e, t) {
7208                return t.initEvents ? function(o) {
7209                    if (o.eventHolderSelector && o.initEvents) {
7210                        var e = o.traversingFunction || "parents",
7211                            t = d(o.selector)[e](o.eventHolderSelector),
7212                            r = d.map(o.initEvents.split(","), d.trim);
7213                        d.each(t, function() {
7214                            var n = d(this);
7215                            d.each(r, function(e) {
7216                                var t = r[e] + ".theme.equalizer";
7217                                n.on(t, function() {
7218                                    a(o)
7219                                })
7220                            })
7221                        })
7222                    }
7223                }(t) : a(t), !0
7224            })
7225        }
7226
7227        function a(a) {
7228            a.property = a.property || "height";
7229            var e = d.extend({}, a),
7230                t = -1 !== a.property.indexOf("height") ? r : i;
7231            d.extend(a, t, e);
7232            var n = d(a.selector);
7233            if (0 === n.length) return !0;
7234            var o = [n];
7235            a.byRow && !a.target && (n.each(function() {
7236                var e = d(this),
7237                    t = e.css("display");
7238                "inline-block" !== t && "flex" !== t && "inline-flex" !== t && (t = "block !important"), e.attr("style") && e.data("equalizer-style-cache", e.attr("style")), -1 !== a.property.indexOf("height") ? e.css({
7239                    display: t,
7240                    "padding-top": "0",
7241                    "padding-bottom": "0",
7242                    "margin-top": "0",
7243                    "margin-bottom": "0",
7244                    "border-top-width": "0",
7245                    "border-bottom-width": "0",
7246                    height: "100px",
7247                    overflow: "hidden"
7248                }) : e.css({
7249                    display: t,
7250                    "padding-left": "0",
7251                    "padding-right": "0",
7252                    "margin-left": "0",
7253                    "margin-right": "0",
7254                    "border-left-width": "0",
7255                    "border-right-width": "0",
7256                    width: "100px",
7257                    overflow: "hidden"
7258                })
7259            }), o = function(e) {
7260                var o = null,
7261                    r = [];
7262                return d(e).each(function() {
7263                    var e = d(this),
7264                        t = e.offset().top - s(e.css("margin-top")),
7265                        n = 0 < r.length ? r[r.length - 1] : null;
7266                    null == n ? r.push(e) : Math.floor(Math.abs(o - t)) <= 1 ? r[r.length - 1] = n.add(e) : r.push(e), o = t
7267                }), r
7268            }(n), n.each(function() {
7269                var e = d(this);
7270                e.data("equalizer-style-cache") ? (e.attr("style", e.data("equalizer-style-cache")), e.removeData("equalizer-style-cache")) : e.removeAttr("style")
7271            })), d.each(o, function(e, t) {
7272                var n = d(t),
7273                    i = 0;
7274                if (a.target) i = l(a.target, a);
7275                else {
7276                    if (a.byRow && n.length <= 1) return void n.css(a.property, "");
7277                    n.each(function() {
7278                        var e = d(this),
7279                            t = e.attr("style"),
7280                            n = e.css("display");
7281                        "inline-block" !== n && "flex" !== n && "inline-flex" !== n && (n = "block");
7282                        var o = {
7283                            display: n
7284                        };
7285                        o[a.property] = "", e.css(o);
7286                        var r = l(e, a);
7287                        i < r && (i = r), t ? e.attr("style", t) : e.css("display", "")
7288                    })
7289                }
7290                n.each(function() {
7291                    var e = d(this),
7292                        t = 0;
7293                    a.target && e.is(a.target) || ("border-box" !== e.css("box-sizing") && (-1 !== a.property.indexOf("height") ? (t += s(e.css("border-top-width")) + s(e.css("border-bottom-width")), t += s(e.css("padding-top")) + s(e.css("padding-bottom"))) : (t += s(e.css("border-left-width")) + s(e.css("border-right-width")), t += s(e.css("padding-left")) + s(e.css("padding-right")))), e.css(a.property, i - t + "px"))
7294                })
7295            })
7296        }
7297
7298        function l(e, t) {
7299            var n = [];
7300            return -1 !== t.measurementFunction.indexOf("outer") && n.push(t.includeMargin), e[t.measurementFunction].apply(e, n)
7301        }
7302
7303        function s(e) {
7304            return parseFloat(e) || 0
7305        }
7306
7307        function c() {
7308            d(window).width() !== t.windowWidth && (clearTimeout(t.windowDelay), t.windowDelay = window.setTimeout(function() {
7309                o()
7310            }, t.windowTimeout))
7311        }
7312
7313        function u() {
7314            o()
7315        }
7316        return {
7317            init: function() {
7318                d(window).on("resize.theme.equalizer", c), d(window).on("orientationchange.theme.equalizer", u), o()
7319            },
7320            destroy: function() {
7321                d(window).off("resize.theme.equalizer", c), d(window).off("orientationchange.theme.equalizer", u), d.each(n.blocks, function(e, t) {
7322                    if (t.eventHolderSelector && t.initEvents) {
7323                        var n = t.traversingFunction || "parents",
7324                            o = d(t.selector)[n](t.eventHolderSelector),
7325                            r = d.map(t.initEvents.split(","), d.trim);
7326                        d.each(o, function() {
7327                            d(this), d.each(r, function(e) {
7328                                r[e]
7329                            })
7330                        })
7331                    }
7332                }), d.each(n.blocks, function(e, n) {
7333                    var t = d(n.selector);
7334                    d.each(t, function(e, t) {
7335                        d(t).css(n.property, "")
7336                    })
7337                })
7338            }
7339        }
7340    }, e.filters = function(e) {
7341        var t = d.extend({}, {
7342            overlayElementSelector: ".overlayOffCanvas",
7343            ajaxFiltersElement: ".nopAjaxFilters7Spikes",
7344            closePanelAfterFiltrationDataAttribute: "closefilterspanelafterfiltrationinmobile"
7345        }, e);
7346
7347        function n() {
7348            d(t.overlayElementSelector).trigger("click.theme.overlay")
7349        }
7350        return {
7351            init: function() {
7352                "true" === d(t.ajaxFiltersElement).attr("data-" + t.closePanelAfterFiltrationDataAttribute) && d(document).on("nopAjaxFiltersFiltrationCompleteEvent.theme.filters", n)
7353            },
7354            destroy: function() {
7355                d(document).off("nopAjaxFiltersFiltrationCompleteEvent.theme.filters", n)
7356            }
7357        }
7358    }, e.flyoutCart = function(e) {
7359        var r = {
7360                flyoutCartUrl: "",
7361                removeItemFromCartUrl: "",
7362                ajaxCartSuccessProcessFunction: function() {}
7363            },
7364            n = d.extend({}, {
7365                flyoutCartSelector: "#flyout-cart",
7366                flyoutCartScrollbarSelector: "#flyout-cart .items",
7367                removeItemSelector: "#flyout-cart .remove-item"
7368            }, e);
7369
7370        function t() {
7371            i()
7372        }
7373
7374        function o(e) {
7375            e.preventDefault();
7376            var t = d(this).closest(".item"),
7377                n = parseInt(t.attr("data-shoppingCartId"));
7378            if (!isNaN(n) && 0 !== n) {
7379                var o = {
7380                    shoppingCartId: n
7381                };
7382                d.ajax({
7383                    cache: !1,
7384                    type: "POST",
7385                    url: r.removeItemFromCartUrl,
7386                    data: o,
7387                    dataType: "json"
7388                }).done(function(e) {					
7389					if (typeof gtag !== "undefined") {
7390						let $product = $('.item[data-shoppingcartid='+n+']').find('.product')
7391						let productId = $product.data('productid')
7392					
7393						let price = parseFloat($product.find('.price span').text().replaceAll("€", "").replaceAll(",", "."))
7394						var quantity = parseInt($product.find('.quantity span').text())
7395
7396						$.get('/frontend/GetSkuPriceById?id=' + productId, function (data) {
7397							let sku = data.Item1
7398							let name = data.Item3
7399							let brand = data.Item4
7400							let breadcrumb = data.Item6
7401
7402							gtag('event', 'Rimozione dal carrello', {
7403								'event_category': 'Processo di acquisto',
7404								'event_label': sku,
7405								'value': ''
7406							})
7407
7408							// The new Google Analytics 4 ecommerce implementation.
7409							gtag('event', 'remove_from_cart', {
7410								'send_to': 'G-XPD3MPJT10',
7411								'currency': 'EUR',
7412								'value': quantity * price,
7413								'items': [
7414									{
7415										'item_id': sku,
7416										'item_name': name,
7417										'item_brand': brand,
7418										'item_category': breadcrumb[0] ? breadcrumb[0].Name : "",
7419										'item_category2': breadcrumb[1] ? breadcrumb[1].Name : "",
7420										'item_category3': breadcrumb[2] ? breadcrumb[2].Name : "",
7421										'item_category4': breadcrumb[3] ? breadcrumb[3].Name : "",
7422										'item_category5': breadcrumb[4] ? breadcrumb[4].Name : "",
7423										'quantity': quantity,
7424										'price': price
7425									}
7426								]
7427							});                        
7428						}).always(function () {
7429							e.success && i(n)
7430						})
7431					}
7432					else {
7433						e.success && i(n)	
7434					}                    
7435                })
7436            }
7437        }
7438
7439        function i(t) {
7440            d.ajax({
7441                cache: !1,
7442                type: "GET",
7443                url: r.flyoutCartUrl
7444            }).done(function(e) {
7445                var o = d(n.flyoutCartSelector).children();
7446                d(e).filter(n.flyoutCartSelector).children().each(function(e, t) {
7447                    var n = d(t);
7448                    d(o[e]).replaceWith(n)
7449                }), t && d(document).trigger("removeItemFlyoutCart", [t]), d(document).trigger("initializePerfectScrollbar.theme", [d(n.flyoutCartScrollbarSelector)])
7450            })
7451        }
7452        return {
7453            init: function() {
7454                r.flyoutCartUrl = d(n.flyoutCartSelector).attr("data-flyoutCartUrl"), r.removeItemFromCartUrl = d(n.flyoutCartSelector).attr("data-removeItemFromCartUrl"), d(document).on("click.theme.flyoutCartRemoveItem", n.removeItemSelector, o), d(document).on("nopAjaxCartProductAddedToCartEvent nopcommerceAjaxCartProductAddedToCartEvent", t), "object" == typeof window.nopAjaxCart && (window.nopAjaxCart.shouldRefreshFlyoutCart = !1), "object" == typeof window.AjaxCart && (r.ajaxCartSuccessProcessFunction = window.AjaxCart.success_process, window.AjaxCart.success_process = function(e) {
7455                    r.ajaxCartSuccessProcessFunction(e), e.success && d(document).trigger("nopcommerceAjaxCartProductAddedToCartEvent")
7456                })
7457            },
7458            destroy: function() {
7459                d(document).off("click.theme.flyoutCartRemoveItem", n.removeItemSelector, o), d(document).off("nopAjaxCartProductAddedToCartEvent nopcommerceAjaxCartProductAddedToCartEvent", t), "object" == typeof window.nopAjaxCart && (window.nopAjaxCart.shouldRefreshFlyoutCart = !0), "object" == typeof window.AjaxCart && (window.AjaxCart.success_process = r.ajaxCartSuccessProcessFunction)
7460            }
7461        }
7462    }, e.goToTop = function(e) {
7463        var t = d.extend({}, {
7464            scrollElementSelector: "#goToTop",
7465            scrollBarrier: 100,
7466            scrollSpeed: 400,
7467            animation: {
7468                type: "none",
7469                speed: 0
7470            }
7471        }, e);
7472
7473        function n() {
7474            d("html, body").animate({
7475                scrollTop: 0
7476            }, t.scrollSpeed)
7477        }
7478
7479        function o() {
7480            d(window).scrollTop() > t.scrollBarrier ? d(t.scrollElementSelector)[t.animation.in](t.animation.speed) : d(t.scrollElementSelector)[t.animation.out](t.animation.speed)
7481        }
7482        return d.extend(t.animation, function(e) {
7483            var t = {};
7484            switch (e.type) {
7485                case "fade":
7486                    t.in = "fadeIn", t.out = "fadeOut";
7487                    break;
7488                case "slide":
7489                    t.in = "slideDown", t.out = "slideUp";
7490                    break;
7491                default:
7492                    t.in = "show", t.out = "hide", t.speed = 0
7493            }
7494            return t
7495        }(t.animation)), {
7496            init: function() {
7497                d(t.scrollElementSelector).on("click.theme.goToTop", n), d(window).on("scroll.theme.goToTop", o)
7498            },
7499            destroy: function() {
7500                d(t.scrollElementSelector).off("click.theme.goToTop", n), d(window).off("scroll.theme.goToTop", o)
7501            }
7502        }
7503    }, e.header = function(e) {
7504        var o = {
7505                insertAction: "appendTo",
7506                animation: {
7507                    type: "none"
7508                }
7509            },
7510            r = d.extend({}, {
7511                modules: [],
7512                activeClass: "active"
7513            }, e);
7514
7515        function t() {
7516            n()
7517        }
7518
7519        function n(n) {
7520            d.each(r.modules, function(e, t) {
7521                d(t.content).hasClass(r.activeClass) && 0 < d(t.content).not(n).length && (t.hasCloser ? d(t.closer).triggerHandler("click.theme.header.moduleClosers-" + t.id) : t.hasOpener && d(t.opener).triggerHandler("click.theme.header.moduleOpeners-" + t.id))
7522            })
7523        }
7524        return {
7525            init: function() {
7526                d.each(r.modules, function(e, t) {
7527                    ! function(e, t) {
7528                        var n = d.extend({}, t);
7529                        d.extend(t, o, n), d.extend(t.animation, function(e) {
7530                            var t = {};
7531                            switch (e.type) {
7532                                case "fade":
7533                                    t.in = "fadeIn", t.out = "fadeOut", t.toggleParameter = e.toggleParameter || "slow";
7534                                    break;
7535                                case "slide":
7536                                    t.in = "slideDown", t.out = "slideUp", t.toggleParameter = e.toggleParameter || "slow";
7537                                    break;
7538                                default:
7539                                    t.in = "addClass", t.out = "removeClass", t.toggleParameter = e.toggleParameter || "opened"
7540                            }
7541                            return t
7542                        }(t.animation)), t.id = e, t.hasOpener = t.hasOwnProperty("opener") && 0 < d(t.opener).length, t.hasCloser = t.hasOwnProperty("closer") && 0 < d(t.closer).length, t.hasContent = t.hasOwnProperty("content") && 0 < d(t.content).length, t.hasElementToAttach = t.hasOwnProperty("elementToAttach") && 0 < d(t.elementToAttach).length, t.hasPreventClicking = t.hasOwnProperty("preventClicking") && t.preventClicking, t.hasOverlay = t.hasOwnProperty("overlay") && t.overlay, t.hasInitialStyle = t.hasOwnProperty("initialStyle"), t.hasDisablePageScroll = t.hasOwnProperty("disablePageScroll") && t.disablePageScroll, t.hasScrollbar = !1, t.scrollbarElement = !1, t.hasOwnProperty("scrollbar") && ("boolean" == typeof t.scrollbar && t.scrollbar && t.hasContent ? (t.hasScrollbar = !0, t.scrollbarElement = t.content) : "string" == typeof t.scrollbar && 0 < d(t.scrollbar).length && (t.hasScrollbar = !0, t.scrollbarElement = t.scrollbar))
7543                    }(e, t), t.hasOpener && t.hasContent ? (t.hasElementToAttach && d(document).trigger("detachElement.theme", [t.content, t.elementToAttach, t.insertAction]), d(t.opener).on("click.theme.header.moduleOpeners-" + t.id, function(e) {
7544                        t.hasPreventClicking && e.preventDefault(), n(d(t.content)), d(t.content).toggleClass(r.activeClass),
7545                            function(e) {
7546                                var t = [],
7547                                    n = !1,
7548                                    o = !1;
7549                                e.hasOverlay && e.hasContent && (n = d(e.content).hasClass(r.activeClass), e.hasDisablePageScroll && e.hasContent && n && (o = d(e.content).hasClass(r.activeClass)));
7550                                t.push(n, o), "none" !== e.animation.type && t.push(e.animation.toggleParameter);
7551                                d(document).trigger("toggleOverlay.theme", t)
7552                            }(t), d(t.content).hasClass(r.activeClass) ? d(t.content)[t.animation.in](t.animation.toggleParameter) : d(t.content)[t.animation.out](t.animation.toggleParameter)
7553                    }), t.hasCloser && d(t.closer).on("click.theme.header.moduleClosers-" + t.id, function() {
7554                        d(t.opener).triggerHandler("click.theme.header.moduleOpeners-" + t.id), d(this).trigger("headerModuleClosed.theme")
7555                    })) : !t.hasOpener && t.hasContent && t.hasElementToAttach && d(document).trigger("detachElement.theme", [t.content, t.elementToAttach, t.insertAction]), t.hasInitialStyle && t.hasContent && (d(t.content).data("header-style-cache", d(t.content).attr("style")), d(t.content).css(t.initialStyle)), t.hasScrollbar && d(document).trigger("initializePerfectScrollbar.theme", [d(t.scrollbarElement)])
7556                }), d(document).on("removeOverlay.theme", t)
7557            },
7558            destroy: function() {
7559                n(), d.each(r.modules, function(e, t) {
7560                    t.hasInitialStyle && t.hasContent && (d(t.content).attr("style", d(t.content).data("header-style-cache") || ""), d(t.content).removeData("header-style-cache")), t.hasOpener && t.hasContent && (d(t.opener).off("click.theme.header.moduleOpeners-" + t.id), t.hasCloser && d(t.closer).off("click.theme.header.moduleClosers-" + t.id))
7561                }), d(document).off("removeOverlay.theme", t)
7562            }
7563        }
7564    }, e.menu = function(e) {
7565        var a = {
7566                sublistIndentSelectors: []
7567            },
7568            l = d.extend(!0, {}, {
7569                activeClass: "active",
7570                sublistWrapSelector: ".sublist-wrap",
7571                plusButtonSelector: ".plus-button",
7572                backButtonSelector: ".back-button",
7573                closeMenuSelector: ".close-menu > span",
7574                reverseTopLevelMenuItemsZIndex: !1,
7575                sublistIndent: {
7576                    enabled: !1,
7577                    ulSelectorMegaMenu: ".mega-menu-responsive",
7578                    ulSelectorHeaderMenu: ".header-menu > ul",
7579                    withSubcategoriesSelector: ".with-subcategories",
7580                    topLevelMenuWidth: 320,
7581                    sublistIndent: 7,
7582                    initialZIndex: 1
7583                }
7584            }, e);
7585
7586        function t() {
7587            var e = d(this).siblings(l.sublistWrapSelector);
7588            e.addClass(l.activeClass), d(document).trigger("initializePerfectScrollbar.theme", [e])
7589        }
7590
7591        function n() {
7592            d(this).closest(l.sublistWrapSelector).removeClass(l.activeClass)
7593        }
7594
7595        function o() {
7596            var e = i();
7597            d(e + " " + l.sublistWrapSelector + "." + l.activeClass).removeClass(l.activeClass)
7598        }
7599
7600        function r() {
7601            var e = i();
7602            return d(e + " > li").get().reverse()
7603        }
7604
7605        function i() {
7606            var e = l.sublistIndent.ulSelectorHeaderMenu;
7607            return 0 < d(l.sublistIndent.ulSelectorMegaMenu).length && (e = l.sublistIndent.ulSelectorMegaMenu), e
7608        }
7609        return {
7610            init: function() {
7611                d(l.plusButtonSelector).on("click.theme.menu.plusButton", t), d(l.backButtonSelector).on("click.theme.menu.backButton", n), d(l.closeMenuSelector).on("headerModuleClosed.theme", o), l.reverseTopLevelMenuItemsZIndex && function() {
7612                    var e = r();
7613                    d(e).css("z-index", function(e) {
7614                        return e + 1
7615                    })
7616                }(), l.sublistIndent.enabled && function e(t, n, o, r) {
7617                    d(t).each(function() {
7618                        d(this).attr("style") && d(this).data("menu-style-cache", d(this).attr("style")), d(this).css({
7619                            width: o - l.sublistIndent.sublistIndent,
7620                            "z-index": d(this).css("z-index") + r
7621                        })
7622                    }), a.sublistIndentSelectors.push(t);
7623                    var i = t + " > .sublist > li > " + l.sublistWrapSelector;
7624                    0 < d(i).length && e(i, n, o - l.sublistIndent.sublistIndent, r + 1)
7625                }(i() + " > li > " + l.sublistWrapSelector, l.sublistIndent.withSubcategoriesSelector, l.sublistIndent.topLevelMenuWidth, l.sublistIndent.initialZIndex)
7626            },
7627            destroy: function() {
7628                d(l.plusButtonSelector).off("click.theme.menu.plusButton", t), d(l.backButtonSelector).off("click.theme.menu.backButton", n), d(l.closeMenuSelector).off("headerModuleClosed.theme", o), l.reverseTopLevelMenuItemsZIndex && function() {
7629                    var e = r();
7630                    d(e).css("z-index", "")
7631                }(), l.sublistIndent.enabled && function() {
7632                    for (; a.sublistIndentSelectors.length;) {
7633                        var e = a.sublistIndentSelectors.pop();
7634                        d(e).each(function() {
7635                            d(this).data("menu-style-cache") ? (d(this).attr("style", d(this).data("menu-style-cache")), d(this).removeData("menu-style-cache")) : d(this).removeAttr("style")
7636                        })
7637                    }
7638                }()
7639            }
7640        }
7641    }, e.overlay = function(e) {
7642        var i = d.extend({}, {
7643            overlayElementSelector: ".overlayOffCanvas",
7644            overlayClass: "active",
7645            noPageScrollClass: "noYScroll"
7646        }, e);
7647
7648        function t(e, t, n, o) {
7649            var r = o || 400;
7650            t ? d(i.overlayElementSelector).addClass(i.overlayClass).fadeIn(r) : d(i.overlayElementSelector).removeClass(i.overlayClass).fadeOut(r), d("html, body").toggleClass(i.noPageScrollClass, n)
7651        }
7652
7653        function n() {
7654            d(this).removeClass(i.overlayClass).fadeOut(), d(document).trigger("removeOverlay.theme")
7655        }
7656        return {
7657            init: function() {
7658                d(document).on("toggleOverlay.theme", t), d(i.overlayElementSelector).on("click.theme.overlay", n)
7659            },
7660            destroy: function() {
7661                d(i.overlayElementSelector).removeClass(i.overlayClass).fadeOut(), d("html, body").removeClass(i.noPageScrollClass), d(document).off("toggleOverlay.theme", t), d(i.overlayElementSelector).off("click.theme.overlay", n)
7662            }
7663        }
7664    }, e.perfectScrollbar = function() {
7665        var n = {
7666            scrollbarElements: []
7667        };
7668
7669        function e(e, t) {
7670            t && t.length && !t.data("perfect-scrollbar") && (t.perfectScrollbar({
7671                swipePropagation: !1,
7672                wheelSpeed: 1,
7673                suppressScrollX: !0
7674            }), n.scrollbarElements.push(t))
7675        }
7676
7677        function t(e, t) {
7678            t && t.length && t.data("perfect-scrollbar") && t.perfectScrollbar("update")
7679        }
7680        return {
7681            init: function() {
7682                d(document).on("initializePerfectScrollbar.theme", e), d(document).on("updatePerfectScrollbar.theme", t)
7683            },
7684            destroy: function() {
7685                for (d(document).off("initializePerfectScrollbar.theme", e), d(document).off("updatePerfectScrollbar.theme", t); n.scrollbarElements.length;) {
7686                    n.scrollbarElements.pop().perfectScrollbar("destroy")
7687                }
7688            }
7689        }
7690    }, e.productPageThumbs = function(e) {
7691        var o = {
7692                isInCarousel: ""
7693            },
7694            r = d.extend({}, {
7695                thumbGallerySelector: ".gallery",
7696                thumbGalleryInCarouselSelector: ".picture-thumbs-list",
7697                thumbItemSelector: ".cloudzoom-gallery",
7698                thumbItemInCarouselSelector: ".picture-thumbs-item",
7699                thumbActiveClass: "active",
7700                prevArrowSelector: ".picture-thumbs-prev-arrow",
7701                nextArrowSelector: ".picture-thumbs-next-arrow"
7702            }, e);
7703
7704        function t() {
7705            var e = d(r.thumbItemSelector).filter(function() {
7706                    return !d(this).parent().hasClass("slick-cloned")
7707                }),
7708                t = e.filter("." + r.thumbActiveClass),
7709                n = t.prev(r.thumbItemSelector);
7710            o.isInCarousel && (n = t.parent(r.thumbItemInCarouselSelector).prev(r.thumbItemInCarouselSelector + ":not(.slick-cloned)").find(r.thumbItemSelector)), 0 === n.length && (n = e.last()), 0 < n.length && (a(), e.removeClass(r.thumbActiveClass), n.addClass(r.thumbActiveClass), n.click()), o.isInCarousel && i("Prev")
7711        }
7712
7713        function n() {
7714            var e = d(r.thumbItemSelector).filter(function() {
7715                    return !d(this).parent().hasClass("slick-cloned")
7716                }),
7717                t = e.filter("." + r.thumbActiveClass),
7718                n = t.next(r.thumbItemSelector);
7719            o.isInCarousel && (n = t.parent(r.thumbItemInCarouselSelector).next(r.thumbItemInCarouselSelector + ":not(.slick-cloned)").find(r.thumbItemSelector)), 0 === n.length && (n = e.first()), 0 < n.length && (a(), e.removeClass(r.thumbActiveClass), n.addClass(r.thumbActiveClass), n.click()), o.isInCarousel && i("Next")
7720        }
7721
7722        function i(e) {
7723            d(r.thumbGalleryInCarouselSelector).slick("slickSetOption", "waitForAnimate", !1, !1), d(r.thumbGalleryInCarouselSelector).slick("slick" + e), d(r.thumbGalleryInCarouselSelector).slick("slickSetOption", "waitForAnimate", !0, !1)
7724        }
7725
7726        function a() {
7727            var e = d("#cloudZoomImage").data("CloudZoom");
7728            e && e.closeZoom()
7729        }
7730        return {
7731            init: function() {
7732                o.isInCarousel = d(r.thumbGalleryInCarouselSelector).length, d(r.thumbGallerySelector).each(function() {
7733                    d(this).find(r.thumbItemSelector).filter(function() {
7734                        return !d(this).parent().hasClass("slick-cloned")
7735                    }).first().addClass(r.thumbActiveClass)
7736                }), d(r.thumbGallerySelector + " " + r.prevArrowSelector).on("click.thumbs.theme", t), d(r.thumbGallerySelector + " " + r.nextArrowSelector).on("click.thumbs.theme", n)
7737            },
7738            destroy: function() {
7739                d(r.thumbGallerySelector).each(function() {
7740                    d(this).find(r.thumbItemSelector).filter(function() {
7741                        return !d(this).parent().hasClass("slick-cloned")
7742                    }).removeClass(r.thumbActiveClass)
7743                }
7743), d(r.thumbGallerySelector + " " + r.prevArrowSelector).off("click.thumbs.theme", t), d(r.thumbGallerySelector + " " + r.nextArrowSelector).off("click.thumbs.theme", n)
7744            }
7745        }
7746    }, e.productQuantity = function(e) {
7747        var o = d.extend({}, {
7748            quantityInputSelector: ".qty-input",
7749            incrementSelectors: ".increase",
7750            decrementSelectors: ".decrease"
7751        }, e);
7752
7753        function t(e) {
7754            e.preventDefault(), e.stopPropagation();
7755            var t = d(e.currentTarget).siblings(o.quantityInputSelector),
7756                n = parseInt(t.val());
7757            if (isNaN(n)) return t.val(1), t.trigger("input"), void t.trigger("change");
7758            n++, t.val(n), t.trigger("input"), t.trigger("change")
7759        }
7760
7761        function n(e) {
7762            e.preventDefault(), e.stopPropagation();
7763            var t = d(e.currentTarget).siblings(o.quantityInputSelector),
7764                n = parseInt(t.val());
7765            if (isNaN(n)) return t.val(1), t.trigger("input"), void t.trigger("change");
7766            n <= 1 || (n--, t.val(n), t.trigger("input"), t.trigger("change"))
7767        }
7768        return {
7769            init: function() {
7770                d(document).on("click.theme.incrementQuantityValue", o.incrementSelectors, t), d(document).on("click.theme.decrementQuantityValue", o.decrementSelectors, n)
7771            },
7772            destroy: function() {
7773                d(document).off("click.theme.incrementQuantityValue", o.incrementSelectors, t), d(document).off("click.theme.decrementQuantityValue", o.decrementSelectors, n)
7774            }
7775        }
7776    }, e.stickyNavigation = function(e) {
7777        var o = d.extend({}, {
7778            stickyElement: ".desktop-nav-wrapper",
7779            stickyElementParent: ".master-header-wrapper",
7780            showStickyOnFirstReverseScroll: !1,
7781            lastScrollTop: 0
7782        }, e);
7783
7784        function t() {
7785            var e = d(o.stickyElement),
7786                t = d(o.stickyElementParent),
7787                n = d(window).scrollTop();
7788            0 < n && n >= t.offset().top ? (e.addClass("stick"), t.css("height", e.height() + "px"), d(document).trigger("navigationHasSticked", [!0])) : (e.removeClass("stick"), t.css("height", ""), d(document).trigger("navigationHasSticked", [!1]))
7789        }
7790
7791        function n() {
7792            t(), o.showStickyOnFirstReverseScroll && function() {
7793                var e = d(o.stickyElement),
7794                    t = d(o.stickyElementParent);
7795                if (0 !== e.length && 0 !== t.length) {
7796                    var n = d(window).scrollTop();
7797                    n <= d(t).offset().top ? e.removeClass("nav-up") : (n > o.lastScrollTop ? e.addClass("nav-up") : e.removeClass("nav-up"), o.lastScrollTop = n)
7798                } else e.removeClass("nav-up")
7799            }()
7800        }
7801        return {
7802            init: function() {
7803                t(), d(window).on("scroll.theme.stickyNav", n)
7804            },
7805            destroy: function() {
7806                var e = d(o.stickyElement),
7807                    t = d(o.stickyElementParent);
7808                e.removeClass("stick nav-up"), t.css("height", ""), d(window).off("scroll.theme.stickyNav", n)
7809            }
7810        }
7811    }, e.toggle = function(e) {
7812        var o = {
7813                traversingFunction: "siblings",
7814                activeClassOpener: "open",
7815                activeClassContent: "active",
7816                beforeToggle: null,
7817                afterToggle: null,
7818                animation: {
7819                    type: "none",
7820                    speed: 0
7821                }
7822            },
7823            t = d.extend({}, {
7824                blocks: []
7825            }, e);
7826        return {
7827            init: function() {
7828                d.each(t.blocks, function(e, t) {
7829                    var n = d.extend({}, t);
7830                    d.extend(t, o, n), d.extend(t.animation, function(e) {
7831                        var t = {};
7832                        switch (e.type) {
7833                            case "fade":
7834                                t.toggleFunction = "fadeToggle";
7835                                break;
7836                            case "slide":
7837                                t.toggleFunction = "slideToggle";
7838                                break;
7839                            case "toggle":
7840                                t.toggleFunction = "toggle", t.speed = 0;
7841                                break;
7842                            default:
7843                                t.toggleFunction = "toggleClass"
7844                        }
7845                        return t
7846                    }(t.animation)), d(t.content).attr("style") && d(t.content).data("toggle-style-cache", d(t.content).attr("style")), d(document).on("click.theme.toggle.toggleOpeners-" + e, t.opener, function() {
7847                        t.beforeToggle && t.beforeToggle(d(this), t), d(this).toggleClass(t.activeClassOpener), "none" !== t.animation.type ? d(this)[t.traversingFunction](t.content)[t.animation.toggleFunction](t.animation.speed).toggleClass(t.activeClassContent) : d(this)[t.traversingFunction](t.content)[t.animation.toggleFunction](t.activeClassContent), t.afterToggle && t.afterToggle(d(this), t)
7848                    })
7849                })
7850            },
7851            destroy: function() {
7852                d.each(t.blocks, function(e, t) {
7853                    d(t.content).data("toggle-style-cache") ? (d(t.content).attr("style", d(t.content).data("toggle-style-cache")), d(t.content).removeData("toggle-style-cache")) : d(t.content).removeAttr("style"), d(t.opener).hasClass(t.activeClassOpener) && d(t.opener).removeClass(t.activeClassOpener), d(t.content).hasClass(t.activeClassContent) && d(t.content).removeClass(t.activeClassContent), d(document).off("
7853click.theme.toggle.toggleOpeners-" + e, t.opener)
7854                })
7855            }
7856        }
7857    }
7858}(jQuery, sevenSpikesCore, window.sevenSpikesThemeModules = window.sevenSpikesThemeModules || {}),
7859function(l, r) {
7860    "use strict";
7861    var e = function(e, t, n) {
7862        var o = this;
7863        o.mobileFirst = n || !1, o.activeModules = [], o.activeBreakpoint = null, o.breakpoints = [], o.breakpointSettings = [], o.windowDelay = null, o.windowWidth = 0, o.settings = l.extend({}, o.settings, e), o.originalSettings = l.extend({}, o.settings), o.dependencies = l.extend({}, o.dependencies, t)
7864    };
7865    e.prototype.init = function() {
7866        this.registerBreakpoints(), this.initializeEvents(), this.initializeModules(), this.checkResponsive(!0)
7867    }, e.prototype.registerBreakpoints = function() {
7868        var e, t, n, o = this,
7869            r = o.settings.responsive || [];
7870        if ("array" === l.type(r) && r.length) {
7871            for (e in r)
7872                if (r.hasOwnProperty(e)) {
7873                    for (n = o.breakpoints.length - 1, t = r[e].breakpoint; 0 <= n;) o.breakpoints[n] && o.breakpoints[n] === t && o.breakpoints.splice(n, 1), n--;
7874                    o.breakpoints.push(t), o.breakpointSettings[t] = r[e].settings
7875                } o.breakpoints.sort(function(e, t) {
7876                return t - e
7877            })
7878        }
7879    }, e.prototype.initializeEvents = function() {
7880        l(window).on("orientationchange.theme", l.proxy(this.orientationChangeHandler, this)), l(window).on("resize.theme", l.proxy(this.resizeHandler, this))
7881    }, e.prototype.checkResponsive = function(e, t) {
7882        var n, o, r = this,
7883            i = !1,
7884            a = window.innerWidth || l(window).width();
7885        if (r.settings.responsive && r.settings.responsive.length && null !== r.settings.responsive) {
7886            for (n in o = null, r.breakpoints) r.breakpoints.hasOwnProperty(n) && (!1 === r.mobileFirst ? a < r.breakpoints[n] && (o = r.breakpoints[n]) : a > r.breakpoints[n] && (o = r.breakpoints[n]));
7887            null !== o ? null !== r.activeBreakpoint && o === r.activeBreakpoint && !t || (r.activeBreakpoint = o, r.settings = l.extend({}, r.originalSettings, r.breakpointSettings[o]), r.refresh(e), i = o) : null !== r.activeBreakpoint && (r.activeBreakpoint = null, r.settings = l.extend({}, r.originalSettings), r.refresh(e), i = null), e || !1 === i || l(document).trigger("themeBreakpoint", [r.settings, i])
7888        }
7889    }, e.prototype.destroyModules = function() {
7890        for (var e = 0; e < this.activeModules.length; e++) {
7891            var t = this.activeModules[e].instance;
7892            "function" == typeof t.destroy && t.destroy()
7893        }
7894        this.activeModules = []
7895    }, e.prototype.initializeModules = function() {
7896        var e = this;
7897        for (var t in e.dependencies)
7898            if (e.dependencies.hasOwnProperty(t) && typeof e.dependencies[t] != 'function') {
7899                for (var n = e.dependencies[t], o = n.module, r = n.dependencies, i = 0; i < r.length; i++) {
7900                    var a = r[i];
7901                    e.initializeModule(a)
7902                }
7903                e.initializeModule(o)
7904            }
7904 for (var l in e.settings) e.settings.hasOwnProperty(l) && e.initializeModule(l)
7905    }, e.prototype.initializeModule = function(e) {
7906        var t = this;
7907        if (!t.isModuleAlreadyInitialized(e) && ("string" != typeof t.settings[e] || "disabled" !== t.settings[e])) {
7908            var n = r[e];
7909            if ("function" == typeof n) {
7910                var o = n(t.settings[e]);
7911                "function" == typeof o.init && (o.init(), t.activeModules.push({
7912                    name: e,
7913                    instance: o
7914                }))
7915            }
7916        }
7917    }, e.prototype.isModuleAlreadyInitialized = function(e) {
7918        for (var t = 0; t < this.activeModules.length; t++)
7919            if (this.activeModules[t].name === e) return !0;
7920        return !1
7921    }, e.prototype.refresh = function() {
7922        this.destroyModules(), this.initializeModules()
7923    }, e.prototype.orientationChangeHandler = function() {
7924        this.checkResponsive()
7925    }, e.prototype.resizeHandler = function() {
7926        var e = this;
7927        l(window).width() !== e.windowWidth && (clearTimeout(e.windowDelay), e.windowDelay = window.setTimeout(function() {
7928            e.windowWidth = l(window).width(), e.checkResponsive()
7929        }, 50))
7930    }, window.sevenSpikesTheme = e
7931}(jQuery, sevenSpikesThemeModules);
7932!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.o
vendor: 3,442 bytes, line 7932
7932ptions.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.
7932slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:
7932parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"}
7932,e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0}
vendor: 5,619 bytes, line 7932
7932,100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};
7932!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}
7932):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+
7932o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
7932,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}});
7933
vendor: 28,231 bytes, lines 7934-7943
7934/*!
7935 * jquery-confirm v3.3.4 (http://craftpip.github.io/jquery-confirm/)
7936 * Author: Boniface Pereira
7937 * Website: www.craftpip.com
7938 * Contact: [email protected]
7939 *
7940 * Copyright 2013-2019 jquery-confirm
7941 * Licensed under MIT (https://github.com/craftpip/jquery-confirm/blob/master/LICENSE)
7942 */
7943(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory);}else{if(typeof module==="object"&&module.exports){module.exports=function(root,jQuery){if(jQuery===undefined){if(typeof window!=="undefined"){jQuery=require("jquery");}else{jQuery=require("jquery")(root);}}factory(jQuery);return jQuery;};}else{factory(jQuery);}}}(function($){var w=window;$.fn.confirm=function(options,option2){if(typeof options==="undefined"){options={};}if(typeof options==="string"){options={content:options,title:(option2)?option2:false};}$(this).each(function(){var $this=$(this);if($this.attr("jc-attached")){console.warn("jConfirm has already been attached to this element ",$this[0]);return;}$this.on("click",function(e){e.preventDefault();var jcOption=$.extend({},options);if($this.attr("data-title")){jcOption.title=$this.attr("data-title");}if($this.attr("data-content")){jcOption.content=$this.attr("data-content");}if(typeof jcOption.buttons==="undefined"){jcOption.buttons={};}jcOption["$target"]=$this;if($this.attr("href")&&Object.keys(jcOption.buttons).length===0){var buttons=$.extend(true,{},w.jconfirm.pluginDefaults.defaultButtons,(w.jconfirm.defaults||{}).defaultButtons||{});var firstBtn=Object.keys(buttons)[0];jcOption.buttons=buttons;jcOption.buttons[firstBtn].action=function(){location.href=$this.attr("href");};}jcOption.closeIcon=false;var instance=$.confirm(jcOption);});$this.attr("jc-attached",true);});return $(this);};$.confirm=function(options,option2){if(typeof options==="undefined"){options={};}if(typeof options==="string"){options={content:options,title:(option2)?option2:false};}var putDefaultButtons=!(options.buttons===false);if(typeof options.buttons!=="object"){options.buttons={};}if(Object.keys(options.buttons).length===0&&putDefaultButtons){var buttons=$.extend(true,{},w.jconfirm.pluginDefaults.defaultButtons,(w.jconfirm.defaults||{}).defaultButtons||{});options.buttons=buttons;}return w.jconfirm(options);};$.alert=function(options,option2){if(typeof options==="undefined"){options={};}if(typeof options==="string"){options={content:options,title:(option2)?option2:false};}var putDefaultButtons=!(options.buttons===false);if(typeof options.buttons!=="object"){options.buttons={};}if(Object.keys(options.buttons).length===0&&putDefaultButtons){var buttons=$.extend(true,{},w.jconfirm.pluginDefaults.defaultButtons,(w.jconfirm.defaults||{}).defaultButtons||{});var firstBtn=Object.keys(buttons)[0];options.buttons[firstBtn]=buttons[firstBtn];}return w.jconfirm(options);};$.dialog=function(options,option2){if(typeof options==="undefined"){options={};}if(typeof options==="string"){options={content:options,title:(option2)?option2:false,closeIcon:function(){}};}options.buttons={};if(typeof options.closeIcon==="undefined"){options.closeIcon=function(){};}options.confirmKeys=[13];return w.jconfirm(options);};w.jconfirm=function(options){if(typeof options==="undefined"){options={};}var pluginOptions=$.extend(true,{},w.jconfirm.pluginDefaults);if(w.jconfirm.defaults){pluginOptions=$.extend(true,pluginOptions,w.jconfirm.defaults);}pluginOptions=$.extend(true,{},pluginOptions,options);var instance=new w.Jconfirm(pluginOptions);w.jconfirm.instances.push(instance);return instance;};w.Jconfirm=function(options){$.extend(this,options);this._init();};w.Jconfirm.prototype={_init:function(){var that=this;if(!w.jconfirm.instances.length){w.jconfirm.lastFocused=$("body").find(":focus");}this._id=Math.round(Math.random()*99999);this.contentParsed=$(document.createElement("div"));if(!this.lazyOpen){setTimeout(function(){that.open();},0);}},_buildHTML:function(){var that=this;this._parseAnimation(this.animation,"o");this._parseAnimation(this.closeAnimation,"c");this._parseBgDismissAnimation(this.backgroundDismissAnimation);this._parseColumnClass(this.columnClass);this._parseTheme(this.theme);this._parseType(this.type);var template=$(this.template);template.find(".jconfirm-box").addClass(this.animationParsed).addClass(this.backgroundDismissAnimationParsed).addClass(this.typeParsed);if(this.typeAnimated){template.find(".jconfirm-box").addClass("jconfirm-type-animated");}if(this.useBootstrap){template.find(".jc-bs3-row").addClass(this.bootstrapClasses.row);template.find(".jc-bs3-row").addClass("justify-content-md-center justify-content-sm-center justify-content-xs-center justify-content-lg-center");template.find(".jconfirm-box-container").addClass(this.columnClassParsed);if(this.containerFluid){template.find(".jc-bs3-container").addClass(this.bootstrapClasses.containerFluid);}else{template.find(".jc-bs3-container").addClass(this.bootstrapClasses.container);}}else{template.find(".jconfirm-box").css("width",this.boxWidth);}if(this.titleClass){template.find(".jconfirm-title-c").addClass(this.titleClass);}template.addClass(this.themeParsed);var ariaLabel="jconfirm-box"+this._id;template.find(".jconfirm-box").attr("aria-labelledby",ariaLabel).attr("tabindex",-1);template.find(".jconfirm-content").attr("id",ariaLabel);if(this.bgOpacity!==null){template.find(".jconfirm-bg").css("opacity",this.bgOpacity);}if(this.rtl){template.addClass("jconfirm-rtl");}this.$el=template.appendTo(this.container);this.$jconfirmBoxContainer=this.$el.find(".jconfirm-box-container");this.$jconfirmBox=this.$body=this.$el.find(".jconfirm-box");this.$jconfirmBg=this.$el.find(".jconfirm-bg");this.$title=this.$el.find(".jconfirm-title");this.$titleContainer=this.$el.find(".jconfirm-title-c");this.$content=this.$el.find("div.jconfirm-content");this.$contentPane=this.$el.find(".jconfirm-content-pane");this.$icon=this.$el.find(".jconfirm-icon-c");this.$closeIcon=this.$el.find(".jconfirm-closeIcon");this.$holder=this.$el.find(".jconfirm-holder");this.$btnc=this.$el.find(".jconfirm-buttons");this.$scrollPane=this.$el.find(".jconfirm-scrollpane");that.setStartingPoint();this._contentReady=$.Deferred();this._modalReady=$.Deferred();this.$holder.css({"padding-top":this.offsetTop,"padding-bottom":this.offsetBottom,});this.setTitle();this.setIcon();this._setButtons();this._parseContent();this.initDraggable();if(this.isAjax){this.showLoading(false);}$.when(this._contentReady,this._modalReady).then(function(){if(that.isAjaxLoading){setTimeout(function(){that.isAjaxLoading=false;that.setContent();that.setTitle();that.setIcon();setTimeout(function(){that.hideLoading(false);that._updateContentMaxHeight();},100);if(typeof that.onContentReady==="function"){that.onContentReady();}},50);}else{that._updateContentMaxHeight();that.setTitle();that.setIcon();if(typeof that.onContentReady==="function"){that.onContentReady();}}if(that.autoClose){that._startCountDown();}}).then(function(){that._watchContent();});if(this.animation==="none"){this.animationSpeed=1;this.animationBounce=1;}this.$body.css(this._getCSS(this.animationSpeed,this.animationBounce));this.$contentPane.css(this._getCSS(this.animationSpeed,1));this.$jconfirmBg.css(this._getCSS(this.animationSpeed,1));this.$jconfirmBoxContainer.css(this._getCSS(this.animationSpeed,1));},_typePrefix:"jconfirm-type-",typeParsed:"",_parseType:function(type){this.typeParsed=this._typePrefix+type;},setType:function(type){var oldClass=this.typeParsed;this._parseType(type);this.$jconfirmBox.removeClass(oldClass).addClass(this.typeParsed);},themeParsed:"",_themePrefix:"jconfirm-",setTheme:function(theme){var previous=this.theme;this.theme=theme||this.theme;this._parseTheme(this.theme);if(previous){this.$el.removeClass(previous);}this.$el.addClass(this.themeParsed);this.theme=theme;},_parseTheme:function(theme){var that=this;theme=theme.split(",");$.each(theme,function(k,a){if(a.indexOf(that._themePrefix)===-1){theme[k]=that._themePrefix+$.trim(a);}});this.themeParsed=theme.join(" ").toLowerCase();},backgroundDismissAnimationParsed:"",_bgDismissPrefix:"jconfirm-hilight-",_parseBgDismissAnimation:function(bgDismissAnimation){var animation=bgDismissAnimation.split(",");var that=this;$.each(animation,function(k,a){if(a.indexOf(that._bgDismissPrefix)===-1){animation[k]=that._bgDismissPrefix+$.trim(a);}});this.backgroundDismissAnimationParsed=animation.join(" ").toLowerCase();},animationParsed:"",closeAnimationParsed:"",_animationPrefix:"jconfirm-animation-",setAnimation:function(animation){this.animation=animation||this.animation;this._parseAnimation(this.animation,"o");},_parseAnimation:function(animation,which){which=which||"o";var animations=animation.split(",");var that=this;$.each(animations,function(k,a){if(a.indexOf(that._animationPrefix)===-1){animations[k]=that._animationPrefix+$.trim(a);}});var a_string=animations.join(" ").toLowerCase();if(which==="o"){this.animationParsed=a_string;}else{this.closeAnimationParsed=a_string;}return a_string;},setCloseAnimation:function(closeAnimation){this.closeAnimation=closeAnimation||this.closeAnimation;this._parseAnimation(this.closeAnimation,"c");},setAnimationSpeed:function(speed){this.animationSpeed=speed||this.animationSpeed;},columnClassParsed:"",setColumnClass:function(colClass){if(!this.useBootstrap){console.warn("cannot set columnClass, useBootstrap is set to false");return;}this.columnClass=colClass||this.columnClass;this._parseColumnClass(this.columnClass);this.$jconfirmBoxContainer.addClass(this.columnClassParsed);},_updateContentMaxHeight:function(){var height=$(window).height()-(this.$jconfirmBox.outerHeight()-this.$contentPane.outerHeight())-(this.offsetTop+this.offsetBottom);this.$contentPane.css({"max-height":height+"px"});},setBoxWidth:function(width){if(this.useBootstrap){console.warn("cannot set boxWidth, useBootstrap is set to true");return;}this.boxWidth=width;this.$jconfirmBox.css("width",width);},_parseColumnClass:function(colClass){colClass=colClass.toLowerCase();var p;switch(colClass){case"xl":case"xlarge":p="col-md-12";break;case"l":case"large":p="col-md-8 col-md-offset-2";break;case"m":case"medium":p="col-md-6 col-md-offset-3";break;case"s":case"small":p="col-md-4 col-md-offset-4";break;case"xs":case"xsmall":p="col-md-2 col-md-offset-5";break;default:p=colClass;}this.columnClassParsed=p;},initDraggable:function(){var that=this;var $t=this.$titleContainer;this.resetDrag();if(this.draggable){$t.on("mousedown",function(e){$t.addClass("jconfirm-hand");that.mouseX=e.clientX;that.mouseY=e.clientY;that.isDrag=true;});$(window).on("mousemove."+this._id,function(e){if(that.isDrag){that.movingX=e.clientX-that.mouseX+that.initialX;that.movingY=e.clientY-that.mouseY+that.initialY;that.setDrag();}});$(window).on("mouseup."+this._id,function(){$t.removeClass("jconfirm-hand");if(that.isDrag){that.isDrag=false;that.initialX=that.movingX;that.initialY=that.movingY;}});}},resetDrag:function(){this.isDrag=false;this.initialX=0;this.initialY=0;this.movingX=0;this.movingY=0;this.mouseX=0;this.mouseY=0;this.$jconfirmBoxContainer.css("transform","translate("+0+"px, "+0+"px)");},setDrag:function(){if(!this.draggable){return;}this.alignMiddle=false;var boxWidth=this.$jconfirmBox.outerWidth();var boxHeight=this.$jconfirmBox.outerHeight();var windowWidth=$(window).width();var windowHeight=$(window).height();var that=this;var dragUpdate=1;if(that.movingX%dragUpdate===0||that.movingY%dragUpdate===0){if(that.dragWindowBorder){var leftDistance=(windowWidth/2)-boxWidth/2;var topDistance=(windowHeight/2)-boxHeight/2;topDistance-=that.dragWindowGap;leftDistance-=that.dragWindowGap;if(leftDistance+that.movingX<0){that.movingX=-leftDistance;}else{if(leftDistance-that.movingX<0){that.movingX=leftDistance;}}if(topDistance+that.movingY<0){that.movingY=-topDistance;}else{if(topDistance-that.movingY<0){that.movingY=topDistance;}}}that.$jconfirmBoxContainer.css("transform","translate("+that.movingX+"px, "+that.movingY+"px)");}},_scrollTop:function(){if(typeof pageYOffset!=="undefined"){return pageYOffset;}else{var B=document.body;var D=document.documentElement;D=(D.clientHeight)?D:B;return D.scrollTop;}},_watchContent:function(){var that=this;if(this._timer){clearInterval(this._timer);}var prevContentHeight=0;this._timer=setInterval(function(){if(that.smoothContent){var contentHeight=that.$content.outerHeight()||0;if(contentHeight!==prevContentHeight){prevContentHeight=contentHeight;}var wh=$(window).height();var total=that.offsetTop+that.offsetBottom+that.$jconfirmBox.height()-that.$contentPane.height()+that.$content.height();if(total<wh){that.$contentPane.addClass("no-scroll");}else{that.$contentPane.removeClass("no-scroll");}}},this.watchInterval);},_overflowClass:"jconfirm-overflow",_hilightAnimating:false,highlight:function(){this.hiLightModal();},hiLightModal:function(){var that=this;if(this._hilightAnimating){return;}that.$body.addClass("hilight");var duration=parseFloat(that.$body.css("animation-duration"))||2;this._hilightAnimating=true;setTimeout(function(){that._hilightAnimating=false;that.$body.removeClass("hilight");},duration*1000);},_bindEvents:function(){var that=this;this.boxClicked=false;this.$scrollPane.click(function(e){if(!that.boxClicked){var buttonName=false;var shouldClose=false;var str;if(typeof that.backgroundDismiss==="function"){str=that.backgroundDismiss();}else{str=that.backgroundDismiss;}if(typeof str==="string"&&typeof that.buttons[str]!=="undefined"){buttonName=str;shouldClose=false;}else{if(typeof str==="undefined"||!!(str)===true){shouldClose=true;}else{shouldClose=false;}}if(buttonName){var btnResponse=that.buttons[buttonName].action.apply(that);shouldClose=(typeof btnResponse==="undefined")||!!(btnResponse);}if(shouldClose){that.close();}else{that.hiLightModal();}}that.boxClicked=false;});this.$jconfirmBox.click(function(e){that.boxClicked=true;});var isKeyDown=false;$(window).on("jcKeyDown."+that._id,function(e){if(!isKeyDown){isKeyDown=true;}});$(window).on("keyup."+that._id,function(e){if(isKeyDown){that.reactOnKey(e);isKeyDown=false;}});$(window).on("resize."+this._id,function(){that._updateContentMaxHeight();setTimeout(function(){that.resetDrag();},100);});},_cubic_bezier:"0.36, 0.55, 0.19",_getCSS:function(speed,bounce){return{"-webkit-transition-duration":speed/1000+"s","transition-duration":speed/1000+"s","-webkit-transition-timing-function":"cubic-bezier("+this._cubic_bezier+", "+bounce+")","transition-timing-function":"cubic-bezier("+this._cubic_bezier+", "+bounce+")"};},_setButtons:function(){var that=this;var total_buttons=0;if(typeof this.buttons!=="object"){this.buttons={};}$.each(this.buttons,function(key,button){total_buttons+=1;if(typeof button==="function"){that.buttons[key]=button={action:button};}that.buttons[key].text=button.text||key;that.buttons[key].btnClass=button.btnClass||"btn-default";that.buttons[key].action=button.action||function(){};that.buttons[key].keys=button.keys||[];that.buttons[key].isHidden=button.isHidden||false;that.buttons[key].isDisabled=button.isDisabled||false;$.each(that.buttons[key].keys,function(i,a){that.buttons[key].keys[i]=a.toLowerCase();});var button_element=$('<button type="button" class="btn"></button>').html(that.buttons[key].text).addClass(that.buttons[key].btnClass).prop("disabled",that.buttons[key].isDisabled).css("display",that.buttons[key].isHidden?"none":"").click(function(e){e.preventDefault();var res=that.buttons[key].action.apply(that,[that.buttons[key]]);that.onAction.apply(that,[key,that.buttons[key]]);that._stopCountDown();if(typeof res==="undefined"||res){that.close();}});that.buttons[key].el=button_element;that.buttons[key].setText=function(text){button_element.html(text);};that.buttons[key].addClass=function(className){button_element.addClass(className);};that.buttons[key].removeClass=function(className){button_element.removeClass(className);};that.buttons[key].disable=function(){that.buttons[key].isDisabled=true;button_element.prop("disabled",true);};that.buttons[key].enable=function(){that.buttons[key].isDisabled=false;button_element.prop("disabled",false);};that.buttons[key].show=function(){that.buttons[key].isHidden=false;button_element.css("display","");};that.buttons[key].hide=function(){that.buttons[key].isHidden=true;button_element.css("display","none");};that["$_"+key]=that["$$"+key]=button_element;that.$btnc.append(button_element);});if(total_buttons===0){this.$btnc.hide();}if(this.closeIcon===null&&total_buttons===0){this.closeIcon=true;}if(this.closeIcon){if(this.closeIconClass){var closeHtml='<i class="'+this.closeIconClass+'"></i>';this.$closeIcon.html(closeHtml);}this.$closeIcon.click(function(e){e.preventDefault();var buttonName=false;var shouldClose=false;var str;if(typeof that.closeIcon==="function"){str=that.closeIcon();}else{str=that.closeIcon;}if(typeof str==="string"&&typeof that.buttons[str]!=="undefined"){buttonName=str;shouldClose=false;}else{if(typeof str==="undefined"||!!(str)===true){shouldClose=true;}else{shouldClose=false;}}if(buttonName){var btnResponse=that.buttons[buttonName].action.apply(that);shouldClose=(typeof btnResponse==="undefined")||!!(btnResponse);}if(shouldClose){that.close();}});this.$closeIcon.show();}else{this.$closeIcon.hide();}},setTitle:function(string,force){force=force||false;if(typeof string!=="undefined"){if(typeof string==="string"){this.title=string;}else{if(typeof string==="function"){if(typeof string.promise==="function"){console.error("Promise was returned from title function, this is not supported.");}var response=string();if(typeof response==="string"){this.title=response;}else{this.title=false;}}else{this.title=false;}}}if(this.isAjaxLoading&&!force){return;}this.$title.html(this.title||"");this.updateTitleContainer();},setIcon:function(iconClass,force){force=force||false;if(typeof iconClass!=="undefined"){if(typeof iconClass==="string"){this.icon=iconClass;}else{if(typeof iconClass==="function"){var response=iconClass();if(typeof response==="string"){this.icon=response;}else{this.icon=false;}}else{this.icon=false;}}}if(this.isAjaxLoading&&!force){return;}this.$icon.html(this.icon?'<i class="'+this.icon+'"></i>':"");this.updateTitleContainer();},updateTitleContainer:function(){if(!this.title&&!this.icon){this.$titleContainer.hide();}else{this.$titleContainer.show();}},setContentPrepend:function(content,force){if(!content){return;}this.contentParsed.prepend(content);},setContentAppend:function(content){if(!content){return;}this.contentParsed.append(content);},setContent:function(content,force){force=!!force;var that=this;if(content){this.contentParsed.html("").append(content);}if(this.isAjaxLoading&&!force){return;}this.$content.html("");this.$content.append(this.contentParsed);setTimeout(function(){that.$body.find("input[autofocus]:visible:first").focus();},100);},loadingSpinner:false,showLoading:function(disableButtons){this.loadingSpinner=true;this.$jconfirmBox.addClass("loading");if(disableButtons){this.$btnc.find("button").prop("disabled",true);}},hideLoading:function(enableButtons){this.loadingSpinner=false;this.$jconfirmBox.removeClass("loading");if(enableButtons){this.$btnc.find("button").prop("disabled",false);}},ajaxResponse:false,contentParsed:"",isAjax:false,isAjaxLoading:false,_parseContent:function(){var that=this;var e="&nbsp;";if(typeof this.content==="function"){var res=this.content.apply(this);if(typeof res==="string"){this.content=res;}else{if(typeof res==="object"&&typeof res.always==="function"){this.isAjax=true;this.isAjaxLoading=true;res.always(function(data,status,xhr){that.ajaxResponse={data:data,status:status,xhr:xhr};that._contentReady.resolve(data,status,xhr);if(typeof that.contentLoaded==="function"){that.contentLoaded(data,status,xhr);}});this.content=e;}else{this.content=e;}}}if(typeof this.content==="string"&&this.content.substr(0,4).toLowerCase()==="url:"){this.isAjax=true;this.isAjaxLoading=true;var u=this.content.substring(4,this.content.length);$.get(u).done(function(html){that.contentParsed.html(html);}).always(function(data,status,xhr){that.ajaxResponse={data:data,status:status,xhr:xhr};that._contentReady.resolve(data,status,xhr);if(typeof that.contentLoaded==="function"){that.contentLoaded(data,status,xhr);}});}if(!this.content){this.content=e;}if(!this.isAjax){this.contentParsed.html(this.content);this.setContent();that._contentReady.resolve();}},_stopCountDown:function(){clearInterval(this.autoCloseInterval);if(this.$cd){this.$cd.remove();}},_startCountDown:function(){var that=this;var opt=this.autoClose.split("|");if(opt.length!==2){console.error("Invalid option for autoClose. example 'close|10000'");return false;}var button_key=opt[0];var time=parseInt(opt[1]);if(typeof this.buttons[button_key]==="undefined"){console.error("Invalid button key '"+button_key+"' for autoClose");return false;}var seconds=Math.ceil(time/1000);this.$cd=$('<span class="countdown"> ('+seconds+")</span>").appendTo(this["$_"+button_key]);this.autoCloseInterval=setInterval(function(){that.$cd.html(" ("+(seconds-=1)+") ");if(seconds<=0){that["$$"+button_key].trigger("click");that._stopCountDown();}},1000);},_getKey:function(key){switch(key){case 192:return"tilde";case 13:return"enter";case 16:return"shift";case 9:return"tab";case 20:return"capslock";case 17:return"ctrl";case 91:return"win";case 18:return"alt";case 27:return"esc";case 32:return"space";}var initial=String.fromCharCode(key);if(/^[A-z0-9]+$/.test(initial)){return initial.toLowerCase();}else{return false;}},reactOnKey:function(e){var that=this;var a=$(".jconfirm");if(a.eq(a.length-1)[0]!==this.$el[0]){return false;}var key=e.which;if(this.$content.find(":input").is(":focus")&&/13|32/.test(key)){return false;}var keyChar=this._getKey(key);if(keyChar==="esc"&&this.escapeKey){if(this.escapeKey===true){this.$scrollPane.trigger("click");}else{if(typeof this.escapeKey==="string"||typeof this.escapeKey==="function"){var buttonKey;if(typeof this.escapeKey==="function"){buttonKey=this.escapeKey();}else{buttonKey=this.escapeKey;}if(buttonKey){if(typeof this.buttons[buttonKey]==="undefined"){console.warn("Invalid escapeKey, no buttons found with key "+buttonKey);}else{this["$_"+buttonKey].trigger("click");}}}}}$.each(this.buttons,function(key,button){if(button.keys.indexOf(keyChar)!==-1){that["$_"+key].trigger("click");}});},setDialogCenter:function(){console.info("setDialogCenter is deprecated, dialogs are centered with CSS3 tables");},_unwatchContent:function(){clearInterval(this._timer);},close:function(onClosePayload){var that=this;if(typeof this.onClose==="function"){this.onClose(onClosePayload);}this._unwatchContent();$(window).unbind("resize."+this._id);$(window).unbind("keyup."+this._id);$(window).unbind("jcKeyDown."+this._id);if(this.draggable){$(window).unbind("mousemove."+this._id);$(window).unbind("mouseup."+this._id);this.$titleContainer.unbind("mousedown");}that.$el.removeClass(that.loadedClass);$("body").removeClass("jconfirm-no-scroll-"+that._id);that.$jconfirmBoxContainer.removeClass("jconfirm-no-transition");setTimeout(function(){that.$body.addClass(that.closeAnimationParsed);that.$jconfirmBg.addClass("jconfirm-bg-h");var closeTimer=(that.closeAnimation==="none")?1:that.animationSpeed;setTimeout(function(){that.$el.remove();var l=w.jconfirm.instances;var i=w.jconfirm.instances.length-1;for(i;i>=0;i--){if(w.jconfirm.instances[i]._id===that._id){w.jconfirm.instances.splice(i,1);}}if(!w.jconfirm.instances.length){if(that.scrollToPreviousElement&&w.jconfirm.lastFocused&&w.jconfirm.lastFocused.length&&$.contains(document,w.jconfirm.lastFocused[0])){var $lf=w.jconfirm.lastFocused;if(that.scrollToPreviousElementAnimate){var st=$(window).scrollTop();var ot=w.jconfirm.lastFocused.offset().top;var wh=$(window).height();if(!(ot>st&&ot<(st+wh))){var scrollTo=(ot-Math.round((wh/3)));$("html, body").animate({scrollTop:scrollTo},that.animationSpeed,"swing",function(){$lf.focus();});}else{$lf.focus();}}else{$lf.focus();}w.jconfirm.lastFocused=false;}}if(typeof that.onDestroy==="function"){that.onDestroy();}},closeTimer*0.4);},50);return true;},open:function(){if(this.isOpen()){return false;}this._buildHTML();this._bindEvents();this._open();return true;},setStartingPoint:function(){var el=false;if(this.animateFromElement!==true&&this.animateFromElement){el=this.animateFromElement;w.jconfirm.lastClicked=false;}else{if(w.jconfirm.lastClicked&&this.animateFromElement===true){el=w.jconfirm.lastClicked;w.jconfirm.lastClicked=false;}else{return false;}}if(!el){return false;}var offset=el.offset();var iTop=el.outerHeight()/2;var iLeft=el.outerWidth()/2;iTop-=this.$jconfirmBox.outerHeight()/2;iLeft-=this.$jconfirmBox.outerWidth()/2;var sourceTop=offset.top+iTop;sourceTop=sourceTop-this._scrollTop();var sourceLeft=offset.left+iLeft;var wh=$(window).height()/2;var ww=$(window).width()/2;var targetH=wh-this.$jconfirmBox.outerHeight()/2;var targetW=ww-this.$jconfirmBox.outerWidth()/2;sourceTop-=targetH;sourceLeft-=targetW;if(Math.abs(sourceTop)>wh||Math.abs(sourceLeft)>ww){return false;}this.$jconfirmBoxContainer.css("transform","translate("+sourceLeft+"px, "+sourceTop+"px)");},_open:function(){var that=this;if(typeof that.onOpenBefore==="function"){that.onOpenBefore();}this.$body.removeClass(this.animationParsed);this.$jconfirmBg.removeClass("jconfirm-bg-h");this.$body.focus();that.$jconfirmBoxContainer.css("transform","translate("+0+"px, "+0+"px)");setTimeout(function(){that.$body.css(that._getCSS(that.animationSpeed,1));that.$body.css({"transition-property":that.$body.css("transition-property")+", margin"});that.$jconfirmBoxContainer.addClass("jconfirm-no-transition");that._modalReady.resolve();if(typeof that.onOpen==="function"){that.onOpen();}that.$el.addClass(that.loadedClass);},this.animationSpeed);},loadedClass:"jconfirm-open",isClosed:function(){return !this.$el||this.$el.parent().length===0;},isOpen:function(){return !this.isClosed();},toggle:function(){if(!this.isOpen()){this.open();}else{this.close();}}};w.jconfirm.instances=[];w.jconfirm.lastFocused=false;w.jconfirm.pluginDefaults={template:'<div class="jconfirm"><div class="jconfirm-bg jconfirm-bg-h"></div><div class="jconfirm-scrollpane"><div class="jconfirm-row"><div class="jconfirm-cell"><div class="jconfirm-holder"><div class="jc-bs3-container"><div class="jc-bs3-row"><div class="jconfirm-box-container jconfirm-animated"><div class="jconfirm-box" role="dialog" aria-labelledby="labelled" tabindex="-1"><div class="jconfirm-closeIcon">&times;</div><div class="jconfirm-title-c"><span class="jconfirm-icon-c"></span><span class="jconfirm-title"></span></div><div class="jconfirm-content-pane"><div class="jconfirm-content"></div></div><div class="jconfirm-buttons"></div><div class="jconfirm-clear"></div></div></div></div></div></div></div></div></div></div>',title:"Hello",titleClass:"",type:"default",typeAnimated:true,draggable:true,dragWindowGap:15,dragWindowBorder:true,animateFromElement:true,alignMiddle:true,smoothContent:true,content:"Are you sure to continue?",buttons:{},defaultButtons:{ok:{action:function(){}},close:{action:function(){}}},contentLoaded:function(){},icon:"",lazyOpen:false,bgOpacity:null,theme:"light",animation:"scale",closeAnimation:"scale",animationSpeed:400,animationBounce:1,escapeKey:true,rtl:false,container:"body",containerFluid:false,backgroundDismiss:false,backgroundDismissAnimation:"shake",autoClose:false,closeIcon:null,closeIconClass:false,watchInterval:100,columnClass:"col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3 col-xs-10 col-xs-offset-1",boxWidth:"50%",scrollToPreviousElement:true,scrollToPreviousElementAnimate:true,useBootstrap:true,offsetTop:40,offsetBottom:40,bootstrapClasses:{container:"container",containerFluid:"container-fluid",row:"row"},onContentReady:function(){},onOpenBefore:function(){},onOpen:function(){},onClose:function(){},onDestroy:function(){},onAction:function(){}};var keyDown=false;$(window).on("keydown",function(e){if(!keyDown){var $target=$(e.target);var pass=false;if($target.closest(".jconfirm-box").length){pass=true;}if(pass){$(window).trigger("jcKeyDown");}keyDown=true;}});$(window).on("keyup",function(){keyDown=false;});w.jconfirm.lastClicked=false;$(document).on("mousedown","button, a, [jc-source]",function(){w.jconfirm.lastClicked=$(this);});}));
vendor: 5,763 bytes, lines 7943-7951
7943
7944!function(t) {
7945    "function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)
7946}
7947
7948(function(t){function s(s){var e=!1;return t('[data-notify="container"]').each(function(i,n){var a=t(n),o=a.find('[data-notify="title"]').text().trim(),r=a.find('[data-notify="message"]').html().trim(),l=o===t("<div>"+s.settings.content.title+"</div>").html().trim(),d=r===t("<div>"+s.settings.content.message+"</div>").html().trim(),g=a.hasClass("alert-"+s.settings.type);return l&&d&&g&&(e=!0),!e}),e}function e(e,n,a){var o={content:{message:"object"==typeof n?n.message:n,title:n.title?n.title:"",icon:n.icon?n.icon:"",url:n.url?n.url:"#",target:n.target?n.target:"-"}};a=t.extend(!0,{},o,a),this.settings=t.extend(!0,{},i,a),this._defaults=i,"-"===this.settings.content.target&&(this.settings.content.target=this.settings.url_target),this.animations={start:"webkitAnimationStart oanimationstart MSAnimationStart animationstart",end:"webkitAnimationEnd oanimationend MSAnimationEnd animationend"},"number"==typeof this.settings.offset&&(this.settings.offset={x:this.settings.offset,y:this.settings.offset}),(this.settings.allow_duplicates||!this.settings.allow_duplicates&&!s(this))&&this.init()}var i={element:"body",position:null,type:"info",allow_dismiss:!0,allow_duplicates:!0,newest_on_top:!1,showProgressbar:!1,placement:{from:"top",align:"right"},offset:20,spacing:10,z_index:1031,delay:5e3,timer:1e3,url_target:"_blank",mouse_over:null,animate:{enter:"animated fadeInDown",exit:"animated fadeOutUp"},onShow:null,onShown:null,onClose:null,onClosed:null,icon_type:"class",template:'<div data-notify="container" class="col-xs-11 col-sm-4 alert alert-{0}" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss">&times;</button><span data-notify="icon"></span> <span data-notify="title">{1}</span> <span data-notify="message">{2}</span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div><a href="{3}" target="{4}" data-notify="url"></a></div>'};String.format=function(){for(var t=arguments[0],s=1;s<arguments.length;s++)t=t.replace(RegExp("\\{"+(s-1)+"\\}","gm"),arguments[s]);return t
7949}
7950
7951, t.extend(e.prototype,{init:function(){var t=this;this.buildNotify(),this.settings.content.icon&&this.setIcon(),"#"!=this.settings.content.url&&this.styleURL(),this.styleDismiss(),this.placement(),this.bind(),this.notify={$ele:this.$ele,update:function(s,e){var i={};"string"==typeof s?i[s]=e:i=s;for(var n in i)switch(n){case"type":this.$ele.removeClass("alert-"+t.settings.type),this.$ele.find('[data-notify="progressbar"] > .progress-bar').removeClass("progress-bar-"+t.settings.type),t.settings.type=i[n],this.$ele.addClass("alert-"+i[n]).find('[data-notify="progressbar"] > .progress-bar').addClass("progress-bar-"+i[n]);break;case"icon":var a=this.$ele.find('[data-notify="icon"]');"class"===t.settings.icon_type.toLowerCase()?a.removeClass(t.settings.content.icon).addClass(i[n]):(a.is("img")||a.find("img"),a.attr("src",i[n]));break;case"progress":var o=t.settings.delay-t.settings.delay*(i[n]/100);this.$ele.data("notify-delay",o),this.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",i[n]).css("width",i[n]+"%");break;case"url":this.$ele.find('[data-notify="url"]').attr("href",i[n]);break;case"target":this.$ele.find('[data-notify="url"]').attr("target",i[n]);break;default:this.$ele.find('[data-notify="'+n+'"]').html(i[n])}var r=this.$ele.outerHeight()+parseInt(t.settings.spacing)+parseInt(t.settings.offset.y);t.reposition(r)},close:function(){t.close()}}},buildNotify:function(){var s=this.settings.content;this.$ele=t(String.format(this.settings.template,this.settings.type,s.title,s.message,s.url,s.target)),this.$ele.attr("data-notify-position",this.settings.placement.from+"-"+this.settings.placement.align),this.settings.allow_dismiss||this.$ele.find('[data-notify="dismiss"]').css("display","none"),(this.settings.delay<=0&&!this.settings.showProgressbar||!this.settings.showProgressbar)&&this.$ele.find('[data-notify="progressbar"]').remove()},setIcon:function(){"class"===this.settings.icon_type.toLowerCase()?this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon):this.$ele.find('[data-notify="icon"]').is("img")?this.$ele.find('[data-notify="icon"]').attr("src",this.settings.content.icon):this.$ele.find('[data-notify="icon"]').append('<img src="'+this.settings.content.icon+'" alt="Notify Icon" />')},styleDismiss:function(){this.$ele.find('[data-notify="dismiss"]').css({position:"absolute",right:"10px",top:"5px",zIndex:this.settings.z_index+2})},styleURL:function(){this.$ele.find('[data-notify="url"]').css({backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)",height:"100%",left:0,position:"absolute",top:0,width:"100%",zIndex:this.settings.z_index+1})},placement:function(){var s=this,e=this.settings.offset.y,i={display:"inline-block",margin:"0px auto",position:this.settings.position?this.settings.position:"body"===this.settings.element?"fixed":"absolute",transition:"all .5s ease-in-out",zIndex:this.settings.z_index},n=!1,a=this.settings;switch(t('[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])').each(function(){e=Math.max(e,parseInt(t(this).css(a.placement.from))+parseInt(t(this).outerHeight())+parseInt(a.spacing))}),this.settings.newest_on_top===!0&&(e=this.settings.offset.y),i[this.settings.placement.from]=e+"px",this.settings.placement.align){case"left":case"right":i[this.settings.placement.align]=this.settings.offset.x+"px";break;
7951case"center":i.left=0,i.right=0}this.$ele.css(i).addClass(this.settings.animate.enter),t.each(Array("webkit-","moz-","o-","ms-",""),function(t,e){s.$ele[0].style[e+"AnimationIterationCount"]=1}),t(this.settings.element).append(this.$ele),this.settings.newest_on_top===!0&&(e=parseInt(e)+parseInt(this.settings.spacing)+this.$ele.outerHeight(),this.reposition(e)),t.isFunction(s.settings.onShow)&&s.settings.onShow.call(this.$ele),this.$ele.one(this.animations.start,function(){n=!0}).one(this.animations.end,function(){s.$ele.removeClass(s.settings.animate.enter),t.isFunction(s.settings.onShown)&&s.settings.onShown.call(this)}),setTimeout(function(){n||t.isFunction(s.settings.onShown)&&s.settings.onShown.call(this)},600)},bind:function(){var s=this;if(this.$ele.find('[data-notify="dismiss"]').on("click",function(){s.close()}),this.$ele.mouseover(function(){t(this).data("data-hover","true")}).mouseout(function(){t(this).data("data-hover","false")}),this.$ele.data("data-hover","false"),this.settings.delay>0){s.$ele.data("notify-delay",s.settings.delay);var e=setInterval(function(){var t=parseInt(s.$ele.data("notify-delay"))-s.settings.timer;if("false"===s.$ele.data("data-hover")&&"pause"===s.settings.mouse_over||"pause"!=s.settings.mouse_over){var i=(s.settings.delay-t)/s.settings.delay*100;s.$ele.data("notify-delay",t),s.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",i).css("width",i+"%")}t<=-s.settings.timer&&(clearInterval(e),s.close())},s.settings.timer)}},close:function(){var s=this,e=parseInt(this.$ele.css(this.settings.placement.from)),i=!1;this.$ele.attr("data-closing","true").addClass(this.settings.animate.exit),s.reposition(e),t.isFunction(s.settings.onClose)&&s.settings.onClose.call(this.$ele),this.$ele.one(this.animations.start,function(){i=!0}).one(this.animations.end,function(){t(this).remove(),t.isFunction(s.settings.onClosed)&&s.settings.onClosed.call(this)}),setTimeout(function(){i||(s.$ele.remove(),s.settings.onClosed&&s.settings.onClosed(s.$ele))},600)},reposition:function(s){var e=this,i='[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])',n=this.$ele.nextAll(i);this.settings.newest_on_top===!0&&(n=this.$ele.prevAll(i)),n.each(function(){t(this).css(e.settings.placement.from,s),s=parseInt(s)+parseInt(e.settings.spacing)+t(this).outerHeight()})}}), t.notify=function(t,s) {
7952    var i=new e(this,t,s);
7953    return i.notify
7954}
7955
7956, t.notifyDefaults=function(s) {
7957    return i=t.extend(!0,{},i,s)
7958}
7959
7960, t.notifyClose=function(s) {
7961    "warning"===s&&(s="danger"),"undefined"==typeof s||"all"===s?t("[data-notify]").find('[data-notify="dismiss"]').trigger("click"):"success"===s||"info"===s||"warning"===s||"danger"===s?t(".alert-"+s+"[data-notify]").find('[data-notify="dismiss"]').trigger("click"):s?t(s+"[data-notify]").find('[data-notify="dismiss"]').trigger("click"):t('[data-notify-position="'+s+'"]').find('[data-notify="dismiss"]').trigger("click")
7962}
7963
7964, t.notifyCloseExcept=function(s) {
7965    "warning"===s&&(s="danger"),"success"===s||"info"===s||"warning"===s||"danger"===s?t("[data-notify]").not(".alert-"+s).find('[data-notify="dismiss"]').trigger("click"):t("[data-notify]").not(s).find('[data-notify="dismiss"]').trigger("click")
7966}
7967
7968}
7969);
7970
7971/*! sly 1.6.1 - 8th Aug 2015 | https://github.com/darsain/sly */
7972!function (a, b, c) { "use strict"; function d(b, p, q) { function K(c) { var d = 0, e = Gb.length; if (yb.old = a.extend({}, yb), wb = tb ? 0 : ub[rb.horizontal ? "width" : "height"](), Bb = zb[rb.horizontal ? "width" : "height"](), xb = tb ? b : vb[rb.horizontal ? "outerWidth" : "outerHeight"](), Gb.length = 0, yb.start = 0, yb.end = H(xb - wb, 0), Rb) { d = Ib.length, Hb = vb.children(rb.itemSelector), Ib.length = 0; var f, g = j(vb, rb.horizontal ? "paddingLeft" : "paddingTop"), h = j(vb, rb.horizontal ? "paddingRight" : "paddingBottom"), i = "border-box" === a(Hb).css("boxSizing"), l = "none" !== Hb.css("float"), m = 0, n = Hb.length - 1; xb = 0, Hb.each(function (b, c) { var d = a(c), e = c.getBoundingClientRect(), i = G(rb.horizontal ? e.width || e.right - e.left : e.height || e.bottom - e.top), k = j(d, rb.horizontal ? "marginLeft" : "marginTop"), o = j(d, rb.horizontal ? "marginRight" : "marginBottom"), p = i + k + o, q = !k || !o, r = {}; r.el = c, r.size = q ? i : p, r.half = r.size / 2, r.start = xb + (q ? k : 0), r.center = r.start - G(wb / 2 - r.size / 2), r.end = r.start - wb + r.size, b || (xb += g), xb += p, rb.horizontal || l || o && k && b > 0 && (xb -= I(k, o)), b === n && (r.end += h, xb += h, m = q ? o : 0), Ib.push(r), f = r }), vb[0].style[rb.horizontal ? "width" : "height"] = (i ? xb : xb - g - h) + "px", xb -= m, Ib.length ? (yb.start = Ib[0][Pb ? "center" : "start"], yb.end = Pb ? f.center : xb > wb ? f.end : yb.start) : yb.start = yb.end = 0 } if (yb.center = G(yb.end / 2 + yb.start / 2), V(), Ab.length && Bb > 0 && (rb.dynamicHandle ? (Cb = yb.start === yb.end ? Bb : G(Bb * wb / xb), Cb = k(Cb, rb.minHandleSize, Bb), Ab[0].style[rb.horizontal ? "width" : "height"] = Cb + "px") : Cb = Ab[rb.horizontal ? "outerWidth" : "outerHeight"](), Db.end = Bb - Cb, ec || N()), !tb && wb > 0) { var o = yb.start, p = ""; if (Rb) a.each(Ib, function (a, b) { Pb ? Gb.push(b.center) : b.start + b.size > o && o <= yb.end && (o = b.start, Gb.push(o), o += wb, o > yb.end && o < yb.end + wb && Gb.push(yb.end)) }); else for (; o - wb < yb.end;
7972)Gb.push(o), o += wb; if (Eb[0] && e !== Gb.length) { for (var q = 0; q < Gb.length; q++)p += rb.pageBuilder.call(sb, q); Fb = Eb.html(p).children(), Fb.eq(Jb.activePage).addClass(rb.activeClass) } } if (Jb.slideeSize = xb, Jb.frameSize = wb, Jb.sbSize = Bb, Jb.handleSize = Cb, Rb) { c && null != rb.startAt && (T(rb.startAt), sb[Qb ? "toCenter" : "toStart"](rb.startAt)); var r = Ib[Jb.activeItem]; L(Qb && r ? r.center : k(yb.dest, yb.start, yb.end)) } else c ? null != rb.startAt && L(rb.startAt, 1) : L(k(yb.dest, yb.start, yb.end)); ob("load") } function L(a, b, c) { if (Rb && cc.released && !c) { var d = U(a), e = a > yb.start && a < yb.end; Qb ? (e && (a = Ib[d.centerItem].center), Pb && rb.activateMiddle && T(d.centerItem)) : e && (a = Ib[d.firstItem].start) } cc.init && cc.slidee && rb.elasticBounds ? a > yb.end ? a = yb.end + (a - yb.end) / 6 : a < yb.start && (a = yb.start + (a - yb.start) / 6) : a = k(a, yb.start, yb.end), ac.start = +new Date, ac.time = 0, ac.from = yb.cur, ac.to = a, ac.delta = a - yb.cur, ac.tweesing = cc.tweese || cc.init && !cc.slidee, ac.immediate = !ac.tweesing && (b || cc.init && cc.slidee || !rb.speed), cc.tweese = 0, a !== yb.dest && (yb.dest = a, ob("change"), ec || M()), Z(), V(), W(), O() } function M() { if (sb.initialized) { if (!ec) return ec = t(M), void (cc.released && ob("moveStart")); ac.immediate ? yb.cur = ac.to : ac.tweesing ? (ac.tweeseDelta = ac.to - yb.cur, D(ac.tweeseDelta) < .1 ? yb.cur = ac.to : yb.cur += ac.tweeseDelta * (cc.released ? rb.swingSpeed : rb.syncSpeed)) : (ac.time = I(+new Date - ac.start, rb.speed), yb.cur = ac.from + ac.delta * a.easing[rb.easing](ac.time / rb.speed, ac.time, 0, 1, rb.speed)), ac.to === yb.cur ? (yb.cur = ac.to, cc.tweese = ec = 0) : ec = t(M), ob("move"), tb || (m ? vb[0].style[m] = n + (rb.horizontal ? "translateX" : "translateY") + "(" + -yb.cur + "px)" : vb[0].style[rb.horizontal ? "left" : "top"] = -G(yb.cur) + "px"), !ec && cc.released && ob("moveEnd"), N() } } function N() { Ab.length && (Db.cur = yb.start === yb.end ? 0 : ((cc.init && !cc.slidee ? yb.dest : yb.cur) - yb.start) / (yb.end - yb.start) * Db.end, Db.cur = k(G(Db.cur), Db.start, Db.end), _b.hPos !== Db.cur && (_b.hPos = Db.cur, m ? Ab[0].style[m] = n + (rb.horizontal ? "translateX" : "translateY") + "(" + Db.cur + "px)" : Ab[0].style[rb.horizontal ? "left" : "top"] = Db.cur + "px")) } function O() { Fb[0] && _b.page !== Jb.activePage && (_b.page = Jb.activePage, Fb.removeClass(rb.activeClass).eq(Jb.activePage).addClass(rb.activeClass), ob("activePage", _b.page)) } function P() { bc.speed && yb.cur !== (bc.speed > 0 ? yb.end : yb.start) || sb.stop(), hc = cc.init ? t(P) : 0, bc.now = +new Date, bc.pos = yb.cur + (bc.now - bc.lastTime) / 1e3 * bc.speed, L(cc.init ? bc.pos : G(bc.pos)), cc.init || yb.cur !== yb.dest || ob("moveEnd"), bc.lastTime = bc.now } function Q(a, b, d) { if ("boolean" === e(b) && (d = b, b = c), b === c) L(yb[a], d); else { if (Qb && "center" !== a) return; var f = sb.getPos(b); f && L(f[a], d, !Qb) } } function R(a) { return null != a ? i(a) ? a >= 0 && a < Ib.length ? a : -1 : Hb.index(a) : -1 } function S(a) { return R(i(a) && 0 > a ? a + Ib.length : a) } function T(a, b) { var c = R(a); return !Rb || 0 > c ? !1 : ((_b.active !== c || b) && (Hb.eq(Jb.activeItem).removeClass(rb.activeClass), Hb.eq(c).addClass(rb.activeClass), _b.active = Jb.activeItem = c, W(), ob("active", c)), c) } function U(a) { a = k(i(a) ? a : yb.dest, yb.start, yb.end); var b = {}, c = Pb ? 0 : wb / 2; if (!tb) for (var d = 0, e = Gb.length; e > d; d++) { if (a >= yb.end || d === Gb.length - 1) { b.activePage = Gb.length - 1; break } if (a <= Gb[d] + c) { b.activePage = d; break } } if (Rb) { for (var f = !1, g = !1, h = !1, j = 0, l = Ib.length; l > j; j++)if (f === !1 && a <= Ib[j].start + Ib[j].half && (f = j), h === !1 && a <= Ib[j].center + Ib[j].half && (h = j), j === l - 1 || a <= Ib[j].end + Ib[j].half) { g = j; break } b.firstItem = i(f) ? f : 0, b.centerItem = i(h) ? h : b.firstItem, b.lastItem = i(g) ? g : b.centerItem } return b } function V(b) { a.extend(Jb, U(b)) } function W() { var a = yb.dest <= yb.start, b = yb.dest >= yb.end, c = (a ? 1 : 0) | (b ? 2 : 0); if (_b.slideePosState !== c && (_b.slideePosState = c, Yb.is("button,input") && Yb.prop("disabled", a), Zb.is("button,input") && Zb.prop("disabled", b), Yb.add(Vb)[a ? "addClass" : "removeClass"](rb.disabledClass), Zb.add(Ub)[b ? "addClass" : "removeClass"](rb.disabledClass)), _b.fwdbwdState !== c && cc.released && (_b.fwdbwdState = c, Vb.is("button,input") && Vb.prop("disabled", a), Ub.is("button,input") && Ub.prop("disabled", b)), Rb && null != Jb.activeItem) { var d = 0 === Jb.activeItem, e = Jb.activeItem >= Ib.length - 1, f = (d ? 1 : 0) | (e ? 2 : 0); _b.itemsButtonState !== f && (_b.itemsButtonState = f, Wb.is("button,input") && Wb.prop("disabled", d), Xb.is("button,input") && Xb.prop("disabled", e), Wb[d ? "addClass" : "removeClass"](rb.disabledClass), Xb[e ? "addClass" : "removeClass"](rb.disabledClass)) } } function X(a, b, c) { if (a = S(a), b = S(b), a > -1 && b > -1 && a !== b && (!c || b !== a - 1) && (c || b !== a + 1)) { Hb.eq(a)[c ? "insertAfter" : "insertBefore"](Ib[b].el); var d = b > a ? a : c ? b : b - 1, e = a > b ? a : c ? b + 1 : b, f = a > b; null != Jb.activeItem && (a === Jb.activeItem ? _b.active = Jb.activeItem = c ? f ? b + 1 : b : f ? b : b - 1 : Jb.activeItem > d && Jb.activeItem < e && (_b.active = Jb.activeItem += f ? 1 : -1)), K() } } function Y(a, b) { for (var c = 0, d = $b[a].length; d > c; c++)if ($b[a][c] === b) return c; return -1 }
7972 function Z() { cc.released && !sb.isPaused && sb.resume() } function $(a) { return G(k(a, Db.start, Db.end) / Db.end * (yb.end - yb.start)) + yb.start } function _() { cc.history[0] = cc.history[1], cc.history[1] = cc.history[2], cc.history[2] = cc.history[3], cc.history[3] = cc.delta } function ab(a) { cc.released = 0, cc.source = a, cc.slidee = "slidee" === a } function bb(b) { var c = "touchstart" === b.type, d = b.data.source, e = "slidee" === d; cc.init || !c && eb(b.target) || ("handle" !== d || rb.dragHandle && Db.start !== Db.end) && (!e || (c ? rb.touchDragging : rb.mouseDragging && b.which < 2)) && (c || f(b), ab(d), cc.init = 0, cc.$source = a(b.target), cc.touch = c, cc.pointer = c ? b.originalEvent.touches[0] : b, cc.initX = cc.pointer.pageX, cc.initY = cc.pointer.pageY, cc.initPos = e ? yb.cur : Db.cur, cc.start = +new Date, cc.time = 0, cc.path = 0, cc.delta = 0, cc.locked = 0, cc.history = [0, 0, 0, 0], cc.pathToLock = e ? c ? 30 : 10 : 0, u.on(c ? x : w, cb), sb.pause(1), (e ? vb : Ab).addClass(rb.draggedClass), ob("moveStart"), e && (fc = setInterval(_, 10))) } function cb(a) { if (cc.released = "mouseup" === a.type || "touchend" === a.type, cc.pointer = cc.touch ? a.originalEvent[cc.released ? "changedTouches" : "touches"][0] : a, cc.pathX = cc.pointer.pageX - cc.initX, cc.pathY = cc.pointer.pageY - cc.initY, cc.path = E(F(cc.pathX, 2) + F(cc.pathY, 2)), cc.delta = rb.horizontal ? cc.pathX : cc.pathY, cc.released || !(cc.path < 1)) { if (!cc.init) { if (cc.path < rb.dragThreshold) return cc.released ? db() : c; if (!(rb.horizontal ? D(cc.pathX) > D(cc.pathY) : D(cc.pathX) < D(cc.pathY))) return db(); cc.init = 1 } f(a), !cc.locked && cc.path > cc.pathToLock && cc.slidee && (cc.locked = 1, cc.$source.on(z, g)), cc.released && (db(), rb.releaseSwing && cc.slidee && (cc.swing = (cc.delta - cc.history[0]) / 40 * 300, cc.delta += cc.swing, cc.tweese = D(cc.swing) > 10)), L(cc.slidee ? G(cc.initPos - cc.delta) : $(cc.initPos + cc.delta)) } } function db() { clearInterval(fc), cc.released = !0, u.off(cc.touch ? x : w, cb), (cc.slidee ? vb : Ab).removeClass(rb.draggedClass), setTimeout(function () { cc.$source.off(z, g) }), yb.cur === yb.dest && cc.init && ob("moveEnd"), sb.resume(1), cc.init = 0 } function eb(b) { return ~a.inArray(b.nodeName, B) || a(b).is(rb.interactive) } function fb() { sb.stop(), u.off("mouseup", fb) } function gb(a) { switch (f(a), this) { case Ub[0]: case Vb[0]: sb.moveBy(Ub.is(this) ? rb.moveBy : -rb.moveBy), u.on("mouseup", fb); break; case Wb[0]: sb.prev(); break; case Xb[0]: sb.next(); break; case Yb[0]: sb.prevPage(); break; case Zb[0]: sb.nextPage() } } function hb(a) { return dc.curDelta = (rb.horizontal ? a.deltaY || a.deltaX : a.deltaY) || -a.wheelDelta, dc.curDelta /= 1 === a.deltaMode ? 3 : 100, Rb ? (o = +new Date, dc.last < o - dc.resetTime && (dc.delta = 0), dc.last = o, dc.delta += dc.curDelta, D(dc.delta) < 1 ? dc.finalDelta = 0 : (dc.finalDelta = G(dc.delta / 1), dc.delta %= 1), dc.finalDelta) : dc.curDelta } function ib(a) { a.originalEvent[r] = sb; var b = +new Date; if (J + rb.scrollHijack > b && Sb[0] !== document && Sb[0] !== window) return void (J = b); if (rb.scrollBy && yb.start !== yb.end) { var c = hb(a.originalEvent); (rb.scrollTrap || c > 0 && yb.dest < yb.end || 0 > c && yb.dest > yb.start) && f(a, 1), sb.slideBy(rb.scrollBy * c) } } function jb(a) { rb.clickBar && a.target === zb[0] && (f(a), L($((rb.horizontal ? a.pageX - zb.offset().left : a.pageY - zb.offset().top) - Cb / 2))) } function kb(a) { if (rb.keyboardNavBy) switch (a.which) { case rb.horizontal ? 37 : 38: f(a), sb["pages" === rb.keyboardNavBy ? "prevPage" : "prev"](); break;
7972 case rb.horizontal ? 39 : 40: f(a), sb["pages" === rb.keyboardNavBy ? "nextPage" : "next"]() } } function lb(a) { return eb(this) ? void (a.originalEvent[r + "ignore"] = !0) : void (this.parentNode !== vb[0] || a.originalEvent[r + "ignore"] || sb.activate(this)) } function mb() { this.parentNode === Eb[0] && sb.activatePage(Fb.index(this)) } function nb(a) { rb.pauseOnHover && sb["mouseenter" === a.type ? "pause" : "resume"](2) } function ob(a, b) { if ($b[a]) { for (qb = $b[a].length, C.length = 0, pb = 0; qb > pb; pb++)C.push($b[a][pb]); for (pb = 0; qb > pb; pb++)C[pb].call(sb, a, b) } } if (!(this instanceof d)) return new d(b, p, q); var pb, qb, rb = a.extend({}, d.defaults, p), sb = this, tb = i(b), ub = a(b), vb = rb.slidee ? a(rb.slidee).eq(0) : ub.children().eq(0), wb = 0, xb = 0, yb = { start: 0, center: 0, end: 0, cur: 0, dest: 0 }, zb = a(rb.scrollBar).eq(0), Ab = zb.children().eq(0), Bb = 0, Cb = 0, Db = { start: 0, end: 0, cur: 0 }, Eb = a(rb.pagesBar), Fb = 0, Gb = [], Hb = 0, Ib = [], Jb = { firstItem: 0, lastItem: 0, centerItem: 0, activeItem: null, activePage: 0 }, Kb = new l(ub[0]), Lb = new l(vb[0]), Mb = new l(zb[0]), Nb = new l(Ab[0]), Ob = "basic" === rb.itemNav, Pb = "forceCentered" === rb.itemNav, Qb = "centered" === rb.itemNav || Pb, Rb = !tb && (Ob || Qb || Pb), Sb = rb.scrollSource ? a(rb.scrollSource) : ub, Tb = rb.dragSource ? a(rb.dragSource) : ub, Ub = a(rb.forward), Vb = a(rb.backward), Wb = a(rb.prev), Xb = a(rb.next), Yb = a(rb.prevPage), Zb = a(rb.nextPage), $b = {}, _b = {}, ac = {}, bc = {}, cc = { released: 1 }, dc = { last: 0, delta: 0, resetTime: 200 }, ec = 0, fc = 0, gc = 0, hc = 0; tb || (b = ub[0]), sb.initialized = 0, sb.frame = b, sb.slidee = vb[0], sb.pos = yb, sb.rel = Jb, sb.items = Ib, sb.pages = Gb, sb.isPaused = 0, sb.options = rb, sb.dragging = cc, sb.reload = function () { K() }, sb.getPos = function (a) { if (Rb) { var b = R(a); return -1 !== b ? Ib[b] : !1 } var c = vb.find(a).eq(0); if (c[0]) { var d = rb.horizontal ? c.offset().left - vb.offset().left : c.offset().top - vb.offset().top, e = c[rb.horizontal ? "outerWidth" : "outerHeight"](); return { start: d, center: d - wb / 2 + e / 2, end: d - wb + e, size: e } } return !1 }, sb.moveBy = function (a) { bc.speed = a, !cc.init && bc.speed && yb.cur !== (bc.speed > 0 ? yb.end : yb.start) && (bc.lastTime = +new Date, bc.startPos = yb.cur, ab("button"), cc.init = 1, ob("moveStart"), s(hc), P()) }, sb.stop = function () { "button" === cc.source && (cc.init = 0, cc.released = 1) }, sb.prev = function () { sb.activate(null == Jb.activeItem ? 0 : Jb.activeItem - 1) }, sb.next = function () { sb.activate(null == Jb.activeItem ? 0 : Jb.activeItem + 1) }, sb.prevPage = function () { sb.activatePage(Jb.activePage - 1) }
7972, sb.nextPage = function () { sb.activatePage(Jb.activePage + 1) }, sb.slideBy = function (a, b) { a && (Rb ? sb[Qb ? "toCenter" : "toStart"](k((Qb ? Jb.centerItem : Jb.firstItem) + rb.scrollBy * a, 0, Ib.length)) : L(yb.dest + a, b)) }, sb.slideTo = function (a, b) { L(a, b) }, sb.toStart = function (a, b) { Q("start", a, b) }, sb.toEnd = function (a, b) { Q("end", a, b) }, sb.toCenter = function (a, b) { Q("center", a, b) }, sb.getIndex = R, sb.activate = function (a, b) { var c = T(a); rb.smart && c !== !1 && (Qb ? sb.toCenter(c, b) : c >= Jb.lastItem ? sb.toStart(c, b) : c <= Jb.firstItem ? sb.toEnd(c, b) : Z()) }, sb.activatePage = function (a, b) { i(a) && L(Gb[k(a, 0, Gb.length - 1)], b) }, sb.resume = function (a) { rb.cycleBy && rb.cycleInterval && ("items" !== rb.cycleBy || Ib[0] && null != Jb.activeItem) && !(a < sb.isPaused) && (sb.isPaused = 0, gc ? gc = clearTimeout(gc) : ob("resume"), gc = setTimeout(function () { switch (ob("cycle"), rb.cycleBy) { case "items": sb.activate(Jb.activeItem >= Ib.length - 1 ? 0 : Jb.activeItem + 1); break; case "pages": sb.activatePage(Jb.activePage >
7972= Gb.length - 1 ? 0 : Jb.activePage + 1) } }, rb.cycleInterval)) }, sb.pause = function (a) { a < sb.isPaused || (sb.isPaused = a || 100, gc && (gc = clearTimeout(gc), ob("pause"))) }, sb.toggle = function () { sb[gc ? "pause" : "resume"]() }, sb.set = function (b, c) { a.isPlainObject(b) ? a.extend(rb, b) : rb.hasOwnProperty(b) && (rb[b] = c) }, sb.add = function (b, c) { var d = a(b); Rb ? (null == c || !Ib[0] || c >= Ib.length ? d.appendTo(vb) : Ib.length && d.insertBefore(Ib[c].el), null != Jb.activeItem && c <= Jb.activeItem && (_b.active = Jb.activeItem += d.length)) : vb.append(d), K() }, sb.remove = function (b) { if (Rb) { var c = S(b); if (c > -1) { Hb.eq(c).remove(); var d = c === Jb.activeItem; null != Jb.activeItem && c < Jb.activeItem && (_b.active = --Jb.activeItem), K(), d && (_b.active = null, sb.activate(Jb.activeItem)) } } else a(b).remove(), K() }, sb.moveAfter = function (a, b) { X(a, b, 1) }, sb.moveBefore = function (a, b) { X(a, b) }, sb.on = function (a, b) { if ("object" === e(a)) for (var c in a) a.hasOwnProperty(c) && sb.on(c, a[c]); else if ("function" === e(b)) for (var d = a.split(" "), f = 0, g = d.length; g > f; f++)$b[d[f]] = $b[d[f]] || [], -1 === Y(d[f], b) && $b[d[f]].push(b); else if ("array" === e(b)) for (var h = 0, i = b.length; i > h; h++)sb.on(a, b[h]) }, sb.one = function (a, b) { function c() { b.apply(sb, arguments), sb.off(a, c) } sb.on(a, c) }, sb.off = function (a, b) { if (b instanceof Array) for (var c = 0, d = b.length; d > c; c++)sb.off(a, b[c]); else for (var e = a.split(" "), f = 0, g = e.length; g > f; f++)if ($b[e[f]] = $b[e[f]] || [], null == b) $b[e[f]].length = 0; else { var h = Y(e[f], b); -1 !== h && $b[e[f]].splice(h, 1) } }, sb.destroy = function () { return d.removeInstance(b), Sb.add(Ab).add(zb).add(Eb).add(Ub).add(Vb).add(Wb).add(Xb).add(Yb).add(Zb).off("." + r), u.off("keydown", kb), Wb.add(Xb).add(Yb).add(Zb).removeClass(rb.disabledClass), Hb && null != Jb.activeItem && Hb.eq(Jb.activeItem).removeClass(rb.activeClass), Eb.empty(), tb || (ub.off("." + r), Kb.restore(), Lb.restore(), Mb.restore(), Nb.restore(), a.removeData(b, r)), Ib.length = Gb.length = 0, _b = {}, sb.initialized = 0, sb }, sb.init = function () { if (!sb.initialized) { if (d.getInstance(b)) throw new Error("There is already a Sly instance on this element"); d.storeInstance(b, sb), sb.on(q); var a = ["overflow", "position"], c = ["position", "webkitTransform", "msTransform", "transform", "left", "top", "width", "height"]; Kb.save.apply(Kb, a), Mb.save.apply(Mb, a), Lb.save.apply(Lb, c), Nb.save.apply(Nb, c); var e = Ab; return tb || (e = e.add(vb), ub.css("overflow", ""), m || "static" !== ub.css("position") || ub.css("position", "relative")), m ? n && e.css(m, n) : ("static" === zb.css("position") && zb.css("position", "relative"), e.css({ position: "absolute" })), rb.forward && Ub.on(A, gb), rb.backward && Vb.on(A, gb), rb.prev && Wb.on(z, gb), rb.next && Xb.on(z, gb), rb.prevPage && Yb.on(z, gb), rb.nextPage && Zb.on(z, gb), Sb.on(y, ib), zb[0] && zb.on(z, jb), Rb && rb.activateOn && ub.on(rb.activateOn + "." + r, "*", lb), Eb[0] && rb.activatePageOn && Eb.on(rb.activatePageOn + "." + r, "*", mb), Tb.on(v, { source: "slidee" }, bb), Ab && Ab.on(v, { source: "handle" }, bb), u.on("keydown", kb), tb || (ub.on("mouseenter." + r + " mouseleave." + r, nb), ub.on("scroll." + r, h)), sb.initialized = 1, K(!0), rb.cycleBy && !tb && sb[rb.startPaused ? "pause" : "resume"](), sb } } } function e(a) { return null == a ? String(a) : "object" == typeof a || "function" == typeof a ? Object.prototype.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase() || "object" : typeof a } function f(a, b) { a.preventDefault(), b && a.stopPropagation() } function g(b) { f(b, 1), a(this).off(b.type, g) } function h() { this.scrollLeft = 0, this.scrollTop = 0 } function i(a) { return !isNaN(parseFloat(a)) && isFinite(a) } function j(a, b) { return 0 | G(String(a.css(b)).replace(/[^\-0-9.]/g, "")) } function k(a, b, c) { return b > a ? b : a > c ? c : a } function l(a) { var b = {}; return b.style = {}, b.save = function () { if (a && a.nodeType) { for (var c = 0; c < arguments.length; c++)b.style[arguments[c]] = a.style[arguments[c]]; return b } }, b.restore = function () { if (a && a.nodeType) { for (var c in b.style) b.style.hasOwnProperty(c) && (a.style[c] = b.style[c]); return b } }, b } var m, n, o, p = "sly", q = "Sly", r = p, s = b.cancelAnimationFrame || b.cancelRequestAnimationFrame, t = b.requestAnimationFrame, u = a(document), v = "touchstart." + r + " mousedown." + r, w = "mousemove." + r + " mouseup." + r, x = "touchmove." + r + " touchend." + r, y = (document.implementation.hasFeature("Event.wheel", "3.0") ? "wheel." : "mousewheel.") + r, z = "click." + r, A = "mousedown." + r, B = ["INPUT", "SELECT", "BUTTON", "TEXTAREA"], C = [], D = Math.abs, E = Math.sqrt, F = Math.pow, G = Math.round, H = Math.max, I = Math.min, J = 0; u.on(y, function (a) { var b = a.originalEvent[r], c = +new Date; (!b || b.options.scrollHijack < c - J) && (J = c) }), d.getInstance = function (b) { return a.data(b, r) }, d.storeInstance = function (b, c) { return a.data(b, r, c) }, d.removeInstance = function (b) { return a.removeData(b, r) }, function (a) { function b(a) { var b = (new Date).getTime(), d = Math.max(0, 16 - (b - c)), e = setTimeout(a, d); return c = b, e } t = a.requestAnimationFrame || a.webkitRequestAnimationFrame || b;
7972 var c = (new Date).getTime(), d = a.cancelAnimationFrame || a.webkitCancelAnimationFrame || a.clearTimeout; s = function (b) { d.call(a, b) } }(window), function () { function a(a) { for (var d = 0, e = b.length; e > d; d++) { var f = b[d] ? b[d] + a.charAt(0).toUpperCase() + a.slice(1) : a; if (null != c.style[f]) return f } } var b = ["", "Webkit", "Moz", "ms", "O"], c = document.createElement("div"); m = a("transform"), n = a("perspective") ? "translateZ(0) " : "" }(), b[q] = d, a.fn[p] = function (b, c) { var f, g; return a.isPlainObject(b) || (("string" === e(b) || b === !1) && (f = b === !1 ? "destroy" : b, g = Array.prototype.slice.call(arguments, 1)), b = {}), this.each(function (a, e) { var h = d.getInstance(e); h || f ? h && f && h[f] && h[f].apply(h, g) : h = new d(e, b, c).init() }) }, d.defaults = { slidee: null, horizontal: !1, itemNav: null, itemSelector: null, smart: !1, activateOn: null, activateMiddle: !1, scrollSource: null, scrollBy: 0, scrollHijack: 300, scrollTrap: !1, dragSource: null, mouseDragging: !1, touchDragging: !1, releaseSwing: !1, swingSpeed: .2, elasticBounds: !1, dragThreshold: 3, interactive: null, scrollBar: null, dragHandle: !1, dynamicHandle: !1, minHandleSize: 50, clickBar: !1, syncSpeed: .5, pagesBar: null, activatePageOn: null, pageBuilder: function (a) { return "<li>" + (a + 1) + "</li>" }, forward: null, backward: null, prev: null, next: null, prevPage: null, nextPage: null, cycleBy: null, cycleInterval: 5e3, pauseOnHover: !1, startPaused: !1, moveBy: 300, speed: 0, easing: "swing", startAt: null, keyboardNavBy: null, draggedClass: "dragged", activeClass: "active", disabledClass: "disabled" } }(jQuery, window);
7973! function (e, t) {
7974    "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = e || self).MicroModal = t()
7975}(this, (function () {
7976    "use strict";
7977
7978    function e(e, t) {
7979        for (var o = 0; o < t.length; o++) {
7980            var n = t[o];
7981            n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
7982        }
7983    }
7984
7985    function t(e) {
7986        return function (e) {
7987            if (Array.isArray(e)) return o(e)
7988        }(e) || function (e) {
7989            if ("undefined" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e)
7990        }(e) || function (e, t) {
7991            if (!e) return;
7992            if ("string" == typeof e) return o(e, t);
7993            var n = Object.prototype.toString.call(e).slice(8, -1);
7994            "Object" === n && e.constructor && (n = e.constructor.name);
7995            if ("Map" === n || "Set" === n) return Array.from(n);
7996            if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return o(e, t)
7997        }(e) || function () {
7998            throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
7999        }()
8000    }
8001
8002    function o(e, t) {
8003        (null == t || t > e.length) && (t = e.length);
8004        for (var o = 0, n = new Array(t); o < t; o++) n[o] = e[o];
8005        return n
8006    }
8007    var n, i, a, r, s, l = (n = ["a[href]", "area[href]", 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])', "select:not([disabled]):not([aria-hidden])", "textarea:not([disabled]):not([aria-hidden])", "button:not([disabled]):not([aria-hidden])", "iframe", "object", "embed", "[contenteditable]", '[tabindex]:not([tabindex^="-"])'], i = function () {
8008        function o(e) {
8009            var n = e.targetModal,
8010                i = e.triggers,
8011                a = void 0 === i ? [] : i,
8012                r = e.onShow,
8013                s = void 0 === r ? function () { } : r,
8014                l = e.onClose,
8015                c = void 0 === l ? function () { } : l,
8016                d = e.openTrigger,
8017                u = void 0 === d ? "data-micromodal-trigger" : d,
8018                f = e.closeTrigger,
8019                h = void 0 === f ? "data-micromodal-close" : f,
8020                v = e.openClass,
8021                m = void 0 === v ? "is-open" : v,
8022                g = e.disableScroll,
8023                b = void 0 !== g && g,
8024                y = e.disableFocus,
8025                p = void 0 !== y && y,
8026                w = e.awaitCloseAnimation,
8027                E = void 0 !== w && w,
8028                k = e.awaitOpenAnimation,
8029                M = void 0 !== k && k,
8030                C = e.debugMode,
8031                A = void 0 !== C && C;
8032            ! function (e, t) {
8033                if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
8034            }(this, o), this.modal = document.getElementById(n), this.config = {
8035                debugMode: A,
8036                disableScroll: b,
8037                openTrigger: u,
8038                closeTrigger: h,
8039                openClass: m,
8040                onShow: s,
8041                onClose: c,
8042                awaitCloseAnimation: E,
8043                awaitOpenAnimation: M,
8044                disableFocus: p
8045            }, a.length > 0 && this.registerTriggers.apply(this, t(a)), this.onClick = this.onClick.bind(this), this.onKeydown = this.onKeydown.bind(this)
8046        }
8047        var i, a, r;
8048        return i = o, (a = [{
8049            key: "registerTriggers",
8050            value: function () {
8051                for (var e = this, t = arguments.length, o = new Array(t), n = 0; n < t; n++) o[n] = arguments[n];
8052                o.filter(Boolean).forEach((function (t) {
8053                    t.addEventListener("click", (function (t) {
8054                        return e.showModal(t)
8055                    }))
8056                }))
8057            }
8058        }, {
8059            key: "showModal",
8060            value: function () {
8061                var e = this,
8062                    t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null;
8063                if (this.activeElement = document.activeElement, this.modal.setAttribute("aria-hidden", "false"), this.modal.classList.add(this.config.openClass), this.scrollBehaviour("disable"), this.addEventListeners(), this.config.awaitOpenAnimation) {
8064                    var o = function t() {
8065                        e.modal.removeEventListener("animationend", t, !1), e.setFocusToFirstNode()
8066                    };
8067                    this.modal.addEventListener("animationend", o, !1)
8068                } else this.setFocusToFirstNode();
8069                this.config.onShow(this.modal, this.activeElement, t)
8070            }
8071        }, {
8072            key: "closeModal",
8073                value: function () {                
8074                var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null,
8075                    t = this.modal;
8076
8077                    // Animazione abilitata forzatamente SEMPRE
8078
8079                    if (this.modal.setAttribute("aria-hidden", "true"), this.removeEventListeners(), this.scrollBehaviour("enable"), this.activeElement && this.activeElement.focus && this.activeElement.focus(), this.config.onClose(this.modal, this.activeElement, e), this.config.awaitCloseAnimation) {
8080                        var o = this.config.openClass;
8081                        this.modal.addEventListener("animationend", (function e() {
8082                            t.classList.remove(o), t.removeEventListener("animationend", e, !1)
8083                        }), !1)
8084                    } else {
8085                        //t.classList.remove(this.config.openClass)
8086                        var o = this.config.openClass;
8087                        this.modal.addEventListener("animationend", (function e() {
8088                            t.classList.remove(o), t.removeEventListener("animationend", e, !1)
8089                        }), !1)
8090                    }
8091            }
8092        }, {
8093            key: "closeModalById",
8094            value: function (e) {
8095                this.modal = document.getElementById(e), this.modal && this.closeModal()
8096            }
8097        }, {
8098            key: "scrollBehaviour",
8099            value: function (e) {
8100                if (this.config.disableScroll) {
8101                    var t = document.querySelector("body");
8102                    switch (e) {
8103                        case "enable":
8104                            Object.assign(t.style, {
8105                                overflow: ""
8106                            });
8107                            break;
8108                        case "disable":
8109                            Object.assign(t.style, {
8110                                overflow: "hidden"
8111                            })
8112                    }
8113                }
8114            }
8115        }, {
8116            key: "addEventListeners",
8117            value: function () {
8118                this.modal.addEventListener("touchstart", this.onClick), this.modal.addEventListener("click", this.onClick), document.addEventListener("keydown", this.onKeydown)
8119            }
8120        }, {
8121            key: "removeEventListeners",
8122            value: function () {
8123                this.modal.removeEventListener("touchstart", this.onClick), this.modal.removeEventListener("click", this.onClick), document.removeEventListener("keydown", this.onKeydown)
8124            }
8125        }, {
8126            key: "onClick",
8127                value: function (e) {
8128                if ($(e.target).hasClass('btn-chiudi')) {
8129                    e.preventDefault()
8130                    e.stopPropagation()
8131                }
8132                e.target.hasAttribute(this.config.closeTrigger) && this.closeModal(e)
8133            }
8134        }, {
8135            key: "onKeydown",
8136            value: function (e) {
8137                27 === e.keyCode && this.closeModal(e), 9 === e.keyCode && this.retainFocus(e)
8138            }
8139        }, {
8140            key: "getFocusableNodes",
8141            value: function () {
8142                var e = this.modal.querySelectorAll(n);
8143                return Array.apply(void 0, t(e))
8144            }
8145        }, {
8146            key: "setFocusToFirstNode",
8147            value: function () {
8148                var e = this;
8149                if (!this.config.disableFocus) {
8150                    var t = this.getFocusableNodes();
8151                    if (0 !== t.length) {
8152                        var o = t.filter((function (t) {
8153                            return !t.hasAttribute(e.config.closeTrigger)
8154                        }));
8155                        o.length > 0 && o[0].focus(), 0 === o.length && t[0].focus()
8156                    }
8157                }
8158            }
8159        }, {
8160            key: "retainFocus",
8161            value: function (e) {
8162                var t = this.getFocusableNodes();
8163                if (0 !== t.length)
8164                    if (t = t.filter((function (e) {
8165                        return null !== e.offsetParent
8166                    })), this.modal.contains(document.activeElement)) {
8167                        var o = t.indexOf(document.activeElement);
8168                        e.shiftKey && 0 === o && (t[t.length - 1].focus(), e.preventDefault()), !e.shiftKey && t.length > 0 && o === t.length - 1 && (t[0].focus(), e.preventDefault())
8169                    } else t[0].focus()
8170            }
8171        }]) && e(i.prototype, a), r && e(i, r), o
8172    }(), a = null, r = function (e) {
8173        if (!document.getElementById(e)) return console.warn("MicroModal: ❗Seems like you have missed %c'".concat(e, "'"), "background-color: #f8f9fa;color: #50596c;font-weight: bold;", "ID somewhere in your code. Refer example below to resolve it."), c
8173onsole.warn("%cExample:", "background-color: #f8f9fa;color: #50596c;font-weight: bold;", '<div class="modal" id="'.concat(e, '"></div>')), !1
8174    }, s = function (e, t) {
8175        if (function (e) {
8176            e.length <= 0 && (console.warn("MicroModal: ❗Please specify at least one %c'micromodal-trigger'", "background-color: #f8f9fa;color: #50596c;font-weight: bold;", "data attribute."), console.warn("%cExample:", "background-color: #f8f9fa;color: #50596c;font-weight: bold;", '<a href="#" data-micromodal-trigger="my-modal"></a>'))
8177        }(e), !t) return !0;
8178        for (var o in t) r(o);
8179        return !0
8180    }, {
8181        init: function (e) {
8182            var o = Object.assign({}, {
8183                openTrigger: "data-micromodal-trigger"
8184            }, e),
8185                n = t(document.querySelectorAll("[".concat(o.openTrigger, "]"))),
8186                r = function (e, t) {
8187                    var o = [];
8188                    return e.forEach((function (e) {
8189                        var n = e.attributes[t].value;
8190                        void 0 === o[n] && (o[n] = []), o[n].push(e)
8191                    })), o
8192                }(n, o.openTrigger);
8193            if (!0 !== o.debugMode || !1 !== s(n, r))
8194                for (var l in r) {
8195                    var c = r[l];
8196                    o.targetModal = l, o.triggers = t(c), a = new i(o)
8197                }
8198        },
8199        show: function (e, t) {
8200            var o = t || {};
8201            o.targetModal = e, !0 === o.debugMode && !1 === r(e) || (a && a.removeEventListeners(), (a = new i(o)).showModal())
8202        },
8203        close: function (e) {
8204            e ? a.closeModalById(e) : a.closeModal()
8205        }
8206    });
8207    return window.MicroModal = l, l
8208}));
8209/* globals AjaxCart */
8210
8211(function ($) {
8212
8213    /*----////DML*/
8214    resizeMenu()
8215    $(window).scroll(function () {
8216        resizeMenu()
8217    })
8218
8219    function resizeMenu() {
8220        if ($(this).scrollTop() > 0) {
8221            $('.responsive-nav-wrapper-parent').addClass('scrolled')
8222            $('.header.fixed').addClass('topFixed')
8223            $('.theme-promo-banner-top').addClass('hide-top')
8224        }
8225        else {
8226            $('.responsive-nav-wrapper-parent').removeClass('scrolled')
8227            $('.header.fixed').removeClass('topFixed')
8228            $('.theme-promo-banner-top').removeClass('hide-top')
8229        }
8230    }
8231
8232    $(document).on('click', '.categoryFilterPanel7Spikes .filtersGroupPanel a', function (e) {
8233        e.preventDefault()
8234        $this = $(this)
8235        var hash = window.location.hash;
8236
8237        var url = $this.attr('href')
8238        location.href = url + hash
8239    })
8240
8241    /*----////FINE DML*/
8242
8243    $(document).ready(function () {
8244        var closeMenuSelector = '.close-menu > span.close-menu-btn'
8245        var closeSideMenu = '.close-side-menu-btn'
8246        var flyoutCartScrollbarSelector = '#flyout-cart .flyout-cart-scroll-area'
8247
8248        var dependencies = [
8249            {
8250                module: 'header',
8251                dependencies: ['attachDetach', 'overlay', 'perfectScrollbar']
8252            },
8253            {
8254                module: 'menu',
8255                dependencies: ['perfectScrollbar']
8256            }
8257        ]
8258
8259        var themeSettings = {
8260            overlay: {
8261                overlayElementSelector: '.overlayOffCanvas',
8262                overlayClass: 'show',
8263                noPageScrollClass: 'scrollYRemove'
8264            },
8265            productQuantity: {
8266                quantityInputSelector: '.qty-input, .productQuantityTextBox',
8267                incrementSelectors: '.plus',
8268                decrementSelectors: '.minus'
8269            },
8270            flyoutCart: {
8271                flyoutCartSelector: '#flyout-cart',
8272                flyoutCartScrollbarSelector: flyoutCartScrollbarSelector + ' .items',
8273                removeItemSelector: '#flyout-cart .remove-item'
8274            },
8275            header: {
8276                activeClass: 'open',
8277                modules: [
8278                    {
8279                        opener: '.header-links .opener',
8280                        content: '.profile-menu-box',
8281                        preventClicking: true
8282                    },
8283                    {
8284                        content: '.flyout-cart',
8285                        overlay: false,
8286                        scrollbar: flyoutCartScrollbarSelector + ' .items'
8287                    }
8288                ]
8289            },
8290            goToTop: {
8291                animation: {
8292                    type: 'slide',      // Fade, slide, none
8293                    speed: 500            // Animation in speed (ms)
8294                }
8295            },
8296            toggle: {
8297                blocks: [
8298                    {
8299                        opener: '.write-review .title',
8300                        content: '.write-review-collapse',
8301                        activeClassOpener: 'open',
8302                        animation: {
8303                            type: 'slide',
8304                            speed: 'slow'
8305                        }
8306                    },
8307                    {
8308                        opener: '.comment-form-btn',
8309                        content: '.new-comment form',
8310                        activeClassOpener: 'open',
8311                        animation: {
8312                            type: 'slide',
8313                            speed: 'slow'
8314                        }
8315                    },
8316                    {
8317                        opener: '.cart-collaterals > div > .title',
8318                        content: '.cart-collaterals > div > .list',
8319                        activeClassOpener: 'open',
8320                        animation: {
8321                            type: 'slide',
8322                            speed: 'slow'
8323                        }
8324                    },
8325                    {
8326                        opener: '.add-button .btn-holder',
8327                        content: '.add-button .enter-address',
8328                        activeClassOpener: 'open',
8329                        animation: {
8330                            type: 'slide',
8331                            speed: 'slow'
8332                        }
8333                    }
8334                ]
8335            },
8336            equalizer: {
8337                blocks: [
8338                    {
8339                        selector: '.address-list > div',
8340                        property: 'height',
8341                        measurementFunction: 'innerHeight'
8342                    },
8343                    {
8344                        selector: '.address-grid > div',
8345                        property: 'min-height',
8346                        measurementFunction: 'innerHeight'
8347                    },
8348                    {
8349                        selector: '.order-item',
8350                        property: 'height',
8351                        measurementFunction: 'innerHeight'
8352                    },
8353                    {
8354                        selector: '.request-item',
8355                        property: 'height',
8356                        measurementFunction: 'innerHeight'
8357                    },
8358                    {
8359                        selector: '.news-item',
8360                        property: 'height',
8361                        measurementFunction: 'innerHeight'
8362                    },
8363                    {
8364                        selector: '.order-details-area > div',
8365                        property: 'height',
8366                        measurementFunction: 'innerHeight'
8367                    },
8368                    {
8369                        selector: '.order-review-data > div',
8370                        property: 'height',
8371                        measurementFunction: 'innerHeight'
8372                    },
8373                    {
8374                        selector: '.shipment-details-area > div',
8375                        property: 'height',
8376                        measurementFunction: 'innerHeight'
8377                    }
8378                ]
8379            },
8380            responsive: [
8381                {
8382                    breakpoint: 1281,
8383                    settings: {                        
8384                        header: {
8385                            activeClass: 'open',
8386                            modules: [
8387                                {
8388                                    opener: '.header-links .opener',
8389                                    content: '.profile-menu-box',
8390                                    preventClicking: true
8391                                },
8392                                {
8393                                    content: '.flyout-cart',
8394                                    overlay: false,
8395                                    scrollbar: flyoutCartScrollbarSelector + ' .items'
8396                                }
8397                            ]
8398                        },
8399                        equalizer: {
8400                            blocks: [
8401                                {
8402                                    selector: '.address-list > div',
8403                                    property: 'height',
8404                                    measurementFunction: 'innerHeight'
8405                                },
8406                                {
8407                                    selector: '.address-grid > div',
8408                                    property: 'min-height',
8409                                    measurementFunction: 'innerHeight'
8410                                },
8411                                {
8412                                    selector: '.order-item',
8413                                    property: 'height',
8414                                    measurementFunction: 'innerHeight'
8415                                },
8416                                {
8417                                    selector: '.request-item',
8418                                    property: 'height',
8419                                    measurementFunction: 'innerHeight'
8420                                },
8421                                {
8422                                    selector: '.news-item',
8423                                    property: 'height',
8424                                    measurementFunction: 'innerHeight'
8425                                },
8426                                {
8427                                    selector: '.order-details-area > div',
8428                                    property: 'height',
8429                                    measurementFunction: 'innerHeight'
8430                                },
8431                                {
8432                                    selector: '.order-review-data > div',
8433                                    property: 'height',
8434                                    measurementFunction: 'innerHeight'
8435                                },
8436                                {
8437                                    selector: '.shipment-details-area > div',
8438                                    property: 'height',
8439                                    measurementFunction: 'innerHeight'
8440                                }
8441                            ]
8442                        }
8443                    }
8444                },
8445                {
8446                    breakpoint: 1025,
8447                    settings: {
8448                        menu: {
8449                            closeMenuSelector: closeMenuSelector,
8450                            sublistIndent: {
8451                                enabled: true
8452                            }
8453                        },
8454                        attachDetach: {
8455                            blocks: [
8456                                {
8457                                    content: '#topcartlink .ico-cart',
8458                                    elementToAttach: '.responsive-nav-wrapper .shopping-cart-link'
8459                                },
8460                                {
8461                                    content: '.header-selectors-wrapper',
8462                                    elementToAttach: '.mobile-menu-items'
8463                                },
8464                                {
8465                                    content: '.ico-compare',
8466                                    elementToAttach: '.header-menu'
8467                                },
8468                                {
8469                                    content: '.ico-wishlist',
8470                                    elementToAttach: '.header-menu'
8471                                }
8472                            ]
8473                        },
8474                        header: {
8475                            activeClass: 'open',
8476                            modules: [
8477                                {
8478                                    opener: '.search-wrap > span',
8479                                    content: '.store-search-box',
8480                                    closer: '.store-search-box ' + closeSideMenu,
8481                                    elementToAttach: '.master-wrapper-page',
8482                                    overlay: true
8483                                },
8484                                {
8485                                    opener: '.personal-button > span',
8486                                    closer: '.profile-menu-box ' + closeSideMenu,
8487                                    content: '.profile-menu-box',
8488                                    elementToAttach: '.header',
8489                                    overlay: true
8490                                },
8491                                {
8492                                    opener: '.shopping-cart-link',
8493                                    closer: '.mobile-flyout-wrapper ' + closeSideMenu,
8494                                    content: '.mobile-flyout-wrapper',
8495                                    preventClicking: true,
8496                                    overlay: true,
8497                                    scrollbar: flyoutCartScrollbarSelector
8498                                },
8499                                {
8500                                    opener: '.responsive-nav-wrapper .menu-title > span',
8501                                    closer: closeMenuSelector,
8502                                    content: '.header-menu',
8503                                    overlay: true,
8504                                    scrollbar: true
8505                                },
8506                                {
8507                                    elementToAttach: '.master-wrapper-content',
8508                                    opener: '.filters-button-wrapper .filters-button',
8509                                    closer: '.nopAjaxFilters7Spikes ' + closeSideMenu,
8510                                    content: '.nopAjaxFilters7Spikes',
8511                                    overlay: true,
8512                                    scrollbar: true
8513                                }
8514                            ]
8515                        },
8516                        filters: true,
8517                        toggle: {
8518                            blocks: [
8519                                {
8520                                    opener: '.block > .title',
8521                                    content: '.block > .listbox',
8522                                    animation: {
8523                                        type: 'slide'
8524                                    }
8525                                },
8526                                {
8527                                    opener: '.mobile-selector .selector-title',
8528                                    content: '.mobile-collapse',
8529                                    activeClassOpener: 'open',
8530                                    animation: {
8531                                        type: 'slide',
8532                                        speed: 'slow'
8533                                    }
8534                                },
8535                                {
8536                                    opener: '.write-review .title',
8537                                    content: '.write-review-collapse',
8538                                    activeClassOpener: 'open',
8539                                    animation: {
8540                                        type: 'slide',
8541                                        speed: 'slow'
8542                                    }
8543                                },
8544                                {
8545                                    opener: '.comment-form-btn',
8546                                    content: '.new-comment form',
8547                                    activeClassOpener: 'open',
8548                                    animation: {
8549                                        type: 'slide',
8550                                        speed: 'slow'
8551                                    }
8552                                },
8553                                {
8554                                    opener: '.cart-collaterals > div > .title',
8555                                    content: '.cart-collaterals > div > .list',
8556                                    activeClassOpener: 'open',
8557                                    animation: {
8558                                        type: 'slide',
8559                                        speed: 'slow'
8560                                    }
8561                                },
8562                                {
8563                                    opener: '.add-button .btn-holder',
8564                                    content: '.add-button .enter-address',
8565                                    activeClassOpener: 'open',
8566                                    animation: {
8567                                        type: 'slide',
8568                                        speed: 'slow'
8569                                    }
8570                                }
8571                            ]
8572                        },
8573                        equalizer: {
8574                            blocks: [
8575                                {
8576                                    selector: '.cart tr .product'
8577                                },
8578                                {
8579                                    selector: '.data-table .product'
8580                                },
8581                                {
8582                                    selector: '.address-list > div',
8583                                    property: 'height',
8584                                    measurementFunction: 'innerHeight'
8585                                },
8586                                {
8587                                    selector: '.address-grid > div',
8588                                    property: 'min-height',
8589                                    measurementFunction: 'innerHeight'
8590                                },
8591                                {
8592                                    selector: '.order-item',
8593                                    property: 'height',
8594                                    measurementFunction: 'innerHeight'
8595                                },
8596                                {
8597                                    selector: '.request-item',
8598                                    property: 'height',
8599                                    measurementFunction: 'innerHeight'
8600                                },
8601                                {
8602                                    selector: '.news-item',
8603                                    property: 'height',
8604                                    measurementFunction: 'innerHe
8604ight'
8605                                },
8606                                {
8607                                    selector: '.order-details-area > div',
8608                                    property: 'height',
8609                                    measurementFunction: 'innerHeight'
8610                                },
8611                                {
8612                                    selector: '.order-review-data > div',
8613                                    property: 'height',
8614                                    measurementFunction: 'innerHeight'
8615                                },
8616                                {
8617                                    selector: '.shipment-details-area > div',
8618                                    property: 'height',
8619                                    measurementFunction: 'innerHeight'
8620                                }
8621                            ]
8622                        }
8623                    }
8624                },
8625                {
8626                    breakpoint: 769,
8627                    settings: {
8628                        menu: {
8629                            closeMenuSelector: closeMenuSelector,
8630                            sublistIndent: {
8631                                enabled: true
8632                            }
8633                        },
8634                        attachDetach: {
8635                            blocks: [
8636                                {
8637                                    content: '#topcartlink .ico-cart',
8638                                    elementToAttach: '.responsive-nav-wrapper .shopping-cart-link'
8639                                },
8640                                {
8641                                    content: '.header-selectors-wrapper',
8642                                    elementToAttach: '.mobile-menu-items'
8643                                },
8644                                {
8645                                    content: '.ico-compare',
8646                                    elementToAttach: '.header-menu'
8647                                },
8648                                {
8649                                    content: '.ico-wishlist',
8650                                    elementToAttach: '.header-menu'
8651                                }
8652                            ]
8653                        },
8654                        header: {
8655                            activeClass: 'open',
8656                            modules: [
8657                                {
8658                                    opener: '.search-wrap > span',
8659                                    content: '.store-search-box',
8660                                    closer: '.store-search-box ' + closeSideMenu,
8661                                    elementToAttach: '.master-wrapper-page',
8662                                    overlay: true
8663                                },
8664                                {
8665                                    opener: '.personal-button > span',
8666                                    closer: '.profile-menu-box ' + closeSideMenu,
8667                                    content: '.profile-menu-box',
8668                                    elementToAttach: '.header',
8669                                    overlay: true
8670                                },
8671                                {
8672                                    opener: '.shopping-cart-link',
8673                                    closer: '.mobile-flyout-wrapper ' + closeSideMenu,
8674                                    content: '.mobile-flyout-wrapper',
8675                                    preventClicking: true,
8676                                    overlay: true,
8677                                    scrollbar: flyoutCartScrollbarSelector
8678                                },
8679                                {
8680                                    opener: '.responsive-nav-wrapper .menu-title > span',
8681                                    closer: closeMenuSelector,
8682                                    content: '.header-menu',
8683                                    overlay: true,
8684                                    scrollbar: true
8685                                },
8686                                {
8687                                    elementToAttach: '.master-wrapper-content',
8688                                    opener: '.filters-button-wrapper .filters-button',
8689                                    closer: '.nopAjaxFilters7Spikes ' + closeSideMenu,
8690                                    content: '.nopAjaxFilters7Spikes',
8691                                    overlay: true,
8692                                    scrollbar: true
8693                                }
8694                            ]
8695                        },
8696                        filters: true,
8697                        toggle: {
8698                            blocks: [
8699                                {
8700                                    opener: '.block > .title',
8701                                    content: '.block > .listbox',
8702                                    animation: {
8703                                        type: 'slide'
8704                                    }
8705                                },
8706                                {
8707                                    opener: '.mobile-selector .selector-title',
8708                                    content: '.mobile-collapse',
8709                                    activeClassOpener: 'open',
8710                                    animation: {
8711                                        type: 'slide',
8712                                        speed: 'slow'
8713                                    }
8714                                },
8715                                {
8716                                    opener: '.write-review .title',
8717                                    content: '.write-review-collapse',
8718                                    activeClassOpener: 'open',
8719                                    animation: {
8720                                        type: 'slide',
8721                                        speed: 'slow'
8722                                    }
8723                                },
8724                                {
8725                                    opener: '.comment-form-btn',
8726                                    content: '.new-comment form',
8727                                    activeClassOpener: 'open',
8728                                    animation: {
8729                                        type: 'slide',
8730                                        speed: 'slow'
8731                                    }
8732                                },
8733                                {
8734                                    opener: '.cart-collaterals > div > .title',
8735                                    content: '.cart-collaterals > div > .list',
8736                                    activeClassOpener: 'open',
8737                                    animation: {
8738                                        type: 'slide',
8739                                        speed: 'slow'
8740                                    }
8741                                },
8742                                {
8743                                    opener: '.add-button .btn-holder',
8744                                    content: '.add-button .enter-address',
8745                                    activeClassOpener: 'open',
8746                                    animation: {
8747                                        type: 'slide',
8748                                        speed: 'slow'
8749                                    }
8750                                }
8751                            ]
8752                        },
8753                        equalizer: {
8754                            blocks: [
8755                                {
8756                                    selector: '.cart tr .product'
8757                                },
8758                                {
8759                                    selector: '.data-table .product'
8760                                },
8761                                {
8762                                    selector: '.address-list > div',
8763                                    property: 'height',
8764                                    measurementFunction: 'innerHeight'
8765                                },
8766                                {
8767                                    selector: '.address-grid > div',
8768                                    property: 'min-height',
8769                                    measurementFunction: 'innerHeight'
8770                                },
8771                                {
8772                                    selector: '.order-item',
8773                                    property: 'height',
8774                                    measurementFunction: 'innerHeight'
8775                                },
8776                                {
8777                                    selector: '.request-item',
8778                                    property: 'height',
8779                                    measurementFunction: 'innerHeight'
8780                                },
8781                                {
8782                                    selector: '.news-item',
8783                                    property: 'height',
8784                                    measurementFunction: 'innerHe
8784ight'
8785                                },
8786                                {
8787                                    selector: '.order-details-area > div',
8788                                    property: 'height',
8789                                    measurementFunction: 'innerHeight'
8790                                },
8791                                {
8792                                    selector: '.order-review-data > div',
8793                                    property: 'height',
8794                                    measurementFunction: 'innerHeight'
8795                                },
8796                                {
8797                                    selector: '.shipment-details-area > div',
8798                                    property: 'height',
8799                                    measurementFunction: 'innerHeight'
8800                                }
8801                            ]
8802                        }
8803                    }
8804                },
8805                {
8806                    breakpoint: 481,
8807                    settings: {
8808                        menu: {
8809                            closeMenuSelector: closeMenuSelector,
8810                            sublistIndent: {
8811                                enabled: true
8812                            }
8813                        },
8814                        flyoutCart: {
8815                            flyoutCartSelector: '#flyout-cart',
8816                            flyoutCartScrollbarSelector: flyoutCartScrollbarSelector,
8817                            removeItemSelector: '#flyout-cart .remove-item'
8818                        },
8819                        attachDetach: {
8820                            blocks: [
8821                                {
8822                                    content: '#topcartlink .ico-cart',
8823                                    elementToAttach: '.responsive-nav-wrapper .shopping-cart-link'
8824                                },
8825                                {
8826                                    content: '.header-selectors-wrapper',
8827                                    elementToAttach: '.mobile-menu-items'
8828                                },
8829                                {
8830                                    content: '.ico-compare',
8831                                    elementToAttach: '.header-menu'
8832                                },
8833                                {
8834                                    content: '.ico-wishlist',
8835                                    elementToAttach: '.header-menu'
8836                                }
8837                            ]
8838                        },
8839                        header: {
8840                            activeClass: 'open',
8841                            modules: [
8842                                {
8843                                    opener: '.search-wrap > span',
8844                                    content: '.store-search-box',
8845                                    closer: '.store-search-box ' + closeSideMenu,
8846                                    elementToAttach: '.master-wrapper-page',
8847                                    overlay: true
8848                                },
8849                                {
8850                                    opener: '.personal-button > span',
8851                                    closer: '.profile-menu-box ' + closeSideMenu,
8852                                    content: '.profile-menu-box',
8853                                    elementToAttach: '.header',
8854                                    overlay: true
8855                                },
8856                                {
8857                                    opener: '.shopping-cart-link',
8858                                    closer: '.mobile-flyout-wrapper ' + closeSideMenu,
8859                                    content: '.mobile-flyout-wrapper',
8860                                    preventClicking: true,
8861                                    overlay: true,
8862                                    scrollbar: flyoutCartScrollbarSelector
8863                                },
8864                                {
8865                                    opener: '.responsive-nav-wrapper .menu-title > span',
8866                                    closer: closeMenuSelector,
8867                                    content: '.header-menu',
8868                                    overlay: true,
8869                                    scrollbar: true
8870                                },
8871                                {
8872                                    elementToAttach: '.master-wrapper-content',
8873                                    opener: '.filters-button-wrapper .filters-button',
8874                                    closer: '.nopAjaxFilters7Spikes ' + closeSideMenu,
8875                                    content: '.nopAjaxFilters7Spikes',
8876                                    overlay: true,
8877                                    scrollbar: true
8878                                }
8879                            ]
8880                        },
8881                        filters: true,
8882                        toggle: {
8883                            blocks: [
8884                                {
8885                                    opener: '.block > .title',
8886                                    content: '.block > .listbox',
8887                                    animation: {
8888                                        type: 'slide'
8889                                    }
8890                                },
8891                                {
8892                                    opener: '.mobile-selector .selector-title',
8893                                    content: '.mobile-collapse',
8894                                    activeClassOpener: 'open',
8895                                    animation: {
8896                                        type: 'slide',
8897                                        speed: 'slow'
8898                                    }
8899                                },
8900                                {
8901                                    opener: '.footer-block > .title',
8902                                    content: '.footer-block > .list',
8903                                    animation: {
8904                                        type: 'slide'
8905                                    }
8906                                },
8907                                {
8908                                    opener: '.write-review .title',
8909                                    content: '.write-review-collapse',
8910                                    activeClassOpener: 'open',
8911                                    animation: {
8912                                        type: 'slide',
8913                                        speed: 'slow'
8914                                    }
8915                                },
8916                                {
8917                                    opener: '.comment-form-btn',
8918                                    content: '.new-comment form',
8919                                    activeClassOpener: 'open',
8920                                    animation: {
8921                                        type: 'slide',
8922                                        speed: 'slow'
8923                                    }
8924                                },
8925                                {
8926                                    opener: '.cart-collaterals > div > .title',
8927                                    content: '.cart-collaterals > div > .list',
8928                                    activeClassOpener: 'open',
8929                                    animation: {
8930                                        type: 'slide',
8931                                        speed: 'slow'
8932                                    }
8933                                },
8934                                {
8935                                    opener: '.add-button .btn-holder',
8936                                    content: '.add-button .enter-address',
8937                                    activeClassOpener: 'open',
8938                                    animation: {
8939                                        type: 'slide',
8940                                        speed: 'slow'
8941                                    }
8942                                }
8943                            ]
8944                        },
8945                        equalizer: {
8946                            blocks: [
8947                                {
8948                                    selector: '.cart tr .product'
8949                                },
8950                                {
8951                                    selector: '.data-table .product'
8952                                }
8953                            ]
8954                        }
8955                    }
8956                }
8957
8958            ]
8959        }
8960
8961        var theme = new window.sevenSpikesTheme(themeSettings, dependencies, false)
8962
8963        showHideLeftSideCategoryMenu()
8964        theme.init()
8965
8966        groupedButton()
8967        handleHeaderMenuCategories()
8968        menuEqualizer()
8969        accountPageColumns()
8970        handleClearCartButton()
8971        updateCartMobiile()
8972        handleLastActiveCheckoutStep()
8973        handleHomePageFeaturedProductsCarousel()
8974        handleHomePageBestsellerProductsCarousel()
8975        setMaxHeightOnMobile('.header-menu')
8976        setMaxHeightOnMobile('.mobile-flyout-wrapper .flyout-cart-scroll-area', '.close-side-menu')
8977        setMaxHeightOnMobile('.header-menu .sublist-wrap')
8978        handleExpand('.cart-collaterals .deals .message-failure', '.cart-collaterals .deals > .list', '.cart-collaterals > .deals > .title')
8979        handleExpand('.cart-collaterals .collaterals-shipping .message-failure', '.cart-collaterals .collaterals-shipping > .list', '.cart-collaterals .collaterals-shipping > .title')
8980        handleExpand('.write-review .field-validation-error', '.write-review-collapse', '.write-review > .title')
8981        handleExpand('.new-comment .field-validation-error', '.new-comment form', '.comment-form-btn')
8982
8983        if ($('.profile-menu-box').hasClass('login-form-in-header')) {
8984
8985            showLoginFormInHeaderPanel()
8986        }
8987
8988        $(window).on('resize', function () {
8989            setMaxHeightOnMobile('.header-menu')
8990            setMaxHeightOnMobile('.mobile-flyout-wrapper .flyout-cart-scroll-area', '.close-side-menu')
8991            setMaxHeightOnMobile('.header-menu .sublist-wrap')
8992            menuEqualizer()
8993            accountPageColumns()
8994        })
8995
8996        $(document).on('initializePerfectScrollbar.theme', function () {
8997            setMaxHeightOnMobile('.mobile-flyout-wrapper .flyout-cart-scroll-area', '.close-side-menu')
8998        })
8999
9000        $(document).on('quickTabsRefreshedTab', function () {
9001            handleExpand('.write-review .field-validation-error', '.write-review-collapse', '.write-review > .title')
9002        })
9003
9004        function groupedButton() {
9005
9006            if (!$('.product-variant-line').length) {
9007
9008                return
9009            }
9010
9011            //Sets the number of product varinats in the button
9012            $('.grouped-btn > span').text($('.product-variant-line').length)
9013
9014            //Click on the button scrolls to the first variant
9015            $('.grouped-btn').on('click', function (event) {
9016
9017                event.preventDefault()
9018
9019                $('html, body').animate({
9020                    scrollTop: $('#product-list-start').offset().top
9021                }, 1000)
9022            })
9023        }
9024
9025        function handleHeaderMenuCategories() {
9026            if ($('.header-menu.categories-in-side-panel').length === 0) {
9027                return
9028            }
9029
9030            var sideCategoriesList = $('.category-navigation-list-wrapper > .category-navigation-list')
9031
9032            var topMenuCategoryItems = $('.top-menu li.root-category-items, ' +
9033                '.mega-menu > li.root-category-items, ' +
9034                '.mega-menu > li.category-menu-item > .sublist-wrap > .sublist > li.root-category-items')
9035
9036            var topMenuCategoryItemsClonedBase = topMenuCategoryItems.clone()
9037
9038            var topMenuCategoryItemsCloned = topMenuCategoryItemsClonedBase.find('> .sublist-wrap > .sublist > li')
9039
9040            if (topMenuCategoryItemsCloned.length <= 0)
9041                topMenuCategoryItemsCloned = topMenuCategoryItemsClonedBase
9042
9043            topMenuCategoryItemsCloned.appendTo(sideCategoriesList)
9044        }
9045
9046        function menuEqualizer() {
9047
9048            if ($(window).width() > 1024) {
9049
9050                sublistHeight()
9051            }
9052
9053            //Sets a minimum height to each sublist according to the height of its parent
9054            function sublistHeight() {
9055
9056                $('.category-navigation-list .sublist, .category-navigation-list .dropdown .row-wrapper').each(function () {
9057                    var $this = $(this)
9058                    var minHeight = $this.parents('ul').outerHeight()
9059
9060                    $this.css('min-height', minHeight)
9061                })
9062            }
9063        }
9064
9065        function accountPageColumns() {
9066            var navHeight = $('.block-account-navigation').outerHeight()
9067
9068            $('.account-page').css('min-height', navHeight)
9069        }
9070
9071        function handleClearCartButton() {
9072
9073            $('.order-summary-content .clear-cart-button').on('click', function (e) {
9074                e.preventDefault()
9075
9076                $('.cart [name="removefromcart"]').attr('checked', 'checked')
9077
9078                $('.order-summary-content .update-cart-button').click()
9079            })
9080        }
9081
9082        function updateCartMobiile() {
9083
9084            $(document).on('removeItemFlyoutCart', function () {
9085
9086                var windowWidth = $(window).width()
9087
9088                if ($('.shopping-cart-link .ico-cart').length && windowWidth < 1025) {
9089
9090                    $('.shopping-cart-link .ico-cart').remove()
9091
9092                    $(document).trigger('detachElement.theme', ['#topcartlink .ico-cart', '.responsive-nav-wrapper .shopping-cart-link'])
9093                }
9094            })
9095        }
9096
9097        function handleLastActiveCheckoutStep() {
9098
9099            // add a class to the last active checkout step. 
9100            $('.active-step:last').addClass('last')
9101        }
9102
9103
9104        function handleExpand(errors, form, opener) {
9105
9106            if ($(errors).length > 0) {
9107                $(form).slideDown('slow', function () {
9108
9109                    $('html, body').animate({
9110                        scrollTop: $(opener).offset().top
9111                    }, 300)
9112                })
9113
9114                $(opener).addClass('open')
9115            }
9116        }
9117
9118        function showLoginFormInHeaderPanel() {
9119
9120            var loginUrl = $('.header-links .ico-account').attr('data-loginUrl')
9121
9122            $.ajax({
9123                url: loginUrl,
9124                type: 'GET',
9125                data: {
9126                    'isHeaderPanel': true
9127                }
9128            }).done(function (data) {
9129                var dataObj = $(data)
9130                var loginFields = dataObj.find('.returning-wrapper')
9131
9132                if (loginFields.length > 0) {
9133
9134                    $('.profile-menu-box .header-form-holder').html(loginFields)
9135                }
9136
9137            })
9138        }
9139
9140        function handleHomePageFeaturedProductsCarousel() {
9141            var featuredProductsCarousel = $('.product-grid.home-page-product-grid .item-grid').not('.jCarouselMainWrapper .product-grid.home-page-product-grid .item-grid')
9142
9143            if (featuredProductsCarousel.length === 0) {
9144                return
9145            }
9146
9147            initializeSlickCarousel(featuredProductsCarousel)
9148        }
9149
9150        function handleHomePageBestsellerProductsCarousel() {
9151            var bestsellerProductsCarousel = $('.product-grid.bestsellers .item-grid').not('.jCarouselMainWrapper .product-grid.bestsellers .item-grid')
9152
9153            if (bestsellerProductsCarousel.length === 0) {
9154                return
9155            }
9156
9157            initializeSlickCarousel(bestsellerProductsCarousel)
9158        }
9159
9160        function initializeSlickCarousel(productsContainter) {
9161            productsContainter.on('init', function () {
9162                $.event.trigger({ type: 'newProductsAddedToPageEvent' })
9163            })
9164
9165            var isRtl = $('html').attr('dir') == 'rtl'
9166
9167            productsContainter.slick({
9168                rtl: isRtl,
9169                infinite: true,
9170                rows: 2,
9171                slidesToShow: 4,
9172                slidesToScroll: 1,
9173                arrows: true,
9174                respondTo: 'slider',
9175                easing: 'swing',
9176                draggable: false,
9177                pauseOnHover: true,
9178                responsive: getHomePageCarouselResponsiveSettings()
9179            })
9180        }
9181
9182        function getHomePageCarouselResponsiveSettings() {
9183            var responsiveBreakpointsObj = {}
9184
9185            if ($('#home-page-carousel-breakpoints').length == 0 || !$('#home-page-carousel-breakpoints').val()) {
9186                return responsiveBreakpointsObj
9187            }
9188
9189            try {
9190                responsiveBreakpointsObj = JSON.parse($('#home-page-carousel-breakpoints').val())
9191            }
9192            catch (e) {
9193                console.log('Invalid home page slider responsive breakpoints setting value! (EmporiumThemeSettings.ResponsiveBreakpointsForHomePageProducts)')
9194            }
9195
9196            return responsiveBreakpointsObj
9197        }
9198
9199        //This function is written in a way that allows it to be used in other themes if needed
9200        function setMaxHeightOnMobile(element, additionalHeight) {
9201
9202            if (typeof additionalHeight === 'string') {
9203
9204                additionalHeight = $(additionalHeight).outerHeight()
9205
9206            } else if (typeof additionalHeight === 'undefined') {
9207
9208                additionalHeight = 0
9209
9210            }
9211
9212            if ($(window).width() <= 1024) {
9213                var storeThemeHeight = $('.header-storetheme').length ? $('.header-storetheme').outerHeight() : 0
9214
9215                $(element).css('max-height', $(window).height() - additionalHeight - storeThemeHeight)
9216
9217            }
9218            else {
9219                $(element).removeAttr('style')
9220            }
9221        }
9222
9223        /***** Custom JS*/
9224
9225        $(document).on('click', '.search-wrap', function () {
9226            if ($('.store-search-box').hasClass('opened'))
9227                $('body').css('overflow-y', 'hidden')
9228        })
9229
9230        $(document).on('click', '.store-search-box .close-side-menu-btn', function () {
9231            $('body').css('overflow-y', '')
9232        })
9233
9234        function showHideLeftSideCategoryMenu() {
9235            var showHideLeftSideCategoryMenu = $('.top-menu li.root-category-items, ' +
9236                '.mega-menu > li.root-category-items, ' +
9237                '.mega-menu > li.category-menu-item > .sublist-wrap > .sublist > li.root-category-items').length > 0
9238            if (showHideLeftSideCategoryMenu)
9239                $('.category-navigation-list-wrapper').css('display', 'inline-block')
9240        }
9241
9242        rimuoviEtichettaEnergeticaDaCaratteristiche()
9243
9244        $(document).on('quickTabsCreated', function () {
9245            rimuoviEtichettaEnergeticaDaCaratteristiche()
9246        })
9247        $(document).on('quickTabsLoadedTab', function () {
9248            rimuoviEtichettaEnergeticaDaCaratteristiche()
9249        })
9250        $(document).on('quickTabsRefreshedTab', function () {
9251            rimuoviEtichettaEnergeticaDaCaratteristiche()
9252        })
9253        function rimuoviEtichettaEnergeticaDaCaratteristiche() {
9254            $('.product-specs-box .spec-name').each(function (index, item) {
9255                var name = $(item).text()
9256
9257                if (name.search('Etichetta Energetica') >= 0)
9258                    $(item).closest('tr').remove()
9259            })
9260            $('.product-specs-box .spec-value').each(function (index, item) {
9261                var value = $(item).text()
9262
9263                if (value.search('.pdf') >= 0)
9264                    $(item).closest('tr').remove()
9265                else if (value.search('.html') >= 0)
9266                    $(item).closest('tr').remove()
9267                else if (value.search('.mp4') >= 0)
9268                    $(item).closest('tr').remove()
9269                else if (value.search('.jpg') >= 0)
9270                    $(item).closest('tr').remove()
9271                else if (value.search('.png') >= 0)
9272                    $(item).closest('tr').remove()
9273                else if (value.search('.jpeg') >= 0)
9274                    $(item).closest('tr').remove()
9275                else if (value.search('.zip') >= 0)
9276                    $(item).closest('tr').remove()
9277            })
9278        }
9279
9280        var idTimeoutMenu = 0
9281
9282        $(document).on('mouseover', '.header-menu ul.mega-menu > li', function () {
9283            var $this = $(this)
9284
9285            clearTimeout(idTimeoutMenu)
9286            idTimeoutMenu = setTimeout(function () {
9287                $('.header-menu ul.mega-menu > li').removeClass('active-sign')
9288
9289                if ($this.find('.container-subs-menu ul.subcategories').length > 0)
9290                    $this.addClass('active-sign')
9291
9292                var $containerMegaMenuScrollable = $('.container-scrollable-mega-menu')
9293                var $subMenu = $this.find('.container-subs-menu')
9294
9295                $containerMegaMenuScrollable.find('> .container-subs-menu').remove()
9296                $containerMegaMenuScrollable.append($subMenu.clone())
9297
9298                $containerMegaMenuScrollable.find('> .container-subs-menu ul.subcategories').css('display', 'block')
9299            }, $('.container-scrollable-mega-menu > .container-subs-menu ul.subcategories').is(':visible') ? 0 : 200)
9300        })
9301
9302        $(document).on('mouseleave', '.header-menu ul.mega-menu > li', function () {
9303            clearTimeout(idTimeoutMenu)
9304        })
9305
9306        $(document).on('mouseover', '.header-menu ul.mega-menu, .header-menu .container-scrollable-mega-menu .container-subs-menu', function () {
9307            $(this).siblings('ul.mega-menu').find('>li').addClass('noAfter')
9308        })
9309
9310        $(document).on('mouseleave', '.header-menu ul.mega-menu, .header-menu .container-scrollable-mega-menu .container-subs-menu', function () {
9311            var $this = $(this)
9312
9313            $(document).off('mouseover.subs').on('mouseover.subs', '.header-menu .container-scrollable-mega-menu .container-subs-menu', function () {
9314                clearTimeout(idTimeoutMenu)
9315            })
9316
9317            idTimeoutMenu = setTimeout(function () {
9318                $this.siblings('ul.mega-menu').find('>li').removeClass('noAfter')
9319                $('.container-scrollable-mega-menu > .container-subs-menu').remove()
9320                $('.header-menu ul.mega-menu > li').removeClass('active-sign')
9321            }, 400)
9322        })
9323
9324        attivaScrollMenu()
9325        $(window).on('resize', function () {
9326            attivaScrollMenu()
9327        })
9328
9329        function attivaScrollMenu() {
9330            // 1007 + 17 (scrollbar) = 1024px (menu mobile)
9331            if ($(window).width() > 1007) {
9332                var $containerScrollableMenu = $('.container-scrollable-mega-menu')
9333
9334                $containerScrollableMenu.sly(false)
9335                $containerScrollableMenu.sly({
9336                    horizontal: 1,
9337                    itemNav: 'basic',
9338                    smart: 1,
9339                    activateOn: 'click',
9340                    mouseDragging: 1,
9341                    touchDragging: 1,
9342                    releaseSwing: 1,
9343                    startAt: 0,
9344                    scrollBy: 1,
9345                    scrollTrap: true,
9346                    activatePageOn: 'click',
9347                    speed: 300,
9348                    elasticBounds: 1,
9349                    easing: 'easeOutExpo',
9350                    dragHandle: 1,
9351                    dynamicHandle: 1,
9352                })
9353            }
9354        }
9355
9356        function sistemaOrdine() {
9357            var $menu = $('.header-menu ul.mega-menu')
9358
9359            var menuOrdinato = $menu.find('> li').sort(function (a, b) {
9360                var itemA = $(a).data('ordine')
9361                var itemB = $(b).data('ordine')
9362
9363                return itemA - itemB
9364            })
9365
9366            $menu.empty().append($(menuOrdinato))
9367
9368            $('.header-menu .container-scrollable-mega-menu').fadeTo('fast', '1')
9369        }
9370        sistemaOrdine()
9371
9372        // Rimuovere Disponibilità box 'Aggiungi al carrello' del prodotto
9373        //if ($('.product-prices-box .promozioni').length <= 0)
9374        //    $('.product-prices-box .availability').css('display', 'block')
9375
9376        // Limitazione filtraggio prodotti a 5 nella visualizzazione iniziale
9377        // Funzione non più necessaria, faccio tutto lato server
9378
9379        //$('.nopAjaxFilters7Spikes .block').each(function (index, item) {
9380        //    var $item = $(item)
9381        //    var $lis = $item.find('ul li')
9382
9383        //    if ($lis.length > 5) {
9384        //        var toHide = $lis.splice(5, $lis.length)
9385        //        toHide.forEach(function (li) {
9386        //            $(li).hide()
9387        //        })
9388
9389        //        $item.find('ul').append('<span class="show-more-options">Mostra tutto</span>')
9390        //    }
9391        //})
9392
9393        $(document).off('click.showmoreoptions').on('click.showmoreoptions', '.show-more-options', function () {
9394            var $this = $(this)
9395            var $ulOptions = $this.closest('ul')
9396
9397            $ulOptions.find('li').removeAttr('style')
9398
9399            $this.remove()
9400        })
9401
9402        // Funzione utilizzare per risistemare i margini del body e del menu quando è presente il banner promo top
9403        var processed = false
9404        function risistemaMenu() {
9405            if ($(window).width() > 1007) {
9406                $('.responsive-nav-wrapper-parent').removeAttr('style')
9407                $('body').removeAttr('style')
9408                processed = false
9409            }
9410        }
9411
9412        $(window).resize(function () {
9413            risistemaMenu()
9414        })
9415        risistemaMenu()
9416
9417        $(document).on('click', '.item-box .product-item a', function () {
9418            if (typeof gtag !== "undefined") {
9419                var $product = $(this).closest('.product-item')
9420
9421                // The new Google Analytics 4 ecommerce implementation.
9422                gtag('event', 'select_item', {
9423                    'send_to': 'G-XPD3MPJT10',
9424                    'content_type': 'product',
9425                    'content_id': $product.data('sku')
9426                })
9427            }
9428        })
9429
9430        $('.rich-blog-homepage .blog-posts').slick({
9431            infinite: true,
9432            slidesToShow: 4,
9433            slidesToScroll: 1,
9434            dots: false,
9435            arrows: true,
9436            respondTo: 'slider',
9437            easing: 'swing',
9438            draggable: false,
9439            pauseOnHover: true,
9440            responsive: [
9441                {
9442                    breakpoint: 991,
9443                    settings: {
9444                        slidesToShow: 2,
9445                        slidesToScroll: 2,
9446                        centerMode: true,
9447                        draggable: true,
9448                        arrows: false
9449                    }
9450                },
9451                {
9452                    breakpoint: 767,
9453                    settings: {
9454                        centerPadding: '20px',
9455                        slidesToShow: 2,
9456                        slidesToScroll: 2,
9457                        centerMode: true,
9458                        draggable: true,
9459                        arrows: false
9460                    }
9461                }
9462            ]
9463        })
9464
9465        $('.carosello-promo-home').slick({
9466            infinite: true,
9467            slidesToShow: 4,
9468            slidesToScroll: 1,
9469            dots: false,
9470            arrows: true,
9471            easing: 'swing',
9472            draggable: false,
9473            pauseOnHover: true,
9474            responsive: [
9475                {
9476                    breakpoint: 1500,
9477                    settings: {
9478                        slidesToShow: 3,
9479                        slidesToScroll: 1
9480                    }
9481                },
9482                {
9483                    breakpoint: 1280,
9484                    settings: {
9485                        slidesToShow: 4,
9486                        slidesToScroll: 1
9487                    }
9488                },
9489                {
9490                    breakpoint: 1199,
9491                    settings: {
9492                        slidesToShow: 3,
9493                        slidesToScroll: 1
9494                    }
9495                },
9496                {
9497                    breakpoint: 991,
9498                    settings: {
9499                        centerPadding: '20px',
9500                        slidesToShow: 2,
9501                        slidesToScroll: 1,
9502                        centerMode: true,
9503                        draggable: true,
9504                        arrows: false
9505                    }
9506                },
9507                {
9508                    breakpoint: 767,
9509                    settings: {
9510                        centerPadding: '20px',
9511                        slidesToShow: 1,
9512                        slidesToScroll: 2,
9513                        centerMode: true,
9514                        draggable: true,
9515                        arrows: false
9516                    }
9517                }
9518            ]
9519        })
9520
9521        /***** End Custom JS*/
9522    })
9523})(jQuery)
9524
9525function insertParam(key, value) {
9526    key = encodeURIComponent(key);
9527    value = encodeURIComponent(value);
9528
9529    // kvp looks like ['key1=value1', 'key2=value2', ...]
9530    var kvp = document.location.search.substr(1).split('&');
9531    let i = 0;
9532
9533    for (; i < kvp.length; i++) {
9534        if (kvp[i].startsWith(key + '=')) {
9535            let pair = kvp[i].split('=');
9536            pair[1] = value;
9537            kvp[i] = pair.join('=');
9538            break;
9539        }
9540    }
9541
9542    if (i >= kvp.length) {
9543        kvp[kvp.length] = [key, value].join('=');
9544    }
9545
9546    // can return this or...
9547    let params = kvp.join('&');
9548
9549    // reload page with new params
9550    document.location.search = params;
9551}
9552
9553function parseBool(string) {
9554    if (isNull(string))
9555        return false;
9556    return /^true/i.test(string.toString().toLowerCase());
9557}
9558
9559function isNull(object) {
9560    if (typeof object === 'undefined' || object === null)
9561        return true;
9562    else if (typeof object === 'string' && object.trim() === '')
9563        return true;
9564    else if (Array.isArray(object) && object.length === 0)
9565        return true;
9566    return false;
9567}
9568
9569function categorySearchAutocomplete(label) {
9570    if (typeof gtag !== "undefined") {
9571        gtag('event', 'Category Search Button popup', {
9572            'event_category': 'Navigazione',
9573            'event_label': label,
9574        })
9575    }
9576}
9577
9578function categorySearchPage(label) {
9579    if (typeof gtag !== "undefined") {
9580        gtag('event', 'Category Search Button result', {
9581            'event_category': 'Navigazione',
9582            'event_label': label,
9583        })
9584    }
9585}
9586
9587$(document).off('click.showpassword').on('click.showpassword', '#form-login .inputs-icons.icon-password', function (e) {
9588    let $this = $(this)
9589    let $inputPass = $this.closest('.inputs').find('input.password')
9590
9591    if ($inputPass.length > 0) {
9592        if ($inputPass.attr('type') === "password") {
9593            $inputPass.attr('type', 'text')
9594            $this.removeClass("fa-eye")
9595            $this.addClass("fa-eye-slash")
9596        }
9597        else {
9598            $inputPass.attr('type', 'password')
9599            $this.removeClass("fa-eye-slash")
9600            $this.addClass("fa-eye")
9601        }
9602    }
9603})
9604
9605$(document).off('click.productboxaddtocart').on('click.productboxaddtocart', '.product-item .product-box-add-to-cart-button', function () {
9606    const $this = $(this)
9607    const productId = $this.data('productid')
9608
9609    if (productId) {
9610        $.get(`/estendopopup?productId=${productId}`, function (data) {
9611            const idPopUpEstendo = `popUpEstendo-${productId}`
9612
9613            if ($(data).is(`#${idPopUpEstendo}`))
9614                $('body').append(data)
9615        }).always(function () {
9616            AjaxCart.addproducttocart_catalog($this.data('url'))
9617        })
9618    }
9619    else {
9620        AjaxCart.addproducttocart_catalog($this.data('url'))
9621    }
9622})
9623
9624$(document).off('click.estendomoreinfo').on('click.estendomoreinfo', '.lista-estendo .estendo .more-info', function () {
9625    const $this = $(this)
9626    const productId = $this.data('productid')
9627
9628    if (productId) {
9629        $.get(`/estendopopup?productId=${productId}`, function (data) {
9630            const idPopUpEstendo = `popUpEstendo-${productId}`
9631
9632            if ($(data).is(`#${idPopUpEstendo}`)) {
9633                $('body').append(data)
9634
9635                const target = $this.data('href')
9636                setRightContentPopUpEstendo(target, true)
9637
9638                const $popUpEstendo = $(`#${idPopUpEstendo}`)
9639
9640                MicroModal.show(idPopUpEstendo, {
9641                    onShow: function () {
9642                        $popUpEstendo.find('#estendo-video')[0].play();
9643
9644                        if ($this.hasClass('no-altri-prodotti'))
9645                            $popUpEstendo.find('.popup-estendo-altro').remove()
9646
9647                        if ($this.hasClass('no-aggiungi'))
9648                            $popUpEstendo.find('.btn-add-estensione').remove()
9649
9650                        if ($this.closest('.cart').length > 0) {
9651                            $popUpEstendo.find('.btn-no').text('Torna indietro')
9652                            $popUpEstendo.find('.btn-add-estensione').data('item', $this.data('item'))
9653                            $popUpEstendo.find('.btn-add-estensione').attr('data-item', $this.data('item'))
9654                        }
9655                    },
9656                    onClose: function () {
9657                        $popUpEstendo.find('#estendo-video')[0].pause();
9658                        setTimeout(function () {
9659                            $popUpEstendo.remove()
9660                        }, 500)
9661                    }
9662                })
9663            }
9664        })
9665    }
9666})

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