PageSourceSearch

https://oldbuickparts.com/var/resources/js/61526f2f574e696b39c84ce…7b391eb3341f7e89fa5be1.js?tstamp=1790421733

js oldbuickparts.com collected 2026-09-26 12:33:59 UTC 1,305,874 bytes, 19,078 lines download raw bytes

1
2/* AUTOGENERATED: jquery.min.js */
vendor: 15,088 bytes, lines 3-4
3/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */
4!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(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.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||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+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]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(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},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.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=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),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("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(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 de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.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},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.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 l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(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?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&j.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(D),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}
vendor: 4,356 bytes, line 4
4:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!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!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.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:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];
vendor: 10,068 bytes, line 4
4if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(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 Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(D).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var j,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pe
vendor: 8,547 bytes, line 4
4nding",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(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},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(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[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(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(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.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&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.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=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.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 ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone
vendor: 51,416 bytes, line 4
4=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);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"===w(o))S.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]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ee(){return!1}function Se(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function ke(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)ke(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=Ee;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Ae(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,Ce)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=Te.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=Te.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click",Ce),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ee,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&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Ae(this,e,Se),!1},trigger:function(){return Ae(this,e),!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return ke(this,e,t,n,r)},one:function(e,t,n,r){return ke(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(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=Ee),this.each(function(){S.event.remove(this,e,n,t)})}});var Ne=/<script|<style|<link/i,De=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function Pe(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&De.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Pe(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),Le)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,He),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(je,""),u,l))}return n}function Re(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Re(this,e,!0)},remove:function(e){return Re(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.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 Pe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)})},prepend:function(){return Pe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=qe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pe(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&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(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&&!Ne.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Me=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Ie=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},We=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Fe=new RegExp(ne.join("|"),"i");function Be(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ie(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Me.test(a)&&Fe.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}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",n.style.height="9px",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=3<parseInt(r.height),re.removeChild(e)),a}}))}();var _e=["Webkit","Moz","ms"],ze=E.createElement("div").style,Ue={};function Xe(e){var t=S.cssProps[e]||Ue[e];return t||(e in ze?e:Ue[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=_e.length;while(n--)if((e=_e[n]+t)in ze)return e}(e)||e)}var Ve=/^(none|table(?!-c[ea]).+)/,Ge=/^--/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(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+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Ze(e,t,n){var r=Ie(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Me.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ke(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Ge.test(t),l=e.style;if(u||(t=Xe(s)),a=S.cssHooks[t]||S.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=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.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=X(t);return Ge.test(t)||(t=Xe(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ve.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,u,n):We(e,Ye,function(){return Ze(e,u,n)})},set:function(e,t,n){var r,i=Ie(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Ke(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ke(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Je(0,t,s)}}}),S.cssHooks.marginLeft=$e(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Je)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ie(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=S.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):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.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=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Xe(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=et.prototype.init,S.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(st):C.setTimeout(st,S.fx.interval),S.fx.tick())}function ut(){return C.setTimeout(function(){tt=void 0}),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=tt||ut(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:tt||ut(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=ft.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ct,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._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--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ct(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.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(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=ft(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&at.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(lt(r,!0),e,t,n)}}),S.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),tt=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){nt||(nt=!0,st())},S.fx.stop=function(){nt=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},rt=E.createElement("input"),it=E.createElement("select").appendChild(E.createElement("option")),rt.type="checkbox",y.checkOn=""!==rt.value,y.optSelected=it.selected,(rt=E.createElement("input")).value="t",rt.type="radio",y.radioValue="t"===rt.value;var pt,dt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void S.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=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(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(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=dt[t]||S.find.attr;dt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=dt[o],dt[o]=r,r=null!=a(e,t,n)?o:null,dt[o]=i),r}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function vt(e){return(e.match(P)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.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=S.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.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)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,yt(this)))});if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,yt(this)))});if(!arguments.length)return this.attr("class","");if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,yt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=mt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=yt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+vt(yt(n))+" ").indexOf(t))return!0;return!1}});var xt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(xt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:vt(S.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||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!bt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,bt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,wt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,wt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var Tt=C.location,Ct={guid:Date.now()},Et=/\?/;S.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+e),t};var St=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Dt(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||St.test(n)?i(n,t):Dt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)Dt(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)Dt(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var jt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt={},Mt={},It="*/".concat("*"),Wt=E.createElement("a");function Ft(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Bt(t,i,o,a){var s={},u=t===Mt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function $t(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Wt.href=Tt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,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":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$t($t(e,S.ajaxSettings),t):$t(S.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Ht.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Tt.href)+"").replace(Pt,Tt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Wt.protocol+"//"+Wt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Bt(Rt,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ot.test(v.type),f=v.url.replace(qt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(jt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Et.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Lt,"$1"),o=(Et.test(f)?"&":"?")+"_="+Ct.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+It+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Bt(Mt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=S.ajaxSettings.xhr();y.cors=!!zt&&"withCredentials"in zt,y.ajax=zt=!!zt,S.ajaxTransport(function(i){var o,a;if(y.cors||zt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(_t[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.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 S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=vt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.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"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Gt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Gt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Yt=C.jQuery,Qt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Qt),e&&C.jQuery===S&&(C.jQuery=Yt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
4;
5/* AUTOGENERATED: jquery-migrate.min.js */
6/*! jQuery Migrate v3.3.2 | (c) OpenJS Foundation and other contributors | jquery.org/license */
7"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],i=1;i<=3;i++){if(+o[i]<+n[i])return 1;if(+n[i]<+o[i])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.3.2",n.console&&n.console.log&&(s&&e("3.0.0")||n.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var r={};function u(e){var t=n.console;s.migrateDeduplicateWarnings&&r[e]||(r[e]=!0,s.migrateWarnings.push(e),t&&t.warn&&!s.migrateMute&&(t.warn("JQMIGRATE: "+e),s.migrateTrace&&t.trace&&t.trace()))}function t(e,t,r,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n),r},set:function(e){u(n),r=e}})}function o(e,t,r,n){e[t]=function(){return u(n),r.apply(this,arguments)}}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){r={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("jQuery is not compatible with Quirks Mode");var i,a,c,d={},l=s.fn.init,p=s.find,f=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,y=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,m=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;for(i in s.fn.init=function(e){var t=Array.prototype.slice.call(arguments);return"string"==typeof e&&"#"===e&&(u("jQuery( '#' ) is not a valid selector"),t[0]=[]),l.apply(this,t)},s.fn.init.prototype=s.fn,s.find=function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&f.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(y,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("Attribute selector with '#' was not fixed: "+r[0])}}return p.apply(this,r)},p)Object.prototype.hasOwnProperty.call(p,i)&&(s.find[i]=p[i]);o(s.fn,"size",function(){return this.length},"jQuery.fn.size() is deprecated and removed; use the .length property"),o(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"jQuery.parseJSON is deprecated; use JSON.parse"),o(s,"holdReady",s.holdReady,"jQuery.holdReady is deprecated"),o(s,"unique",s.uniqueSort,"jQuery.unique is deprecated; use jQuery.uniqueSort"),t(s.expr,"filters",s.expr.pseudos,"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),t(s.expr,":",s.expr.pseudos,"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&o(s,"trim",function(e){return null==e?"":(e+"").replace(m,"")},"jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(o(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"jQuery.nodeName is deprecated"),o(s,"isArray",Array.isArray,"jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(o(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){d["[object "+t+"]"]=t.toLowerCase()}),o(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[Object.prototype.toString.call(e)]||"object":typeof e},"jQuery.type is deprecated"),o(s,"isFunction",function(e){return"function"==typeof e},"jQuery.isFunction() is deprecated"),o(s,"isWindow",function(e){return null!=e&&e===e.window},"jQuery.isWindow() is deprecated")),s.ajax&&(a=s.ajax,c=/(=)\?(?=&|$)|\?\?/,s.ajax=function(){var e=a.apply(this,arguments);return e.promise&&(o(e,"success",e.done,"jQXHR.success is deprecated and removed"),o(e,"error",e.fail,"jQXHR.error is deprecated and removed"),o(e,"complete",e.always,"jQXHR.complete is deprecated and removed")),e},e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(c.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&c.test(e.data))&&u("JSON-to-JSONP auto-promotion is deprecated")}));var g=s.fn.removeAttr,h=s.fn.toggleClass,v=/\S+/g;function j(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}s.fn.removeAttr=function(e){var r=this;return s.each(e.match(v),function(e,t){s.expr.match.bool.test(t)&&(u("jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),g.apply(this,arguments)};var Q,b=!(s.fn.toggleClass=function(t){return void 0!==t&&"boolean"!=typeof t?h.apply(this,arguments):(u("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"")}))}),w=/^[a-z]/,x=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return b=!0,e=r.apply(this,arguments),b=!1,e})}),s.swap=function(e,t,r,n){var o,i,a={};for(i in b||u("jQuery.swap() is undocumented and deprecated"),t)a[i]=e.style[i],e.style[i]=t[i];for(i in o=r.apply(e,n||[]),t)e.style[i]=a[i];return o},e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("JQMIGRATE: jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),s.cssNumber||(s.cssNumber={}),Q=s.fn.css,s.fn.css=function(e,t){var r,n,o=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(o,e,t)}),this):("number"==typeof t&&(r=j(e),n=r,w.test(n)&&x.test(n[0].toUpperCase()+n.slice(1))||s.cssNumber[r]||u('Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),Q.apply(this,arguments))};var A,k,S,M,N=s.data;s.data=function(e,t,r){var n,o,i;if(t&&"object"==typeof t&&2===arguments.length){for(i in n=s.hasData(e)&&N.call(this,e),o={},t)i!==j(i)?(u("jQuery.data() always sets/gets camelCased names: "+i),n[i]=t[i]):o[i]=t[i];return N.call(this,e,o),t}return t&&"string"==typeof t&&t!==j(t)&&(n=s.hasData(e)&&N.call(this,e))&&t in n?(u("jQuery.data() always sets/gets camelCased names: "+t),2<arguments.length&&(n[t]=r),n[t]):N.apply(this,arguments)},s.fx&&(S=s.Tween.prototype.run,M=function(e){return e},s.Tween.prototype.run=function(){1<s.easing[this.easing].length&&(u("'jQuery.easing."+this.easing.toString()+"' should use only one argument"),s.easing[this.easing]=M),S.apply(this,arguments)},A=s.fx.interval||13,k="jQuery.fx.interval is deprecated",n.requestAnimationFrame&&Object.defineProperty(s.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return n.document.hidden||u(k),A},set:function(e){u(k),A=e}}));var R=s.fn.load,H=s.event.add,C=s.event.fix;s.event.props=[],s.event.fixHooks={},t(s.event.props,"concat",s.event.props.concat,"jQuery.event.props.concat() is deprecated and removed"),s.event.fix=function(e){var t,r=e.type,n=this.fixHooks[r],o=s.event.props;if(o.length){u("jQuery.event.props are deprecated and removed: "+o.join());while(o.length)s.event.addProp(o.pop())}if(n&&!n._migrated_&&(n._migrated_=!0,u("jQuery.event.fixHooks are deprecated and removed: "+r),(o=n.props)&&o.length))while(o.length)s.event.addProp(o.pop());return t=C.call(this,e),n&&n.filter?n.filter(t,e):t},s.event.add=function(e,t){return e===n&&"load"===t&&"complete"===n.document.readyState&&u("jQuery(window).on('load'...) called after load event occurred"),H.apply(this,arguments)},s.each(["load","unload","error"],function(e,t){s.fn[t]=function(){var e=Array.prototype.slice.call(arguments,0);return"load"===t&&"string"==typeof e[0]?R.apply(this,e):(u("jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))}}),s.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,r){s.fn[r]=function(e,t){return u("jQuery.fn."+r+"
7() event shorthand is deprecated"),0<arguments.length?this.on(r,null,e,t):this.trigger(r)}}),s(function(){s(n.document).triggerHandler("ready")}),s.event.special.ready={setup:function(){this===n.document&&u("'ready' event is deprecated")}},s.fn.extend({bind:function(e,t,r){return u("jQuery.fn.bind() is deprecated"),this.on(e,null,t,r)},unbind:function(e,t){return u("jQuery.fn.unbind() is deprecated"),this.off(e,null,t)},delegate:function(e,t,r,n){return u("jQuery.fn.delegate() is deprecated"),this.on(t,e,r,n)},undelegate:function(e,t,r){return u("jQuery.fn.undelegate() is deprecated"),1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},hover:function(e,t){return u("jQuery.fn.hover() is deprecated"),this.on("mouseenter",e).on("mouseleave",t||e)}});function T(e){var t=n.document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body&&t.body.innerHTML}function P(e){var t=e.replace(O,"<$1></$2>");t!==e&&T(e)!==T(t)&&u("HTML tags must be properly nested and closed: "+e)}var O=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,q=s.htmlPrefilter;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.htmlPrefilter=function(e){return P(e),e.replace(O,"<$1></$2>")}},s.htmlPrefilter=function(e){return P(e),q(e)};var D,_=s.fn.offset;s.fn.offset=function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?_.apply(this,arguments):(u("jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},s.ajax&&(D=s.param,s.param=function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)});var E,F,J=s.fn.andSelf||s.fn.addBack;return s.fn.andSelf=function(){return u("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),J.apply(this,arguments)},s.Deferred&&(E=s.Deferred,F=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],s.Deferred=function(e){var i=E(),a=i.promise();return i.pipe=a.pipe=function(){var o=arguments;return u("deferred.pipe() is deprecated"),s.Deferred(function(n){s.each(F,function(e,t){var r="function"==typeof o[e]&&o[e];i[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===a?n.promise():this,r?[e]:arguments)})}),o=null}).promise()},e&&e.call(i,i),i},s.Deferred.exceptionHook=E.exceptionHook),s});;
8/* AUTOGENERATED: jquery-ui.min.js */
vendor: 33,137 bytes, lines 9-14
9/*! jQuery UI - v1.12.1 - 2016-09-14
10* http://jqueryui.com
11* Includes: widget.js, position.js, data.js, disable-selection.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, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
12* Copyright jQuery Foundation and other contributors; Licensed MIT */
13
14(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","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},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(m.inline?m.dpDiv.parent()[0]:m.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 h=0,l=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={},h=e.split(".")[0];e=e.split(".")[1];var l=h+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][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:h,widgetName:e,widgetFullName:l}),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=l.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=l.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=h++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),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 h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,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/,h=/top|center|bottom/,l=/[\+\-]\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"]):h.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=h.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.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,h=t(this),l=h.outerWidth(),c=h.outerHeight(),d=i(this,"marginLeft"),_=i(this,"marginTop"),x=l+d+i(this,"marginRight")+y.width,C=c+_+i(this,"marginBottom")+y.height,D=t.extend({},m),I=e(k.my,h.outerWidth(),h.outerHeight());"right"===n.my[0]?D.left-=l:"center"===n.my[0]&&(D.left-=l/2),"bottom"===n.my[1]?D.top-=c:"center"===n.my[1]&&(D.top-=c/2),D.left+=I[0],D.top+=I[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:l,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[u[0]+I[0],u[1]+I[1]],my:n.my,at:n.at,within:b,elem:h})}),n.using&&(r=function(t){var e=g.left-D.left,i=e+p-l,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:h,left:D.left,top:D.top,width:l,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>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)}),h.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,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l: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,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l: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,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,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-h,(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,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,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-h,(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")}});var c="ui-effects-",u="ui-effects-style",d="ui-effects-animated",p=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=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].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*)/,h=[{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]]}}],l=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"},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=l.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}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){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,h],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 l?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=l(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=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(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()}}),l.fn.parse.prototype=l.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),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(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,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(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=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[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))),l[i.idx]=n,this[h](l)))})})}),l.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=l(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(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.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}},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"}}(p),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)&&(p.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 h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.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(),l=l.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.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(d)||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(c+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(c+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(u,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(u)||"",t.removeData(u)},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(c+"placeholder",i)),e.css({position:s,left:n.left,top:n.top}),i},removePlaceholder:function(t){var e=c+"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(d),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),a()}function a(){t.isFunction(h)&&h.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=c.shift(),t.uiBackCompat===!1||o?"none"===s.mode?(r[l](),a()):n.call(r[0],s,i):(r.is(":hidden")?"hide"===l:"show"===l)?(r[l](),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",h=s.complete,l=s.mode,c=[],u=function(e){var i=t(this),s=t.effects.mode(i,l)||o;i.data(d,!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?l?this[l](s.duration,h):this.each(function(){h&&h.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)
15  
vendor: 32,074 bytes, line 15
15}}(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,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,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-h,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 f=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)},h=t.effects.createPlaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],"show"===e.mode&&(n.cssClip(r.clip),h&&h.css(t.effects.clipToBox(r)),r.clip=a),h&&h.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,h="hide"===r,l="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(l||h?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),l&&(n={opacity:1},n[m]=o,a.css("opacity",0).css(m,_?2*-u:2*u).animate(n,f,g)),h&&(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=h?2*u:u/2;h&&(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,h=r||"horizontal"===a,l=r||"vertical"===a;s=o.cssClip(),n.clip={top:l?(s.bottom-s.top)/2:s.top,right:h?(s.right-s.left)/2:s.right,bottom:l?(s.bottom-s.top)/2:s.bottom,left:h?(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",h="up"===r||"down"===r?"top":"left",l="up"===r||"left"===r?"-=":"+=",c="+="===l?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,u[h]=l+s,a&&(n.css(u),u[h]=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,h,l,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(h=m.top+o*v,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*_,l=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?l*_:0),top:h+(g?c*v:0),opacity:g?0:1}).animate({left:r+(g?0:l*_),top:h+(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,h=/([0-9]+)%/.exec(r),l=!!e.horizFirst,c=l?["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;h&&(r=parseInt(h[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"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["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,h,n.from.y,_),v=t.effects.setTransition(a,h,n.to.y,v)),n.from.x!==n.to.x&&(_=t.effects.setTransition(a,l,n.from.x,_),v=t.effects.setTransition(a,l,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)&&(h=h.concat(["marginTop","marginBottom"]).concat(r),l=l.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},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,h,n.from.y,o),a=t.effects.setTransition(i,h,n.to.y,a)),n.from.x!==n.to.x&&(o=t.effects.setTransition(i,l,n.from.x,o),a=t.effects.setTransition(i,l,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,h=2*(e.times||5)+(r?1:0),l=e.duration/h,c=0,u=1,d=s.queue().length;for((o||!s.is(":visible"))&&(s.css("opacity",0).show(),c=1);h>u;u++)s.animate({opacity:c},l,e.easing),c=1-c;s.animate({opacity:c},l,e.easing),s.queue(i),t.effects.unshift(s,d,h+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,h=2*r+1,l=Math.round(e.duration/h),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,l,e.easing);r>s;s++)n.animate(p,l,e.easing).animate(f,l,e.easing);n.animate(p,l,e.easing).animate(d,l/2,e.easing).queue(i),t.effects.unshift(n,g,h+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,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u=e.distance||o["top"===l?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),s=o.cssClip(),n=o.position()[l],d[l]=(c?-1:1)*u+n,d.clip=o.cssClip(),d.clip[a[h][1]]=d.clip[a[h][0]],"show"===r&&(o.cssClip(d.clip),o.css(l,d[l]),d.clip=s,d[l]=n),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});var f;t.uiBackCompat!==!1&&(f=t.effects.define("transfer",function(e,i){t(this).transfer(e,i)})),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(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(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?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.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"))},_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],h=r&&n.collapsible,l=h?t():a.next(),c=o.next(),u={oldHeader:o,oldPanel:c,newHeader:h?t():a,newPanel:l};e.preventDefault(),r&&!n.collapsible||this._trigger("beforeActivate",e,u)===!1||(n.active=h?!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,h=t.css("box-sizing"),l=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},u=l&&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"===h&&(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.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.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)})},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,h=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=h.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=h.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","false")},_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;
16    
vendor: 32,597 bytes, line 16
16this.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 g=/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 h=n[s]("widget");t.data(h[0],"ui-controlgroup-data",o?o:n[s]("instance")),i.push(h[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(g,"")),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)},_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.iconSpace||(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 m;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,h,l,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;'/>"),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||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+c,l/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(),m===n&&(m=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,h,l=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):l?"all"===i?t.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),a(l.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,r)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),l),this._autoSize(l),this._setDate(l,o),this._updateAlternate(l),this._updateDatepicker(l)),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},_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,h,l,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}),h={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),h=t.datepicker._checkOffset(s,h,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),s.inline||(l=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[l]?s.dpDiv.show(l,t.datepicker._get(s,"showOptions"),c):s.dpDiv[l||"show"](l?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s))
17  
vendor: 32,043 bytes, line 17
17}},_updateDatepicker:function(e){this.maxRows=4,m=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,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=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>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>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,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,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(h).match(o);if(!a)throw"Missing number at position "+h;return h+=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(h,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],h+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+h},x=function(){if(i.charAt(h)!==e.charAt(n))throw"Unexpected literal at position "+h;h++};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>h&&(a=i.substr(h),!/^\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,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("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+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("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"'":h("'")?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(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.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},_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,h,l,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,I,T,P,M,S,H,z,O,A,N,W,E,F,L,R=new Date,B=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=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"),$=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=Q&&Q>e?Q: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-$,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-"+(Y?"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-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+$,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-"+(Y?"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-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:B,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=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>",l=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(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>":"")+(Y?"":h)+"</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)),I=" ui-corner-all",T="",X){if(T+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:T+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:T+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:T+=" ui-datepicker-group-middle",I=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,Q,J,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",P=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,P+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[M]+"'>"+p[M]+"</span></th>";for(T+=P+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),H=(this._getFirstDayOfMonth(te,Z)-c+7)%7,z=Math.ceil((H+S)/7),O=X?this.maxRows>z?this.maxRows:z:z,this.maxRows=O,A=this._daylightSavingAdjust(new Date(te,Z,1-H)),N=0;O>N;N++){for(T+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(A)+"</td>":"",w=0;7>w;w++)E=m?m.apply(t.input?t.input[0]:null,[A]):[!0,""],F=A.getMonth()!==Z,L=F&&!v||!E[0]||Q&&Q>A||J&&A>J,W+="<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&&!_?"":" "+E[1]+(A.getTime()===G.getTime()?" "+this._currentClass:"")+(A.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!E[2]?"":" title='"+E[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()===B.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);T+=W+"</tr>"}Z++,Z>11&&(Z=0,te++),T+="</tbody></table>"+(X?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=T}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,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(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||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,h=this._get(t,"yearRange");return h&&(i=h.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.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var _=!1;t(document).on("mouseup",function(){_=!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(!_){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(),_=!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,_=!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]])},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.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}),"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())}
18  
vendor: 32,039 bytes, line 18
18},_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)},_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]),h=t.pageX,l=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]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[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((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=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&&(h=this.originalPageX),"x"===a.axis&&(l=this.originalPageY)),{top:l-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:h-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)}}),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,h,l,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--)h=s.snapElements[d].left-s.margins.left,l=h+s.snapElements[d].width,c=s.snapElements[d].top-s.margins.top,u=c+s.snapElements[d].height,h-g>_||m>l+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(h-_),r=g>=Math.abs(l-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:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).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(h-m),r=g>=Math.abs(l-_),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:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-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.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,h=this._change[o];return this._updatePrevProperties(),h?(i=h.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,h,l=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,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.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,h=this.originalPosition.top+this.originalSize.height,l=/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&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-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,h={width:i.size.width-r,height:i.size.height-a},l=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(h,c&&l?{top:c,left:l}:{}),{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,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.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,h=a.containerOffset,l=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=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.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-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.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(),h=a.outerWidth()-e.sizeDiff.width,l=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:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),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:s.position.left-a.left||0};t(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,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,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=h,_&&(p+=l),v&&(f+=c),g&&(p-=l),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-l)&&(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-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,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
19  
vendor: 32,619 bytes, line 19
19},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.prependTo(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(),h=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"+(h>=0?"+":"")+h,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.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var 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)&&v(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 v=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,h=a+e.helperProportions.height,l=i.offset.left,c=i.offset.top,u=l+i.proportions().width,d=c+i.proportions().height;switch(s){case"fit":return o>=l&&u>=r&&a>=c&&d>=h;case"intersect":return o+e.helperProportions.width/2>l&&u>r-e.helperProportions.width/2&&a+e.helperProportions.height/2>c&&d>h-e.helperProportions.height/2;case"pointer":return t(n.pageY,c,i.proportions().height)&&t(n.pageX,l,i.proportions().width);case"touch":return(a>=c&&d>=a||h>=c&&d>=h||c>a&&h>d)&&(o>=l&&u>=o||r>=l&&u>=r||l>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&&v(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=v(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.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")}}),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,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!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?l=!(c.left>r||o>c.right||c.top>h||a>c.bottom):"fit"===n.tolerance&&(l=c.left>o&&r>c.right&&c.top>a&&h>c.bottom),l?(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}}),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
20  
vendor: 32,006 bytes, line 20
20},_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)},_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,h,l,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"),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.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,h=this,l=this._animateOff?!1:r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"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)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"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"))}}}),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,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,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&&h>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=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s],this.document[0]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&h.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(h.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=h.length-1;s>=0;s--)h[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,h,l,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,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,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);if(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.innerHeight()-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,h,l,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]&&(h=this.items[s].item.offset()[a],l=!1,e[u]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(e[u]-h)&&(n=Math.abs(e[u]-h),o=this.items[s],this.direction=l?"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,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(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():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?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;
21    
vendor: 27,153 bytes, line 21
21this._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.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"),h=t(s).closest("li"),l=h.attr("aria-controls");e._isLocal(s)?(n=s.hash,a=n.substring(1),o=e.element.find(e._sanitizeSelector(n))):(a=h.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)),l&&h.data("ui-tabs-aria-controls",l),h.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)),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,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};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(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.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},h=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),h(n,e)},1)}).fail(function(t,e){setTimeout(function(){h(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",""))}),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){l.of=t,a.is(":hidden")||a.position(l)}var o,a,r,h,l=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(),h=t("<div>").html(a.find(".ui-tooltip-content").html()),h.removeAttr("name").find("[name]").removeAttr("name"),h.removeAttr("id").find("[id]").removeAttr("id"),h.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(l.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]}),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});
21;
22/* AUTOGENERATED: jquery.ui.touch-punch.min.js */
23/*!
24 * jQuery UI Touch Punch 0.2.3
25 *
26 * Copyright 2011–2014, Dave Furfero
27 * Dual licensed under the MIT or GPL Version 2 licenses.
28 *
29 * Depends:
30 *  jquery.ui.widget.js
31 *  jquery.ui.mouse.js
32 */
33!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);;
34/* AUTOGENERATED: jquery.cookie.min.js */
35(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else if(typeof exports==='object'){factory(require('jquery'))}else factory(jQuery)}(function($){var pluses=/\+/g
36function encode(s){return config.raw?s:encodeURIComponent(s)}
37function decode(s){return config.raw?s:decodeURIComponent(s)}
38function stringifyCookieValue(value){return encode(config.json?JSON.stringify(value):String(value))}
39function parseCookieValue(s){if(s.indexOf('"')===0)s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,'\\');try{s=decodeURIComponent(s.replace(pluses,' '));return config.json?JSON.parse(s):s}catch(e){}}
40function read(s,converter){var value=config.raw?s:parseCookieValue(s);return $.isFunction(converter)?converter(value):value};var config=$.cookie=function(key,value,options){if(arguments.length>1&&!$.isFunction(value)){options=$.extend({},config.defaults,options);if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setTime(+t+days*864e+5)};return(document.cookie=[encode(key),'=',stringifyCookieValue(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''))};var result=key?undefined:{},cookies=document.cookie?document.cookie.split('; '):[];for(var i=0,l=cookies.length;i<l;i++){var parts=cookies[i].split('='),name=decode(parts.shift()),cookie=parts.join('=');if(key&&key===name){result=read(cookie,value);break};if(!key&&(cookie=read(cookie))!==undefined)result[name]=cookie};return result};config.defaults={};
vendor: 5,374 bytes, lines 40-47
40$.removeCookie=function(key,options){if($.cookie(key)===undefined)return false;$.cookie(key,'',$.extend({},options,{expires:-1}));return!$.cookie(key)}}));;
41/* AUTOGENERATED: underscore-min.js */
42!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n=n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){
43//     Underscore.js 1.12.0
44//     https://underscorejs.org
45//     (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
46//     Underscore may be freely distributed under the MIT license.
47  var n="1.12.0",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,g=isFinite,d=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u<t;u++)e[u]=arguments[u+r];switch(r){case 0:return n.call(this,e);case 1:return n.call(this,arguments[0],e);case 2:return n.call(this,arguments[0],arguments[1],e)}var o=Array(r+1);for(u=0;u<r;u++)o[u]=arguments[u];return o[r]=e,n.apply(this,o)}}function _(n){var r=typeof n;return"function"===r||"object"===r&&!!n}function w(n){return void 0===n}function A(n){return!0===n||!1===n||"[object Boolean]"===a.call(n)}function x(n){var r="[object "+n+"]";return function(n){return a.call(n)===r}}var S=x("String"),O=x("Number"),M=x("Date"),E=x("RegExp"),B=x("Error"),N=x("Symbol"),I=x("ArrayBuffer"),k=x("Function"),T=r.document&&r.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof T&&(k=function(n){return"function"==typeof n||!1});var D=k,R=x("Object"),F=l&&R(new DataView(new ArrayBuffer(8))),V="undefined"!=typeof Map&&R(new Map),P=x("DataView");var q=F?function(n){return null!=n&&D(n.getInt8)&&I(n.buffer)}:P,U=s||x("Array");function W(n,r){return null!=n&&f.call(n,r)}var z=x("Arguments");!function(){z(arguments)||(z=function(n){return W(n,"callee")})}();var L=z;function C(n){return O(n)&&y(n)}function K(n){return function(){return n}}function J(n){return function(r){var t=n(r);return"number"==typeof t&&t>=0&&t<=m}}function $(n){return function(r){return null==r?void 0:r[n]}}var G=$("byteLength"),H=J(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:K(!1),Y=$("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e<t;++e)r[n[e]]=!0;return{contains:function(n){return r[n]},push:function(t){return r[t]=!0,n.push(t)}}}(r);var t=b.length,u=n.constructor,o=D(u)&&u.prototype||e,i="constructor";for(W(n,i)&&!r.contains(i)&&r.push(i);t--;)(i=b[t])in n&&n[i]!==o[i]&&!r.contains(i)&&r.push(i)}function nn(n){if(!_(n))return[];if(p)return p(n);var r=[];for(var t in n)W(n,t)&&r.push(t);return d&&Z(n,r),r}function rn(n,r){var t=nn(r),e=t.length;if(null==n)return!e;for(var u=Object(n),o=0;o<e;o++){var i=t[o];if(r[i]!==u[i]||!(i in u))return!1}return!0}function tn(n){return n instanceof tn?n:this instanceof tn?void(this._wrapped=n):new tn(n)}function en(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,G(n))}tn.VERSION=n,tn.prototype.value=function(){return this._wrapped},tn.prototype.valueOf=tn.prototype.toJSON=tn.prototype.value,tn.prototype.toString=function(){return String(this._wrapped)};var un="[object DataView]";function on(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(null==n||null==r)return!1;if(n!=n)return r!=r;var o=typeof n;return("function"===o||"object"===o||"object"==typeof r)&&function n(r,t,e,o){r instanceof tn&&(r=r._wrapped);t instanceof tn&&(t=t._wrapped);var i=a.call(r);if(i!==a.call(t))return!1;if(F&&"[object Object]"==i&&q(r)){if(!q(t))return!1;i=un}switch(i){case"[object RegExp]":case"[object String]":return""+r==""+t;case"[object Number]":return+r!=+r?+t!=+t:0==+r?1/+r==1/t:+r==+t;case"[object Date]":case"[object Boolean]":return+r==+t;case"[object Symbol]":return u.valueOf.call(r)===u.valueOf.call(t);case"[object ArrayBuffer]":case un:return n(en(r),en(t),e,o)}var f="[object Array]"===i;if(!f&&X(r)){if(G(r)!==G(t))return!1;if(r.buffer===t.buffer&&r.byteOffset===t.byteOffset)return!0;f=!0}if(!f){if("object"!=typeof r||"object"!=typeof t)return!1;var c=r.constructor,l=t.constructor;if(c!==l&&!(D(c)&&c instanceof c&&D(l)&&l instanceof l)&&"constructor"in r&&"constructor"in t)return!1}o=o||[];var s=(e=e||[]).length;for(;s--;)if(e[s]===r)return o[s]===t;if(e.push(r),o.push(t),f){if((s=r.length)!==t.length)return!1;for(;s--;)if(!on(r[s],t[s],e,o))return!1}else{var p,v=nn(r);if(s=v.length,nn(t).length!==s)return!1;for(;s--;)if(p=v[s],!W(t,p)||!on(r[p],t[p],e,o))return!1}return e.pop(),o.pop(),!0}(n,r,t,e)}function an(n){if(!_(n))return[];var r=[];for(var t in n)r.push(t);return d&&Z(n,r),r}function fn(n){var r=Y(n);return function(t){if(null==t)return!1;var e=an(t);
vendor: 5,278 bytes, line 47
47if(Y(e))return!1;for(var u=0;u<r;u++)if(!D(t[n[u]]))return!1;return n!==hn||!D(t[cn])}}var cn="forEach",ln="has",sn=["clear","delete"],pn=["get",ln,"set"],vn=sn.concat(cn,pn),hn=sn.concat(pn),yn=["add"].concat(sn,cn,ln),gn=V?fn(vn):x("Map"),dn=V?fn(hn):x("WeakMap"),bn=V?fn(yn):x("Set"),mn=x("WeakSet");function jn(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=n[r[u]];return e}function _n(n){for(var r={},t=nn(n),e=0,u=t.length;e<u;e++)r[n[t[e]]]=t[e];return r}function wn(n){var r=[];for(var t in n)D(n[t])&&r.push(t);return r.sort()}function An(n,r){return function(t){var e=arguments.length;if(r&&(t=Object(t)),e<2||null==t)return t;for(var u=1;u<e;u++)for(var o=arguments[u],i=n(o),a=i.length,f=0;f<a;f++){var c=i[f];r&&void 0!==t[c]||(t[c]=o[c])}return t}}var xn=An(an),Sn=An(nn),On=An(an,!0);function Mn(n){if(!_(n))return{};if(v)return v(n);var r=function(){};r.prototype=n;var t=new r;return r.prototype=null,t}function En(n){return _(n)?U(n)?n.slice():xn({},n):n}function Bn(n){return U(n)?n:[n]}function Nn(n){return tn.toPath(n)}function In(n,r){for(var t=r.length,e=0;e<t;e++){if(null==n)return;n=n[r[e]]}return t?n:void 0}function kn(n,r,t){var e=In(n,Nn(r));return w(e)?t:e}function Tn(n){return n}function Dn(n){return n=Sn({},n),function(r){return rn(r,n)}}function Rn(n){return n=Nn(n),function(r){return In(r,n)}}function Fn(n,r,t){if(void 0===r)return n;switch(null==t?3:t){case 1:return function(t){return n.call(r,t)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)}}return function(){return n.apply(r,arguments)}}function Vn(n,r,t){return null==n?Tn:D(n)?Fn(n,r,t):_(n)&&!U(n)?Dn(n):Rn(n)}function Pn(n,r){return Vn(n,r,1/0)}function qn(n,r,t){return tn.iteratee!==Pn?tn.iteratee(n,r):Vn(n,r,t)}function Un(){}function Wn(n,r){return null==r&&(r=n,n=0),n+Math.floor(Math.random()*(r-n+1))}tn.toPath=Bn,tn.iteratee=Pn;var zn=Date.now||function(){return(new Date).getTime()};function Ln(n){var r=function(r){return n[r]},t="(?:"+nn(n).join("|")+")",e=RegExp(t),u=RegExp(t,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,r):n}}var Cn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},Kn=Ln(Cn),Jn=Ln(_n(Cn)),$n=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Gn=/(.)^/,Hn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Qn=/\\|'|\r|\n|\u2028|\u2029/g;function Xn(n){return"\\"+Hn[n]}var Yn=0;function Zn(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var o=Mn(n.prototype),i=n.apply(o,u);return _(i)?i:o}var nr=j((function(n,r){var t=nr.placeholder,e=function(){for(var u=0,o=r.length,i=Array(o),a=0;a<o;a++)i[a]=r[a]===t?arguments[u++]:r[a];for(;u<arguments.length;)i.push(arguments[u++]);return Zn(n,e,this,this,i)};return e}));nr.placeholder=tn;var rr=j((function(n,r,t){if(!D(n))throw new TypeError("Bind must be called on a function");var e=j((function(u){return Zn(n,e,r,this,t.concat(u))}));return e})),tr=J(Y);function er(n,r,t,e){if(e=e||[],r||0===r){if(r<=0)return e.concat(n)}else r=1/0;for(var u=e.length,o=0,i=Y(n);o<i;o++){var a=n[o];if(tr(a)&&(U(a)||L(a)))if(r>1)er(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f<c;)e[u++]=a[f++];else t||(e[u++]=a)}return e}var ur=j((function(n,r){var t=(r=er(r,!1,!1)).length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var e=r[t];n[e]=rr(n[e],n)}return n}));var or=j((function(n,r,t){return setTimeout((function(){return n.apply(null,t)}),r)})),ir=nr(or,tn,1);function ar(n){return function(){return!n.apply(this,arguments)}}function fr(n,r){var t;return function(){return--n>0&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var cr=nr(fr,2);function lr(n,r,t){r=qn(r,t);for(var e,u=nn(n),o=0,i=u.length;o<i;o++)if(r(n[e=u[o]],e,n))return e}function sr(n){return function(r,t,e){t=qn(t,e);for(var u=Y(r),o=n>0?0:u-1;o>=0&&o<u;o+=n)if(t(r[o],o,r))return o;return-1}}var pr=sr(1),vr=sr(-1);function hr(n,r,t,e){for(var u=(t=qn(t,e,1))(r),o=0,i=Y(n);o<i;){var a=Math.floor((o+i)/2);t(n[a])<u?o=a+1:i=a}return o}function yr(n,r,t){return function(e,u,o){var a=0,f=Y(e);if("number"==typeof o)n>0?a=o>=0?o:Math.max(o+f,a):f=o>=0?Math.min(o+1,f):o+f+1;else if(t&&o&&f)return e[o=t(e,u)]===u?o:-1;if(u!=u)return(o=r(i.call(e,a,f),C))>=0?o+a:-1;for(o=n>0?a:f-1;o>=0&&o<f;o+=n)if(e[o]===u)return o;return-1}}var gr=yr(1,pr,hr),dr=yr(-1,vr);function br(n,r,t){var e=(tr(n)?pr:lr)(n,r,t);if(void 0!==e&&-1!==e)return n[e]}function mr(n,r,t){var e,u;if(r=Fn(r,t),tr(n))for(e=0,u=n.length;e<u;e++)r(n[e],e,n);else{var o=nn(n);for(e=0,u=o.length;e<u;e++)r(n[o[e]],o[e],n)}return n}function jr(n,r,t){r=qn(r,t);for(var e=!tr(n)&&nn(n),u=(e||n).length,o=Array(u),i=0;i<u;i++){var a=e?e[i]:i;o[i]=r(n[a],a,n)}return o}function _r(n){var r=function(r,t,e,u){var o=!tr(r)&&nn(r),i=(o||r).length,a=n>0?0:i-1;for(u||(e=r[o?o[a]:a],a+=n);a>=0&&a<i;a+=n){var f=o?o[a]:a;e=t(e,r[f],f,r)}return e};return function(n,t,e,u){var o=arguments.length>=3;return r(n,Fn(t,u,4),e,o)}}var wr=_r(1),Ar=_r(-1);function xr(n,r,t){var e=[];return r=qn(r,t),mr(n,(function(n,t,u){r(n,t,u)&&e.push(n)})),e}function Sr(n,r,t){r=qn(r,t);for(var e=!tr(n)&&nn(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;
vendor: 6,727 bytes, line 47
47if(!r(n[i],i,n))return!1}return!0}function Or(n,r,t){r=qn(r,t);for(var e=!tr(n)&&nn(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(r(n[i],i,n))return!0}return!1}function Mr(n,r,t,e){return tr(n)||(n=jn(n)),("number"!=typeof t||e)&&(t=0),gr(n,r,t)>=0}var Er=j((function(n,r,t){var e,u;return D(r)?u=r:(r=Nn(r),e=r.slice(0,-1),r=r[r.length-1]),jr(n,(function(n){var o=u;if(!o){if(e&&e.length&&(n=In(n,e)),null==n)return;o=n[r]}return null==o?o:o.apply(n,t)}))}));function Br(n,r){return jr(n,Rn(r))}function Nr(n,r,t){var e,u,o=-1/0,i=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=tr(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e>o&&(o=e);else r=qn(r,t),mr(n,(function(n,t,e){((u=r(n,t,e))>i||u===-1/0&&o===-1/0)&&(o=n,i=u)}));return o}function Ir(n,r,t){if(null==r||t)return tr(n)||(n=jn(n)),n[Wn(n.length-1)];var e=tr(n)?En(n):jn(n),u=Y(e);r=Math.max(Math.min(r,u),0);for(var o=u-1,i=0;i<r;i++){var a=Wn(i,o),f=e[i];e[i]=e[a],e[a]=f}return e.slice(0,r)}function kr(n,r){return function(t,e,u){var o=r?[[],[]]:{};return e=qn(e,u),mr(t,(function(r,u){var i=e(r,u,t);n(o,r,i)})),o}}var Tr=kr((function(n,r,t){W(n,t)?n[t].push(r):n[t]=[r]})),Dr=kr((function(n,r,t){n[t]=r})),Rr=kr((function(n,r,t){W(n,t)?n[t]++:n[t]=1})),Fr=kr((function(n,r,t){n[t?0:1].push(r)}),!0),Vr=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function Pr(n,r,t){return r in t}var qr=j((function(n,r){var t={},e=r[0];if(null==n)return t;D(e)?(r.length>1&&(e=Fn(e,r[1])),r=an(n)):(e=Pr,r=er(r,!1,!1),n=Object(n));for(var u=0,o=r.length;u<o;u++){var i=r[u],a=n[i];e(a,i,n)&&(t[i]=a)}return t})),Ur=j((function(n,r){var t,e=r[0];return D(e)?(e=ar(e),r.length>1&&(t=r[1])):(r=jr(er(r,!1,!1),String),e=function(n,t){return!Mr(r,t)}),qr(n,e,t)}));function Wr(n,r,t){return i.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function zr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:Wr(n,n.length-r)}function Lr(n,r,t){return i.call(n,null==r||t?1:r)}var Cr=j((function(n,r){return r=er(r,!0,!0),xr(n,(function(n){return!Mr(r,n)}))})),Kr=j((function(n,r){return Cr(n,r)}));function Jr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=qn(t,e));for(var u=[],o=[],i=0,a=Y(n);i<a;i++){var f=n[i],c=t?t(f,i,n):f;r&&!t?(i&&o===c||u.push(f),o=c):t?Mr(o,c)||(o.push(c),u.push(f)):Mr(u,f)||u.push(f)}return u}var $r=j((function(n){return Jr(er(n,!0,!0))}));function Gr(n){for(var r=n&&Nr(n,Y).length||0,t=Array(r),e=0;e<r;e++)t[e]=Br(n,e);return t}var Hr=j(Gr);function Qr(n,r){return n._chain?tn(r).chain():r}function Xr(n){return mr(wn(n),(function(r){var t=tn[r]=n[r];tn.prototype[r]=function(){var n=[this._wrapped];return o.apply(n,arguments),Qr(this,t.apply(tn,n))}})),tn}mr(["pop","push","reverse","shift","sort","splice","unshift"],(function(n){var r=t[n];tn.prototype[n]=function(){var t=this._wrapped;return null!=t&&(r.apply(t,arguments),"shift"!==n&&"splice"!==n||0!==t.length||delete t[0]),Qr(this,t)}})),mr(["concat","join","slice"],(function(n){var r=t[n];tn.prototype[n]=function(){var n=this._wrapped;return null!=n&&(n=r.apply(n,arguments)),Qr(this,n)}}));var Yr=Xr({__proto__:null,VERSION:n,restArguments:j,isObject:_,isNull:function(n){return null===n},isUndefined:w,isBoolean:A,isElement:function(n){return!(!n||1!==n.nodeType)},isString:S,isNumber:O,isDate:M,isRegExp:E,isError:B,isSymbol:N,isArrayBuffer:I,isDataView:q,isArray:U,isFunction:D,isArguments:L,isFinite:function(n){return!N(n)&&g(n)&&!isNaN(parseFloat(n))},isNaN:C,isTypedArray:X,isEmpty:function(n){if(null==n)return!0;var r=Y(n);return"number"==typeof r&&(U(n)||S(n)||L(n))?0===r:0===Y(nn(n))},isMatch:rn,isEqual:function(n,r){return on(n,r)},isMap:gn,isWeakMap:dn,isSet:bn,isWeakSet:mn,keys:nn,allKeys:an,values:jn,pairs:function(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=[r[u],n[r[u]]];return e},invert:_n,functions:wn,methods:wn,extend:xn,extendOwn:Sn,assign:Sn,defaults:On,create:function(n,r){var t=Mn(n);return r&&Sn(t,r),t},clone:En,tap:function(n,r){return r(n),n},get:kn,has:function(n,r){for(var t=(r=Nn(r)).length,e=0;e<t;e++){var u=r[e];if(!W(n,u))return!1;n=n[u]}return!!t},mapObject:function(n,r,t){r=qn(r,t);for(var e=nn(n),u=e.length,o={},i=0;i<u;i++){var a=e[i];o[a]=r(n[a],a,n)}return o},identity:Tn,constant:K,noop:Un,toPath:Bn,property:Rn,propertyOf:function(n){return null==n?Un:function(r){return kn(n,r)}},matcher:Dn,matches:Dn,times:function(n,r,t){var e=Array(Math.max(0,n));r=Fn(r,t,1);for(var u=0;u<n;u++)e[u]=r(u);return e},random:Wn,now:zn,escape:Kn,unescape:Jn,templateSettings:$n,template:function(n,r,t){!r&&t&&(r=t),r=On({},r,tn.templateSettings);var e,u=RegExp([(r.escape||Gn).source,(r.interpolate||Gn).source,(r.evaluate||Gn).source].join("|")+"|$","g"),o=0,i="__p+='";n.replace(u,(function(r,t,e,u,a){return i+=n.slice(o,a).replace(Qn,Xn),o=a+r.length,t?i+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":u&&(i+="';\n"+u+"\n__p+='"),r})),i+="';\n",r.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{e=new Function(r.variable||"obj","_",i)}catch(n){throw n.source=i,n}var a=function(n){return e.call(this,n,tn)},f=r.variable||"obj";return a.source="function("+f+"){\n"+i+"}",a},result:function(n,r,t){var e=(r=Nn(r)).length;if(!e)return D(t)?t.call(n):t;for(var u=0;u<e;u++){var o=null==n?void 0:n[r[u]];void 0===o&&(o=t,u=e),n=D(o)?o.call(n):o}return n},uniqueId:function(n){var r=++Yn+"";return n?n+r:r},chain:function(n){var r=tn(n);return r._chain=!0,r},iteratee:Pn,partial:nr,bind:rr,bindAll:ur,memoize:function(n,r){var t=function(e){var u=t.cache,o=""+(r?r.apply(this,arguments):e);return W(u,o)||(u[o]=n.apply(this,arguments)),u[o]};return t.cache={},t},delay:or,defer:ir,throttle:function(n,r,t){var e,u,o,i,a=0;t||(t={});var f=function(){a=!1===t.leading?0:zn(),e=null,i=n.apply(u,o),e||(u=o=null)},c=function(){var c=zn();a||!1!==t.leading||(a=c);var l=r-(c-a);return u=this,o=arguments,l<=0||l>r?(e&&(clearTimeout(e),e=null),a=c,i=n.apply(u,o),e||(u=o=null)):e||!1===t.trailing||(e=setTimeout(f,l)),i};return c.cancel=function(){clearTimeout(e),a=0,e=u=o=null},c},debounce:function(n,r,t){var e,u,o=function(r,t){e=null,t&&(u=n.apply(r,t))},i=j((function(i){if(e&&clearTimeout(e),t){var a=!e;e=setTimeout(o,r),a&&(u=n.apply(this,i))}else e=or(o,r,this,i);return u}));return i.cancel=function(){clearTimeout(e),e=null},i},wrap:function(n,r){return nr(r,n)},negate:ar,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}}
47,before:fr,once:cr,findKey:lr,findIndex:pr,findLastIndex:vr,sortedIndex:hr,indexOf:gr,lastIndexOf:dr,find:br,detect:br,findWhere:function(n,r){return br(n,Dn(r))},each:mr,forEach:mr,map:jr,collect:jr,reduce:wr,foldl:wr,inject:wr,reduceRight:Ar,foldr:Ar,filter:xr,select:xr,reject:function(n,r,t){return xr(n,ar(qn(r)),t)},every:Sr,all:Sr,some:Or,any:Or,contains:Mr,includes:Mr,include:Mr,invoke:Er,pluck:Br,where:function(n,r){return xr(n,Dn(r))},max:Nr,min:function(n,r,t){var e,u,o=1/0,i=1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=tr(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e<o&&(o=e);else r=qn(r,t),mr(n,(function(n,t,e){((u=r(n,t,e))<i||u===1/0&&o===1/0)&&(o=n,i=u)}));return o},shuffle:function(n){return Ir(n,1/0)},sample:Ir,sortBy:function(n,r,t){var e=0;return r=qn(r,t),Br(jr(n,(function(n,t,u){return{value:n,index:e++,criteria:r(n,t,u)}})).sort((function(n,r){var t=n.criteria,e=r.criteria;if(t!==e){if(t>e||void 0===t)return 1;if(t<e||void 0===e)return-1}return n.index-r.index})),"value")},groupBy:Tr,indexBy:Dr,countBy:Rr,partition:Fr,toArray:function(n){return n?U(n)?i.call(n):S(n)?n.match(Vr):tr(n)?jr(n,Tn):jn(n):[]},size:function(n){return null==n?0:tr(n)?n.length:nn(n).length},pick:qr,omit:Ur,first:zr,head:zr,take:zr,initial:Wr,last:function(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[n.length-1]:Lr(n,Math.max(0,n.length-r))},rest:Lr,tail:Lr,drop:Lr,compact:function(n){return xr(n,Boolean)},flatten:function(n,r){return er(n,r,!1)},without:Kr,uniq:Jr,unique:Jr,union:$r,intersection:function(n){for(var r=[],t=arguments.length,e=0,u=Y(n);e<u;e++){var o=n[e];if(!Mr(r,o)){var i;for(i=1;i<t&&Mr(arguments[i],o);i++);i===t&&r.push(o)}}return r},difference:Cr,unzip:Gr,transpose:Gr,zip:Hr,object:function(n,r){for(var t={},e=0,u=Y(n);e<u;e++)r?t[n[e]]=r[e]:t[n[e][0]]=n[e][1];return t},range:function(n,r,t){null==r&&(r=n||0,n=0),t||(t=r<n?-1:1);for(var e=Math.max(Math.ceil((r-n)/t),0),u=Array(e),o=0;o<e;o++,n+=t)u[o]=n;return u},chunk:function(n,r){if(null==r||r<1)return[];for(var t=[],e=0,u=n.length;e<u;)t.push(i.call(n,e,e+=r));return t},mixin:Xr,default:tn});return Yr._=Yr,Yr}));;
48/* AUTOGENERATED: underscore.string.min.js */
49/*
50* Underscore.string
51* (c) 2010 Esa-Matti Suuronen <esa-matti aet suuronen dot org>
52* Underscore.string is freely distributable under the terms of the MIT license.
53* Documentation: https://github.com/epeli/underscore.string
54* Some code is borrowed from MooTools and Alexandru Marasteanu.
55* Version '3.3.4'
56* @preserve
57*/
58(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.s=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){var trim=require("./trim");var decap=require("./decapitalize");module.exports=function camelize(str,decapitalize){str=trim(str).replace(/[-_\s]+(.)?/g,function(match,c){return c?c.toUpperCase():""});if(decapitalize===true){return decap(str)}else{return str}}},{"./decapitalize":10,"./trim":65}],2:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function capitalize(str,lowercaseRest){str=makeString(str);var remainingChars=!lowercaseRest?str.slice(1):str.slice(1).toLowerCase();return str.charAt(0).toUpperCase()+remainingChars}},{"./helper/makeString":20}],3:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function chars(str){return makeString(str).split("")}},{"./helper/makeString":20}],4:[function(require,module,exports){module.exports=function chop(str,step){if(str==null)return[];str=String(str);step=~~step;return step>0?str.match(new RegExp(".{1,"+step+"}","g")):[str]}},{}],5:[function(require,module,exports){var capitalize=require("./capitalize");var camelize=require("./camelize");var makeString=require("./helper/makeString");module.exports=function classify(str){str=makeString(str);return capitalize(camelize(str.replace(/[\W_]/g," ")).replace(/\s/g,""))}},{"./camelize":1,"./capitalize":2,"./helper/makeString":20}],6:[function(require,module,exports){var trim=require("./trim");module.exports=function clean(str){return trim(str).replace(/\s\s+/g," ")}},{"./trim":65}],7:[function(require,module,exports){var makeString=require("./helper/makeString");var from="ąàáäâãåæăćčĉęèéëêĝĥìíïîĵłľńňòóöőôõðøśșşšŝťțţŭùúüűûñÿýçżźž",to="aaaaaaaaaccceeeeeghiiiijllnnoooooooossssstttuuuuuunyyczzz";from+=from.toUpperCase();to+=to.toUpperCase();to=to.split("");from+="ß";to.push("ss");module.exports=function cleanDiacritics(str){return makeString(str).replace(/.{1}/g,function(c){var index=from.indexOf(c);return index===-1?c:to[index]})}},{"./helper/makeString":20}],8:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function(str,substr){str=makeString(str);substr=makeString(substr);if(str.length===0||substr.length===0)return 0;
58return str.split(substr).length-1}},{"./helper/makeString":20}],9:[function(require,module,exports){var trim=require("./trim");module.exports=function dasherize(str){return trim(str).replace(/([A-Z])/g,"-$1").replace(/[-_\s]+/g,"-").toLowerCase()}},{"./trim":65}],10:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function decapitalize(str){str=makeString(str);return str.charAt(0).toLowerCase()+str.slice(1)}},{"./helper/makeString":20}],11:[function(require,module,exports){var makeString=require("./helper/makeString");function getIndent(str){var matches=str.match(/^[\s\\t]*/gm);var indent=matches[0].length;for(var i=1;i<matches.length;i++){indent=Math.min(matches[i].length,indent)}return indent}module.exports=function dedent(str,pattern){str=makeString(str);var indent=getIndent(str);var reg;if(indent===0)return str;if(typeof pattern==="string"){reg=new RegExp("^"+pattern,"gm")}else{reg=new RegExp("^[ \\t]{"+indent+"}","gm")}return str.replace(reg,"")}},{"./helper/makeString":20}],12:[function(require,module,exports){var makeString=require("./helper/makeString");var toPositive=require("./helper/toPositive");module.exports=function endsWith(str,ends,position){str=makeString(str);ends=""+ends;if(typeof position=="undefined"){position=str.length-ends.length}else{position=Math.min(toPositive(position),str.length)-ends.length}return position>=0&&str.indexOf(ends,position)===position}},{"./helper/makeString":20,"./helper/toPositive":22}],13:[function(require,module,exports){var makeString=require("./helper/makeString");var escapeChars=require("./helper/escapeChars");var regexString="[";for(var key in escapeChars){regexString+=key}regexString+="]";var regex=new RegExp(regexString,"g");module.exports=function escapeHTML(str){return makeString(str).replace(regex,function(m){return"&"+escapeChars[m]+";"})}},{"./helper/escapeChars":17,"./helper/makeString":20}],14:[function(require,module,exports){module.exports=function(){var result={};for(var prop in this){if(!this.hasOwnProperty(prop)||prop.match(/^(?:include|contains|reverse|join|map|wrap)$/))continue;result[prop]=this[prop]}return result}},{}],15:[function(require,module,exports){var makeString=require("./makeString");module.exports=function adjacent(str,direction){str=makeString(str);if(str.length===0){return""}return str.slice(0,-1)+String.fromCharCode(str.charCodeAt(str.length-1)+direction)}},{"./makeString":20}],16:[function(require,module,exports){var escapeRegExp=require("./escapeRegExp");module.exports=function defaultToWhiteSpace(characters){if(characters==null)return"\\s";else if(characters.source)return characters.source;else return"["+escapeRegExp(characters)+"]"}},{"./escapeRegExp":18}],17:[function(require,module,exports){var escapeChars={"¢":"cent","£":"pound","¥":"yen","€":"euro","©":"copy","®":"reg","<":"lt",">":"gt",'"':"quot","&":"amp","'":"#39"};module.exports=escapeChars},{}],18:[function(require,module,exports){var makeString=require("./makeString");module.exports=function escapeRegExp(str){return makeString(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}},{"./makeString":20}],19:[function(require,module,exports){var htmlEntities={nbsp:" ",cent:"¢",pound:"£",yen:"¥",euro:"€",copy:"©",reg:"®",lt:"<",gt:">",quot:'"',amp:"&",apos:"'"};module.exports=htmlEntities},{}],20:[function(require,module,exports){module.exports=function makeString(object){if(object==null)return"";return""+object}},{}],21:[function(require,module,exports){module.exports=function strRepeat(str,qty){if(qty<1)return"";var result="";while(qty>0){if(qty&1)result+=str;qty>>=1,str+=str}return result}},{}],22:[function(require,module,exports){module.exports=function toPositive(number){return number<0?0:+number||0}},{}],23:[function(require,module,exports){var capitalize=require("./capitalize");var underscored=require("./underscored");var trim=require("./trim");module.exports=function humanize(str){return capitalize(trim(underscored(str).replace(/_id$/,"").replace(/_/g," ")))}},{"./capitalize":2,"./trim":65,"./underscored":67}],24:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function include(str,needle){if(needle==="")return true;return makeString(str).indexOf(needle)!==-1}},{"./helper/makeString":20}],25:[function(require,module,exports){/*
59* Underscore.string
60* (c) 2010 Esa-Matti Suuronen <esa-matti aet suuronen dot org>
61* Underscore.string is freely distributable under the terms of the MIT license.
62* Documentation: https://github.com/epeli/underscore.string
63* Some code is borrowed from MooTools and Alexandru Marasteanu.
64* Version '3.3.4'
65* @preserve
66*/
67    "use strict";function s(value){if(!(this instanceof s))return new s(value);this._wrapped=value}s.VERSION="3.3.4";s.isBlank=require("./isBlank");s.stripTags=require("./stripTags");s.capitalize=require("./capitalize");s.decapitalize=require("./decapitalize");s.chop=require("./chop");s.trim=require("./trim");s.clean=require("./clean");s.cleanDiacritics=require("./cleanDiacritics");s.count=require("./count");s.chars=require("./chars");s.swapCase=require("./swapCase");s.escapeHTML=require("./escapeHTML");s.unescapeHTML=require("./unescapeHTML");s.splice=require("./splice");s.insert=require("./insert");
67s.replaceAll=require("./replaceAll");s.include=require("./include");s.join=require("./join");s.lines=require("./lines");s.dedent=require("./dedent");s.reverse=require("./reverse");s.startsWith=require("./startsWith");s.endsWith=require("./endsWith");s.pred=require("./pred");s.succ=require("./succ");s.titleize=require("./titleize");s.camelize=require("./camelize");s.underscored=require("./underscored");s.dasherize=require("./dasherize");s.classify=require("./classify");s.humanize=require("./humanize");s.ltrim=require("./ltrim");s.rtrim=require("./rtrim");s.truncate=require("./truncate");s.prune=require("./prune");s.words=require("./words");s.pad=require("./pad");s.lpad=require("./lpad");s.rpad=require("./rpad");s.lrpad=require("./lrpad");s.sprintf=require("./sprintf");s.vsprintf=require("./vsprintf");s.toNumber=require("./toNumber");s.numberFormat=require("./numberFormat");s.strRight=require("./strRight");s.strRightBack=require("./strRightBack");s.strLeft=require("./strLeft");s.strLeftBack=require("./strLeftBack");s.toSentence=require("./toSentence");s.toSentenceSerial=require("./toSentenceSerial");s.slugify=require("./slugify");s.surround=require("./surround");s.quote=require("./quote");s.unquote=require("./unquote");s.repeat=require("./repeat");s.naturalCmp=require("./naturalCmp");s.levenshtein=require("./levenshtein");s.toBoolean=require("./toBoolean");s.exports=require("./exports");s.escapeRegExp=require("./helper/escapeRegExp");s.wrap=require("./wrap");s.map=require("./map");s.strip=s.trim;s.lstrip=s.ltrim;s.rstrip=s.rtrim;s.center=s.lrpad;s.rjust=s.lpad;s.ljust=s.rpad;s.contains=s.include;s.q=s.quote;s.toBool=s.toBoolean;s.camelcase=s.camelize;s.mapChars=s.map;s.prototype={value:function value(){return this._wrapped}};function fn2method(key,fn){if(typeof fn!=="function")return;s.prototype[key]=function(){var args=[this._wrapped].concat(Array.prototype.slice.call(arguments));var res=fn.apply(null,args);return typeof res==="string"?new s(res):res}}for(var key in s)fn2method(key,s[key]);fn2method("tap",function tap(string,fn){return fn(string)});function prototype2method(methodName){fn2method(methodName,function(context){var args=Array.prototype.slice.call(arguments,1);return String.prototype[methodName].apply(context,args)})}var prototypeMethods=["toUpperCase","toLowerCase","split","replace","slice","substring","substr","concat"];for(var method in prototypeMethods)prototype2method(prototypeMethods[method]);module.exports=s},{"./camelize":1,"./capitalize":2,"./chars":3,"./chop":4,"./classify":5,"./clean":6,"./cleanDiacritics":7,"./count":8,"./dasherize":9,"./decapitalize":10,"./dedent":11,"./endsWith":12,"./escapeHTML":13,"./exports":14,"./helper/escapeRegExp":18,"./humanize":23,"./include":24,"./insert":26,"./isBlank":27,"./join":28,"./levenshtein":29,"./lines":30,"./lpad":31,"./lrpad":32,"./ltrim":33,"./map":34,"./naturalCmp":35,"./numberFormat":38,"./pad":39,"./pred":40,"./prune":41,"./quote":42,"./repeat":43,"./replaceAll":44,"./reverse":45,"./rpad":46,"./rtrim":47,"./slugify":48,"./splice":49,"./sprintf":50,"./startsWith":51,"./strLeft":52,"./strLeftBack":53,"./strRight":54,"./strRightBack":55,"./stripTags":56,"./succ":57,"./surround":58,"./swapCase":59,"./titleize":60,"./toBoolean":61,"./toNumber":62,"./toSentence":63,"./toSentenceSerial":64,"./trim":65,"./truncate":66,"./underscored":67,"./unescapeHTML":68,"./unquote":69,"./vsprintf":70,"./words":71,"./wrap":72}],26:[function(require,module,exports){var splice=require("./splice");module.exports=function insert(str,i,substr){return splice(str,i,0,substr)}},{"./splice":49}],27:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function isBlank(str){return/^\s*$/.test(makeString(str))}},{"./helper/makeString":20}],28:[function(require,module,exports){var makeString=require("./helper/makeString");var slice=[].slice;module.exports=function join(){var args=slice.call(arguments),separator=args.shift();return args.join(makeString(separator))}},{"./helper/makeString":20}],29:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function levenshtein(str1,str2){"use strict";str1=makeString(str1);str2=makeString(str2);if(str1===str2)return 0;if(!str1||!str2)return Math.max(str1.length,str2.length);var prevRow=new Array(str2.length+1);for(var i=0;i<prevRow.length;++i){prevRow[i]=i}for(i=0;i<str1.length;++i){var nextCol=i+1;for(var j=0;j<str2.length;++j){var curCol=nextCol;nextCol=prevRow[j]+(str1.charAt(i)===str2.charAt(j)?0:1);var tmp=curCol+1;if(nextCol>tmp){nextCol=tmp}tmp=prevRow[j+1]+1;if(nextCol>tmp){nextCol=tmp}prevRow[j]=curCol}prevRow[j]=nextCol}return nextCol}},{"./helper/makeString":20}],30:[function(require,module,exports){module.exports=function lines(str){if(str==null)return[];return String(str).split(/\r\n?|\n/)}},{}],31:[function(require,module,exports){var pad=require("./pad");module.exports=function lpad(str,length,padStr){return pad(str,length,padStr)}}
67,{"./pad":39}],32:[function(require,module,exports){var pad=require("./pad");module.exports=function lrpad(str,length,padStr){return pad(str,length,padStr,"both")}},{"./pad":39}],33:[function(require,module,exports){var makeString=require("./helper/makeString");var defaultToWhiteSpace=require("./helper/defaultToWhiteSpace");var nativeTrimLeft=String.prototype.trimLeft;module.exports=function ltrim(str,characters){str=makeString(str);if(!characters&&nativeTrimLeft)return nativeTrimLeft.call(str);characters=defaultToWhiteSpace(characters);return str.replace(new RegExp("^"+characters+"+"),"")}},{"./helper/defaultToWhiteSpace":16,"./helper/makeString":20}],34:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function(str,callback){str=makeString(str);if(str.length===0||typeof callback!=="function")return str;return str.replace(/./g,callback)}},{"./helper/makeString":20}],35:[function(require,module,exports){module.exports=function naturalCmp(str1,str2){if(str1==str2)return 0;if(!str1)return-1;if(!str2)return 1;var cmpRegex=/(\.\d+|\d+|\D+)/g,tokens1=String(str1).match(cmpRegex),tokens2=String(str2).match(cmpRegex),count=Math.min(tokens1.length,tokens2.length);for(var i=0;i<count;i++){var a=tokens1[i],b=tokens2[i];if(a!==b){var num1=+a;var num2=+b;if(num1===num1&&num2===num2){return num1>num2?1:-1}return a<b?-1:1}}if(tokens1.length!=tokens2.length)return tokens1.length-tokens2.length;return str1<str2?-1:1}},{}],36:[function(require,module,exports){(function(window){var re={not_string:/[^s]/,number:/[diefg]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};function sprintf(){var key=arguments[0],cache=sprintf.cache;if(!(cache[key]&&cache.hasOwnProperty(key))){cache[key]=sprintf.parse(key)}return sprintf.format.call(null,cache[key],arguments)}sprintf.format=function(parse_tree,argv){var cursor=1,tree_length=parse_tree.length,node_type="",arg,output=[],i,k,match,pad,pad_character,pad_length,is_positive=true,sign="";for(i=0;i<tree_length;i++){node_type=get_type(parse_tree[i]);if(node_type==="string"){output[output.length]=parse_tree[i]}else if(node_type==="array"){match=parse_tree[i];if(match[2]){arg=argv[cursor];for(k=0;k<match[2].length;k++){if(!arg.hasOwnProperty(match[2][k])){throw new Error(sprintf("[sprintf] property '%s' does not exist",match[2][k]))}arg=arg[match[2][k]]}}else if(match[1]){arg=argv[match[1]]}else{arg=argv[cursor++]}if(get_type(arg)=="function"){arg=arg()}if(re.not_string.test(match[8])&&re.not_json.test(match[8])&&(get_type(arg)!="number"&&isNaN(arg))){throw new TypeError(sprintf("[sprintf] expecting number but found %s",get_type(arg)))}if(re.number.test(match[8])){is_positive=arg>=0}switch(match[8]){case"b":arg=arg.toString(2);break;case"c":arg=String.fromCharCode(arg);break;case"d":case"i":arg=parseInt(arg,10);break;case"j":arg=JSON.stringify(arg,null,match[6]?parseInt(match[6]):0);break;case"e":arg=match[7]?arg.toExponential(match[7]):arg.toExponential();break;case"f":arg=match[7]?parseFloat(arg).toFixed(match[7]):parseFloat(arg);break;case"g":arg=match[7]?parseFloat(arg).toPrecision(match[7]):parseFloat(arg);break;case"o":arg=arg.toString(8);break;case"s":arg=(arg=String(arg))&&match[7]?arg.substring(0,match[7]):arg;break;case"u":arg=arg>>>0;break;case"x":arg=arg.toString(16);break;case"X":arg=arg.toString(16).toUpperCase();break}if(re.json.test(match[8])){output[output.length]=arg}else{if(re.number.test(match[8])&&(!is_positive||match[3])){sign=is_positive?"+":"-";arg=arg.toString().replace(re.sign,"")}else{sign=""}pad_character=match[4]?match[4]==="0"?"0":match[4].charAt(1):" ";pad_length=match[6]-(sign+arg).length;pad=match[6]?pad_length>0?str_repeat(pad_character,pad_length):"":"";output[output.length]=match[5]?sign+arg+pad:pad_character==="0"?sign+pad+arg:pad+sign+arg}}}return output.join("")};sprintf.cache={};sprintf.parse=function(fmt){var _fmt=fmt,match=[],parse_tree=[],arg_names=0;while(_fmt){if((match=re.text.exec(_fmt))!==null){parse_tree[parse_tree.length]=match[0]}else if((match=re.modulo.exec(_fmt))!==null){parse_tree[parse_tree.length]="%"}else if((match=re.placeholder.exec(_fmt))!==null){if(match[2]){arg_names|=1;var field_list=[],replacement_field=match[2],field_match=[];if((field_match=re.key.exec(replacement_field))!==null){field_list[field_list.length]=field_match[1];while((replacement_field=replacement_field.substring(field_match[0].length))!==""){if((field_match=re.key_access.exec(replacement_field))!==null){field_list[field_list.length]=field_match[1]}else if((field_match=re.index_access.exec(replacement_field))!==null){field_list[field_list.length]=field_match[1]}else{throw new SyntaxError("[sprintf] failed to parse named argument key")}}}else{throw new SyntaxError("[sprintf] failed to parse named argument key")}match[2]=field_list}else{arg_names|=2}if(arg_names===3){throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported")}parse_tree[parse_tree.length]=match}else{throw new SyntaxError("[sprintf] unexpected placeholder")}_fmt=_fmt.substring(match[0].length)}return parse_tree};var vsprintf=function(fmt,argv,_argv){_argv=(argv||[]).slice(0);_argv.splice(0,0,fmt);return sprintf.apply(null,_argv)};function get_type(variable){return Object.prototype.toString.call(variable).slice(8,-1).toLowerCase()}function str_repeat(input,multiplier){return Array(multiplier+1).join(input)}if(typeof exports!=="undefined"){exports.sprintf=sprintf;exports.vsprintf=vsprintf}else{window.sprintf=sprintf;window.vsprintf=vsprintf;if(typeof define==="function"&&define.amd){define(function(){return{sprintf:sprintf,vsprintf:vsprintf}})}}})(typeof window==="undefined"?this:window)},{}],37:[function(require,module,exports){(function(global){module.exports=deprecate;function deprecate(fn,msg){if(config("noDeprecation")){return fn}var warned=false;function deprecated(){if(!warned){if(config("throwDeprecation")){throw new Error(msg)}else if(config("traceDeprecation")){console.trace(msg)}else{console.warn(msg)}warned=true}return fn.apply(this,arguments)}return deprecated}function config(name){try{if(!global.localStorage)return false}catch(_){return false}var val=global.localStorage[name];if(null==val)return false;return String(val).toLowerCase()==="true"}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],38:[function(require,module,exports){module.exports=function numberFormat(number,dec,dsep,tsep){if(isNaN(number)||number==null)return"";number=number.toFixed(~~dec);
67tsep=typeof tsep=="string"?tsep:",";var parts=number.split("."),fnums=parts[0],decimals=parts[1]?(dsep||".")+parts[1]:"";return fnums.replace(/(\d)(?=(?:\d{3})+$)/g,"$1"+tsep)+decimals}},{}],39:[function(require,module,exports){var makeString=require("./helper/makeString");var strRepeat=require("./helper/strRepeat");module.exports=function pad(str,length,padStr,type){str=makeString(str);length=~~length;var padlen=0;if(!padStr)padStr=" ";else if(padStr.length>1)padStr=padStr.charAt(0);switch(type){case"right":padlen=length-str.length;return str+strRepeat(padStr,padlen);case"both":padlen=length-str.length;return strRepeat(padStr,Math.ceil(padlen/2))+str+strRepeat(padStr,Math.floor(padlen/2));default:padlen=length-str.length;return strRepeat(padStr,padlen)+str}}},{"./helper/makeString":20,"./helper/strRepeat":21}],40:[function(require,module,exports){var adjacent=require("./helper/adjacent");module.exports=function succ(str){return adjacent(str,-1)}},{"./helper/adjacent":15}],41:[function(require,module,exports){var makeString=require("./helper/makeString");var rtrim=require("./rtrim");module.exports=function prune(str,length,pruneStr){str=makeString(str);length=~~length;pruneStr=pruneStr!=null?String(pruneStr):"...";if(str.length<=length)return str;var tmpl=function(c){return c.toUpperCase()!==c.toLowerCase()?"A":" "},template=str.slice(0,length+1).replace(/.(?=\W*\w*$)/g,tmpl);if(template.slice(template.length-2).match(/\w\w/))template=template.replace(/\s*\S+$/,"");else template=rtrim(template.slice(0,template.length-1));return(template+pruneStr).length>str.length?str:str.slice(0,template.length)+pruneStr}},{"./helper/makeString":20,"./rtrim":47}],42:[function(require,module,exports){var surround=require("./surround");module.exports=function quote(str,quoteChar){return surround(str,quoteChar||'"')}},{"./surround":58}],43:[function(require,module,exports){var makeString=require("./helper/makeString");var strRepeat=require("./helper/strRepeat");module.exports=function repeat(str,qty,separator){str=makeString(str);qty=~~qty;if(separator==null)return strRepeat(str,qty);for(var repeat=[];qty>0;repeat[--qty]=str){}return repeat.join(separator)}},{"./helper/makeString":20,"./helper/strRepeat":21}],44:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function replaceAll(str,find,replace,ignorecase){var flags=ignorecase===true?"gi":"g";var reg=new RegExp(find,flags);return makeString(str).replace(reg,replace)}},{"./helper/makeString":20}],45:[function(require,module,exports){var chars=require("./chars");module.exports=function reverse(str){return chars(str).reverse().join("")}},{"./chars":3}],46:[function(require,module,exports){var pad=require("./pad");module.exports=function rpad(str,length,padStr){return pad(str,length,padStr,"right")}},{"./pad":39}],47:[function(require,module,exports){var makeString=require("./helper/makeString");var defaultToWhiteSpace=require("./helper/defaultToWhiteSpace");var nativeTrimRight=String.prototype.trimRight;module.exports=function rtrim(str,characters){str=makeString(str);if(!characters&&nativeTrimRight)return nativeTrimRight.call(str);characters=defaultToWhiteSpace(characters);return str.replace(new RegExp(characters+"+$"),"")}},{"./helper/defaultToWhiteSpace":16,"./helper/makeString":20}],48:[function(require,module,exports){var trim=require("./trim");var dasherize=require("./dasherize");var cleanDiacritics=require("./cleanDiacritics");module.exports=function slugify(str){return trim(dasherize(cleanDiacritics(str).replace(/[^\w\s-]/g,"-").toLowerCase()),"-")}},{"./cleanDiacritics":7,"./dasherize":9,"./trim":65}],49:[function(require,module,exports){var chars=require("./chars");module.exports=function splice(str,i,howmany,substr){var arr=chars(str);arr.splice(~~i,~~howmany,substr);return arr.join("")}},{"./chars":3}],50:[function(require,module,exports){var deprecate=require("util-deprecate");module.exports=deprecate(require("sprintf-js").sprintf,"sprintf() will be removed in the next major release, use the sprintf-js package instead.")},{"sprintf-js":36,"util-deprecate":37}],51:[function(require,module,exports){var makeString=require("./helper/makeString");var toPositive=require("./helper/toPositive");module.exports=function startsWith(str,starts,position){str=makeString(str);starts=""+starts;position=position==null?0:Math.min(toPositive(position),str.length);return str.lastIndexOf(starts,position)===position}},{"./helper/makeString":20,"./helper/toPositive":22}],52:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function strLeft(str,sep){str=makeString(str);sep=makeString(sep);var pos=!sep?-1:str.indexOf(sep);return~pos?str.slice(0,pos):str}},{"./helper/makeString":20}],53:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function strLeftBack(str,sep){str=makeString(str);sep=makeString(sep);var pos=str.lastIndexOf(sep);return~pos?str.slice(0,pos):str}},{"./helper/makeString":20}],54:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function strRight(str,sep){str=makeString(str);sep=makeString(sep);var pos=!sep?-1:str.indexOf(sep);return~pos?str.slice(pos+sep.length,str.length):str}},{"./helper/makeString":20}],55:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function strRightBack(str,sep){str=makeString(str);sep=makeString(sep);var pos=!sep?-1:str.lastIndexOf(sep);return~pos?str.slice(pos+sep.length,str.length):str}},{"./helper/makeString":20}],56:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function stripTags(str){return makeString(str).replace(/<\/?[^>]+>/g,"")}},{"./helper/makeString":20}],57:[function(require,module,exports){var adjacent=require("./helper/adjacent");module.exports=function succ(str){return adjacent(str,1)}},{"./helper/adjacent":15}],58:[function(require,module,exports){module.exports=function surround(str,wrapper){return[wrapper,str,wrapper].join("")}},{}],59:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function swapCase(str){return makeString(str).replace(/\S/g,function(c){return c===c.toUpperCase()?c.toLowerCase():c.toUpperCase()})}},{"./helper/makeString":20}],60:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function titleize(str){return makeString(str).toLowerCase().replace(/(?:^|\s|-)\S/g,function(c){return c.toUpperCase()})}},{"./helper/makeString":20}],61:[function(require,module,exports){var trim=require("./trim");function boolMatch(s,matchers){var i,matcher,down=s.toLowerCase();matchers=[].concat(matchers);for(i=0;i<matchers.length;i+=1){matcher=matchers[i];if(!matcher)continue;if(matcher.test&&matcher.test(s))return true;if(matcher.toLowerCase()===down)return true}}module.exports=function toBoolean(str,trueValues,falseValues){if(typeof str==="number")str=""+str;if(typeof str!=="string")return!!str;str=trim(str);if(boolMatch(str,trueValues||["true","1"]))return true;if(boolMatch(str,falseValues||["false","0"]))return false}},{"./trim":65}],62:[function(require,module,exports){module.exports=function toNumber(num,precision){if(num==null)return 0;var factor=Math.pow(10,isFinite(precision)?precision:0);return Math.round(num*factor)/factor}},{}],63:[function(require,module,exports){var rtrim=require("./rtrim");module.exports=function toSentence(array,separator,lastSeparator,serial){separator=separator||", ";lastSeparator=lastSeparator||" and ";var a=array.slice(),lastMember=a.pop();if(array.length>2&&serial)lastSeparator=rtrim(separator)+lastSeparator;return a.length?a.join(separator)+lastSeparator+lastMember:lastMember}},{"./rtrim":47}],64:[function(require,module,exports){var toSentence=require("./toSentence");module.exports=function toSentenceSerial(array,sep,lastSep){return toSentence(array,sep,lastSep,true)}},{"./toSentence":63}],65:[function(require,module,exports){var makeString=require("./helper/makeString");var defaultToWhiteSpace=require("./helper/defaultToWhiteSpace");var nativeTrim=String.prototype.trim;module.exports=function trim(str,characters){str=makeString(str);if(!characters&&nativeTrim)return nativeTrim.call(str);characters=defaultToWhiteSpace(characters);return str.replace(new RegExp("^"+characters+"+|"+characters+"+$","g"),"")}},{"./helper/defaultToWhiteSpace":16,"./helper/makeString":20}],66:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function truncate(str,length,truncateStr){str=makeString(str);truncateStr=truncateStr||"...";length=~~length;return str.length>length?str.slice(0,length)+truncateStr:str}},{"./helper/makeString":20}],67:[function(require,module,exports){var trim=require("./trim");module.exports=function underscored(str){return trim(str).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()}},{"./trim":65}],68:[function(require,module,exports){var makeString=require("./helper/makeString");var htmlEntities=require("./helper/htmlEntities");module.exports=function unescapeHTML(str){return makeString(str).replace(/\&([^;]+);/g,function(entity,entityCode){var match;if(entityCode in htmlEntities){return htmlEntities[entityCode]}else if(match=entityCode.match(/^#x([\da-fA-F]+)$/)){return String.fromCharCode(parseInt(match[1],16))}else if(match=entityCode.match(/^#(\d+)$/)){return String.fromCharCode(~~match[1])}else{return entity}})}},{"./helper/htmlEntities":19,"./helper/makeString":20}],69:[function(require,module,exports){module.exports=function unquote(str,quoteChar){quoteChar=quoteChar||'"';if(str[0]===quoteChar&&str[str.length-1]===quoteChar)return str.slice(1,str.length-1);else return str}},{}],70:[function(require,module,exports){var deprecate=require("util-deprecate");module.exports=deprecate(require("sprintf-js").vsprintf,"vsprintf() will be removed in the next major release, use the sprintf-js package instead.")},{"sprintf-js":36,"util-deprecate":37}],71:[function(require,module,exports){var isBlank=require("./isBlank");var trim=require("./trim");module.exports=function words(str,delimiter){if(isBlank(str))return[];return trim(str,delimiter).split(delimiter||/\s+/)}},{"./isBlank":27,"./trim":65}],72:[function(require,module,exports){var makeString=require("./helper/makeString");module.exports=function wrap(str,options){str=makeString(str);options=options||{};var width=options.width||75;var seperator=options.seperator||"\n";var cut=options.cut||false;var preserveSpaces=options.preserveSpaces||false;var trailingSpaces=options.trailingSpaces||false;var result;if(width<=0){return str}else if(!cut){var words=str.split(" ");var current_column=0;result="";while(words.length>0){if(1+words[0].length+current_column>width){if(current_column>0){if(preserveSpaces){result+=" ";current_column++}else if(trailingSpaces){while(current_column<width){result+=" ";current_column++}}result+=seperator;current_column=0}}if(current_column>0){result+=" ";current_column++}result+=words[0];current_column+=words[0].length;words.shift()}if(trailingSpaces){while(current_column<width){result+=" ";current_column++}}return result}else{var index=0;result="";while(index<str.length){if(index%width==0&&index>0){result+=seperator}result+=str.charAt(index);index++}if(trailingSpaces){while(index%width>0){result+=" ";index++}}return result}}},{"./helper/makeString":20}]},{},[25])(25)});
68
69_.mixin(s.exports());;
70/* AUTOGENERATED: bootstrap.min.js */
vendor: 39,680 bytes, lines 71-76
71/*!
72 * Bootstrap v3.4.1 (https://getbootstrap.com/)
73 * Copyright 2011-2019 Twitter, Inc.
74 * Licensed under the MIT license
75 */
76if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){"use strict";var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||3<e[0])throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(),function(n){"use strict";n.fn.emulateTransitionEnd=function(t){var e=!1,i=this;n(this).one("bsTransitionEnd",function(){e=!0});return setTimeout(function(){e||n(i).trigger(n.support.transition.end)},t),this},n(function(){n.support.transition=function o(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(t.style[i]!==undefined)return{end:e[i]};return!1}(),n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(s){"use strict";var e='[data-dismiss="alert"]',a=function(t){s(t).on("click",e,this.close)};a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.prototype.close=function(t){var e=s(this),i=e.attr("data-target");i||(i=(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=s(document).find(i);function n(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=e.closest(".alert")),o.trigger(t=s.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),s.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(a.TRANSITION_DURATION):n())};var t=s.fn.alert;s.fn.alert=function o(i){return this.each(function(){var t=s(this),e=t.data("bs.alert");e||t.data("bs.alert",e=new a(this)),"string"==typeof i&&e[i].call(t)})},s.fn.alert.Constructor=a,s.fn.alert.noConflict=function(){return s.fn.alert=t,this},s(document).on("click.bs.alert.data-api",e,a.prototype.close)}(jQuery),function(s){"use strict";var n=function(t,e){this.$element=s(t),this.options=s.extend({},n.DEFAULTS,e),this.isLoading=!1};function i(o){return this.each(function(){var t=s(this),e=t.data("bs.button"),i="object"==typeof o&&o;e||t.data("bs.button",e=new n(this,i)),"toggle"==o?e.toggle():o&&e.setState(o)})}n.VERSION="3.4.1",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var e="disabled",i=this.$element,o=i.is("input")?"val":"html",n=i.data();t+="Text",null==n.resetText&&i.data("resetText",i[o]()),setTimeout(s.proxy(function(){i[o](null==n[t]?this.options[t]:n[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(e).attr(e,e).prop(e,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(e).removeAttr(e).prop(e,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var t=s.fn.button;s.fn.button=i,s.fn.button.Constructor=n,s.fn.button.noConflict=function(){return s.fn.button=t,this},s(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var e=s(t.target).closest(".btn");i.call(e,"toggle"),s(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),e.is("input,button")?e.trigger("focus"):e.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){s(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),function(p){"use strict";var c=function(t,e){this.$element=p(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=e,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",p.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",p.proxy(this.pause,this)).on("mouseleave.bs.carousel",p.proxy(this.cycle,this))};function r(n){return this.each(function(){var t=p(this),e=t.data("bs.carousel"),i=p.extend({},c.DEFAULTS,t.data(),"object"==typeof n&&n),o="string"==typeof n?n:i.slide;e||t.data("bs.carousel",e=new c(this,i)),"number"==typeof n?e.to(n):o?e[o]():i.interval&&e.pause().cycle()})}c.VERSION="3.4.1",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},c.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(p.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},c.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if(("prev"==t&&0===i||"next"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var o=(i+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(o)},c.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(i<t?"next":"prev",this.$items.eq(t))},c.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&p.support.transition&&(this.$element.trigger(p.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(t,e){var i=this.$element.find(".item.active"),o=e||this.getItemForDirection(t,i),n=this.interval,s="next"==t?"left":"right",a=this;if(o.hasClass("active"))return this.sliding=!1;var r=o[0],l=p.Event("slide.bs.carousel",{relatedTarget:r,direction:s});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,n&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=p(this.$indicators.children()[this.getItemIndex(o)]);h&&h.addClass("active")}var d=p.Event("slid.bs.carousel",{relatedTarget:r,direction:s});return p.support.transition&&this.$element.hasClass("slide")?(o.addClass(t),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(s),o.addClass(s),i.one("bsTransitionEnd",function(){o.removeClass([t,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger(d)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(d)),n&&this.cycle(),this}};var t=p.fn.carousel;p.fn.carousel=r,p.fn.carousel.Constructor=c,p.fn.carousel.noConflict=function(){return p.fn.carousel=t,this};var e=function(t){var e=p(this),i=e.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=e.attr("data-target")||i,n=p(document).find(o);if(n.hasClass("carousel")){var s=p.extend({},n.data(),e.data()),a=e.attr("data-slide-to");a&&(s.interval=!1),r.call(n,s),a&&n.data("bs.carousel").to(a),t.preventDefault()}};p(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),p(window).on("load",function(){p('[data-ride="carousel"]').each(function(){var t=p(this);r.call(t,t.data())})})}(jQuery),function(a){"use strict";var r=function(t,e){this.$element=a(t),this.options=a.extend({},r.DEFAULTS,e),this.$trigger=a('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var e,i=t.attr("data-target")||(e=t.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"");return a(document).find(i)}function l(o){return this.each(function(){var t=a(this),e=t.data("bs.collapse"),i=a.extend({},r.DEFAULTS,t.data(),"object"==typeof o&&o);!e&&i.toggle&&/show|hide/.test(o)&&(i.toggle=!1),e||t.data("bs.collapse",e=new r(this,i)),"string"==typeof o&&e[o]()})}r.VERSION="3.4.1",r.TRANSITION_DURATION=350,r.DEFAULTS={toggle:!0},r.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},r.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(t=e.data("bs.collapse"))&&t.transitioning)){var i=a.Event("show.bs.collapse");if(this.$element.trigger(i),!i.isDefaultPrevented()){e&&e.length&&(l.call(e,"hide"),t||e.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var n=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return n.call(this);var s=a.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",a.proxy(n,this)).emulateTransitionEnd(r.TRANSITION_DURATION)[o](this.$element[0][s])}}}},r.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=a.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.dimension();this.$element[e](this.$element[e]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!a.support.transition)return i.call(this);this.$element[e](0).one("bsTransitionEnd",a.proxy(i,this)).emulateTransitionEnd(r.TRANSITION_DURATION)}}},r.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},r.prototype.getParent=function(){return a(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(t,e){var i=a(e);this.addAriaAndCollapsedClass(n(i),i)},this)).end()},r.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var t=a.fn.collapse;a.fn.collapse=l,a.fn.collapse.Constructor=r,a.fn.collapse.noConflict=function(){return a.fn.collapse=t,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var e=a(this);e.attr("data-target")||t.preventDefault();var i=n(e),o=i.data("bs.collapse")?"toggle":e.data();l.call(i,o)})}(jQuery),function(a){"use strict";var r='[data-toggle="dropdown"]',o=function(t){a(t).on("click.bs.dropdown",this.toggle)};function l(t){var e=t.attr("data-target");e||(e=(e=t.attr("href"))&&/#[A-Za-z]/.test(e)&&e.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==e?a(document).find(e):null;return i&&i.length?i:t.parent()}function s(o){o&&3===o.which||(a(".dropdown-backdrop").remove(),a(r).each(function(){var t=a(this),e=l(t),i={relatedTarget:this};e.hasClass("open")&&(o&&"click"==o.type&&/input|textarea/i.test(o.target.tagName)&&a.contains(e[0],o.target)||(e.trigger(o=a.Event("hide.bs.dropdown",i)),o.isDefaultPrevented()||(t.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",i)))))}))}o.VERSION="3.4.1",o.prototype.toggle=function(t){var e=a(this);if(!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(s(),!o){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",s);var n={relatedTarget:this};if(i.trigger(t=a.Event("show.bs.dropdown",n)),t.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger(a.Event("shown.bs.dropdown",n))}return!1}},o.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var e=a(this);if(t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(!o&&27!=t.which||o&&27==t.which)return 27==t.which&&i.find(r).trigger("focus"),e.trigger("click");var n=i.find(".dropdown-menu li:not(.disabled):visible a");if(n.length){var s=n.index(t.target);38==t.which&&0<s&&s--,40==t.which&&s<n.length-1&&s++,~s||(s=0),n.eq(s).trigger("focus")}}}};var t=a.fn.dropdown;a.fn.dropdown=function e(i){return this.each(function(){var t=a(this),e=t.data("bs.dropdown");e||t.data("bs.dropdown",e=new o(this)),"string"==typeof i&&e[i].call(t)})},a.fn.dropdown.Constructor=o,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=t,this},a(document).on("click.bs.dropdown.data-api",s).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",r,o.prototype.toggle).on("keydown.bs.dropdown.data-api",r,o.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",o.prototype.keydown)}(jQuery),function(a){"use strict";var s=function(t,e){this.options=e,this.$body=a(document.body),this.$element=a(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};function r(o,n){return this.each(function(){var t=a(this),e=t.data("bs.modal"),i=a.extend({},s.DEFAULTS,t.data(),"object"==typeof o&&o);e||t.data("bs.modal",e=new s(this,i)),"string"==typeof o?e[o](n):i.show&&e.show(n)})}s.VERSION="3.4.1",s.TRANSITION_DURATION=300,s.BACKDROP_TRANSITION_DURATION=150,s.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},s.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},s.prototype.show=function(i){var o=this,t=a.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(t),this.isShown||t.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){o.$element.one("mouseup.dismiss.bs.modal",function(t){a(t.target).is(o.$element)&&(o.ignoreBackdropClick=!0)})}),this.backdrop(function(){var t=a.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),o.adjustDialog(),t&&o.$element[0].offsetWidth,o.$element.addClass("in"),o.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:i});t?o.$dialog.one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(s.TRANSITION_DURATION):o.$element.trigger("focus").trigger(e)}))},s.prototype.hide=function(t){t&&t.preventDefault(),t=a.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(s.TRANSITION_DURATION):this.hideModal())},s.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},s.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},s.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},s.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},s.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},s.prototype.backdrop=function(t){var e=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=a.support.transition&&i;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+i).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;o?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var n=function(){e.removeBackdrop(),t&&t()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):n()}else t&&t()},s.prototype.handleUpdate=function(){this.adjustDialog()},s.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},s.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},s.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var n=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",t+n),a(this.fixedContent).each(function(t,e){var i=e.style.paddingRight,o=a(e).css("padding-right");a(e).data("padding-right",i).css("padding-right",parseFloat(o)+n+"px")}))},s.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),a(this.fixedContent).each(function(t,e){var i=a(e).data("padding-right");a(e).removeData("padding-right"),e.style.paddingRight=i||""})},s.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var t=a.fn.modal;a.fn.modal=r,a.fn.modal.Constructor=s,a.fn.modal.noConflict=function(){return a.fn.modal=t,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e=a(this),i=e.attr("href"),o=e.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,""),n=a(document).find(o),s=n.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(i)&&i},n.data(),e.data());e.is("a")&&t.preventDefault(),n.one("show.bs.modal",function(t){t.isDefaultPrevented()||n.one("hidden.bs.modal",function(){e.is(":visible")&&e.trigger("focus")})}),r.call(n,s,this)})}(jQuery),function(g){"use strict";var o=["sanitize","whiteList","sanitizeFn"],a=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],t={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,l=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function u(t,e){var i=t.nodeName.toLowerCase();if(-1!==g.inArray(i,e))return-1===g.inArray(i,a)||Boolean(t.nodeValue.match(r)||t.nodeValue.match(l));for(var o=g(e).filter(function(t,e){return e instanceof RegExp}),n=0,s=o.length;n<s;n++)if(i.match(o[n]))return!0;return!1}function n(t,e,i){if(0===t.length)return t;if(i&&"function"==typeof i)return i(t);if(!document.implementation||!document.implementation.createHTMLDocument)return t;var o=document.implementation.createHTMLDocument("sanitization");o.body.innerHTML=t;for(var n=g.map(e,function(t,e){return e}),s=g(o.body).find("*"),a=0,r=s.length;a<r;a++){var l=s[a],h=l.nodeName.toLowerCase();if(-1!==g.inArray(h,n))for(var d=g.map(l.attributes,function(t){return t}),p=[].concat(e["*"]||[],e[h]||[]),c=0,f=d.length;c<f;c++)u(d[c],p)||l.removeAttribute(d[c].nodeName);else l.parentNode.removeChild(l)}return o.body.innerHTML}var m=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};m.VERSION="3.4.1",m.TRANSITION_DURATION=150,m.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:t},m.prototype.init=function(t,e,i){if(this.enabled=!0,this.type=t,this.$element=g(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&g(document).find(g.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),n=o.length;n--;){var s=o[n];if("click"==s)this.$element.on("click."+this.type,this.options.selector,g.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",r="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,g.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,g.proxy(this.leave,this))}}this.options.selector?this._options=g.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},m.prototype.getDefaults=function(){return m.DEFAULTS},m.prototype.getOptions=function(t){var e=this.$element.data();for(var i in e)e.hasOwnProperty(i)&&-1!==g.inArray(i,o)&&delete e[i];return(t=g.extend({},this.getDefaults(),e,t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=n(t.template,t.whiteList,t.sanitizeFn)),t},m.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&g.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},m.prototype.enter=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusin"==t.type?"focus":"hover"]=!0),e.tip().hasClass("in")||"in"==e.hoverState)e.hoverState="in";else{if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)}},m.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},m.prototype.leave=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusout"==t.type?"focus":"hover"]=!1),!e.isInStateTrue()){if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)}},m.prototype.show=function(){var t=g.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=g.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var i=this,o=this.tip(),n=this.getUID(this.type);this.setContent(),o.attr("id",n),this.$element.attr("aria-describedby",n),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,r=a.test(s);r&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(g(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),h=o[0].offsetWidth,d=o[0].offsetHeight;if(r){var p=s,c=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+d>c.bottom?"top":"top"==s&&l.top-d<c.top?"bottom":"right"==s&&l.right+h>c.width?"left":"left"==s&&l.left-h<c.left?"right":s,o.removeClass(p).addClass(s)}var f=this.getCalculatedOffset(s,l,h,d);this.applyPlacement(f,s);var u=function(){var t=i.hoverState;i.$element.trigger("shown.bs."+i.type),i.hoverState=null,"out"==t&&i.leave(i)};g.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",u).emulateTransitionEnd(m.TRANSITION_DURATION):u()}},m.prototype.applyPlacement=function(t,e){var i=this.tip(),o=i[0].offsetWidth,n=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),t.top+=s,t.left+=a,g.offset.setOffset(i[0],g.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},t),0),i.addClass("in");var r=i[0].offsetWidth,l=i[0].offsetHeight;"top"==e&&l!=n&&(t.top=t.top+n-l);var h=this.getViewportAdjustedDelta(e,t,r,l);h.left?t.left+=h.left:t.top+=h.top;var d=/top|bottom/.test(e),p=d?2*h.left-o+r:2*h.top-n+l,c=d?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(p,i[0][c],d)},m.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},m.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=n(e,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(e)):t.find(".tooltip-inner").text(e),t.removeClass("fade in top bottom left right")},m.prototype.hide=function(t){var e=this,i=g(this.$tip),o=g.Event("hide.bs."+this.type);function n(){"in"!=e.hoverState&&i.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),t&&t()}if(this.$element.trigger(o),!o.isDefaultPrevented())return i.removeClass("in"),g.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",n).emulateTransitionEnd(m.TRANSITION_DURATION):n(),this.hoverState=null,this},m.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},m.prototype.hasContent=function(){return this.getTitle()},m.prototype.getPosition=function(t){var e=(t=t||this.$element)[0],i="BODY"==e.tagName,o=e.getBoundingClientRect();null==o.width&&(o=g.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var n=window.SVGElement&&e instanceof window.SVGElement,s=i?{top:0,left:0}:n?null:t.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},r=i?{width:g(window).width(),height:g(window).height()}:null;return g.extend({},o,a,r,s)},m.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},m.prototype.getViewportAdjustedDelta=function(t,e,i,o){var n={top:0,left:0};if(!this.$viewport)return n;var s=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-s-a.scroll,l=e.top+s-a.scroll+o;r<a.top?n.top=a.top-r:l>a.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;h<a.left?n.left=a.left-h:d>a.right&&(n.left=a.left+a.width-d)}return n},m.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},m.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},m.prototype.tip=function(){if(!this.$tip&&(this.$tip=g(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},m.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},m.prototype.enable=function(){this.enabled=!0},m.prototype.disable=function(){this.enabled=!1},m.prototype.toggleEnabled=function(){this.enabled=!this.enabled},m.prototype.toggle=function(t){var e=this;t&&((e=g(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass("in")?e.leave(e):e.enter(e)},m.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},m.prototype.sanitizeHtml=function(t){return n(t,this.options.whiteList,this.options.sanitizeFn)};var e=g.fn.tooltip;g.fn.tooltip=function i(o){return this.each(function(){var t=g(this),e=t.data("bs.tooltip"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.tooltip",e=new m(this,i)),"string"==typeof o&&e[o]())})},g.fn.tooltip.Constructor=m,g.fn.tooltip.noConflict=function(){return g.fn.tooltip=e,this}}(jQuery),function(n){"use strict";var s=function(t,e){this.init("popover",t,e)};if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");s.VERSION="3.4.1",s.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),((s.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();if(this.options.html){var o=typeof i;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===o&&(i=this.sanitizeHtml(i))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===o?"html":"append"](i)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(i);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var t=n.fn.popover;n.fn.popover=function e(o){return this.each(function(){var t=n(this),e=t.data("bs.popover"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.popover",e=new s(this,i)),"string"==typeof o&&e[o]())})},n.fn.popover.Constructor=s,n.fn.popover.noConflict=function(){return n.fn.popover=t,this}}(jQuery),function(s){"use strict";function n(t,e){this.$body=s(document.body),this.$scrollElement=s(t).is(document.body)?s(window):s(t),this.options=s.extend({},n.DEFAULTS,e),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",s.proxy(this.process,this)),this.refresh(),this.process()}function e(o){return this.each(function(){var t=s(this),e=t.data("bs.scrollspy"),i="object"==typeof o&&o;e||t.data("bs.scrollspy",e=new n(this,i)),"string"==typeof o&&e[o]()})}n.VERSION="3.4.1",n.DEFAULTS={offset:10},n.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},n.prototype.refresh=function(){var t=this,o="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),s.isWindow(this.$scrollElement[0])||(o="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=s(this),e=t.data("target")||t.attr("href"),i=/^#./.test(e)&&s(e);return i&&i.length&&i.is(":visible")&&[[i[o]().top+n,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},n.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),o<=e)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e<n[0])return this.activeTarget=null,this.clear();for(t=n.length;t--;)a!=s[t]&&e>=n[t]&&(n[t+1]===undefined||e<n[t+1])&&this.activate(s[t])},n.prototype.activate=function(t){this.activeTarget=t,this.clear();var e=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=s(e).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},n.prototype.clear=function(){s(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var t=s.fn.scrollspy;s.fn.scrollspy=e,s.fn.scrollspy.Constructor=n,s.fn.scrollspy.noConflict=function(){return s.fn.scrollspy=t,this},s(window).on("load.bs.scrollspy.data-api",function(){s('[data-spy="scroll"]').each(function(){var t=s(this);e.call(t,t.data())})})}(jQuery),function(r){"use strict";var a=function(t){this.element=r(t)};function e(i){return this.each(function(){var t=r(this),e=t.data("bs.tab");e||t.data("bs.tab",e=new a(this)),"string"==typeof i&&e[i]()})}a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var o=e.find(".active:last a"),n=r.Event("hide.bs.tab",{relatedTarget:t[0]}),s=r.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(n),t.trigger(s),!s.isDefaultPrevented()&&!n.isDefaultPrevented()){var a=r(document).find(i);this.activate(t.closest("li"),e),this.activate(a,a.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})}}},a.prototype.activate=function(t,e,i){var o=e.find("> .active"),n=i&&r.support.transition&&(o.length&&o.hasClass("fade")||!!e.find("> .fade").length);function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),n?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&n?o.one("bsTransitionEnd",s).emulateTransitionEnd(a.TRANSITION_DURATION):s(),o.removeClass("in")};var t=r.fn.tab;r.fn.tab=e,r.fn.tab.Constructor=a,r.fn.tab.noConflict=function(){return r.fn.tab=t,this};var i=function(t){t.preventDefault(),e.call(r(this),"show")};r(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(l){"use strict";var h=function(t,e){this.options=l.extend({},h.DEFAULTS,e);var i=this.options.target===h.DEFAULTS.target?l(this.options.target):l(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function i(o){return this.each(function(){var t=l(this),e=t.data("bs.affix"),i="object"==typeof o&&o;e||t.data("bs.affix",e=new h(this,i)),"string"==typeof o&&e[o]()})}h.VERSION="3.4.1",h.RESET="affix affix-top affix-bottom",h.DEFAULTS={offset:0,target:window},h.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return n<i&&"top";if("bottom"==this.affixed)return null!=i?!(n+this.unpin<=s.top)&&"bottom":!(n+a<=t-o)&&"bottom";var r=null==this.affixed,l=r?n:s.top;return null!=i&&n<=i?"top":null!=o&&t-o<=l+(r?a:e)&&"bottom"},h.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(h.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},h.prototype.checkPositionWithEventLoop=function(){setTimeout(l.proxy(this.checkPosition,this),1)},h.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),e=this.options.offset,i=e.top,o=e.bottom,n=Math.max(l(document).height(),l(document.body).height());"object"!=typeof e&&(o=i=e),"function"==typeof i&&(i=e.top(this.$element)),"function"==typeof o&&(o=e.bottom(this.$element));var s=this.getState(n,t,i,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var a="affix"+(s?"-"+s:""),r=l.Event(a+".bs.affix");if(this.$element.trigger(r),r.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(h.RESET).addClass(a).trigger(a.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:n-t-o})}};var t=l.fn.affix;l.fn.affix=i,l.fn.affix.Constructor=h,l.fn.affix.noConflict=function(){return l.fn.affix=t,this},l(window).on("load",function(){l('[data-spy="affix"]').each(function(){var t=l(this),e=t.data();e.offset=e.offset||{},null!=e.offsetBottom&&(e.offset.bottom=e.offsetBottom),null!=e.offsetTop&&(e.offset.top=e.offsetTop),i.call(t,e)})})}(jQuery);
76;
77/* AUTOGENERATED: hash.js */
78(function(a,b){"use strict";var c=function(){var b=function(){var b=a.location.hash?a.location.hash.substr(1).split("&"):[],c={};for(var d=0;d<b.length;d++){var e=b[d].split("=");c[e[0]]=decodeURIComponent(e[1])}return c};var c=function(b){var c=[];for(var d in b){c.push(d+"="+encodeURIComponent(b[d]))}a.location.hash=c.join("&")};return{get:function(a){var c=b();if(a){return c[a]}else{return c}},add:function(a){var d=b();for(var e in a){d[e]=a[e]}c(d)},remove:function(a){a=typeof a=="string"?[a]:a;var d=b();for(var e=0;e<a.length;e++){delete d[a[e]]}c(d)},clear:function(){c({})}}}();a.hash=c})(window);;
79/* AUTOGENERATED: object_hash.js */
80!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.objectHash=e()}}(function(){return function e(t,r,n){function o(u,a){if(!r[u]){if(!t[u]){var s="function"==typeof require&&require;if(!a&&s)return s(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var f=r[u]={exports:{}};t[u][0].call(f.exports,function(e){var r=t[u][1][e];return o(r?r:e)},f,f.exports,e,t,r,n)}return r[u].exports}for(var i="function"==typeof require&&require,u=0;u<n.length;u++)o(n[u]);return o}({1:[function(e,t,r){(function(n,o,i,u,a,s,f,c,l){"use strict";function d(e,t){return t=h(e,t),g(e,t)}function h(e,t){var r=m.getHashes?m.getHashes():["sha1","md5"],n=["buffer","hex","binary","base64"];if(t=t||{},t.algorithm=t.algorithm||"sha1",t.encoding=t.encoding||"hex",t.excludeValues=t.excludeValues?!0:!1,t.algorithm=t.algorithm.toLowerCase(),t.encoding=t.encoding.toLowerCase(),t.ignoreUnknown=t.ignoreUnknown!==!0?!1:!0,t.respectType=t.respectType===!1?!1:!0,t.respectFunctionNames=t.respectFunctionNames===!1?!1:!0,t.respectFunctionProperties=t.respectFunctionProperties===!1?!1:!0,t.unorderedArrays=t.unorderedArrays!==!0?!1:!0,t.unorderedSets=t.unorderedSets===!1?!1:!0,t.replacer=t.replacer||void 0,"undefined"==typeof e)throw new Error("Object argument required.");r.push("passthrough");for(var o=0;o<r.length;++o)r[o].toLowerCase()===t.algorithm.toLowerCase()&&(t.algorithm=r[o]);if(-1===r.indexOf(t.algorithm))throw new Error('Algorithm "'+t.algorithm+'"  not supported. supported values: '+r.join(", "));if(-1===n.indexOf(t.encoding)&&"passthrough"!==t.algorithm)throw new Error('Encoding "'+t.encoding+'"  not supported. supported values: '+n.join(", "));return t}function p(e){if("function"!=typeof e)return!1;var t=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i;return null!=t.exec(Function.prototype.toString.call(e))}function g(e,t){var r;r="passthrough"!==t.algorithm?m.createHash(t.algorithm):new y,"undefined"==typeof r.write&&(r.write=r.update,r.end=r.update);var n=w(t,r);if(n.dispatch(e),r.end(""),"undefined"==typeof r.read&&"function"==typeof r.digest)return r.digest("buffer"===t.encoding?void 0:t.encoding);var o=r.read();return"buffer"===t.encoding?o:o.toString(t.encoding)}function w(e,t,r){return r=r||[],{dispatch:function(t){e.replacer&&(t=e.replacer(t));var r=typeof t;return null===t&&(r="null"),this["_"+r](t)},_object:function(n){var o=/\[object (.*)\]/i,u=Object.prototype.toString.call(n),a=o.exec(u);a=a?a[1]:"unknown:["+u+"]",a=a.toLowerCase();var s=null;if((s=r.indexOf(n))>=0)return this.dispatch("[CIRCULAR:"+s+"]");if(r.push(n),"undefined"!=typeof i&&i.isBuffer&&i.isBuffer(n))return t.write("buffer:"),t.write(n);if("object"===a||"function"===a){var f=Object.keys(n).sort();e.respectType===!1||p(n)||f.splice(0,0,"prototype","__proto__","constructor"),t.write("object:"+f.length+":");var c=this;return f.forEach(function(r){c.dispatch(r),t.write(":"),e.excludeValues||c.dispatch(n[r]),t.write(",")})}if(!this["_"+a]){if(e.ignoreUnknown)return t.write("["+a+"]");throw new Error('Unknown object type "'+a+'"')}this["_"+a](n)},_array:function(n,o){o="undefined"!=typeof o?o:e.unorderedArrays!==!1;var i=this;if(t.write("array:"+n.length+":"),!o||n.length<=1)return n.forEach(function(e){return i.dispatch(e)});var u=[],a=n.map(function(t){var n=new y,o=r.slice(),i=w(e,n,o);return i.dispatch(t),u=u.concat(o.slice(r.length)),n.read().toString()});return r=r.concat(u),a.sort(),this._array(a,!1)},_date:function(e){return t.write("date:"+e.toJSON())},_symbol:function(e){return t.write("symbol:"+e.toString(),"utf8")},_error:function(e){return t.write("error:"+e.toString(),"utf8")},_boolean:function(e){return t.write("bool:"+e.toString())}
80,_string:function(e){t.write("string:"+e.length+":"),t.write(e,"utf8")},_function:function(r){t.write("fn:"),p(r)?this.dispatch("[native]"):this.dispatch(r.toString()),e.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(r.name)),e.respectFunctionProperties&&this._object(r)},_number:function(e){return t.write("number:"+e.toString())},_xml:function(e){return t.write("xml:"+e.toString(),"utf8")},_null:function(){return t.write("Null")},_undefined:function(){return t.write("Undefined")},_regexp:function(e){return t.write("regex:"+e.toString(),"utf8")},_uint8array:function(e){return t.write("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint8clampedarray:function(e){return t.write("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(e))},_int8array:function(e){return t.write("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint16array:function(e){return t.write("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_int16array:function(e){return t.write("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_uint32array:function(e){return t.write("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_int32array:function(e){return t.write("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_float32array:function(e){return t.write("float32array:"),this.dispatch(Array.prototype.slice.call(e))},_float64array:function(e){return t.write("float64array:"),this.dispatch(Array.prototype.slice.call(e))},_arraybuffer:function(e){return t.write("arraybuffer:"),this.dispatch(new Uint8Array(e))},_url:function(e){return t.write("url:"+e.toString(),"utf8")},_map:function(r){t.write("map:");var n=Array.from(r);return this._array(n,e.unorderedSets!==!1)},_set:function(r){t.write("set:");var n=Array.from(r);return this._array(n,e.unorderedSets!==!1)},_blob:function(){if(e.ignoreUnknown)return t.write("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return t.write("domwindow")},_process:function(){return t.write("process")},_timer:function(){return t.write("timer")},_pipe:function(){return t.write("pipe")},_tcp:function(){return t.write("tcp")},_udp:function(){return t.write("udp")},_tty:function(){return t.write("tty")},_statwatcher:function(){return t.write("statwatcher")},_securecontext:function(){return t.write("securecontext")},_connection:function(){return t.write("connection")},_zlib:function(){return t.write("zlib")},_context:function(){return t.write("context")},_nodescript:function(){return t.write("nodescript")},_httpparser:function(){return t.write("httpparser")},_dataview:function(){return t.write("dataview")},_signal:function(){return t.write("signal")},_fsevent:function(){return t.write("fsevent")},_tlswrap:function(){return t.write("tlswrap")}}}function y(){return{buf:"",write:function(e){this.buf+=e},end:function(e){this.buf+=e},read:function(){return this.buf}}}var m=e("crypto");r=t.exports=d,r.sha1=function(e){return d(e)},r.keys=function(e){return d(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},r.MD5=function(e){return d(e,{algorithm:"md5",encoding:"hex"})},r.keysMD5=function(e){return d(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})},r.writeToStream=function(e,t,r){return"undefined"==typeof r&&(r=t,t={}),t=h(e,t),w(t,r).dispatch(e)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_50da2638.js","/")},{buffer:3,crypto:5,lYpoI2:10}],2:[function(e,t,r){(function(e,t,n,o,i,u,a,s,f){var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===i||t===l?62:t===u||t===d?63:a>t?-1:a+10>t?t-a+26+26:f+26>t?t-f:s+26>t?t-s+26:void 0}function r(e){function r(e){f[l++]=e}var n,i,u,a,s,f;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;s="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,f=new o(3*e.length/4-s),u=s>0?e.length-4:e.length;var l=0;for(n=0,i=0;u>n;n+=4,i+=3)a=t(e.charAt(n))<<18|t(e.charAt(n+1))<<12|t(e.charAt(n+2))<<6|t(e.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===s?(a=t(e.charAt(n))<<2|t(e.charAt(n+1))>>4,r(255&a)):1===s&&(a=t(e.charAt(n))<<10|t(e.charAt(n+1))<<4|t(e.charAt(n+2))>>2,r(a>>8&255),r(255&a)),f}function n(e){function t(e){return c.charAt(e)}function r(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var n,o,i,u=e.length%3,a="";for(n=0,i=e.length-u;i>n;n+=3)o=(e[n]<<16)+(e[n+1]<<8)+e[n+2],a+=r(o);switch(u){case 1:o=e[e.length-1],a+=t(o>>2),a+=t(o<<4&63),a+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],a+=t(o>>10),a+=t(o>>4&63),a+=t(o<<2&63),a+="="}return a}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="+".charCodeAt(0),u="/".charCodeAt(0),a="0".charCodeAt(0),s="a".charCodeAt(0),f="A".charCodeAt(0),l="-".charCodeAt(0),d="_".charCodeAt(0);e.toByteArray=r,e.fromByteArray=n}("undefined"==typeof r?this.base64js={}:r)}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:10}],3:[function(e,t,r){(function(t,n,o,i,u,a,s,f,c){function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var n=typeof e;if("base64"===t&&"string"===n)for(e=N(e);e.length%4!==0;)e+="=";var i;if("number"===n)i=F(e);else if("string"===n)i=o.byteLength(e,t);else{if("object"!==n)throw new Error("First argument needs to be a number, array or string.");i=F(e.length)}var u;
80o._useTypedArrays?u=o._augment(new Uint8Array(i)):(u=this,u.length=i,u._isBuffer=!0);var a;if(o._useTypedArrays&&"number"==typeof e.byteLength)u._set(e);else if(O(e))for(a=0;i>a;a++)o.isBuffer(e)?u[a]=e.readUInt8(a):u[a]=e[a];else if("string"===n)u.write(e,0,t);else if("number"===n&&!o._useTypedArrays&&!r)for(a=0;i>a;a++)u[a]=0;return u}function l(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var u=t.length;G(u%2===0,"Invalid hex string"),n>u/2&&(n=u/2);for(var a=0;n>a;a++){var s=parseInt(t.substr(2*a,2),16);G(!isNaN(s),"Invalid hex string"),e[r+a]=s}return o._charsWritten=2*a,a}function d(e,t,r,n){var i=o._charsWritten=W(V(t),e,r,n);return i}function h(e,t,r,n){var i=o._charsWritten=W(q(t),e,r,n);return i}function p(e,t,r,n){return h(e,t,r,n)}function g(e,t,r,n){var i=o._charsWritten=W(R(t),e,r,n);return i}function w(e,t,r,n){var i=o._charsWritten=W(P(t),e,r,n);return i}function y(e,t,r){return 0===t&&r===e.length?K.fromByteArray(e):K.fromByteArray(e.slice(t,r))}function m(e,t,r){var n="",o="";r=Math.min(e.length,r);for(var i=t;r>i;i++)e[i]<=127?(n+=J(o)+String.fromCharCode(e[i]),o=""):o+="%"+e[i].toString(16);return n+J(o)}function b(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;r>o;o++)n+=String.fromCharCode(e[o]);return n}function v(e,t,r){return b(e,t,r)}function _(e,t,r){var n=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>n)&&(r=n);for(var o="",i=t;r>i;i++)o+=H(e[i]);return o}function E(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function I(e,t,r,n){n||(G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+1<e.length,"Trying to read beyond buffer length"));var o=e.length;if(!(t>=o)){var i;return r?(i=e[t],o>t+1&&(i|=e[t+1]<<8)):(i=e[t]<<8,o>t+1&&(i|=e[t+1])),i}}function A(e,t,r,n){n||(G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+3<e.length,"Trying to read beyond buffer length"));var o=e.length;if(!(t>=o)){var i;return r?(o>t+2&&(i=e[t+2]<<16),o>t+1&&(i|=e[t+1]<<8),i|=e[t],o>t+3&&(i+=e[t+3]<<24>>>0)):(o>t+1&&(i=e[t+1]<<16),o>t+2&&(i|=e[t+2]<<8),o>t+3&&(i|=e[t+3]),i+=e[t]<<24>>>0),i}}function B(e,t,r,n){n||(G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+1<e.length,"Trying to read beyond buffer length"));var o=e.length;if(!(t>=o)){var i=I(e,t,r,!0),u=32768&i;return u?-1*(65535-i+1):i}}function L(e,t,r,n){n||(G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+3<e.length,"Trying to read beyond buffer length"));var o=e.length;if(!(t>=o)){var i=A(e,t,r,!0),u=2147483648&i;return u?-1*(4294967295-i+1):i}}function U(e,t,r,n){return n||(G("boolean"==typeof r,"missing or invalid endian"),G(t+3<e.length,"Trying to read beyond buffer length")),Q.read(e,t,r,23,4)}function x(e,t,r,n){return n||(G("boolean"==typeof r,"missing or invalid endian"),G(t+7<e.length,"Trying to read beyond buffer length")),Q.read(e,t,r,52,8)}function S(e,t,r,n,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+1<e.length,"trying to write beyond buffer length"),z(t,65535));var i=e.length;if(!(r>=i))for(var u=0,a=Math.min(i-r,2);a>u;u++)e[r+u]=(t&255<<8*(n?u:1-u))>>>8*(n?u:1-u)}function C(e,t,r,n,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3<e.length,"trying to write beyond buffer length"),z(t,4294967295));var i=e.length;if(!(r>=i))for(var u=0,a=Math.min(i-r,4);a>u;u++)e[r+u]=t>>>8*(n?u:3-u)&255}function j(e,t,r,n,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+1<e.length,"Trying to write beyond buffer length"),X(t,32767,-32768));var i=e.length;r>=i||(t>=0?S(e,t,r,n,o):S(e,65535+t+1,r,n,o))}function k(e,t,r,n,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3<e.length,"Trying to write beyond buffer length"),X(t,2147483647,-2147483648));var i=e.length;r>=i||(t>=0?C(e,t,r,n,o):C(e,4294967295+t+1,r,n,o))}function T(e,t,r,n,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3<e.length,"Trying to write beyond buffer length"),$(t,3.4028234663852886e38,-3.4028234663852886e38));var i=e.length;r>=i||Q.write(e,t,r,n,23,4)}function M(e,t,r,n,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+7<e.length,"Trying to write beyond buffer length"),$(t,1.7976931348623157e308,-1.7976931348623157e308));var i=e.length;r>=i||Q.write(e,t,r,n,52,8)}function N(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e,t,r){return"number"!=typeof e?r:(e=~~e,e>=t?t:e>=0?e:(e+=t,e>=0?e:0))}function F(e){return e=~~Math.ceil(+e),0>
80e?0:e}function D(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function O(e){return D(e)||o.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function H(e){return 16>e?"0"+e.toString(16):e.toString(16)}function V(e){for(var t=[],r=0;r<e.length;r++){var n=e.charCodeAt(r);if(127>=n)t.push(e.charCodeAt(r));else{var o=r;n>=55296&&57343>=n&&r++;for(var i=encodeURIComponent(e.slice(o,r+1)).substr(1).split("%"),u=0;u<i.length;u++)t.push(parseInt(i[u],16))}}return t}function q(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t}function P(e){for(var t,r,n,o=[],i=0;i<e.length;i++)t=e.charCodeAt(i),r=t>>8,n=t%256,o.push(n),o.push(r);return o}function R(e){return K.toByteArray(e)}function W(e,t,r,n){for(var o=0;n>o&&!(o+r>=t.length||o>=e.length);o++)t[o+r]=e[o];return o}function J(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}function z(e,t){G("number"==typeof e,"cannot write a non-number as a number"),G(e>=0,"specified a negative value for writing an unsigned value"),G(t>=e,"value is larger than maximum value for type"),G(Math.floor(e)===e,"value has a fractional component")}function X(e,t,r){G("number"==typeof e,"cannot write a non-number as a number"),G(t>=e,"value larger than maximum allowed value"),G(e>=r,"value smaller than minimum allowed value"),G(Math.floor(e)===e,"value has a fractional component")}function $(e,t,r){G("number"==typeof e,"cannot write a non-number as a number"),G(t>=e,"value larger than maximum allowed value"),G(e>=r,"value smaller than minimum allowed value")}function G(e,t){if(!e)throw new Error(t||"Failed assertion")}var K=e("base64-js"),Q=e("ieee754");r.Buffer=o,r.SlowBuffer=o,r.INSPECT_MAX_BYTES=50,o.poolSize=8192,o._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray}catch(r){return!1}}(),o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.isBuffer=function(e){return!(null===e||void 0===e||!e._isBuffer)},o.byteLength=function(e,t){var r;switch(e+="",t||"utf8"){case"hex":r=e.length/2;break;case"utf8":case"utf-8":r=V(e).length;break;case"ascii":case"binary":case"raw":r=e.length;break;case"base64":r=R(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=2*e.length;break;default:throw new Error("Unknown encoding")}return r},o.concat=function(e,t){if(G(D(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new o(0);if(1===e.length)return e[0];var r;if("number"!=typeof t)for(t=0,r=0;r<e.length;r++)t+=e[r].length;var n=new o(t),i=0;for(r=0;r<e.length;r++){var u=e[r];u.copy(n,i),i+=u.length}return n},o.prototype.write=function(e,t,r,n){if(isFinite(t))isFinite(r)||(n=r,r=void 0);else{var o=n;n=t,t=r,r=o}t=Number(t)||0;var i=this.length-t;r?(r=Number(r),r>i&&(r=i)):r=i,n=String(n||"utf8").toLowerCase();var u;switch(n){case"hex":u=l(this,e,t,r);break;case"utf8":case"utf-8":u=d(this,e,t,r);break;case"ascii":u=h(this,e,t,r);break;case"binary":u=p(this,e,t,r);break;case"base64":u=g(this,e,t,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":u=w(this,e,t,r);break;default:throw new Error("Unknown encoding")}return u},o.prototype.toString=function(e,t,r){var n=this;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,r=void 0!==r?Number(r):r=n.length,r===t)return"";var o;switch(e){case"hex":o=_(n,t,r);break;case"utf8":case"utf-8":o=m(n,t,r);break;case"ascii":o=b(n,t,r);break;case"binary":o=v(n,t,r);break;case"base64":o=y(n,t,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":o=E(n,t,r);break;default:throw new Error("Unknown encoding")}return o},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.copy=function(e,t,r,n){var i=this;if(r||(r=0),n||0===n||(n=this.length),t||(t=0),n!==r&&0!==e.length&&0!==i.length){G(n>=r,"sourceEnd < sourceStart"),G(t>=0&&t<e.length,"targetStart out of bounds"),G(r>=0&&r<i.length,"sourceStart out of bounds"),G(n>=0&&n<=i.length,"sourceEnd out of bounds"),n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var u=n-r;if(100>u||!o._useTypedArrays)for(var a=0;u>a;a++)e[a+t]=this[a+r];else e._set(this.subarray(r,r+u),t)}},o.prototype.slice=function(e,t){var r=this.length;if(e=Y(e,r,0),t=Y(t,r,r),o._useTypedArrays)return o._augment(this.subarray(e,t));for(var n=t-e,i=new o(n,void 0,!0),u=0;n>u;u++)i[u]=this[u+e];return i},o.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},o.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},o.prototype.readUInt8=function(e,t){return t||(G(void 0!==e&&null!==e,"missing offset"),G(e<this.length,"Trying to read beyond buffer length")),e>=this.length?void 0:this[e]},o.prototype.readUInt16LE=function(e,t){return I(this,e,!0,t)},o.prototype.readUInt16BE=function(e,t){return I(this,e,!1,t)},o.prototype.readUInt32LE=function(e,t){return A(this,e,!0,t)},o.prototype.readUInt32BE=function(e,t){return A(this,e,!1,t)},o.prototype.readInt8=function(e,t){if(t||(G(void 0!==e&&null!==e,"missing offset"),G(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length)){var r=128&this[e];return r?-1*(255-this[e]+1):this[e]}},o.prototype.readInt16LE=function(e,t){return B(this,e,!0,t)},o.prototype.readInt16BE=function(e,t){return B(this,e,!1,t)},o.prototype.readInt32LE=function(e,t){return L(this,e,!0,t)},o.prototype.readInt32BE=function(e,t){return L(this,e,!1,t)},o.prototype.readFloatLE=function(e,t){return U(this,e,!0,t)},o.prototype.readFloatBE=function(e,t){return U(this,e,!1,t)},o.prototype.readDoubleLE=function(e,t){return x(this,e,!0,t)},o.prototype.readDoubleBE=function(e,t){return x(this,e,!1,t)},o.prototype.writeUInt8=function(e,t,r){r||(G(void 0!==e&&null!==e,"missing value"),G(void 0!==t&&null!==t,"missing offset"),G(t<this.length,"trying to write beyond buffer length"),z(e,255)),t>=this.length||(this[t]=e)},o.prototype.writeUInt16LE=function(e,t,r){S(this,e,t,!0,r)},o.prototype.writeUInt16BE=function(e,t,r){S(this,e,t,!1,r)},o.prototype.writeUInt32LE=function(e,t,r){C(this,e,t,!0,r)},o.prototype.writeUInt32BE=function(e,t,r){C(this,e,t,!1,r)},o.prototype.writeInt8=function(e,t,r){r||(G(void 0!==e&&null!==e,"missing value"),G(void 0!==t&&null!==t,"missing offset"),G(t<this.length,"Trying to write beyond buffer length"),X(e,127,-128)),t>=this.length||(e>=0?this.writeUInt8(e,t,r):this.writeUInt8(255+e+1,t,r))},o.prototype.writeInt16LE=function(e,t,r){j(this,e,t,!0,r)},o.prototype.writeInt16BE=function(e,t,r){j(this,e,t,!1,r)},o.prototype.writeInt32LE=function(e,t,r){k(this,e,t,!0,r)},o.prototype.writeInt32BE=function(e,t,r){k(this,e,t,!1,r)},o.prototype.writeFloatLE=function(e,t,r){T(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){T(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){M(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){M(this,e,t,!1,r)},o.prototype.fill=function(e,t,r){if(e||(e=0),t||(t=0),r||(r=this.length),"string"==typeof e&&(e=e.charCodeAt(0)),G("number"==typeof e&&!isNaN(e),"value is not a number"),G(r>=t,"end < start"),r!==t&&0!==this.length){G(t>=0&&t<this.length,"start out of bounds"),G(r>=0&&r<=this.length,"end out of bounds");for(var n=t;r>n;n++)this[n]=e}},o.prototype.inspect=function(){for(var e=[],t=this.length,n=0;t>n;n++)if(e[n]=H(this[n]),n===r.INSPECT_MAX_BYTES){e[n+1]="...";break}return"<Buffer "+e.join(" ")+">"},o.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(o._useTypedArrays)return new o(this).buffer;for(var e=new Uint8Array(this.length),t=0,r=e.length;r>t;t+=1)e[t]=this[t];return e.buffer}throw new Error("Buffer.toArrayBuffer not supported in this browser")};var Z=o.prototype;o._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=Z.get,e.set=Z.set,e.write=Z.write,e.toString=Z.toString,e.toLocaleStr
80ing=Z.toString,e.toJSON=Z.toJSON,e.copy=Z.copy,e.slice=Z.slice,e.readUInt8=Z.readUInt8,e.readUInt16LE=Z.readUInt16LE,e.readUInt16BE=Z.readUInt16BE,e.readUInt32LE=Z.readUInt32LE,e.readUInt32BE=Z.readUInt32BE,e.readInt8=Z.readInt8,e.readInt16LE=Z.readInt16LE,e.readInt16BE=Z.readInt16BE,e.readInt32LE=Z.readInt32LE,e.readInt32BE=Z.readInt32BE,e.readFloatLE=Z.readFloatLE,e.readFloatBE=Z.readFloatBE,e.readDoubleLE=Z.readDoubleLE,e.readDoubleBE=Z.readDoubleBE,e.writeUInt8=Z.writeUInt8,e.writeUInt16LE=Z.writeUInt16LE,e.writeUInt16BE=Z.writeUInt16BE,e.writeUInt32LE=Z.writeUInt32LE,e.writeUInt32BE=Z.writeUInt32BE,e.writeInt8=Z.writeInt8,e.writeInt16LE=Z.writeInt16LE,e.writeInt16BE=Z.writeInt16BE,e.writeInt32LE=Z.writeInt32LE,e.writeInt32BE=Z.writeInt32BE,e.writeFloatLE=Z.writeFloatLE,e.writeFloatBE=Z.writeFloatBE,e.writeDoubleLE=Z.writeDoubleLE,e.writeDoubleBE=Z.writeDoubleBE,e.fill=Z.fill,e.inspect=Z.inspect,e.toArrayBuffer=Z.toArrayBuffer,e}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:11,lYpoI2:10}],4:[function(e,t,r){(function(r,n,o,i,u,a,s,f,c){function l(e,t){if(e.length%p!==0){var r=e.length+(p-e.length%p);e=o.concat([e,g],r)}for(var n=[],i=t?e.readInt32BE:e.readInt32LE,u=0;u<e.length;u+=p)n.push(i.call(e,u));return n}function d(e,t,r){for(var n=new o(t),i=r?n.writeInt32BE:n.writeInt32LE,u=0;u<e.length;u++)i.call(n,e[u],4*u,!0);return n}function h(e,t,r,n){o.isBuffer(e)||(e=new o(e));var i=t(l(e,n),e.length*w);return d(i,r,n)}var o=e("buffer").Buffer,p=4,g=new o(p);g.fill(0);var w=8;t.exports={hash:h}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:10}],5:[function(e,t,r){(function(t,n,o,i,u,a,s,f,c){function l(e,t,r){o.isBuffer(t)||(t=new o(t)),o.isBuffer(r)||(r=new o(r)),t.length>v?t=e(t):t.length<v&&(t=o.concat([t,_],v));for(var n=new o(v),i=new o(v),u=0;v>u;u++)n[u]=54^t[u],i[u]=92^t[u];var a=e(o.concat([n,r]));return e(o.concat([i,a]))}function d(e,t){e=e||"sha1";var r=b[e],n=[],i=0;return r||h("algorithm:",e,"is not yet supported"),{update:function(e){return o.isBuffer(e)||(e=new o(e)),n.push(e),i+=e.length,this},digest:function(e){var i=o.concat(n),u=t?l(r,t,i):r(i);return n=null,e?u.toString(e):u}}}function h(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function p(e,t){for(var r in e)t(e[r],r)}var o=e("buffer").Buffer,g=e("./sha"),w=e("./sha256"),y=e("./rng"),m=e("./md5"),b={sha1:g,sha256:w,md5:m},v=64,_=new o(v);_.fill(0),r.createHash=function(e){return d(e)},r.createHmac=function(e,t){return d(e,t)},r.randomBytes=function(e,t){if(!t||!t.call)return new o(y(e));try{t.call(this,void 0,new o(y(e)))}catch(r){t(r)}},p(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(e){r[e]=function(){h("sorry,",e,"is not implemented yet")}})}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:10}],6:[function(e,t,r){(function(r,n,o,i,u,a,s,f,c){function l(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;for(var r=1732584193,n=-271733879,o=-1732584194,i=271733878,u=0;u<e.length;u+=16){var a=r,s=n,f=o,c=i;r=h(r,n,o,i,e[u+0],7,-680876936),i=h(i,r,n,o,e[u+1],12,-389564586),o=h(o,i,r,n,e[u+2],17,606105819),n=h(n,o,i,r,e[u+3],22,-1044525330),r=h(r,n,o,i,e[u+4],7,-176418897),i=h(i,r,n,o,e[u+5],12,1200080426),o=h(o,i,r,n,e[u+6],17,-1473231341),n=h(n,o,i,r,e[u+7],22,-45705983),r=h(r,n,o,i,e[u+8],7,1770035416),i=h(i,r,n,o,e[u+9],12,-1958414417),o=h(o,i,r,n,e[u+10],17,-42063),n=h(n,o,i,r,e[u+11],22,-1990404162),r=h(r,n,o,i,e[u+12],7,1804603682),i=h(i,r,n,o,e[u+13],12,-40341101),o=h(o,i,r,n,e[u+14],17,-1502002290),n=h(n,o,i,r,e[u+15],22,1236535329),r=p(r,n,o,i,e[u+1],5,-165796510),i=p(i,r,n,o,e[u+6],9,-1069501632),o=p(o,i,r,n,e[u+11],14,643717713),n=p(n,o,i,r,e[u+0],20,-373897302),r=p(r,n,o,i,e[u+5],5,-701558691),i=p(i,r,n,o,e[u+10],9,38016083),o=p(o,i,r,n,e[u+15],14,-660478335),n=p(n,o,i,r,e[u+4],20,-405537848),r=p(r,n,o,i,e[u+9],5,568446438),i=p(i,r,n,o,e[u+14],9,-1019803690),o=p(o,i,r,n,e[u+3],14,-187363961),n=p(n,o,i,r,e[u+8],20,1163531501),r=p(r,n,o,i,e[u+13],5,-1444681467),i=p(i,r,n,o,e[u+2],9,-51403784),o=p(o,i,r,n,e[u+7],14,1735328473),n=p(n,o,i,r,e[u+12],20,-1926607734),r=g(r,n,o,i,e[u+5],4,-378558),i=g(i,r,n,o,e[u+8],11,-2022574463),o=g(o,i,r,n,e[u+11],16,1839030562),n=g(n,o,i,r,e[u+14],23,-35309556),r=g(r,
80n,o,i,e[u+1],4,-1530992060),i=g(i,r,n,o,e[u+4],11,1272893353),o=g(o,i,r,n,e[u+7],16,-155497632),n=g(n,o,i,r,e[u+10],23,-1094730640),r=g(r,n,o,i,e[u+13],4,681279174),i=g(i,r,n,o,e[u+0],11,-358537222),o=g(o,i,r,n,e[u+3],16,-722521979),n=g(n,o,i,r,e[u+6],23,76029189),r=g(r,n,o,i,e[u+9],4,-640364487),i=g(i,r,n,o,e[u+12],11,-421815835),o=g(o,i,r,n,e[u+15],16,530742520),n=g(n,o,i,r,e[u+2],23,-995338651),r=w(r,n,o,i,e[u+0],6,-198630844),i=w(i,r,n,o,e[u+7],10,1126891415),o=w(o,i,r,n,e[u+14],15,-1416354905),n=w(n,o,i,r,e[u+5],21,-57434055),r=w(r,n,o,i,e[u+12],6,1700485571),i=w(i,r,n,o,e[u+3],10,-1894986606),o=w(o,i,r,n,e[u+10],15,-1051523),n=w(n,o,i,r,e[u+1],21,-2054922799),r=w(r,n,o,i,e[u+8],6,1873313359),i=w(i,r,n,o,e[u+15],10,-30611744),o=w(o,i,r,n,e[u+6],15,-1560198380),n=w(n,o,i,r,e[u+13],21,1309151649),r=w(r,n,o,i,e[u+4],6,-145523070),i=w(i,r,n,o,e[u+11],10,-1120210379),o=w(o,i,r,n,e[u+2],15,718787259),n=w(n,o,i,r,e[u+9],21,-343485551),r=y(r,a),n=y(n,s),o=y(o,f),i=y(i,c)}return Array(r,n,o,i)}function d(e,t,r,n,o,i){return y(m(y(y(t,e),y(n,i)),o),r)}function h(e,t,r,n,o,i,u){return d(t&r|~t&n,e,t,o,i,u)}function p(e,t,r,n,o,i,u){return d(t&n|r&~n,e,t,o,i,u)}function g(e,t,r,n,o,i,u){return d(t^r^n,e,t,o,i,u)}function w(e,t,r,n,o,i,u){return d(r^(t|~n),e,t,o,i,u)}function y(e,t){var r=(65535&e)+(65535&t),n=(e>>16)+(t>>16)+(r>>16);return n<<16|65535&r}function m(e,t){return e<<t|e>>>32-t}var b=e("./helpers");t.exports=function(e){return b.hash(e,l,16)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],7:[function(e,t,r){(function(e,r,n,o,i,u,a,s,f){!function(){var e,r,n=this;e=function(e){for(var t,t,r=new Array(e),n=0;e>n;n++)0==(3&n)&&(t=4294967296*Math.random()),r[n]=t>>>((3&n)<<3)&255;return r},n.crypto&&crypto.getRandomValues&&(r=function(e){var t=new Uint8Array(e);return crypto.getRandomValues(t),t}),t.exports=r||e}()}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:10}],8:[function(e,t,r){(function(r,n,o,i,u,a,s,f,c){function l(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var r=Array(80),n=1732584193,o=-271733879,i=-1732584194,u=271733878,a=-1009589776,s=0;s<e.length;s+=16){for(var f=n,c=o,l=i,w=u,y=a,m=0;80>m;m++){16>m?r[m]=e[s+m]:r[m]=g(r[m-3]^r[m-8]^r[m-14]^r[m-16],1);var b=p(p(g(n,5),d(m,o,i,u)),p(p(a,r[m]),h(m)));a=u,u=i,i=g(o,30),o=n,n=b}n=p(n,f),o=p(o,c),i=p(i,l),u=p(u,w),a=p(a,y)}return Array(n,o,i,u,a)}function d(e,t,r,n){return 20>e?t&r|~t&n:40>e?t^r^n:60>e?t&r|t&n|r&n:t^r^n}function h(e){return 20>e?1518500249:40>e?1859775393:60>e?-1894007588:-899497514}function p(e,t){var r=(65535&e)+(65535&t),n=(e>>16)+(t>>16)+(r>>16);return n<<16|65535&r}function g(e,t){return e<<t|e>>>32-t}var w=e("./helpers");t.exports=function(e){return w.hash(e,l,20,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],9:[function(e,t,r){(function(r,n,o,i,u,a,s,f,c){var l=e("./helpers"),d=function(e,t){var r=(65535&e)+(65535&t),n=(e>>16)+(t>>16)+(r>>16);return n<<16|65535&r},h=function(e,t){return e>>>t|e<<32-t;
81},p=function(e,t){return e>>>t},g=function(e,t,r){return e&t^~e&r},w=function(e,t,r){return e&t^e&r^t&r},y=function(e){return h(e,2)^h(e,13)^h(e,22)},m=function(e){return h(e,6)^h(e,11)^h(e,25)},b=function(e){return h(e,7)^h(e,18)^p(e,3)},v=function(e){return h(e,17)^h(e,19)^p(e,10)},_=function(e,t){var r,n,o,i,u,a,s,f,c,l,h,p,_=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
81734187,3204031479,3329325298),E=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),I=new Array(64);e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var c=0;c<e.length;c+=16){r=E[0],n=E[1],o=E[2],i=E[3],u=E[4],a=E[5],s=E[6],f=E[7];for(var l=0;64>l;l++)16>l?I[l]=e[l+c]:I[l]=d(d(d(v(I[l-2]),I[l-7]),b(I[l-15])),I[l-16]),h=d(d(d(d(f,m(u)),g(u,a,s)),_[l]),I[l]),p=d(y(r),w(r,n,o)),f=s,s=a,a=u,u=d(i,h),i=o,o=n,n=r,r=d(h,p);E[0]=d(r,E[0]),E[1]=d(n,E[1]),E[2]=d(o,E[2]),E[3]=d(i,E[3]),E[4]=d(u,E[4]),E[5]=d(a,E[5]),E[6]=d(s,E[6]),E[7]=d(f,E[7])}return E};t.exports=function(e){return l.hash(e,_,32,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],10:[function(e,t,r){(function(e,r,n,o,i,u,a,s,f){function c(){}var e=t.exports={};e.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var r=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),r.length>0)){var n=r.shift();n()}},!0),function(e){r.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.on=c,e.addListener=c,e.once=c,e.off=c,e.removeListener=c,e.removeAllListeners=c,e.emit=c,e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:10}],11:[function(e,t,r){(function(e,t,n,o,i,u,a,s,f){r.read=function(e,t,r,n,o){var i,u,a=8*o-n-1,s=(1<<a)-1,f=s>>1,c=-7,l=r?o-1:0,d=r?-1:1,h=e[t+l];for(l+=d,i=h&(1<<-c)-1,h>>=-c,c+=a;c>0;i=256*i+e[t+l],l+=d,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=n;c>0;u=256*u+e[t+l],l+=d,c-=8);if(0===i)i=1-f;else{if(i===s)return u?NaN:(h?-1:1)*(1/0);u+=Math.pow(2,n),i-=f}return(h?-1:1)*u*Math.pow(2,i-n)},r.write=function(e,t,r,n,o,i){var u,a,s,f=8*i-o-1,c=(1<<f)-1,l=c>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,p=n?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=c):(u=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-u))<1&&(u--,s*=2),t+=u+l>=1?d/s:d*Math.pow(2,1-l),t*s>=2&&(u++,s/=2),u+l>=c?(a=0,u=c):u+l>=1?(a=(t*s-1)*Math.pow(2,o),u+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),u=0));o>=8;e[r+h]=255&a,h+=p,a/=256,o-=8);for(u=u<<o|a,f+=o;f>0;e[r+h]=255&u,h+=p,u/=256,f-=8);e[r+h-p]|=128*g}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/ieee754/index.js","/node_modules/ieee754")},{buffer:3,lYpoI2:10}]},{},[1])(1)});;
82/* AUTOGENERATED: jquery.validationEngine-en.js */
83!function(e){e.fn.validationEngineLanguage=function(){},e.validationEngineLanguage={newLang:function(){e.validationEngineLanguage.allRules={required:{regex:"none",alertText:"* This field is required",alertTextCheckboxMultiple:"* Please select an option",alertTextCheckboxe:"* This checkbox is required",alertTextDateRange:"* Both date range fields are required"},requiredInFunction:{func:function(e,a,t,d){return"test"==e.val()},alertText:"* Field must equal test"},dateRange:{regex:"none",alertText:"* Invalid ",alertText2:"Date Range"},dateTimeRange:{regex:"none",alertText:"* Invalid ",alertText2:"Date Time Range"},minSize:{regex:"none",alertText:"* Minimum ",alertText2:" characters required"},maxSize:{regex:"none",alertText:"* Maximum ",alertText2:" characters allowed"},groupRequired:{regex:"none",alertText:"* You must fill one of the following fields",alertTextCheckboxMultiple:"* Please select an option",alertTextCheckboxe:"* This checkbox is required"},min:{regex:"none",alertText:"* Minimum value is "},max:{regex:"none",alertText:"* Maximum value is "},past:{regex:"none",alertText:"* Date prior to "},future:{regex:"none",alertText:"* Date past "},maxCheckbox:{regex:"none",alertText:"* Maximum ",alertText2:" options allowed"},minCheckbox:{regex:"none",alertText:"* Please select ",alertText2:" options"},equals:{regex:"none",alertText:"* Fields do not match"},creditCard:{regex:"none",alertText:"* Invalid credit card number"},phone:{regex:/^([\+][0-9]{1,3}([ \.\-])?)?([\(][0-9]{1,6}[\)])?([0-9 \.\-]{1,32})(([A-Za-z \:]{1,11})?[0-9]{1,4}?)$/,alertText:"* Invalid phone number"},email:{regex:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,alertText:"* Invalid email address"},fullname:{regex:/^([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]*)+[ ]([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]+)+$/,alertText:"* Must be first and last name"},zip:{regex:/^\d{5}$|^\d{5}-\d{4}$/,alertText:"* Invalid zip format"},integer:{regex:/^[\-\+]?\d+$/,alertText:"* Not a valid integer"},number:{regex:/^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/,alertText:"* Invalid floating decimal number"},date:{func:function(e){var a=new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/).exec(e.val());if(null==a)return!1;var t=a[1],d=+a[2],r=+a[3],l=new Date(t,d-1,r);return l.getFullYear()==t&&l.getMonth()==d-1&&l.getDate()==r},alertText:"* Invalid date, must be in YYYY-MM-DD format"},ipv4:{regex:/^((([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))[.]){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$/,alertText:"* Invalid IP address"},ip:{regex:/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/,alertText:"* Invalid IP address"},url:{regex:/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,alertText:"* Invalid URL"},onlyNumberSp:{regex:/^[0-9\ ]+$/,alertText:"* Numbers only"},onlyLetterSp:{regex:/^[a-zA-Z\ \']+$/,alertText:"* Letters only"}
83,onlyLetterAccentSp:{regex:/^[a-z\u00C0-\u017F\ ]+$/i,alertText:"* Letters only (accents allowed)"},onlyLetterNumber:{regex:/^[0-9a-zA-Z]+$/,alertText:"* No special characters allowed"},ajaxUserCall:{url:"ajaxValidateFieldUser",extraData:"name=eric",alertText:"* This user is already taken",alertTextLoad:"* Validating, please wait"},ajaxUserCallPhp:{url:"phpajax/ajaxValidateFieldUser.php",extraData:"name=eric",alertTextOk:"* This username is available",alertText:"* This user is already taken",alertTextLoad:"* Validating, please wait"},ajaxNameCall:{url:"ajaxValidateFieldName",alertText:"* This name is already taken",alertTextOk:"* This name is available",alertTextLoad:"* Validating, please wait"},ajaxNameCallPhp:{url:"phpajax/ajaxValidateFieldName.php",alertText:"* This name is already taken",alertTextLoad:"* Validating, please wait"},validate2fields:{alertText:"* Please input HELLO"},dateFormat:{regex:/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/,alertText:"* Invalid Date"},dateTimeFormat:{regex:/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1}$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^((1[012]|0?[1-9]){1}\/(0?[1-9]|[12][0-9]|3[01]){1}\/\d{2,4}\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1})$/,alertText:"* Invalid Date or Date Format",alertText2:"Expected Format: ",alertText3:"mm/dd/yyyy hh:mm:ss AM|PM or ",alertText4:"yyyy-mm-dd hh:mm:ss AM|PM"}}}},e.validationEngineLanguage.newLang()}(jQuery);;
84/* AUTOGENERATED: jquery.validationEngine.js */
85!function(T){"use strict";var F={init:function(e){var t=this;return t.data("jqv")&&null!=t.data("jqv")||(e=F._saveOptions(t,e),T(document).on("click",".formError",function(){T(this).fadeOut(150,function(){T(this).closest(".formError").remove()})})),this},attach:function(e){var t,a=this;return(t=e?F._saveOptions(a,e):a.data("jqv")).validateAttribute=a.find("[data-validation-engine*=validate]").length?"data-validation-engine":"class",t.binded&&(a.on(t.validationEventTrigger,"["+t.validateAttribute+"*=validate]:not([type=checkbox]):not([type=radio]):not(.datepicker)",F._onFieldEvent),a.on("click","["+t.validateAttribute+"*=validate][type=checkbox],["+t.validateAttribute+"*=validate][type=radio]",F._onFieldEvent),a.on(t.validationEventTrigger,"["+t.validateAttribute+"*=validate][class*=datepicker]",{delay:300},F._onFieldEvent)),t.autoPositionUpdate&&T(window).bind("resize",{noAnimation:!0,formElem:a},F.updatePromptsPosition),a.on("click","a[data-validation-engine-skip], a[class*='validate-skip'], button[data-validation-engine-skip], button[class*='validate-skip'], input[data-validation-engine-skip], input[class*='validate-skip']",F._submitButtonClick),a.removeData("jqv_submitButton"),a.on("submit",F._onSubmitEvent),this},detach:function(){var e=this,t=e.data("jqv");return e.off(t.validationEventTrigger,"["+t.validateAttribute+"*=validate]:not([type=checkbox]):not([type=radio]):not(.datepicker)",F._onFieldEvent),e.off("click","["+t.validateAttribute+"*=validate][type=checkbox],["+t.validateAttribute+"*=validate][type=radio]",F._onFieldEvent),e.off(t.validationEventTrigger,"["+t.validateAttribute+"*=validate][class*=datepicker]",F._onFieldEvent),e.off("submit",F._onSubmitEvent),e.removeData("jqv"),e.off("click","a[data-validation-engine-skip], a[class*='validate-skip'], button[data-validation-engine-skip], button[class*='validate-skip'], input[data-validation-engine-skip], input[class*='validate-skip']",F._submitButtonClick),e.removeData("jqv_submitButton"),t.autoPositionUpdate&&T(window).off("resize",F.updatePromptsPosition),this},validate:function(e){var t,a=T(this),r=null;
85if(a.is("form")||a.hasClass("validationEngineContainer")){if(a.hasClass("validating"))return!1;a.addClass("validating"),t=e?F._saveOptions(a,e):a.data("jqv");r=F._validateFields(this);setTimeout(function(){a.removeClass("validating")},100),r&&t.onSuccess?t.onSuccess():!r&&t.onFailure&&t.onFailure()}else{if(!a.is("form")&&!a.hasClass("validationEngineContainer")){var i=a.closest("form, .validationEngineContainer");return t=i.data("jqv")?i.data("jqv"):T.validationEngine.defaults,(r=F._validateField(a,t))&&t.onFieldSuccess?t.onFieldSuccess():t.onFieldFailure&&0<t.InvalidFields.length&&t.onFieldFailure(),!r}a.removeClass("validating")}return t.onValidationComplete?!!t.onValidationComplete(i,r):r},updatePromptsPosition:function(e){if(e&&this==window)var r=e.data.formElem,i=e.data.noAnimation;else r=T(this.closest("form, .validationEngineContainer"));var o=r.data("jqv");return o||(o=F._saveOptions(r,o)),r.find("["+o.validateAttribute+"*=validate]").not(":disabled").each(function(){var e=T(this);o.prettySelect&&e.is(":hidden")&&(e=r.find("#"+o.usePrefix+e.attr("id")+o.useSuffix));var t=F._getPrompt(e),a=T(t).find(".formErrorContent").html();t&&F._updatePrompt(e,T(t),a,void 0,!1,o,i)}),this},showPrompt:function(e,t,a,r){var i=this.closest("form, .validationEngineContainer").data("jqv");return i||(i=F._saveOptions(this,i)),a&&(i.promptPosition=a),i.showArrow=1==r,F._showPrompt(this,e,t,!1,i),this},hide:function(){var e=T(this).closest("form, .validationEngineContainer"),t=e.data("jqv");t||(t=F._saveOptions(e,t));var a,r=t&&t.fadeDuration?t.fadeDuration:.3;
85return a=e.is("form")||e.hasClass("validationEngineContainer")?"parentForm"+F._getClassName(T(e).attr("id")):F._getClassName(T(e).attr("id"))+"formError",T("."+a).fadeTo(r,0,function(){T(this).closest(".formError").remove()}),this},hideAll:function(){var e=this.data("jqv"),t=e?e.fadeDuration:300;return T(".formError").fadeTo(t,0,function(){T(this).closest(".formError").remove()}),this},_onFieldEvent:function(e){var t=T(this),a=t.closest("form, .validationEngineContainer"),r=a.data("jqv");r||(r=F._saveOptions(a,r)),r.eventTrigger="field",1==r.notEmpty?0<t.val().length&&window.setTimeout(function(){F._validateField(t,r)},e.data?e.data.delay:0):window.setTimeout(function(){F._validateField(t,r)},e.data?e.data.delay:0)},_onSubmitEvent:function(){var e=T(this),t=e.data("jqv");if(e.data("jqv_submitButton")){var a=T("#"+e.data("jqv_submitButton"));if(a&&0<a.length&&(a.hasClass("validate-skip")||"true"==a.attr("data-validation-engine-skip")))return!0}t.eventTrigger="submit";var r=F._validateFields(e);return r&&t.ajaxFormValidation?(F._validateFormWithAjax(e,t),!1):t.onValidationComplete?!!t.onValidationComplete(e,r):r},_checkAjaxStatus:function(e){var a=!0;return T.each(e.ajaxValidCache,function(e,t){if(!t)return a=!1}),a},_checkAjaxFieldStatus:function(e,t){return 1==t.ajaxValidCache[e]},_validateFields:function(a){var r=a.data("jqv"),i=!1;a.trigger("jqv.form.validating");var o=null;if(a.find("["+r.validateAttribute+"*=validate]").not(":disabled").each(function(){var e=T(this),t=[];if(T.inArray(e.attr("name"),t)<0){if((i|=F._validateField(e,r))&&null==o&&(o=e.is(":hidden")&&r.prettySelect?e=a.find("#"+r.usePrefix+F._jqSelector(e.attr("id"))+r.useSuffix):(e.data("jqv-prompt-at")instanceof jQuery?e=e.data("jqv-prompt-at"):e.data("jqv-prompt-at")&&(e=T(e.data("jqv-prompt-at"))),e)),r.doNotShowAllErrosOnSubmit)return!1;if(t.push(e.attr("name")),1==r.showOneMessage&&i)return!1}}),a.trigger("jqv.form.result",[i]),i){if(r.scroll){var e=o.offset().top,t=o.offset().left,s=r.promptPosition;if("string"==typeof s&&-1!=s.indexOf(":")&&(s=s.substring(0,s.indexOf(":"))),"bottomRight"!=s&&"bottomLeft"!=s){var n=F._getPrompt(o);n&&(e=n.offset().top)}if(r.scrollOffset&&(e-=r.scrollOffset),r.isOverflown){var l=T(r.overflownDIV);if(!l.length)return!1;e+=l.scrollTop()+-parseInt(l.offset().top)-5,T(r.overflownDIV).filter(":not(:animated)").animate({scrollTop:e},1100,function(){r.focusFirstField&&o.focus()})}else T("html, body").animate({scrollTop:e},1100,function(){r.focusFirstField&&o.focus()}),T("html, body").animate({scrollLeft:t},1100)}else r.focusFirstField&&o.focus();return!1}return!0},_validateFormWithAjax:function(l,d){var e=l.serialize(),t=d.ajaxFormValidationMethod?d.ajaxFormValidationMethod:"GET",a=d.ajaxFormValidationURL?d.ajaxFormValidationURL:l.attr("action"),u=d.dataType?d.dataType:"json";T.ajax({type:t,url:a,cache:!1,dataType:u,data:e,form:l,methods:F,options:d,beforeSend:function(){return d.onBeforeAjaxFormValidation(l,d)},error:function(e,t){d.onFailure?d.onFailure(e,t):F._ajaxError(e,t)},success:function(e){if("json"==u&&!0!==e){for(var t=!1,a=0;a<e.length;a++){var r=e[a],i=r[0],o=T(T("#"+i)[0]);if(1==o.length){var s=r[2];if(1==r[1])if(""!=s&&s){if(d.allrules[s])(n=d.allrules[s].alertTextOk)&&(s=n);d.showPrompts&&F._showPrompt(o,s,"pass",!1,d,!0)}else F._closePrompt(o);else{var n;if(t|=!0,d.allrules[s])(n=d.allrules[s].alertText)&&(s=n);d.showPrompts&&F._showPrompt(o,s,"",!1,d,!0)}}}d.onAjaxFormComplete(!t,l,e,d)}else d.onAjaxFormComplete(!0,l,e,d)}})},_validateField:function(e,t,a){if(e.attr("id")||(e.attr("id","form-validation-field-"+T.validationEngine.fieldIdCounter),++T.validationEngine.fieldIdCounter),e.hasClass(t.ignoreFieldsWithClass))return!1;if(!t.validateNonVisibleFields&&(e.is(":hidden")&&!t.prettySelect||e.parent().is(":hidden")))return!1;var r=e.attr(t.validateAttribute),i=/validate\[(.*)\]/.exec(r);if(!i)return!1;var o=i[1],s=o.split(/\[|,|\]/),n=e.attr("name"),l="",d="",u=!1,c=!1;t.isError=!1,t.showArrow=1==t.showArrow,0<t.maxErrorsPerField&&(c=!0);for(var f=T(e.closest("form, .validationEngineContainer")),v=0;v<s.length;v++)s[v]=s[v].toString().replace(" ",""),""===s[v]&&delete s[v];v=0;for(var p=0;v<s.length;v++){if(c&&p>=t.maxErrorsPerField){if(!u){var m=T.inArray("required",s);u=-1!=m&&v<=m}break}var g=void 0;switch(s[v]){case"required":u=!0,g=F._getErrorMessage(f,e,s[v],s,v,t,F._required);break;
85case"custom":g=F._getErrorMessage(f,e,s[v],s,v,t,F._custom);break;case"groupRequired":var h="["+t.validateAttribute+"*="+s[v+1]+"]",x=f.find(h).eq(0);x[0]!=e[0]&&(F._validateField(x,t,a),t.showArrow=!0),(g=F._getErrorMessage(f,e,s[v],s,v,t,F._groupRequired))&&(u=!0),t.showArrow=!1;break;case"ajax":(g=F._ajax(e,s,v,t))&&(d="load");break;case"minSize":g=F._getErrorMessage(f,e,s[v],s,v,t,F._minSize);break;case"maxSize":g=F._getErrorMessage(f,e,s[v],s,v,t,F._maxSize);break;case"min":g=F._getErrorMessage(f,e,s[v],s,v,t,F._min);break;case"max":g=F._getErrorMessage(f,e,s[v],s,v,t,F._max);break;case"past":g=F._getErrorMessage(f,e,s[v],s,v,t,F._past);break;case"future":g=F._getErrorMessage(f,e,s[v],s,v,t,F._future);break;case"dateRange":h="["+t.validateAttribute+"*="+s[v+1]+"]";t.firstOfGroup=f.find(h).eq(0),t.secondOfGroup=f.find(h).eq(1),(t.firstOfGroup[0].value||t.secondOfGroup[0].value)&&(g=F._getErrorMessage(f,e,s[v],s,v,t,F._dateRange)),g&&(u=!0),t.showArrow=!1;break;case"dateTimeRange":h="["+t.validateAttribute+"*="+s[v+1]+"]";t.firstOfGroup=f.find(h).eq(0),t.secondOfGroup=f.find(h).eq(1),(t.firstOfGroup[0].value||t.secondOfGroup[0].value)&&(g=F._getErrorMessage(f,e,s[v],s,v,t,F._dateTimeRange)),g&&(u=!0),t.showArrow=!1;break;case"maxCheckbox":e=T(f.find("input[name='"+n+"']")),g=F._getErrorMessage(f,e,s[v],s,v,t,F._maxCheckbox);break;case"minCheckbox":e=T(f.find("input[name='"+n+"']")),g=F._getErrorMessage(f,e,s[v],s,v,t,F._minCheckbox);break;case"equals":g=F._getErrorMessage(f,e,s[v],s,v,t,F._equals);break;case"funcCall":g=F._getErrorMessage(f,e,s[v],s,v,t,F._funcCall);break;case"creditCard":g=F._getErrorMessage(f,e,s[v],s,v,t,F._creditCard);break;case"condRequired":void 0!==(g=F._getErrorMessage(f,e,s[v],s,v,t,F._condRequired))&&(u=!0);break;case"funcCallRequired":void 0!==(g=F._getErrorMessage(f,e,s[v],s,v,t,F._funcCallRequired))&&(u=!0)}var _=!1;if("object"==typeof g)switch(g.status){case"_break":_=!0;break;case"_error":g=g.message;break;case"_error_no_prompt":return!0}if(0==v&&0==o.indexOf("funcCallRequired")&&void 0!==g&&(""!=l&&(l+="<br/>"),l+=g,p++,_=t.isError=!0),_)break;"string"==typeof g&&(""!=l&&(l+="<br/>"),l+=g,t.isError=!0,p++)}!u&&!e.val()&&e.val().length<1&&T.inArray("equals",s)<0&&(t.isError=!1);var C=e.prop("type"),b=e.data("promptPosition")||t.promptPosition;("radio"==C||"checkbox"==C)&&1<f.find("input[name='"+n+"']").length&&(e=T("inline"===b?f.find("input[name='"+n+"'][type!=hidden]:last"):f.find("input[name='"+n+"'][type!=hidden]:first")),t.showArrow=t.showArrowOnRadioAndCheckbox),e.is(":hidden")&&t.prettySelect&&(e=f.find("#"+t.usePrefix+F._jqSelector(e.attr("id"))+t.useSuffix)),t.isError&&t.showPrompts?F._showPrompt(e,l,d,!1,t):F._closePrompt(e),e.trigger("jqv.field.result",[e,t.isError,l]);var E=T.inArray(e[0],t.InvalidFields);return-1==E?t.isError&&t.InvalidFields.push(e[0]):t.isError||t.InvalidFields.splice(E,1),F._handleStatusCssClasses(e,t),t.isError&&t.onFieldFailure&&t.onFieldFailure(e),!t.isError&&t.onFieldSuccess&&t.onFieldSuccess(e),t.isError},_handleStatusCssClasses:function(e,t){t.addSuccessCssClassToField&&e.removeClass(t.addSuccessCssClassToField),t.addFailureCssClassToField&&e.removeClass(t.addFailureCssClassToField),t.addSuccessCssClassToField&&!t.isError&&e.addClass(t.addSuccessCssClassToField),t.addFailureCssClassToField&&t.isError&&e.addClass(t.addFailureCssClassToField)},_getErrorMessage:function(e,t,a,r,i,o,s){var n=jQuery.inArray(a,r);"custom"!==a&&"funcCall"!==a&&"funcCallRequired"!==a||(a=a+"["+r[n+1]+"]",delete r[n]);var l,d=a,u=(t.attr("data-validation-engine")?t.attr("data-validation-engine"):t.attr("class")).split(" ");if(null!=(l="future"==a||"past"==a||"maxCheckbox"==a||"minCheckbox"==a?s(e,t,r,i,o):s(t,r,i,o))){var c=F._getCustomErrorMessage(T(t),u,d,o);c&&(l=c)}return l},_getCustomErrorMessage:function(e,t,a,r){var i=!1,o=/^custom\[.*\]$/.test(a)?F._validityProp.custom:F._validityProp[a];if(null!=o&&null!=(i=e.attr("data-errormessage-"+o)))return i;if(null!=(i=e.attr("data-errormessage")))return i;var s="#"+e.attr("id");if(void 0!==r.custom_error_messages[s]&&void 0!==r.custom_error_messages[s][a])i=r.custom_error_messages[s][a].message;else if(0<t.length)for(var n=0;n<t.length&&0<t.length;n++){var l="."+t[n];if(void 0!==r.custom_error_messages[l]&&void 0!==r.custom_error_messages[l][a]){i=r.custom_error_messages[l][a].message;break}}return i||void 0===r.custom_error_messages[a]||void 0===r.custom_error_messages[a].message||(i=r.custom_error_messages[a].message),i},_validityProp:{required:"value-missing",custom:"custom-error",groupRequired:"value-missing",ajax:"custom-error",minSize:"range-underflow",maxSize:"range-overflow",min:"range-underflow",max:"range-overflow",past:"type-mismatch",future:"type-mismatch",dateRange:"type-mismatch",dateTimeRange:"type-mismatch",maxCheckbox:"range-overflow",minCheckbox:"range-underflow",equals:"pattern-mismatch",funcCall:"custom-error",funcCallRequired:"custom-error",creditCard:"pattern-mismatch",condRequired:"value-missing"},_required:function(e,t,a,r,i){switch(e.prop("type")){case"radio":case"checkbox":if(i){if(!e.prop("checked"))return r.allrules[t[a]].alertTextCheckboxMultiple;break}var o=e.closest("form, .validationEngineContainer"),s=e.attr("name");if(0==o.find("input[name='"+s+"']:checked").length)return 1==o.find("input[name='"+s+"']:visible").length?r.allrules[t[a]].alertTextCheckboxe:r.allrules[t[a]].alertTextCheckboxMultiple;break;case"text":case"password":case"textarea":case"file":case"select-one":case"select-multiple":default:var n=T.trim(e.val()),l=T.trim(e.attr("data-validation-placeholder")),d=T.trim(e.attr("placeholder"));if(!n||l&&n==l||d&&n==d)return r.allrules[t[a]].alertText}},_groupRequired:function(e,t,a,r){var i="["+r.validateAttribute+"*="+t[a+1]+"]",o=!1;if(e.closest("form, .validationEngineContainer").find(i).each(function(){if(!F._required(T(this),t,a,r))return!(o=!0)}),!o)return r.allrules[t[a]].alertText},_custom:function(e,t,a,r){var i,o=t[a+1],s=r.allrules[o];if(s)if(s.regex){var n=s.regex;if(!n)return void alert("jqv:custom regex not found - "+o);if(!new RegExp(n).test(e.val()))return r.allrules[o].alertText}else{if(!s.func)return void alert("jqv:custom type not allowed "+o);if("function"!=typeof(i=s.func))return void alert("jqv:custom parameter 'function' is no function - "+o);if(!i(e,t,a,r))return r.allrules[o].alertText}else alert("jqv:custom rule not found - "+o)},_funcCall:function(e,t,a,r){var i,o=t[a+1];if(-1<o.indexOf(".")){for(var s=o.split("."),n=window;s.length;)n=n[s.shift()];i=n}else i=window[o]||r.customFunctions[o];if("function"==typeof i)return i(e,t,a,r)},_funcCallRequired:function(e,t,a,r){return F._funcCall(e,t,a,r)},_equals:function(e,t,a,r){var i=t[a+1];if(e.val()!=T("#"+i).val())return r.allrules.equals.alertText},_maxSize:function(e,t,a,r){var i=t[a+1];if(i<e.val().length){var o=r.allrules.maxSize;return o.alertText+i+o.alertText2}},_minSize:function(e,t,a,r){var i=t[a+1];if(e.val().length<i){var o=r.allrules.minSize;return o.alertText+i+o.alertText2}},_min:function(e,t,a,r){var i=parseFloat(t[a+1]);if(parseFloat(e.val())<i){var o=r.allrules.min;return o.alertText2?o.alertText+i+o.alertText2:o.alertText+i}},_max:function(e,t,a,r){var i=parseFloat(t[a+1]);
85if(i<parseFloat(e.val())){var o=r.allrules.max;return o.alertText2?o.alertText+i+o.alertText2:o.alertText+i}},_past:function(e,t,a,r,i){var o,s=a[r+1],n=T(e.find("*[name='"+s.replace(/^#+/,"")+"']"));if("now"==s.toLowerCase())o=new Date;else if(null!=n.val()){if(n.is(":disabled"))return;o=F._parseDate(n.val())}else o=F._parseDate(s);if(o<F._parseDate(t.val())){var l=i.allrules.past;return l.alertText2?l.alertText+F._dateToString(o)+l.alertText2:l.alertText+F._dateToString(o)}},_future:function(e,t,a,r,i){var o,s=a[r+1],n=T(e.find("*[name='"+s.replace(/^#+/,"")+"']"));if("now"==s.toLowerCase())o=new Date;else if(null!=n.val()){if(n.is(":disabled"))return;o=F._parseDate(n.val())}else o=F._parseDate(s);if(F._parseDate(t.val())<o){var l=i.allrules.future;return l.alertText2?l.alertText+F._dateToString(o)+l.alertText2:l.alertText+F._dateToString(o)}},_isDate:function(e){return new RegExp(/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/).test(e)},_isDateTime:function(e){return new RegExp(/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1}$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^((1[012]|0?[1-9]){1}\/(0?[1-9]|[12][0-9]|3[01]){1}\/\d{2,4}\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1})$/).test(e)},_dateCompare:function(e,t){return new Date(e.toString())<new Date(t.toString())},_dateRange:function(e,t,a,r){return!r.firstOfGroup[0].value&&r.secondOfGroup[0].value||r.firstOfGroup[0].value&&!r.secondOfGroup[0].value?r.allrules[t[a]].alertText+r.allrules[t[a]].alertText2:F._isDate(r.firstOfGroup[0].value)&&F._isDate(r.secondOfGroup[0].value)&&F._dateCompare(r.firstOfGroup[0].value,r.secondOfGroup[0].value)?void 0:r.allrules[t[a]].alertText+r.allrules[t[a]].alertText2},_dateTimeRange:function(e,t,a,r){return!r.firstOfGroup[0].value&&r.secondOfGroup[0].value||r.firstOfGroup[0].value&&!r.secondOfGroup[0].value?r.allrules[t[a]].alertText+r.allrules[t[a]].alertText2:F._isDateTime(r.firstOfGroup[0].value)&&F._isDateTime(r.secondOfGroup[0].value)&&F._dateCompare(r.firstOfGroup[0].value,r.secondOfGroup[0].value)?void 0:r.allrules[t[a]].alertText+r.allrules[t[a]].alertText2},_maxCheckbox:function(e,t,a,r,i){var o=a[r+1],s=t.attr("name");if(o<e.find("input[name='"+s+"']:checked").length)return i.showArrow=!1,i.allrules.maxCheckbox.alertText2?i.allrules.maxCheckbox.alertText+" "+o+" "+i.allrules.maxCheckbox.alertText2:i.allrules.maxCheckbox.alertText},_minCheckbox:function(e,t,a,r,i){var o=a[r+1],s=t.attr("name");if(e.find("input[name='"+s+"']:checked").length<o)return i.showArrow=!1,i.allrules.minCheckbox.alertText+" "+o+" "+i.allrules.minCheckbox.alertText2},_creditCard:function(e,t,a,r){var i=!1,o=e.val().replace(/ +/g,"").replace(/-+/g,""),s=o.length;if(14<=s&&s<=16&&0<parseInt(o)){for(var n,l=0,d=(a=s-1,1),u=new String;n=parseInt(o.charAt(a)),u+=d++%2==0?2*n:n,0<=--a;);for(a=0;a<u.length;a++)l+=parseInt(u.charAt(a));i=l%10==0}if(!i)return r.allrules.creditCard.alertText},_ajax:function(s,e,t,n){var a=e[t+1],l=n.allrules[a],r=l.extraData,i=l.extraDataDynamic,o={fieldId:s.attr("id"),fieldValue:s.val()};if("object"==typeof r)T.extend(o,r);else if("string"==typeof r){var d=r.split("&");for(t=0;t<d.length;t++){var u=d[t].split("=");u[0]&&u[0]&&(o[u[0]]=u[1])}}if(i){var c=String(i).split(",");for(t=0;t<c.length;t++){var f=c[t];if(T(f).length){var v=s.closest("form, .validationEngineContainer").find(f).val();f.replace("#",""),escape(v);o[f.replace("#","")]=v}}}if("field"==n.eventTrigger&&delete n.ajaxValidCache[s.attr("id")],!n.isError&&!F._checkAjaxFieldStatus(s.attr("id"),n))return T.ajax({type:n.ajaxFormValidationMethod,url:l.url,cache:!1,dataType:"json",data:o,field:s,rule:l,methods:F,options:n,beforeSend:function(){},error:function(e,t){n.onFailure?n.onFailure(e,t):F._ajaxError(e,t)},success:function(e){var t=e[0],a=T("#"+t).eq(0);if(1==a.length){var r=e[1],i=e[2];if(r){if(n.ajaxValidCache[t]=!0,i){if(n.allrules[i])(o=n.allrules[i].alertTextOk)&&(i=o)}else i=l.alertTextOk;n.showPrompts&&(i?F._showPrompt(a,i,"pass",!0,n):F._closePrompt(a)),"submit"==n.eventTrigger&&s.closest("form").submit()}else{var o;if(n.ajaxValidCache[t]=!1,n.isError=!0,i){if(n.allrules[i])(o=n.allrules[i].alertText)&&(i=o)}else i=l.alertText;n.showPrompts&&F._showPrompt(a,i,"",!0,n)}}a.trigger("jqv.field.result",[a,n.isError,i])}}),l.alertTextLoad},_ajaxError:function(e,t){0==e.status&&null==t?alert("The page is not served from a server! ajax call failed"):"undefined"!=typeof console&&console.log("Ajax error: "+e.status+" "+t)},_dateToString:function(e){return e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate()},_parseDate:function(e){var t=e.split("-");return t==e&&(t=e.split("/")),t==e?(t=e.split("."),new Date(t[2],t[1]-1,t[0])):new Date(t[0],t[1]-1,t[2])},_showPrompt:function(e,t,a,r,i,o){e.data("jqv-prompt-at")instanceof jQuery?e=e.data("jqv-prompt-at"):e.data("jqv-prompt-at")&&(e=T(e.data("jqv-prompt-at")));var s=F._getPrompt(e);o&&(s=!1),T.trim(t)&&(s?F._updatePrompt(e,s,t,a,r,i):F._buildPrompt(e,t,a,r,i))},_buildPrompt:function(e,t,a,r,i){var o=T("<div>");switch(o.addClass(F._getClassName(e.attr("id"))+"formError"),o.addClass("parentForm"+F._getClassName(e.closest("form, .validationEngineContainer").attr("id"))),o.addClass("formError"),a){case"pass":o.addClass("greenPopup");break;case"load":o.addClass("blackPopup")}r&&o.addClass("ajaxed");T("<div>").addClass("formErrorContent").html(t).appendTo(o);var s=e.data("promptPosition")||i.promptPosition;if(i.showArrow){var n=T("<div>").addClass("formErrorArrow");if("string"==typeof s)-1!=(u=s.indexOf(":"))&&(s=s.substring(0,u));switch(s){case"bottomLeft":case"bottomRight":o.find(".formErrorContent").before(n),n.addClass("formErrorArrowBottom").html('<div class="line1">\x3c!-- --\x3e</div><div class="line2">\x3c!-- --\x3e</div><div class="line3">\x3c!-- --\x3e</div><div class="line4">\x3c!-- --\x3e</div><div class="line5">\x3c!-- --\x3e</div><div class="line6">\x3c!-- --\x3e</div><div class="line7">\x3c!-- --\x3e</div><div class="line8">\x3c!-- --\x3e</div><div class="line9">\x3c!-- --\x3e</div><div class="line10">\x3c!-- --\x3e</div>');break;case"topLeft":case"topRight":n.html('<div class="line10">\x3c!-- --\x3e</div><div class="line9">\x3c!-- --\x3e</div><div class="line8">\x3c!-- --\x3e</div><div class="line7">\x3c!-- --\x3e</div><div class="line6">\x3c!-- --\x3e</div><div class="line5">\x3c!-- --\x3e</div><div class="line4">\x3c!-- --\x3e</div><div class="line3">\x3c!-- --\x3e</div><div class="line2">\x3c!-- --\x3e</div><div class="line1">\x3c!-- --\x3e</div>'),o.append(n)}}i.addPromptClass&&o.addClass(i.addPromptClass);var l=e.attr("data-required-class");if(void 0!==l)o.addClass(l);else if(i.prettySelect&&T("#"+e.attr("id")).next().is("select")){var d=T("#"+e.attr("id").substr(i.usePrefix.length).substring(i.useSuffix.length)).attr("data-required-class");void 0!==d&&o.addClass(d)}o.css({opacity:0}
85),"inline"===s?(o.addClass("inline"),void 0!==e.attr("data-prompt-target")&&0<T("#"+e.attr("data-prompt-target")).length?o.appendTo(T("#"+e.attr("data-prompt-target"))):e.after(o)):e.before(o);var u=F._calculatePosition(e,o,i);return T("body").hasClass("rtl")?o.css({position:"inline"===s?"relative":"absolute",top:u.callerTopPosition,left:"initial",right:u.callerleftPosition,marginTop:u.marginTopSize,opacity:0}).data("callerField",e):o.css({position:"inline"===s?"relative":"absolute",top:u.callerTopPosition,left:u.callerleftPosition,right:"initial",marginTop:u.marginTopSize,opacity:0}).data("callerField",e),i.autoHidePrompt&&setTimeout(function(){o.animate({opacity:0},function(){o.closest(".formError").remove()})},i.autoHideDelay),o.animate({opacity:.87})},_updatePrompt:function(e,t,a,r,i,o,s){if(t){void 0!==r&&("pass"==r?t.addClass("greenPopup"):t.removeClass("greenPopup"),"load"==r?t.addClass("blackPopup"):t.removeClass("blackPopup")),i?t.addClass("ajaxed"):t.removeClass("ajaxed"),t.find(".formErrorContent").html(a);var n=F._calculatePosition(e,t,o);if(T("body").hasClass("rtl"))var l={top:n.callerTopPosition,left:"initial",right:n.callerleftPosition,marginTop:n.marginTopSize,opacity:.87};else l={top:n.callerTopPosition,left:n.callerleftPosition,right:"initial",marginTop:n.marginTopSize,opacity:.87};t.css({opacity:0,display:"block"}),s?t.css(l):t.animate(l)}},_closePrompt:function(e){var t=F._getPrompt(e);t&&t.fadeTo("fast",0,function(){t.closest(".formError").remove()})},closePrompt:function(e){return F._closePrompt(e)},_getPrompt:function(e){var t=T(e).closest("form, .validationEngineContainer").attr("id"),a=F._getClassName(e.attr("id"))+"formError",r=T("."+F._escapeExpression(a)+".parentForm"+F._getClassName(t))[0];if(r)return T(r)},_escapeExpression:function(e){return e.replace(/([#;&,\.\+\*\~':"\!\^$\[\]\(\)=>\|])/g,"\\$1")},isRTL:function(e){var t=T(document),a=T("body"),r=e&&e.hasClass("rtl")||e&&"rtl"===(e.attr("dir")||"").toLowerCase()||t.hasClass("rtl")||"rtl"===(t.attr("dir")||"").toLowerCase()||a.hasClass("rtl")||"rtl"===(a.attr("dir")||"").toLowerCase();return Boolean(r)},_calculatePosition:function(e,t,a){var r,i,o,s=e.width(),n=e.position().left,l=e.position().top;e.height();r=i=0,o=-t.height();var d=e.data("promptPosition")||a.promptPosition,u="",c="",f=0,v=0;switch("string"==typeof d&&-1!=d.indexOf(":")&&(u=d.substring(d.indexOf(":")+1),d=d.substring(0,d.indexOf(":")),-1!=u.indexOf(",")&&(c=u.substring(u.indexOf(",")+1),u=u.substring(0,u.indexOf(",")),v=parseInt(c),isNaN(v)&&(v=0)),f=parseInt(u),isNaN(u)&&(u=0)),d){default:case"topRight":i+=n+s-27,r+=l;break;case"topLeft":r+=l,i+=n;break;case"centerRight":r=l+4,o=0,i=n+e.outerWidth(!0)+5;break;case"centerLeft":i=n-(t.width()+2),r=l+4,o=0;break;case"bottomLeft":r=l+e.height()+5,o=0,i=n;break;case"bottomRight":i=n+s-27,r=l+e.height()+5,o=0;break;case"inline":o=r=i=0}return{callerTopPosition:(r+=v)+"px",callerleftPosition:(i+=f)+"px",marginTopSize:o+"px"}},_saveOptions:function(e,t){if(T.validationEngineLanguage)var a=T.validationEngineLanguage.allRules;else T.error("jQuery.validationEngine rules are not loaded, plz add localization files to the page");T.validationEngine.defaults.allrules=a;var r=T.extend(!0,{},T.validationEngine.defaults,t);return e.data("jqv",r),r},_getClassName:function(e){if(e)return e.replace(/:/g,"_").replace(/\./g,"_")},_jqSelector:function(e){return e.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1")},_condRequired:function(e,t,a,r){var i,o;for(i=a+1;i<t.length;i++)if((o=jQuery("#"+t[i]).first()).length&&null==F._required(o,["required"],0,r,!0))return F._required(e,["required"],0,r)},_submitButtonClick:function(e){var t=T(this);t.closest("form, .validationEngineContainer").data("jqv_submitButton",t.attr("id"))}};T.fn.validationEngine=function(e){var t=T(this);return t[0]?"string"==typeof e&&"_"!=e.charAt(0)&&F[e]?("showPrompt"!=e&&"hide"!=e&&"hideAll"!=e&&F.init.apply(t),F[e].apply(t,Array.prototype.slice.call(arguments,1))):"object"!=typeof e&&e?void T.error("Method "+e+" does not exist in jQuery.validationEngine"):(F.init.apply(t,arguments),F.attach.apply(t)):t},T.validationEngine={fieldIdCounter:0,defaults:{validationEventTrigger:"blur",scroll:!0,focusFirstField:!0,showPrompts:!0,validateNonVisibleFields:!1,ignoreFieldsWithClass:"ignoreMe",promptPosition:"topRight",bindMethod:"bind",inlineAjax:!1,ajaxFormValidation:!1,ajaxFormValidationURL:!1,ajaxFormValidationMethod:"get",onAjaxFormComplete:T.noop,onBeforeAjaxFormValidation:T.noop,onValidationComplete:!1,doNotShowAllErrosOnSubmit:!1,custom_error_messages:{},binded:!0,notEmpty:!1,showArrow:!0,showArrowOnRadioAndCheckbox:!1,isError:!1,maxErrorsPerField:!1,ajaxValidCache:{},autoPositionUpdate:!1,InvalidFields:[],onFieldSuccess:!1,onFieldFailure:!1,onSuccess:!1,onFailure:!1,validateAttribute:"class",addSuccessCssClassToField:"",addFailureCssClassToField:"",autoHidePrompt:!1,autoHideDelay:1e4,fadeDuration:300,prettySelect:!1,addPromptClass:"",usePrefix:"",useSuffix:"",showOneMessage:!1}},T(function(){T.validationEngine.defaults.promptPosition=F.isRTL()?"topLeft":"topRight"})}(jQuery);;
86/* AUTOGENERATED: custom.validationEngine.js */
87(function(a){a.validationEngineLanguage.allRules.onlySmallLetterNumberUnder={regex:/^[a-z][0-9a-z_]+$/,alertText:"* Only small letter, digits and undescore sign are allowed"};a.validationEngineLanguage.allRules.modifier={regex:/^[\-\+]{1}([0-9]+)([\.,]([0-9]+))?([%]{1})?$/,alertText:"* Wrong format"};a.validationEngineLanguage.allRules.numberWithInfinity={regex:/^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+)|\u221e)?([\.]([0-9]+))?$/,alertText:"* Wrong format"};a.validationEngineLanguage.allRules.integerWithInfinity=
88  {regex:/^[\-\+]?(\d+|\u221e)$/,alertText:"* Not a valid integer"};a.validationEngineLanguage.allRules.url={regex:/^[a-z](?:[-a-z0-9\+\.])*:(?:\/\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;
88=:])*@)?(?:\[(?:(?:(?:[0-9a-f]{1,4}:){6}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|::(?:[0-9a-f]{1,4}:){5}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4}:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|v[0-9a-f]+[-a-z0-9\._~!\$&'\(\)\*\+,;=:]+)\]|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}|(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;=@])*)(?::[0-9]*)?(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;=:@]))*)*|\/(?:(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;=:@]))+)(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;=:@]))*)*)?|(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;=:@]))+)(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;=:@]))*)*|(?!(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;=:@])))(?:\?(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF!\$&'\(\)\*\+,;=:@])|[\/\?])*)?$/i,
89  alertText:"* Invalid URL"};a.validationEngineLanguage.allRules.phone={regex:/^([\+]?[\d]{1,3})?(?:\s*[ \(]([\d]{2,6})[ \)])?\s*([\d \.\-\/]{3,20})\s*(?:x|ext|extension|,)?\s*([\d]{1,4})?$/,alertText:"* Wrong number format"};a.validationEngineLanguage.allRules.email={func:function(field,rules,i,options){field.val(a.trim(field.val()));var customRule=rules[i+1];var rule=options.allrules[customRule];var pattern=new RegExp(rule.regex_old);return pattern.test(field.val())}
vendor: 4,183 bytes, lines 89-129
89,regex:null,regex_old:a.validationEngineLanguage.allRules.email.regex,alertText:a.validationEngineLanguage.allRules.email.alertText}})(jQuery);;
90/* AUTOGENERATED: jquery.mousewheel.min.js */
91/*!
92 * jQuery Mousewheel 3.1.13
93 *
94 * Copyright 2015 jQuery Foundation and other contributors
95 * Released under the MIT license.
96 * http://jquery.org/license
97 */
98!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});;
99/* AUTOGENERATED: regex-mask-plugin.js */
100/* vim: set ts=2 sw=2 sts=2 et: */
101
102/**
103 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
104 * See https://www.x-cart.com/license-agreement.html for license details.
105 */
106
107(function ($){
108    $.fn.regexMask = function (mask) {
109        if (!mask) {
110            throw 'mandatory mask argument missing';
111        } else if (mask == 'float-ptbr') {
112            mask = /^((\d{1,3}(\.\d{3})*(((\.\d{0,2}))|((\,\d*)?)))|(\d+(\,\d*)?))$/;
113        } else if (mask == 'float-enus') {
114            mask = /^((\d{1,3}(\,\d{3})*(((\,\d{0,2}))|((\.\d*)?)))|(\d+(\.\d*)?))$/;
115        } else if (mask == 'integer') {
116            mask = /^\d+$/;
117        } else {
118            try {
119                mask.test("");
120            } catch(e) {
121                throw 'mask regex need to support test method';
122            }
123        }
124        $(this).keypress(function (event) {
125            if (!event.charCode) return true;
126            var part1 = this.value.substring(0,this.selectionStart);
127            var part2 = this.value.substring(this.selectionEnd,this.value.length);
128            if (!mask.test(part1 + String.fromCharCode(event.charCode) + part2))
129                return false;
130        });
131    };
132})(jQuery);;
133/* AUTOGENERATED: common.js */
134/* vim: set ts=2 sw=2 sts=2 et: */
135
136/**
137 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
138 * See https://www.x-cart.com/license-agreement.html for license details.
139 */
140
141var URLHandler = {
142
143  excluded: {
144    'base': true
145  },
146  baseURLPart: '',
147  querySeparator: '?',
148  argSeparator: '&',
149  nameValueSeparator: '=',
150
151  // Return query param
152  getParamValue: function (name, params) {
153    return name
154      + this.nameValueSeparator
155      + encodeURIComponent(typeof params[name] === 'boolean' ? Number(params[name]) : params[name]);
156  },
157
158  // Get param value for the remained params
159  getQueryParamValue: function (name, params) {
160    return URLHandler.getParamValue(name, params);
161  },
162
163  // Build HTTP query
164  implodeParams: function (params, method) {
165    result = '';
166    isStarted = false;
167
168    for (x in params) {
169
170      if (isStarted) {
171        result += this.argSeparator;
172      } else {
173        isStarted = true;
174      }
175
176      result += method(x, params);
177    }
178
179    return result;
180  },
181
182  // Implode remained params
183  implodeQueryParams: function (params) {
184    return this.implodeParams(params, this.getQueryParamValue);
185  },
186
187  // Unset some params
188  clearParams: function (params, excluded) {
189    // clone object
190    var result = {};
191
192    for (key in params) {
193      if (params[key] !== undefined && params[key] !== null && !(key in excluded)) {
194        result[key] = params[key];
195      }
196    }
197
198    return result;
199  },
200
201  preprocessParams: function (params) {
202    return this.clearParams(params, this.excluded);
203  },
204
205  // Get base url
206  buildBaseUrl: function (params) {
207    var base = params.base || this.baseURLPart;
208
209    if (xliteConfig.clean_url && base === xliteConfig.clean_urls_base) {
210      return '';
211    }
212
213    return params.base || this.baseURLPart;
214  },
215
216  // Compose query params
217  buildQueryParams: function (params) {
218    return this.querySeparator + this.implodeQueryParams(this.preprocessParams(params));
219  },
220
221  getBuildURLPrefix: function (params) {
222    return xliteConfig.ajax_prefix && !(params && params.base === xliteConfig.admin_script)
223      ? (xliteConfig.ajax_prefix + '/')
224      : '';
225  },
226
227  // Compose URL
228  buildURL: function (params) {
229    return this.getBuildURLPrefix(params) + this.buildBaseUrl(params) + this.buildQueryParams(params);
230  }
231};
232
233// Dialog
234
235// Abstract open dialog
236function openDialog(selector, additionalOptions) {
237  additionalOptions = additionalOptions || {};
238
239  var box = jQuery(selector);
240
241  _.each(
242    ['h2', 'h1'],
243    function (tag) {
244      var elm = box.find(tag);
245      if ('undefined' == typeof(additionalOptions.title) || !additionalOptions.title) {
246        additionalOptions.title = elm.html();
247      }
248      elm.remove();
249    }
250  );
251
252  popup.isLoading = false;
253  return popup.open(jQuery(selector), additionalOptions);
254}
255
256// Loadable dialog
257function loadDialog(url, dialogOptions, callback, link, $this) {
258  openWaitBar();
259
260  var selector = 'tmp-dialog-' + (new Date()).getTime() + '-' + jQuery(link).attr('class').toString().replace(/[ \.]/g, '-');
261
262  xcart.get(
263    url,
264    function (xhr, status, data) {
265      if (data) {
266        var div = jQuery(document.body.appendChild(document.createElement('div'))).hide();
267
268        var uuid = _.uniqueId();
269
270        xcart.bind(['resources.ready', 'resources.empty'], _.bind(
271          function (event, args) {
272            if (args.uuid === uuid) {
273              if (1 == div.get(0).childNodes.length) {
274                div = jQuery(div.get(0).childNodes[0]);
275              }
276
277              // Specific CSS class to manage this specific popup window
278              div.addClass(selector);
279
280              // Every popup window (even hidden one) has this one defined CSS class.
281              // You should use this selector to manage any popup window entry.
282              div.addClass('popup-window-entry');
283
284              openDialog('.' + selector, dialogOptions);
285
286              if (callback) {
287                callback.call($this, '.' + selector, link);
288              }
289            }
290          },
291          this)
292        );
293
294        div.html(jQuery.trim(data));
295
296        xcart.parsePreloadedLabels(div, uuid);
297        xcart.parseResources(div, uuid);
298      }
299    }
300  );
301
302  return '.' + selector;
303}
304
305// Load dialog by link
306function loadDialogByLink(link, url, options, callback, $this) {
307  if (!link.linkedDialog || 0 == jQuery(link.linkedDialog).length || jQuery(link).hasClass('always-reload')) {
308    link.linkedDialog = loadDialog(url, options, callback, link, $this);
309
310  } else {
311    openDialog(link.linkedDialog, options, callback);
312  }
313}
314
315function openWaitBar() {
316  popup.openAsWait();
317}
318
319function closeWaitBar() {
320  popup.close();
321}
322
323// Check for the AJAX support
324function hasAJAXSupport() {
325  if (typeof(window.ajaxSupport) == 'undefined') {
326    window.ajaxSupport = false;
327    try {
328
329      var xhr = window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest();
330      window.ajaxSupport = xhr ? true : false;
331
332    } catch (e) {
333    }
334  }
335
336  return window.ajaxSupport;
337}
338
339// Check list of checkboxes
340function checkMarks(form, reg, lbl) {
341  var is_exist = false;
342
343  if (!form || form.elements.length == 0)
344    return true;
345
346  for (var x = 0; x < form.elements.length; x++) {
347    if (
348      form.elements[x].type == 'checkbox'
349      && form.elements[x].name.search(reg) == 0
350      && !form.elements[x].disabled
351    ) {
352      is_exist = true;
353
354      if (form.elements[x].checked)
355        return true;
356    }
357  }
358
359  if (!is_exist)
360    return true;
361
362  if (lbl) {
363    alert(lbl);
364
365  } else if (lbl_no_items_have_been_selected) {
366    alert(lbl_no_items_have_been_selected);
367
368  }
369
370  return false;
371}
372
373/*
374 Parameters:
375 checkboxes       - array of tag names
376 checkboxes_form    - form name with these checkboxes
377 */
378function change_all(flag, formname, arr) {
379  if (!formname)
380    formname = checkboxes_form;
381  if (!arr)
382    arr = checkboxes;
383  if (!document.forms[formname] || arr.length == 0)
384    return false;
385  for (var x = 0; x < arr.length; x++) {
386    if (arr[x] != '' && document.forms[formname].elements[arr[x]] && !document.forms[formname].elements[arr[x]].disabled) {
387      document.forms[formname].elements[arr[x]].checked = flag;
388      if (document.forms[formname].elements[arr[x]].onclick)
389        document.forms[formname].elements[arr[x]].onclick();
390    }
391  }
392}
393
394function checkAll(flag, form, prefix) {
395  if (!form) {
396    return;
397  }
398
399  if (prefix) {
400    var reg = new RegExp('^' + prefix, '');
401  }
402  for (var i = 0; i < form.elements.length; i++) {
403    if (
404      form.elements[i].type == "checkbox"
405      && (!prefix || form.elements[i].name.search(reg) == 0)
406      && !form.elements[i].disabled
407    ) {
408      form.elements[i].checked = flag;
409    }
410  }
411}
412
413/*
414 Opener/Closer HTML block
415 */
416function visibleBox(id, skipOpenClose) {
417  var elm1 = document.getElementById('open' + id);
418  var elm2 = document.getElementById('close' + id);
419  var elm3 = document.getElementById('box' + id);
420
421  if (!elm3) {
422    return false;
423  }
424
425  if (skipOpenClose) {
426    elm3.style.display = (elm3.style.display == '') ? 'none' : '';
427
428  } else if (elm1) {
429    if (elm1.style.display == '') {
430      elm1.style.display = 'none';
431
432      if (elm2) {
433        elm2.style.display = '';
434      }
435
436      elm3.style.display = 'none';
437      jQuery('.DialogBox').css('height', '1%');
438
439    } else {
440      elm1.style.display = '';
441      if (elm2) {
442        elm2.style.display = 'none';
443      }
444
445      elm3.style.display = '';
446    }
447  }
448
449  return true;
450}
451
452/**
453 * Attach tooltip to some element on hover action
454 */
455function attachTooltip(elm, content, forcePlacement, ttl) {
456  var placement = 'right';
457
458  elm = jQuery(elm);
459
460  if (
461    elm.length
462    && (
463      (jQuery(window).width() - elm.offset().left) < 200
464      || (
465        elm.parents('.ui-dialog').length
466        && (elm.parents('.ui-dialog').offset().left + elm.parents('.ui-dialog').width() - elm.offset().left) < 200
467      )
468    )
469  ) {
470    placement = 'left';
471  }
472  placement = forcePlacement || placement;
473
474  jQuery(elm).each(
475    function () {
476      if (isBootstrapUse()) {
477
478        if ('undefined' == typeof(this.tooltipAssigned) || !this.tooltipAssigned) {
479
480          var to;
481          var obj = jQuery(this);
482          if (undefined === ttl) {
483            ttl = 500;
484          }
485          ;
486
487          var options = {
488            html: true,
489            title: content,
490            placement: placement,
491            trigger: 'manual'
492          };
493
494          if (elm.data('container')) {
495            options['container'] = elm.data('container');
496          } else if (elm.parents('.ui-dialog').length > 0) {
497            options['container'] = '.ui-dialog';
498          }
499          ;
500          obj.tooltip(options);
501
502          obj.mouseover(
503            function () {
504              if (to) {
505                clearTimeout(to);
506                to = null;
507              }
508              if (!obj.next('.tooltip').length) {
509                jQuery(this).tooltip('show');
510              }
511            }
512          );
513
514          obj.mouseout(
515            function () {
516              to = setTimeout(
517                function () {
518                  obj.tooltip('hide');
519                },
520                ttl
521              );
522            }
523          );
524
525          obj.on(
526            'shown.bs.tooltip',
527            function (event) {
528              var next = jQuery(event.currentTarget).next();
529              if ('undefined' == typeof(next.get(0).tooltipAssigned) || !next.get(0).tooltipAssigned) {
530                next
531                  .mouseover(function () {
532                    obj.mouseover();
533                  })
534                  .mouseout(function () {
535                    obj.mouseout();
536                  });
537                next.get(0).tooltipAssigned = true;
538              }
539            }
540          );
541
542          this.tooltipAssigned = true;
543
544        }
545
546      } else {
547        jQuery(this).tooltip({
548          items: this,
549          'content': content
550        });
551
552      }
553
554      jQuery(document).on('click', '.tooltip-main .tooltip', function (evt) {
555        return false;
556      });
557
558      jQuery(document).on('click', '.tooltip-main .tooltip a', function (evt) {
559        evt.stopPropagation();
560      });
561    }
562  );
563}
564
565/**
566 * Wait overlay
567 */
568
569function assignWaitOverlay(elem) {
570  return createOverlay(elem, 'wait');
571}
572
573function unassignWaitOverlay(elem, force) {
574  return removeOverlay(elem, force);
575}
576
577/**
578 * Shade overlay
579 */
580
581function assignShadeOverlay(elem) {
582  return createOverlay(elem, 'shade');
583}
584
585function unassignShadeOverlay(elem, force) {
586  return removeOverlay(elem, force);
587}
588
589var overlayRegistry = {};
590var overlayAttr = 'data-overlay-id';
591
592function getOverlaySelector (elem) {
593  return elem.attr(overlayAttr) || generateOverlayId();
594}
595
596function generateOverlayId() {
597  do {
598    var pattern = 'overlay-' + Math.round(Math.random() * 1000000);
599    var isUnique = $('[' + overlayAttr + '=' + pattern + ']').length === 0;
600  } while (!isUnique);
601
602  return pattern;
603}
604
605function createOverlay(elem, type) {
606  type = type || 'wait';
607  var pattern = getOverlaySelector(elem);
608
609  $.each(elem, function() {
610    var elem = $(this);
611
612    if (!_.isUndefined(this.overlay) && this.overlay) {
613      unassignWaitOverlay(elem);
614    }
615
616    var overlayElement = null;
617    if (type === 'wait') {
618      overlayElement = jQuery('<div class="wait-block-overlay"><div class="wait-block"><div></div></div></div>');
619    } else {
620      overlayElement = jQuery('<div class="shade-block-overlay"></div>');
621    }
622
623    overlayElement.css({
624      width: elem.outerWidth() + 'px',
625      height: elem.outerHeight() + 'px'
626    });
627
628    // We do not show the overlay if the element has zero width or height (the element is not visible)
629    if (0 !== elem.outerWidth() && 0 !== elem.outerHeight()) {
630      elem.prepend(overlayElement)
631    }
632
633    var leftOffset = elem.offset().left - overlayElement.offset().left;
634    var topOffset = elem.offset().top - overlayElement.offset().top;
635    overlayElement.css('margin-left', leftOffset + 'px');
636    overlayElement.css('margin-top', topOffset + 'px');
637
638    overlayElement.attr('id', pattern);
639    elem.attr(overlayAttr, pattern);
640    overlayRegistry[pattern] = overlayElement;
641    this.overlay = overlayElement;
642
643    elem.trigger('assignOverlay', {widget: elem, type: type});
644  });
645
646  return $('#' + pattern);
647}
648
649function removeOverlay(elem, force) {
650  var pattern = getOverlaySelector(elem);
651
652  $.each(elem, function() {
653    var elem = $(this);
654
655    var overlay = null;
656    if (pattern && typeof overlayRegistry[pattern] !== "undefined") {
657      overlay = overlayRegistry[pattern];
658    } else if (force) {
659      overlay = $('.wait-block-overlay, .shade-block-overlay');
660    }
661
662    if (overlay) {
663      overlay.remove();
664      elem.attr(overlayAttr, null);
665      elem.trigger('unassignOverlay', {widget: elem});
666      this.overlay = null;
667    }
668  });
669}
670
671function isBootstrapUse() {
672  return 'undefined' != typeof(jQuery.fn.modal)
673    && _.isFunction(jQuery.fn.modal);
674}
675
676/**
677 * State widget specific objects and methods (used in select_country.js )
678 */
679
680var StatesList = (function () {
681  var instance;
682
683  function createInstance() {
684    function StatesListProto() {
685    }
686
687    extend(StatesListProto, Object);
688
689    StatesListProto.states = [];
690    StatesListProto.stateSelectors = [];
691    StatesListProto.forceCustomState = false;
692    StatesListProto.forceCustomStateCountries = [];
693
694    StatesListProto.prototype.addStates = function (states) {
695      StatesListProto.states = array_merge(this.states, states);
696      return this;
697    };
698
699    StatesListProto.prototype.getStates = function (country) {
700      return StatesListProto.states[country];
701    };
702
703    StatesListProto.prototype.getAllStates = function () {
704      return StatesListProto.states;
705    };
706
707    StatesListProto.prototype.getStatesArray = function (country) {
708      var extractStates = function (state) {
709        if (state instanceof Object) {
710          if (!_.isUndefined(state.name)) {
711            return [state.name];
712          }
713
714          var result = [];
715
716          if (state instanceof Array) {
717            state.map(function (v) {
718              result = result.concat(extractStates(v));
719            });
720          } else {
721            Object.keys(state).forEach(function (key) {
722              result = result.concat(extractStates(state[key]));
723            });
724          }
725
726          return result.sort(function (a, b) {
727            return a.toLowerCase().localeCompare(b.toLowerCase());
728          });
729        }
730
731        return [];
732      };
733
734      return extractStates(this.getStates(country));
735    };
736
737    StatesListProto.prototype.addStateSelector = function (fieldId, stateSelector) {
738      StatesListProto.stateSelectors[fieldId] = stateSelector;
739      return this;
740    };
741
742    StatesListProto.prototype.getStateSelectors = function () {
743      return StatesListProto.stateSelectors;
744    };
745
746    StatesListProto.prototype.isForceCustomState = function (country) {
747      return StatesListProto.forceCustomState
748        || StatesListProto.forceCustomStateCountries.indexOf(country) != -1;
749    };
750
751    StatesListProto.prototype.updateStatesList = function (base) {
752      var _stateSelectors, _forceCustomState, o = this;
753
754      base = base || document;
755
756      if (!jQuery('.country-selector', base).length) {
757        o.addStates(window.statesList);
758      } else {
759        jQuery('.country-selector', base).each(function (index, elem) {
760          o.addStates(xcart.getCommentedData(elem, 'statesList'));
761          _forceCustomState = xcart.getCommentedData(elem, 'forceCustomState');
762          _stateSelectors = xcart.getCommentedData(elem, 'stateSelectors');
763
764          if (_forceCustomState instanceof Array) {
765            if (_forceCustomState.indexOf('All') != -1) {
766              StatesListProto.forceCustomState = true;
767              _forceCustomState.splice(_forceCustomState.indexOf('All'), 1);
768            }
769
770            StatesListProto.forceCustomStateCountries = array_merge(
771              StatesListProto.forceCustomStateCountries,
772              _forceCustomState
773            );
774          }
775
776          if (_stateSelectors) {
777            o.addStateSelector(_stateSelectors.fieldId, new StateSelector(
778              _stateSelectors.fieldId,
779              _stateSelectors.stateSelectorId,
780              _stateSelectors.stateInputId
781            ));
782          }
783        });
784      }
785    };
786
787    return new StatesListProto;
788  }
789
790  return {
791    getInstance: function () {
792      if (!instance) {
793        instance = createInstance();
794
795        instance.updateStatesList();
796      }
797      return instance;
798    }
799  };
800})();
801
802function setPriceElement(element, value, e) {
803  e = e || 2;
804
805  var str = xcart.numberToString(value, '.', '', e);
806  var parts = str.split('.');
807
808  // Sign
809  if (!element.find('.part-sign').length) {
810    if (!element.find('.part-prefix').length) {
811      element.find('.part-integer').before('<span class="part-sign"></span>');
812
813    } else {
814      element.find('.part-prefix').before('<span class="part-sign"></span>');
815    }
816  }
817  if (value >= 0) {
818    element.find('.part-sign').html('');
819
820  } else {
821    element.find('.part-sign').html('&minus;&#8197;');
822  }
823
824  element.find('.part-integer').html(Math.abs(parseInt(parts[0])));
825  if (parts[1]) {
826    element.find('.part-decimal').html(parts[1]);
827
828  } else {
829    element.find('.part-decimal').html('');
830  }
831}
832
833function CacheEngine() {
834  this.cache = [];
835}
836
837CacheEngine.prototype.add = function (key, value) {
838  var updated = false;
839
840  for (var i = 0; i < this.cache.length; i++) {
841    if (this.cache[i].key === key) {
842      updated = true;
843      this.cache[i].value = value;
844
845      break;
846    }
847  }
848
849  if (!updated) {
850    this.cache.push({key: key, value: value});
851  }
852};
853
854CacheEngine.prototype.get = function (key) {
855  for (var i = 0; i < this.cache.length; i++) {
856    if (this.cache[i].key === key) {
857      return this.cache[i].value;
858    }
859  }
860};
861
862CacheEngine.prototype.has = function (key) {
863  for (var i = 0; i < this.cache.length; i++) {
864    if (this.cache[i].key === key) {
865      return true;
866    }
867  }
868};
869
870CacheEngine.prototype.remove = function (key) {
871  var index = null;
872
873  for (var i = 0; i < this.cache.length; i++) {
874    if (this.cache[i].key === key) {
875      index = i;
876
877      break;
878    }
879  }
880
881  this.cache.splice(index, 1);
882};
883
884CacheEngine.prototype.clear = function () {
885  this.cache = [];
886};
887
888function getPasswordDifficulty(password) {
889  var digits = new RegExp('\\d');
890
891  var lowerLetters, upperLetters, specials;
892  try {
893    lowerLetters = new RegExp('\\p{Ll}', 'u');
894    upperLetters = new RegExp('\\p{Lu}', 'u');
895    specials = new RegExp('[^\\d\\p{L}]', 'u');
896  } catch (e) {
897    console.log("Current browser doesn't support regular expressions with unicode");
898    lowerLetters = new RegExp('[a-z]');
899    upperLetters = new RegExp('[A-Z]');
900    specials = new RegExp('[^A-Za-z\\d]');
901  }
902
903  var rating = 0;
904  [digits, lowerLetters, upperLetters, specials].forEach(function(item) {
905    if (item.test(password)) {
906      rating++;
907    }
908  });
909
910  if (password.length >= 6) {
911    rating++;
912  }
913
914  if (rating < 3) {
915    return 'Weak password';
916  }
917
918  return (rating < 4) ? 'Good password' : 'Strong password';
919}
920
921function showPasswordDifficultyMessage(elem, difficulty) {
922  elem.html(xcart.t(difficulty));
923}
924
925function setPasswordDifficultyColor(elem, difficulty) {
926  if (difficulty == 'Weak password') {
927    elem.css("color", "#D4142C");
928  } else if (difficulty == 'Good password') {
929    elem.css("color", "#A66908");
930  } else if (difficulty == 'Strong password') {
931    elem.css("color", "#598103");
932  }
933}
934
935function smartTrim(string, maxLength) {
936  if (string.length <= maxLength) {
937    return string;
938  }
939
940  if (maxLength == 1) {
941    return string.substring(0,1) + '...';
942  }
943
944  const midpoint = Math.ceil(string.length / 2);
945  const toremove = string.length - maxLength;
946  const lstrip = Math.ceil(toremove/2);
947  const rstrip = toremove - lstrip;
948
949  return string.substring(0, midpoint-lstrip) + '...'
950    + string.substring(midpoint+rstrip);
951};
952
953jQuery(document).ready(
954  function () {
955    var isIE11 = !!navigator.userAgent.match(/Trident.*rv[ :]*11\./);
956
957    if (isIE11) {
958      jQuery('body').addClass('ie11');
959    }
960
961    // Open warning popup
962    xcart.microhandlers.add(
963      'OverlayHeightResize',
964      '>*:first',
965      function (event) {
966        jQuery('.ui-widget-overlay').css('height', jQuery(document).height());
967        jQuery('.ui-widget-overlay').css('width', jQuery('body').innerWidth());
968      }
969    );
970
971    xcart.microhandlers.add(
972      'PopupModelButtonWidthFix',
973      '.model-form-buttons',
974      function (event) {
975        jQuery('.ajax-container-loadable .model-form-buttons')
976          .each(function (index, elem) {
977            jQuery('.button', elem).width(jQuery(elem).width());
978          });
979      }
980    );
981
982    xcart.microhandlers.add(
983      'promo-close',
984      '.promo-block .close',
985      function (event) {
986        $(this).click(function () {
987          var block = jQuery(this).parents('.promo-block').get(0);
988          var blockId = jQuery(block).data('promo-id');
989          if (0 < blockId.length) {
990            blockId = blockId + 'PromoBlock';
991            document.cookie = blockId + '=1';
992          }
993          jQuery(block).hide();
994        });
995      }
996    );
997
998    xcart.microhandlers.add(
999      'promo-close-2',
1000      '.promo-block-close',
1001      function (event) {
1002        $(this).click(function () {
1003          var blockSelector = jQuery(this).data('promo-selector');
1004          var block = null;
1005
1006          if (blockSelector) {
1007            block = jQuery(blockSelector);
1008          } else {
1009            block = jQuery(this).parents('.promo-block').get(0)
1010          }
1011
1012          var blockId = jQuery(block).data('promo-id');
1013          if (0 < blockId.length) {
1014            blockId = blockId + 'PromoBlock';
1015            document.cookie = blockId + '=1';
1016          }
1017          jQuery(block).hide();
1018        });
1019      }
1020    );
1021
1022    xcart.microhandlers.add(
1023      'promo-close-2',
1024      'input.column-selector',
1025      function (event) {
1026        $(this).click(function () {
1027          if (!this.columnSelectors) {
1028            var idx = jQuery(this).parents('th').get(0).cellIndex;
1029            var table = jQuery(this).parents('table').get(0);
1030            this.columnSelectors = jQuery('tr', table)
1031              .find('td')
1032              .eq(idx)
1033              .find(':checkbox');
1034          }
1035
1036          this.columnSelectors.prop('checked', this.checked ? 'checked' : '');
1037        });
1038      }
1039    );
1040
1041    xcart.microhandlers.add(
1042      'input-file',
1043      'input.inputfile',
1044      function (event) {
1045        $(this).change(function () {
1046          if (this.files) {
1047            var filename = '';
1048            if (this.files.length > 1) {
1049              filename = this.files.length + " files selected";
1050            } else {
1051              filename = this.files[0].name;
1052            }
1053
1054            const filenameElement = $(this).siblings('span.input-filename');
1055            if (filename) {
1056              filename = filename
1057                  .replace(/&/g, "&amp;")
1058                  .replace(/</g, "&lt;")
1059                  .replace(/>/g, "&gt;")
1060                  .replace(/"/g, "&quot;")
1061                  .replace(/'/g, "&#039;");
1062              filenameElement.html(smartTrim(filename, 20));
1063            }
1064          }
1065        });
1066      }
1067    );
1068
1069
1070    if (xliteConfig.zone === 'customer') {
1071      xcart.microhandlers.add(
1072        '.profile-form',
1073        'input#password',
1074        function (event) {
1075          $(this)
1076            .last()
1077            .on('input', function () {
1078              var difficulty = getPasswordDifficulty($(this).val());
1079
1080              var form = $(this).closest('form');
1081              var formId = form.attr('id')
1082              var passwordDifficultyElem = $(".password-difficulty[form-id=" + formId + "]");
1083
1084              if (passwordDifficultyElem.length == 0) {
1085                form.find('.password-label').append(
1086                  "<span class='password-difficulty' form-id='" + formId + "'></span>"
1087                );
1088                passwordDifficultyElem = $(".password-difficulty[form-id=" + formId + "]");
1089              }
1090
1091
1092              showPasswordDifficultyMessage(passwordDifficultyElem, difficulty);
1093              setPasswordDifficultyColor(passwordDifficultyElem, difficulty);
1094            });
1095        }
1096      );
1097    }
1098
1099    xcart.bind('popup.open', function () {
1100      jQuery('html').addClass('popup-opened');
1101    });
1102    xcart.bind('popup.close', function () {
1103      jQuery('html').removeClass('popup-opened');
1104    });
1105  });;
1106/* AUTOGENERATED: xcart.element.js */
1107/* vim: set ts=2 sw=2 sts=2 et: */
1108
1109/**
1110 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
1111 * See https://www.x-cart.com/license-agreement.html for license details.
1112 */
1113
1114Element.prototype.fireEvent = Window.prototype.fireEvent = function fireEvent(event, eventInterface) {
1115  eventInterface = eventInterface || 'Event';
1116  emitEvent(this, event, eventInterface);
1117};
1118
1119function emitEvent(object, event, eventInterface) {
1120  if (document.createEventObject) {
1121    // dispatch for IE
1122    var evt = document.createEventObject();
1123    return object.fireEvent('on' + event, evt);
1124  } else {
1125    // dispatch for firefox + others
1126    eventInterface = eventInterface || 'Event';
1127    var evt = document.createEvent(eventInterface);
1128    evt.initEvent(event, true, true); // event type,bubbling,cancelable
1129    return !object.dispatchEvent(evt);
1130  }
1131};
1132/* AUTOGENERATED: xcart.js */
1133/* vim: set ts=2 sw=2 sts=2 et: */
1134
1135/**
1136 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
1137 * See https://www.x-cart.com/license-agreement.html for license details.
1138 */
1139
1140/**
1141 * OOP core
1142 */
1143
1144// OOP extends emulation
1145function extend(child, parent) {
1146  var F = function () {
1147  };
1148  F.prototype = parent.prototype;
1149  child.prototype = new F();
1150  child.prototype.constructor = child;
1151  child.superclass = parent.prototype;
1152
1153  child.prototype.inherit_stack = child.prototype.inherit_stack === undefined
1154    ? []
1155    : child.prototype.inherit_stack.slice(0);
1156  child.prototype.inherit_stack.push(parent);
1157}
1158
1159// Decorate / add method
1160function decorate(c, methodName, method) {
1161  c = getClassByName(c);
1162
1163  var result = false;
1164
1165  if (c) {
1166    method.previousMethod = 'undefined' == typeof (c.prototype[methodName]) ? null : c.prototype[methodName];
1167    c.prototype[methodName] = method;
1168    result = true;
1169  }
1170
1171  return result;
1172}
1173
1174// Get class object by name (or object)
1175function getClassByName(c) {
1176  if (c && c.constructor == String) {
1177    c = eval('(("undefined" != typeof(window.' + c + ') && ' + c + '.constructor == Function) ? ' + c + ' : null)');
1178
1179  } else if (!c || c.constructor != Function) {
1180    c = null;
1181  }
1182
1183  return c;
1184}
1185
1186// Base class
1187function Base() {
1188  this.triggerVent('initialize');
1189}
1190
1191// Call parent method by name nad arguments list
1192Base.prototype.callSupermethod = function (name, args) {
1193  var call_stack_head = false;
1194  this.call_stack = this.call_stack === undefined ? {} : this.call_stack;
1195  if (!this.call_stack.hasOwnProperty(name) || this.call_stack[name] === undefined) {
1196    call_stack_head = true;
1197    this.call_stack[name] = this.inherit_stack.slice(0);
1198  }
1199
1200  var superClass = this.call_stack[name].pop();
1201  var result = (name === 'constructor' ? superClass : superClass.prototype[name]).apply(this, args);
1202  this.call_stack[name].push(superClass);
1203
1204  if (call_stack_head) {
1205    this.call_stack[name] = undefined;
1206  }
1207
1208  return result;
1209};
1210
1211// Bind event handler
1212Base.prototype.bind = function (name, handler) {
1213  jQuery(this).bind(name, handler);
1214
1215  return this;
1216};
1217
1218// Unbind event handler
1219Base.prototype.unbind = function (name, handler) {
1220  jQuery(this).unbind(name, handler);
1221
1222  return this;
1223};
1224
1225// Trigger event on common mediator object
1226Base.prototype.triggerVent = function (name, data) {
1227  var ns = this.getEventNamespace();
1228  if (ns) {
1229    xcart.trigger(ns + '.' + name, data);
1230  }
1231
1232  return jQuery(this).trigger('local.' + name, data);
1233};
1234
1235// Get event namespace (prefix)
1236Base.prototype.getEventNamespace = function () {
1237  return null;
1238};
1239
1240var reverseArguments = function (func) {
1241  return function () {
1242    return func.apply(this, Array.prototype.reverse.call(arguments));
1243  };
1244};
1245
1246// Core definition
1247window.xcart = {
1248
1249  isDebug: false,
1250
1251  isReady: false,
1252
1253  isRequesterEnabled: false,
1254
1255  savedEvents: [],
1256
1257  messages: jQuery({}),
1258
1259  resources: [],
1260
1261  resourcesCacheTimestamp: '',
1262
1263  htmlResourcesLoadDeferred: new $.Deferred(),
1264
1265  // Collections of the getters which return the parameters of the widgets to get via widgets collection process
1266  widgetsParamsGetters: {},
1267
1268  doShadeWidgetsCollection: true,
1269
1270  xhrMiddlewares: [],
1271
1272  getXhrMiddlewares: function () {
1273    return [
1274      this.processBackendEvents
1275    ].concat(this.xhrMiddlewares);
1276  },
1277
1278  addXhrMiddleware: function (callback) {
1279    this.xhrMiddlewares.push(callback);
1280  },
1281
1282  registerWidgetsParamsGetter: function (widgetsId, getter) {
1283    if (!this.widgetsParamsGetters[widgetsId]) {
1284      this.widgetsParamsGetters[widgetsId] = [];
1285    }
1286    this.widgetsParamsGetters[widgetsId].push(getter);
1287  },
1288
1289  getWidgetsParams: function (widgetsId, paramsToCall) {
1290    var params = [];
1291    for (var key in this.widgetsParamsGetters[widgetsId]) {
1292      params = array_merge(params, this.widgetsParamsGetters[widgetsId][key](paramsToCall));
1293    }
1294    return params;
1295  },
1296
1297  widgetsTriggers: {},
1298
1299  registerWidgetsTriggers: function (widgetsId, triggersGetter) {
1300    if (!this.widgetsTriggers[widgetsId]) {
1301      this.widgetsTriggers[widgetsId] = [];
1302    }
1303    this.widgetsTriggers[widgetsId].push(triggersGetter);
1304  },
1305
1306  getWidgetsTriggers: function (widgetsId) {
1307    var triggers = [];
1308    for (var key in this.widgetsTriggers[widgetsId]) {
1309      triggers.push(this.widgetsTriggers[widgetsId][key]());
1310    }
1311    return triggers;
1312  },
1313
1314  shadowWidgets: {},
1315
1316  registerShadowWidgets: function (widgetsId, shadowGetter) {
1317    if ('undefined' === typeof (this.shadowWidgets[widgetsId])) {
1318      this.shadowWidgets[widgetsId] = [];
1319    }
1320    this.shadowWidgets[widgetsId].push(shadowGetter);
1321  },
1322
1323  getShadowWidgets: function (widgetsId) {
1324    var shadow = [];
1325    for (var key in this.shadowWidgets[widgetsId]) {
1326      shadow.push(this.shadowWidgets[widgetsId][key]());
1327    }
1328    return array_unique(shadow);
1329  },
1330
1331  widgetsTriggersBind: {},
1332
1333  registerTriggersBind: function (widgetsId, triggersGetter) {
1334    if (!this.widgetsTriggersBind[widgetsId]) {
1335      this.widgetsTriggersBind[widgetsId] = [];
1336    }
1337    this.widgetsTriggersBind[widgetsId].push(triggersGetter);
1338  },
1339
1340  callTriggersBind: function (widgetsId) {
1341    for (var key in this.widgetsTriggersBind[widgetsId]) {
1342      this.widgetsTriggersBind[widgetsId][key]();
1343    }
1344  },
1345
1346  shadeWidgetsCollection: function (base) {
1347    if (this.doShadeWidgetsCollection) {
1348      jQuery(base).append('<div class="single-progress-mark"><div></div></div>');
1349    }
1350    this.doShadeWidgetsCollection = true;
1351  },
1352
1353  unshadeWidgetsCollection: function (base) {
1354    jQuery(base + ' .single-progress-mark').remove();
1355  },
1356
1357  processUpdateWidgetsCollection: function (widgetsId, widgetsCollection, widgetsCollectionParamsCommon, base) {
1358    // Shadows triggers (unbind and disable the trigger elements)
1359    var triggers = this.getWidgetsTriggers(widgetsId);
1360    for (var k in triggers) {
1361      jQuery(triggers[k]).unbind(k).prop('disabled', 'disabled');
1362    }
1363    this.shadeWidgetsCollection('.product-details-info');
1364
1365    // Shadow widgets collection
1366    //this.shadowCollection(base, this.getShadowWidgets(widgetsId));
1367
1368    // Load widgets
1369    this.loadWidgetsCollection(
1370      base,
1371      widgetsCollection,
1372      array_merge(
1373        widgetsCollectionParamsCommon,
1374        this.getWidgetsParams(widgetsId, widgetsCollectionParamsCommon)
1375      ),
1376      function () {
1377        // Unshadow triggers (bind and enable trigger elements)
1378        for (var k in triggers) {
1379          jQuery(triggers[k]).removeAttr('disabled');
1380        }
1381        xcart.unshadeWidgetsCollection('.product-details-info');
1382        xcart.callTriggersBind(widgetsId);
1383      }
1384    );
1385  },
1386
1387  // Performs browser redirect on setTimeout
1388  redirectTo: function (url) {
1389    _.defer(function () {
1390      window.location.href = url;
1391    });
1392  },
1393
1394  // Trigger common message
1395  trigger: function (name, params) {
1396    var result = true;
1397
1398    name = name.toLowerCase();
1399
1400    if (this.isReady) {
1401
1402      if (this.isDebug && 'undefined' != typeof (window.console)) {
1403        if (params) {
1404          console.log('Fire \'' + name + '\' event with arguments: ' + var_export(params, true));
1405        } else {
1406        }
1407        console.log('Fire \'' + name + '\' event');
1408      }
1409
1410      result = this.messages.trigger(name, [params]);
1411
1412    } else {
1413      this.savedEvents.push(
1414        {
1415          name: name,
1416          params: params
1417        }
1418      );
1419    }
1420
1421    return result;
1422  },
1423
1424  // Bind on common messages
1425  bind: function (name, callback) {
1426    if (_.isArray(name)) {
1427      for (var key in name) {
1428        if (name.hasOwnProperty(key)) {
1429          this.messages.bind(name[key].toLowerCase(), callback);
1430        }
1431      }
1432    } else {
1433      this.messages.bind(name.toLowerCase(), callback);
1434    }
1435
1436    return this;
1437  },
1438
1439  // Unbind on common messages
1440  unbind: function (name, callback) {
1441    if (_.isArray(name)) {
1442      for (var key in name) {
1443        this.messages.unbind(name[key].toLowerCase(), callback);
1444      }
1445    } else {
1446      this.messages.unbind(name.toLowerCase(), callback);
1447    }
1448
1449    return this;
1450  },
1451
1452  // Get HTML data from server
1453  get: function (url, callback, data, options) {
1454    if (_.isObject(url)) {
1455      url = URLHandler.buildURL(url);
1456    }
1457
1458    options = options || {};
1459
1460    var completeCallback = options.complete || function () {
1461    };
1462    var successCallback = options.success || function () {
1463    };
1464
1465    var headers = {
1466      'ajaxRefererTarget': xcart.getTarget()
1467    };
1468    options = jQuery.extend(
1469      {
1470        async: true,
1471        cache: false,
1472        contentType: 'text/html',
1473        global: false,
1474        timeout: xliteConfig.ajax_timeout,
1475        type: 'GET',
1476        url: url,
1477        data: data,
1478        headers: headers
1479      },
1480      options,
1481      {
1482        complete: function () {
1483          _.partial(xcart.onXhrComplete, callback, options, data).apply(this, arguments);
1484          completeCallback.apply(this, arguments);
1485        },
1486        success: function () {
1487          xcart.onXhrSuccess.apply(this, arguments);
1488          successCallback.apply(this, arguments);
1489        }
1490      }
1491    );
1492
1493    return jQuery.ajax(options);
1494  },
1495
1496  // Post form data to server
1497  post: function (url, callback, data, options) {
1498    if (_.isObject(url)) {
1499      url = URLHandler.buildURL(url);
1500    }
1501
1502    options = options || {};
1503
1504    var completeCallback = options.complete || function () {
1505    };
1506    var successCallback = options.success || function () {
1507    };
1508
1509    var headers = {
1510      'ajaxRefererTarget': xcart.getTarget()
1511    };
1512
1513    options = jQuery.extend(
1514      {
1515        async: true,
1516        cache: false,
1517        contentType: 'application/x-www-form-urlencoded',
1518        global: false,
1519        timeout: xliteConfig.ajax_timeout,
1520        type: 'POST',
1521        url: url,
1522        data: data,
1523        headers: headers
1524      },
1525      options,
1526      {
1527        complete: function () {
1528          _.partial(xcart.onXhrComplete, callback, options, data).apply(this, arguments);
1529          completeCallback.apply(this, arguments);
1530        },
1531        success: function () {
1532          xcart.onXhrSuccess.apply(this, arguments);
1533          successCallback.apply(this, arguments);
1534        }
1535      }
1536    );
1537
1538    return jQuery.ajax(options);
1539  },
1540
1541  onXhrSuccess: function (data, textStatus, XMLHttpRequest) {
1542    var list = XMLHttpRequest.getAllResponseHeaders().split(/\n/);
1543
1544    var header = _.find(list, function (headerValue) {
1545      return -1 !== headerValue.search(/update-csrf: (.*)/i);
1546    });
1547
1548    var matches = header
1549      ? header.match(/update-csrf: (.*)/i)
1550      : null;
1551
1552    if (matches && matches[1]) {
1553      var headerData = JSON.parse(matches[1]);
1554
1555      if (headerData.name === 'xcart_form_id' && headerData.old === xliteConfig.form_id) {
1556        xliteConfig.form_id = headerData.value;
1557      }
1558    }
1559  },
1560
1561  onXhrComplete: function (callback, options, data, XMLHttpRequest, textStatus) {
1562    var callCallback = xcart.preprocessResponse(XMLHttpRequest, options, callback);
1563    data = xcart.processResponse(XMLHttpRequest);
1564    var notValid = !!XMLHttpRequest.getResponseHeader('not-valid');
1565
1566    return (callCallback && callback) ? callback(XMLHttpRequest, textStatus, data, !notValid) : true;
1567  },
1568
1569  // Response preprocess (run callback or not)
1570  preprocessResponse: function (xhr, options, callback) {
1571    var result = true;
1572
1573    var responseStatus = parseInt(xhr.getResponseHeader('ajax-response-status'));
1574
1575    if (200 == xhr.status && 279 == responseStatus && xhr.getResponseHeader('AJAX-Location') && (!options || !options.rpc)) {
1576      xcart.get(
1577        xhr.getResponseHeader('AJAX-Location'),
1578        callback
1579      );
1580
1581      result = false;
1582
1583    } else if (278 == responseStatus) {
1584      if (options.preventRedirect) {
1585        return result
1586      }
1587
1588      // Redirect
1589      var url = xhr.getResponseHeader('AJAX-Location');
1590
1591      if (url) {
1592        window.location.assign(url);
1593      }
1594
1595      if (!url || this.urlHasHash(url)) {
1596        window.location.reload(true);
1597      }
1598
1599      result = false;
1600    }
1601
1602    return result;
1603  },
1604
1605  urlHasHash: function (url) {
1606    return url.indexOf('#') !== -1;
1607  },
1608
1609  // Process response from server
1610  processResponse: function (xhr) {
1611    var response = xhr.responseText;
1612    this.getXhrMiddlewares().forEach(function (callback) {
1613      var result = callback(xhr, response);
1614      if (typeof (result) !== 'undefined') {
1615        response = result;
1616      }
1617    });
1618
1619    return (4 == xhr.readyState && 200 == xhr.status) ? response : false;
1620  },
1621
1622  processBackendEvents: function (xhr) {
1623    if (4 == xhr.readyState) {
1624      var list = xhr.getAllResponseHeaders().split(/\n/);
1625
1626      for (var i = 0; i < list.length; i++) {
1627        if (-1 !== list[i].search(/^event-([^:]+):(.+)/i)) {
1628
1629          // Server-side event
1630          var m = list[i].match(/event-([^:]+):(.+)/i);
1631          xcart.trigger(m[1].toLowerCase(), eval('(' + m[2] + ')'));
1632        }
1633      }
1634    }
1635  },
1636
1637  showInternalError: function () {
1638    return this.showError(this.t('Javascript core internal error. Page will be refreshed automatically'));
1639  },
1640
1641  showServerError: function () {
1642    return this.showError(this.t('Background request to server side is failed. Page will be refreshed automatically'));
1643  },
1644
1645  showError: function (message) {
1646    xcart.trigger(
1647      'message',
1648      {'type': 'error', 'message': message}
1649    );
1650  },
1651
1652  translator: null,
1653
1654  t: function (label, substitute) {
1655    return this.getTranslator().translate(label, substitute);
1656  },
1657
1658  loadLanguageHash: function (hash) {
1659    return this.getTranslator().loadLanguageHash(hash);
1660  },
1661
1662  getTranslator: function () {
1663    if (this.translator === null) {
1664      this.translator = new Translator();
1665    }
1666
1667    return this.translator;
1668  },
1669
1670  getHtmlResourcesLoadPromise: function () {
1671    return this.htmlResourcesLoadDeferred.promise();
1672  },
1673
1674  loadResource: function (resource, type) {
1675    var deferred = new $.Deferred();
1676    if (_.isString(resource)) {
1677      resource = {
1678        url: resource,
1679        widget: ''
1680      };
1681    }
1682
1683    type = type || xcart.getExtension(resource.url);
1684
1685    if (!resource.url.startsWith('var/theme/custom.css') && xcart.isLoadedResource(resource.url)) {
1686      return;
1687    }
1688
1689    var url = resource.url;
1690
1691    if ('' !== xcart.resourcesCacheTimestamp) {
1692      url = url
1693        + (url.indexOf('?') === -1 ? '?' : '&')
1694        + xcart.resourcesCacheTimestamp;
1695    }
1696
1697    LazyLoad[type](url, function () {
1698      xcart.registerResources([url]);
1699      xcart.trigger('resources.loaded', {file: url, widget: resource.widget});
1700      deferred.resolve();
1701    });
1702
1703    return deferred.promise();
1704  },
1705
1706  isLoadedResource: function (url) {
1707    return _.contains(xcart.resources, url);
1708  },
1709
1710  registerResources: function (list) {
1711    for (var key in list) {
1712      xcart.resources.push(list[key]);
1713    }
1714  },
1715
1716  parseResources: function (element, uuid) {
1717    var restoreCallback = xcart.microhandlers.supressRun();
1718    uuid = uuid || '';
1719    element = jQuery(element);
1720    var resource = element.find('script[data-resource]').first();
1721
1722    if (resource.length) {
1723      var data = JSON.parse(resource.html());
1724      resource.remove();
1725
1726      if (data.css || data.js) {
1727        var cssLoaded = xcart.loadResources(data.css, 'css');
1728        var jsLoaded = xcart.loadResources(data.js, 'js');
1729
1730        jQuery.when(cssLoaded, jsLoaded).done(
1731          function () {
1732            restoreCallback();
1733            xcart.trigger('resources.ready', {widget: data.widget, uuid: uuid});
1734          }
1735        );
1736      } else {
1737        restoreCallback();
1738        xcart.trigger('resources.empty', {widget: data.widget, uuid: uuid});
1739      }
1740    }
1741  },
1742
1743  loadResources: function (list, type) {
1744    var deferred = new $.Deferred();
1745    var promises = [];
1746
1747    $.when(this.getHtmlResourcesLoadPromise()).then(function () {
1748      for (var key in list) {
1749        var resource = list[key];
1750
1751        promises.push(xcart.loadResource(resource, type));
1752      }
1753
1754      $.when.apply($, promises).then(
1755        function () {
1756          deferred.resolve();
1757        }
1758      );
1759    });
1760
1761    return deferred.promise();
1762  },
1763
1764  parsePreloadedLabels: function (element, uuid) {
1765    element = jQuery(element);
1766    uuid = uuid || '';
1767    var labelsContainer = element.find('script[data-preloaded-labels]').first();
1768
1769    if (labelsContainer.length) {
1770      var data = JSON.parse(labelsContainer.html());
1771      labelsContainer.remove();
1772
1773      if (data.labels) {
1774        xcart.loadLabels(data.labels);
1775        xcart.trigger('preloaded_labels.ready', {widget: data.widget, uuid: uuid});
1776      } else {
1777        xcart.trigger('preloaded_labels.empty', {widget: data.widget, uuid: uuid});
1778      }
1779    }
1780  },
1781
1782  loadLabels: function (list) {
1783    this.loadLanguageHash(list);
1784  },
1785
1786  parseObjectString: function (objectString) {
1787    if (typeof (JSON5) !== 'undefined') {
1788      return JSON5.parse(objectString);
1789    }
1790
1791    console.error('Cannot parse JS object from string: JSON5 is not loaded');
1792  },
1793
1794  getLayoutOptions: function () {
1795    return window.xliteLayoutOptions || {};
1796  },
1797
1798  rest: {
1799
1800    lastResponse: null,
1801
1802    request: function (type, name, id, data, callback) {
1803      if (!type || !name) {
1804        return false;
1805      }
1806
1807      this.lastResponse = null;
1808
1809      var xhr = jQuery.ajax(
1810        {
1811          async: false !== callback,
1812          cache: false,
1813          complete: function (xhr, status) {
1814            return this.callback(xhr, status, callback);
1815          },
1816          context: this,
1817          data: data,
1818          timeout: 30000,
1819          type: ('get' == type ? 'GET' : 'POST'),
1820          url: URLHandler.buildURL(
1821            {
1822              target: 'rest',
1823              action: type,
1824              name: name,
1825              id: id
1826            }
1827          )
1828        }
1829      );
1830
1831      if (false === callback) {
1832        xhr = (this.lastResponse && this.lastResponse.status == 'success') ? this.lastResponse.data : null;
1833      }
1834
1835      return xhr;
1836    },
1837
1838    get: function (name, id, callback) {
1839      return this.request('get', name, id, null, callback);
1840    },
1841
1842    post: function (name, id, data, callback) {
1843      return this.request('post', name, id, data, callback);
1844    },
1845
1846    put: function (name, data, callback) {
1847      return this.request('put', name, null, data, callback);
1848    },
1849
1850    'delete': function (name, id, callback) {
1851      return this.request('delete', name, id, null, callback);
1852    },
1853
1854    callback: function (xhr, status, callback) {
1855      try {
1856        var data = jQuery.parseJSON(xhr.responseText);
1857
1858      } catch (e) {
1859        var data = null;
1860      }
1861
1862      if (false === callback) {
1863        xcart.rest.lastResponse = data;
1864
1865      } else if (callback) {
1866        callback(xhr, status, data);
1867      }
1868    }
1869  },
1870
1871  clearHash: function (paramName) {
1872    var scrollV, scrollH, loc = window.location;
1873    var newHash = '';
1874
1875    if (paramName !== undefined) {
1876      var pattern = '&?(' + paramName + '(\\[\\S*\\])*=[^&]*&?)';
1877      var re = new RegExp(pattern, 'gi');
1878
1879      newHash = loc.hash.replace(re, '').slice(1);
1880    }
1881    ;
1882
1883    // Prevent scrolling by storing the page's current scroll offset
1884    scrollV = document.body.scrollTop;
1885    scrollH = document.body.scrollLeft;
1886
1887    if (newHash !== loc.hash) {
1888      loc.hash = newHash;
1889    }
1890
1891    // Restore the scroll offset, should be flicker free
1892    document.body.scrollTop = scrollV;
1893    document.body.scrollLeft = scrollH;
1894  },
1895
1896  autoload: function (className, element, extendedClass = null) {
1897    if ('function' === typeof (className)) {
1898      let m = className.toString().match(/function ([^\(]+)/);
1899
1900      m = !m && extendedClass ? extendedClass : m[1];
1901      window[m] = className;
1902      className = m;
1903    }
1904
1905    var classObject = window[className];
1906
1907    jQuery(document).ready(
1908      function () {
1909        if ('undefined' != typeof (classObject)) {
1910          if ('undefined' != typeof (element)) {
1911            jQuery(element).each(function (index, el) {
1912              jQuery(el).data('controller', new (classObject)(jQuery(el)));
1913            });
1914          } else if ('function' == typeof (classObject.autoload)) {
1915            classObject.autoload();
1916
1917          } else {
1918            new (classObject)();
1919          }
1920        }
1921      }
1922    );
1923  },
1924
1925  // Return value of variable that is given in class attribute: e.g. class="superclass productid-100001 test"
1926  getValueFromClass: function (obj, prefix) {
1927    var m = jQuery(obj)
1928      .attr('class')
1929      .match(new RegExp(prefix + '-([^ ]+)( |$)'));
1930
1931    return m ? m[1] : null;
1932  },
1933
1934  // Return value of variable that is given in comment block: e.g. <!-- 'productid': '100001', 'var': 'value', -->"
1935  getCommentedData: function (obj, name) {
1936    if (jQuery(obj).get(0)) {
1937      var children = jQuery(obj).get(0).childNodes;
1938    } else {
1939      return name ? null : [];
1940    }
1941    var m = false;
1942
1943    for (var i = 0; i < children.length && !m; i++) {
1944      if ('SCRIPT' == children[i].nodeName && 'text/x-cart-data' == children[i].type) {
1945        m = children[i].innerHTML;
1946        m = m.replace(/^\n\r/, '').replace(/\r\n$/, '');
1947        try {
1948          m = eval('(' + m + ')');
1949        } catch (e) {
1950          m = false;
1951        }
1952      }
1953    }
1954
1955    if (m && name) {
1956      m = 'undefined' == typeof (m[name]) ? null : m[name];
1957    }
1958
1959    return m ? m : null;
1960  },
1961
1962  // Toggle link text and toggle obj visibility
1963  toggleText: function (link, text, obj) {
1964    if (undefined === link.prevValue) {
1965      link.prevValue = jQuery(link).html();
1966    }
1967    jQuery(link).html(jQuery(link).html() === text ? link.prevValue : text);
1968    jQuery(obj).toggle();
1969  },
1970
1971  setRelArray: function ($obj, relArray) {
1972    $obj.attr('data-rel', _.map(_.pairs(relArray), function (value) {
1973      return value.join(': ');
1974    }).join(', '));
1975  },
1976
1977  getRelArray: function ($obj) {
1978    var rel = $obj.attr('data-rel');
1979
1980    return _.object(_.map(rel.split(','), function (value, key, list) {
1981      return _.map(_.trim(value).split(':'), function (value) {
1982        return _.trim(value);
1983      });
1984    }));
1985  },
1986
1987  // Decorate class after page loading
1988  decorate: function (className, methodName, func) {
1989    xcart.bind(
1990      'load',
1991      function () {
1992        decorate(className, methodName, func);
1993      }
1994    );
1995  },
1996
1997  // Decorate some class after page loading
1998  decorates: function (list, func) {
1999    xcart.bind(
2000      'load',
2001      function () {
2002        for (var i = 0; i < list.length; i++) {
2003          decorate(list[i][0], list[i][1], func);
2004        }
2005      }
2006    );
2007  },
2008
2009  stringToNumber: function (number, dDelim, tDelim) {
2010    if ('' !== tDelim) {
2011      number = number.replace(new RegExp('\\' + tDelim, 'g'), '');
2012    }
2013
2014    var a = number.split(dDelim);
2015
2016    return parseFloat(a[0] + '.' + a[1]);
2017  },
2018
2019  numberToString: function (number, dDelim, tDelim, precision) {
2020    dDelim = dDelim || '.';
2021    tDelim = tDelim || '';
2022    precision = precision || 0;
2023
2024    precision = Math.max(parseInt(precision), 0);
2025
2026    number = this.round(number, precision).toString();
2027    /*
2028     Author: Robert Hashemian
2029     http://www.hashemian.com/
2030
2031     You can use this code in any manner so long as the author's name,
2032     Web address and this disclaimer is kept intact.
2033     ********************************************************/
2034
2035    var a = number.split('.');
2036    var x = a[0]; // decimal
2037    var y = a[1]; // fraction
2038    var z = '';
2039
2040    if (typeof (x) != 'undefined') {
2041      // reverse the digits. regexp works from left to right.
2042      for (var i = x.length - 1; i >= 0; i--) {
2043        z += x.charAt(i);
2044      }
2045
2046      // add separators. but undo the trailing one, if there
2047      z = z.replace(/(\d{3})/g, '$1' + tDelim);
2048
2049      if (z.slice(-tDelim.length) == tDelim) {
2050        z = z.slice(0, -tDelim.length);
2051      }
2052
2053      x = '';
2054
2055      // reverse again to get back the number
2056      for (i = z.length - 1; i >= 0; i--) {
2057        x += z.charAt(i);
2058      }
2059
2060      // add the fraction back in, if it was there
2061      if (typeof (y) != 'undefined' && y.length > 0) {
2062        x += dDelim + y + this.repeat('0', precision - y.length);
2063
2064      } else if (precision > 0) {
2065        x += dDelim + this.repeat('0', precision);
2066      }
2067    }
2068
2069    return x;
2070  },
2071
2072  getExtension: function (path) {
2073    return path.slice((path.lastIndexOf('.') - 1 >>> 0) + 2);
2074  },
2075
2076  repeat: function (s, n) {
2077    var a = [];
2078    while (a.length < n) {
2079      a.push(s);
2080    }
2081
2082    return a.join('');
2083  },
2084
2085  round: function (number, precision) {
2086    precision = precision || 0;
2087    precision = Math.max(parseInt(precision), 0);
2088
2089    var pow = Math.pow(10, precision);
2090
2091    return Math.round(number * pow) / pow;
2092  },
2093
2094  loadWidgetsCollection: function (base, collectionName, params, restoreCallback) {
2095    this.get(
2096      URLHandler.buildURL(array_merge({
2097        'target': 'widgets_collection',
2098        'action': 'get',
2099        'widget': collectionName
2100      }, params)),
2101      function (XMLHttpRequest, textStatus, data) {
2102        try {
2103          data = JSON.parse(data);
2104          for (var key in data) {
2105            jQuery('.' + data[key].view, jQuery(base)).replaceWith(data[key].content);
2106//            xcart.unshadowWidget(base, '.' + data[key].view);
2107          }
2108          restoreCallback();
2109
2110        } catch (error) {
2111          console.log(error.message);
2112        }
2113      }
2114    );
2115  },
2116
2117  shadowCollection: function (base, collection) {
2118    for (key in collection) {
2119      jQuery(collection[key], jQuery(base)).after('<div class="single-progress-mark"></div>');
2120    }
2121  },
2122
2123  unshadowWidget: function (base, widget) {
2124    jQuery('.single-progress-mark', jQuery(widget, jQuery(base)).parent()).remove();
2125  },
2126
2127  getURLParam: function (name) {
2128    name = name.replace(/[\[]/, '\\\[').replace(/[\]]/, '\\\]');
2129    var regexS = '[\\?&]' + name + '=([^&#]*)';
2130    var regex = new RegExp(regexS);
2131    var results = regex.exec(window.location.href);
2132    if (results == null) {
2133      return '';
2134    } else {
2135      return results[1];
2136    }
2137  },
2138
2139  getUrlParams: function (url) {
2140    if (_.isUndefined(url)) {
2141      url = window.location.search;
2142    }
2143
2144    if (url.indexOf('?') >= 0) {
2145      url = url.substr(url.indexOf('?') + 1);
2146    }
2147
2148    var searchParams = new URLSearchParams(url);
2149
2150    var result = [];
2151    for (const [key, value] of searchParams) {
2152      result[key] = searchParams.get(key);
2153    }
2154    return result;
2155  },
2156
2157  getTarget: function () {
2158    return xliteConfig.target;
2159  },
2160
2161  getFormIdString: function () {
2162    return xliteConfig.form_id_name + '=' + xliteConfig.form_id;
2163  },
2164
2165  /**
2166   * @param {Element} el
2167   * @param {string} selector
2168   * @return {Array<Element>}
2169   */
2170  parents: (el, selector) => {
2171    const parents = [];
2172
2173    while ((el = el.parentNode) && el !== document) {
2174      if (el.matches(selector) || !selector) {
2175        parents.push(el);
2176      }
2177    }
2178
2179    return parents;
2180  }
2181};
2182
2183// HTTP requester detection
2184try {
2185  const xhr = window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest()
2186  xcart.isRequesterEnabled = !!xhr
2187} catch (e) {
2188}
2189
2190// Common onready event handler
2191jQuery(document).ready(
2192  function () {
2193    xcart.isReady = true;
2194    xcart.trigger('load');
2195    for (var i = 0; i < xcart.savedEvents.length; i++) {
2196      xcart.trigger(xcart.savedEvents[i].name, xcart.savedEvents[i].params);
2197    }
2198    xcart.savedEvents = [];
2199  }
2200);
2201
2202xcart.isDeveloperMode = xliteConfig.developer_mode;
2203
2204/**
2205 * Common functions
2206 */
2207
2208// Check - specified object is HTML element or not
2209function isElement(obj, type) {
2210  return obj && typeof (obj.tagName) != 'undefined' && obj.tagName.toLowerCase() == type;
2211}
2212
2213jQuery.extend({
2214  getQueryParameters: function (str) {
2215    return (str || document.location.search).replace(/(^\?)/, '').split('&').map(function (n) {
2216      return n = n.split('='), this[n[0]] = n[1], this;
2217    }.bind({}))[0];
2218  }
2219});
2220
2221xcart.bind(
2222  'load',
2223  function () {
2224    jQuery('input[type=checkbox]').each(
2225      function () {
2226        var checkbox = this;
2227
2228        jQuery(checkbox).bind(
2229          'click',
2230          function () {
2231            return !jQuery(checkbox).prop('readonly');
2232          }
2233        );
2234      }
2235    );
2236
2237    jQuery('.model-form-buttons .button:first-child button').addClass('btn-warning');
2238  }
2239);
2240
2241/* Microhandlers */
2242
2243xcart.microhandlers = {};
2244
2245xcart.microhandlers.list = {};
2246
2247xcart.microhandlers.initialRunned = false;
2248xcart.microhandlers.supressRunOnAdd = false;
2249
2250xcart.microhandlers.supressRun = function () {
2251  var previous = this.supressRunOnAdd;
2252  this.supressRunOnAdd = true;
2253
2254  return _.bind(
2255    function () {
2256      this.supressRunOnAdd = false;
2257    },
2258    this
2259  );
2260};
2261
2262xcart.microhandlers.add = function (name, pattern, handler) {
2263  this.list[name] = {
2264    'pattern': pattern,
2265    'handler': handler
2266  };
2267
2268  if (this.initialRunned && !this.supressRunOnAdd) {
2269    this.run(name);
2270  }
2271};
2272
2273xcart.microhandlers.run = function (name, base) {
2274  base = base || document;
2275
2276  if ('undefined' != typeof (this.list[name]) && this.list[name]) {
2277    if (_.isString(this.list[name].pattern)) {
2278      jQuery(this.list[name].pattern, base)
2279        .filter(_.bind(this.filterByMark(name), this))
2280        .each(this.list[name].handler)
2281        .each(_.bind(this.assignMark(name), this));
2282
2283    } else if (_.isFunction(this.list[name].pattern)) {
2284      this.list[name].pattern()
2285        .filter(_.bind(this.filterByMark(name), this))
2286        .each(this.list[name].handler)
2287        .each(_.bind(this.assignMark(name), this));
2288    }
2289  }
2290};
2291
2292xcart.microhandlers.runInitial = function () {
2293  this.initialRunned = true;
2294  this.runAll(document);
2295};
2296
2297xcart.microhandlers.runAll = function (base) {
2298  _.each(
2299    _.keys(this.list),
2300    function (name) {
2301      if (typeof this.run !== 'undefined') {
2302        this.run(name, base);
2303      }
2304    },
2305    this
2306  );
2307};
2308
2309xcart.microhandlers.filterByMark = function (name) {
2310  return function (idx, elm) {
2311    return !jQuery(elm).data('microhandler-' + name);
2312  };
2313};
2314
2315xcart.microhandlers.assignMark = function (name) {
2316  return function (idx, elm) {
2317    jQuery(elm).data('microhandler-' + name, true);
2318  };
2319};
2320
2321xcart.microhandlers.add(
2322  'BootstrapTooltip',
2323  '[data-toggle="tooltip"]',
2324  function (event) {
2325    jQuery(this).tooltip();
2326  }
2327);
2328
2329xcart.microhandlers.add(
2330  'BootstrapPopover',
2331  '[data-toggle="popover"]',
2332  function (event) {
2333    if (!_.isUndefined(jQuery(this).startTooltip)) {
2334      jQuery(this).startTooltip();
2335    }
2336  }
2337);
2338
2339xcart.bind(
2340  'load',
2341  function () {
2342    xcart.microhandlers.runInitial();
2343  }
2344);
2345
2346xcart.bind(
2347  'loader.loaded',
2348  function (event, widget) {
2349    xcart.microhandlers.runAll(widget.base);
2350  }
2351);
2352
2353xcart.bind(
2354  'vue-form.ready',
2355  function (event, element) {
2356    xcart.microhandlers.runAll(element);
2357  }
2358);
2359
2360if (window.CoreAMD !== undefined) {
2361  define('js/xcart', function () {
2362    return xcart;
2363  });
2364} else {
2365  document.addEventListener('amd-ready', function (event) {
2366    define('js/xcart', function () {
2367      return xcart;
2368    });
2369  });
2370};
2371/* AUTOGENERATED: xcart.extend.js */
2372/* vim: set ts=2 sw=2 sts=2 et: */
2373
2374/**
2375 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
2376 * See https://www.x-cart.com/license-agreement.html for license details.
2377 */
2378
2379Object.getOwnPropertyDescriptors = function getOwnPropertyDescriptors(obj) {
2380    var descriptors = {};
2381    for (var prop in obj) {
2382        if (obj.hasOwnProperty(prop)) {
2383            descriptors[prop] = Object.getOwnPropertyDescriptor(obj, prop);
2384        }
2385    }
2386    return descriptors;
2387};
2388
2389Function.prototype.extend = function (proto) {
2390    var superclass = this;
2391    var constructor;
2392
2393    if (!proto.hasOwnProperty('constructor')) {
2394        Object.defineProperty(proto, 'constructor', {
2395            value: function () {
2396                // Default call to superclass as in maxmin classes
2397                superclass.apply(this, arguments);
2398            },
2399            writable: true,
2400            configurable: true,
2401            enumerable: false
2402        });
2403    }
2404    constructor = proto.constructor;
2405
2406    constructor.prototype = Object.create(this.prototype, Object.getOwnPropertyDescriptors(proto));
2407
2408    constructor.superclass = superclass.prototype;
2409
2410    return constructor;
2411};;
2412/* AUTOGENERATED: xcart.controller.js */
2413/* vim: set ts=2 sw=2 sts=2 et: */
2414
2415/**
2416 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
2417 * See https://www.x-cart.com/license-agreement.html for license details.
2418 */
2419
2420// Abstract controller
2421function AController(base)
2422{
2423  if (!base) {
2424
2425    // Search base DOM element(s)
2426    base = this.findBase();
2427  }
2428
2429  if (base) {
2430
2431    if (base.length > 1) {
2432
2433      // Multiple binding
2434      for (var i = 0; i < base.length; i++) {
2435        eval('new ' + this.name + '(jQuery(base[i]))');
2436      }
2437
2438    } else {
2439
2440      // Simple binding
2441      this.bind(jQuery(base));
2442    }
2443  }
2444}
2445
2446// Parent class - Base
2447extend(AController, Base);
2448
2449// [ABSTRACT] Controller unique name
2450AController.prototype.name = null;
2451
2452// Base DOM element
2453AController.prototype.base = null;
2454
2455// Find jQuery pattern
2456AController.prototype.findPattern = null;
2457
2458// Check - controller is catch base DOM element or not
2459AController.prototype.isBinded = function()
2460{
2461  return !!this.base;
2462}
2463
2464// Bind controller to base DOM element
2465AController.prototype.bind = function(base)
2466{
2467  var result = false;
2468
2469  if (this.name && !this.isBaseCatched(base) && this.detectBase(base)) {
2470    var o = this;
2471    base = jQuery(base);
2472    base.map(
2473      function() {
2474        this.controller = o;
2475      }
2476    );
2477    this.base = base;
2478
2479    this.initialize();
2480
2481    result = true;
2482  }
2483
2484  return result;
2485}
2486
2487// Check - controller is binded to base DOM element or not
2488AController.prototype.isBaseCatched = function(base)
2489{
2490  var result = false;
2491
2492  if ('undefined' != typeof(base.map)) {
2493    base.map(
2494      function() {
2495        if (!result && typeof(this.controller) != 'undefined') {
2496          result = true;
2497        }
2498      }
2499    );
2500
2501  } else if (typeof(base.controller) != 'undefined') {
2502    result = true;
2503  }
2504
2505  return result;
2506}
2507
2508// [ABSTRACT] Detect base
2509AController.prototype.detectBase = function()
2510{
2511  return !!this.findPattern;
2512}
2513
2514// [ABSTRACT] Initialize controller
2515AController.prototype.initialize = function()
2516{
2517}
2518
2519// Find base if controller create without base DOM element specification
2520AController.prototype.findBase = function()
2521{
2522  return this.findPattern ? jQuery(this.findPattern) : false;
2523};
2524/* AUTOGENERATED: xcart.loadable.js */
2525/* vim: set ts=2 sw=2 sts=2 et: */
2526
2527/**
2528 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
2529 * See https://www.x-cart.com/license-agreement.html for license details.
2530 */
2531
2532// Constructor
2533function ALoadable(base)
2534{
2535  ALoadable.superclass.constructor.apply(this, arguments);
2536
2537  if (base && this.checkBase(jQuery(base))) {
2538    this.basePattern = base;
2539    this.base = jQuery(base);
2540    this.loadHandlerCallback = _.bind(this.loadHandler, this);
2541    this.postprocess(true, true);
2542
2543    if (this.listenToHash && (!jQuery.isEmptyObject(hash.get()))) {
2544      jQuery(document).ready(_.bind(this.loadByHash, this));
2545    }
2546
2547    if (this.replaceState) {
2548      window.addEventListener( "popstate", function ( event ) {
2549        window.location.reload(true);
2550      });
2551    }
2552  }
2553}
2554
2555extend(ALoadable, Base);
2556
2557// Base element(s)
2558ALoadable.prototype.base = null;
2559
2560// Base pattern
2561ALoadable.prototype.basePattern = null;
2562
2563// Shade flag
2564ALoadable.prototype.isShowModalScreen = false;
2565
2566// Widget loading flag
2567ALoadable.prototype.isLoading = false;
2568
2569// Widget has deferred load operation
2570ALoadable.prototype.deferredLoad = false;
2571
2572// Preload event custom handler
2573ALoadable.prototype.preloadHandler = null;
2574
2575// Postload event custom handler
2576ALoadable.prototype.postloadHandler = null;
2577
2578ALoadable.prototype.listenToHash = false;
2579
2580ALoadable.prototype.listenToHashPrefix = '';
2581
2582ALoadable.prototype.replaceState = false;
2583
2584ALoadable.prototype.replaceStatePrefix = '';
2585
2586
2587// Options
2588
2589// Use shade
2590ALoadable.prototype.shadeWidget = true;
2591
2592// Class for shade overlay
2593ALoadable.prototype.shadeClass = null;
2594
2595// Use widget blocking
2596ALoadable.prototype.blockWidget = true;
2597
2598// Update page title from loaded request or not
2599ALoadable.prototype.updatePageTitle = false;
2600
2601// Update breadcrumb last node from loaded request or not
2602ALoadable.prototype.updateBreadcrumb = false;
2603
2604// Widget target
2605ALoadable.prototype.widgetTarget = null;
2606
2607// Widget parameters
2608ALoadable.prototype.widgetParams = null;
2609
2610// Widget class name
2611ALoadable.prototype.widgetClass = null;
2612
2613// Page title element pattern
2614ALoadable.prototype.titlePattern = 'h1';
2615
2616// Page title element pattern in request's response data
2617ALoadable.prototype.titleRequestPattern = '.ajax-container-loadable';
2618
2619// Container element pattern in request's response data
2620ALoadable.prototype.containerRequestPattern = 'div.ajax-container-loadable';
2621
2622ALoadable.prototype.reloadIfError = true;
2623
2624// Check base
2625ALoadable.prototype.checkBase = function(base)
2626{
2627  var result = 0 < base.length;
2628
2629  if (result) {
2630    base.map(
2631      function() {
2632        if (result && 'undefined' != typeof(this.loadable)) {
2633          result = false;
2634        }
2635      }
2636    );
2637  }
2638
2639  return result;
2640}
2641
2642// Load widget
2643ALoadable.prototype.doReplaceState = function(params) {
2644  var o = this, origParams = {};
2645
2646  window.location.search.substring(1).split('&').forEach(function (v) {
2647    var pair = v.split('=');
2648
2649    if (
2650      !_.isUndefined(pair[0])
2651      && !_.isUndefined(pair[1])
2652      && pair[0] !== o.replaceStatePrefix
2653    ) {
2654      // this condition for 'reset filter'
2655      if (jQuery.isEmptyObject(params) && pair[0].indexOf(o.replaceStatePrefix + '[') == 0) {
2656        return;
2657      }
2658      origParams[pair[0]] = pair[1];
2659    }
2660  });
2661
2662  var url = window.location.pathname;
2663  var queryString = '';
2664  params = array_merge(origParams, params || {});
2665
2666  $.each(params, function (key, value) {
2667    queryString += '&' + key + '=' + value;
2668  });
2669
2670  if (queryString) {
2671    url += '?';
2672  }
2673  url += queryString.substring(1);
2674
2675  window.history.pushState(params, 'Filter', url);
2676};
2677
2678// Load widget
2679ALoadable.prototype.load = function(params)
2680{
2681  if (this.replaceState) {
2682    this.doReplaceState(params);
2683  }
2684
2685  if (this.listenToHash) {
2686    hash.add(params);
2687  }
2688
2689  if (!xcart.isRequesterEnabled) {
2690    return false;
2691  }
2692
2693  if (this.isLoading) {
2694    this.deferredLoad = true;
2695    return true;
2696  }
2697
2698  this.isLoading = true;
2699  this.deferredLoad = false;
2700
2701  this.lastLoadParams = params;
2702
2703  var url = this.buildWidgetRequestURL(params);
2704
2705  if (this.base) {
2706    this.base.trigger('preload', [this, url]);
2707
2708    if (typeof(this.preloadHandler) == 'function') {
2709
2710      // Call preload event handler
2711      this.preloadHandler.call(this.base);
2712    }
2713  }
2714
2715  var state = { 'widget': this, 'url': url, 'options': this.getLoaderOptions() }
2716
2717  this.triggerVent('preload', state);
2718
2719  this.saveState();
2720
2721  this.shade();
2722
2723  state.xhr = xcart.get(state.url, this.loadHandlerCallback, null, state.options);
2724
2725  this.triggerVent('afterload', state);
2726
2727  return state.xhr;
2728};
2729
2730// Build request widget URL (AJAX)
2731ALoadable.prototype.buildWidgetRequestURL = function(params)
2732{
2733  return URLHandler.buildURL(this.getParams(params));
2734};
2735
2736// [ABSTRACT] Get additional parameters
2737ALoadable.prototype.getParams = function(params)
2738{
2739  params = params ? params : {};
2740
2741  // Set widget target and parameters
2742  if ('undefined' == typeof(params.target) && this.widgetTarget) {
2743    params.target = this.widgetTarget;
2744  }
2745
2746  if (this.widgetParams) {
2747    for (var i in this.widgetParams) {
2748      params[i] = this.widgetParams[i];
2749    }
2750  }
2751
2752  // TODO remove if it will be no use!!
2753  if ('undefined' == typeof(params.sessionCell) && this.sessionCell) {
2754    params.sessionCell = this.sessionCell;
2755  }
2756
2757  if ('undefined' == typeof(params.action)) {
2758    params.action = '';
2759  }
2760
2761  if ('undefined' == typeof(params.widget) && this.widgetClass) {
2762    params.widget = this.widgetClass;
2763  }
2764
2765  return params;
2766};
2767
2768// Loader AJAX options
2769ALoadable.prototype.getLoaderOptions = function()
2770{
2771  return {};
2772}
2773
2774ALoadable.prototype.createTemporaryContainer = function(data){
2775
2776  var container = this.getTemporaryContainer();
2777
2778  container.html(data);
2779
2780  return container;
2781};
2782
2783// onload handler
2784ALoadable.prototype.loadHandler = function(xhr, s, data)
2785{
2786  this.isLoading = false;
2787
2788  this.unshade();
2789
2790  if (false !== data) {
2791
2792    var container = this.createTemporaryContainer(data);
2793
2794    var uuid = _.uniqueId();
2795
2796    xcart.bind(['resources.ready', 'resources.empty'], _.bind(
2797      function(event, args){
2798        if (args.uuid === uuid) {
2799          var content = this.extractRequestData(container);
2800          container.remove();
2801          if (this.isValidContent(content)) {
2802            var processed = false;
2803            processed = this.placeRequestData(content);
2804            this.finishLoadHandler(processed);
2805          }
2806        }
2807      },
2808      this)
2809    );
2810
2811    xcart.parsePreloadedLabels(container, uuid);
2812    xcart.parseResources(container, uuid);
2813  }
2814};
2815
2816
2817// Check loaded content
2818ALoadable.prototype.finishLoadHandler = function(processed)
2819{
2820  jQuery(this.base).data('controller', this);
2821
2822  this.postprocess(processed);
2823
2824  if (!this.isLoading && this.deferredLoad) {
2825    this.deferredLoad = false;
2826    this.load(this.lastLoadParams);
2827
2828  } else if (processed) {
2829    if (typeof(this.postloadHandler) == 'function') {
2830      this.postloadHandler.call(this.base, xhr);
2831    }
2832
2833    this.triggerVent('loaded', this);
2834    xcart.trigger('loader.loaded', this);
2835
2836  } else {
2837
2838    this.triggerVent('loadingError', {'widget': this, 'arguments': arguments});
2839    if (this.reloadIfError) {
2840      setTimeout(
2841        _.bind(
2842          function() {
2843            this.load(this.lastLoadParams);
2844          },
2845          this
2846        ),
2847        300
2848      );
2849    }
2850  }
2851}
2852
2853// Check loaded content
2854ALoadable.prototype.isValidContent = function(content)
2855{
2856  return 0 < jQuery(this.containerRequestPattern, content).length;
2857};
2858
2859// Get temporary container
2860ALoadable.prototype.getTemporaryContainer = function()
2861{
2862  var div = document.createElement('DIV');
2863  div.style.display = 'none';
2864  jQuery('body').get(0).appendChild(div);
2865  return jQuery(div);
2866};
2867
2868// Extract widget data
2869ALoadable.prototype.extractRequestData = function(div)
2870{
2871  div.find('script[type!="text/x-cart-data"]').first().remove();
2872  return div;
2873};
2874
2875// Place request data
2876ALoadable.prototype.placeRequestData = function(box)
2877{
2878  // Update page title
2879  if (this.updatePageTitle || this.updateBreadcrumb) {
2880    this.replacePageTitle(box);
2881  }
2882
2883  box = this.extractContent(box);
2884
2885  //TODO: find any reason to add random class.
2886  var id = 'temporary-ajax-id-' + (new Date()).getTime();
2887
2888  box.addClass(id);
2889
2890  this.base.trigger('reload', [box]);
2891
2892  if (0 < box.length) {
2893    this.base = this.insertIntoDOM(box);
2894  } else {
2895    this.base.empty();
2896  }
2897
2898  this.base.removeClass(id);
2899
2900  return true;
2901};
2902
2903// Extract widget content
2904ALoadable.prototype.extractContent = function(box)
2905{
2906  box = jQuery(this.containerRequestPattern, box);
2907  if (box.children().eq(0).hasClass('block')) {
2908    box = jQuery('.block', box.eq(0))
2909      .first()
2910      .find('> .content');
2911  }
2912
2913  return box.children();
2914};
2915
2916// Place parsed request data into DOM
2917ALoadable.prototype.insertIntoDOM = function(box)
2918{
2919  this.base.replaceWith(box);
2920  return box;
2921};
2922
2923// Replace page title
2924ALoadable.prototype.replacePageTitle = function(box)
2925{
2926  var title = jQuery(this.titleRequestPattern, box).eq(0).attr('title');
2927  if (title) {
2928    this.placeNewPageTitle(title);
2929  }
2930
2931  return title;
2932};
2933
2934// Place new page title
2935ALoadable.prototype.placeNewPageTitle = function(title)
2936{
2937  if (this.updatePageTitle) {
2938    jQuery(this.titlePattern).eq(0).html(title);
2939    jQuery("head title").eq(0).html(title);
2940  }
2941
2942  if (this.updateBreadcrumb) {
2943    jQuery('#breadcrumb .last').find('a,span').html(title);
2944  }
2945};
2946
2947// [ABSTRACT] Widget post processing (after new widget data placing)
2948ALoadable.prototype.postprocess = function(isSuccess, initial)
2949{
2950  if (isSuccess) {
2951    var o = this;
2952
2953    this.base.map(
2954      function() {
2955        this.loadable = o;
2956      }
2957    );
2958
2959    if (!initial && 'undefined' != typeof(window.CommonForm)) {
2960      this.base.filter('form').each(
2961        function() {
2962          new CommonForm(this);
2963        }
2964      );
2965
2966      jQuery('form', this.base).each(
2967        function() {
2968          new CommonForm(this);
2969        }
2970      );
2971
2972      this.base.filter('*:input').each(
2973        function() {
2974          new CommonElement(this);
2975        }
2976      );
2977
2978      jQuery('*:input', this.base).each(
2979        function() {
2980          new CommonElement(this);
2981        }
2982      );
2983
2984    }
2985  }
2986
2987  this.triggerVent('postprocess', {'widget': this, 'isSuccess': isSuccess, 'initial': initial});
2988};
2989
2990// Load content by hash
2991ALoadable.prototype.loadByHash = function()
2992{
2993  if (!this.isHashEqual()) {
2994    this.load(hash.get());
2995  }
2996};
2997
2998// Check - has is equal arguments of widget
2999ALoadable.prototype.isHashEqual = function()
3000{
3001  var result = true;
3002
3003  var current = this.base.data('widget-arguments');
3004  if (current && hash.get()) {
3005    result = _.every(
3006      hash.get(),
3007      function(v, k) {
3008        return 'undefined' != typeof(current[k]) && current[k] == v;
3009      }
3010    );
3011
3012  } else if (!current && _.size(hash.get()) > 0) {
3013    result = false;
3014  }
3015
3016  return result;
3017};
3018
3019// [ABSTRACT] Widget save state (before widget load / reload)
3020ALoadable.prototype.saveState = function()
3021{
3022};
3023
3024// Show modal screen
3025ALoadable.prototype.shade = function()
3026{
3027  if (!this.base || !this.base.length) {
3028    return false;
3029  }
3030
3031  if (this.isShowModalScreen) {
3032    return true;
3033  }
3034
3035  if (this.isShade())  {
3036    var overlay = this.assignWaitOverlay(this.getShadeBase());
3037
3038    if (this.shadeClass) {
3039      overlay.addClass(this.shadeClass);
3040    }
3041
3042    this.triggerVent('shaded', this);
3043
3044  } else if (this.blockWidget) {
3045
3046    this.base.click(this.blocker).focus(this.blocker);
3047  }
3048
3049  this.isShowModalScreen = true;
3050
3051  return true;
3052};
3053
3054// Assemble overlay
3055ALoadable.prototype.assignWaitOverlay = function(base)
3056{
3057  return assignWaitOverlay(base);
3058};
3059
3060// Unshade widget
3061ALoadable.prototype.unshade = function()
3062{
3063  if (!this.base || !this.isShowModalScreen || this.isLoading) {
3064    return false;
3065  }
3066
3067  if (_.result(this, 'shadeWidget'))  {
3068    this.unassignWaitOverlay(this.getShadeBase());
3069    this.triggerVent('unshaded', this);
3070
3071  } else if (this.blockWidget) {
3072    this.base.unbind('click', this.blocker).unbind('focus', this.blocker);
3073  }
3074
3075  this.isShowModalScreen = false;
3076
3077  return true;
3078};
3079
3080ALoadable.prototype.unassignWaitOverlay = function(base)
3081{
3082  unassignWaitOverlay(base, true);
3083};
3084
3085ALoadable.prototype.isShade = function()
3086{
3087  var state = {
3088    widget: this,
3089    result: _.result(this, 'shadeWidget')
3090  };
3091
3092  this.triggerVent('shade', state);
3093
3094  return state.result;
3095};
3096
3097// Get base element for shade / unshade operation
3098ALoadable.prototype.getShadeBase = function() {
3099  return this.base;
3100};
3101
3102// Event blocker
3103ALoadable.prototype.blocker = function(event) {
3104  event.stopPropagation();
3105
3106  return false;
3107};
3108
3109// Submit specified form
3110ALoadable.prototype.submitForm = function(form, callback)
3111{
3112  return form.submitBackground(
3113    callback,
3114    false,
3115    {
3116      rpc: 'POST' == jQuery(form).attr('method').toUpperCase()
3117    }
3118  );
3119};;
3120/* AUTOGENERATED: xcart.utils.js */
3121/* vim: set ts=2 sw=2 sts=2 et: */
3122
3123/**
3124 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
3125 * See https://www.x-cart.com/license-agreement.html for license details.
3126 */
3127
3128window.xcart.utils = {
3129
3130	/**
3131	 * Generates hash from given value using md5 algorithm
3132	 * @param  mixed	value 	 Value to be hased
3133	 * @return string       	 MD5 hash of value
3134	 */
3135	hash: function(value) {
3136		return objectHash.MD5(value);
3137	},
3138
3139  /**
3140   * escape some html entities
3141   * @see select2 Utils.escapeMarkup
3142   * @param string str
3143   * @returns string
3144   */
3145  escapeString: function (str) {
3146    var replaceMap = {
3147      '\\': '&#92;',
3148      '&': '&amp;',
3149      '<': '&lt;',
3150      '>': '&gt;',
3151      '"': '&quot;',
3152      '\'': '&#39;',
3153      '/': '&#47;'
3154    };
3155
3156    // Do not try to escape the markup if it's not a string
3157    if (typeof str !== 'string') {
3158      return str;
3159    }
3160
3161    return String(str).replace(/[&<>"'\/\\]/g, function (match) {
3162      return replaceMap[match];
3163    });
3164  },
3165
3166  /**
3167   * Detect SVG width/height.
3168   *
3169   * @param {string} svgContent The content of the SVG image.
3170   *
3171   * @return {{width: number, height: number}} Image width and height, or {width: 0, height: 0} in case anything has
3172   *                                           gone wrong.
3173   */
3174  getSvgImageSizes: function (svgContent) {
3175    const elem = document.createElement('DIV');
3176    elem.setAttribute(
3177      'style',
3178      'position:fixed;top:-10000px;left:-10000px;width:3000px;height:3000px;opacity:0;z-index:-1000;pointer-events:none'
3179    );
3180    document.body.appendChild(elem);
3181
3182    elem.innerHTML = svgContent;
3183
3184    const svg = elem.querySelector('svg');
3185    let result = {
3186      width: 0,
3187      height: 0
3188    };
3189    if (svg && svg.getBBox) {
3190      result = svg.getBBox();
3191    }
3192    document.body.removeChild(elem);
3193
3194    return {
3195      width: Math.round(result.width),
3196      height: Math.round(result.height)
3197    };
3198  }
3199
3200};
3201
3202window.await = function (promises, callback) {
3203  jQuery.when.apply(jQuery, promises).done(callback);
3204};
3205
3206// Shim array.prototype.find for es5
3207if (!Array.prototype.find) {
3208  Object.defineProperty(Array.prototype, "find", {
3209    value: function(predicate) {
3210      if (this === null) {
3211        throw new TypeError('Array.prototype.find called on null or undefined');
3212      }
3213      if (typeof predicate !== 'function') {
3214        throw new TypeError('predicate must be a function');
3215      }
3216      var list = Object(this);
3217      var length = list.length >>> 0;
3218      var thisArg = arguments[1];
3219      var value;
3220
3221      for (var i = 0; i < length; i++) {
3222        value = list[i];
3223        if (predicate.call(thisArg, value, i, list)) {
3224          return value;
3225        }
3226      }
3227      return undefined;
3228    }
3229  });
3230};
3231/* AUTOGENERATED: lazyload.js */
3232/*jslint browser: true, eqeqeq: true, bitwise: true, newcap: true, immed: true, regexp: false */
3233
3234/**
3235LazyLoad makes it easy and painless to lazily load one or more external
3236JavaScript or CSS files on demand either during or after the rendering of a web
3237page.
3238
3239Supported browsers include Firefox 3.6+, IE9+, Safari 5.1.4+ (untested) (including Mobile
3240Safari), Google Chrome 10+, and Opera 12+. Other browsers may or may not work and
3241are not officially supported, including the browsers supported by the original LazyLoad:
3242Firefox 2+, IE6+, Safari 3+, Google Chrome 0.8+, and Opera 9+ (not yet tested).
3243
3244Visit https://github.com/lewisje/lazyload/ for more info.
3245
3246Copyright (c) 2011 Ryan Grove <[email protected]>
3247All rights reserved.
3248Changes made by Cezary Daniel Nowak, 2014, and James Edward Lewis II, 2015.
3249
3250Permission is hereby granted, free of charge, to any person obtaining a copy of
3251this software and associated documentation files (the 'Software'), to deal in
3252the Software without restriction, including without limitation the rights to
3253use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
3254the Software, and to permit persons to whom the Software is furnished to do so,
3255subject to the following conditions:
3256
3257The above copyright notice and this permission notice shall be included in all
3258copies or substantial portions of the Software.
3259
3260THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3261IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
3262FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
3263COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
3264IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
3265CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3266
3267@module lazyload
3268@class LazyLoad
3269@static
3270*/
3271
3272var LazyLoad = (function (doc) {
3273  'use strict';
3274  // -- Private Variables ------------------------------------------------------
3275
3276  // Reference to the <head> element (populated lazily).
3277  var head,
3278
3279  // Requests currently in progress, if any.
3280  pending = {},
3281
3282  // Number of times we've polled to check whether a pending stylesheet has
3283  // finished loading. If this gets too high, we're probably stalled.
3284  pollCount = 0,
3285
3286  // Cached requests.
3287  cache = {},
3288
3289  // Queued requests.
3290  queue = {css: [], js: []},
3291  
3292  // Whether Function#bind exists.
3293  canBind = typeof Function.prototype.bind === 'function',
3294
3295  // Reference to the browser's list of stylesheets.
3296  styleSheets = doc.styleSheets,
3297  finishCSS = canBind ? finish.bind(doc, 'css') : function finishCSS() {finish('css');},
3298  ua = navigator.userAgent,
3299  // User agent and feature test information.
3300  env = {
3301    // True if this browser supports disabling async mode on dynamically
3302    // created script nodes. See
3303    // http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order
3304    async: createNode('script').async === true
3305  };
3306
3307  if (/AppleWebKit\//.test(ua)) env.webkit = true;
3308  else if (/MSIE|Trident/.test(ua)) env.ie = true;
3309  else if (/Opera/.test(ua)) env.opera = true;
3310  else if (/Gecko\//.test(ua)) env.gecko = true;
3311  else env.unknown = true;
3312  // -- Private Methods --------------------------------------------------------
3313
3314  /**
3315  Creates and returns an HTML element with the specified name and attributes.
3316
3317  @method createNode
3318  @param {String} name element name
3319  @param {Object} attrs name/value mapping of element attributes
3320  @return {HTMLElement}
3321  @private
3322  */
3323  function createNode(name, attrs) {
3324    var attr,
3325        node = doc.createElement(name);
3326
3327    if(attrs) {
3328      for (attr in attrs) {
3329        if (attrs.hasOwnProperty(attr)) {
3330          node.setAttribute(attr, attrs[attr]);
3331        }
3332      }
3333    }
3334
3335    return node;
3336  }
3337
3338  /**
3339  Called when the current pending resource of the specified type has finished
3340  loading. Executes the associated callback (if any) and loads the next
3341  resource in the queue.
3342
3343  @method finish
3344  @param {String} type resource type ('css' or 'js')
3345  @private
3346  */
3347  function finish(type) {
3348    var p = pending[type], callback, urls;
3349
3350    if (p) {
3351      callback = p.callback;
3352      urls = p.urls;
3353
3354      cache[urls.shift()] = true;
3355      pollCount = 0;
3356
3357      // If this is the last of the pending URLs, execute the callback and
3358      // start the next request in the queue (if any).
3359      if (!urls.length) {
3360        if (typeof callback === 'function') callback.call(p.context, p.obj);
3361        pending[type] = 0;
3362        if (queue[type].length) load(type);
3363      }
3364    }
3365  }
3366
3367  /**
3368  Loads the specified resources, or the next resource of the specified type
3369  in the queue if no resources are specified. If a resource of the specified
3370  type is already being loaded, the new request will be queued until the
3371  first request has been finished.
3372
3373  When an array of resource URLs is specified, those URLs will be loaded in
3374  parallel if it is possible to do so while preserving execution order. All
3375  browsers support parallel loading of CSS, but only Firefox and Opera
3376  support parallel loading of scripts. In other browsers, scripts will be
3377  queued and loaded one at a time to ensure correct execution order.
3378
3379  @method load
3380  @param {String} type resource type ('css' or 'js')
3381  @param {String|Array} urls (optional) URL or array of URLs to load
3382  @param {Function} callback (optional) callback function to execute when the
3383    resource is loaded
3384  @param {Object} obj (optional) object to pass to the callback function
3385  @param {Object} context (optional) if provided, the callback function will
3386    be executed in this object's context
3387  @private
3388  */
3389  function load(type, urls, callback, obj, context) {
3390    var _finish = canBind ? finish.bind(doc, type) : function _finish() {finish(type);},
3391        isCSS = type === 'css', nodes = [], i, len, node, p, pendingUrls, url;
3392
3393    if (urls) {
3394      // If urls is a string, wrap it in an array. Otherwise assume it's an
3395      // array and create a copy of it so modifications won't be made to the
3396      // original.
3397      urls = typeof urls === 'string' ? [urls] : urls.slice();
3398
3399      // Create a request object for each URL. If multiple URLs are specified,
3400      // the callback will only be executed after all URLs have been loaded.
3401      //
3402      // Sadly, Firefox and Opera are the only browsers capable of loading
3403      // scripts in parallel while preserving execution order. In all other
3404      // browsers, scripts must be loaded sequentially.
3405      //
3406      // All browsers respect CSS specificity based on the order of the link
3407      // elements in the DOM, regardless of the order in which the stylesheets
3408      // are actually downloaded.
3409      if (isCSS || env.async || env.gecko || env.opera) {
3410        // Load in parallel.
3411        queue[type].push({
3412          urls : urls,
3413          callback: callback,
3414          obj : obj,
3415          context : context
3416        });
3417      } else {
3418        // Load sequentially.
3419        for (i = 0, len = urls.length; i < len; ++i) {
3420          queue[type].push({
3421            urls : [urls[i]],
3422            callback: i === len - 1 ? callback : 0, // callback is only added to the last URL
3423            obj : obj,
3424            context : context
3425          });
3426        }
3427      }
3428    }
3429
3430    // If a previous load request of this type is currently in progress, we'll
3431    // wait our turn. Otherwise, grab the next item in the queue.
3432    if (pending[type] || !(p = pending[type] = queue[type].shift())) return;
3433    head = head || doc.head || doc.getElementsByTagName('head')[0];
3434    pendingUrls = p.urls.slice();
3435
3436    var nodeReady = function nodeReady() {
3437      if (/^(?:loaded|complete)$/i.test(node.readyState)) {
3438        node.onreadystatechange = null;
3439        _finish();
3440      }
3441    };
3442    for (i = 0, len = pendingUrls.length; i < len; ++i) {
3443      url = pendingUrls[i];
3444      if(cache[url] != null && !url.startsWith("var/theme/custom.css")) {
3445        // _finish here can cause unexpected behavior when cache[url] === false but
3446        // I won't figure out solution, since first issue on github :-)
3447        _finish();
3448        continue; //prevent scripts/css from being loaded multiple times
3449      } else {
3450        cache[url] = false;
3451      }
3452      if (isCSS) {
3453        node = env.gecko ? createNode('style') : createNode('link', {
3454          href: url,
3455          rel : 'stylesheet'
3456        });
3457      } else {
3458        node = createNode('script', {src: url});
3459        node.async = false;
3460      }
3461
3462      node.className = 'lazyload';
3463      node.setAttribute('charset', 'utf-8');
3464
3465      if (env.ie && !isCSS && 'onreadystatechange' in node && !('draggable' in node)) {
3466        node.onreadystatechange = nodeReady;
3467      } else if (isCSS && (env.gecko || env.webkit)) {
3468        // Gecko and WebKit don't support the onload event on link nodes.
3469        if (env.webkit) {
3470          // In WebKit, we can poll for changes to document.styleSheets to
3471          // figure out when stylesheets have loaded.
3472          p.urls[i] = node.href; // resolve relative URLs (or polling won't work)
3473          pollWebKit();
3474        } else {
3475          // In Gecko, we can import the requested URL into a <style> node and
3476          // poll for the existence of node.sheet.cssRules. Props to Zach
3477          // Leatherman for calling my attention to this technique.
3478          node.innerHTML = '@import "' + url + '";';
3479          pollGecko(node);
3480        }
3481      } else {
3482        node.onload = node.onerror = _finish;
3483      }
3484      nodes.push(node);
3485    }
3486    for (i = 0, len = nodes.length; i < len; ++i) {
3487      head.appendChild(nodes[i]);
3488    }
3489  }
3490
3491  /**
3492  Begins polling to determine when the specified stylesheet has finished loading
3493  in Gecko. Polling stops when all pending stylesheets have loaded or after 10
3494  seconds (to prevent stalls).
3495
3496  Thanks to Zach Leatherman for calling my attention to the @import-based
3497  cross-domain technique used here, and to Oleg Slobodskoi for an earlier
3498  same-domain implementation. See Zach's blog for more details:
3499  http://www.zachleat.com/web/2010/07/29/load-css-dynamically/
3500
3501  @method pollGecko
3502  @param {HTMLElement} node Style node to poll.
3503  @private
3504  */
3505  function pollGecko(node) {
3506    var hasRules = 'sheet' in node && node.sheet && 'cssRules' in node.sheet;
3507
3508    if (!hasRules) {
3509      // The stylesheet is still loading.
3510      ++pollCount;
3511      if (pollCount < 200) {
3512        setTimeout(canBind ? pollGecko.bind(doc, node) : function pollBind() {pollGecko(node);}, 50);
3513      } else {
3514        // We've been polling for 10 seconds and nothing's happened. Stop
3515        // polling and finish the pending requests to avoid blocking further
3516        // requests.
3517        if (hasRules) finishCSS();
3518      }
3519      return;
3520    }
3521    // If we get here, the stylesheet has loaded.
3522    finishCSS();
3523  }
3524
3525  /**
3526  Begins polling to determine when pending stylesheets have finished loading
3527  in WebKit. Polling stops when all pending stylesheets have loaded or after 10
3528  seconds (to prevent stalls).
3529
3530  @method pollWebKit
3531  @private
3532  */
3533  function pollWebKit() {
3534    var css = pending.css, i;
3535
3536    if (css) {
3537      i = styleSheets.length;
3538      // Look for a stylesheet matching the pending URL.
3539      while (--i >= 0) {
3540        if (styleSheets[i].href === css.urls[0]) {
3541          finishCSS();
3542          break;
3543        }
3544      }
3545
3546      ++pollCount;
3547      if (css) {
3548        if (pollCount < 200) {
3549          setTimeout(pollWebKit, 50);
3550        } else {
3551          // We've been polling for 10 seconds and nothing's happened, which may
3552          // indicate that the stylesheet has been removed from the document
3553          // before it had a chance to load. Stop polling and finish the pending
3554          // request to prevent blocking further requests.
3555          finishCSS();
3556        }
3557      }
3558    }
3559  }
3560
3561  return {
3562    /**
3563    Requests the specified CSS URL or URLs and executes the specified
3564    callback (if any) when they have finished loading. If an array of URLs is
3565    specified, the stylesheets will be loaded in parallel and the callback
3566    will be executed after all stylesheets have finished loading.
3567
3568    @method css
3569    @param {String|Array} urls CSS URL or array of CSS URLs to load
3570    @param {Function} callback (optional) callback function to execute when
3571      the specified stylesheets are loaded
3572    @static
3573    */
3574    css: canBind ? load.bind(load, 'css') : function css(urls, callback, obj, context) {
3575      load('css', urls, callback, obj, context);
3576    },
3577
3578    /**
3579    Requests the specified JavaScript URL or URLs and executes the specified
3580    callback (if any) when they have finished loading. If an array of URLs is
3581    specified and the browser supports it, the scripts will be loaded in
3582    parallel and the callback will be executed after all scripts have
3583    finished loading.
3584
3585    Currently, only Firefox and Opera support parallel loading of scripts while
3586    preserving execution order. In other browsers, scripts will be
3587    queued and loaded one at a time to ensure correct execution order.
3588
3589    @method js
3590    @param {String|Array} urls JS URL or array of JS URLs to load
3591    @param {Function} callback (optional) callback function to execute when
3592      the specified scripts are loaded
3593    @static
3594    */
3595    js: canBind ? load.bind(load, 'js') : function js(urls, callback, obj, context) {
3596      load('js', urls, callback, obj, context);
3597    }
3598  };
3599})(this.document);;
3600/* AUTOGENERATED: json5.min.js */
3601!function(u,D){"object"==typeof exports&&"undefined"!=typeof module?module.exports=D():"function"==typeof define&&define.amd?define(D):u.JSON5=D()}(this,function(){"use strict";var u={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB
3601D3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB
3601D3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},D={isSpaceSeparator:D=>u.Space_Separator.test(D),isIdStartChar:D=>D>="a"&&D<="z"||D>="A"&&D<="Z"||"$"===D||"_"===D||u.ID_Start.test(D),isIdContinueChar:D=>D>="a"&&D<="z"||D>="A"&&D<="Z"||D>="0"&&D<="9"||"$"===D||"_"===D||"‌"===D||"‍"===D||u.ID_Continue.test(D),isDigit:u=>/[0-9]/.test(u),isHexDigit:u=>/[0-9A-Fa-f]/.test(u)};let F,e,C,A,E,t,r,n,i;let B,a,o,c,s;function f(){for(B="default",a="",o=!1,c=1;;){s=l();const u=h[B]();if(u)return u}}function l(){if(F[A])return String.fromCodePoint(F.codePointAt(A))}function d(){const u=l();return"\n"===u?(E++,t=0):u?t+=u.length:t++,u&&(A+=u.length),u}const h={default(){switch(s){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void d();case"/":return d(),void(B="comment");case void 0:return d(),m("eof")}
vendor: 4,211 bytes, line 3601
3601if(!D.isSpaceSeparator(s))return h[e]();d()},comment(){switch(s){case"*":return d(),void(B="multiLineComment");case"/":return d(),void(B="singleLineComment")}throw b(d())},multiLineComment(){switch(s){case"*":return d(),void(B="multiLineCommentAsterisk");case void 0:throw b(d())}d()},multiLineCommentAsterisk(){switch(s){case"*":return void d();case"/":return d(),void(B="default");case void 0:throw b(d())}d(),B="multiLineComment"},singleLineComment(){switch(s){case"\n":case"\r":case"\u2028":case"\u2029":return d(),void(B="default");case void 0:return d(),m("eof")}d()},value(){switch(s){case"{":case"[":return m("punctuator",d());case"n":return d(),p("ull"),m("null",null);case"t":return d(),p("rue"),m("boolean",!0);case"f":return d(),p("alse"),m("boolean",!1);case"-":case"+":return"-"===d()&&(c=-1),void(B="sign");case".":return a=d(),void(B="decimalPointLeading");case"0":return a=d(),void(B="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return a=d(),void(B="decimalInteger");case"I":return d(),p("nfinity"),m("numeric",1/0);case"N":return d(),p("aN"),m("numeric",NaN);case'"':case"'":return o='"'===d(),a="",void(B="string")}throw b(d())},identifierNameStartEscape(){if("u"!==s)throw b(d());d();const u=v();switch(u){case"$":case"_":break;default:if(!D.isIdStartChar(u))throw S()}a+=u,B="identifierName"},identifierName(){switch(s){case"$":case"_":case"‌":case"‍":return void(a+=d());case"\\":return d(),void(B="identifierNameEscape")}if(!D.isIdContinueChar(s))return m("identifier",a);a+=d()},identifierNameEscape(){if("u"!==s)throw b(d());d();const u=v();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!D.isIdContinueChar(u))throw S()}a+=u,B="identifierName"},sign(){switch(s){case".":return a=d(),void(B="decimalPointLeading");case"0":return a=d(),void(B="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return a=d(),void(B="decimalInteger");case"I":return d(),p("nfinity"),m("numeric",c*(1/0));case"N":return d(),p("aN"),m("numeric",NaN)}throw b(d())},zero(){switch(s){case".":return a+=d(),void(B="decimalPoint");case"e":case"E":return a+=d(),void(B="decimalExponent");case"x":case"X":return a+=d(),void(B="hexadecimal")}return m("numeric",0*c)},decimalInteger(){switch(s){case".":return a+=d(),void(B="decimalPoint");case"e":case"E":return a+=d(),void(B="decimalExponent")}if(!D.isDigit(s))return m("numeric",c*Number(a));a+=d()},decimalPointLeading(){if(D.isDigit(s))return a+=d(),void(B="decimalFraction");throw b(d())},decimalPoint(){switch(s){case"e":case"E":return a+=d(),void(B="decimalExponent")}return D.isDigit(s)?(a+=d(),void(B="decimalFraction")):m("numeric",c*Number(a))},decimalFraction(){switch(s){case"e":case"E":return a+=d(),void(B="decimalExponent")}if(!D.isDigit(s))return m("numeric",c*Number(a));a+=d()},decimalExponent(){switch(s){case"+":case"-":return a+=d(),void(B="decimalExponentSign")}if(D.isDigit(s))return a+=d(),void(B="decimalExponentInteger");throw b(d())},decimalExponentSign(){if(D.isDigit(s))return a+=d(),void(B="decimalExponentInteger");throw b(d())},decimalExponentInteger(){if(!D.isDigit(s))return m("numeric",c*Number(a));a+=d()},hexadecimal(){if(D.isHexDigit(s))return a+=d(),void(B="hexadecimalInteger");throw b(d())},hexadecimalInteger(){if(!D.isHexDigit(s))return m("numeric",c*Number(a));a+=d()},string(){switch(s){case"\\":return d(),void(a+=function(){switch(l()){case"b":return d(),"\b";case"f":return d(),"\f";case"n":return d(),"\n";case"r":return d(),"\r";case"t":return d(),"\t";case"v":return d(),"\v";case"0":if(d(),D.isDigit(l()))throw b(d());return"\0";case"x":return d(),function(){let u="",F=l();if(!D.isHexDigit(F))throw b(d());if(u+=d(),F=l(),!D.isHexDigit(F))throw b(d());return u+=d(),String.fromCodePoint(parseInt(u,16))}();case"u":return d(),v();case"\n":case"\u2028":case"\u2029":return d(),"";case"\r":return d(),"\n"===l()&&d(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw b(d())}return d()}());case'"':return o?(d(),m("string",a)):void(a+=d());case"'":return o?void(a+=d()):(d(),m("string",a));case"\n":case"\r":throw b(d());case"\u2028":case"\u2029":!function(u){console.warn(`JSON5: '${x(u)}
3601' in strings is not valid ECMAScript; consider escaping`)}(s);break;case void 0:throw b(d())}a+=d()},start(){switch(s){case"{":case"[":return m("punctuator",d())}B="value"},beforePropertyName(){switch(s){case"$":case"_":return a=d(),void(B="identifierName");case"\\":return d(),void(B="identifierNameStartEscape");case"}":return m("punctuator",d());case'"':case"'":return o='"'===d(),void(B="string")}if(D.isIdStartChar(s))return a+=d(),void(B="identifierName");throw b(d())},afterPropertyName(){if(":"===s)return m("punctuator",d());throw b(d())},beforePropertyValue(){B="value"},afterPropertyValue(){switch(s){case",":case"}":return m("punctuator",d())}throw b(d())},beforeArrayValue(){if("]"===s)return m("punctuator",d());B="value"},afterArrayValue(){switch(s){case",":case"]":return m("punctuator",d())}throw b(d())},end(){throw b(d())}};function m(u,D){return{type:u,value:D,line:E,column:t}}function p(u){for(const D of u){if(l()!==D)throw b(d());d()}}function v(){let u="",F=4;for(;F-- >0;){const F=l();if(!D.isHexDigit(F))throw b(d());u+=d()}return String.fromCodePoint(parseInt(u,16))}const g={start(){if("eof"===r.type)throw N();y()},beforePropertyName(){switch(r.type){case"identifier":case"string":return n=r.value,void(e="afterPropertyName");case"punctuator":return void w();case"eof":throw N()}},afterPropertyName(){if("eof"===r.type)throw N();e="beforePropertyValue"},beforePropertyValue(){if("eof"===r.type)throw N();y()},beforeArrayValue(){if("eof"===r.type)throw N();"punctuator"!==r.type||"]"!==r.value?y():w()},afterPropertyValue(){if("eof"===r.type)throw N();switch(r.value){case",":return void(e="beforePropertyName");case"}":w()}},afterArrayValue(){if("eof"===r.type)throw N();switch(r.value){case",":return void(e="beforeArrayValue");case"]":w()}},end(){}};function y(){let u;switch(r.type){case"punctuator":switch(r.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=r.value}if(void 0===i)i=u;else{const D=C[C.length-1];Array.isArray(D)?D.push(u):D[n]=u}if(null!==u&&"object"==typeof u)C.push(u),e=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=C[C.length-1];e=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}}function w(){C.pop();const u=C[C.length-1];e=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function b(u){return P(void 0===u?`JSON5: invalid end of input at ${E}:${t}`:`JSON5: invalid character '${x(u)}' at ${E}:${t}`)}function N(){return P(`JSON5: invalid end of input at ${E}:${t}`)}function S(){return P(`JSON5: invalid identifier character at ${E}:${t-=5}`)}function x(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return"\\x"+("00"+D).substring(D.length)}return u}function P(u){const D=new SyntaxError(u);return D.lineNumber=E,D.columnNumber=t,D}return{parse:function(u,D){F=String(u),e="start",C=[],A=0,E=1,t=0,r=void 0,n=void 0,i=void 0;do{r=f(),g[e]()}while("eof"!==r.type);return"function"==typeof D?function u(D,F,e){const C=D[F];if(null!=C&&"object"==typeof C)for(const D in C){const F=u(C,D,e);void 0===F?delete C[D]:C[D]=F}return e.call(D,F,C)}({"":i},"",D):i},stringify:function(u,F,e){const C=[];let A,E,t,r="",n="";if(null==F||"object"!=typeof F||Array.isArray(F)||(e=F.space,t=F.quote,F=F.replacer),"function"==typeof F)E=F;else if(Array.isArray(F)){A=[];for(const u of F){let D;"string"==typeof u?D=u:("number"==typeof u||u instanceof String||u instanceof Number)&&(D=String(u)),void 0!==D&&A.indexOf(D)<0&&A.push(D)}}return e instanceof Number?e=Number(e):e instanceof String&&(e=String(e)),"number"==typeof e?e>0&&(e=Math.min(10,Math.floor(e)),n="          ".substr(0,e)):"string"==typeof e&&(n=e.substr(0,10)),i("",{"":u});function i(u,D){let F=D[u];switch(null!=F&&("function"==typeof F.toJSON5?F=F.toJSON5(u):"function"==typeof F.toJSON&&(F=F.toJSON(u))),E&&(F=E.call(D,u,F)),F instanceof Number?F=Number(F):F instanceof String?F=String(F):F instanceof Boolean&&(F=F.valueOf()),F){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof F?B(F):"number"==typeof F?String(F):"object"==typeof F?Array.isArray(F)?function(u){if(C.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");C.push(u);let D=r;r+=n;let F,e=[];for(let D=0;D<u.length;D++){const F=i(String(D),u);e.push(void 0!==F?F:"null")}if(0===e.length)F="[]";else if(""===n){let u=e.join(",");F="["+u+"]"}else{let u=",\n"+r,C=e.join(u);F="[\n"+r+C+",\n"+D+"]"}return C.pop(),r=D,F}(F):function(u){if(C.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");C.push(u);let D=r;r+=n;let F,e=A||Object.keys(u),E=[];for(const D of e){const F=i(D,u);if(void 0!==F){let u=a(D)+":";""!==n&&(u+=" "),u+=F,E.push(u)}}if(0===E.length)F="{}";else{let u;if(""===n)u=E.join(","),F="{"+u+"}";else{let e=",\n"+r;u=E.join(e),F="{\n"+r+u+",\n"+D+"}"}}return C.pop(),r=D,F}(F):void 0}function B(u){const D={"'":.1,'"':.2},F={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let e="";for(const C of u){switch(C){case"'":case'"':D[C]++,e+=C;continue}if(F[C])e+=F[C];else if(C<" "){let u=C.charCodeAt(0).toString(16);
3601e+="\\x"+("00"+u).substring(u.length)}else e+=C}const C=t||Object.keys(D).reduce((u,F)=>D[u]<D[F]?u:F);return C+(e=e.replace(new RegExp(C,"g"),F[C]))+C}function a(u){if(0===u.length)return B(u);const F=String.fromCodePoint(u.codePointAt(0));if(!D.isIdStartChar(F))return B(u);for(let e=F.length;e<u.length;e++)if(!D.isIdContinueChar(String.fromCodePoint(u.codePointAt(e))))return B(u);return u}}}});;
3602/* AUTOGENERATED: xcart.form.js */
3603/* vim: set ts=2 sw=2 sts=2 et: */
3604
3605/**
3606 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
3607 * See https://www.x-cart.com/license-agreement.html for license details.
3608 */
3609
3610/**
3611 * Form
3612 */
3613
3614// Constructor
3615function CommonForm(form)
3616{
3617  if (!form) {
3618    return false;
3619  }
3620
3621  form = jQuery(form).filter('form').eq(0);
3622  if (!form.length || form.get(0).commonController) {
3623    return false;
3624  }
3625
3626  this.form = form.get(0);
3627  this.$form = form;
3628
3629  var o = this;
3630
3631  this.form.commonController = this;
3632
3633  if (!this.form.getAttribute('id')) {
3634    var d = new Date();
3635    this.form.setAttribute('id', 'form-' + d.getTime());
3636  }
3637
3638  var methods = [
3639    'validate', 'submitBackground', 'isChanged', 'getElements'
3640  ];
3641
3642  for (var i = 0; i < methods.length; i++) {
3643    var method = methods[i];
3644    this.form[method] = new Function('', 'return this.commonController.' + method + '.apply(this.commonController, arguments);');
3645  }
3646
3647  this.form.isBgSubmitting = false;
3648
3649  // Central validation before form submit and background submit
3650  form.submit(
3651    function(event)
3652    {
3653      jQuery('input', this).trigger('sanitize');
3654
3655      if (this.isBgSubmitting) {
3656        return false;
3657      }
3658
3659      o.triggerVent('submit.prevalidate', o);
3660
3661      var result = this.validate();
3662
3663      if (result && o.submitOnlyChanged && !o.isChanged(true)) {
3664        result = false;
3665      }
3666
3667      // Trigger the validationSuccess or validationFailure events accordingly the validation result
3668      var validationEvent = jQuery.Event(result ? 'validationSuccess' : 'validationFailure');
3669      o.$form.trigger(validationEvent);
3670
3671      if (result && o.backgroundSubmit) {
3672        var e = jQuery.Event('beforeSubmit');
3673        o.$form.trigger(e);
3674
3675        o.triggerVent('submit.postvalidate', o);
3676
3677        if (e.result !== false) {
3678          o.unmarkAsInvalid();
3679          if (o.submitBackground(null, true)) {
3680            result = false;
3681          }
3682        }
3683
3684      } else if (result) {
3685        o.unmarkAsInvalid();
3686      }
3687
3688      return result;
3689    }
3690  );
3691
3692  this.bindElements();
3693
3694  // Process invalidElement event
3695  xcart.bind(
3696    'invalidElement',
3697    function(event, data) {
3698      if (o.form.isBgSubmitting && o.form.elements.namedItem(data.name)) {
3699        o.form.elements.namedItem(data.name).markAsInvalid(data.message, null, true);
3700      }
3701    }
3702  );
3703
3704  // Process invalidForm event
3705  xcart.bind(
3706    'invalidForm',
3707    function(event, data) {
3708      if (data.name && o.$form.is('.' + data.name)) {
3709        o.markAsInvalid(data.message);
3710        o.triggerVent(
3711          'invalid.form',
3712          _.extend(_.clone(data), {widget: o})
3713        );
3714      }
3715    }
3716  );
3717
3718  var triggerStateEvents = function(form) {
3719    if (form.get(0).commonController.isChanged()) {
3720      form.addClass('changed');
3721      form.trigger('state-changed', {
3722        valid: form.get(0).commonController.validate(true)
3723      });
3724
3725    } else {
3726      form.removeClass('changed');
3727      form.trigger('state-initial');
3728    }
3729  };
3730
3731  var debouncedTriggerStateEvents = _.debounce(triggerStateEvents, 100);
3732
3733  var changeHandler = function (event) {
3734    var obj = event.target || event.srcElement;
3735    var form = jQuery(this);
3736
3737    if (
3738      !obj
3739      || !jQuery(obj)
3740      || !jQuery(obj).hasClass('not-significant')
3741    ) {
3742      debouncedTriggerStateEvents(form);
3743    }
3744
3745    if (!jQuery(obj).hasClass('selectAll')) {
3746      if (form.find('input.selector:checked').length > 0) {
3747        if (!form.hasClass('more-action-enabled')) {
3748          form.addClass('more-action-enabled');
3749          form.trigger('more-action-enabled');
3750        }
3751
3752      } else if (form.hasClass('more-action-enabled')) {
3753        form.removeClass('more-action-enabled');
3754        form.trigger('more-action-initial');
3755      }
3756    }
3757
3758    var state = this.commonController.checkDependencyState();
3759    this.commonController.setDependencyState(state);
3760  };
3761
3762  form.change(changeHandler);
3763
3764  var state = this.checkDependencyState();
3765  this.setDependencyState(state);
3766
3767  this.triggerVent('initialized', this);
3768}
3769
3770extend(CommonForm, Base);
3771
3772// Element controllers
3773CommonForm.elementControllers = [];
3774
3775// Autoload class method
3776CommonForm.autoload = function()
3777{
3778  jQuery('form').each(
3779    function() {
3780      new CommonForm(this);
3781    }
3782  );
3783};
3784
3785// Autoassign class method
3786CommonForm.autoassign = function(base)
3787{
3788  jQuery('form', base).each(
3789    function() {
3790      new CommonForm(this);
3791    }
3792  );
3793
3794  jQuery(base).parents('form').each(
3795    function() {
3796      if (typeof(this.commonController) !== 'undefined') {
3797        this.commonController.bindElements();
3798      }
3799    }
3800  );
3801};
3802
3803// Form DOM element
3804CommonForm.prototype.form = null;
3805
3806// Form jQuery element
3807CommonForm.prototype.$form = null;
3808
3809CommonForm.prototype.blurTTL = 300;
3810
3811CommonForm.prototype.elementBlurTO = null;
3812
3813CommonForm.prototype.isFocus = false;
3814/**
3815 * Options
3816 */
3817
3818// Auto-submit form in background mode
3819CommonForm.prototype.backgroundSubmit = false;
3820
3821// Submit form ony if form changed
3822CommonForm.prototype.submitOnlyChanged = false;
3823
3824// POST request as RPC-request
3825CommonForm.prototype.postAsRPC = true;
3826
3827// GET request as RPC-request
3828CommonForm.prototype.getAsRPC = false;
3829
3830CommonForm.prototype.errorPlace = null;
3831
3832CommonForm.prototype.formIdName = 'xcart_form_id';
3833// Get elements jQuery collection
3834CommonForm.prototype.getElements = function()
3835{
3836  var data = {
3837    widget: this,
3838    list:  this.$form.find(':input, .separator h2')
3839  };
3840
3841  this.triggerVent('filterElements', data);
3842
3843  return data.list;
3844};
3845
3846// Bind form elements
3847CommonForm.prototype.bindElements = function()
3848{
3849  var o = this;
3850  var form = this.$form;
3851
3852  this.getElements().each(
3853    function() {
3854      if (typeof(this.commonController) === 'undefined') {
3855        var elm = new CommonElement(this);
3856
3857        jQuery.each(
3858          CommonForm.elementControllers,
3859          function (i, controller) {
3860            if (typeof(controller) === 'function') {
3861
3862              // Controller is function-handler
3863              controller.call(elm);
3864            }
3865          }
3866        );
3867
3868        this.commonController.bind('local.blur', _.bind(o.handleElementBlur, o));
3869        this.commonController.bind('local.focus', _.bind(o.handleElementFocus, o));
3870      }
3871    }
3872  );
3873
3874  jQuery.each(
3875    CommonForm.elementControllers,
3876    function (i, controller) {
3877      if (
3878        typeof(controller) === 'object'
3879        && form.find(controller.pattern).length > 0
3880        && (typeof(controller.condition) === 'undefined' || form.find(controller.condition).length > 0)
3881      ) {
3882
3883        // Controller is { pattern: '.element', handler: function () { ... } }
3884        form.find(controller.pattern).each(
3885          function () {
3886            if (typeof(this.assignedElementControllers) === 'undefined') {
3887              this.assignedElementControllers = [];
3888            }
3889
3890            if (jQuery.inArray(i, this.assignedElementControllers) == -1) {
3891              controller.handler.call(this, form);
3892              this.assignedElementControllers.push(i);
3893            }
3894          }
3895        );
3896      }
3897    }
3898  );
3899
3900  // Cancel button
3901  this.$form.find('.form-cancel')
3902    .not('.assigned')
3903    .click(
3904      function (event) {
3905        event.stopPropagation();
3906        var form = jQuery(this).not('.disabled').parents('form').get(0);
3907        if (form ) {
3908          form.commonController.undo();
3909        }
3910
3911        return false;
3912      }
3913    )
3914    .addClass('assigned');
3915};
3916
3917// Validate form
3918CommonForm.prototype.validate = function(options)
3919{
3920  var silent = options;
3921  var focus = true;
3922  if (typeof(options) === 'object') {
3923    var silent = typeof(options.silent) !== 'undefined' ? options.silent : false;
3924    var focus = typeof(options.focus) !== 'undefined' ? options.focus : true;
3925  }
3926
3927  var options = focus !== false;
3928  var all = this.getElements();
3929  var failed = all.filter('input,select,textarea').filter(
3930    function() {
3931      return this.commonController && !this.commonController.validate(silent);
3932    }
3933  );
3934
3935  var state = {
3936    'widget': this,
3937    'result': failed.length == 0,
3938    'all':    all,
3939    'failed': failed
3940  };
3941  this.triggerVent('validate', state);
3942
3943  if (!state.result && !silent && focus) {
3944    this.focusOnFirstInvalid();
3945  }
3946
3947  return state.result;
3948};
3949
3950CommonForm.prototype.focusOnFirstInvalid = function(message)
3951{
3952  var elm = this.getElements().filter('.validation-error').eq(0);
3953  if (elm.length) {
3954    elm.focus();
3955  }
3956};
3957
3958CommonForm.prototype.markAsInvalid = function(message)
3959{
3960  this.getErrorPlace()
3961    .html(message)
3962    .show();
3963
3964  this.$form.addClass('invalid-form');
3965};
3966
3967CommonForm.prototype.unmarkAsInvalid = function()
3968{
3969  this.getErrorPlace()
3970    .hide();
3971
3972  this.$form.removeClass('invalid-form');
3973};
3974
3975CommonForm.prototype.getFormId = function () {
3976  return this.$form
3977    .find('input[type="hidden"]')
3978    .filter('input[name="' + this.formIdName + '"]').eq(0)
3979    .val();
3980};
3981
3982CommonForm.prototype.replaceCSRFToken = function (value) {
3983  return this.$form
3984    .find('input[type="hidden"]')
3985    .filter('input[name="' + this.formIdName + '"]').eq(0)
3986    .val(value);
3987};
3988
3989CommonForm.prototype.getErrorPlace = function () {
3990  if (!this.errorPlace) {
3991    this.errorPlace = jQuery('<div></div>')
3992      .addClass('form-error')
3993      .hide()
3994      .insertBefore(this.$form.children().eq(0));
3995  }
3996
3997  return this.errorPlace;
3998};
3999
4000// Undo all changes
4001CommonForm.prototype.undo = function () {
4002  this.getElements().filter('input,select,textarea').each(function () {
4003    this.commonController.undo();
4004  });
4005  this.$form.trigger('undo');
4006  this.$form.change();
4007};
4008
4009// Enabled background submit mode and set callbacks
4010CommonForm.prototype.enableBackgroundSubmit = function(beforeCallback, afterCallback) {
4011  this.backgroundSubmit = true;
4012
4013  if (beforeCallback) {
4014    this.$form.bind('beforeSubmit', beforeCallback);
4015  }
4016
4017  if (afterCallback) {
4018    this.$form.bind('afterSubmit', afterCallback);
4019  }
4020
4021  return this;
4022};
4023
4024// Submit form in background mode
4025CommonForm.prototype.submitBackground = function(callback, disableValidation, options)
4026{
4027  var result = false;
4028
4029  if (disableValidation || this.form.validate()) {
4030
4031    var state = {
4032      'widget': this,
4033      'state':  true
4034    };
4035
4036    this.triggerVent('beforeSubmit', state);
4037    if (!state.state) {
4038      return result;
4039    }
4040
4041    this.preprocessBackgroundSubmit();
4042
4043    var o = this;
4044
4045    var isPOST = this.$form.attr('method').toUpperCase() == 'POST';
4046    var method = isPOST ? 'post' : 'get';
4047
4048    options = options || {};
4049
4050    if (
4051      typeof(options.rpc) === 'undefined'
4052      && ((isPOST && this.postAsRPC) || (!isPOST && this.getAsRPC))
4053    ) {
4054      options.rpc = true;
4055    }
4056
4057    if (typeof(options.timeout) === 'undefined') {
4058      options.timeout = 60000;
4059    }
4060
4061    result = xcart[method](
4062      this.$form.attr('action'),
4063      function(XMLHttpRequest, textStatus, data, isValid) {
4064        var args = {
4065          'XMLHttpRequest': XMLHttpRequest,
4066          'textStatus':     textStatus,
4067          'data':           data,
4068          'isValid':        isValid
4069        };
4070        o.postprocessBackgroundSubmit();
4071        o.tryRestoreCSRFToken(XMLHttpRequest);
4072        o.$form.trigger('afterSubmit', args);
4073        o.triggerVent('submitted', args);
4074        if (isValid) {
4075          o.triggerVent('submit.success', args);
4076
4077        } else {
4078          o.triggerVent('submit.error', args);
4079        }
4080
4081        return callback ? callback(XMLHttpRequest, textStatus, data, isValid) : true;
4082      },
4083      this.getSerializedValues(),
4084      options
4085    );
4086
4087    if (result) {
4088      this.form.currentSubmitXHR = result;
4089
4090    } else {
4091      xcart.showInternalError();
4092    }
4093
4094    this.triggerVent('afterSubmit', {'widget': this, 'state':  result, 'arguments': arguments});
4095  }
4096
4097  return result;
4098};
4099
4100CommonForm.prototype.getSerializedValues = function()
4101{
4102  return this.getElements().serialize();
4103};
4104
4105CommonForm.prototype.tryRestoreCSRFToken = function(xhr)
4106{
4107  var list = xhr.getAllResponseHeaders().split(/\n/);
4108  var tokenHeader = _.find(list, function(headerValue){
4109    return headerValue.search(/update-csrf: (.*)/i) !== -1;
4110  });
4111
4112  var newTokenMatches = tokenHeader
4113    ? tokenHeader.match(/update-csrf: (.*)/i)
4114    : null;
4115
4116  if (newTokenMatches && newTokenMatches[1]) {
4117    var newTokenValue = JSON.parse(newTokenMatches[1]);
4118
4119    if (newTokenValue.value) {
4120      this.replaceCSRFToken(newTokenValue.value);
4121    }
4122  }
4123};
4124// Submit form in force mode
4125CommonForm.prototype.submitForce = function()
4126{
4127  this.skipCurrentBgSubmit();
4128
4129  var oldValue = this.submitOnlyChanged;
4130  this.submitOnlyChanged = false;
4131
4132  this.$form.submit();
4133
4134  this.submitOnlyChanged = oldValue;
4135};
4136
4137// Prepare form before background submit
4138CommonForm.prototype.preprocessBackgroundSubmit = function()
4139{
4140  this.form.isBgSubmitting = true;
4141
4142  this.triggerVent('submit.preprocess', this);
4143
4144  this.getElements().commonController('preprocessBackgroundSubmit');
4145};
4146
4147// Prepare form after background submit
4148CommonForm.prototype.postprocessBackgroundSubmit = function()
4149{
4150  this.form.isBgSubmitting = false;
4151  if (this.form.currentSubmitXHR) {
4152    delete this.form.currentSubmitXHR;
4153  }
4154
4155  this.getElements().commonController('postprocessBackgroundSubmit');
4156};
4157
4158CommonForm.prototype.isSaveValue = function (element) {
4159  return true;
4160};
4161
4162// Skip current background submit
4163CommonForm.prototype.skipCurrentBgSubmit = function () {
4164  if (this.form.isBgSubmitting) {
4165    this.form.isBgSubmitting = false;
4166
4167    if (this.form.currentSubmitXHR) {
4168      this.form.currentSubmitXHR.abort();
4169      delete this.form.currentSubmitXHR;
4170    }
4171
4172    this.getElements().commonController('skipCurrentBgSubmit');
4173  }
4174};
4175
4176// Form has any changed state watcher's elements
4177CommonForm.prototype.hasChangedWatcher = function () {
4178  return this.getElements().filter(function() {
4179    return this.isChangedWatcher();
4180  }).length > 0;
4181};
4182
4183// Check - form changed or not
4184CommonForm.prototype.isChanged = function(onlyVisible)
4185{
4186  return this.getElements().filter(
4187    function() {
4188      return this.commonController ? this.commonController.isChanged(onlyVisible) : false;
4189    }
4190  ).length > 0;
4191};
4192
4193// Check - form was filled or not
4194CommonForm.prototype.wasFilledOnce = function()
4195{
4196  var fields = this.getElements().filter(
4197    function() {
4198      return this.commonController ? this.commonController.isRequired() : false;
4199    }
4200  );
4201
4202  return  _.every(fields, function(item) {
4203    return item.commonController.wasFilledOnce() || !item.commonController.isVisible();
4204  });
4205};
4206
4207CommonForm.prototype.handleElementBlur = function(elm)
4208{
4209  this.elementBlurTO = setTimeout(
4210    _.bind(this.triggerBlur, this),
4211    this.blurTTL
4212  );
4213};
4214
4215CommonForm.prototype.handleElementFocus = function(elm)
4216{
4217  if (this.elementBlurTO) {
4218    clearTimeout(this.elementBlurTO);
4219    this.elementBlurTO = null;
4220  }
4221
4222  if (!this.isFocus) {
4223    this.isFocus = true;
4224    this.triggerVent('focus', this);
4225  }
4226};
4227
4228CommonForm.prototype.triggerBlur = function()
4229{
4230  if (this.isFocus) {
4231    this.isFocus = false;
4232    this.triggerVent('blur', this);
4233  }
4234};
4235
4236CommonForm.prototype.checkDependencyState = function()
4237{
4238  var state = {};
4239
4240  var checkState = _.bind(function (state, field, deps, show) {
4241    var depField, depValue, value;
4242    var input, element;
4243    for (depField in deps) if (deps.hasOwnProperty(depField)) {
4244      input = jQuery('[name="' + depField + '"]', jQuery(this.form)).not('[type="hidden"]').get(0);
4245      if (!input || !input.commonController) {
4246        continue;
4247      }
4248      depValue = deps[depField];
4249      element = input.commonController.$element;
4250
4251      if (element.is('[type="checkbox"]')) {
4252        value = element.is(':checked') ? true : false;
4253      } else {
4254        value = element.val();
4255      }
4256
4257      if (show) {
4258        if (depValue == value || ((typeof depValue === 'object') && _.contains(depValue, value))) {
4259          if (state[field] !== false) {
4260            state[field] = true;
4261          }
4262        } else {
4263          state[field] = false;
4264        }
4265      } else {
4266        if (depValue == value || ((typeof depValue === 'object') && _.contains(depValue, value))) {
4267          if (state[field] !== true) {
4268            state[field] = false;
4269          }
4270        } else {
4271          state[field] = true;
4272        }
4273      }
4274    }
4275
4276    return state;
4277  }, this);
4278
4279  _.each(
4280    this.getDependency(),
4281    function(value, field) {
4282      state = checkState(state, field, value.hide, false);
4283      state = checkState(state, field, value.show, true);
4284    }
4285  );
4286
4287  return state;
4288};
4289
4290CommonForm.prototype.getDependency = function()
4291{
4292  var dependency = {};
4293
4294  this.$form.find('.has-dependency :input, .separator.has-dependency h2').each(
4295    function () {
4296      if (typeof(this.commonController) !== 'undefined') {
4297        if (typeof(this.commonController.hasDependency) !== 'undefined' && this.commonController.hasDependency()) {
4298          var name = this.commonController.element.name || this.commonController.$element.data('name');
4299          dependency[name] = this.commonController.getDependency();
4300        }
4301      }
4302    }
4303  );
4304
4305  return dependency;
4306};
4307
4308CommonForm.prototype.setDependencyState = function(state)
4309{
4310  _.each(
4311    state,
4312    this.setElementDependency,
4313    this
4314  );
4315};
4316
4317CommonForm.prototype.setElementDependency = function (state, field)
4318{
4319  var element = jQuery(this.form.elements.namedItem(field)).add('[data-name="' + field + '"]', this.form).filter('[type!="hidden"]').get(0);
4320  if (element) {
4321    var elementController = element.commonController;
4322
4323    if (state) {
4324      elementController.showByDependency();
4325
4326    } else {
4327      elementController.hideByDependency();
4328    }
4329  }
4330};
4331
4332// {{{ Form readiness
4333
4334CommonForm.prototype.controlReadiness = false;
4335
4336CommonForm.prototype.isReady = null;
4337
4338CommonForm.prototype.switchControlReadiness = function(flag)
4339{
4340  this.controlReadiness = flag === true || typeof(flag) === 'undefined';
4341
4342  if (this.controlReadiness) {
4343    this.processReadiness();
4344  }
4345
4346  return this;
4347};
4348
4349CommonForm.prototype.resetReadiness = function()
4350{
4351  this.isReady = null;
4352
4353  return this;
4354};
4355
4356CommonForm.prototype.processReadiness = function()
4357{
4358  if (this.isReadinessChanged()) {
4359    if (this.isReady) {
4360      this.triggerVent('ready', this);
4361
4362    } else {
4363      this.triggerVent('unready', this);
4364    }
4365  }
4366};
4367
4368CommonForm.prototype.isReadinessChanged = function()
4369{
4370  var tmp = this.isReady;
4371  this.isReady = this.validate(true);
4372
4373  return tmp != this.isReady;
4374};
4375
4376CommonForm.prototype.findParentCellForElementOnStickyPanel = function(element) {
4377  let result = element;
4378  while (result && result.parentNode && result.classList && !result.classList.contains('panel-cell')) {
4379    result = result.parentNode;
4380  }
4381  if (result && result.classList && result.classList.contains('panel-cell')) {
4382    return result;
4383  }
4384  return element;
4385};
4386
4387// }}}
4388
4389/**
4390 * Element
4391 */
4392
4393// Constructor
4394function CommonElement(elm)
4395{
4396  this.validationCallbacks = [];
4397
4398  if (elm && !elm.commonController) {
4399    this.bindElement(elm);
4400  }
4401}
4402
4403extend(CommonElement, Base);
4404
4405CommonElement.prototype.element = null;
4406CommonElement.prototype.$element = null;
4407// Validattion class-base rule pattern
4408CommonElement.prototype.classRegExp = /^field-(.+)$/;
4409CommonElement.prototype.watchTTL = 2000;
4410CommonElement.prototype.promptPosition = 'bottomLeft';
4411
4412// Bind element
4413CommonElement.prototype.bindElement = function(elm)
4414{
4415  this.element = elm;
4416  this.$element = jQuery(elm);
4417
4418  this.element.commonController = this;
4419
4420  // Add methods and properties
4421  var methods = [
4422    'showInlineError', 'hideInlineError', 'markAsInvalid',
4423    'unmarkAsInvalid', 'markAsProgress',  'unmarkAsProgress',
4424    'validate',        'isChanged',       'markAsWatcher',
4425    'toggleActivity',  'isEnabled',       'enable',
4426    'disable',         'isVisible',
4427    'showInlineMessage', 'hideInlineMessage'
4428  ];
4429
4430  _.each(
4431    methods,
4432    function(method) {
4433      this.element[method] = _.bind(
4434        function() {
4435          return this[method].apply(this, arguments);
4436        },
4437        this
4438      );
4439    },
4440    this
4441  );
4442
4443  this.saveValue();
4444  this.element.isInitialError = this.$element.hasClass('validation-error');
4445
4446  this.assignHandlers();
4447
4448  this.$element.bind('jqv.field.result', _.bind(this.handleValidationEngineResult, this));
4449  var debounced = _.debounce(_.bind(this.handleKeyUp, this), 100);
4450  var debouncedChange = _.debounce(_.bind(this.handleChange, this), 100);
4451  this.$element
4452    .change(debouncedChange)
4453    .keyup(debounced)
4454    .bind('paste', debounced);
4455
4456  if (this.$element.parents('.instant-control-readiness').length > 0) {
4457    this.$element.keyup(_.debounce(_.bind(this.handleKeyUpControlReadiness, this), 100));
4458  }
4459
4460  this.triggerVent('bind');
4461};
4462
4463CommonElement.prototype.getForm = function () {
4464  return (this.element.form && this.element.form.commonController)
4465    ? this.element.form.commonController
4466    : null;
4467};
4468
4469// Get validators by form element
4470CommonElement.prototype.getValidators = function () {
4471  var validators = [];
4472
4473  if (this.element.className) {
4474    var classes = this.element.className.split(/ /);
4475    var m, methodName;
4476    for (var i = 0; i < classes.length; i++) {
4477
4478      m = classes[i].match(this.classRegExp);
4479
4480      if (m && m[1]) {
4481        methodName = m[1].replace(/-[a-z]/, this.buildMethodName);
4482        methodName = 'validate' + methodName.substr(0, 1).toUpperCase() + methodName.substr(1);
4483        if (typeof(this[methodName]) !== 'undefined') {
4484          validators.push(
4485            {
4486              key:    m[1],
4487              method: this[methodName]
4488            }
4489          );
4490        }
4491      }
4492    }
4493  }
4494
4495  return validators;
4496};
4497
4498// Get element label by form element
4499CommonElement.prototype.getLabel = function()
4500{
4501  var label = null;
4502
4503  if (this.element.id) {
4504    var lbl = jQuery('label[for="' + this.element.id + '"]');
4505    if (lbl.length) {
4506      label = jQuery.trim(lbl.eq(0).html()).replace(/:$/, '').replace(/<.+$/, '');
4507    }
4508  }
4509
4510  return label;
4511};
4512
4513// Check - element visible or not
4514CommonElement.prototype.isVisible = function()
4515{
4516  if (this.$element.css('display') == 'none') {
4517    return false;
4518  }
4519
4520  return this.$element
4521    .parents()
4522    .filter(
4523      function() {
4524        return $(this).css('display') == 'none';
4525      }
4526    )
4527    .length == 0;
4528};
4529
4530CommonElement.prototype.isVisibleForValidation = function()
4531{
4532  var data = this.$element.data('jqv');
4533
4534  return this.isVisible() || (data && data.validateNonVisibleFields === true)
4535    || this.$element.data('custom-validate') === true;
4536};
4537
4538// Build validator method name helper
4539CommonElement.prototype.buildMethodName = function(str)
4540{
4541  return str.substr(1).toUpperCase();
4542};
4543
4544// Validate form element
4545CommonElement.prototype.addValidationCallback = function(callback)
4546{
4547  this.validationCallbacks.push(callback);
4548};
4549
4550// Validate form element
4551CommonElement.prototype.getValidationCallbacks = function()
4552{
4553  return this.validationCallbacks;
4554};
4555
4556// Validate form element
4557CommonElement.prototype.validate = function(silent, noFocus)
4558{
4559  var result = true;
4560
4561  if (!this.isVisibleForValidation()) {
4562    return result;
4563  }
4564
4565  if (
4566    this.$element.is(':input')
4567    && (
4568      (typeof(this.element.type) !== 'undefined' && this.element.type == 'hidden')
4569      || this.$element.closest('.hidden').length > 0
4570    )
4571  ) {
4572    // Hidden input always validate successfull
4573    result = true;
4574
4575  } else if (this.$element.hasClass('no-validate')) {
4576
4577    // Hidden element always validate successfull
4578    result = true;
4579
4580  } else if (this.$element.hasClass('server-validation-error') && !this.isChanged() && !this.wasFilledOnce()) {
4581
4582    // Element is fail server validation and element's value did not changed
4583    result = false;
4584
4585  } else {
4586
4587    this.$element.data('validation-silent', !!silent);
4588
4589    var validators = this.getValidators();
4590
4591    if (validators.length > 0 && this.isVisibleForValidation()) {
4592
4593      // Check by validators
4594      for (var i = 0; i < validators.length && result; i++) {
4595
4596        var res = validators[i].method.call(this);
4597        if (!res.status && res.apply) {
4598          result = false;
4599
4600          if (!silent) {
4601            res.message = xcart.t(res.message);
4602            this.markAsInvalid(res.message, validators[i].key);
4603          }
4604        }
4605      }
4606
4607      if (result && !silent && this.$element.hasClass('validation-error')) {
4608        this.unmarkAsInvalid();
4609      }
4610    }
4611
4612    // Validation using validationEngine plugin
4613    if (result && this.$element.validationEngine && this.$element.attr('id')) {
4614      this.$element.validationEngine('validate');
4615      result = !this.$element.data('validation-error');
4616    }
4617
4618    var state = {'widget': this, 'result': result, 'silent': silent};
4619    this.triggerVent('validate', state);
4620
4621    result = state.result;
4622
4623    if (result && silent) {
4624      this.unmarkAsInvalid();
4625    }
4626
4627    if (result && !_.isEmpty(this.element.value) && this.$element.hasClass('show-valid-state')) {
4628      this.markAsValid();
4629    }
4630  }
4631
4632  var element = this.$element;
4633
4634  return result && _.every(this.getValidationCallbacks(), function(callback) {
4635    return callback(element);
4636  });
4637};
4638
4639// Check
4640CommonElement.prototype.isUseInlineError = function()
4641{
4642  return jQuery(this.element.form).hasClass('use-inline-error');
4643};
4644
4645// Check
4646CommonElement.prototype.isUsePromptError = function()
4647{
4648  return jQuery(this.element.form).hasClass('use-prompt-error')
4649    && typeof(this.$element.validationEngine) !== 'undefined';
4650};
4651
4652// Mark element as invalid (validation is NOT passed)
4653CommonElement.prototype.markAsInvalid = function(message, key, serverSideError)
4654{
4655  key = key || this.element.name;
4656
4657  var oldErrorMessage  = this.$element.data('lastValidationError');
4658  var common_container = this.$element.closest(".table-value").parent();
4659
4660  this.$element
4661    .addClass('validation-error')
4662    .data('lastValidationError', message)
4663    .data('lastValidationKey', key);
4664
4665  this.$element.parent().addClass('has-error');
4666  common_container.addClass('has-error');
4667  this.$element.parent().removeClass('has-success has-success-mark');
4668
4669  if (this.isUseInlineError()) {
4670    this.$element
4671      .not('.forbid-inline-error')
4672      .each(
4673        function() {
4674          this.hideInlineError();
4675          this.hideInlineMessage();
4676          this.showInlineError(message);
4677        }
4678      );
4679
4680  } else if (this.isUsePromptError()) {
4681    this.$element.validationEngine(
4682      'showPrompt',
4683      message,
4684      null,
4685      this.promptPosition,
4686      true
4687    );
4688
4689  } else {
4690    if (this.$element.attr('title')) {
4691      this.element.oldTitle = this.$element.attr('title');
4692      this.$element.removeAttr('title');
4693    }
4694    if (typeof(this.element.errorTooltipAssigned) === 'undefined' || !this.element.errorTooltipAssigned) {
4695      this.$element.tooltip({
4696        title:     message,
4697        placement: 'bottom',
4698        trigger:   'focus'
4699      });
4700      this.element.errorTooltipAssigned = true;
4701      this.$element.tooltip('show');
4702
4703    } else if (message !== oldErrorMessage) {
4704      this.$element.tooltip('hide').attr('data-original-title', message).tooltip('show');
4705    }
4706  }
4707
4708  if (serverSideError) {
4709    this.$element.addClass('server-validation-error');
4710  }
4711
4712  this.$element.trigger('invalid');
4713  this.triggerVent('markAsInvalid', this);
4714};
4715
4716// Unmark element as invalid (validation is passed)
4717CommonElement.prototype.unmarkAsInvalid = function()
4718{
4719  var common_container = this.$element.parents(".table-value").parent();
4720
4721  if (this.$element.hasClass('validation-error')) {
4722    this.$element.trigger('valid');
4723  }
4724
4725  this.$element
4726    .data('lastValidationError', null)
4727    .data('lastValidationKey', null)
4728    .removeClass('validation-error')
4729    .removeClass('server-validation-error')
4730    .each(function() {
4731      this.hideInlineError();
4732    });
4733
4734  this.$element.parent().removeClass('has-error');
4735  common_container.removeClass('has-error');
4736  if (typeof(this.element.errorTooltipAssigned) !== 'undefined' && this.element.errorTooltipAssigned) {
4737    this.$element.tooltip('destroy');
4738    this.element.errorTooltipAssigned = false;
4739  }
4740  if (typeof(this.element.oldTitle) !== 'undefined' && this.element.oldTitle) {
4741    this.$element.attr('title', this.element.oldTitle);
4742    this.element.oldTitle = null;
4743  }
4744
4745  this.triggerVent('unmarkAsInvalid', this);
4746};
4747
4748// Mark element as valid (validation is passed)
4749CommonElement.prototype.markAsValid = function(message)
4750{
4751  this.unmarkAsInvalid();
4752
4753  this.$element
4754    .data('lastValidationMessage', message)
4755    .each(
4756      function() {
4757        this.hideInlineMessage();
4758        this.showInlineMessage(message);
4759      }
4760    );
4761
4762  this.$element.parent().addClass('has-success');
4763  if (isElement(this.element, 'input') && jQuery.inArray(this.element.type, ['checkbox', 'radio']) == -1) {
4764    this.$element.parent().addClass('has-success-mark');
4765  }
4766
4767  this.triggerVent('markAsValid', this);
4768};
4769
4770// Show element inline error message
4771CommonElement.prototype.showInlineError = function(message)
4772{
4773  var elm = jQuery(document.createElement('p'))
4774    .addClass('error')
4775    .addClass('inline-error')
4776    .html(message);
4777  var placed = false;
4778
4779  this.triggerVent('placeError', {'widget': this, 'element': elm, 'placed': placed});
4780  if (!placed) {
4781    if (this.$element.is(':checkbox') && this.$element.nextAll('label').length) {
4782      elm.insertAfter(this.$element.nextAll('label').eq(0));
4783
4784    } else {
4785      elm.insertAfter(this.$element);
4786    }
4787  }
4788};
4789
4790// Hide element inline error message
4791CommonElement.prototype.hideInlineError = function()
4792{
4793  return jQuery('p.inline-error', this.element.parentNode).remove();
4794};
4795
4796// Show element inline error message
4797CommonElement.prototype.showInlineMessage = function(message)
4798{
4799  var elm = jQuery(document.createElement('p'))
4800    .addClass('message')
4801    .addClass('inline-message')
4802    .html(message);
4803  var placed = false;
4804
4805  this.triggerVent('placeMessage', {'widget': this, 'element': elm, 'placed': placed});
4806  if (!placed) {
4807    if (this.$element.is(':checkbox') && this.$element.nextAll('label').length) {
4808      elm.insertAfter(this.$element.nextAll('label').eq(0));
4809
4810    } else {
4811      elm.insertAfter(this.$element);
4812    }
4813  }
4814};
4815
4816// Hide element inline error message
4817CommonElement.prototype.hideInlineMessage = function()
4818{
4819  return jQuery('p.inline-message', this.element.parentNode).remove();
4820};
4821
4822// Mark element as in-progress element
4823CommonElement.prototype.markAsProgress = function()
4824{
4825  this.$element.addClass('progress-mark-apply');
4826  this.$element.parent().removeClass('has-success has-success-mark');
4827
4828  return jQuery('<div></div>')
4829    .insertAfter(this.$element)
4830    .addClass('single-progress-mark');
4831};
4832
4833// Unmark element as in-progress element
4834CommonElement.prototype.unmarkAsProgress = function()
4835{
4836  this.$element.removeClass('progress-mark-apply');
4837
4838  return jQuery('.single-progress-mark', this.element.parentNode).remove();
4839};
4840
4841// Mark element as change watcher
4842CommonElement.prototype.markAsWatcher = function(beforeCallback)
4843{
4844  var o = this;
4845
4846  this.element.selfSubmitting = false;
4847  this.element.selfSubmitTO = null;
4848  this.element.lastValue = this.element.value;
4849
4850  var submitElement = function(event) {
4851    if (o.element.selfSubmitTO) {
4852      clearTimeout(o.element.selfSubmitTO);
4853      o.element.selfSubmitTO = null;
4854    }
4855
4856    if (
4857      (o.isChanged() || (o.$element.hasClass('validation-error') && !o.$element.hasClass('server-validation-error')))
4858      && (!beforeCallback || beforeCallback(o.element))
4859    ) {
4860      jQuery(o.element.form).submit();
4861    }
4862  };
4863
4864  var delayedUpdate = function(event) {
4865    if (this.lastValue !== this.value) {
4866
4867      this.lastValue = this.value;
4868
4869      if (this.selfSubmitTO) {
4870        clearTimeout(this.selfSubmitTO);
4871        this.selfSubmitTO = null;
4872      }
4873
4874      this.selfSubmitTO = setTimeout(submitElement, o.watchTTL);
4875    }
4876  };
4877
4878  o.$element
4879    .blur(submitElement)
4880    .keyup(delayedUpdate)
4881    .filter('[type="checkbox"]')
4882    .click(submitElement);
4883
4884  if (typeof(jQuery.fn.mousewheel) !== 'undefined') {
4885    o.$element.mousewheel(delayedUpdate);
4886  }
4887};
4888
4889// Element is column checkboxes switcher
4890CommonElement.prototype.markAsColumnSwitcher = function()
4891{
4892  this.$element.click(
4893    function() {
4894      var idx = jQuery(this).parents('th').get(0).cellIndex;
4895      var newState = this.checked;
4896
4897      jQuery(this).parents('table').find('tr').each(
4898        function() {
4899          jQuery(this.cells[idx]).find(':checkbox').get(0).checked = newState;
4900        }
4901      );
4902    }
4903  );
4904};
4905
4906// Element is mouse wheel controlled
4907CommonElement.prototype.markAsWheelControlled = function()
4908{
4909  var o = this;
4910
4911  this.$element.mousewheel(
4912    function(event, delta) {
4913
4914      // Pull min and max value from the validationEndine class
4915      if (o.$element.attr('class').match(/min\[(\d+)\].*max\[(\d+)\]/)) {
4916        o.$element.mousewheel.options = {
4917          'min': RegExp.$1,
4918          'max': RegExp.$2
4919        };
4920      }
4921
4922      return o.$element.hasClass('focused') && o.updateByMouseWheel(event, delta);
4923    }
4924  );
4925
4926  if (!this.$element.hasClass('no-wheel-mark') && this.$element.nextAll('.wheel-mark').length == 0) {
4927    jQuery(document.createElement('span'))
4928      .addClass('wheel-mark')
4929      .html('&nbsp;')
4930      .insertAfter(this.$element);
4931  }
4932
4933  this.$element.addClass('wheel-mark-input');
4934
4935  this.$element.focus(
4936    function() {
4937      jQuery(this).addClass('focused');
4938    }
4939  );
4940
4941  this.$element.blur(
4942    function() {
4943      jQuery(this).removeClass('focused');
4944    }
4945  );
4946};
4947
4948// Update element by mouse wheel
4949CommonElement.prototype.updateByMouseWheel = function(event, delta)
4950{
4951  event.stopPropagation();
4952
4953  var value = false;
4954  var mantis = 0;
4955
4956  if (this.element.value.length == 0) {
4957    value = 0;
4958
4959  } else if (this.element.value.search(/^ *[+-]?[0-9]+\.?[0-9]* *$/) != -1) {
4960    var m = this.element.value.match(/^ *[+-]?[0-9]+\.([0-9]+) *$/);
4961    if (m && m[1]) {
4962      mantis = m[1].length;
4963    }
4964
4965    value = parseFloat(this.element.value);
4966    if (isNaN(value)) {
4967      value = false;
4968    }
4969  }
4970
4971  if (value !== false) {
4972
4973    value = value + delta;
4974
4975    if (
4976      typeof(jQuery(this).mousewheel) !== 'undefined'
4977      && typeof(jQuery(this).mousewheel.options) !== 'undefined'
4978    ) {
4979
4980      var mwBase = jQuery(this).mousewheel.options,
4981        min = parseFloat(mwBase.min),
4982        max = parseFloat(mwBase.max);
4983
4984      if (typeof(mwBase.min) !== 'undefined' && min > value) {
4985        value = min;
4986      } else if (typeof(mwBase.max) !== 'undefined' && max < value) {
4987        value = max;
4988      }
4989    }
4990
4991    value = mantis
4992      ? Math.round(value * Math.pow(10, mantis)) / Math.pow(10, mantis)
4993      : Math.round(value);
4994
4995    var oldValue = this.element.value;
4996    this.element.value = value;
4997
4998    if (jQuery(this.element).validationEngine('validate')) {
4999      this.element.value = oldValue;
5000
5001    } else {
5002      this.$element.change();
5003      jQuery(this.element.form).change();
5004
5005    }
5006
5007    this.$element.removeClass('wrong-amount');
5008  }
5009
5010  return false;
5011};
5012
5013// Undo changes
5014CommonElement.prototype.undo = function()
5015{
5016  if (this.isChanged(true)) {
5017    if (isElement(this.element, 'input') && jQuery.inArray(this.element.type, ['checkbox', 'radio']) !== -1) {
5018      this.element.checked = this.element.initialValue;
5019
5020    } else {
5021      this.element.value = this.element.initialValue;
5022    }
5023    this.$element.change();
5024
5025    this.$element.trigger('undo');
5026  }
5027};
5028
5029// Element is state watcher
5030CommonElement.prototype.isWatcher = function()
5031{
5032  return typeof(this.element.selfSubmitting) !== 'undefined';
5033};
5034
5035// Element is changed state watcher
5036CommonElement.prototype.isChangedWatcher = function()
5037{
5038  return this.isWatcher() && this.element.selfSubmitTO;
5039};
5040
5041// Check - element changed or not
5042CommonElement.prototype.isChanged = function(onlyVisible)
5043{
5044  var result = false;
5045
5046  if ((!(onlyVisible && !this.isVisible()) && this.isSignificantInput()) || this.isAffectChange()) {
5047    if (
5048      (isElement(this.element, 'input') && jQuery.inArray(this.element.type, ['text', 'number', 'password', 'hidden', 'file']) !== -1)
5049      || isElement(this.element, 'select')
5050      || isElement(this.element, 'textarea')
5051    ) {
5052      if (isElement(this.element, 'select') && this.$element.prop('multiple')) {
5053        result = !this.isEqualArrayValues(this.element.initialValue, this.$element.val(), this.$element);
5054
5055      } else {
5056        result = !this.isEqualValues(this.element.initialValue, this.element.value, this.$element);
5057      }
5058
5059    } else if (isElement(this.element, 'input') && jQuery.inArray(this.element.type, ['checkbox', 'radio']) !== -1) {
5060      result = !this.isEqualValues(this.element.initialValue, !!this.element.checked, this.$element);
5061    }
5062  }
5063
5064  return result;
5065};
5066
5067// Check - element was filled once or not
5068CommonElement.prototype.wasFilledOnce = function ()
5069{
5070  if (!this.wasFilled) {
5071    if (isElement(this.element, 'input') && jQuery.inArray(this.element.type, ['text', 'password', 'hidden', 'file']) !== -1) {
5072      this.wasFilled = !_.isEmpty(this.element.value) || this.isChanged(true);
5073    } else {
5074      this.wasFilled = true;
5075    }
5076  }
5077
5078  return this.wasFilled;
5079};
5080
5081// Check - element is significant or not
5082CommonElement.prototype.isSignificantInput = function ()
5083{
5084  return !this.$element.hasClass('not-significant');
5085};
5086
5087CommonElement.prototype.isAffectChange = function ()
5088{
5089  return this.$element.hasClass('affect-change');
5090};
5091
5092CommonElement.prototype.isRequired = function ()
5093{
5094  return this.element.className.indexOf('required') != -1;
5095};
5096
5097// Check element old value and new valies - equal or not
5098CommonElement.prototype.isEqualValues = function(oldValue, newValue)
5099{
5100  return oldValue == newValue;
5101};
5102
5103// Check array values and return true if they are equal
5104CommonElement.prototype.isEqualArrayValues = function(oldValue, newValue, element)
5105{
5106  var result = false;
5107
5108  if (oldValue == null) {
5109    result = (oldValue == newValue);
5110
5111  } else if (newValue != null && oldValue.length == newValue.length) {
5112
5113    result = true;
5114
5115    for (var i = 0; i < oldValue.length; i++) {
5116      if (oldValue[i] != newValue[i]) {
5117        result = false;
5118        break;
5119      }
5120    }
5121  }
5122
5123  return result;
5124};
5125
5126// Save element value as initial value
5127CommonElement.prototype.saveValue = function()
5128{
5129  var customInitValue = this.$element.data('init-value');
5130  this.element.initialValue = customInitValue ? customInitValue : this.getCanonicalValue();
5131};
5132
5133// Get canonical element value
5134CommonElement.prototype.getCanonicalValue = function()
5135{
5136  var result = null;
5137
5138  if (
5139    (isElement(this.element, 'input') && jQuery.inArray(this.element.type, ['text', 'number', 'password', 'hidden', 'file']) != -1)
5140    || isElement(this.element, 'select')
5141    || isElement(this.element, 'textarea')
5142  ) {
5143    if (isElement(this.element, 'select') && this.$element.prop('multiple')) {
5144      result = this.$element.val();
5145
5146    } else {
5147      result = this.element.value;
5148    }
5149
5150  } else if (isElement(this.element, 'input') && jQuery.inArray(this.element.type, ['checkbox', 'radio']) != -1) {
5151    result = this.element.checked;
5152  }
5153
5154  return result;
5155};
5156
5157// Prepare element before background submit
5158CommonElement.prototype.preprocessBackgroundSubmit = function()
5159{
5160  if (this.$element.hasClass('progress-mark-owner') && this.isVisible() && this.isChanged()) {
5161    this.markAsProgress();
5162  }
5163
5164  if (!this.$element.prop('readonly')) {
5165    if (isElement(this.element, 'select')) {
5166      this.$element.addClass('readonly-mark');
5167    }
5168    this.$element.prop('readonly', 'readonly');
5169    this.element.isTemporaryReadonly = true;
5170  }
5171};
5172
5173// Prepare element after background submit
5174CommonElement.prototype.postprocessBackgroundSubmit = function()
5175{
5176  if (this.getForm() && this.getForm().isSaveValue(this)) {
5177    this.saveValue();
5178  }
5179
5180  if (this.$element.hasClass('progress-mark-apply')) {
5181    this.unmarkAsProgress();
5182  }
5183
5184  if (this.element.isTemporaryReadonly) {
5185    if (isElement(this.element, 'select')) {
5186      this.$element.removeClass('readonly-mark');
5187    }
5188    this.$element.prop('readonly', false);
5189    this.element.isTemporaryReadonly = null;
5190  }
5191};
5192
5193// 'Skip current background submit' form event
5194CommonElement.prototype.skipCurrentBgSubmit = function()
5195{
5196  this.postprocessBackgroundSubmit();
5197};
5198
5199CommonElement.prototype.linkWithCountry = function()
5200{
5201  var countryName = this.element.name.replace(/state/, 'country');
5202  var country = this.element.form.elements.namedItem(countryName);
5203
5204  if (country && typeof(window.CountriesStates) !== 'undefined') {
5205
5206    this.element.isFocused = false;
5207
5208    jQuery(this.$element)
5209      .focus(function() {
5210        this.isFocused = true;
5211      })
5212      .blur(function() {
5213        this.isFocused = false;
5214      });
5215
5216    var stateSwitcher = document.createElement('input');
5217    stateSwitcher.type = 'hidden';
5218    stateSwitcher.name = this.element.name.replace(/state/, 'is_custom_state');
5219    stateSwitcher.value = isElement(this.element, 'input') ? '1' : '';
5220    country.form.appendChild(stateSwitcher);
5221    new CommonElement(stateSwitcher);
5222
5223    this.element.currentCountryCode = false;
5224    country.stateInput = this.element;
5225
5226    var o = this;
5227
5228    o.lastStateText = '';
5229
5230    var replaceElement = function(type)
5231    {
5232      var inp = document.createElement(type);
5233      if (type == 'input') {
5234        inp.type = 'text';
5235      }
5236      inp.id = this.stateInput.id;
5237      inp.className = this.stateInput.className;
5238      inp.name = this.stateInput.name;
5239      inp.currentCountryCode = this.stateInput.currentCountryCode;
5240
5241      var isFocused = this.stateInput.isFocused;
5242
5243      jQuery(this.stateInput).replaceWith(inp);
5244      this.stateInput = inp;
5245
5246      if (isFocused) {
5247        this.stateInput.focus();
5248      }
5249
5250      jQuery(this.stateInput)
5251        .focus(function() {
5252          this.isFocused = true;
5253        })
5254        .blur(function() {
5255          this.isFocused = false;
5256        });
5257
5258      o.bind(inp);
5259    };
5260
5261    var change = function()
5262    {
5263      if (this.stateInput.currentCountryCode == this.value) {
5264        return true;
5265      }
5266
5267      this.stateInput.currentCountryCode = this.value;
5268
5269      if (typeof(CountriesStates[this.value]) === 'undefined') {
5270
5271        // As input box
5272        if (!isElement(this.stateInput, 'input')) {
5273          replaceElement.call(this, 'input');
5274          this.stateInput.value = o.lastStateText;
5275        }
5276
5277        stateSwitcher.value = '1';
5278
5279      } else {
5280
5281        // As select box
5282        var previousSelected = null;
5283        if (isElement(this.stateInput, 'select')) {
5284
5285          if (this.stateInput.options.length > 0 && this.stateInput.options[this.stateInput.selectedIndex].value !== '' ) {
5286            previousSelected = this.stateInput.options[this.stateInput.selectedIndex].value;
5287            jQuery('option', this.stateInput).remove();
5288          }
5289
5290        } else {
5291          o.lastStateText = this.stateInput.value;
5292          replaceElement.call(this, 'select');
5293        }
5294
5295        for (var i = 0; i < CountriesStates[this.value].length; i++) {
5296          var s = CountriesStates[this.value][i];
5297          this.stateInput.options[i] = new Option(s.state, s.state_code);
5298
5299          if (previousSelected && previousSelected == s.state_code) {
5300            this.stateInput.options[i].selected = true;
5301            this.stateInput.selectedIndex = i;
5302          }
5303        }
5304
5305        stateSwitcher.value = '';
5306      }
5307    };
5308
5309    jQuery(country).change(change);
5310
5311    change.call(country);
5312  }
5313};
5314
5315// Prepare element with onclick-based location change
5316CommonElement.prototype.processLocation = function()
5317{
5318  if (
5319    this.$element.attr('onclick')
5320    && this.$element.attr('onclick').toString().search(/\.location[ ]*=[ ]*['"].+['"]/) !== -1
5321  ) {
5322    var m = this.$element.attr('onclick').toString().match(/\.location[ ]*=[ ]*['"](.+)['"]/);
5323    this.$element
5324      .data('location', m[1])
5325      .removeAttr('onclick');
5326  }
5327};
5328
5329// Toggle element activity
5330CommonElement.prototype.toggleActivity = function(condition)
5331{
5332  if (
5333    (typeof(condition) !== 'undefined' && condition)
5334    || (typeof(condition) === 'undefined' && !this.isEnabled())
5335  ) {
5336    this.enable();
5337
5338  } else {
5339    this.disable();
5340  }
5341};
5342
5343// Check element activity
5344CommonElement.prototype.isEnabled = function()
5345{
5346  return !this.$element.hasClass('disabled');
5347};
5348
5349// Disable element
5350CommonElement.prototype.disable = function()
5351{
5352  var common_container = this.$element.parents(".table-value").parent();
5353
5354  common_container.addClass('disabled');
5355  this.$element
5356    .addClass('disabled')
5357    .prop('disabled', true);
5358};
5359
5360// Enable element
5361CommonElement.prototype.enable = function()
5362{
5363  var common_container = this.$element.parents(".table-value").parent();
5364
5365  common_container.removeClass('disabled');
5366  this.$element
5367    .removeClass('disabled')
5368    .prop('disabled', false);
5369};
5370
5371CommonElement.prototype.handleChange = function(event)
5372{
5373  var controlReadiness = this.element.form && this.element.form.commonController.controlReadiness;
5374
5375  if (controlReadiness
5376    || this.$element.hasClass('validation-error')
5377    || this.$element.hasClass('touched')
5378  ) {
5379    this.validate();
5380  }
5381
5382  if (controlReadiness) {
5383    this.element.form.commonController.processReadiness();
5384  }
5385
5386  this.$element.addClass('touched');
5387};
5388
5389CommonElement.prototype.handleKeyUp = function(event)
5390{
5391  if (this.isSignificantInput()) {
5392    jQuery(this.element.form).change();
5393  }
5394};
5395
5396CommonElement.prototype.handleKeyUpControlReadiness = function(event)
5397{
5398  var controlReadiness = this.element.form && this.element.form.commonController.controlReadiness;
5399
5400  if (controlReadiness) {
5401    this.element.form.commonController.processReadiness();
5402  }
5403};
5404
5405CommonElement.prototype.handleValidationEngineResult = function(event, field, errorFound, prompText)
5406{
5407  if (errorFound) {
5408    jQuery('.formError').remove();
5409
5410    if (
5411      !field.data('validation-silent')
5412      || (field.get(0).isChanged() && field.get(0) !== document.activeElement)
5413    ) {
5414      field.get(0).commonController.markAsInvalid(
5415        prompText.replace(/^\* /g, '').replace(/<br.>.*$/g, '')
5416      );
5417    }
5418  } else {
5419    field.get(0).commonController.unmarkAsInvalid();
5420  }
5421
5422  field.data('validation-error', errorFound);
5423};
5424
5425/**
5426 * Validators
5427 */
5428
5429// E-mail
5430CommonElement.prototype.validateEmail = function()
5431{
5432  var re = new RegExp(
5433    "^[a-z0-9!#$%&\'*+\\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\'*+\\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]*[a-z0-9])?\\s*$",
5434    'gi'
5435  );
5436
5437  var apply = isElement(this.element, 'input') || isElement(this.element, 'textarea');
5438
5439  return {
5440    status:  !apply || !this.element.value.length || this.element.value.search(re) !== -1,
5441    message: 'Enter a correct email',
5442    apply:   apply
5443  };
5444};
5445
5446// Integer
5447CommonElement.prototype.validateInteger = function()
5448{
5449  var apply = isElement(this.element, 'input') || isElement(this.element, 'textarea');
5450
5451  return {
5452    status:  !apply || !this.element.value.length || this.element.value.search(/^ *[0-9]+ */) != -1,
5453    message: 'Enter an integer',
5454    apply:   apply
5455  };
5456};
5457
5458// Float
5459CommonElement.prototype.validateFloat = function()
5460{
5461  var apply = isElement(this.element, 'input') || isElement(this.element, 'textarea');
5462
5463  var value = this.element.value.replace(/^ +/, '').replace(/ +$/, '');
5464  var sanitized = parseFloat(value);
5465
5466  return {
5467    status:  !apply || !this.element.value.length || (!isNaN(sanitized)),
5468    message: 'Enter a number',
5469    apply:   apply
5470  };
5471};
5472
5473// Positive number
5474CommonElement.prototype.validatePositive = function()
5475{
5476  var apply = isElement(this.element, 'input') || isElement(this.element, 'textarea');
5477
5478  var value = parseFloat(this.element.value);
5479
5480  return {
5481    status:  !apply || !this.element.value.length || (!isNaN(value) && value >= 0),
5482    message: 'Enter a positive number',
5483    apply:   apply
5484  };
5485};
5486
5487// Negative number
5488CommonElement.prototype.validateNegative = function()
5489{
5490  var apply = isElement(this.element, 'input') || isElement(this.element, 'textarea');
5491
5492  var value = parseFloat(this.element.value);
5493
5494  return {
5495    status:  !apply || !this.element.value.length || (!isNaN(value) && value <= 0),
5496    message: 'Enter a negative number',
5497    apply:   apply
5498  };
5499};
5500
5501// Non-zero number
5502CommonElement.prototype.validateNonZero = function()
5503{
5504  var apply = isElement(this.element, 'input') || isElement(this.element, 'textarea');
5505
5506  var value = parseFloat(this.element.value);
5507
5508  return {
5509    status:  !apply || !this.element.value.length || (!isNaN(value) && value != 0),
5510    message: 'Zero cannot be used',
5511    apply:   apply
5512  };
5513};
5514
5515// Range (min - max) number
5516CommonElement.prototype.validateRange = function()
5517{
5518  var apply = isElement(this.element, 'input') || isElement(this.element, 'textarea');
5519
5520  var result = {
5521    status:  true,
5522    message: 'This field is required',
5523    apply:   apply
5524  };
5525
5526  if (apply && this.element.value.length) {
5527
5528    var value = parseFloat(this.element.value);
5529
5530    if (isNaN(value)) {
5531      result.status = false;
5532
5533    } else if (typeof(this.element.min) !== 'undefined' && this.element.min > value) {
5534      result.status = false;
5535      result.message = 'Field too small!';
5536
5537    } else if (typeof(this.element.max) !== 'undefined' && this.element.max < value) {
5538
5539      result.status = false;
5540      result.message = 'Field too big!';
5541    }
5542  }
5543
5544  return result;
5545};
5546
5547// Required field
5548CommonElement.prototype.validateRequired = function()
5549{
5550  return {
5551    status:  this.element.value !== null && this.element.value.length > 0,
5552    message: 'Field is required!',
5553    apply:   true
5554  };
5555};
5556
5557// Handlers mechanism
5558
5559// Assign handlers
5560CommonElement.prototype.assignHandlers = function ()
5561{
5562  var o = this;
5563
5564  jQuery.each(
5565    this.handlers,
5566    function (index, elm) {
5567      if (elm.canApply.call(o)) {
5568        elm.handler.call(o);
5569      }
5570    }
5571  );
5572};
5573
5574// Handlers repository
5575CommonElement.prototype.handlers = [
5576  {
5577    canApply: function () {
5578      return this.$element.hasClass('watcher');
5579    },
5580    handler: CommonElement.prototype.markAsWatcher
5581  },
5582  {
5583    canApply: function () {
5584      return this.$element.hasClass('field-state') && this.$element.hasClass('linked');
5585    },
5586    handler: CommonElement.prototype.linkWithCountry
5587  },
5588  {
5589    canApply: function () {
5590      return this.$element.hasClass('column-switcher') && this.$element.parents('th').length > 0;
5591    },
5592    handler: CommonElement.prototype.markAsColumnSwitcher
5593  },
5594  {
5595    canApply: function () {
5596      return this.$element.hasClass('wheel-ctrl');
5597    },
5598    handler: CommonElement.prototype.markAsWheelControlled
5599  },
5600  {
5601    canApply: function () {
5602      return this.$element.is('textarea.resizeble-txt');
5603    },
5604    handler: function() {
5605      var min = this.$element.data('min-size-height') || this.$element.height();
5606      var max = this.$element.data('max-size-height');
5607
5608      this.$element.TextAreaExpander(min, max);
5609    }
5610  },
5611  {
5612    canApply: function () {
5613      return this.$element;
5614    },
5615    handler: function() {
5616      this.$element.blur(
5617        _.bind(
5618          function() {
5619            this.triggerVent('blur', this);
5620          },
5621          this
5622        )
5623      );
5624    }
5625  },
5626  {
5627    canApply: function () {
5628      return this.$element;
5629    },
5630    handler: function() {
5631      this.$element.focus(
5632        _.bind(
5633          function() {
5634            this.triggerVent('focus', this);
5635          },
5636          this
5637        )
5638      );
5639    }
5640  }
5641];
5642
5643CommonElement.prototype.hasDependency = function ()
5644{
5645  return this.$element.closest('.has-dependency').length > 0;
5646};
5647
5648CommonElement.prototype.getDependency = function ()
5649{
5650  return this.hasDependency()
5651    ? xcart.getCommentedData(this.$element.closest('.has-dependency'), 'depen
5651dency')
5652    : {};
5653};
5654
5655CommonElement.prototype.hideByDependency = function ()
5656{
5657  this.$element.closest('.has-dependency').addClass('hidden');
5658};
5659
5660CommonElement.prototype.showByDependency = function ()
5661{
5662  this.$element.closest('.has-dependency').removeClass('hidden');
5663};
5664
5665// Autostart
5666xcart.autoload(CommonForm);
5667
5668// Common controller as jQuery plugin
5669(function ($) {
5670  jQuery.fn.commonController = function(property) {
5671    var args = Array.prototype.slice.call(arguments, 1);
5672
5673    this.each(
5674      function() {
5675        if (typeof(this.commonController) === 'undefined') {
5676          if (isElement(this, 'form')) {
5677            new CommonForm(this);
5678
5679          } else if (
5680            isElement(this, 'input')
5681            || isElement(this, 'select')
5682            || isElement(this, 'textarea')
5683            || isElement(this, 'button')
5684          ) {
5685            new CommonElement(this);
5686          }
5687        }
5688
5689        if (
5690          typeof(this.commonController) !== 'undefined'
5691          && typeof(this.commonController[property]) !== 'undefined'
5692        ) {
5693          if (typeof(this.commonController[property]) === 'function') {
5694            this.commonController[property].apply(this.commonController, args);
5695
5696          } else {
5697            this.commonController[property] = args[0];
5698          }
5699        }
5700      }
5701    );
5702
5703    return this;
5704  };
5705
5706})(jQuery);;
5707/* AUTOGENERATED: loadCSS.min.js */
5708!function(c){"use strict";function e(e,t,n,o){var r,i=c.document,d=i.createElement("link");if(t)r=t;else{var a=(i.body||i.getElementsByTagName("head")[0]).childNodes;r=a[a.length-1]}var f=i.styleSheets;if(o)for(var l in o)o.hasOwnProperty(l)&&d.setAttribute(l,o[l]);d.rel="stylesheet",d.href=e,d.media="only x",function e(t){if(i.body)return t();setTimeout(function(){e(t)})}(function(){r.parentNode.insertBefore(d,t?r:r.nextSibling)});var s=function(e){for(var t=d.href,n=f.length;n--;)if(f[n].href===t)return e();setTimeout(function(){s(e)})};function u(){d.addEventListener&&d.removeEventListener("load",u),d.media=n||"all"}return d.addEventListener&&d.addEventListener("load",u),(d.onloadcssdefined=s)(u),d}"undefined"!=typeof exports?exports.loadCSS=e:c.loadCSS=e}("undefined"!=typeof global?global:this);;
5709/* AUTOGENERATED: onloadCSS.min.js */
5710function onloadCSS(n,a){var t;function d(){!t&&a&&(t=!0,a.call(n))}n.addEventListener&&n.addEventListener("load",d),n.attachEvent&&n.attachEvent("onload",d),"isApplicationInstalled"in navigator&&"onloadcssdefined"in n&&n.onloadcssdefined(d)};
5711/* AUTOGENERATED: Function.name.js */
5712(function() {
5713
5714  var fnNameMatchRegex = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^\(\s\/]*)\s*/;
5715
5716  function _name() {
5717    var match, name;
5718    if (this === Function || this === Function.prototype.constructor) {
5719      name = "Function";
5720    }
5721    else if (this !== Function.prototype) {
5722      match = ("" + this).match(fnNameMatchRegex);
5723      name = match && match[1];
5724    }
5725    return name || "";
5726  }
5727
5728// Inspect the polyfill-ability of this browser
5729  var needsPolyfill = !("name" in Function.prototype && "name" in (function x() {}));
5730  var canDefineProp = typeof Object.defineProperty === "function" &&
5731    (function() {
5732      var result;
5733      try {
5734        Object.defineProperty(Function.prototype, "_xyz", {
5735          get: function() {
5736            return "blah";
5737          },
5738          configurable: true
5739        });
5740        result = Function.prototype._xyz === "blah";
5741        delete Function.prototype._xyz;
5742      }
5743      catch (e) {
5744        result = false;
5745      }
5746      return result;
5747    })();
5748  var canDefineGetter = typeof Object.prototype.__defineGetter__ === "function" &&
5749    (function() {
5750      var result;
5751      try {
5752        Function.prototype.__defineGetter__("_abc", function() {
5753          return "foo";
5754        });
5755        result = Function.prototype._abc === "foo";
5756        delete Function.prototype._abc;
5757      }
5758      catch (e) {
5759        result = false;
5760      }
5761      return result;
5762    })();
5763
5764
5765
5766// Add the "private" property for testing, even if the real property can be polyfilled
5767  Function.prototype._name = _name;
5768
5769
5770// Polyfill it!
5771// For:
5772//  * IE >=9 <12
5773//  * Chrome <33
5774  if (needsPolyfill) {
5775    // For:
5776    //  * IE >=9 <12
5777    //  * Chrome >=5 <33
5778    if (canDefineProp) {
5779      Object.defineProperty(Function.prototype, "name", {
5780        get: function() {
5781          var name = _name.call(this);
5782
5783          // Since named function definitions have immutable names, also memoize the
5784          // output by defining the `name` property directly on this Function
5785          // instance so that this polyfill will not need to be invoked again
5786          if (this !== Function.prototype) {
5787            Object.defineProperty(this, "name", {
5788              value: name,
5789              configurable: true
5790            });
5791          }
5792
5793          return name;
5794        },
5795        configurable: true
5796      });
5797    }
5798      // For:
5799    //  * Chrome <5
5800    else if (canDefineGetter) {
5801      // NOTE:
5802      // The snippet:
5803      //
5804      //     x.__defineGetter__('y', z);
5805      //
5806      // ...is essentially equivalent to:
5807      //
5808      //     Object.defineProperty(x, 'y', {
5809      //       get: z,
5810      //       configurable: true,  // <-- key difference #1
5811      //       enumerable: true     // <-- key difference #2
5812      //     });
5813      //
5814      Function.prototype.__defineGetter__("name", function() {
5815        var name = _name.call(this);
5816
5817        // Since named function definitions have immutable names, also memoize the
5818        // output by defining the `name` property directly on this Function
5819        // instance so that this polyfill will not need to be invoked again
5820        if (this !== Function.prototype) {
5821          this.__defineGetter__("name", function() { return name; });
5822        }
5823
5824        return name;
5825      });
5826    }
5827  }
5828
5829})();;
5830/* AUTOGENERATED: php.min.js */
5831function var_export(mixed_expression,bool_return){var retstr='',iret='',cnt=0,x=[],i=0,funcParts=[],idtLevel=arguments[2]||2,innerIndent='',outerIndent='',getFuncName=function(fn){var name=/\W*function\s+([\w\$]+)\s*\(/.exec(fn);if(!name)return'(Anonymous)';return name[1]},_makeIndent=function(idtLevel){return(new Array(idtLevel+1)).join(' ')},__getType=function(inp){var i=0,match,type=typeof inp;if(type==='object'&&inp!==null&&inp.constructor&&getFuncName(inp.constructor)==='PHPJS_Resource')return'resource';if(type==='function')return'function';if(type==='object'&&!inp)return'null';if(type==="object"){if(!inp.constructor)return'object';var cons=inp.constructor.toString();match=cons.match(/(\w+)\(/);if(match)cons=match[1].toLowerCase();var types=["boolean","number","string","array"];for(i=0;i<types.length;i++)if(cons===types[i]){type=types[i];break}};return type},type=__getType(mixed_expression);if(type===null){retstr="NULL"}else if(type==='array'||type==='object'){outerIndent=_makeIndent(idtLevel-2);innerIndent=_makeIndent(idtLevel);for(i in mixed_expression){var value=this.var_export(mixed_expression[i],true,idtLevel+2);x[cnt++]=innerIndent+i+' => '+(__getType(mixed_expression[i])==='array'?'\n':'')+value};iret=x.join(',\n');retstr=outerIndent+"array (\n"+iret+'\n'+outerIndent+')'}else if(type==='function'){funcParts=mixed_expression.toString().match(/function .*?\((.*?)\) \{([\s\S]*)\}/);retstr="create_function ('"+funcParts[1]+"', '"+funcParts[2].replace(new RegExp("'",'g'),"\\'")+"')"}else if(type==='resource'){retstr='NULL'}else retstr=(typeof mixed_expression!=='string')?mixed_expression:"'"+mixed_expression.replace(/(["'])/g,"\\$1").replace(/\0/g,"\\0")+"'";if(bool_return!==true){this.echo(retstr);return null}else return retstr}
5832function is_null(mixed_var){return(mixed_var===null)}
5833function echo(){var arg='',argc=arguments.length,argv=arguments,i=0,holder,win=this.window,d=win.document,ns_xhtml='http://www.w3.org/1999/xhtml',ns_xul='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul',stringToDOM=function(str,parent,ns,container){var extraNSs='';if(ns===ns_xul)extraNSs=' xmlns:html="'+ns_xhtml+'"';var stringContainer='<'+container+' xmlns="'+ns+'"'+extraNSs+'>'+str+'</'+container+'>',dils=win.DOMImplementationLS,dp=win.DOMParser,ax=win.ActiveXObject;if(dils&&dils.createLSInput&&dils.createLSParser){var lsInput=dils.createLSInput();lsInput.stringData=stringContainer;var lsParser=dils.createLSParser(1,null);return lsParser.parse(lsInput).firstChild}else if(dp){try{var fc=new dp().parseFromString(stringContainer,'text/xml');if(fc&&fc.documentElement&&fc.documentElement.localName!=='parsererror'&&fc.documentElement.namespaceURI!=='http://www.mozilla.org/newlayout/xml/parsererror.xml')return fc.documentElement.firstChild}catch(e){}}else if(ax){var axo=new ax('MSXML2.DOMDocument');axo.loadXML(str);return axo.documentElement};if(d.createElementNS&&(d.documentElement.namespaceURI||d.documentElement.nodeName.toLowerCase()!=='html'||(d.contentType&&d.contentType!=='text/html'))){holder=d.createElementNS(ns,container)}else holder=d.createElement(container);holder.innerHTML=str;while(holder.firstChild)parent.appendChild(holder.firstChild);return false},ieFix=function(node){if(node.nodeType===1){var newNode=d.createElement(node.nodeName),i,len;if(node.attributes&&node.attributes.length>0)for(i=0,len=node.attributes.length;i<len;i++)newNode.setAttribute(node.attributes[i].nodeName,node.getAttribute(node.attributes[i].nodeName));if(node.childNodes&&node.childNodes.length>0)for(i=0,len=node.childNodes.length;i<len;
5833i++)newNode.appendChild(ieFix(node.childNodes[i]));return newNode}else return d.createTextNode(node.nodeValue)},replacer=function(s,m1,m2){if(m1!=='\\'){return m1+eval(m2)}else return s};this.php_js=this.php_js||{};var phpjs=this.php_js,ini=phpjs.ini,obs=phpjs.obs;for(i=0;i<argc;i++){arg=argv[i];if(ini&&ini['phpjs.echo_embedded_vars'])arg=arg.replace(/(.?)\{?\$(\w*?\}|\w*)/g,replacer);if(!phpjs.flushing&&obs&&obs.length){obs[obs.length-1].buffer+=arg;continue};if(d.appendChild){if(d.body){if(win.navigator.appName==='Microsoft Internet Explorer'){d.body.appendChild(stringToDOM(ieFix(arg)))}else{var unappendedLeft=stringToDOM(arg,d.body,ns_xhtml,'div').cloneNode(true);if(unappendedLeft)d.body.appendChild(unappendedLeft)}}else d.documentElement.appendChild(stringToDOM(arg,d.documentElement,ns_xul,'description'))}else if(d.write)d.write(arg)}}
5834function htmlspecialchars(string,quote_style,charset,double_encode){var optTemp=0,i=0,noquotes=false;if(typeof quote_style==='undefined'||quote_style===null)quote_style=2;string=string.toString();if(double_encode!==false)string=string.replace(/&/g,'&amp;');string=string.replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/\s/g,'&nbsp;');var OPTS={ENT_NOQUOTES:0,ENT_HTML_QUOTE_SINGLE:1,ENT_HTML_QUOTE_DOUBLE:2,ENT_COMPAT:2,ENT_QUOTES:3,ENT_IGNORE:4};if(quote_style===0)noquotes=true;if(typeof quote_style!=='number'){quote_style=[].concat(quote_style);for(i=0;i<quote_style.length;i++)if(OPTS[quote_style[i]]===0){noquotes=true}else if(OPTS[quote_style[i]])optTemp=optTemp|OPTS[quote_style[i]];quote_style=optTemp};if(quote_style&OPTS.ENT_HTML_QUOTE_SINGLE)string=string.replace(/'/g,'&#039;');if(!noquotes)string=string.replace(/"/g,'&quot;');return string}
5835function htmlspecialchars_decode(string,quote_style){var optTemp=0,i=0,noquotes=false;if(typeof quote_style==='undefined')quote_style=2;string=string.toString().replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&nbsp;/g,' ');var OPTS={ENT_NOQUOTES:0,ENT_HTML_QUOTE_SINGLE:1,ENT_HTML_QUOTE_DOUBLE:2,ENT_COMPAT:2,ENT_QUOTES:3,ENT_IGNORE:4};if(quote_style===0)noquotes=true;if(typeof quote_style!=='number'){quote_style=[].concat(quote_style);for(i=0;i<quote_style.length;i++)if(OPTS[quote_style[i]]===0){noquotes=true}else if(OPTS[quote_style[i]])optTemp=optTemp|OPTS[quote_style[i]];quote_style=optTemp};if(quote_style&OPTS.ENT_HTML_QUOTE_SINGLE)string=string.replace(/&#0*39;/g,"'");if(!noquotes)string=string.replace(/&quot;/g,'"');string=string.replace(/&amp;/g,'&');return string}
5836function str_replace(search,replace,subject,count){var i=0,j=0,temp='',repl='',sl=0,fl=0,f=[].concat(search),r=[].concat(replace),s=subject,ra=Object.prototype.toString.call(r)==='[object Array]',sa=Object.prototype.toString.call(s)==='[object Array]';s=[].concat(s);if(count)this.window[count]=0;for(i=0,sl=s.length;i<sl;i++){if(s[i]==='')continue;for(j=0,fl=f.length;j<fl;j++){temp=s[i]+'';repl=ra?(r[j]!==undefined?r[j]:''):r[0];s[i]=temp.split(f[j]).join(repl);if(count&&s[i]!==temp)this.window[count]+=(temp.length-s[i].length)/f[j].length}};return sa?s:s[0]}
5837function array_merge(){var args=Array.prototype.slice.call(arguments),argl=args.length,arg,retObj={},k='',argil=0,j=0,i=0,ct=0,toStr=Object.prototype.toString,retArr=true;for(i=0;i<argl;i++)if(toStr.call(args[i])!=='[object Array]'){retArr=false;break};if(retArr){retArr=[];for(i=0;i<argl;i++)retArr=retArr.concat(args[i]);return retArr};for(i=0,ct=0;i<argl;i++){arg=args[i];if(toStr.call(arg)==='[object Array]'){for(j=0,argil=arg.length;j<argil;j++)retObj[ct++]=arg[j]}else for(k in arg)if(arg.hasOwnProperty(k))if(parseInt(k,10)+''===k){retObj[ct++]=arg[k]}else retObj[k]=arg[k]};return retObj}
5838function array_unique(inputArr){var key='',tmp_arr2={},val='',__array_search=function(needle,haystack){var fkey='';for(fkey in haystack)if(haystack.hasOwnProperty(fkey))if((haystack[fkey]+'')===(needle+''))return fkey;return false};for(key in inputArr)if(inputArr.hasOwnProperty(key)){val=inputArr[key];if(false===__array_search(val,tmp_arr2))tmp_arr2[key]=val};return tmp_arr2}
5839function intval(mixed_var,base){var tmp,type=typeof mixed_var;if(type==='boolean'){return+mixed_var}else if(type==='string'){tmp=parseInt(mixed_var,base||10);return(isNaN(tmp)||!isFinite(tmp))?0:tmp}else if(type==='number'&&isFinite(mixed_var)){return mixed_var|0}else return 0};
5840/* AUTOGENERATED: amd.js */
5841/* vim: set ts=2 sw=2 sts=2 et: */
5842
5843/**
5844 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
5845 * See https://www.x-cart.com/license-agreement.html for license details.
5846 */
5847
5848var CoreAMD = {
5849  pending: {},
5850
5851  define: function (name, dependencies, callback) {
5852
5853    if (_.isFunction(dependencies)) {
5854      callback = dependencies;
5855      dependencies = [];
5856    }
5857
5858    if (_.isString(dependencies)) {
5859      dependencies = [dependencies];
5860    }
5861
5862    if (dependencies === undefined) {
5863      dependencies = [];
5864    }
5865
5866    if (callback === undefined) {
5867      callback = function () {
5868      };
5869    }
5870
5871    var moduleDeferred = this._createDeferred(name);
5872
5873    jQuery
5874      .when.apply(jQuery, dependencies.map(_.bind(this._createDeferred, this)))
5875      .done(function () {
5876        moduleDeferred.resolve(callback.apply(window, arguments));
5877      })
5878  },
5879
5880  require: function (dependencies, callback) {
5881    if (_.isString(dependencies)) {
5882      dependencies = [dependencies];
5883    }
5884
5885    jQuery
5886      .when.apply(jQuery, dependencies.map(_.bind(this._createDeferred, this)))
5887      .done(function () {
5888        callback.apply(window, arguments);
5889      });
5890  },
5891
5892  getUnresolvedDependencies: function () {
5893    var result = [];
5894    for (var name in this.pending) if (this.pending.hasOwnProperty(name)) {
5895      if (this.pending[name].state() === 'pending') {
5896        result.push(name);
5897      }
5898    }
5899
5900    return result;
5901  },
5902
5903  _createDeferred: function (name) {
5904    if (this.pending[name] === undefined) {
5905      this.pending[name] = new jQuery.Deferred();
5906    }
5907
5908    return this.pending[name];
5909  }
5910};
5911
5912if (window.define) {
5913  window._define = window.define;
5914}
5915window.define = _.bind(CoreAMD.define, CoreAMD);
5916
5917if (window.require) {
5918  window._require = window.require;
5919}
5920window.require = _.bind(CoreAMD.require, CoreAMD);
5921
5922define('js/jquery', function () {
5923  return jQuery;
5924});
5925define('js/underscore', function () {
5926  return _;
5927});
5928
5929jQuery(function () {
5930  define('ready');
5931
5932  setTimeout(function() {
5933    var unresolvedDependencies = CoreAMD.getUnresolvedDependencies();
5934    if (unresolvedDependencies.length && xcart.isDeveloperMode) {
5935      console.warn('Unresolved dependencies', unresolvedDependencies);
5936    }
5937  }, 1);
5938});
5939
5940(function () {
5941  var event = document.createEvent('HTMLEvents');
5942  event.initEvent('amd-ready', true, true);
5943  document.dispatchEvent(event);
5944})();;
5945/* AUTOGENERATED: translate.js */
5946/* vim: set ts=2 sw=2 sts=2 et: */
5947
5948/**
5949 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
5950 * See https://www.x-cart.com/license-agreement.html for license details.
5951 */
5952
5953var Translator = Object.extend({
5954  languageLabels: [],
5955
5956  constructor: function TranslatorConstructor() {
5957    this.loadPreloadedLabels();
5958  },
5959
5960  loadPreloadedLabels: function () {
5961    this.loadLanguageHash(
5962        window.xlite_preloaded_labels
5963    );
5964  },
5965
5966  translate: function(label, params)
5967  {
5968    var translation = this._findInLoaded(label);
5969
5970    if (translation === null) {
5971      translation = this._loadLabel(label);
5972
5973      if (translation) {
5974        this._saveToLoaded(label, translation);
5975      }
5976    }
5977
5978    if (params) {
5979      translation = this._processTranslationParams(translation, params)
5980    }
5981
5982    return translation;
5983  },
5984
5985
5986  loadLanguageHash: function(hash)
5987  {
5988    _.each(
5989        hash,
5990        _.bind(
5991            function (translation, label) {
5992              var foundTranslation = this._findInLoaded(label);
5993
5994              if (foundTranslation === null) {
5995                this._saveToLoaded(label, translation);
5996              }
5997            },
5998            this
5999        )
6000    );
6001  },
6002
6003  _processTranslationParams: function(translation, params) {
6004    _.each(params, function (paramValue, paramName) {
6005      translation = translation.replace('{{' + paramName + '}}', paramValue);
6006    });
6007
6008    return translation;
6009  },
6010
6011  _findInLoaded: function(label) {
6012    var translation = null;
6013
6014    for (var i = 0; i < this.languageLabels.length; i++) {
6015      if (this.languageLabels[i].name == label) {
6016        translation = this.languageLabels[i].label;
6017        break;
6018      }
6019    }
6020
6021    return translation;
6022  },
6023
6024  _saveToLoaded: function(label, translation) {
6025    this.languageLabels.push(
6026        {
6027          name:  label,
6028          label: translation
6029        }
6030    );
6031  },
6032
6033  _loadLabel: function(label) {
6034    return xcart.rest.get('translation', label, false);
6035  },
6036
6037});;
6038/* AUTOGENERATED: lazysizes.min.js */
6039/*! lazysizes - v5.2.1 */
6040
6041!function(e){var t=function(u,D,f){"use strict";var k,H;if(function(){var e;var t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:true,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:true,ricTimeout:0,throttleDelay:125};H=u.lazySizesConfig||u.lazysizesConfig||{};for(e in t){if(!(e in H)){H[e]=t[e]}}}(),!D||!D.getElementsByClassName){return{init:function(){},cfg:H,noSupport:true}}var O=D.documentElement,a=u.HTMLPictureElement,P="addEventListener",$="getAttribute",q=u[P].bind(u),I=u.setTimeout,U=u.requestAnimationFrame||I,l=u.requestIdleCallback,j=/^picture$/i,r=["load","error","lazyincluded","_lazyloaded"],i={},G=Array.prototype.forEach,J=function(e,t){if(!i[t]){i[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")}return i[t].test(e[$]("class")||"")&&i[t]},K=function(e,t){if(!J(e,t)){e.setAttribute("class",(e[$]("class")||"").trim()+" "+t)}},Q=function(e,t){var i;if(i=J(e,t)){e.setAttribute("class",(e[$]("class")||"").replace(i," "))}},V=function(t,i,e){var a=e?P:"removeEventListener";if(e){V(t,i)}r.forEach(function(e){t[a](e,i)})},X=function(e,t,i,a,r){var n=D.createEvent("Event");
vendor: 5,178 bytes, line 6041
6041if(!i){i={}}i.instance=k;n.initEvent(t,!a,!r);n.detail=i;e.dispatchEvent(n);return n},Y=function(e,t){var i;if(!a&&(i=u.picturefill||H.pf)){if(t&&t.src&&!e[$]("srcset")){e.setAttribute("srcset",t.src)}i({reevaluate:true,elements:[e]})}else if(t&&t.src){e.src=t.src}},Z=function(e,t){return(getComputedStyle(e,null)||{})[t]},s=function(e,t,i){i=i||e.offsetWidth;while(i<H.minSize&&t&&!e._lazysizesWidth){i=t.offsetWidth;t=t.parentNode}return i},ee=function(){var i,a;var t=[];var r=[];var n=t;var s=function(){var e=n;n=t.length?r:t;i=true;a=false;while(e.length){e.shift()()}i=false};var e=function(e,t){if(i&&!t){e.apply(this,arguments)}else{n.push(e);if(!a){a=true;(D.hidden?I:U)(s)}}};e._lsFlush=s;return e}(),te=function(i,e){return e?function(){ee(i)}:function(){var e=this;var t=arguments;ee(function(){i.apply(e,t)})}},ie=function(e){var i;var a=0;var r=H.throttleDelay;var n=H.ricTimeout;var t=function(){i=false;a=f.now();e()};var s=l&&n>49?function(){l(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(i){return}i=true;t=r-(f.now()-a);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ae=function(e){var t,i;var a=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-i;if(e<a){I(n,a-e)}else{(l||r)(r)}};return function(){i=f.now();if(!t){t=I(n,a)}}},e=function(){var v,m,c,h,e;var y,z,g,p,C,b,A;var n=/^img$/i;var d=/^iframe$/i;var E="onscroll"in u&&!/(gle|ing)bot/.test(navigator.userAgent);var _=0;var w=0;var N=0;var M=-1;var x=function(e){N--;if(!e||N<0||!e.target){N=0}};var W=function(e){if(A==null){A=Z(D.body,"visibility")=="hidden"}return A||!(Z(e.parentNode,"visibility")=="hidden"&&Z(e,"visibility")=="hidden")};var S=function(e,t){var i;var a=e;var r=W(e);g-=t;b+=t;p-=t;C+=t;while(r&&(a=a.offsetParent)&&a!=D.body&&a!=O){r=(Z(a,"opacity")||1)>0;if(r&&Z(a,"overflow")!="visible"){i=a.getBoundingClientRect();r=C>i.left&&p<i.right&&b>i.top-1&&g<i.bottom+1}}return r};var t=function(){var e,t,i,a,r,n,s,l,o,u,f,c;var d=k.elements;if((h=H.loadMode)&&N<8&&(e=d.length)){t=0;M++;for(;t<e;t++){if(!d[t]||d[t]._lazyRace){continue}if(!E||k.prematureUnveil&&k.prematureUnveil(d[t])){R(d[t]);continue}if(!(l=d[t][$]("data-expand"))||!(n=l*1)){n=w}if(!u){u=!H.expand||H.expand<1?O.clientHeight>500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w<f&&N<1&&M>2&&h>2&&!D.hidden){w=f;M=0}else if(h>1&&M>1&&N<6){w=u}else{w=_}}if(o!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;o=n}i=d[t].getBoundingClientRect();if((b=i.bottom)>=s&&(g=i.top)<=z&&(C=i.right)>=s*c&&(p=i.left)<=y&&(b||C||p||g)&&(H.loadHidden||W(d[t]))&&(m&&N<3&&!l&&(h<3||M<4)||S(d[t],n))){R(d[t]);r=true;if(N>9){break}}else if(!r&&m&&!a&&N<4&&M<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!l&&(b||C||p||g||d[t][$](H.sizesAttr)!="auto"))){a=v[0]||d[t]}}if(a&&!r){R(a)}}};var i=ie(t);var B=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}x(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,L);X(t,"lazyloaded")};var a=te(B);var L=function(e){a({target:e.target})};var T=function(t,i){try{t.contentWindow.location.replace(i)}catch(e){t.src=i}};var F=function(e){var t;var i=e[$](H.srcsetAttr);if(t=H.customMedia[e[$]("data-media")||e[$]("media")]){e.setAttribute("media",t)}if(i){e.setAttribute("srcset",i)}};var s=te(function(t,e,i,a,r){var n,s,l,o,u,f;if(!(u=X(t,"lazybeforeunveil",e)).defaultPrevented){if(a){if(i){K(t,H.autosizesClass)}else{t.setAttribute("sizes",a)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){l=t.parentNode;o=l&&j.test(l.nodeName||"")}f=e.firesLoad||"src"in t&&(s||n||o);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(x,2500);V(t,L,true)}if(o){G.call(l.getElementsByTagName("source"),F)}if(s){t.setAttribute("srcset",s)}else if(n&&!o){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||o)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,"ls-is-cached")}B(u);t._lazyCache=true;I(function(){if("_lazyCache"in t){delete t._lazyCache}},9)}if(t.loading=="lazy"){N--}},true)});var R=function(e){if(e._lazyRace){return}var t;var i=n.test(e.nodeName);var a=i&&(e[$](H.sizesAttr)||e[$]("sizes"));var r=a=="auto";if((r||!m)&&i&&(e[$]("src")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,"lazyunveilread").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;N++;s(e,t,r,a,i)};var r=ae(function(){H.loadMode=3;i()});var l=function(){if(H.loadMode==3){H.loadMode=2}r()};var o=function(){if(m){return}if(f.now()-e<999){I(o,999);return}m=true;H.loadMode=3;i();q("scroll",l,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+" "+H.preloadClass);q("scroll",i,true);q("resize",i,true);q("pageshow",function(e){if(e.persisted){var t=D.querySelectorAll("."+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(i).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P]("DOMNodeInserted",i,true);O[P]("DOMAttrModified",i,true);setInterval(i,999)}
6041q("hashchange",i,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){D[P](e,i,true)});if(/d$|^c/.test(D.readyState)){o()}else{q("load",o);D[P]("DOMContentLoaded",i);I(o,2e4)}if(k.elements.length){t();ee._lsFlush()}else{i()}},checkElems:i,unveil:R,_aLSL:l}}(),re=function(){var i;var n=te(function(e,t,i,a){var r,n,s;e._lazysizesWidth=a;a+="px";e.setAttribute("sizes",a);if(j.test(t.nodeName||"")){r=t.getElementsByTagName("source");for(n=0,s=r.length;n<s;n++){r[n].setAttribute("sizes",a)}}if(!i.detail.dataAttr){Y(e,i.detail)}});var a=function(e,t,i){var a;var r=e.parentNode;if(r){i=s(e,r,i);a=X(e,"lazybeforesizes",{width:i,dataAttr:!!t});if(!a.defaultPrevented){i=a.detail.width;if(i&&i!==e._lazysizesWidth){n(e,r,a,i)}}}};var e=function(){var e;var t=i.length;if(t){e=0;for(;e<t;e++){a(i[e])}}};var t=ae(e);return{_:function(){i=D.getElementsByClassName(H.autosizesClass);q("resize",t)},checkElems:t,updateElem:a}}(),t=function(){if(!t.i&&D.getElementsByClassName){t.i=true;re._();e._()}};return I(function(){H.init&&t()}),k={cfg:H,autoSizer:re,loader:e,init:t,uP:Y,aC:K,rC:Q,hC:J,fire:X,gW:s,rAF:ee}}(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{});;
6042/* AUTOGENERATED: tooltip.js */
6043/* vim: set ts=2 sw=2 sts=2 et: */
6044
6045/**
6046 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
6047 * See https://www.x-cart.com/license-agreement.html for license details.
6048 */
6049
6050jQuery.fn.extend({
6051  startTooltip: function() {
6052    return this.each(function() {
6053      window.startTooltip(this);
6054    });
6055  },
6056  popoverKeepOnHover: function () {
6057    var keepOnHoverInit = function (element) {
6058      var debouncedToggle = _.debounce(function(element, option) {
6059        if (option === 'show'
6060            && $(element).data('bs.popover')
6061            && $(element).data('bs.popover').$tip
6062            && $(element).data('bs.popover').$tip.is(':visible')
6063        ) {
6064          return;
6065        }
6066
6067        $(element).popover(option);
6068      }, 150);
6069
6070      $(element).on("mouseenter", function () {
6071        var _this = this;
6072        debouncedToggle($(_this), 'show');
6073      }).on("mouseleave", function () {
6074        var _this = this;
6075        var hoveredPopover = $(".popover:hover");
6076        if (!hoveredPopover.length) {
6077          debouncedToggle($(_this), 'hide');
6078        } else {
6079          hoveredPopover.on("mouseleave", function() {
6080            debouncedToggle($(_this), 'hide');
6081          });
6082        }
6083      });
6084    };
6085
6086    return this.each(function() {
6087      keepOnHoverInit(this);
6088    });
6089  }
6090});
6091
6092(function ($) {
6093
6094  // Tooltips in customer area
6095  jQuery('.tooltip-main').each(
6096    function () {
6097      attachTooltip(
6098        jQuery('i', this),
6099        jQuery('.help-text', this).hide().html()
6100      );
6101    }
6102  );
6103
6104  window.startTooltip = function (element) {
6105    var helpId = $(element).data('help-id');
6106    var params = {sanitize: false};
6107
6108    if ($(element).parents('.ui-widget-content').first().length) {
6109      params.viewport = ('#' + $(element).parents('.ui-widget-content').first().attr('id'));
6110    }
6111
6112    const container = ($(element).data('container'))
6113    const isNeedRenderInContainer = container && container !== ''
6114    if (isNeedRenderInContainer) {
6115      params.container = container
6116    }
6117
6118    if (helpId) {
6119      content = $('#' + helpId).html();
6120      if (content) {
6121        params.content = content;
6122        $(element).popover(params);
6123      }
6124    } else {
6125      const getContainerElement = (elm) => {
6126        if (getComputedStyle(elm.parentElement).position === 'absolute') {
6127          return elm.parentElement.parentElement;
6128        }
6129        return elm;
6130      };
6131      if (!isNeedRenderInContainer) {
6132        params.container = getContainerElement(element) || element;
6133      }
6134      $(element).popover(params);
6135    }
6136
6137    if ($(element).data('keep-on-hover')) {
6138      $(element).popoverKeepOnHover();
6139    }
6140  };
6141
6142  define('xlite-tooltip', ['vue/vue'], function (Vue) {
6143    Vue.directive('xlite-tooltip', {
6144      inserted: function (el) {
6145        startTooltip(el);
6146      }
6147    });
6148  });
6149
6150})(jQuery);
6151
6152xcart.microhandlers.add(
6153  'Tooltip',
6154  '[data-toggle="popover"]',
6155  function () {
6156    startTooltip(this);
6157  }
6158);;
6159/* AUTOGENERATED: popover.js */
6160/* vim: set ts=2 sw=2 sts=2 et: */
6161
6162/**
6163 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
6164 * See https://www.x-cart.com/license-agreement.html for license details.
6165 */
6166
6167if ($.fn.popover) {
6168  let myDefaultWhiteList = $.fn.popover.Constructor.DEFAULTS.whiteList;
6169
6170  myDefaultWhiteList.input = [];
6171  myDefaultWhiteList.textarea = [];
6172  myDefaultWhiteList.select = [];
6173  myDefaultWhiteList.button = [];
6174  myDefaultWhiteList.table = [];
6175  myDefaultWhiteList.th = [];
6176  myDefaultWhiteList.tr = [];
6177  myDefaultWhiteList.td = [];
6178
6179  myDefaultWhiteList['*'].push('type', 'width', 'height');
6180};
6181/* AUTOGENERATED: mode-switcher.js */
6182/* vim: set ts=2 sw=2 sts=2 et: */
6183
6184/**
6185 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
6186 * See https://www.x-cart.com/license-agreement.html for license details.
6187 */
6188
6189const ModeSwitcher = function () {
6190  const switchers = document.querySelectorAll('.switcher--mode-switcher');
6191  const THEME_DARK = 'dark';
6192  const THEME_LIGHT = 'light';
6193  const COOKIE_NAME = 'theme';
6194  const THEME_ATTRIBUTE = 'data-theme';
6195  const THEME_SYSTEM_ATTRIBUTE = 'data-theme-system';
6196
6197  /**
6198   * Detect if dark theme is enabled (manually or automatically).
6199   *
6200   * @return {boolean} True if dark theme is enabled (manually or automatically), false otherwise.
6201   */
6202  this.isDarkModeEnabled = () => {
6203    const cookie = $.cookie(COOKIE_NAME);
6204    return cookie ? cookie === THEME_DARK : document.documentElement.getAttribute(THEME_ATTRIBUTE) === THEME_DARK;
6205  };
6206
6207  /**
6208   * Toggle on/off all theme switchers on the page.
6209   *
6210   * @param {boolean} [on] If true, switchers will be enabled. Otherwise, disabled.
6211   */
6212  this.switch = (on) => {
6213    if (typeof on === 'undefined') {
6214      on = !this.isDarkModeEnabled();
6215    }
6216
6217    const doc = document.documentElement;
6218    const newTheme = on ? THEME_DARK : THEME_LIGHT;
6219    doc.setAttribute(THEME_ATTRIBUTE, newTheme);
6220    doc.removeAttribute(THEME_SYSTEM_ATTRIBUTE);
6221    $.cookie(COOKIE_NAME, newTheme, {path: xliteConfig.web_dir});
6222    xcart.trigger('theme_changed', newTheme);
6223  };
6224
6225  this.init = () => {
6226    const isDarkMode = this.isDarkModeEnabled();
6227
6228    switchers.forEach(switcher => {
6229      switcher.addEventListener('change', () => {
6230        this.switch(!this.isDarkModeEnabled());
6231      });
6232
6233      switcher.checked = isDarkMode;
6234    });
6235  };
6236};
6237
6238ModeSwitcher.prototype.instance = null;
6239
6240ModeSwitcher.getInstance = () => {
6241  if (!ModeSwitcher.prototype.instance) {
6242    ModeSwitcher.prototype.instance = new ModeSwitcher();
6243    ModeSwitcher.prototype.instance.init();
6244  }
6245
6246  return ModeSwitcher.prototype.instance;
6247};
6248
6249ModeSwitcher.getInstance();;
6250/* AUTOGENERATED: sdk.js */
6251/* vim: set ts=2 sw=2 sts=2 et: */
6252
6253/**
6254 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
6255 * See https://www.x-cart.com/license-agreement.html for license details.
6256 */
6257
6258define('paypal_sdk_loader', ['js/jquery'], function ($) {
6259  function loadPayPalSdk(SDKParams, PartnerAttributionId, ClientToken, SdkToken, PayPal3Dsecure, callback) {
6260    if (SDKParams === null) {
6261      console.warn('PayPal is not configured')
6262      return false;
6263    }
6264
6265    const PAYPAL_SCRIPT = 'https://www.paypal.com/sdk/js?' + SDKParams
6266
6267    const container = document.body || document.head
6268    callback = callback || function() {}
6269
6270    const script = document.createElement('script')
6271    script.setAttribute('src', PAYPAL_SCRIPT)
6272    script.setAttribute('async', true)
6273    script.setAttribute('data-partner-attribution-id', PartnerAttributionId)
6274
6275    if (ClientToken) {
6276      script.setAttribute('data-client-token', ClientToken)
6277    }
6278    if (SdkToken) {
6279      script.setAttribute('data-sdk-client-token', SdkToken);
6280    }
6281
6282    script.onload = function() { callback() }
6283    script.onerror = function(err) { callback(err) }
6284
6285    container.appendChild(script)
6286  }
6287
6288  const bodySector = $('body')
6289  const SDKParams = xcart.getCommentedData(bodySector, 'PayPalSDKParams')
6290  const PartnerAttributionId = xcart.getCommentedData(bodySector, 'PayPalPartnerAttributionId')
6291  const PayPal3Dsecure = xcart.getCommentedData(bodySector, 'PayPal3Dsecure')
6292  const ClientToken = xcart.getCommentedData(bodySector, 'PayPalClientToken')
6293  const SdkToken = xcart.getCommentedData(bodySector, 'PayPalSdkToken');
6294
6295  loadPayPalSdk(SDKParams, PartnerAttributionId, ClientToken, SdkToken, PayPal3Dsecure, function (err) {
6296    if (typeof err !== "undefined") {
6297      console.error('Failed to load paypal script')
6298    } else {
6299      define('paypal_sdk', function () {
6300        return paypal;
6301      })
6302    }
6303  })
6304});;
6305/* AUTOGENERATED: script.js */
6306/* vim: set ts=2 sw=2 sts=2 et: */
6307
6308/**
6309 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
6310 * See https://www.x-cart.com/license-agreement.html for license details.
6311 */
6312
6313var stickerController = {
6314  config: xcart.getCommentedData(jQuery('body'), 'stickers'),
6315  topStickerQuantity: 2,
6316  bottomStickerQuantity: 4,
6317  productStickerInit: function(base) {
6318    let self = this;
6319    let products = base.hasClass('box-product') ? base : base.find('.box-product, .product-cell');
6320
6321    products.each(function(){
6322      let product = $(this);
6323
6324      if (
6325        product.closest('.product-details').length
6326        && !self.config.show_stickers_on_product_pages
6327      ) {
6328        return;
6329      }
6330
6331      let displayMode = self.config.sticker_display_mode;
6332      let container = $(".product-stickers", product);
6333
6334      self.buildProductStickers(product);
6335
6336      if (displayMode === 'corner_ribbon') {
6337        container.addClass(displayMode + '_mode');
6338        self.renderTopRibbons(product);
6339        self.renderBottomRibbons(product);
6340        self.postRender(product);
6341      }
6342
6343      container.toggleClass('show');
6344    });
6345  },
6346  buildProductStickers: function(product) {
6347    $(".top-stickers ul", product).append(this.getTopStickers(product));
6348    $(".bottom-stickers ul", product).append(this.getBottomStickers(product));
6349  },
6350  renderTopRibbons: function(product){
6351    let container = $(".top-stickers ul", product);
6352    let x = container.width();
6353    let x1 = container.parent().width();
6354    let y = container.height();
6355    let y1 = container.parent().height();
6356    container.css({'left': this.calculateLeftOffset(x, x1), 'top': this.calculateTopOffset(y, y1)});
6357    container.parent().css({'height': this.calculateContainerHeight(y, y1), 'width': this.calculateContainerWidth(y, x1)});
6358  },
6359  postRender: function(product){
6360    let container = $(".bottom-stickers ul", product);
6361    $(container.find('li').get().reverse()).each(function(){
6362      let textContainer = $(this).find(".text-ribbon > span");
6363      let productItemOffset = container.closest('.product, .product-details').offset();
6364      let stickerOffset = textContainer.offset();
6365      let stickerFullWidth = parseInt($(this).css('width'));
6366      let stickerInitialHeight = parseInt($(this).css('height'));
6367      let textContainerHeight = parseInt(textContainer.css('height'));
6368      let stickerPadding = stickerInitialHeight - textContainerHeight;
6369      let stickerLeftOffset = (productItemOffset.left - stickerOffset.left) * (Math.sqrt(2));
6370      let stickerCroppedWidth = stickerFullWidth - stickerLeftOffset * 2;
6371
6372      textContainer.css({
6373        'max-width': stickerCroppedWidth + 'px',
6374        'white-space': 'normal'
6375      });
6376
6377      let multiplicity = (parseInt($(this).css('height')) - stickerPadding) / (stickerInitialHeight - stickerPadding);
6378      if (multiplicity > 1) {
6379        multiplicity--;
6380        let hypotenuse = multiplicity * textContainerHeight;
6381        let leg = hypotenuse / (Math.sqrt(2));
6382        let padding = stickerPadding / 2;
6383        container.css({
6384          'left': parseInt(container.css('left')) - hypotenuse - padding,
6385          'top': parseInt(container.css('top')) + hypotenuse / 2 + padding
6386        });
6387        container.parent().css({
6388          'width': parseInt(container.parent().css('width')) + leg * 2 + padding,
6389          'height': parseInt(container.parent().css('height')) + leg * 2 + padding
6390        });
6391      }
6392    });
6393  },
6394  renderBottomRibbons: function(product){
6395    let container = $(".bottom-stickers ul", product);
6396    let x = container.width();
6397    let x1 = container.parent().width();
6398    let y = container.height();
6399    let y1 = container.parent().height();
6400    container.css({'left': this.calculateLeftOffset(x, x1)-(this.calculateContainerWidth(y, x1)-x1), 'top': this.calculateTopOffset(y, y1)+(this.calculateContainerHeight(y, y1)-y1)});
6401    container.parent().css({'height': this.calculateContainerHeight(y, y1), 'width': this.calculateContainerWidth(y, x1)});
6402  },
6403  getDefaultStickerBase: function(product) {
6404    const elem = product.get(0);
6405
6406    const findBox = !!elem.querySelector('.image')
6407      ? product
6408      : elem.querySelectorAll('.product-photo');
6409
6410    return elem
6411    && !!findBox[0].querySelector('ul.labels')
6412      ? findBox[0].querySelector('ul.labels')
6413      : null;
6414  },
6415  getCustomStickerBase: function(product) {
6416    return product ? product.find('.product-stickers > ul') : null;
6417  },
6418  getDefaultStickers: function(product) {
6419    let self = this;
6420    let base = this.getDefaultStickerBase(product);
6421    let labels = (base ? $(base).find('li').clone().toArray() : []).concat(
6422      product.find('.product-freeship-label:not(.product-sticker)').clone().addClass('product-sticker').toArray()
6423    );
6424
6425    if (this.config.move_labels) {
6426      labels = _.each(labels, function (label) {
6427        _.each(self.config.labels, function (relation) {
6428          if (
6429            $(label).hasClass(relation.name)
6430            || $(label).hasClass('product-freeship-label') && relation.name === 'free-shipping'
6431          ) {
6432            $(label).find(".content").css({
6433              'background': '#' + relation.bg_color,
6434              'color': '#' + relation.text_color
6435            });
6436            return $(label);
6437          }
6438        });
6439      });
6440    }
6441
6442    return labels;
6443  },
6444  getCustomStickers: function(product) {
6445    let base = this.getCustomStickerBase(product);
6446    return base ? base.find('li').clone().toArray() : [];
6447  },
6448  getAllStickers: function(product) {
6449    return this.showLabelsAsStickers()
6450      ? this.getDefaultStickers(product).concat(this.getCustomStickers(product))
6451      : this.getCustomStickers(product);
6452  },
6453  getTopStickers: function(product) {
6454    return this.getAllStickers(product).splice(0, this.topStickerQuantity);
6455  },
6456  getBottomStickers: function(product) {
6457    return this.getAllStickers(product).splice(this.topStickerQuantity, this.bottomStickerQuantity);
6458  },
6459  calculateLeftOffset: function(x, x1) {
6460    return ((x1-x)/2);
6461  },
6462  calculateTopOffset: function(y, y1) {
6463    return ((y1-y)/2);
6464  },
6465  calculateContainerHeight: function(h, h1) {
6466    return (h1 + h/(Math.sqrt(2)));
6467  },
6468  calculateContainerWidth: function(h, w1) {
6469    return (w1 + h/(Math.sqrt(2)));
6470  },
6471  isProductPage: function() {
6472    return $("body").hasClass("target-product");
6473  },
6474  showLabelsAsStickers: function() {
6475    return this.config.move_labels;
6476  },
6477  isInitAllowed: function() {
6478    return (
6479      !this.isProductPage()
6480      || this.config.show_stickers_on_product_pages
6481      || (
6482        this.showLabelsAsStickers()
6483        && document.getElementsByClassName('items-list-products')?.length
6484      )
6485    );
6486  },
6487}
6488
6489xcart.bind(['list.products.postprocess', 'block.product.details.postprocess'], function(event, data) {
6490  if (stickerController.isInitAllowed()) {
6491    stickerController.productStickerInit(data.widget.base);
6492    $(".box-product .infoBlock .labels, .product-cell .product-photo .labels").show();
6493  }
6494  if (stickerController.showLabelsAsStickers()) {
6495    $(".box-product .infoBlock .labels, .product-cell .product-photo .labels").hide();
6496  }
6497});;
6498/* AUTOGENERATED: flyout-menu.js */
6499/* vim: set ts=2 sw=2 sts=2 et: */
6500
6501/**
6502 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
6503 * See https://www.x-cart.com/license-agreement.html for license details.
6504 */
6505
6506jQuery(document).ready(function(){
6507    jQuery('ul.flyout-menu > li:not(.leaf) > a').on("touchstart", function (e) {
6508
6509        jQuery('ul.flyout-menu').addClass('touch');
6510
6511        var link = jQuery(this);
6512        var li = jQuery(this).parent();
6513        if (link.hasClass('hover')) {
6514            li.addClass('hover');
6515            return true;
6516        } else {
6517            link.addClass('hover');
6518            jQuery('ul.flyout-menu > li > a').not(this).removeClass('hover');
6519
6520            li.closest('ul.flyout-menu').find('li').removeClass('hover');
6521            li.addClass('hover');
6522
6523            e.preventDefault();
6524            return false;
6525        }
6526    });
6527});;
6528/* AUTOGENERATED: vue.min.js */
6529/*!
6530 * Vue.js v2.6.12
6531 * (c) 2014-2020
vendor: 37,807 bytes, lines 6531-6534
6531 Evan You
6532 * Released under the MIT License.
6533 */
6534!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Vue=t()}(this,function(){"use strict";var e=Object.freeze({});function t(e){return null==e}function n(e){return null!=e}function r(e){return!0===e}function i(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function o(e){return null!==e&&"object"==typeof e}var a=Object.prototype.toString;function s(e){return"[object Object]"===a.call(e)}function c(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function u(e){return n(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function l(e){return null==e?"":Array.isArray(e)||s(e)&&e.toString===a?JSON.stringify(e,null,2):String(e)}function f(e){var t=parseFloat(e);return isNaN(t)?e:t}function p(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var d=p("slot,component",!0),v=p("key,ref,slot,slot-scope,is");function h(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var m=Object.prototype.hasOwnProperty;function y(e,t){return m.call(e,t)}function g(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var _=/-(\w)/g,b=g(function(e){return e.replace(_,function(e,t){return t?t.toUpperCase():""})}),$=g(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),w=/\B([A-Z])/g,C=g(function(e){return e.replace(w,"-$1").toLowerCase()});var x=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function k(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function A(e,t){for(var n in t)e[n]=t[n];return e}function O(e){for(var t={},n=0;n<e.length;n++)e[n]&&A(t,e[n]);return t}function S(e,t,n){}var T=function(e,t,n){return!1},E=function(e){return e};function N(e,t){if(e===t)return!0;var n=o(e),r=o(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var i=Array.isArray(e),a=Array.isArray(t);if(i&&a)return e.length===t.length&&e.every(function(e,n){return N(e,t[n])});if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(i||a)return!1;var s=Object.keys(e),c=Object.keys(t);return s.length===c.length&&s.every(function(n){return N(e[n],t[n])})}catch(e){return!1}}function j(e,t){for(var n=0;n<e.length;n++)if(N(e[n],t))return n;return-1}function D(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var L="data-server-rendered",M=["component","directive","filter"],I=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],F={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:T,isReservedAttr:T,isUnknownElement:T,getTagNamespace:S,parsePlatformTagName:E,mustUseProp:T,async:!0,_lifecycleHooks:I},P=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function R(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var H=new RegExp("[^"+P.source+".$_\\d]");var B,U="__proto__"in{},z="undefined"!=typeof window,V="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,K=V&&WXEnvironment.platform.toLowerCase(),J=z&&window.navigator.userAgent.toLowerCase(),q=J&&/msie|trident/.test(J),W=J&&J.indexOf("msie 9.0")>0,Z=J&&J.indexOf("edge/")>0,G=(J&&J.indexOf("android"),J&&/iphone|ipad|ipod|ios/.test(J)||"ios"===K),X=(J&&/chrome\/\d+/.test(J),J&&/phantomjs/.test(J),J&&J.match(/firefox\/(\d+)/)),Y={}.watch,Q=!1;if(z)try{var ee={};Object.defineProperty(ee,"passive",{get:function(){Q=!0}}),window.addEventListener("test-passive",null,ee)}catch(e){}var te=function(){return void 0===B&&(B=!z&&!V&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),B},ne=z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function re(e){return"function"==typeof e&&/native code/.test(e.toString())}var ie,oe="undefined"!=typeof Symbol&&re(Symbol)&&"undefined"!=typeof Reflect&&re(Reflect.ownKeys);ie="undefined"!=typeof Set&&re(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ae=S,se=0,ce=function(){this.id=se++,this.subs=[]};ce.prototype.addSub=function(e){this.subs.push(e)},ce.prototype.removeSub=function(e){h(this.subs,e)},ce.prototype.depend=function(){ce.target&&ce.target.addDep(this)},ce.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},ce.target=null;var ue=[];function le(e){ue.push(e),ce.target=e}function fe(){ue.pop(),ce.target=ue[ue.length-1]}var pe=function(e,t,n,r,i,o,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},de={child:{configurable:!0}};de.child.get=function(){return this.componentInstance},Object.defineProperties(pe.prototype,de);var ve=function(e){void 0===e&&(e="");var t=new pe;return t.text=e,t.isComment=!0,t};function he(e){return new pe(void 0,void 0,void 0,String(e))}function me(e){var t=new pe(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var ye=Array.prototype,ge=Object.create(ye);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(e){var t=ye[e];R(ge,e,function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var i,o=t.apply(this,n),a=this.__ob__;switch(e){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2)}return i&&a.observeArray(i),a.dep.notify(),o})});var _e=Object.getOwnPropertyNames(ge),be=!0;function $e(e){be=e}var we=function(e){var t;this.value=e,this.dep=new ce,this.vmCount=0,R(e,"__ob__",this),Array.isArray(e)?(U?(t=ge,e.__proto__=t):function(e,t,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];R(e,o,t[o])}}(e,ge,_e),this.observeArray(e)):this.walk(e)};function Ce(e,t){var n;if(o(e)&&!(e instanceof pe))return y(e,"__ob__")&&e.__ob__ instanceof we?n=e.__ob__:be&&!te()&&(Array.isArray(e)||s(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new we(e)),t&&n&&n.vmCount++,n}function xe(e,t,n,r,i){var o=new ce,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var s=a&&a.get,c=a&&a.set;s&&!c||2!==arguments.length||(n=e[t]);var u=!i&&Ce(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=s?s.call(e):n;return ce.target&&(o.depend(),u&&(u.dep.depend(),Array.isArray(t)&&function e(t){for(var n=void 0,r=0,i=t.length;r<i;r++)(n=t[r])&&n.__ob__&&n.__ob__.dep.depend(),Array.isArray(n)&&e(n)}(t))),t},set:function(t){var r=s?s.call(e):n;t===r||t!=t&&r!=r||s&&!c||(c?c.call(e,t):n=t,u=!i&&Ce(t),o.notify())}})}}function ke(e,t,n){if(Array.isArray(e)&&c(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n,n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?(xe(r.value,t,n),r.dep.notify(),n):(e[t]=n,n)}function Ae(e,t){if(Array.isArray(e)&&c(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||y(e,t)&&(delete e[t],n&&n.dep.notify())}}we.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)xe(e,t[n])},we.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)Ce(e[t])};var Oe=F.optionMergeStrategies;function Se(e,t){if(!t)return e;for(var n,r,i,o=oe?Reflect.ownKeys(t):Object.keys(t),a=0;a<o.length;a++)"__ob__"!==(n=o[a])&&(r=e[n],i=t[n],y(e,n)?r!==i&&s(r)&&s(i)&&Se(r,i):ke(e,n,i));return e}function Te(e,t,n){return n?function(){var r="function"==typeof t?t.call(n,n):t,i="function"==typeof e?e.call(n,n):e;return r?Se(r,i):i}:t?e?function(){return Se("function"==typeof t?t.call(this,this):t,"function"==typeof e?e.call(this,this):e)}:t:e}function Ee(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n?function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(n):n}function Ne(e,t,n,r){var i=Object.create(e||null);return t?A(i,t):i}Oe.data=function(e,t,n){return n?Te(e,t,n):t&&"function"!=typeof t?e:Te(e,t)},I.forEach(function(e){Oe[e]=Ee}),M.forEach(function(e){Oe[e+"s"]=Ne}),Oe.watch=function(e,t,n,r){if(e===Y&&(e=void 0),t===Y&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var i={};for(var o in A(i,e),t){var a=i[o],s=t[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},Oe.props=Oe.methods=Oe.inject=Oe.computed=function(e,t,n,r){if(!e)return t;var i=Object.create(null);return A(i,e),t&&A(i,t),i},Oe.provide=Te;var je=function(e,t){return void 0===t?e:t};function De(e,t,n){if("function"==typeof t&&(t=t.options),function(e,t){var n=e.props;if(n){var r,i,o={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(o[b(i)]={type:null});else if(s(n))for(var a in n)i=n[a],o[b(a)]=s(i)?i:{type:i};e.props=o}}(t),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(s(n))for(var o in n){var a=n[o];r[o]=s(a)?A({from:o},a):{from:a}}}}(t),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}(t),!t._base&&(t.extends&&(e=De(e,t.extends,n)),t.mixins))for(var r=0,i=t.mixins.length;r<i;r++)e=De(e,t.mixins[r],n);var o,a={};for(o in e)c(o);for(o in t)y(e,o)||c(o);function c(r){var i=Oe[r]||je;a[r]=i(e[r],t[r],n,r)}return a}function Le(e,t,n,r){if("string"==typeof n){var i=e[t];if(y(i,n))return i[n];var o=b(n);if(y(i,o))return i[o];var a=$(o);return y(i,a)?i[a]:i[n]||i[o]||i[a]}}function Me(e,t,n,r){var i=t[e],o=!y(n,e),a=n[e],s=Pe(Boolean,i.type);if(s>-1)if(o&&!y(i,"default"))a=!1;else if(""===a||a===C(e)){var c=Pe(String,i.type);(c<0||s<c)&&(a=!0)}if(void 0===a){a=function(e,t,n){if(!y(t,"default"))return;var r=t.default;if(e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n])return e._props[n];return"function"==typeof r&&"Function"!==Ie(t.type)?r.call(e):r}(r,i,e);var u=be;$e(!0),Ce(a),$e(u)}return a}function Ie(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function Fe(e,t){return Ie(e)===Ie(t)}function Pe(e,t){if(!Array.isArray(t))return Fe(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(Fe(t[n],e))return n;return-1}function Re(e,t,n){le();try{if(t)for(var r=t;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{if(!1===i[o].call(r,e,t,n))return}catch(e){Be(e,r,"errorCaptured hook")}}Be(e,t,n)}finally{fe()}}function He(e,t,n,r,i){var o;try{(o=n?e.apply(t,n):e.call(t))&&!o._isVue&&u(o)&&!o._handled&&(o.catch(function(e){return Re(e,r,i+" (Promise/async)")}),o._handled=!0)}catch(e){Re(e,r,i)}return o}function Be(e,t,n){if(F.errorHandler)try{return F.errorHandler.call(null,e,t,n)}catch(t){t!==e&&Ue(t,null,"config.errorHandler")}Ue(e,t,n)}function Ue(e,t,n){if(!z&&!V||"undefined"==typeof console)throw e;console.error(e)}var ze,Ve=!1,Ke=[],Je=!1;function qe(){Je=!1;var e=Ke.slice(0);Ke.length=0;for(var t=0;t<e.length;t++)e[t]()}if("undefined"!=typeof Promise&&re(Promise)){var We=Promise.resolve();ze=function(){We.then(qe),G&&setTimeout(S)},Ve=!0}else if(q||"undefined"==typeof MutationObserver||!re(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())ze="undefined"!=typeof setImmediate&&re(setImmediate)?function(){setImmediate(qe)}:function(){setTimeout(qe,0)};else{var Ze=1,Ge=new MutationObserver(qe),Xe=document.createTextNode(String(Ze));Ge.observe(Xe,{characterData:!0}),ze=function(){Ze=(Ze+1)%2,Xe.data=String(Ze)},Ve=!0}function Ye(e,t){var n;if(Ke.push(function(){if(e)try{e.call(t)}catch(e){Re(e,t,"nextTick")}else n&&n(t)}),Je||(Je=!0,ze()),!e&&"undefined"!=typeof Promise)return new Promise(function(e){n=e})}var Qe=new ie;function et(e){!function e(t,n){var r,i;var a=Array.isArray(t);if(!a&&!o(t)||Object.isFrozen(t)||t instanceof pe)return;if(t.__ob__){var s=t.__ob__.dep.id;if(n.has(s))return;n.add(s)}if(a)for(r=t.length;r--;)e(t[r],n);else for(i=Object.keys(t),r=i.length;r--;)e(t[i[r]],n)}(e,Qe),Qe.clear()}var tt=g(function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}});function nt(e,t){function n(){var e=arguments,r=n.fns;if(!Array.isArray(r))return He(r,null,arguments,t,"v-on handler");for(var i=r.slice(),o=0;o<i.length;o++)He(i[o],null,e,t,"v-on handler")}return n.fns=e,n}function rt(e,n,i,o,a,s){var c,u,l,f;for(c in e)u=e[c],l=n[c],f=tt(c),t(u)||(t(l)?(t(u.fns)&&(u=e[c]=nt(u,s)),r(f.once)&&(u=e[c]=a(f.name,u,f.capture)),i(f.name,u,f.capture,f.passive,f.params)):u!==l&&(l.fns=u,e[c]=l));for(c in n)t(e[c])&&o((f=tt(c)).name,n[c],f.capture)}function it(e,i,o){var a;e instanceof pe&&(e=e.data.hook||(e.data.hook={}));var s=e[i];function c(){o.apply(this,arguments),h(a.fns,c)}t(s)?a=nt([c]):n(s.fns)&&r(s.merged)?(a=s).fns.push(c):a=nt([s,c]),a.merged=!0,e[i]=a}function ot(e,t,r,i,o){if(n(t)){if(y(t,r))return e[r]=t[r],o||delete t[r],!0;if(y(t,i))return e[r]=t[i],o||delete t[i],!0}return!1}function at(e){return i(e)?[he(e)]:Array.isArray(e)?function e(o,a){var s=[];var c,u,l,f;for(c=0;c<o.length;c++)t(u=o[c])||"boolean"==typeof u||(l=s.length-1,f=s[l],Array.isArray(u)?u.length>0&&(st((u=e(u,(a||"")+"_"+c))[0])&&st(f)&&(s[l]=he(f.text+u[0].text),u.shift()),s.push.apply(s,u)):i(u)?st(f)?s[l]=he(f.text+u):""!==u&&s.push(he(u)):st(u)&&st(f)?s[l]=he(f.text+u.text):(r(o._isVList)&&n(u.tag)&&t(u.key)&&n(a)&&(u.key="__vlist"+a+"_"+c+"__"),s.push(u)));return s}(e):void 0}function st(e){return n(e)&&n(e.text)&&!1===e.isComment}function ct(e,t){if(e){for(var n=Object.create(null),r=oe?Reflect.ownKeys(e):Object.keys(e),i=0;i<r.length;i++){var o=r[i];if("__ob__"!==o){for(var a=e[o].from,s=t;s;){if(s._provided&&y(s._provided,a)){n[o]=s._provided[a];break}s=s.$parent}if(!s&&"default"in e[o]){var c=e[o].default;n[o]="function"==typeof c?c.call(t):c}}}return n}}function ut(e,t){if(!e||!e.length)return{};for(var n={},r=0,i=e.length;r<i;r++){var o=e[r],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==t&&o.fnContext!==t||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=a.slot,c=n[s]||(n[s]=[]);"template"===o.tag?c.push.apply(c,o.children||[]):c.push(o)}}for(var u in n)n[u].every(lt)&&delete n[u];return n}function lt(e){return e.isComment&&!e.asyncFactory||" "===e.text}function ft(t,n,r){var i,o=Object.keys(n).length>0,a=t?!!t.$stable:!o,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==e&&s===r.$key&&!o&&!r.$hasNormal)return r;for(var c in i={},t)t[c]&&"$"!==c[0]&&(i[c]=pt(n,c,t[c]))}else i={};for(var u in n)u in i||(i[u]=dt(n,u));return t&&Object.isExtensible(t)&&(t._normalized=i),R(i,"$stable",a),R(i,"$key",s),R(i,"$hasNormal",o),i}function pt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:at(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function dt(e,t){return function(){return e[t]}}function vt(e,t){var r,i,a,s,c;if(Array.isArray(e)||"string"==typeof e)for(r=new Array(e.length),i=0,a=e.length;i<a;i++)r[i]=t(e[i],i);else if("number"==typeof e)for(r=new Array(e),i=0;i<e;i++)r[i]=t(i+1,i);else if(o(e))if(oe&&e[Symbol.iterator]){r=[];for(var u=e[Symbol.iterator](),l=u.next();!l.done;)r.push(t(l.value,r.length)),l=u.next()}else for(s=Object.keys(e),r=new Array(s.length),i=0,a=s.length;i<a;i++)c=s[i],r[i]=t(e[c],c,i);return n(r)||(r=[]),r._isVList=!0,r}function ht(e,t,n,r){var i,o=this.$scopedSlots[e];o?(n=n||{},r&&(n=A(A({},r),n)),i=o(n)||t):i=this.$slots[e]||t;var a=n&&n.slot;return a?this.$createElement("template",{slot:a},i):i}function mt(e){return Le(this.$options,"filters",e)||E}function yt(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function gt(e,t,n,r,i){var o=F.keyCodes[t]||n;return i&&r&&!F.keyCodes[t]?yt(i,r):o?yt(o,e):r?C(r)!==t:void 0}function _t(e,t,n,r,i){if(n)if(o(n)){var a;Array.isArray(n)&&(n=O(n));var s=function(o){if("class"===o||"style"===o||v(o))a=e;else{var s=e.attrs&&e.attrs.type;a=r||F.mustUseProp(t,s,o)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}var c=b(o),u=C(o);c in a||u in a||(a[o]=n[o],i&&((e.on||(e.on={}))["update:"+o]=function(e){n[o]=e}))};for(var c in n)s(c)}else;return e}function bt(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t?r:(wt(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r)}function $t(e,t,n){return wt(e,"__once__"+t+(n?"_"+n:""),!0),e}function wt(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&Ct(e[r],t+"_"+r,n);else Ct(e,t,n)}function Ct(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function xt(e,t){if(t)if(s(t)){var n=e.on=e.on?A({},e.on):{};for(var r in t){var i=n[r],o=t[r];n[r]=i?[].concat(i,o):o}}else;return e}function kt(e,t,n,r){t=t||{$stable:!n};for(var i=0;i<e.length;i++){var o=e[i];Array.isArray(o)?kt(o,t,n):o&&(o.proxy&&(o.fn.proxy=!0),t[o.key]=o.fn)}return r&&(t.$key=r),t}function At(e,t){for(var n=0;n<t.length;n+=2){var r=t[n];"string"==typeof r&&r&&(e[t[n]]=t[n+1])}return e}function Ot(e,t){return"string"==typeof e?t+e:e}function St(e){e._o=$t,e._n=f,e._s=l,e._l=vt,e._t=ht,e._q=N,e._i=j,e._m=bt,e._f=mt,e._k=gt,e._b=_t,e._v=he,e._e=ve,e._u=kt,e._g=xt,e._d=At,e._p=Ot}function Tt(t,n,i,o,a){var s,c=this,u=a.options;y(o,"_uid")?(s=Object.create(o))._original=o:(s=o,o=o._original);var l=r(u._compiled),f=!l;this.data=t,this.props=n,this.children=i,this.parent=o,this.listeners=t.on||e,this.injections=ct(u.inject,o),this.slots=function(){return c.$slots||ft(t.scopedSlots,c.$slots=ut(i,o)),c.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return ft(t.scopedSlots,this.slots())}}),l&&(this.$options=u,this.$slots=this.slots(),this.$scopedSlots=ft(t.scopedSlots,this.$slots)),u._scopeId?this._c=function(e,t,n,r){var i=Pt(s,e,t,n,r,f);return i&&!Array.isArray(i)&&(i.fnScopeId=u._scopeId,i.fnContext=o),i}:this._c=function(e,t,n,r){return Pt(s,e,t,n,r,f)}}function Et(e,t,n,r,i){var o=me(e);return o.fnContext=n,o.fnOptions=r,t.slot&&((o.data||(o.data={})).slot=t.slot),o}function Nt(e,t){for(var n in t)e[b(n)]=t[n]}St(Tt.prototype);var jt={init:function(e,t){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var r=e;jt.prepatch(r,r)}else{(e.componentInstance=function(e,t){var r={_isComponent:!0,_parentVnode:e,parent:t},i=e.data.inlineTemplate;n(i)&&(r.render=i.render,r.staticRenderFns=i.staticRenderFns);return new e.componentOptions.Ctor(r)}(e,Wt)).$mount(t?e.elm:void 0,t)}},prepatch:function(t,n){var r=n.componentOptions;!function(t,n,r,i,o){var a=i.data.scopedSlots,s=t.$scopedSlots,c=!!(a&&!a.$stable||s!==e&&!s.$stable||a&&t.$scopedSlots.$key!==a.$key),u=!!(o||t.$options._renderChildren||c);t.$options._parentVnode=i,t.$vnode=i,t._vnode&&(t._vnode.parent=i);if(t.$options._renderChildren=o,t.$attrs=i.data.attrs||e,t.$listeners=r||e,n&&t.$options.props){$e(!1);for(var l=t._props,f=t.$options._propKeys||[],p=0;p<f.length;p++){var d=f[p],v=t.$options.props;l[d]=Me(d,v,n,t)}$e(!0),t.$options.propsData=n}r=r||e;var h=t.$options._parentListeners;t.$options._parentListeners=r,qt(t,r,h),u&&(t.$slots=ut(o,i.context),t.$forceUpdate())}(n.componentInstance=t.componentInstance,r.propsData,r.listeners,n,r.children)},insert:function(e){var t,n=e.context,r=e.componentInstance;r._isMounted||(r._isMounted=!0,Yt(r,"mounted")),e.data.keepAlive&&(n._isMounted?((t=r)._inactive=!1,en.push(t)):Xt(r,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?function e(t,n){if(n&&(t._directInactive=!0,Gt(t)))return;if(!t._inactive){t._inactive=!0;for(var r=0;r<t.$children.length;r++)e(t.$children[r]);Yt(t,"deactivated")}}(t,!0):t.$destroy())}},Dt=Object.keys(jt);function Lt(i,a,s,c,l){if(!t(i)){var f=s.$options._base;if(o(i)&&(i=f.extend(i)),"function"==typeof i){var p;if(t(i.cid)&&void 0===(i=function(e,i){if(r(e.error)&&n(e.errorComp))return e.errorComp;if(n(e.resolved))return e.resolved;var a=Ht;a&&n(e.owners)&&-1===e.owners.indexOf(a)&&e.owners.push(a);if(r(e.loading)&&n(e.loadingComp))return e.loadingComp;if(a&&!n(e.owners)){var s=e.owners=[a],c=!0,l=null,f=null;a.$on("hook:destroyed",function(){return h(s,a)});var p=function(e){for(var t=0,n=s.length;t<n;t++)s[t].$forceUpdate();e&&(s.length=0,null!==l&&(clearTimeout(l),l=null),null!==f&&(clearTimeout(f),f=null))},d=D(function(t){e.resolved=Bt(t,i),c?s.length=0:p(!0)}),v=D(function(t){n(e.errorComp)&&(e.error=!0,p(!0))}),m=e(d,v);return o(m)&&(u(m)?t(e.resolved)&&m.then(d,v):u(m.component)&&(m.component.then(d,v),n(m.error)&&(e.errorComp=Bt(m.error,i)),n(m.loading)&&(e.loadingComp=Bt(m.loading,i),0===m.delay?e.loading=!0:l=setTimeout(function(){l=null,t(e.resolved)&&t(e.error)&&(e.loading=!0,p(!1))},m.delay||200)),n(m.timeout)&&(f=setTimeout(function(){f=null,t(e.resolved)&&v(null)},m.timeout)))),c=!1,e.loading?e.loadingComp:e.resolved}}(p=i,f)))return function(e,t,n,r,i){var o=ve();return o.asyncFactory=e,o.asyncMeta={data:t,context:n,children:r,tag:i},o}(p,a,s,c,l);a=a||{},$n(i),n(a.model)&&function(e,t){var r=e.model&&e.model.prop||"value",i=e.model&&e.model.event||"input";(t.attrs||(t.attrs={}))[r]=t.model.value;var o=t.on||(t.on={}),a=o[i],s=t.model.callback;n(a)?(Array.isArray(a)?-1===a.indexOf(s):a!==s)&&(o[i]=[s].concat(a)):o[i]=s}(i.options,a);var d=function(e,r,i){var o=r.options.props;if(!t(o)){var a={},s=e.attrs,c=e.props;if(n(s)||n(c))for(var u in o){var l=C(u);ot(a,c,u,l,!0)||ot(a,s,u,l,!1)}return a}}(a,i);if(r(i.options.functional))return function(t,r,i,o,a){var s=t.options,c={},u=s.props;if(n(u))for(var l in u)c[l]=Me(l,u,r||e);else n(i.attrs)&&Nt(c,i.attrs),n(i.props)&&Nt(c,i.props);var f=new Tt(i,c,a,o,t),p=s.render.call(null,f._c,f);if(p instanceof pe)return Et(p,i,f.parent,s);if(Array.isArray(p)){for(var d=at(p)||[],v=new Array(d.length),h=0;h<d.length;h++)v[h]=Et(d[h],i,f.parent,s);return v}}(i,d,a,s,c);var v=a.on;if(a.on=a.nativeOn,r(i.options.abstract)){var m=a.slot;a={},m&&(a.slot=m)}!function(e){for(var t=e.hook||(e.hook={}),n=0;n<Dt.length;n++){var r=Dt[n],i=t[r],o=jt[r];i===o||i&&i._merged||(t[r]=i?Mt(o,i):o)}}(a);var y=i.options.name||l;return new pe("vue-component-"+i.cid+(y?"-"+y:""),a,void 0,void 0,void 0,s,{Ctor:i,propsData:d,listeners:v,tag:l,children:c},p)}}}function Mt(e,t){var n=function(n,r){e(n,r),t(n,r)};return n._merged=!0,n}var It=1,Ft=2;function Pt(e,a,s,c,u,l){return(Array.isArray(s)||i(s))&&(u=c,c=s,s=void 0),r(l)&&(u=Ft),function(e,i,a,s,c){if(n(a)&&n(a.__ob__))return ve();n(a)&&n(a.is)&&(i=a.is);if(!i)return ve();Array.isArray(s)&&"function"==typeof s[0]&&((a=a||{}).scopedSlots={default:s[0]},s.length=0);c===Ft?s=at(s):c===It&&(s=function(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}(s));var u,l;if("string"==typeof i){var f;l=e.$vnode&&e.$vnode.ns||F.getTagNamespace(i),u=F.isReservedTag(i)?new pe(F.parsePlatformTagName(i),a,s,void 0,void 0,e):a&&a.pre||!n(f=Le(e.$options,"components",i))?new pe(i,a,s,void 0,void 0,e):Lt(f,a,e,s,i)}else u=Lt(i,a,e,s);return Array.isArray(u)?u:n(u)?(n(l)&&function e(i,o,a){i.ns=o;"foreignObject"===i.tag&&(o=void 0,a=!0);if(n(i.children))for(var s=0,c=i.children.length;s<c;s++){var u=i.children[s];n(u.tag)&&(t(u.ns)||r(a)&&"svg"!==u.tag)&&e(u,o,a)}}(u,l),n(a)&&function(e){o(e.style)&&et(e.style);o(e.class)&&et(e.class)}(a),u):ve()}(e,a,s,c,u)}var Rt,Ht=null;function Bt(e,t){return(e.__esModule||oe&&"Module"===e[Symbol.toStringTag])&&(e=e.default),o(e)?t.extend(e):e}function Ut(e){return e.isComment&&e.asyncFactory}function zt(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var r=e[t];if(n(r)&&(n(r.componentOptions)||Ut(r)))return r}}function Vt(e,t){Rt.$on(e,t)}function Kt(e,t){Rt.$off(e,t)}function Jt(e,t){var n=Rt;return function r(){null!==t.apply(null,arguments)&&n.$off(e,r)}}function qt(e,t,n){Rt=e,rt(t,n||{},Vt,Kt,Jt,e),Rt=void 0}var Wt=null;function Zt(e){var t=Wt;return Wt=e,function(){Wt=t}}function Gt(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function Xt(e,t){if(t){if(e._directInactive=!1,Gt(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)Xt(e.$children[n]);Yt(e,"activated")}}function Yt(e,t){le();var n=e.$options[t],r=t+" hook";if(n)for(var i=0,o=n.length;i<o;i++)He(n[i],e,null,e,r);e._hasHookEvent&&e.$emit("hook:"+t),fe()}var Qt=[],en=[],tn={},nn=!1,rn=!1,on=0;var an=0,sn=Date.now;if(z&&!q){var cn=window.performance;cn&&"function"==typeof cn.now&&sn()>document.createEvent("Event").timeStamp&&(sn=function(){return cn.now()})}function un(){var e,t;for(an=sn(),rn=!0,Qt.sort(function(e,t){return e.id-t.id}),on=0;on<Qt.length;on++)(e=Qt[on]).before&&e.before(),t=e.id,tn[t]=null,e.run();var n=en.slice(),r=Qt.slice();on=Qt.length=en.length=0,tn={},nn=rn=!1,function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,Xt(e[t],!0)}(n),function(e){var t=e.length;for(;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&Yt(r,"updated")}}(r),ne&&F.devtools&&ne.emit("flush")}var ln=0,fn=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++ln,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ie,this.newDepIds=new ie,this.expression="","function"==typeof t?this.getter=t:(this.getter=function(e){if(!H.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}(t),this.getter||(this.getter=S)),this.value=this.lazy?void 0:this.get()};fn.prototype.get=function(){var e;le(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;Re(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&et(e),fe(),this.cleanupDeps()}return e},fn.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},fn.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},fn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null==tn[t]){if(tn[t]=!0,rn){for(var n=Qt.length-1;n>on&&Qt[n].id>e.id;)n--;Qt.splice(n+1,0,e)}else Qt.push(e);nn||(nn=!0,Ye(un))}}(this)},fn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||o(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Re(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},fn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},fn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},fn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||h(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var pn={enumerable:!0,configurable:!0,get:S,set:S};function dn(e,t,n){pn.get=function(){return this[t][n]},pn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,pn)}function vn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[];e.$parent&&$e(!1);var o=function(o){i.push(o);var a=Me(o,t,n,e);xe(r,o,a),o in e||dn(e,"_props",o)};for(var a in t)o(a);$e(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?S:x(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;s(t=e._data="function"==typeof t?function(e,t){le();try{return e.call(t,t)}catch(e){return Re(e,t,"data()"),{}}finally{fe()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var o=n[i];r&&y(r,o)||(a=void 0,36!==(a=(o+"").charCodeAt(0))&&95!==a&&dn(e,"_data",o))}var a;Ce(t,!0)}(e):Ce(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=te();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new fn(e,a||S,S,hn)),i in e||mn(e,i,o)}}(e,t.computed),t.watch&&t.watch!==Y&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)_n(e,n,r[i]);else _n(e,n,r)}}(e,t.watch)}var hn={lazy:!0};function mn(e,t,n){var r=!te();"function"==typeof n?(pn.get=r?yn(t):gn(n),pn.set=S):(pn.get=n.get?r&&!1!==n.cache?yn(t):gn(n.get):S,pn.set=n.set||S),Object.defineProperty(e,t,pn)}function yn(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),ce.target&&t.depend(),t.value}}function gn(e){return function(){return e.call(this,this)}}function _n(e,t,n,r){return s(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}var bn=0;function $n(e){var t=e.options;if(e.super){var n=$n(e.super);if(n!==e.superOptions){e.superOptions=n;var r=function(e){var t,n=e.options,r=e.sealedOptions;for(var i in n)n[i]!==r[i]&&(t||(t={}),t[i]=n[i]);return t}(e);r&&A(e.extendOptions,r),(t=e.options=De(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function wn(e){this._init(e)}function Cn(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name,a=function(e){this._init(e)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=t++,a.options=De(n.options,e),a.super=n,a.options.props&&function(e){var t=e.options.props;for(var n in t)dn(e.prototype,"_props",n)}(a),a.options.computed&&function(e){var t=e.options.computed;for(var n in t)mn(e.prototype,n,t[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,M.forEach(function(e){a[e]=n[e]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=A({},a.options),i[r]=a,a}}function xn(e){return e&&(e.Ctor.options.name||e.tag)}function kn(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:(n=e,"[object RegExp]"===a.call(n)&&e.test(t));var n}function An(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=xn(a.componentOptions);s&&!t(s)&&On(n,o,r,i)}}}function On(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,h(n,t)}!function(t){t.prototype._init=function(t){var n=this;n._uid=bn++,n._isVue=!0,t&&t._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(n,t):n.$options=De($n(n.constructor),t||{},n),n._renderProxy=n,n._self=n,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(n),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&qt(e,t)}(n),function(t){t._vnode=null,t._staticTrees=null;var n=t.$options,r=t.$vnode=n._parentVnode,i=r&&r.context;t.$slots=ut(n._renderChildren,i),t.$scopedSlots=e,t._c=function(e,n,r,i){return Pt(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return Pt(t,e,n,r,i,!0)};var o=r&&r.data;xe(t,"$attrs",o&&o.attrs||e,null,!0),xe(t,"$listeners",n._parentListeners||e,null,!0)}(n),Yt(n,"beforeCreate"),function(e){var t=ct(e.$options.inject,e);t&&($e(!1),Object.keys(t).forEach(function(n){xe(e,n,t[n])}),$e(!0))}(n),vn(n),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(n),Yt(n,"created"),n.$options.el&&n.$mount(n.$options.el)}}(wn),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=ke,e.prototype.$delete=Ae,e.prototype.$watch=function(e,t,n){if(s(t))return _n(this,e,t,n);(n=n||{}).user=!0;var r=new fn(this,e,t,n);if(n.immediate)try{t.call(this,r.value)}catch(e){Re(e,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(wn),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var i=0,o=e.length;i<o;i++)r.$on(e[i],n);else(r._events[e]||(r._events[e]=[])).push(n),t.test(e)&&(r._hasHookEvent=!0);return r},e.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},e.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(e)){for(var r=0,i=e.length;r<i;r++)n.$off(e[r],t);return n}var o,a=n._events[e];if(!a)return n;if(!t)return n._events[e]=null,n;for(var s=a.length;s--;)if((o=a[s])===t||o.fn===t){a.splice(s,1);break}return n},e.prototype.$emit=function(e){var t=this._events[e];if(t){t=t.length>1?k(t):t;for(var n=k(arguments,1),r='event handler for "'+e+'"',i=0,o=t.length;i<o;i++)He(t[i],this,n,this,r)}return this}}(wn),function(e){e.prototype._update=function(e,t){var n=this,r=n.$el,i=n._vnode,o=Zt(n);n._vnode=e,n.$el=i?n.__patch__(i,e):n.__patch__(n.$el,e,t,!1),o(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){Yt(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||h(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),Yt(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}(wn),function(e){St(e.prototype),e.prototype.$nextTick=function(e){return Ye(e,this)},e.prototype._render=function(){var e,t=this,n=t.$options,r=n.render,i=n._parentVnode;i&&(t.$scopedSlots=ft(i.data.scopedSlots,t.$slots,t.$scopedSlots)),t.$vnode=i;try{Ht=t,e=r.call(t._renderProxy,t.$createElement)}catch(n){Re(n,t,"render"),e=t._vnode}finally{Ht=null}return Array.isArray(e)&&1===e.length&&(e=e[0]),e instanceof pe||(e=ve()),e.parent=i,e}}(wn);var Sn=[String,RegExp,Array],Tn={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:Sn,exclude:Sn,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)On(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",function(t){An(e,function(e){return kn(t,e)})}),this.$watch("exclude",function(t){An(e,function(e){return!kn(t,e)})})},render:function(){var e=this.$slots.default,t=zt(e),n=t&&t.componentOptions;if(n){var r=xn(n),i=this.include,o=this.exclude;if(i&&(!r||!kn(i,r))||o&&r&&kn(o,r))return t;var a=this.cache,s=this.keys,c=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;a[c]?(t.componentInstance=a[c].componentInstance,h(s,c),s.push(c)):(a[c]=t,s.push(c),this.max&&s.length>parseInt(this.max)&&On(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return F}};Object.defineProperty(e,"config",t),e.util={warn:ae,extend:A,mergeOptions:De,defineReactive:xe},e.set=ke,e.delete=Ae,e.nextTick=Ye,e.observable=function(e){return Ce(e),e},e.options=Object.create(null),M.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,A(e.options.components,Tn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=k(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=De(this.options,e),this}}(e),Cn(e),function(e){M.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&s(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}(e)}(wn),Object.defineProperty(wn.prototype,"$isServer",{get:te}),Object.defineProperty(wn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(wn,"FunctionalRenderContext",{value:Tt}),wn.version="2.6.1
65342
vendor: 55,824 bytes, line 6534
6534";var En=p("style,class"),Nn=p("input,textarea,option,select,progress"),jn=function(e,t,n){return"value"===n&&Nn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Dn=p("contenteditable,draggable,spellcheck"),Ln=p("events,caret,typing,plaintext-only"),Mn=function(e,t){return Hn(t)||"false"===t?"false":"contenteditable"===e&&Ln(t)?t:"true"},In=p("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Fn="http://www.w3.org/1999/xlink",Pn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Rn=function(e){return Pn(e)?e.slice(6,e.length):""},Hn=function(e){return null==e||!1===e};function Bn(e){for(var t=e.data,r=e,i=e;n(i.componentInstance);)(i=i.componentInstance._vnode)&&i.data&&(t=Un(i.data,t));for(;n(r=r.parent);)r&&r.data&&(t=Un(t,r.data));return function(e,t){if(n(e)||n(t))return zn(e,Vn(t));return""}(t.staticClass,t.class)}function Un(e,t){return{staticClass:zn(e.staticClass,t.staticClass),class:n(e.class)?[e.class,t.class]:t.class}}function zn(e,t){return e?t?e+" "+t:e:t||""}function Vn(e){return Array.isArray(e)?function(e){for(var t,r="",i=0,o=e.length;i<o;i++)n(t=Vn(e[i]))&&""!==t&&(r&&(r+=" "),r+=t);return r}(e):o(e)?function(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}(e):"string"==typeof e?e:""}var Kn={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Jn=p("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),qn=p("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Wn=function(e){return Jn(e)||qn(e)};function Zn(e){return qn(e)?"svg":"math"===e?"math":void 0}var Gn=Object.create(null);var Xn=p("text,number,password,search,email,tel,url");function Yn(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}var Qn=Object.freeze({createElement:function(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)},createElementNS:function(e,t){return document.createElementNS(Kn[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setStyleScope:function(e,t){e.setAttribute(t,"")}}),er={create:function(e,t){tr(t)},update:function(e,t){e.data.ref!==t.data.ref&&(tr(e,!0),tr(t))},destroy:function(e){tr(e,!0)}};function tr(e,t){var r=e.data.ref;if(n(r)){var i=e.context,o=e.componentInstance||e.elm,a=i.$refs;t?Array.isArray(a[r])?h(a[r],o):a[r]===o&&(a[r]=void 0):e.data.refInFor?Array.isArray(a[r])?a[r].indexOf(o)<0&&a[r].push(o):a[r]=[o]:a[r]=o}}var nr=new pe("",{},[]),rr=["create","activate","update","remove","destroy"];function ir(e,i){return e.key===i.key&&(e.tag===i.tag&&e.isComment===i.isComment&&n(e.data)===n(i.data)&&function(e,t){if("input"!==e.tag)return!0;var r,i=n(r=e.data)&&n(r=r.attrs)&&r.type,o=n(r=t.data)&&n(r=r.attrs)&&r.type;return i===o||Xn(i)&&Xn(o)}(e,i)||r(e.isAsyncPlaceholder)&&e.asyncFactory===i.asyncFactory&&t(i.asyncFactory.error))}function or(e,t,r){var i,o,a={};for(i=t;i<=r;++i)n(o=e[i].key)&&(a[o]=i);return a}var ar={create:sr,update:sr,destroy:function(e){sr(e,nr)}};function sr(e,t){(e.data.directives||t.data.directives)&&function(e,t){var n,r,i,o=e===nr,a=t===nr,s=ur(e.data.directives,e.context),c=ur(t.data.directives,t.context),u=[],l=[];for(n in c)r=s[n],i=c[n],r?(i.oldValue=r.value,i.oldArg=r.arg,fr(i,"update",t,e),i.def&&i.def.componentUpdated&&l.push(i)):(fr(i,"bind",t,e),i.def&&i.def.inserted&&u.push(i));if(u.length){var f=function(){for(var n=0;n<u.length;n++)fr(u[n],"inserted",t,e)};o?it(t,"insert",f):f()}l.length&&it(t,"postpatch",function(){for(var n=0;n<l.length;n++)fr(l[n],"componentUpdated",t,e)});if(!o)for(n in s)c[n]||fr(s[n],"unbind",e,e,a)}(e,t)}var cr=Object.create(null);function ur(e,t){var n,r,i=Object.create(null);if(!e)return i;for(n=0;n<e.length;n++)(r=e[n]).modifiers||(r.modifiers=cr),i[lr(r)]=r,r.def=Le(t.$options,"directives",r.name);return i}function lr(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function fr(e,t,n,r,i){var o=e.def&&e.def[t];if(o)try{o(n.elm,e,n,r,i)}catch(r){Re(r,n.context,"directive "+e.name+" "+t+" hook")}}var pr=[er,ar];function dr(e,r){var i=r.componentOptions;if(!(n(i)&&!1===i.Ctor.options.inheritAttrs||t(e.data.attrs)&&t(r.data.attrs))){var o,a,s=r.elm,c=e.data.attrs||{},u=r.data.attrs||{};for(o in n(u.__ob__)&&(u=r.data.attrs=A({},u)),u)a=u[o],c[o]!==a&&vr(s,o,a);for(o in(q||Z)&&u.value!==c.value&&vr(s,"value",u.value),c)t(u[o])&&(Pn(o)?s.removeAttributeNS(Fn,Rn(o)):Dn(o)||s.removeAttribute(o))}}function vr(e,t,n){e.tagName.indexOf("-")>-1?hr(e,t,n):In(t)?Hn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Dn(t)?e.setAttribute(t,Mn(t,n)):Pn(t)?Hn(n)?e.removeAttributeNS(Fn,Rn(t)):e.setAttributeNS(Fn,t,n):hr(e,t,n)}function hr(e,t,n){if(Hn(n))e.removeAttribute(t);else{if(q&&!W&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var mr={create:dr,update:dr};function yr(e,r){var i=r.elm,o=r.data,a=e.data;if(!(t(o.staticClass)&&t(o.class)&&(t(a)||t(a.staticClass)&&t(a.class)))){var s=Bn(r),c=i._transitionClasses;n(c)&&(s=zn(s,Vn(c))),s!==i._prevClass&&(i.setAttribute("class",s),i._prevClass=s)}}var gr,_r,br,$r,wr,Cr,xr={create:yr,update:yr},kr=/[\w).+\-_$\]]/;function Ar(e){var t,n,r,i,o,a=!1,s=!1,c=!1,u=!1,l=0,f=0,p=0,d=0;for(r=0;r<e.length;r++)if(n=t,t=e.charCodeAt(r),a)39===t&&92!==n&&(a=!1);else if(s)34===t&&92!==n&&(s=!1);else if(c)96===t&&92!==n&&(c=!1);else if(u)47===t&&92!==n&&(u=!1);else if(124!==t||124===e.charCodeAt(r+1)||124===e.charCodeAt(r-1)||l||f||p){switch(t){case 34:s=!0;break;case 39:a=!0;break;case 96:c=!0;break;case 40:p++;break;case 41:p--;break;case 91:f++;break;case 93:f--;break;case 123:l++;break;case 125:l--}if(47===t){for(var v=r-1,h=void 0;v>=0&&" "===(h=e.charAt(v));v--);h&&kr.test(h)||(u=!0)}}else void 0===i?(d=r+1,i=e.slice(0,r).trim()):m();function m(){(o||(o=[])).push(e.slice(d,r).trim()),d=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==d&&m(),o)for(r=0;r<o.length;r++)i=Or(i,o[r]);return i}function Or(e,t){var n=t.indexOf("(");if(n<0)return'_f("'+t+'")('+e+")";var r=t.slice(0,n),i=t.slice(n+1);return'_f("'+r+'")('+e+(")"!==i?","+i:i)}function Sr(e,t){console.error("[Vue compiler]: "+e)}function Tr(e,t){return e?e.map(function(e){return e[t]}).filter(function(e){return e}):[]}function Er(e,t,n,r,i){(e.props||(e.props=[])).push(Rr({name:t,value:n,dynamic:i},r)),e.plain=!1}function Nr(e,t,n,r,i){(i?e.dynamicAttrs||(e.dynamicAttrs=[]):e.attrs||(e.attrs=[])).push(Rr({name:t,value:n,dynamic:i},r)),e.plain=!1}function jr(e,t,n,r){e.attrsMap[t]=n,e.attrsList.push(Rr({name:t,value:n},r))}function Dr(e,t,n,r,i,o,a,s){(e.directives||(e.directives=[])).push(Rr({name:t,rawName:n,value:r,arg:i,isDynamicArg:o,modifiers:a},s)),e.plain=!1}function Lr(e,t,n){return n?"_p("+t+',"'+e+'")':e+t}function Mr(t,n,r,i,o,a,s,c){var u;(i=i||e).right?c?n="("+n+")==='click'?'contextmenu':("+n+")":"click"===n&&(n="contextmenu",delete i.right):i.middle&&(c?n="("+n+")==='click'?'mouseup':("+n+")":"click"===n&&(n="mouseup")),i.capture&&(delete i.capture,n=Lr("!",n,c)),i.once&&(delete i.once,n=Lr("~",n,c)),i.passive&&(delete i.passive,n=Lr("&",n,c)),i.native?(delete i.native,u=t.nativeEvents||(t.nativeEvents={})):u=t.events||(t.events={});var l=Rr({value:r.trim(),dynamic:c},s);i!==e&&(l.modifiers=i);var f=u[n];Array.isArray(f)?o?f.unshift(l):f.push(l):u[n]=f?o?[l,f]:[f,l]:l,t.plain=!1}function Ir(e,t,n){var r=Fr(e,":"+t)||Fr(e,"v-bind:"+t);if(null!=r)return Ar(r);if(!1!==n){var i=Fr(e,t);if(null!=i)return JSON.stringify(i)}}function Fr(e,t,n){var r;if(null!=(r=e.attrsMap[t]))for(var i=e.attrsList,o=0,a=i.length;o<a;o++)if(i[o].name===t){i.splice(o,1);break}return n&&delete e.attrsMap[t],r}function Pr(e,t){for(var n=e.attrsList,r=0,i=n.length;r<i;r++){var o=n[r];if(t.test(o.name))return n.splice(r,1),o}}function Rr(e,t){return t&&(null!=t.start&&(e.start=t.start),null!=t.end&&(e.end=t.end)),e}function Hr(e,t,n){var r=n||{},i=r.number,o="$$v";r.trim&&(o="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(o="_n("+o+")");var a=Br(t,o);e.model={value:"("+t+")",expression:JSON.stringify(t),callback:"function ($$v) {"+a+"}"}}function Br(e,t){var n=function(e){if(e=e.trim(),gr=e.length,e.indexOf("[")<0||e.lastIndexOf("]")<gr-1)return($r=e.lastIndexOf("."))>-1?{exp:e.slice(0,$r),key:'"'+e.slice($r+1)+'"'}:{exp:e,key:null};_r=e,$r=wr=Cr=0;for(;!zr();)Vr(br=Ur())?Jr(br):91===br&&Kr(br);return{exp:e.slice(0,wr),key:e.slice(wr+1,Cr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Ur(){return _r.charCodeAt(++$r)}function zr(){return $r>=gr}function Vr(e){return 34===e||39===e}function Kr(e){var t=1;for(wr=$r;!zr();)if(Vr(e=Ur()))Jr(e);else if(91===e&&t++,93===e&&t--,0===t){Cr=$r;break}}function Jr(e){for(var t=e;!zr()&&(e=Ur())!==t;);}var qr,Wr="__r",Zr="__c";function Gr(e,t,n){var r=qr;return function i(){null!==t.apply(null,arguments)&&Qr(e,i,n,r)}}var Xr=Ve&&!(X&&Number(X[1])<=53);function Yr(e,t,n,r){if(Xr){var i=an,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}qr.addEventListener(e,t,Q?{capture:n,passive:r}:n)}function Qr(e,t,n,r){(r||qr).removeEventListener(e,t._wrapper||t,n)}function ei(e,r){if(!t(e.data.on)||!t(r.data.on)){var i=r.data.on||{},o=e.data.on||{};qr=r.elm,function(e){if(n(e[Wr])){var t=q?"change":"input";e[t]=[].concat(e[Wr],e[t]||[]),delete e[Wr]}n(e[Zr])&&(e.change=[].concat(e[Zr],e.change||[]),delete e[Zr])}(i),rt(i,o,Yr,Qr,Gr,r.context),qr=void 0}}var ti,ni={create:ei,update:ei};function ri(e,r){if(!t(e.data.domProps)||!t(r.data.domProps)){var i,o,a=r.elm,s=e.data.domProps||{},c=r.data.domProps||{};for(i in n(c.__ob__)&&(c=r.data.domProps=A({},c)),s)i in c||(a[i]="");for(i in c){if(o=c[i],"textContent"===i||"innerHTML"===i){if(r.children&&(r.children.length=0),o===s[i])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===i&&"PROGRESS"!==a.tagName){a._value=o;var u=t(o)?"":String(o);ii(a,u)&&(a.value=u)}else if("innerHTML"===i&&qn(a.tagName)&&t(a.innerHTML)){(ti=ti||document.createElement("div")).innerHTML="<svg>"+o+"</svg>";for(var l=ti.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}else if(o!==s[i])try{a[i]=o}catch(e){}}}}function ii(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var r=e.value,i=e._vModifiers;if(n(i)){if(i.number)return f(r)!==f(t);if(i.trim)return r.trim()!==t.trim()}return r!==t}(e,t))}var oi={create:ri,update:ri},ai=g(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t});function si(e){var t=ci(e.style);return e.staticStyle?A(e.staticStyle,t):t}function ci(e){return Array.isArray(e)?O(e):"string"==typeof e?ai(e):e}var ui,li=/^--/,fi=/\s*!important$/,pi=function(e,t,n){if(li.test(t))e.style.setProperty(t,n);else if(fi.test(n))e.style.setProperty(C(t),n.replace(fi,""),"important");else{var r=vi(t);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)e.style[r]=n[i];else e.style[r]=n}},di=["Webkit","Moz","ms"],vi=g(function(e){if(ui=ui||document.createElement("div").style,"filter"!==(e=b(e))&&e in ui)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<di.length;n++){var r=di[n]+t;if(r in ui)return r}});function hi(e,r){var i=r.data,o=e.data;if(!(t(i.staticStyle)&&t(i.style)&&t(o.staticStyle)&&t(o.style))){var a,s,c=r.elm,u=o.staticStyle,l=o.normalizedStyle||o.style||{},f=u||l,p=ci(r.data.style)||{};r.data.normalizedStyle=n(p.__ob__)?A({},p):p;var d=function(e,t){var n,r={};if(t)for(var i=e;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=si(i.data))&&A(r,n);(n=si(e.data))&&A(r,n);for(var o=e;o=o.parent;)o.data&&(n=si(o.data))&&A(r,n);return r}(r,!0);for(s in f)t(d[s])&&pi(c,s,"");for(s in d)(a=d[s])!==f[s]&&pi(c,s,null==a?"":a)}}var mi={create:hi,update:hi},yi=/\s+/;function gi(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(yi).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function _i(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(yi).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function bi(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&A(t,$i(e.name||"v")),A(t,e),t}return"string"==typeof e?$i(e):void 0}}var $i=g(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),wi=z&&!W,Ci="transition",xi="animation",ki="transition",Ai="transitionend",Oi="animation",Si="animationend";wi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ki="WebkitTransition",Ai="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Oi="WebkitAnimation",Si="webkitAnimationEnd"));var Ti=z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Ei(e){Ti(function(){Ti(e)})}function Ni(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),gi(e,t))}function ji(e,t){e._transitionClasses&&h(e._transitionClasses,t),_i(e,t)}function Di(e,t,n){var r=Mi(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Ci?Ai:Si,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c<a&&u()},o+1),e.addEventListener(s,l)}var Li=/\b(transform|all)(,|$)/;function Mi(e,t){var n,r=window.getComputedStyle(e),i=(r[ki+"Delay"]||"").split(", "),o=(r[ki+"Duration"]||"").split(", "),a=Ii(i,o),s=(r[Oi+"Delay"]||"").split(", "),c=(r[Oi+"Duration"]||"").split(", "),u=Ii(s,c),l=0,f=0;return t===Ci?a>0&&(n=Ci,l=a,f=o.length):t===xi?u>0&&(n=xi,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Ci:xi:null)?n===Ci?o.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Ci&&Li.test(r[ki+"Property"])}}function Ii(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map(function(t,n){return Fi(t)+Fi(e[n])}))}function Fi(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function Pi(e,r){var i=e.elm;n(i._leaveCb)&&(i._leaveCb.cancelled=!0,i._leaveCb());var a=bi(e.data.transition);if(!t(a)&&!n(i._enterCb)&&1===i.nodeType){for(var s=a.css,c=a.type,u=a.enterClass,l=a.enterToClass,p=a.enterActiveClass,d=a.appearClass,v=a.appearToClass,h=a.appearActiveClass,m=a.beforeEnter,y=a.enter,g=a.afterEnter,_=a.enterCancelled,b=a.beforeAppear,$=a.appear,w=a.afterAppear,C=a.appearCancelled,x=a.duration,k=Wt,A=Wt.$vnode;A&&A.parent;)k=A.context,A=A.parent;var O=!k._isMounted||!e.isRootInsert;if(!O||$||""===$){var S=O&&d?d:u,T=O&&h?h:p,E=O&&v?v:l,N=O&&b||m,j=O&&"function"==typeof $?$:y,L=O&&w||g,M=O&&C||_,I=f(o(x)?x.enter:x),F=!1!==s&&!W,P=Bi(j),R=i._enterCb=D(function(){F&&(ji(i,E),ji(i,T)),R.cancelled?(F&&ji(i,S),M&&M(i)):L&&L(i),i._enterCb=null});e.data.show||it(e,"insert",function(){var t=i.parentNode,n=t&&t._pending&&t._pending[e.key];n&&n.tag===e.tag&&n.elm._leaveCb&&n.elm._leaveCb(),j&&j(i,R)}),N&&N(i),F&&(Ni(i,S),Ni(i,T),Ei(function(){ji(i,S),R.cancelled||(Ni(i,E),P||(Hi(I)?setTimeout(R,I):Di(i,c,R)))})),e.data.show&&(r&&r(),j&&j(i,R)),F||P||R()}}}function Ri(e,r){var i=e.elm;n(i._enterCb)&&(i._enterCb.cancelled=!0,i._enterCb());var a=bi(e.data.transition);if(t(a)||1!==i.nodeType)return r();if(!n(i._leaveCb)){var s=a.css,c=a.type,u=a.leaveClass,l=a.leaveToClass,p=a.leaveActiveClass,d=a.beforeLeave,v=a.leave,h=a.afterLeave,m=a.leaveCancelled,y=a.delayLeave,g=a.duration,_=!1!==s&&!W,b=Bi(v),$=f(o(g)?g.leave:g),w=i._leaveCb=D(function(){i.parentNode&&i.parentNode._pending&&(i.parentNode._pending[e.key]=null),_&&(ji(i,l),ji(i,p)),w.cancelled?(_&&ji(i,u),m&&m(i)):(r(),h&&h(i)),i._leaveCb=null});y?y(C):C()}function C(){w.cancelled||(!e.data.show&&i.parentNode&&((i.parentNode._pending||(i.parentNode._pending={}))[e.key]=e),d&&d(i),_&&(Ni(i,u),Ni(i,p),Ei(function(){ji(i,u),w.cancelled||(Ni(i,l),b||(Hi($)?setTimeout(w,$):Di(i,c,w)))})),v&&v(i,w),_||b||w())}}function Hi(e){return"number"==typeof e&&!isNaN(e)}function Bi(e){if(t(e))return!1;var r=e.fns;return n(r)?Bi(Array.isArray(r)?r[0]:r):(e._length||e.length)>1}function Ui(e,t){!0!==t.data.show&&Pi(t)}var zi=function(e){var o,a,s={},c=e.modules,u=e.nodeOps;for(o=0;o<rr.length;++o)for(s[rr[o]]=[],a=0;a<c.length;++a)n(c[a][rr[o]])&&s[rr[o]].push(c[a][rr[o]]);function l(e){var t=u.parentNode(e);n(t)&&u.removeChild(t,e)}function f(e,t,i,o,a,c,l){if(n(e.elm)&&n(c)&&(e=c[l]=me(e)),e.isRootInsert=!a,!function(e,t,i,o){var a=e.data;if(n(a)){var c=n(e.componentInstance)&&a.keepAlive;if(n(a=a.hook)&&n(a=a.init)&&a(e,!1),n(e.componentInstance))return d(e,t),v(i,e.elm,o),r(c)&&function(e,t,r,i){for(var o,a=e;a.componentInstance;)if(a=a.componentInstance._vnode,n(o=a.data)&&n(o=o.transition)){for(o=0;o<s.activate.length;++o)s.activate[o](nr,a);t.push(a);break}v(r,e.elm,i)}(e,t,i,o),!0}}(e,t,i,o)){var f=e.data,p=e.children,m=e.tag;n(m)?(e.elm=e.ns?u.createElementNS(e.ns,m):u.createElement(m,e),g(e),h(e,p,t),n(f)&&y(e,t),v(i,e.elm,o)):r(e.isComment)?(e.elm=u.createComment(e.text),v(i,e.elm,o)):(e.elm=u.createTextNode(e.text),v(i,e.elm,o))}}function d(e,t){n(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,m(e)?(y(e,t),g(e)):(tr(e),t.push(e))}function v(e,t,r){n(e)&&(n(r)?u.parentNode(r)===e&&u.insertBefore(e,t,r):u.appendChild(e,t))}function h(e,t,n){if(Array.isArray(t))for(var r=0;r<t.length;++r)f(t[r],n,e.elm,null,!0,t,r);else i(e.text)&&u.appendChild(e.elm,u.createTextNode(String(e.text)))}function m(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return n(e.tag)}function y(e,t){for(var r=0;r<s.create.length;++r)s.create[r](nr,e);n(o=e.data.hook)&&(n(o.create)&&o.create(nr,e),n(o.insert)&&t.push(e))}function g(e){var t;if(n(t=e.fnScopeId))u.setStyleScope(e.elm,t);else for(var r=e;r;)n(t=r.context)&&n(t=t.$options._scopeId)&&u.setStyleScope(e.elm,t),r=r.parent;n(t=Wt)&&t!==e.context&&t!==e.fnContext&&n(t=t.$options._scopeId)&&u.setStyleScope(e.elm,t)}function _(e,t,n,r,i,o){for(;r<=i;++r)f(n[r],o,e,t,!1,n,r)}function b(e){var t,r,i=e.data;if(n(i))for(n(t=i.hook)&&n(t=t.destroy)&&t(e),t=0;t<s.destroy.length;++t)s.destroy[t](e);if(n(t=e.children))for(r=0;r<e.children.length;++r)b(e.children[r])}function $(e,t,r){for(;t<=r;++t){var i=e[t];n(i)&&(n(i.tag)?(w(i),b(i)):l(i.elm))}}function w(e,t){if(n(t)||n(e.data)){var r,i=s.remove.length+1;for(n(t)?t.listeners+=i:t=function(e,t){function n(){0==--n.listeners&&l(e)}return n.listeners=t,n}(e.elm,i),n(r=e.componentInstance)&&n(r=r._vnode)&&n(r.data)&&w(r,t),r=0;r<s.remove.length;++r)s.remove[r](e,t);n(r=e.data.hook)&&n(r=r.remove)?r(e,t):t()}else l(e.elm)}function C(e,t,r,i){for(var o=r;o<i;o++){var a=t[o];if(n(a)&&ir(e,a))return o}}function x(e,i,o,a,c,l){if(e!==i){n(i.elm)&&n(a)&&(i=a[c]=me(i));var p=i.elm=e.elm;if(r(e.isAsyncPlaceholder))n(i.asyncFactory.resolved)?O(e.elm,i,o):i.isAsyncPlaceholder=!0;else if(r(i.isStatic)&&r(e.isStatic)&&i.key===e.key&&(r(i.isCloned)||r(i.isOnce)))i.componentInstance=e.componentInstance;else{var d,v=i.data;n(v)&&n(d=v.hook)&&n(d=d.prepatch)&&d(e,i);var h=e.children,y=i.children;if(n(v)&&m(i)){for(d=0;d<s.update.length;++d)s.update[d](e,i);n(d=v.hook)&&n(d=d.update)&&d(e,i)}t(i.text)?n(h)&&n(y)?h!==y&&function(e,r,i,o,a){for(var s,c,l,p=0,d=0,v=r.length-1,h=r[0],m=r[v],y=i.length-1,g=i[0],b=i[y],w=!a;p<=v&&d<=y;)t(h)?h=r[++p]:t(m)?m=r[--v]:ir(h,g)?(x(h,g,o,i,d),h=r[++p],g=i[++d]):ir(m,b)?(x(m,b,o,i,y),m=r[--v],b=i[--y]):ir(h,b)?(x(h,b,o,i,y),w&&u.insertBefore(e,h.elm,u.nextSibling(m.elm)),h=r[++p],b=i[--y]):ir(m,g)?(x(m,g,o,i,d),w&&u.insertBefore(e,m.elm,h.elm),m=r[--v],g=i[++d]):(t(s)&&(s=or(r,p,v)),t(c=n(g.key)?s[g.key]:C(g,r,p,v))?f(g,o,e,h.elm,!1,i,d):ir(l=r[c],g)?(x(l,g,o,i,d),r[c]=void 0,w&&u.insertBefore(e,l.elm,h.elm)):f(g,o,e,h.elm,!1,i,d),g=i[++d]);p>v?_(e,t(i[y+1])?null:i[y+1].elm,i,d,y,o):d>y&&$(r,p,v)}(p,h,y,o,l):n(y)?(n(e.text)&&u.setTextContent(p,""),_(p,null,y,0,y.length-1,o)):n(h)?$(h,0,h.length-1):n(e.text)&&u.setTextContent(p,""):e.text!==i.text&&u.setTextContent(p,i.text),n(v)&&n(d=v.hook)&&n(d=d.postpatch)&&d(e,i)}}}function k(e,t,i){if(r(i)&&n(e.parent))e.parent.data.pendingInsert=t;else for(var o=0;o<t.length;++o)t[o].data.hook.insert(t[o])}var A=p("attrs,class,staticClass,staticStyle,key");function O(e,t,i,o){var a,s=t.tag,c=t.data,u=t.children;if(o=o||c&&c.pre,t.elm=e,r(t.isComment)&&n(t.asyncFactory))return t.isAsyncPlaceholder=!0,!0;if(n(c)&&(n(a=c.hook)&&n(a=a.init)&&a(t,!0),n(a=t.componentInstance)))return d(t,i),!0;if(n(s)){if(n(u))if(e.hasChildNodes())if(n(a=c)&&n(a=a.domProps)&&n(a=a.innerHTML)){if(a!==e.innerHTML)return!1}else{for(var l=!0,f=e.firstChild,p=0;p<u.length;p++){if(!f||!O(f,u[p],i,o)){l=!1;break}f=f.nextSibling}if(!l||f)return!1}else h(t,u,i);if(n(c)){var v=!1;for(var m in c)if(!A(m)){v=!0,y(t,i);break}!v&&c.class&&et(c.class)}}else e.data!==t.text&&(e.data=t.text);return!0}return function(e,i,o,a){if(!t(i)){var c,l=!1,p=[];if(t(e))l=!0,f(i,p);else{var d=n(e.nodeType);if(!d&&ir(e,i))x(e,i,p,null,null,a);else{if(d){if(1===e.nodeType&&e.hasAttribute(L)&&(e.removeAttribute(L),o=!0),r(o)&&O(e,i,p))return k(i,p,!0),e;c=e,e=new pe(u.tagName(c).toLowerCase(),{},[],void 0,c)}var v=e.elm,h=u.parentNode(v);if(f(i,p,v._leaveCb?null:h,u.nextSibling(v)),n(i.parent))for(var y=i.parent,g=m(i);y;){for(var _=0;_<s.destroy.length;++_)s.destroy[_](y);if(y.elm=i.elm,g){for(var w=0;w<s.create.length;++w)s.create[w](nr,y);var C=y.data.hook.insert;if(C.merged)for(var A=1;A<C.fns.length;A++)C.fns[A]()}else tr(y);y=y.parent}n(h)?$([e],0,0):n(e.tag)&&b(e)}}return k(i,p,l),i.elm}n(e)&&b(e)}}({nodeOps:Qn,modules:[mr,xr,ni,oi,mi,z?{create:Ui,activate:Ui,remove:function(e,t){!0!==e.data.show?Ri(e,t):t()}}:{}].concat(pr)});W&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&Xi(e,"input")});var Vi={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?it(n,"postpatch",function(){Vi.componentUpdated(e,t,n)}):Ki(e,t,n.context),e._vOptions=[].map.call(e.options,Wi)):("textarea"===n.tag||Xn(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",Zi),e.addEventListener("compositionend",Gi),e.addEventListener("change",Gi),W&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){Ki(e,t,n.context);var r=e._vOptions,i=e._vOptions=[].map.call(e.options,Wi);if(i.some(function(e,t){return!N(e,r[t])}))(e.multiple?t.value.some(function(e){return qi(e,i)}):t.value!==t.oldValue&&qi(t.value,i))&&Xi(e,"change")}}};function Ki(e,t,n){Ji(e,t,n),(q||Z)&&setTimeout(function(){Ji(e,t,n)},0)}function Ji(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=e.options.length;s<c;s++)if(a=e.options[s],i)o=j(r,Wi(a))>-1,a.selected!==o&&(a.selected=o);else if(N(Wi(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function qi(e,t){return t.every(function(t){return!N(t,e)})}function Wi(e){return"_value"in e?e._value:e.value}function Zi(e){e.target.composing=!0}function Gi(e){e.target.composing&&(e.target.composing=!1,Xi(e.target,"input"))}function Xi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Yi(e){return!e.componentInstance||e.data&&e.data.transition?e:Yi(e.componentInstance._vnode)}var Qi={model:Vi,show:{bind:function(e,t,n){var r=t.value,i=(n=Yi(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,Pi(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=Yi(n)).data&&n.data.transition?(n.data.show=!0,r?Pi(n,function(){e.style.display=e.__vOriginalDisplay}):Ri(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},eo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function to(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?to(zt(t.children)):e}function no(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[b(o)]=i[o];return t}function ro(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var io=function(e){return e.tag||Ut(e)},oo=function(e){return"show"===e.name},ao={name:"transition",props:eo,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(io)).length){var r=this.mode,o=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return o;var a=to(o);if(!a)return o;if(this._leaving)return ro(e,o);var s="__transition-"+this._uid+"-";a.key=null==a.key?a.isComment?s+"comment":s+a.tag:i(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=no(this),u=this._vnode,l=to(u);if(a.data.directives&&a.data.directives.some(oo)&&(a.data.show=!0),l&&l.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(a,l)&&!Ut(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=A({},c);if("out-in"===r)return this._leaving=!0,it(f,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),ro(e,o);if("in-out"===r){if(Ut(a))return u;var p,d=function(){p()};it(c,"afterEnter",d),it(c,"enterCancelled",d),it(f,"delayLeave",function(e){p=e})}}return o}}},so=A({tag:String,moveClass:String},eo);function co(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function uo(e){e.data.newPos=e.elm.getBoundingClientRect()}function lo(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete so.mode;var fo={Transition:ao,TransitionGroup:{props:so,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=Zt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=no(this),s=0;s<i.length;s++){var c=i[s];c.tag&&null!=c.key&&0!==String(c.key).indexOf("__vlist")&&(o.push(c),n[c.key]=c,(c.data||(c.data={})).transition=a)}if(r){for(var u=[],l=[],f=0;f<r.length;f++){var p=r[f];p.data.transition=a,p.data.pos=p.elm.getBoundingClientRect(),n[p.key]?u.push(p):l.push(p)}this.kept=e(t,null,u),this.removed=l}return e(t,null,o)},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,t)&&(e.forEach(co),e.forEach(uo),e.forEach(lo),this._reflow=document.body.offsetHeight,e.forEach(function(e){if(e.data.moved){var n=e.elm,r=n.style;Ni(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Ai,n._moveCb=function e(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Ai,e),n._moveCb=null,ji(n,t))})}}))},methods:{hasMove:function(e,t){if(!wi)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach(function(e){_i(n,e)}),gi(n,t),n.style.display="none",this.$el.appendChild(n);var r=Mi(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}}};wn.config.mustUseProp=jn,wn.config.isReservedTag=Wn,wn.config.isReservedAttr=En,wn.config.getTagNamespace=Zn,wn.config.isUnknownElement=function(e){if(!z)return!0;if(Wn(e))return!1;if(e=e.toLowerCase(),null!=Gn[e])return Gn[e];var t=document.createElement(e);return e.indexOf("-")>-1?Gn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Gn[e]=/HTMLUnknownElement/.test(t.toString())},A(wn.options.directives,Qi),A(wn.options.components,fo),wn.prototype.__patch__=z?zi:S,wn.prototype.$mount=function(e,t){return function(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=ve),Yt(e,"beforeMount"),r=function(){e._update(e._render(),n)},new fn(e,r,S,{before:function(){e._isMounted&&!e._isDestroyed&&Yt(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,Yt(e,"mounted")),e}(this,e=e&&z?Yn(e):void 0,t)},z&&setTimeout(function(){F.devtools&&ne&&ne.emit("init",wn)},0);var po=/\{\{((?:.|\r?\n)+?)\}\}/g,vo=/[-.*+?^${}()|[\]\/\\]/g,ho=g(function(e){var t=e[0].replace(vo,"\\$&"),n=e[1].replace(vo,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")});var mo={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=Fr(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=Ir(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var yo,go={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=Fr(e,"style");n&&(e.staticStyle=JSON.stringify(ai(n)));var r=Ir(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},_o=function(e){return(yo=yo||document.createElement("div")).innerHTML=e,yo.textContent},bo=p("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),$o=p("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),wo=p("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Co=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,xo=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ko="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+P.source+"]*",Ao="((?:"+ko+"\\:)?"+ko+")",Oo=new RegExp("^<"+Ao),So=/^\s*(\/?)>/,To=new RegExp("^<\\/"+Ao+"[^>]*>"),Eo=/^<!DOCTYPE [^>]+>/i,No=/^<!\--/,jo=/^<!\[/,Do=p("script,style,textarea",!0),Lo={},Mo={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t","&#39;":"'"},Io=/&(?:lt|gt|quot|amp|#39);/g,Fo=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Po=p("pre,textarea",!0),Ro=function(e,t){return e&&Po(e)&&"\n"===t[0]};function Ho(e,t){var n=t?Fo:Io;return e.replace(n,function(e){return Mo[e]})}var Bo,Uo,zo,Vo,Ko,Jo,qo,Wo,Zo=/^@|^v-on:/,Go=/^v-|^@|^:|^#/,Xo=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Yo=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Qo=/^\(|\)$/g,ea=/^\[.*\]$/,ta=/:(.*)$/,na=/^:|^\.|^v-bind:/,ra=/\.[^.\]]+(?=[^\]]*$)/g,ia=/^v-slot(:|$)|^#/,oa=/[\r\n]/,aa=/\s+/g,sa=g(_o),ca="_empty_";function ua(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:ma(t),rawAttrsMap:{},parent:n,children:[]}}function la(e,t){Bo=t.warn||Sr,Jo=t.isPreTag||T,qo=t.mustUseProp||T,Wo=t.getTagNamespace||T;t.isReservedTag;zo=Tr(t.modules,"transformNode"),Vo=Tr(t.modules,"preTransformNode"),Ko=Tr(t.modules,"postTransformNode"),Uo=t.delimiters;var n,r,i=[],o=!1!==t.preserveWhitespace,a=t.whitespace,s=!1,c=!1;function u(e){if(l(e),s||e.processed||(e=fa(e,t)),i.length||e===n||n.if&&(e.elseif||e.else)&&da(n,{exp:e.elseif,block:e}),r&&!e.forbidden)if(e.elseif||e.else)a=e,(u=function(e){var t=e.length;for(;t--;){if(1===e[t].type)return e[t];e.pop()}}(r.children))&&u.if&&da(u,{exp:a.elseif,block:a});else{if(e.slotScope){var o=e.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[o]=e}r.children.push(e),e.parent=r}var a,u;e.children=e.children.filter(function(e){return!e.slotScope}),l(e),e.pre&&(s=!1),Jo(e.tag)&&(c=!1);for(var f=0;f<Ko.length;f++)Ko[f](e,t)}function l(e){if(!c)for(var t;(t=e.children[e.children.length-1])&&3===t.type&&" "===t.text;)e.children.pop()}return function(e,t){for(var n,r,i=[],o=t.expectHTML,a=t.isUnaryTag||T,s=t.canBeLeftOpenTag||T,c=0;e;){if(n=e,r&&Do(r)){var u=0,l=r.toLowerCase(),f=Lo[l]||(Lo[l]=new RegExp("([\\s\\S]*?)(</"+l+"[^>]*>)","i")),p=e.replace(f,function(e,n,r){return u=r.length,Do(l)||"noscript"===l||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),Ro(l,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""});c+=e.length-p.length,e=p,A(l,c-u,c)}else{var d=e.indexOf("<");if(0===d){if(No.test(e)){var v=e.indexOf("--\x3e");if(v>=0){t.shouldKeepComment&&t.comment(e.substring(4,v),c,c+v+3),C(v+3);continue}}if(jo.test(e)){var h=e.indexOf("]>");if(h>=0){C(h+2);continue}}var m=e.match(Eo);if(m){C(m[0].length);continue}var y=e.match(To);if(y){var g=c;C(y[0].length),A(y[1],g,c);continue}var _=x();if(_){k(_),Ro(_.tagName,e)&&C(1);continue}}var b=void 0,$=void 0,w=void 0;if(d>=0){for($=e.slice(d);!(To.test($)||Oo.test($)||No.test($)||jo.test($)||(w=$.indexOf("<",1))<0);)d+=w,$=e.slice(d);b=e.substring(0,d)}d<0&&(b=e),b&&C(b.length),t.chars&&b&&t.chars(b,c-b.length,c)}if(e===n){t.chars&&t.chars(e);break}}function C(t){c+=t,e=e.substring(t)}function x(){var t=e.match(Oo);if(t){var n,r,i={tagName:t[1],attrs:[],start:c};for(C(t[0].length);!(n=e.match(So))&&(r=e.match(xo)||e.match(Co));)r.start=c,C(r[0].length),r.end=c,i.attrs.push(r);if(n)return i.unarySlash=n[1],C(n[0].length),i.end=c,i}}function k(e){var n=e.tagName,c=e.unarySlash;o&&("p"===r&&wo(n)&&A(r),s(n)&&r===n&&A(n));for(var u=a(n)||!!c,l=e.attrs.length,f=new Array(l),p=0;p<l;p++){var d=e.attrs[p],v=d[3]||d[4]||d[5]||"",h="a"===n&&"href"===d[1]?t.shouldDecodeNewlinesForHref:t.shouldDecodeNewlines;f[p]={name:d[1],value:Ho(v,h)}}u||(i.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:f,start:e.start,end:e.end}),r=n),t.start&&t.start(n,f,u,e.start,e.end)}function A(e,n,o){var a,s;if(null==n&&(n=c),null==o&&(o=c),e)for(s=e.toLowerCase(),a=i.length-1;a>=0&&i[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=i.length-1;u>=a;u--)t.end&&t.end(i[u].tag,n,o);i.length=a,r=a&&i[a-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,o):"p"===s&&(t.start&&t.start(e,[],!1,n,o),t.end&&t.end(e,n,o))}A()}(e,{warn:Bo,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,o,a,l,f){var p=r&&r.ns||Wo(e);q&&"svg"===p&&(o=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];ya.test(r.name)||(r.name=r.name.replace(ga,""),t.push(r))}return t}(o));var d,v=ua(e,o,r);p&&(v.ns=p),"style"!==(d=v).tag&&("script"!==d.tag||d.attrsMap.type&&"text/javascript"!==d.attrsMap.type)||te()||(v.forbidden=!0);for(var h=0;h<Vo.length;h++)v=Vo[h](v,t)||v;s||(!function(e){null!=Fr(e,"v-pre")&&(e.pre=!0)}(v),v.pre&&(s=!0)),Jo(v.tag)&&(c=!0),s?function(e){var t=e.attrsList,n=t.length;if(n)for(var r=e.attrs=new Array(n),i=0;i<n;i++)r[i]={name:t[i].name,value:JSON.stringify(t[i].value)},null!=t[i].start&&(r[i].start=t[i].start,r[i].end=t[i].end);else e.pre||(e.plain=!0)}(v):v.processed||(pa(v),function(e){var t=Fr(e,"v-if");if(t)e.if=t,da(e,{exp:t,block:e});else{null!=Fr(e,"v-else")&&(e.else=!0);var n=Fr(e,"v-else-if");n&&(e.elseif=n)}}(v),function(e){null!=Fr(e,"v-once")&&(e.once=!0)}(v)),n||(n=v),a?u(v):(r=v,i.push(v))},end:function(e,t,n){var o=i[i.length-1];i.length-=1,r=i[i.length-1],u(o)},chars:function(e,t,n){if(r&&(!q||"textarea"!==r.tag||r.attrsMap.placeholder!==e)){var i,u,l,f=r.children;if(e=c||e.trim()?"script"===(i=r).tag||"style"===i.tag?e:sa(e):f.length?a?"condense"===a&&oa.test(e)?"":" ":o?" ":"":"")c||"condense"!==a||(e=e.replace(aa," ")),!s&&" "!==e&&(u=function(e,t){var n=t?ho(t):po;if(n.test(e)){for(var r,i,o,a=[],s=[],c=n.lastIndex=0;r=n.exec(e);){(i=r.index)>c&&(s.push(o=e.slice(c,i)),a.push(JSON.stringify(o)));var u=Ar(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=i+r[0].length}return c<e.length&&(s.push(o=e.slice(c)),a.push(JSON.stringify(o))),{expression:a.join("+"),tokens:s}}}(e,Uo))?l={type:2,expression:u.expression,tokens:u.tokens,text:e}:" "===e&&f.length&&" "===f[f.length-1].text||(l={type:3,text:e}),l&&f.push(l)}},comment:function(e,t,n){if(r){var i={type:3,text:e,isComment:!0};r.children.push(i)}}}),n}function fa(e,t){var n,r;(r=Ir(n=e,"key"))&&(n.key=r),e.plain=!e.key&&!e.scopedSlots&&!e.attrsList.length,function(e){var t=Ir(e,"ref");t&&(e.ref=t,e.refInFor=function(e){var t=e;for(;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}(e))}(e),function(e){var t;"template"===e.tag?(t=Fr(e,"scope"),e.slotScope=t||Fr(e,"slot-scope")):(t=Fr(e,"slot-scope"))&&(e.slotScope=t);var n=Ir(e,"slot");n&&(e.slotTarget='""'===n?'"default"':n,e.slotTargetDynamic=!(!e.attrsMap[":slot"]&&!e.attrsMap["v-bind:slot"]),"template"===e.tag||e.slotScope||Nr(e,"slot",n,function(e,t){return e.rawAttrsMap[":"+t]||e.rawAttrsMap["v-bind:"+t]||e.rawAttrsMap[t]}(e,"slot")));if("template"===e.tag){var r=Pr(e,ia);if(r){var i=va(r),o=i.name,a=i.dynamic;e.slotTarget=o,e.slotTargetDynamic=a,e.slotScope=r.value||ca}}else{var s=Pr(e,ia);if(s){var c=e.scopedSlots||(e.scopedSlots={}),u=va(s),l=u.name,f=u.dynamic,p=c[l]=ua("template",[],e);p.slotTarget=l,p.slotTargetDynamic=f,p.children=e.children.filter(function(e){if(!e.slotScope)return e.parent=p,!0}),p.slotScope=s.value||ca,e.children=[],e.plain=!1}}}(e),function(e){"slot"===e.tag&&(e.slotName=Ir(e,"name"))}(e),function(e){var t;(t=Ir(e,"is"))&&(e.component=t);null!=Fr(e,"inline-template")&&(e.inlineTemplate=!0)}(e);for(var i=0;i<zo.length;i++)e=zo[i](e,t)||e;return function(e){var t,n,r,i,o,a,s,c,u=e.attrsList;for(t=0,n=u.length;t<n;t++)if(r=i=u[t].name,o=u[t].value,Go.test(r))if(e.hasBindings=!0,(a=ha(r.replace(Go,"")))&&(r=r.replace(ra,"")),na.test(r))r=r.replace(na,""),o=Ar(o),(c=ea.test(r))&&(r=r.slice(1,-1)),a&&(a.prop&&!c&&"innerHtml"===(r=b(r))&&(r="innerHTML"),a.camel&&!c&&(r=b(r)),a.sync&&(s=Br(o,"$event"),c?Mr(e,'"update:"+('+r+")",s,null,!1,0,u[t],!0):(Mr(e,"update:"+b(r),s,null,!1,0,u[t]),C(r)!==b(r)&&Mr(e,"update:"+C(r),s,null,!1,0,u[t])))),a&&a.prop||!e.component&&qo(e.tag,e.attrsMap.type,r)?Er(e,r,o,u[t],c):Nr(e,r,o,u[t],c);else if(Zo.test(r))r=r.replace(Zo,""),(c=ea.test(r))&&(r=r.slice(1,-1)),Mr(e,r,o,a,!1,0,u[t],c);else{var l=(r=r.replace(Go,"")).match(ta),f=l&&l[1];c=!1,f&&(r=r.slice(0,-(f.length+1)),ea.test(f)&&(f=f.slice(1,-1),c=!0)),Dr(e,r,i,o,f,c,a,u[t])}else Nr(e,r,JSON.stringify(o),u[t]),!e.component&&"muted"===r&&qo(e.tag,e.attrsMap.type,r)&&Er(e,r,"true",u[t])}(e),e}function pa(e){var t;if(t=Fr(e,"v-for")){var n=function(e){var t=e.match(Xo);if(!t)return;var n={};n.for=t[2].trim();var r=t[1].trim().replace(Qo,""),i=r.match(Yo);i?(n.alias=r.replace(Yo,"").trim(),n.iterator1=i[1].trim(),i[2]&&(n.iterator2=i[2].trim())):n.alias=r;return n}(t);n&&A(e,n)}}function da(e,t){e.ifConditions||(e.ifConditions=[]),e.ifConditions.push(t)}function va(e){var t=e.name.replace(ia,"");return t||"#"!==e.name[0]&&(t="default"),ea.test(t)?{name:t.slice(1,-1),dynamic:!0}:{name:'"'+t+'"',dynamic:!1}}function ha(e){var t=e.match(ra);if(t){var n={};return t.forEach(function(e){n[e.slice(1)]=!0}),n}}function ma(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n].name]=e[n].value;return t}var ya=/^xmlns:NS\d+/,ga=/^NS\d+:/;function _a(e){return ua(e.tag,e.attrsList.slice(),e.parent)}var ba=[mo,go,{preTransformNode:function(e,t){if("input"===e.tag){var n,r=e.attrsMap;if(!r["v-model"])return;if((r[":type"]||r["v-bind:type"])&&(n=Ir(e,"type")),r.type||n||!r["v-bind"]||(n="("+r["v-bind"]+").type"),n){var i=Fr(e,"v-if",!0),o=i?"&&("+i+")":"",a=null!=Fr(e,"v-else",!0),s=Fr(e,"v-else-if",!0),c=_a(e);pa(c),jr(c,"type","checkbox"),fa(c,t),c.processed=!0,c.if="("+n+")==='checkbox'"+o,da(c,{exp:c.if,block:c});var u=_a(e);Fr(u,"v-for",!0),jr(u,"type","radio"),fa(u,t),da(c,{exp:"("+n+")==='radio'"+o,block:u});var l=_a(e);return Fr(l,"v-for",!0),jr(l,":type",n),fa(l,t),da(c,{exp:i,block:l}),a?c.else=!0:s&&(c.elseif=s),c}}}}];var $a,wa,Ca={expectHTML:!0,modules:ba,directives:{model:function(e,t,n){var r=t.value,i=t.modifiers,o=e.tag,a=e.attrsMap.type;if(e.component)return Hr(e,r,i),!1;if("select"===o)!function(e,t,n){var r='var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(n&&n.number?"_n(val)":"val")+"});";r=r+" "+Br(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Mr(e,"change",r,null,!0)}(e,r,i);else if("input"===o&&"checkbox"===a)!function(e,t,n){var r=n&&n.number,i=Ir(e,"value")||"null",o=Ir(e,"true-value")||"true",a=Ir(e,"false-value")||"false";Er(e,"checked","Array.isArray("+t+")?_i("+t+","+i+")>-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),Mr(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Br(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Br(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Br(t,"$$c")+"}",null,!0)}(e,r,i);else if("input"===o&&"radio"===a)!function(e,t,n){var r=n&&n.number,i=Ir(e,"value")||"null";Er(e,"checked","_q("+t+","+(i=r?"_n("+i+")":i)+")"),Mr(e,"change",Br(t,i),null,!0)}(e,r,i);else if("input"===o||"textarea"===o)!function(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?Wr:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=Br(t,l);c&&(f="if($event.target.composing)return;"+f),Er(e,"value","("+t+")"),Mr(e,u,f,null,!0),(s||a)&&Mr(e,"blur","$forceUpdate()")}(e,r,i);else if(!F.isReservedTag(o))return Hr(e,r,i),!1;return!0},text:function(e,t){t.value&&Er(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&Er(e,"innerHTML","_s("+t.value+")",t)}},isPreTag:function(e){return"pre"===e},isUnaryTag:bo,mustUseProp:jn,canBeLeftOpenTag:$o,isReservedTag:Wn,getTagNamespace:Zn,staticKeys:function(e){return e.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(",")}(ba)},xa=g(function(e){return p("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))});function ka(e,t){e&&($a=xa(t.staticKeys||""),wa=t.isReservedTag||T,function e(t){t.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||d(e.tag)||!wa(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every($a)))}(t);if(1===t.type){if(!wa(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var n=0,r=t.children.length;n<r;n++){var i=t.children[n];e(i),i.static||(t.static=!1)}if(t.ifConditions)for(var o=1,a=t.ifConditions.length;o<a;o++){var s=t.ifConditions[o].block;e(s),s.static||(t.static=!1)}}}(e),function e(t,n){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=n),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var r=0,i=t.children.length;r<i;r++)e(t.children[r],n||!!t.for);if(t.ifConditions)for(var o=1,a=t.ifConditions.length;o<a;o++)e(t.ifConditions[o].block,n)}}(e,!1))}var Aa=/^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,Oa=/\([^)]*?\);*$/,Sa=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ta={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Ea={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Na=function(e){return"if("+e+")return null;"},ja={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Na("$event.target !== $event.currentTarget"),ctrl:Na("!$event.ctrlKey"),shift:Na("!$event.shiftKey"),alt:Na("!$event.altKey"),meta:Na("!$event.metaKey"),left:Na("'button' in $event && $event.button !== 0"),middle:Na("'button' in $event && $event.button !== 1"),right:Na("'button' in $event && $event.button !== 2")};function Da(e,t){var n=t?"nativeOn:":"on:",r="",i="";for(var o in e){var a=La(e[o]);e[o]&&e[o].dynamic?i+=o+","+a+",":r+='"'+o+'":'+a+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function La(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return La(e)}).join(",")+"]";var t=Sa.test(e.value),n=Aa.test(e.value),r=Sa.test(e.value.replace(Oa,""));if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(ja[s])o+=ja[s],Ta[s]&&a.push(s);else if("exact"===s){var c=e.modifiers;o+=Na(["ctrl","shift","alt","meta"].filter(function(e){return!c[e]}).map(function(e){return"$event."+e+"Key"}).join("||"))}else a.push(s);return a.length&&(i+=function(e){return"if(!$event.type.indexOf('key')&&"+e.map(Ma).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(t?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":r?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function Ma(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Ta[e],r=Ea[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var Ia={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:S},Fa=function(e){this.options=e,this.warn=e.warn||Sr,this.transforms=Tr(e.modules,"transformCode"),this.dataGenFns=Tr(e.modules,"genData"),this.directives=A(A({},Ia),e.directives);var t=e.isReservedTag||T;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Pa(e,t){var n=new Fa(t);return{render:"with(this){return "+(e?Ra(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Ra(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Ha(e,t);if(e.once&&!e.onceProcessed)return Ba(e,t);if(e.for&&!e.forProcessed)return za(e,t);if(e.if&&!e.ifProcessed)return Ua(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=qa(e,t),i="_t("+n+(r?","+r:""),o=e.attrs||e.dynamicAttrs?Ga((e.attrs||[]).concat(e.dynamicAttrs||[]).map(function(e){return{name:b(e.name),value:e.value,dynamic:e.dynamic}})):null,a=e.attrsMap["v-bind"];!o&&!a||r||(i+=",null");o&&(i+=","+o);a&&(i+=(o?"":",null")+","+a);return i+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:qa(t,n,!0);return"_c("+e+","+Va(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=Va(e,t));var i=e.inlineTemplate?null:qa(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o<t.transforms.length;o++)n=t.transforms[o](e,n);return n}return qa(e,t)||"void 0"}function Ha(e,t){e.staticProcessed=!0;var n=t.pre;return e.pre&&(t.pre=e.pre),t.staticRenderFns.push("with(this){return "+Ra(e,t)+"}"),t.pre=n,"_m("+(t.staticRenderFns.length-1)+(e.staticInFor?",true":"")+")"}function Ba(e,t){if(e.onceProcessed=!0,e.if&&!e.ifProcessed)return Ua(e,t);if(e.staticInFor){for(var n="",r=e.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+Ra(e,t)+","+t.onceId+++","+n+")":Ra(e,t)}return Ha(e,t)}function Ua(e,t,n,r){return e.ifProcessed=!0,function e(t,n,r,i){if(!t.length)return i||"_e()";var o=t.shift();return o.exp?"("+o.exp+")?"+a(o.block)+":"+e(t,n,r,i):""+a(o.block);function a(e){return r?r(e,n):e.once?Ba(e,n):Ra(e,n)}}(e.ifConditions.slice(),t,n,r)}function za(e,t,n,r){var i=e.for,o=e.alias,a=e.iterator1?","+e.iterator1:"",s=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,(r||"_l")+"(("+i+"),function("+o+a+s+"){return "+(n||Ra)(e,t)+"})"}function Va(e,t){var n="{",r=function(e,t){var n=e.directives;if(!n)return;var r,i,o,a,s="directives:[",c=!1;for(r=0,i=n.length;r<i;r++){o=n[r],a=!0;var u=t.directives[o.name];u&&(a=!!u(e,o,t.warn)),a&&(c=!0,s+='{name:"'+o.name+'",rawName:"'+o.rawName+'"'+(o.value?",value:("+o.value+"),expression:"+JSON.stringify(o.value):"")+(o.arg?",arg:"+(o.isDynamicArg?o.arg:'"'+o.arg+'"'):"")+(o.modifiers?",modifiers:"+JSON.stringify(o.modifiers):"")+"},")}if(c)return s.slice(0,-1)+"]"}(e,t);r&&(n+=r+","),e.key&&(n+="key:"+e.key+","),e.ref&&(n+="ref:"+e.ref+","),e.refInFor&&(n+="refInFor:true,"),e.pre&&(n+="pre:true,"),e.component&&(n+='tag:"'+e.tag+'",');for(var i=0;i<t.dataGenFns.length;i++)n+=t.dataGenFns[i](e);if(e.attrs&&(n+="attrs:"+Ga(e.attrs)+","),e.props&&(n+="domProps:"+Ga(e.props)+","),e.events&&(n+=Da(e.events,!1)+","),e.nativeEvents&&(n+=Da(e.nativeEvents,!0)+","),e.slotTarget&&!e.slotScope&&(n+="slot:"+e.slotTarget+","),e.scopedSlots&&(n+=function(e,t,n){var r=e.for||Object.keys(t).some(function(e){var n=t[e];return n.slotTargetDynamic||n.if||n.for||Ka(n)}),i=!!e.if;if(!r)for(var o=e.parent;o;){if(o.slotScope&&o.slotScope!==ca||o.for){r=!0;break}o.if&&(i=!0),o=o.parent}var a=Object.keys(t).map(function(e){return Ja(t[e],n)}).join(",");return"scopedSlots:_u(["+a+"]"+(r?",null,true":"")+(!r&&i?",null,false,"+function(e){var t=5381,n=e.length;for(;n;)t=33*t^e.charCodeAt(--n);return t>>>0}(a):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var o=function(e,t){var n=e.children[0];if(n&&1===n.type){var r=Pa(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map(function(e){return"function(){"+e+"}"}).join(",")+"]}"}}(e,t);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+Ga(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function Ka(e){return 1===e.type&&("slot"===e.tag||e.children.some(Ka))}function Ja(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return Ua(e,t,Ja,"null");if(e.for&&!e.forProcessed)return za(e,t,Ja);var r=e.slotScope===ca?"":String(e.slotScope),i="function("+r+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(qa(e,t)||"undefined")+":undefined":qa(e,t)||"undefined":Ra(e,t))+"}",o=r?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+i+o+"}"}function qa(e,t,n,r,i){var o=e.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?t.maybeComponent(a)?",1":",0":"";return""+(r||Ra)(a,t)+s}var c=n?function(e,t){for(var n=0,r=0;r<e.length;r++){var i=e[r];if(1===i.type){if(Wa(i)||i.ifConditions&&i.ifConditions.some(function(e){return Wa(e.block)})){n=2;break}(t(i)||i.ifConditions&&i.ifConditions.some(function(e){return t(e.block)}))&&(n=1)}}return n}(o,t.maybeComponent):0,u=i||Za;return"["+o.map(function(e){return u(e,t)}).join(",")+"]"+(c?","+c:"")}}function Wa(e){return void 0!==e.for||"template"===e.tag||"slot"===e.tag}function Za(e,t){return 1===e.type?Ra(e,t):3===e.type&&e.isComment?(r=e,"_e("+JSON.stringify(r.text)+")"):"_v("+(2===(n=e).type?n.expression:Xa(JSON.stringify(n.text)))+")";var n,r}function Ga(e){for(var t="",n="",r=0;r<e.length;r++){var i=e[r],o=Xa(i.value);i.dynamic?n+=i.name+","+o+",":t+='"'+i.name+'":'+o+","}return t="{"+t.slice(0,-1)+"}",n?"_d("+t+",["+n.slice(0,-1)+"])":t}function Xa(e){return e.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b");function Ya(e,t){try{return new Function(e)}catch(n){return t.push({err:n,code:e}),S}}function Qa(e){var t=Object.create(null);return function(n,r,i){(r=A({},r)).warn;delete r.warn;var o=r.delimiters?String(r.delimiters)+n:n;if(t[o])return t[o];var a=e(n,r),s={},c=[];return s.render=Ya(a.render,c),s.staticRenderFns=a.staticRenderFns.map(function(e){return Ya(e,c)}),t[o]=s}}var es,ts,ns=(es=function(e,t){var n=la(e.trim(),t);!1!==t.optimize&&ka(n,t);var r=Pa(n,t);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(e){function t(t,n){var r=Object.create(e),i=[],o=[];if(n)for(var a in n.modules&&(r.modules=(e.modules||[]).concat(n.modules)),n.directives&&(r.directives=A(Object.create(e.directives||null),n.directives)),n)"modules"!==a&&"directives"!==a&&(r[a]=n[a]);r.warn=function(e,t,n){(n?o:i).push(e)};var s=es(t.trim(),r);return s.errors=i,s.tips=o,s}return{compile:t,compileToFunctions:Qa(t)}})(Ca),rs=(ns.compile,ns.compileToFunctions);function is(e){return(ts=ts||document.createElement("div")).innerHTML=e?'<a href="\n"/>':'<div a="\n"/>',ts.innerHTML.indexOf("&#10;")>0}var os=!!z&&is(!1),as=!!z&&is(!0),ss=g(function(e){var t=Yn(e);return t&&t.innerHTML}),cs=wn.prototype.$mount;return wn.prototype.$mount=function(e,t){if((e=e&&Yn(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=ss(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){var i=rs(r,{outputSourceRange:!1,shouldDecodeNewlines:os,shouldDecodeNewlinesForHref:as,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return cs.call(this,e,t)},wn.compile=rs,wn});
vendor: 1,874 bytes, lines 6534-6541
6534;
6535/* AUTOGENERATED: vuex.min.js */
6536/*!
6537 * vuex v3.6.2
6538 * (c) 2021 Evan You
6539 * @license MIT
6540 */
6541!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Vuex=e()}(this,(function(){"use strict";var t=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function e(t,n){if(void 0===n&&(n=[]),null===t||"object"!=typeof t)return t;var o,r=(o=function(e){return e.original===t},n.filter(o)[0]);if(r)return r.copy;var i=Array.isArray(t)?[]:{};return n.push({original:t,copy:i}),Object.keys(t).forEach((function(o){i[o]=e(t[o],n)})),i}function n(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function o(t){return null!==t&&"object"==typeof t}var r=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},i={namespaced:{configurable:!0}};i.namespaced.get=function(){return!!this._rawModule.namespaced},r.prototype.addChild=function(t,e){this._children[t]=e},r.prototype.removeChild=function(t){delete this._children[t]},r.prototype.getChild=function(t){return this._children[t]},r.prototype.hasChild=function(t){return t in this._children},r.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},r.prototype.forEachChild=function(t){n(this._children,t)},r.prototype.forEachGetter=function(t){this._rawModule.getters&&n(this._rawModule.getters,t)},r.prototype.forEachAction=function(t){this._rawModule.actions&&n(this._rawModule.actions,t)},r.prototype.forEachMutation=function(t){this._rawModule.mutations&&n(this._rawModule.mutations,t)}
vendor: 10,781 bytes, lines 6541-6544
6541,Object.defineProperties(r.prototype,i);var c,a=function(t){this.register([],t,!1)};a.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},a.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")}),"")},a.prototype.update=function(t){!function t(e,n,o){if(n.update(o),o.modules)for(var r in o.modules){if(!n.getChild(r))return;t(e.concat(r),n.getChild(r),o.modules[r])}}([],this.root,t)},a.prototype.register=function(t,e,o){var i=this;void 0===o&&(o=!0);var c=new r(e,o);0===t.length?this.root=c:this.get(t.slice(0,-1)).addChild(t[t.length-1],c);e.modules&&n(e.modules,(function(e,n){i.register(t.concat(n),e,o)}))},a.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1],o=e.getChild(n);o&&o.runtime&&e.removeChild(n)},a.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return!!e&&e.hasChild(n)};var s=function(e){var n=this;void 0===e&&(e={}),!c&&"undefined"!=typeof window&&window.Vue&&v(window.Vue);var o=e.plugins;void 0===o&&(o=[]);var r=e.strict;void 0===r&&(r=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new a(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new c,this._makeLocalGettersCache=Object.create(null);var i=this,s=this.dispatch,u=this.commit;this.dispatch=function(t,e){return s.call(i,t,e)},this.commit=function(t,e,n){return u.call(i,t,e,n)},this.strict=r;var f=this._modules.root.state;p(this,f,[],this._modules.root),h(this,f),o.forEach((function(t){return t(n)})),(void 0!==e.devtools?e.devtools:c.config.devtools)&&function(e){t&&(e._devtoolHook=t,t.emit("vuex:init",e),t.on("vuex:travel-to-state",(function(t){e.replaceState(t)})),e.subscribe((function(e,n){t.emit("vuex:mutation",e,n)}),{prepend:!0}),e.subscribeAction((function(e,n){t.emit("vuex:action",e,n)}),{prepend:!0}))}(this)},u={state:{configurable:!0}};function f(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function l(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;p(t,n,[],t._modules.root,!0),h(t,n,e)}function h(t,e,o){var r=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var i=t._wrappedGetters,a={};n(i,(function(e,n){a[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var s=c.config.silent;c.config.silent=!0,t._vm=new c({data:{$$state:e},computed:a}),c.config.silent=s,t.strict&&function(t){t._vm.$watch((function(){return this._data.$$state}),(function(){}),{deep:!0,sync:!0})}(t),r&&(o&&t._withCommit((function(){r._data.$$state=null})),c.nextTick((function(){return r.$destroy()})))}function p(t,e,n,o,r){var i=!n.length,a=t._modules.getNamespace(n);if(o.namespaced&&(t._modulesNamespaceMap[a],t._modulesNamespaceMap[a]=o),!i&&!r){var s=d(e,n.slice(0,-1)),u=n[n.length-1];t._withCommit((function(){c.set(s,u,o.state)}))}var f=o.context=function(t,e,n){var o=""===e,r={dispatch:o?t.dispatch:function(n,o,r){var i=m(n,o,r),c=i.payload,a=i.options,s=i.type;return a&&a.root||(s=e+s),t.dispatch(s,c)},commit:o?t.commit:function(n,o,r){var i=m(n,o,r),c=i.payload,a=i.options,s=i.type;a&&a.root||(s=e+s),t.commit(s,c,a)}};return Object.defineProperties(r,{getters:{get:o?function(){return t.getters}:function(){return function(t,e){if(!t._makeLocalGettersCache[e]){var n={},o=e.length;Object.keys(t.getters).forEach((function(r){if(r.slice(0,o)===e){var i=r.slice(o);Object.defineProperty(n,i,{get:function(){return t.getters[r]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}(t,e)}},state:{get:function(){return d(t.state,n)}}}),r}(t,a,n);o.forEachMutation((function(e,n){!function(t,e,n,o){(t._mutations[e]||(t._mutations[e]=[])).push((function(e){n.call(t,o.state,e)}))}(t,a+n,e,f)})),o.forEachAction((function(e,n){var o=e.root?n:a+n,r=e.handler||e;!function(t,e,n,o){(t._actions[e]||(t._actions[e]=[])).push((function(e){var r,i=n.call(t,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:t.getters,rootState:t.state},e);return(r=i)&&"function"==typeof r.then||(i=Promise.resolve(i)),t._devtoolHook?i.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):i}))}(t,o,r,f)})),o.forEachGetter((function(e,n){!function(t,e,n,o){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return n(o.state,o.getters,t.state,t.getters)}}(t,a+n,e,f)})),o.forEachChild((function(o,i){p(t,e,n.concat(i),o,r)}))}function d(t,e){return e.reduce((function(t,e){return t[e]}),t)}function m(t,e,n){return o(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function v(t){c&&t===c||function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(c=t)}u.state.get=function(){return this._vm._data.$$state},u.state.set=function(t){},s.prototype.commit=function(t,e,n){var o=this,r=m(t,e,n),i=r.type,c=r.payload,a={type:i,payload:c},s=this._mutations[i];s&&(this._withCommit((function(){s.forEach((function(t){t(c)}))})),this._subscribers.slice().forEach((function(t){return t(a,o.state)})))},s.prototype.dispatch=function(t,e){var n=this,o=m(t,e),r=o.type,i=o.payload,c={type:r,payload:i},a=this._actions[r];if(a){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(c,n.state)}))}catch(t){}var s=a.length>1?Promise.all(a.map((function(t){return t(i)}))):a[0](i);return new Promise((function(t,e){s.then((function(e){try{n._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(c,n.state)}))}catch(t){}t(e)}),(function(t){try{n._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(c,n.state,t)}))}catch(t){}e(t)}))}))}},s.prototype.subscribe=function(t,e){return f(t,this._subscribers,e)},s.prototype.subscribeAction=function(t,e){return f("function"==typeof t?{before:t}:t,this._actionSubscribers,e)},s.prototype.watch=function(t,e,n){var o=this;return this._watcherVM.$watch((function(){return t(o.state,o.getters)}),e,n)},s.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},s.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),p(this,this.state,t,this._modules.get(t),n.preserveState),h(this,this.state)},s.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var n=d(e.state,t.slice(0,-1));c.delete(n,t[t.length-1])})),l(this)},s.prototype.hasModule=function(t){return"string"==typeof t&&(t=[t]),this._modules.isRegistered(t)},s.prototype.hotUpdate=function(t){this._modules.update(t),l(this,!0)},s.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(s.prototype,u);var g=M((function(t,e){var n={};return w(e).forEach((function(e){var o=e.key,r=e.val;n[o]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var o=$(this.$store,"mapState",t);if(!o)return;e=o.context.state,n=o.context.getters}return"function"==typeof r?r.call(this,e,n):e[r]},n[o].vuex=!0})),n})),y=M((function(t,e){var n={};return w(e).forEach((function(e){var o=e.key,r=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.commit;if(t){var i=$(this.$store,"mapMutations",t);if(!i)return;o=i.context.commit}return"function"==typeof r?r.apply(this,[o].concat(e)):o.apply(this.$store,[r].concat(e))}})),n})),_=M((function(t,e){var n={};return w(e).forEach((function(e){var o=e.key,r=e.val;r=t+r,n[o]=function(){if(!t||$(this.$store,"mapGetters",t))return this.$store.getters[r]},n[o].vuex=!0})),n})),b=M((function(t,e){var n={};return w(e).forEach((function(e){var o=e.key,r=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.dispatch;if(t){var i=$(this.$store,"mapActions",t);if(!i)return;o=i.context.dispatch}return"function"==typeof r?r.apply(this,[o].concat(e)):o.apply(this.$store,[r].concat(e))}})),n}));function w(t){return function(t){return Array.isArray(t)||o(t)}(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function M(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function $(t,e,n){return t._modulesNamespaceMap[n]}function C(t,e,n){var o=n?t.groupCollapsed:t.group;try{o.call(t,e)}catch(n){t.log(e)}}function E(t){try{t.groupEnd()}catch(e){t.log("—— log end ——")}}function O(){var t=new Date;return" @ "+j(t.getHours(),2)+":"+j(t.getMinutes(),2)+":"+j(t.getSeconds(),2)+"."+j(t.getMilliseconds(),3)}function j(t,e){return n="0",o=e-t.toString().length,new Array(o+1).join(n)+t;var n,o}return{Store:s,install:v,version:"3.6.2",mapState:g,mapMutations:y,mapGetters:_,mapActions:b,createNamespacedHelpers:function(t){return{mapState:g.bind(null,t),mapGetters:_.bind(null,t),mapMutations:y.bind(null,t),mapActions:b.bind(null,t)}},createLogger:function(t){void 0===t&&(t={});var n=t.collapsed;void 0===n&&(n=!0);var o=t.filter;void 0===o&&(o=function(t,e,n){return!0});var r=t.transformer;void 0===r&&(r=function(t){return t});var i=t.mutationTransformer;void 0===i&&(i=function(t){return t});var c=t.actionFilter;void 0===c&&(c=function(t,e){return!0});var a=t.actionTransformer;void 0===a&&(a=function(t){return t});var s=t.logMutations;void 0===s&&(s=!0);var u=t.logActions;void 0===u&&(u=!0);var f=t.logger;return void 0===f&&(f=console),function(t){var l=e(t.state);void 0!==f&&(s&&t.subscribe((function(t,c){var a=e(c);if(o(t,l,a)){var s=O(),u=i(t),h="mutation "+t.type+s;C(f,h,n),f.log("%c prev state","color: #9E9E9E; font-weight: bold",r(l)),f.log("%c mutation","color: #03A9F4; font-weight: bold",u),f.log("%c next state","color: #4CAF50; font-weight: bold",r(a)),E(f)}l=a})),u&&t.subscribeAction((function(t,e){if(c(t,e)){var o=O(),r=a(t),i="action "+t.type+o;C(f,i,n),f.log("%c action","color: #03A9F4; font-weight: bold",r),E(f)}})))}}}}));;
6542/* AUTOGENERATED: vue.loadable.js */
6543(function () {
6544  var initialCompiled = false;
6545
6546  var cache = {};
6547
6548  var VueLoadableMixin = {
6549    created: function () {
6550      // TODO: This code is unreliable since it's not a part of the public API
6551      Vue.util.defineReactive(this, '$reloading', false);
6552    },
6553
6554    beforeMount: function () {
6555      if (this.$options.loadable && this.$options.loadable.loadOnCompile && !initialCompiled) {
6556        this.$reload();
6557        initialCompiled = true;
6558      }
6559    },
6560
6561    methods: {
6562      $reload: function () {
6563        var loader = this.$options.loadable.loader;
6564
6565        if (loader) {
6566          this.$reloading = true;
6567          var promise;
6568
6569          if (this.$options.loadable.cacheSimultaneous) {
6570            if (!_.has(cache, this._getCacheKey())) {
6571              cache[this._getCacheKey()] = loader.call(this, arguments);
6572            }
6573            promise = cache[this._getCacheKey()];
6574          } else {
6575            promise = loader.call(this, arguments);
6576          }
6577
6578          if (promise && typeof promise.then === 'function') {
6579            promise.then(this._resolve, this._reject);
6580          }
6581        }
6582      },
6583
6584      _getCacheKey: function() {
6585        return _.isFunction(this.$options.loadable.cacheKey)
6586          ? this.$options.loadable.cacheKey.apply(this)
6587          : this.$options.name;
6588      },
6589
6590      _resolve: function (data) {
6591        var uuid = _.uniqueId();
6592        var self = this;
6593
6594        xcart.bind(['resources.ready', 'resources.empty'], _.bind(
6595          function (event, args) {
6596            if (args.uuid === uuid) {
6597              if (this.$options.loadable.transferState) {
6598                var oldData = JSON.parse(JSON.stringify(this.$data));
6599              }
6600
6601              if (this.$options.loadable.update !== false) {
6602                this._updateComponent(data);
6603              }
6604
6605              if (this.$options.loadable.transferState) {
6606                // TODO: doesn't work
6607                this.$data = oldData;
6608              }
6609
6610              this.$reloading = false;
6611
6612              if ('function' === typeof(this.$options.loadable.resolve)) {
6613                this.$options.loadable.resolve.apply(this, [data]);
6614              }
6615
6616              delete cache[this._getCacheKey()];
6617            }
6618          },
6619          this)
6620        );
6621
6622        xcart.parsePreloadedLabels(data, uuid);
6623        xcart.parseResources(data, uuid);
6624      },
6625
6626      _reject: function (data) {
6627        this.$reloading = false;
6628        if ('function' === typeof(this.$options.loadable.reject)) {
6629          this.$options.loadable.reject.apply(this, [data]);
6630        }
6631
6632        delete cache[this._getCacheKey()];
6633      },
6634
6635      _updateComponent: function (html) {
6636        var element = this._parseTemplate(html);
6637        // Disable optimization to avoid static roots are not refreshing
6638        this.$options.render = Vue.compile(element.outerHTML, {optimize: false}).render;
6639
6640        var update = typeof(this.$options.loadable.update) === 'function'
6641          ? this.$options.loadable.update(this)
6642          : this.$options.loadable.update;
6643
6644        // Force "initial render" instead of old vnode update (see Vue.prototype._update implementation)
6645        if (update === true) {
6646          this._vnode = null;
6647        }
6648
6649        this._update(this._render(), false);
6650      },
6651
6652      _parseTemplate: function (html) {
6653        var element;
6654
6655        if (this.$options.loadable.parser) {
6656          element = this.$options.loadable.parser.apply(this, [html]);
6657        } else {
6658          var temp = document.createElement('div');
6659          temp.innerHTML = html;
6660
6661          element = temp.querySelector('[is=' + this.$options._componentTag + '] > *');
6662          if (!element) {
6663            element = temp.querySelector(this.$options._componentTag + ' > *');
6664          }
6665        }
6666
6667        return element;
6668      }
6669    }
6670  }
6671
6672  if (typeof exports === 'object' && typeof module === 'object') {
6673    module.exports = VueLoadableMixin
6674  } else if(typeof define === 'function' && define.amd) {
6675    define(function () { return VueLoadableMixin })
6676  } else if (typeof window !== 'undefined') {
6677    window.VueLoadableMixin = VueLoadableMixin
6678  }
6679})();
6680
6681define('vue/vue.loadable', function () { return VueLoadableMixin; });;
6682/* AUTOGENERATED: vue.registerComponent.js */
6683(function () {
6684  function install (Vue) {
6685    Vue.registerComponent = function (parent, child, name) {
6686      name = name || child.options.name;
6687      if (typeof(parent) === 'function' && typeof(child) === 'function') {
6688        var record = {};
6689        record[name] = child;
6690        parent = parent.extend({
6691          components: _.extend(parent.options.components, record)
6692        });
6693      } else {
6694        console.groupCollapsed("[vue.registerComponent] error");
6695        console.error('Given argument is not a object constructor');
6696        console.error(arguments);
6697        console.groupEnd();
6698      }
6699    }
6700  }
6701
6702  if (typeof exports == "object") {
6703    module.exports = install
6704  } else if (typeof define == "function" && define.amd) {
6705    define([], function(){ return install })
6706  } else if (window.Vue) {
6707    Vue.use(install)
6708  }
6709})();;
6710/* AUTOGENERATED: vue.js */
6711/* vim: set ts=2 sw=2 sts=2 et: */
6712
6713/**
6714 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
6715 * See https://www.x-cart.com/license-agreement.html for license details.
6716 */
6717
6718define('vue/vue', function () { return Vue; });
6719
6720if ('undefined' !== typeof(Vuex)) {
6721  Vue.use(Vuex);
6722  define('vue/vuex', function () { return Vuex; });
6723}
6724
6725define('js/vue/vue', ['vue/vue', 'vue/eventbus', 'js/vue/component'], function (Vue, EventBus, XLiteVueComponent) {
6726  Vue.getClosestVueInstance = function (el) {
6727    var _getClosestVueInstance = function (element) {
6728      if (element) {
6729        return element.__vue__ || _getClosestVueInstance(element.parentElement);
6730      }
6731    }
6732
6733    return _getClosestVueInstance(el);
6734  };
6735
6736  Vue.directive('data', {
6737    inserted: function (el, binding) {
6738      var vm = Vue.getClosestVueInstance(el);
6739
6740      if (!vm) {
6741        return;
6742      }
6743
6744      var object = binding.value;
6745      for (var key in object) {
6746        var parts = key.replace('[','.').replace(']','').split('.');
6747        var path = '';
6748
6749        parts.forEach(function (part) {
6750          if (path) {
6751            path = isNaN(part)
6752              ? path.concat('.' + part)
6753              : path.concat('[' + part + ']');
6754          } else {
6755            path = part;
6756          }
6757
6758          // TODO: doesn't work since we don't have this/self and $get method anymore
6759          /*if (_.isUndefined(self.vm.$get(path))) {
6760            self.vm.$set(path, {});
6761          }*/
6762        });
6763
6764        if (vm[key] !== undefined) {
6765          vm[key] = object[key];
6766        }
6767      }
6768    },
6769
6770    // for loadable components only
6771    update: function (el, binding) {
6772      var vm = Vue.getClosestVueInstance(el);
6773
6774      if (!vm || vm.$options.loadable === undefined) {
6775        return;
6776      }
6777
6778      var object = binding.value;
6779      for (var key in object) {
6780        if (vm.$options.loadable.ignoreUpdates && _.contains(vm.$options.loadable.ignoreUpdates, key)) {
6781          continue;
6782        }
6783
6784        if (vm[key] !== undefined && !_.isEqual(vm[key], object[key])) {
6785          vm[key] = object[key];
6786        }
6787      }
6788    }
6789  });
6790
6791  function XLiteVue() {
6792    this.root = null;
6793  }
6794
6795  XLiteVue.prototype.components = {};
6796
6797  XLiteVue.prototype.start = function (element) {
6798    for (var componentName in this.components) if (this.components.hasOwnProperty(componentName)) {
6799      Vue.component(componentName, this.components[componentName].definition)
6800    }
6801
6802    if (_.isEmpty(this.components)) {
6803      return;
6804    }
6805
6806    var elementToInit = element || '#page-wrapper';
6807
6808    if (element instanceof jQuery && element.length > 0) {
6809      elementToInit = element.get(0);
6810    }
6811
6812    this.root = new Vue({el: elementToInit});
6813
6814    Vue.nextTick(function () {
6815      typeof CommonForm !== 'undefined' && CommonForm.autoload();
6816      typeof StickyPanel !== 'undefined' && StickyPanel.reload();
6817      xcart.microhandlers.runInitial();
6818    });
6819  };
6820
6821  XLiteVue.prototype.component = function (name, definition) {
6822    if (this.components[name]) {
6823      this.components[name].extend(definition);
6824    } else {
6825      this.components[name] = new XLiteVueComponent(name, definition);
6826    }
6827
6828    return this.components[name].definition;
6829  };
6830
6831  Vue.prototype.$dispatch = function (event) {
6832    EventBus.$emit.apply(EventBus, arguments);
6833  };
6834
6835  Vue.prototype.$broadcast = function (event) {
6836    EventBus.$emit.apply(EventBus, arguments);
6837  };
6838
6839  Vue.mixin({
6840    created: function () {
6841      if (typeof this.$options.events !== 'undefined') {
6842        var self = this;
6843        for (var eventName in this.$options.events) {
6844          if (this.$options.events.hasOwnProperty(eventName)) {
6845            (function (_eventName) {
6846              EventBus.$on(_eventName, _.bind(function () {
6847                this.$options.events[_eventName].apply(this, arguments);
6848              }, self));
6849            })(eventName);
6850          }
6851        }
6852      }
6853    },
6854
6855    mounted: function () {
6856      if (typeof this.$options.ready !== 'undefined') {
6857        this.$nextTick(function () {
6858          this.$options.ready.call(this);
6859        });
6860      }
6861    },
6862  })
6863
6864  return new XLiteVue();
6865});
6866
6867jQuery(document).ready(function () {
6868  define('xlite_vue_model_start', ['js/vue/vue', 'ready'], function (XLiteVue) {
6869    if ('admin' === xliteConfig.zone) {
6870      XLiteVue.start();
6871    }
6872  });
6873});;
6874/* AUTOGENERATED: component.js */
6875/* vim: set ts=2 sw=2 sts=2 et: */
6876
6877/**
6878 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
6879 * See https://www.x-cart.com/license-agreement.html for license details.
6880 */
6881
6882define('js/vue/component', ['js/underscore', 'vue/vue'], function (_, Vue) {
6883
6884  var XLiteVueComponent = function (name, definition) {
6885    this.name = name;
6886    this.definition = Vue.extend(definition);
6887  };
6888
6889  XLiteVueComponent.prototype.extend = function (definition) {
6890    this.definition = this.definition.extend(definition);
6891    this._provideParentMethods();
6892  };
6893
6894  XLiteVueComponent.prototype._provideParentMethods = function () {
6895    var methods = this.definition.options.methods;
6896    var parent = this.definition.super.options.methods;
6897
6898    for (var methodName in methods) if ('undefined' === typeof(methods.hasOwnProperty) || methods.hasOwnProperty(methodName)) {
6899      if (parent[methodName]) {
6900        methods[methodName].parent = parent[methodName];
6901      }
6902    }
6903  };
6904
6905  return XLiteVueComponent;
6906});;
6907/* AUTOGENERATED: event_bus.js */
6908/* vim: set ts=2 sw=2 sts=2 et: */
6909
6910/**
6911 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
6912 * See https://www.x-cart.com/license-agreement.html for license details.
6913 */
6914
6915define('vue/eventbus', ['vue/vue'], function (Vue) {
6916  return new Vue();
6917});;
6918/* AUTOGENERATED: xcart.popup.js */
6919/* vim: set ts=2 sw=2 sts=2 et: */
6920
6921/**
6922 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
6923 * See https://www.x-cart.com/license-agreement.html for license details.
6924 */
6925
6926var popup = {};
6927
6928/**
6929 * Properties
6930 */
6931
6932// Loading status
6933popup.isLoading = false;
6934
6935// Request type status - POST or GET
6936popup.isPostRequest = false;
6937
6938// Current unblock event handler
6939popup.currentUnblockCallback = null;
6940
6941// Current popup
6942popup.currentPopup = null;
6943
6944// Load options
6945popup.loadOptions = null;
6946
6947// Do not do real close popup in popup.close()
6948// popup.pseudoClose = false;
6949
6950/**
6951 * Methods
6952 */
6953
6954// Load data to popup
6955popup.load = function(url, unblockCallback, timeout)
6956{
6957  if (_.isObject(unblockCallback) && !_.isFunction(unblockCallback)) {
6958    var options = unblockCallback;
6959    options.unblockCallback = 'undefined' == typeof(options.unblockCallback) ? null : options.unblockCallback;
6960    options.timeout = timeout || null;
6961
6962  } else {
6963    var options = {
6964      'unblockCallback': unblockCallback,
6965      'timeout':         timeout
6966    };
6967  }
6968
6969  this.loadOptions = options;
6970
6971  var result = false;
6972  if (xcart.isRequesterEnabled) {
6973    var method = null;
6974
6975    if (_.isObject(url) && !_.isElement(url)) {
6976      url = url.get(0);
6977    }
6978
6979    if (url.constructor == String) {
6980      method = 'loadByURL';
6981
6982    } else if (url.constructor == HTMLFormElement) {
6983      method = 'loadByForm';
6984
6985    } else if (url.constructor == HTMLAnchorElement) {
6986      method = 'loadByLink';
6987
6988    } else if (url.constructor == HTMLButtonElement) {
6989      method = 'loadByButton';
6990
6991    }
6992
6993    if (method) {
6994      this.isLoading = true;
6995      this.currentUnblockCallback = options.unblockCallback;
6996
6997      if (this.currentPopup) {
6998        // Reload popup content only
6999        this.shade();
7000      } else {
7001        // Open waiting dialog
7002        this.openAsWait();
7003      }
7004
7005      this.isPostRequest = false;
7006      result = this[method](url, options.timeout);
7007    }
7008  }
7009
7010  return result;
7011};
7012
7013// Load by URL
7014popup.loadByURL = function(url, timeout)
7015{
7016  return xcart.get(
7017    this.preprocessURL(url),
7018    _.bind(this.postprocessRequest, this),
7019    null,
7020    {
7021      timeout: timeout
7022    }
7023  );
7024};
7025
7026// Load by form element
7027popup.loadByForm = function(form)
7028{
7029  form = jQuery(form).get(0);
7030
7031  form.setAttribute('action', this.preprocessURL(form.getAttribute('action')));
7032
7033  return form ? form.submitBackground(_.bind(this.postprocessRequest, this)) : false;
7034};
7035
7036// Load by link element
7037popup.loadByLink = function(link)
7038{
7039  link = jQuery(link).eq(0);
7040
7041  var href = (1 == link.length && link.attr('href')) ? link.attr('href') : false;
7042
7043  return href
7044    ? xcart.get(this.preprocessURL(href), _.bind(this.postprocessRequest, this))
7045    : false;
7046};
7047
7048// Load by button element
7049popup.loadByButton = function(button)
7050{
7051  var result = false;
7052
7053  button = jQuery(button);
7054
7055  if (button.attr('onclick') && -1 !== button.attr('onclick').toString().search(/\.location[ ]*=[ ]*['"].+['"]/)) {
7056
7057    // By onclick attribute
7058    var m = button.attr('onclick').toString().match(/\.location[ ]*=[ ]*['"](.+)['"]/);
7059    result = xcart.get(this.preprocessURL(m[1]), _.bind(this.postprocessRequest, this));
7060
7061  } else if (button.data('location')) {
7062
7063    // By kQuery data cell
7064    result = xcart.get(this.preprocessURL(button.data('location')), _.bind(this.postprocessRequest, this));
7065
7066  } else if (0 < button.parents('form').length) {
7067
7068    // By button's form
7069    result = this.loadByForm(jQuery(button).parents('form').eq(0));
7070
7071  }
7072
7073  return result;
7074};
7075
7076// Preprocess URL
7077popup.preprocessURL = function(url)
7078{
7079  if (url && -1 == url.search(/only_center=1/)) {
7080    url += (-1 == url.search(/\?/) ? '?' : '&') + 'only_center=1';
7081  }
7082
7083  return url;
7084};
7085
7086// Postprocess request
7087popup.postprocessRequest = function(XMLHttpRequest, textStatus, data, isValid)
7088{
7089  if (XMLHttpRequest && XMLHttpRequest instanceof jQuery.Event && textStatus) {
7090    var event      = XMLHttpRequest;
7091    XMLHttpRequest = textStatus.XMLHttpRequest;
7092    data           = textStatus.data;
7093    isValid        = textStatus.isValid;
7094    textStatus     = textStatus.textStatus;
7095  }
7096
7097  var responseStatus = 4 == XMLHttpRequest.readyState ? parseInt(XMLHttpRequest.getResponseHeader('ajax-response-status')) : 0;
7098
7099  if (4 != XMLHttpRequest.readyState) {
7100
7101    // Connection failed
7102    this.destroy();
7103    // TODO - add top message
7104
7105  } else if (278 == responseStatus) {
7106
7107    // Redirect
7108    this.destroy();
7109    var url = XMLHttpRequest.getResponseHeader('AJAX-Location');
7110    if (url) {
7111      self.location = url;
7112
7113    } else {
7114      self.location.reload(true);
7115    }
7116
7117  } else if (279 == responseStatus) {
7118
7119    // Internal redirect
7120    var url = XMLHttpRequest.getResponseHeader('AJAX-Location');
7121    if (url) {
7122      this.load(url, this.currentUnblockCallback);
7123
7124    } else {
7125      self.location.reload(true);
7126    }
7127
7128  } else if (277 == responseStatus) {
7129
7130    // Close popup in silence
7131    this.close();
7132
7133  } else if (200 == XMLHttpRequest.status) {
7134
7135    // Load new content
7136    this.unshade();
7137
7138    var uuid = _.uniqueId();
7139
7140    if (data) {
7141      xcart.bind(['resources.ready', 'resources.empty'], _.bind(
7142        function(event, args){
7143          if (args.uuid === uuid) {
7144            this.place(data, this.loadOptions);
7145            xcart.trigger(
7146              'afterPopupPlace',
7147              {
7148                'XMLHttpRequest': XMLHttpRequest,
7149                'textStatus':     textStatus,
7150                'data':           data,
7151                'isValid':        isValid
7152              }
7153            );
7154          }
7155        },
7156        this)
7157      );
7158
7159      xcart.parsePreloadedLabels(jQuery.parseHTML(data), uuid);
7160      xcart.parseResources(jQuery.parseHTML(data), uuid);
7161
7162    } else {
7163      this.unfreezePopup();
7164    }
7165
7166  } else {
7167
7168    // Loading failed
7169    this.close();
7170
7171  }
7172};
7173
7174// Place request data
7175popup.place = function(data, options)
7176{
7177  this.isLoading = false;
7178
7179  if (false !== data) {
7180    data = this.extractRequestData(data);
7181    this.assignHandlers(data);
7182    this.open(data, options);
7183  }
7184};
7185
7186// Extract widget data
7187popup.extractRequestData = function(data)
7188{
7189  return jQuery(data);
7190};
7191
7192popup.assignHandlers = function(data)
7193{
7194  // Do not need this assignment since the microhandlers would be run after the popup placement
7195  // xcart.microhandlers.runAll(data);
7196};
7197
7198popup.shade = function()
7199{
7200  this.currentPopup.widget.find('.ui-dialog-content')
7201    .append('<div class="wait-overlay"><div class="wait-overlay-progress"><div></div></div></div>');
7202};
7203
7204popup.unshade = function()
7205{
7206  if (this.currentPopup) {
7207    this.currentPopup.widget.find('.wait-overlay').remove();
7208  }
7209};
7210
7211// Popup post processing
7212popup.postprocess = function()
7213{
7214  // If for some cases you need direct submit of the form (inside the popup widget)
7215  // then provide the form with the "no-popup-ajax-submit" CSS class
7216  this.currentPopup.widget
7217    .find('form')
7218    .not('.no-popup-ajax-submit')
7219    .commonController(
7220      'enableBackgroundSubmit',
7221      _.bind(this.freezePopup, this),
7222      _.bind(this.postprocessRequest, this)
7223    );
7224
7225  xcart.microhandlers.runAll(this.currentPopup.widget);
7226
7227  if (!this.isLoading) {
7228      xcart.trigger('popup.postprocess', { widget: this });
7229  }
7230};
7231
7232// Freeze popup content
7233popup.freezePopup = function()
7234{
7235  if (this.currentPopup) {
7236    this.currentPopup.widget.find('form').each(
7237      function() {
7238        jQuery('button,input:image,input:submit', this).each(
7239          function() {
7240            if (!this.disabled) {
7241              this.temporaryDisabled = true;
7242              jQuery(this).prop('disabled', 'disabled');
7243            }
7244          }
7245        );
7246      }
7247    );
7248
7249    this.shade();
7250  }
7251};
7252
7253// Unfreeze popup content
7254popup.unfreezePopup = function()
7255{
7256  if (this.currentPopup) {
7257    this.currentPopup.widget.find('form').each(
7258      function() {
7259        jQuery('button,input:image,input:submit', this).each(
7260          function() {
7261            if (this.temporaryDisabled) {
7262              jQuery(this).removeAttr('disabled');
7263              this.temporaryDisabled = true;
7264            }
7265          }
7266        );
7267      }
7268    );
7269  }
7270};
7271
7272// Open as wait box
7273popup.openAsWait = function()
7274{
7275  this.isLoading = true;
7276  this.open(jQuery('<div data-dialog-class="block-wait-box"><div class="block-wait"><div></div></div></div>'));
7277};
7278
7279// Open-n-display popup
7280popup.open = function(box, additionalOptions)
7281{
7282  additionalOptions = additionalOptions || {};
7283
7284  if (this.currentPopup) {
7285    this.destroy();
7286  }
7287
7288  if (box && _.isString(box)) {
7289    box = jQuery('<div></div>')
7290      .html(box);
7291  }
7292
7293  box = jQuery(box);
7294  if (box.attr('title')) {
7295    box.data('title', box.attr('title'));
7296    additionalOptions.title = box.data('title');
7297
7298  } else if (box.data('title')) {
7299    box.attr('title', box.data('title'));
7300    additionalOptions.title = box.data('title');
7301  }
7302
7303  box.dialog(
7304    this.extendOptions(this.getPopupOptions(box), additionalOptions)
7305  );
7306
7307  this.currentPopup = {
7308    'box':    box,
7309    'widget': jQuery(box).dialog('widget')
7310  };
7311
7312
7313  this.postprocess();
7314  this.reposition();
7315};
7316
7317popup.getPopupOptions = function(box)
7318{
7319  return {
7320    autoOpen:      true,
7321    closeOnEscape: !box.data('dialog-no-close'),
7322    dialogClass:   (box.data('dialog-class') ? box.data('dialog-class') : 'default-dialog')
7323      + ' ' + (box.attr('title') ? 'has-title' : 'no-title') + (box.data('dialog-no-close') ? ' no-close' : ''),
7324    draggable:     false,
7325    height:        'auto',
7326    modal:         (typeof(box.data('dialog-modal')) !== 'undefined' ? box.data('dialog-modal') : true),
7327    position:      { my: "center", at: "center", of: window },
7328    resizable:     false,
7329    width:         'auto',
7330    minWidth:      300,
7331    minHeight:     150,
7332
7333    open:          _.bind(
7334      function(event, ui) {
7335        jQuery('.overlay-blur-base').addClass('overlay-blur');
7336        xcart.trigger('popup.open', { widget: this, event });
7337      },
7338      this
7339    ),
7340    close:         _.bind(
7341      function(event, ui) {
7342        jQuery('.overlay-blur-base').removeClass('overlay-blur');
7343        this.currentPopup.widget.find('form').each(
7344          function (index, elem) {
7345            jQuery(elem).validationEngine('hide');
7346          }
7347        );
7348
7349        this.close(event);
7350      },
7351      this
7352    ),
7353
7354    beforeClose:  _.bind(this.beforeClose, this)
7355  };
7356};
7357
7358popup.extendOptions = function(first, second)
7359{
7360  _.each(
7361    ['dialogClass'],
7362    function (key) {
7363      if (_.isString(first[key]) && _.isString(second[key])) {
7364        first[key] += ' ' + second[key];
7365        delete second[key];
7366      }
7367    }
7368  );
7369
7370  return _.extend(first, second);
7371};
7372
7373// Reposition (center) popup
7374popup.reposition = function()
7375{
7376  if (!this.currentPopup) {
7377    return;
7378  }
7379
7380  const box = this.currentPopup.box
7381
7382  if (box.length) {
7383    const self = this;
7384    setTimeout(
7385      function() {
7386        const widgetHeight = self.currentPopup.widget.outerHeight(true);
7387        const windowHeight = $(window).height();
7388
7389        window.stickyElementsForPopup = {
7390          top: null,
7391          sizes: {
7392            top: 0,
7393            left: 0
7394          }
7395        };
7396
7397        /** window.stickyElementsForPopup is expected to change in the event listeners. **/
7398        window.dispatchEvent(new CustomEvent('updateStickyElementsForPopup'));
7399
7400        const atHorizontal = ("center+".concat(Math.round(window.stickyElementsForPopup.sizes.left / 2).toString()));
7401
7402        if (widgetHeight < windowHeight - window.stickyElementsForPopup.sizes.top) {
7403          const verticalShift = (" center+".concat(Math.round(window.stickyElementsForPopup.sizes.top / 2).toString()));
7404          try {
7405            box.dialog(
7406              "option",
7407              "position",
7408              {
7409                my: "center",
7410                at: atHorizontal.concat(verticalShift),
7411                of: window
7412              }
7413            )
7414          } catch (e) {}
7415        } else if (window.stickyElementsForPopup.top) {
7416          try {
7417            box.dialog(
7418              "option",
7419              "position",
7420              {
7421                my: "top",
7422                at: atHorizontal.concat(" bottom"),
7423                of: window.stickyElementsForPopup.top
7424              }
7425            )
7426          } catch (e) {}
7427        } else {
7428          try {
7429            box.dialog(
7430              "option",
7431              "position",
7432              {
7433                my: "top",
7434                at: "top",
7435                of: window,
7436                collision: "fit"
7437              }
7438            )
7439          } catch (e) {}
7440        }
7441      }, 1
7442    )
7443  }
7444};
7445
7446// Destroy
7447popup.destroy = function()
7448{
7449  if (this.currentPopup && this.currentPopup.box) {
7450    const box = this.currentPopup.box
7451    this.close()
7452    box.dialog('destroy')
7453    box.remove();
7454  }
7455}
7456
7457
7458// Close popup
7459popup.close = function(event)
7460{
7461  var box;
7462  if (this.currentPopup && this.currentPopup.box) {
7463    box = this.currentPopup.box;
7464    box.dialog('close');
7465
7466    if (this.currentUnblockCallback && _.isFunction(this.currentUnblockCallback)) {
7467      this.currentUnblockCallback();
7468    }
7469  }
7470
7471  this.currentUnblockCallback = null;
7472  this.currentPopup = null;
7473
7474  xcart.trigger('popup.close', { 'widget': this, 'box': box, event });
7475};
7476
7477popup.beforeClose = function(event)
7478{
7479  var box;
7480  if (this.currentPopup && this.currentPopup.box) {
7481    box = this.currentPopup.box;
7482  }
7483
7484  xcart.trigger('popup.beforeClose', { 'widget': this, 'box': box, event });
7485};
7486
7487xcart.bind('popup.open', function () {
7488  document.querySelectorAll('.ui-dialog-titlebar-close').forEach(btn => {
7489    if (!btn.innerText) {
7490      btn.innerHTML += '<span class="visually-hidden">' + xcart.t('Close') + '</span>';
7491    }
7492  });
7493});
7494
7495jQuery(window).resize(
7496  function(event) {
7497    popup.reposition();
7498  }
7499);;
7500/* AUTOGENERATED: xcart.popup_button.js */
7501/* vim: set ts=2 sw=2 sts=2 et: */
7502
7503/**
7504 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
7505 * See https://www.x-cart.com/license-agreement.html for license details.
7506 */
7507
7508var lastPopupButton;
7509
7510function PopupButton(base) {
7511  var obj = this;
7512
7513  if (base) {
7514    this.base = base;
7515    this.eachCallback(base);
7516  } else {
7517    this.base = jQuery(this.pattern);
7518    this.base.each(
7519      function () {
7520        obj.eachCallback(this);
7521      }
7522    );
7523  }
7524}
7525
7526PopupButton.prototype.pattern = '.popup-button.default-popup-button';
7527
7528PopupButton.prototype.enableBackgroundSubmit = true;
7529
7530PopupButton.prototype.options = {
7531  width: 'auto'
7532};
7533
7534PopupButton.prototype.afterSubmit = function (selector) {
7535};
7536
7537PopupButton.prototype.callback = function (selector, link) {
7538
7539  var obj = this;
7540
7541  var shouldClose = jQuery(this.base).data('without-close') === true || !jQuery(this.base).data('without-close');
7542
7543  if (!this.enableBackgroundSubmit) {
7544    jQuery('form', selector).each(function () {
7545      this.commonController.backgroundSubmit = false;
7546    });
7547  } else if (shouldClose) {
7548    jQuery('form', selector).each(function () {
7549      jQuery(this).commonController(
7550        'enableBackgroundSubmit',
7551        function () {
7552          // Close dialog (but it is available in DOM)
7553          popup.close();
7554          openWaitBar();
7555
7556          return true;
7557        },
7558        function (event) {
7559          closeWaitBar();
7560
7561          obj.afterSubmit(selector);
7562
7563          // Remove dialog from DOM
7564          jQuery(selector).remove();
7565          link.linkedDialog = null;
7566
7567          return false;
7568        }
7569      );
7570    });
7571  }
7572
7573  $(link).trigger('popup.open');
7574
7575  xcart.autoload(PopupButton);
7576};
7577
7578PopupButton.prototype.getURLParams = function (button) {
7579  return xcart.getCommentedData(button, 'url_params');
7580};
7581
7582PopupButton.prototype.getJSConfirmText = function (button) {
7583  return xcart.getCommentedData(button, 'jsConfirm');
7584};
7585
7586PopupButton.prototype.eachClick = function (elem) {
7587  lastPopupButton = jQuery(elem);
7588
7589  var proceed = true;
7590
7591  if (lastPopupButton.hasClass('disabled')) {
7592    return false;
7593  }
7594
7595  if (this.getJSConfirmText(elem)) {
7596    proceed = confirm(this.getJSConfirmText(elem));
7597  }
7598
7599  if (proceed) {
7600    this.beforeLoadDialog(elem);
7601    return loadDialogByLink(
7602      elem,
7603      URLHandler.buildURL(this.getURLParams(elem)),
7604      this.options,
7605      _.bind(this.callback, this),
7606      elem
7607    );
7608  }
7609
7610  return proceed;
7611};
7612
7613PopupButton.prototype.beforeLoadDialog = function (elem) {
7614};
7615
7616PopupButton.prototype.eachCallback = function (elem) {
7617  var obj = this;
7618  elem.popupController = obj;
7619
7620  var handler = _.bind(obj.eachClick, this);
7621  jQuery(elem).click(
7622    function (event) {
7623      handler(this);
7624      event.stopImmediatePropagation();
7625
7626      return false;
7627    }
7628  );
7629};;
7630/* AUTOGENERATED: Sortable.js */
7631/*! Sortable 1.13.0 - MIT | git://github.com/SortableJS/Sortable.git */
7632!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sortable=e()}(this,function(){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(){return(a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function I(i){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},e=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.forEach(function(t){var e,n,o;e=i,o=r[n=t],n in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o})}return i}function l(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)n=r[o],0<=e.indexOf(n)||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],0<=e.indexOf(n)||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function e(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function t(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var w=t(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),E=t(/Edge/i),c=t(/firefox/i),u=t(/safari/i)&&!t(/chrome/i)&&!t(/android/i),n=t(/iP(ad|od|hone)/i),i=t(/chrome/i)&&t(/android/i),r={capture:!1,passive:!1};function d(t,e,n){t.addEventListener(e,n,!w&&r)}function s(t,e,n){t.removeEventListener(e,n,!w&&r)}function h(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function P(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&h(t,e):h(t,e))||o&&t===n)return t;if(t===n)break}while(t=(i=t).host&&i!==document&&i.host.nodeType?i.host:i.parentNode)}var i;return null}var f,p=/\s+/g;function k(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(p," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(p," ")}}function R(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function v(t,e){var n="";if("string"==typeof t)n=t;else do{var o=R(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function g(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function A(){var t=document.scrollingElement;return t||document.documentElement}function X(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,a,l,s,c,u,d;if(d=t!==window&&t.parentNode&&t!==A()?(a=(r=t.getBoundingClientRect()).top,l=r.left,s=r.bottom,c=r.right,u=r.height,r.width):(l=a=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!w))do{if(i&&i.getBoundingClientRect&&("none"!==R(i,"transform")||n&&"static"!==R(i,"position"))){var h=i.getBoundingClientRect();a-=h.top+parseInt(R(i,"border-top-width")),l-=h.left+parseInt(R(i,"border-left-width")),s=a+r.height,c=l+r.width;break}}while(i=i.parentNode);
vendor: 4,111 bytes, line 7632
7632if(o&&t!==window){var f=v(i||t),p=f&&f.a,g=f&&f.d;f&&(s=(a/=g)+(u/=g),c=(l/=p)+(d/=p))}return{top:a,left:l,bottom:s,right:c,width:d,height:u}}}function Y(t,e,n){for(var o=H(t,!0),i=X(t)[e];o;){var r=X(o)[n];if(!("top"===n||"left"===n?r<=i:i<=r))return o;if(o===A())break;o=H(o,!1)}return!1}function m(t,e,n){for(var o=0,i=0,r=t.children;i<r.length;){if("none"!==r[i].style.display&&r[i]!==Rt.ghost&&r[i]!==Rt.dragged&&P(r[i],n.draggable,t,!1)){if(o===e)return r[i];o++}i++}return null}function B(t,e){for(var n=t.lastElementChild;n&&(n===Rt.ghost||"none"===R(n,"display")||e&&!h(n,e));)n=n.previousElementSibling;return n||null}function F(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Rt.clone||e&&!h(t,e)||n++;return n}function b(t){var e=0,n=0,o=A();if(t)do{var i=v(t),r=i.a,a=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*a}while(t!==o&&(t=t.parentNode));return[e,n]}function H(t,e){if(!t||!t.getBoundingClientRect)return A();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=R(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return A();if(o||e)return n;o=!0}}}while(n=n.parentNode);return A()}function y(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function D(e,n){return function(){if(!f){var t=arguments;1===t.length?e.call(this,t[0]):e.apply(this,t),f=setTimeout(function(){f=void 0},n)}}}function L(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function S(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function _(t,e){R(t,"position","absolute"),R(t,"top",e.top),R(t,"left",e.left),R(t,"width",e.width),R(t,"height",e.height)}function C(t){R(t,"position",""),R(t,"top",""),R(t,"left",""),R(t,"width",""),R(t,"height","")}var j="Sortable"+(new Date).getTime();function T(){var e,o=[];return{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(t){if("none"!==R(t,"display")&&t!==Rt.ghost){o.push({target:t,rect:X(t)});var e=I({},o[o.length-1].rect);if(t.thisAnimationDuration){var n=v(t,!0);n&&(e.top-=n.f,e.left-=n.e)}t.fromRect=e}})},addAnimationState:function(t){o.push(t)},removeAnimationState:function(t){o.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(o,{target:t}),1)},animateAll:function(t){var c=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof t&&t());var u=!1,d=0;o.forEach(function(t){var e=0,n=t.target,o=n.fromRect,i=X(n),r=n.prevFromRect,a=n.prevToRect,l=t.rect,s=v(n,!0);s&&(i.top-=s.f,i.left-=s.e),n.toRect=i,n.thisAnimationDuration&&y(r,i)&&!y(o,i)&&(l.top-i.top)/(l.left-i.left)==(o.top-i.top)/(o.left-i.left)&&(e=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(l,r,a,c.options)),y(i,o)||(n.prevFromRect=o,n.prevToRect=i,e||(e=c.options.animation),c.animate(n,l,i,e)),e&&(u=!0,d=Math.max(d,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},e),n.thisAnimationDuration=e)}),clearTimeout(e),u?e=setTimeout(function(){"function"==typeof t&&t()},d):"function"==typeof t&&t(),o=[]},animate:function(t,e,n,o){if(o){R(t,"transition",""),R(t,"transform","");var i=v(this.el),r=i&&i.a,a=i&&i.d,l=(e.left-n.left)/(r||1),s=(e.top-n.top)/(a||1);t.animatingX=!!l,t.animatingY=!!s,R(t,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),R(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),R(t,"transform","translate3d(0,
76320,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout(function(){R(t,"transition",""),R(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},o)}}}}var x=[],M={initializeByDefault:!0},O={mount:function(e){for(var t in M)!M.hasOwnProperty(t)||t in e||(e[t]=M[t]);x.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),x.push(e)},pluginEvent:function(e,n,o){var t=this;this.eventCanceled=!1,o.cancel=function(){t.eventCanceled=!0};var i=e+"Global";x.forEach(function(t){n[t.pluginName]&&(n[t.pluginName][i]&&n[t.pluginName][i](I({sortable:n},o)),n.options[t.pluginName]&&n[t.pluginName][e]&&n[t.pluginName][e](I({sortable:n},o)))})},initializePlugins:function(o,i,r,t){for(var e in x.forEach(function(t){var e=t.pluginName;if(o.options[e]||t.initializeByDefault){var n=new t(o,i,o.options);n.sortable=o,n.options=o.options,o[e]=n,a(r,n.defaults)}}),o.options)if(o.options.hasOwnProperty(e)){var n=this.modifyOption(o,e,o.options[e]);void 0!==n&&(o.options[e]=n)}},getEventProperties:function(e,n){var o={};return x.forEach(function(t){"function"==typeof t.eventProperties&&a(o,t.eventProperties.call(n[t.pluginName],e))}),o},modifyOption:function(e,n,o){var i;return x.forEach(function(t){e[t.pluginName]&&t.optionListeners&&"function"==typeof t.optionListeners[n]&&(i=t.optionListeners[n].call(e[t.pluginName],o))}),i}};function N(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,a=t.toEl,l=t.fromEl,s=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,d=t.newDraggableIndex,h=t.originalEvent,f=t.putSortable,p=t.extraEventProperties;if(e=e||n&&n[j]){var g,v=e.options,m="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||w||E?(g=document.createEvent("Event")).initEvent(o,!0,!0):g=new CustomEvent(o,{bubbles:!0,cancelable:!0}),g.to=a||n,g.from=l||n,g.item=i||n,g.clone=r,g.oldIndex=s,g.newIndex=c,g.oldDraggableIndex=u,g.newDraggableIndex=d,g.originalEvent=h,g.pullMode=f?f.lastPutMode:void 0;var b=I({},p,O.getEventProperties(o,e));for(var y in b)g[y]=b[y];n&&n.dispatchEvent(g),v[m]&&v[m].call(e,g)}}function K(t,e,n){var o=2<arguments.length&&void 0!==n?n:{},i=o.evt,r=l(o,["evt"]);O.pluginEvent.bind(Rt)(t,e,I({dragEl:z,parentEl:G,ghostEl:U,rootEl:q,nextEl:V,lastDownEl:Z,cloneEl:Q,cloneHidden:$,dragStarted:dt,putSortable:it,activeSortable:Rt.active,originalEvent:i,oldIndex:J,oldDraggableIndex:et,newIndex:tt,newDraggableIndex:nt,hideGhostForTarget:At,unhideGhostForTarget:It,cloneNowHidden:function(){$=!0},cloneNowShown:function(){$=!1},dispatchSortableEvent:function(t){W({sortable:e,name:t,originalEvent:i})}},r))}function W(t){N(I({putSortable:it,cloneEl:Q,targetEl:z,rootEl:q,oldIndex:J,oldDraggableIndex:et,newIndex:tt,newDraggableIndex:nt},t))}var z,G,U,q,V,Z,Q,$,J,tt,et,nt,ot,it,rt,at,lt,st,ct,ut,dt,ht,ft,pt,gt,vt=!1,mt=!1,bt=[],yt=!1,wt=!1,Et=[],Dt=!1,St=[],_t="undefined"!=typeof document,Ct=n,Tt=E||w?"cssFloat":"float",xt=_t&&!i&&!n&&"draggable"in document.createElement("div"),Mt=function(){if(_t){if(w)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}
vendor: 5,130 bytes, line 7632
7632(),Ot=function(t,e){var n=R(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=m(t,0,e),r=m(t,1,e),a=i&&R(i),l=r&&R(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+X(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+X(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||o<=s&&"none"===n[Tt]||r&&"none"===n[Tt]&&o<s+c)?"vertical":"horizontal"},Nt=function(t){function s(a,l){return function(t,e,n,o){var i=t.options.group.name&&e.options.group.name&&t.options.group.name===e.options.group.name;if(null==a&&(l||i))return!0;if(null==a||!1===a)return!1;if(l&&"clone"===a)return a;if("function"==typeof a)return s(a(t,e,n,o),l)(t,e,n,o);var r=(l?t:e).options.group.name;return!0===a||"string"==typeof a&&a===r||a.join&&-1<a.indexOf(r)}}var e={},n=t.group;n&&"object"==o(n)||(n={name:n}),e.name=n.name,e.checkPull=s(n.pull,!0),e.checkPut=s(n.put),e.revertClone=n.revertClone,t.group=e},At=function(){!Mt&&U&&R(U,"display","none")},It=function(){!Mt&&U&&R(U,"display","")};_t&&document.addEventListener("click",function(t){if(mt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),mt=!1},!0);function Pt(t){if(z){var e=function(r,a){var l;return bt.some(function(t){if(!B(t)){var e=X(t),n=t[j].options.emptyInsertThreshold,o=r>=e.left-n&&r<=e.right+n,i=a>=e.top-n&&a<=e.bottom+n;return n&&o&&i?l=t:void 0}}),l}((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[j]._onDragOver(n)}}}function kt(t){z&&z.parentNode[j]._isOutsideThisEl(t.target)}function Rt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=a({},e),t[j]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ot(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Rt.supportPointer&&"PointerEvent"in window&&!u,emptyInsertThreshold:5};for(var o in O.initializePlugins(this,t,n),n)o in e||(e[o]=n[o]);for(var i in Nt(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&xt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?d(t,"pointerdown",this._onTapStart):(d(t,"mousedown",this._onTapStart),d(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(d(t,"dragover",this),d(t,"dragenter",this)),bt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),a(this,T())}function Xt(t,e,n,o,i,r,a,l){var s,c,u=t[j],d=u.options.onMove;return!window.CustomEvent||w||E?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||X(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),d&&(c=d.call(u,s,a)),c}function Yt(t){t.draggable=!1}function Bt(){Dt=!1}function Ft(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Ht(t){return setTimeout(t,0)}function Lt(t){return clearTimeout(t)}Rt.prototype={constructor:Rt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ht=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,o=this.el,t=this.options,i=t.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=t.filter;if(function(t){St.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&St.push(o)}}(o),!z&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||t.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!u||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=P(l,t.draggable,o,
vendor: 6,263 bytes, line 7632
7632!1))&&l.animated||Z===l)){if(J=F(l),et=F(l,t.draggable),"function"==typeof c){if(c.call(this,e,l,this))return W({sortable:n,rootEl:s,name:"filter",targetEl:l,toEl:o,fromEl:o}),K("filter",n,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some(function(t){if(t=P(s,t.trim(),o,!1))return W({sortable:n,rootEl:t,name:"filter",targetEl:l,fromEl:o,toEl:o}),K("filter",n,{evt:e}),!0})))return void(i&&e.cancelable&&e.preventDefault());t.handle&&!P(s,t.handle,o,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;if(n&&!z&&n.parentNode===r){var s=X(n);if(q=r,G=(z=n).parentNode,V=z.nextSibling,Z=n,ot=a.group,rt={target:Rt.dragged=z,clientX:(e||t).clientX,clientY:(e||t).clientY},ct=rt.clientX-s.left,ut=rt.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,z.style["will-change"]="all",o=function(){K("delayEnded",i,{evt:t}),Rt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!c&&i.nativeDraggable&&(z.draggable=!0),i._triggerDragStart(t,e),W({sortable:i,name:"choose",originalEvent:t}),k(z,a.chosenClass,!0))},a.ignore.split(",").forEach(function(t){g(z,t.trim(),Yt)}),d(l,"dragover",Pt),d(l,"mousemove",Pt),d(l,"touchmove",Pt),d(l,"mouseup",i._onDrop),d(l,"touchend",i._onDrop),d(l,"touchcancel",i._onDrop),c&&this.nativeDraggable&&(this.options.touchStartThreshold=4,z.draggable=!0),K("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(E||w))o();else{if(Rt.eventCanceled)return void this._onDrop();d(l,"mouseup",i._disableDelayedDrag),d(l,"touchend",i._disableDelayedDrag),d(l,"touchcancel",i._disableDelayedDrag),d(l,"mousemove",i._delayedDragTouchMoveHandler),d(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&d(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){z&&Yt(z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;s(t,"mouseup",this._disableDelayedDrag),s(t,"touchend",this._disableDelayedDrag),s(t,"touchcancel",this._disableDelayedDrag),s(t,"mousemove",this._delayedDragTouchMoveHandler),s(t,"touchmove",this._delayedDragTouchMoveHandler),s(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?d(document,"pointermove",this._onTouchMove):d(document,e?"touchmove":"mousemove",this._onTouchMove):(d(z,"dragend",this),d(q,"dragstart",this._onDragStart));try{document.selection?Ht(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(vt=!1,q&&z){K("dragStarted",this,{evt:e}),this.nativeDraggable&&d(document,"dragover",kt);var n=this.options;t||k(z,n.dragClass,!1),k(z,n.ghostClass,!0),Rt.active=this,t&&this._appendGhost(),W({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(at){this._lastX=at.clientX,this._lastY=at.clientY,At();for(var t=document.elementFromPoint(at.clientX,at.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(at.clientX,at.clientY))!==e;)e=t;if(z.parentNode[j]._isOutsideThisEl(t),e)do{if(e[j]){if(e[j]._onDragOver({clientX:at.clientX,clientY:at.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);It()}},_onTouchMove:function(t){if(rt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=U&&v(U,!0),a=U&&r&&r.a,l=U&&r&&r.d,s=Ct&&gt&&b(gt),c=(i.clientX-rt.clientX+o.x)/(a||1)+(s?s[0]-Et[0]:0)/(a||1),u=(i.clientY-rt.clientY+o.y)/(l||1)+(s?s[1]-Et[1]:0)/(l||1);if(!Rt.active&&!vt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(U){r?(r.e+=c-(lt||0),r.f+=u-(st||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");R(U,"webkitTransform",d),R(U,"mozTransform",d),R(U,"msTransform",d),R(U,"transform",d),lt=c,st=u,at=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!U){var t=this.options.fallbackOnBody?document.body:q,e=X(z,!0,Ct,!0,t),n=this.options;if(Ct){for(gt=t;"static"===R(gt,"position")&&"none"===R(gt,"transform")&&gt!==document;)gt=gt.parentNode;gt!==document.body&&gt!==document.documentElement?(gt===document&&(gt=A()),e.top+=gt.scrollTop,e.left+=gt.scrollLeft):gt=A(),Et=b(gt)}k(U=z.cloneNode(!0),n.ghostClass,!1),k(U,n.fallbackClass,!0),k(U,n.dragClass,!0),R(U,"transition",""),R(U,"transform",""),R(U,"box-sizing","border-box"),R(U,"margin",0),R(U,"top",e.top),R(U,"left",e.left),R(U,"width",e.width),R(U,"height",e.height),R(U,"opacity","0.8"),R(U,"position",Ct?"absolute":"fixed"),R(U,"zIndex","100000"),R(U,"pointerEvents","none"),Rt.ghost=U,t.appendChild(U),R(U,"transform-origin",ct/parseInt(U.style.width)*100+"% "+ut/parseInt(U.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;K("dragStart",this,{evt:t}),Rt.eventCanceled?this._onDrop():(K("setupClone",this),Rt.eventCanceled||((Q=S(z)).draggable=!1,Q.style["will-change"]="",this._hideClone(),k(Q,this.options.chosenClass,!1),Rt.clone=Q),n.cloneId=Ht(function(){K("clone",n),Rt.eventCanceled||(n.options.removeCloneOnHide||q.insertBefore(Q,z),n._hideClone(),W({sortable:n,name:"clone"}))}),e||k(z,i.dragClass,!0),e?(mt=!0,n._loopId=setInterval(n._emulateDragOver,50)):(s(document,"mouseup",n._onDrop),s(document,"touchend",n._onDrop),s(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,z)),d(document,"drop",n),R(z,"transform","translateZ(0)")),vt=!0,n._dragStartId=Ht(n._dragStarted.bind(n,e,t)),d(document,"selectstart",n),dt=!0,u&&R(document.body,"user-select","none"))},_onDragOver:function(n){var o,i,r,a,l=this.el,s=n.target,e=this.options,t=e.group,c=Rt.active,u=ot===t,d=e.s
vendor: 4,823 bytes, line 7632
7632ort,h=it||c,f=this,p=!1;if(!Dt){if(void 0!==n.preventDefault&&n.cancelable&&n.preventDefault(),s=P(s,e.draggable,l,!0),M("dragOver"),Rt.eventCanceled)return p;if(z.contains(n.target)||s.animated&&s.animatingX&&s.animatingY||f._ignoreWhileAnimating===s)return N(!1);if(mt=!1,c&&!e.disabled&&(u?d||(r=!q.contains(z)):it===this||(this.lastPutMode=ot.checkPull(this,c,z,n))&&t.checkPut(this,c,z,n))){if(a="vertical"===this._getDirection(n,s),o=X(z),M("dragOverValid"),Rt.eventCanceled)return p;if(r)return G=q,O(),this._hideClone(),M("revert"),Rt.eventCanceled||(V?q.insertBefore(z,V):q.appendChild(z)),N(!0);var g=B(l,e.draggable);if(!g||function(t,e,n){var o=X(B(n.el,n.options.draggable));return e?t.clientX>o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(n,a,this)&&!g.animated){if(g===z)return N(!1);if(g&&l===n.target&&(s=g),s&&(i=X(s)),!1!==Xt(q,l,z,o,s,i,n,!!s))return O(),l.appendChild(z),G=l,A(),N(!0)}else if(s.parentNode===l){i=X(s);var v,m,b,y=z.parentNode!==l,w=!function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,r=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,s=n?e.width:e.height;return o===a||i===l||o+r/2===a+s/2}(z.animated&&z.toRect||o,s.animated&&s.toRect||i,a),E=a?"top":"left",D=Y(s,"top","top")||Y(z,"top","top"),S=D?D.scrollTop:void 0;if(ht!==s&&(m=i[E],yt=!1,wt=!w&&e.invertSwap||y),0!==(v=function(t,e,n,o,i,r,a,l){var s=o?t.clientY:t.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,h=!1;if(!a)if(l&&pt<c*i){if(!yt&&(1===ft?u+c*r/2<s:s<d-c*r/2)&&(yt=!0),yt)h=!0;else if(1===ft?s<u+pt:d-pt<s)return-ft}else if(u+c*(1-i)/2<s&&s<d-c*(1-i)/2)return function(t){return F(z)<F(t)?1:-1}(e);if((h=h||a)&&(s<u+c*r/2||d-c*r/2<s))return u+c/2<s?1:-1;return 0}(n,s,i,a,w?1:e.swapThreshold,null==e.invertedSwapThreshold?e.swapThreshold:e.invertedSwapThreshold,wt,ht===s)))for(var _=F(z);_-=v,(b=G.children[_])&&("none"===R(b,"display")||b===U););if(0===v||b===s)return N(!1);ft=v;var C=(ht=s).nextElementSibling,T=!1,x=Xt(q,l,z,o,s,i,n,T=1===v);if(!1!==x)return 1!==x&&-1!==x||(T=1===x),Dt=!0,setTimeout(Bt,30),O(),T&&!C?l.appendChild(z):s.parentNode.insertBefore(z,T?C:s),D&&L(D,0,S-D.scrollTop),G=z.parentNode,void 0===m||wt||(pt=Math.abs(m-X(s)[E])),A(),N(!0)}if(l.contains(z))return N(!1)}return!1}function M(t,e){K(t,f,I({evt:n,isOwner:u,axis:a?"vertical":"horizontal",revert:r,dragRect:o,targetRect:i,canSort:d,fromSortable:h,target:s,completed:N,onMove:function(t,e){return Xt(q,l,z,o,t,X(t),n,e)},changed:A},e))}function O(){M("dragOverAnimationCapture"),f.captureAnimationState(),f!==h&&h.captureAnimationState()}function N(t){return M("dragOverCompleted",{insertion:t}),t&&(u?c._hideClone():c._showClone(f),f!==h&&(k(z,it?it.options.ghostClass:c.options.ghostClass,!1),k(z,e.ghostClass,!0)),it!==f&&f!==Rt.active?it=f:f===Rt.active&&it&&(it=null),h===f&&(f._ignoreWhileAnimating=s),f.animateAll(function(){M("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(s===z&&!z.animated||s===l&&!s.animated)&&(ht=null),e.dragoverBubble||n.rootEl||s===document||(z.parentNode[j]._isOutsideThisEl(n.target),t||Pt(n)),!e.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),p=!0}function A(){tt=F(z),nt=F(z,e.draggable),W({sortable:f,name:"change",toEl:l,newIndex:tt,newDraggableIndex:nt,originalEvent:n})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){s(document,"mousemove",this._onTouchMove),s(document,"touchmove",this._onTouchMove),s(document,"pointermove",this._onTouchMove),s(document,"dragover",Pt),s(document,"mousemove",Pt),s(document,"touchmove",Pt)},_offUpEvents:function(){var t=this.el.ownerDocument;s(t,"mouseup",this._onDrop),s(t,"touchend",this._onDrop),s(t,"pointerup",this._onDrop),s(t,"touchcancel",this._onDrop),s(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;tt=F(z),nt=F(z,n.draggable),K("drop",this,{evt:t}),G=z&&z.parentNode,tt=F(z),nt=F(z,n.draggable),Rt.eventCanceled||(yt=wt=vt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Lt(this.cloneId),Lt(this._dragStartId),this.nativeDraggable&&(s(document,"drop",this),s(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),u&&R(document.body,"user-select",""),R(z,"transform",""),t&&(dt&&(t.cancelable&&t.preventDefault(),n.dropBubble||t.stopPropagation()),U&&U.parentNode&&U.parentNode.removeChild(U),(q===G||it&&"clone"!==it.lastPutMode)&&Q&&Q.parentNode&&Q.parentNode.removeChild(Q),z&&(this.nativeDraggable&&s(z,"dragend",this),Yt(z),z.style["will-change"]="",dt&&!vt&&k(z,it?it.options.ghostClass:this.options.ghostClass,!1),k(z,this.options.chosenClass,!1),W({sortable:this,name:"unchoose",toEl:G,newIndex:null,newDraggableIndex:null,originalEvent:t}
vendor: 4,187 bytes, line 7632
7632),q!==G?(0<=tt&&(W({rootEl:G,name:"add",toEl:G,fromEl:q,originalEvent:t}),W({sortable:this,name:"remove",toEl:G,originalEvent:t}),W({rootEl:G,name:"sort",toEl:G,fromEl:q,originalEvent:t}),W({sortable:this,name:"sort",toEl:G,originalEvent:t})),it&&it.save()):tt!==J&&0<=tt&&(W({sortable:this,name:"update",toEl:G,originalEvent:t}),W({sortable:this,name:"sort",toEl:G,originalEvent:t})),Rt.active&&(null!=tt&&-1!==tt||(tt=J,nt=et),W({sortable:this,name:"end",toEl:G,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){K("nulling",this),q=z=G=U=V=Q=Z=$=rt=at=dt=tt=nt=J=et=ht=ft=it=ot=Rt.dragged=Rt.ghost=Rt.clone=Rt.active=null,St.forEach(function(t){t.checked=!0}),St.length=lt=st=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":z&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)P(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||Ft(t));return e},sort:function(t,e){var o={},i=this.el;this.toArray().forEach(function(t,e){var n=i.children[e];P(n,this.options.draggable,i,!1)&&(o[t]=n)},this),e&&this.captureAnimationState(),t.forEach(function(t){o[t]&&(i.removeChild(o[t]),i.appendChild(o[t]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return P(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=O.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&Nt(n)},destroy:function(){K("destroy",this);var t=this.el;t[j]=null,s(t,"mousedown",this._onTapStart),s(t,"touchstart",this._onTapStart),s(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(s(t,"dragover",this),s(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),bt.splice(bt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!$){if(K("hideClone",this),Rt.eventCanceled)return;R(Q,"display","none"),this.options.removeCloneOnHide&&Q.parentNode&&Q.parentNode.removeChild(Q),$=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if($){if(K("showClone",this),Rt.eventCanceled)return;z.parentNode!=q||this.options.group.revertClone?V?q.insertBefore(Q,V):q.appendChild(Q):q.insertBefore(Q,z),this.options.group.revertClone&&this.animate(z,Q),R(Q,"display",""),$=!1}}else this._hideClone()}},_t&&d(document,"touchmove",function(t){(Rt.active||vt)&&t.cancelable&&t.preventDefault()}),Rt.utils={on:d,off:s,css:R,find:g,is:function(t,e){return!!P(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:D,closest:P,toggleClass:k,clone:S,index:F,nextTick:Ht,cancelNextTick:Lt,detectDirection:Ot,getChild:m},Rt.get=function(t){return t[j]},Rt.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Rt.utils=I({},Rt.utils,t.utils)),O.mount(t)})},Rt.create=function(t,e){return new Rt(t,e)};var jt,Kt,Wt,zt,Gt,Ut,qt=[],Vt=!(Rt.version="1.13.0");function Zt(){qt.forEach(function(t){clearInterval(t.pid)}),qt=[]}function Qt(){clearInterval(Ut)}function $t(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var s=n||i;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}}var Jt,te=D(function(n,t,e,o){if(t.scroll){var i,r=(n.touches?n.touches[0]:n).clientX,a=(n.touches?n.touches[0]:n).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=A(),u=!1;Kt!==e&&(Kt=e,Zt(),jt=t.scroll,i=t.scrollFn,!0===jt&&(jt=H(e,!0))
vendor: 5,137 bytes, line 7632
7632);var d=0,h=jt;do{var f=h,p=X(f),g=p.top,v=p.bottom,m=p.left,b=p.right,y=p.width,w=p.height,E=void 0,D=void 0,S=f.scrollWidth,_=f.scrollHeight,C=R(f),T=f.scrollLeft,x=f.scrollTop;D=f===c?(E=y<S&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),w<_&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(E=y<S&&("auto"===C.overflowX||"scroll"===C.overflowX),w<_&&("auto"===C.overflowY||"scroll"===C.overflowY));var M=E&&(Math.abs(b-r)<=l&&T+y<S)-(Math.abs(m-r)<=l&&!!T),O=D&&(Math.abs(v-a)<=l&&x+w<_)-(Math.abs(g-a)<=l&&!!x);if(!qt[d])for(var N=0;N<=d;N++)qt[N]||(qt[N]={});qt[d].vx==M&&qt[d].vy==O&&qt[d].el===f||(qt[d].el=f,qt[d].vx=M,qt[d].vy=O,clearInterval(qt[d].pid),0==M&&0==O||(u=!0,qt[d].pid=setInterval(function(){o&&0===this.layer&&Rt.active._onTouchMove(Gt);var t=qt[this.layer].vy?qt[this.layer].vy*s:0,e=qt[this.layer].vx?qt[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(Rt.dragged.parentNode[j],e,t,n,Gt,qt[this.layer].el)||L(qt[this.layer].el,e,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==c&&(h=H(h,!1)));Vt=u}},30);function ee(){}function ne(){}ee.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=m(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:$t},a(ee,{pluginName:"revertOnSpill"}),ne.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:$t},a(ne,{pluginName:"removeOnSpill"});var oe,ie,re,ae,le,se=[],ce=[],ue=!1,de=!1,he=!1;function fe(o,i){ce.forEach(function(t,e){var n=i.children[t.sortableIndex+(o?Number(e):0)];n?i.insertBefore(t,n):i.appendChild(t)})}function pe(){se.forEach(function(t){t!==re&&t.parentNode&&t.parentNode.removeChild(t)})}return Rt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?d(document,"dragover",this._handleAutoScroll):this.options.supportPointer?d(document,"pointermove",this._handleFallbackAutoScroll):e.touches?d(document,"touchmove",this._handleFallbackAutoScroll):d(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?s(document,"dragover",this._handleAutoScroll):(s(document,"pointermove",this._handleFallbackAutoScroll),s(document,"touchmove",this._handleFallbackAutoScroll),s(document,"mousemove",this._handleFallbackAutoScroll)),Qt(),Zt(),clearTimeout(f),f=void 0},nulling:function(){Gt=Kt=jt=Vt=Ut=Wt=zt=null,qt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(e,n){var o=this,i=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,t=document.elementFromPoint(i,r);if(Gt=e,n||E||w||u){te(e,this.options,t,n);var a=H(t,!0);!Vt||Ut&&i===Wt&&r===zt||(Ut&&Qt(),Ut=setInterval(function(){var t=H(document.elementFromPoint(i,r),!0);t!==a&&(a=t,Zt()),te(e,o.options,t,n)},10),Wt=i,zt=r)}else{if(!this.options.bubbleScroll||H(t,!0)===A())return void Zt();te(e,this.options,H(t,!1),!1)}}},a(t,{pluginName:"scroll",initializeByDefault:!0})}),Rt.mount(ne,ee),Rt.mount(new function(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){var e=t.dragEl;Jt=e},dragOverValid:function(t){var e=t.completed,n=t.target,o=t.onMove,i=t.activeSortable,r=t.changed,a=t.cancel;if(i.options.swap){var l=this.sortable.el,s=this.options;if(n&&n!==l){var c=Jt;Jt=!1!==o(n)?(k(n,s.swapClass,!0),n):null,c&&c!==Jt&&k(c,s.swapClass,!1)}r(),e(!0),a()}},drop:function(t){var e=t.activeSortable,n=t.putSortable,o=t.dragEl,i=n||this.sortable,r=this.options;Jt&&k(Jt,r.swapClass,!1),Jt&&(r.swap||n&&n.options.swap)&&o!==Jt&&(i.captureAnimationState(),i!==e&&e.captureAnimationState(),function(t,e){var n,o,i=t.parentNode,r=e.parentNode;if(!i||!r||i.isEqualNode(e)||r.isEqualNode(t))return;n=F(t),o=F(e),i.isEqualNode(r)&&n<o&&o++;i.insertBefore(e,i.children[n]),r.insertBefore(t,r.children[o])}(o,Jt),i.animateAll(),i!==e&&e.animateAll())},nulling:function(){Jt=null}},a(t,{pluginName:"swap",eventProperties:function(){return{swapItem:Jt}}})}),Rt.mount(new function(){function t(o){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));o.options.supportPointer?d(document,"pointerup",this._deselectMultiDrag):(d(document,"mouseup",this._deselectMultiDrag),d(document,"touchend",this._deselectMultiDrag)),d(document,"keydown",this._checkKeyDown),d(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,
vendor: 4,611 bytes, line 7632
7632setData:function(t,e){var n="";se.length&&ie===o?se.forEach(function(t,e){n+=(e?", ":"")+t.textContent}):n=e.textContent,t.setData("Text",n)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var e=t.dragEl;re=e},delayEnded:function(){this.isMultiDrag=~se.indexOf(re)},setupClone:function(t){var e=t.sortable,n=t.cancel;if(this.isMultiDrag){for(var o=0;o<se.length;o++)ce.push(S(se[o])),ce[o].sortableIndex=se[o].sortableIndex,ce[o].draggable=!1,ce[o].style["will-change"]="",k(ce[o],this.options.selectedClass,!1),se[o]===re&&k(ce[o],this.options.chosenClass,!1);e._hideClone(),n()}},clone:function(t){var e=t.sortable,n=t.rootEl,o=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||se.length&&ie===e&&(fe(!0,n),o("clone"),i()))},showClone:function(t){var e=t.cloneNowShown,n=t.rootEl,o=t.cancel;this.isMultiDrag&&(fe(!1,n),ce.forEach(function(t){R(t,"display","")}),e(),le=!1,o())},hideClone:function(t){var e=this,n=(t.sortable,t.cloneNowHidden),o=t.cancel;this.isMultiDrag&&(ce.forEach(function(t){R(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)}),n(),le=!0,o())},dragStartGlobal:function(t){t.sortable;!this.isMultiDrag&&ie&&ie.multiDrag._deselectMultiDrag(),se.forEach(function(t){t.sortableIndex=F(t)}),se=se.sort(function(t,e){return t.sortableIndex-e.sortableIndex}),he=!0},dragStarted:function(t){var e=this,n=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){se.forEach(function(t){t!==re&&R(t,"position","absolute")});var o=X(re,!1,!0,!0);se.forEach(function(t){t!==re&&_(t,o)}),ue=de=!0}n.animateAll(function(){ue=de=!1,e.options.animation&&se.forEach(function(t){C(t)}),e.options.sort&&pe()})}},dragOver:function(t){var e=t.target,n=t.completed,o=t.cancel;de&&~se.indexOf(e)&&(n(!1),o())},revert:function(t){var e=t.fromSortable,n=t.rootEl,o=t.sortable,i=t.dragRect;1<se.length&&(se.forEach(function(t){o.addAnimationState({target:t,rect:de?X(t):i}),C(t),t.fromRect=i,e.removeAnimationState(t)}),de=!1,function(o,i){se.forEach(function(t,e){var n=i.children[t.sortableIndex+(o?Number(e):0)];n?i.insertBefore(t,n):i.appendChild(t)})}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(t){var e=t.sortable,n=t.isOwner,o=t.insertion,i=t.activeSortable,r=t.parentEl,a=t.putSortable,l=this.options;if(o){if(n&&i._hideClone(),ue=!1,l.animation&&1<se.length&&(de||!n&&!i.options.sort&&!a)){var s=X(re,!1,!0,!0);se.forEach(function(t){t!==re&&(_(t,s),r.appendChild(t))}),de=!0}if(!n)if(de||pe(),1<se.length){var c=le;i._showClone(e),i.options.animation&&!le&&c&&ce.forEach(function(t){i.addAnimationState({target:t,rect:ae}),t.fromRect=ae,t.thisAnimationDuration=null})}else i._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,o=t.activeSortable;if(se.forEach(function(t){t.thisAnimationDuration=null}),o.options.animation&&!n&&o.multiDrag.isMultiDrag){ae=a({},e);var i=v(re,!0);ae.top-=i.f,ae.left-=i.e}},dragOverAnimationComplete:function(){de&&(de=!1,pe())},drop:function(t){var e=t.originalEvent,n=t.rootEl,o=t.parentEl,i=t.sortable,r=t.dispatchSortableEvent,a=t.oldIndex,l=t.putSortable,s=l||this.sortable;if(e){var c=this.options,u=o.children;if(!he)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),k(re,c.selectedClass,!~se.indexOf(re)),~se.indexOf(re))se.splice(se.indexOf(re),1),oe=null,N({sortable:i,rootEl:n,name:"deselect",targetEl:re,originalEvt:e});else{if(se.push(re),N({sortable:i,rootEl:n,name:"select",targetEl:re,originalEvt:e}),e.shiftKey&&oe&&i.el.contains(oe)){var d,h,f=F(oe),p=F(re);if(~f&&~p&&f!==p)for(d=f<p?(h=f,p):(h=p,f+1);h<d;h++)~se.indexOf(u[h])||(k(u[h],c.selectedClass,!0),se.push(u[h]),N({sortable:i,rootEl:n,name:"select",targetEl:u[h],originalEvt:e}))}else oe=re;ie=s}if(he&&this.isMultiDrag){if((o[j].options.sort||o!==n)&&1<se.length){var g=X(re),v=F(re,":not(."+this.options.selectedClass+")");if(!ue&&c.animation&&(re.thisAnimationDuration=null),s.captureAnimationState(),!ue&&(c.animation&&(re.fromRect=g,se.forEach(function(t){if(t.thisAnimationDuration=null,t!==re){var e=de?X(t):g;t.fromRect=e,s.addAnimationState({target:t,rect:e})}})),pe(),se.forEach(function(t){u[v]?o.insertBefore(t,u[v]):o.appendChild(t),v++}),a===F(re))){var m=!1;se.forEach(function(t){t.sortableIndex===F(t)||(m=!0)}),m&&r("update")}se.forEach(function(t){C(t)}),s.animateAll()}ie=s}(n===o||l&&"clone"!==l.lastPutMode)&&ce.forEach(function(t){t.parentNode&&t.parentNode.removeChild(t)})}},nullingGlobal:function(){this.isMultiDrag=he=!1,ce.length=0}
vendor: 1,996 bytes, lines 7632-7645
7632,destroyGlobal:function(){this._deselectMultiDrag(),s(document,"pointerup",this._deselectMultiDrag),s(document,"mouseup",this._deselectMultiDrag),s(document,"touchend",this._deselectMultiDrag),s(document,"keydown",this._checkKeyDown),s(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==he&&he||ie!==this.sortable||t&&P(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;se.length;){var e=se[0];k(e,this.options.selectedClass,!1),se.shift(),N({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvt:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},a(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[j];e&&e.options.multiDrag&&!~se.indexOf(t)&&(ie&&ie!==e&&(ie.multiDrag._deselectMultiDrag(),ie=e),k(t,e.options.selectedClass,!0),se.push(t))},deselect:function(t){var e=t.parentNode[j],n=se.indexOf(t);e&&e.options.multiDrag&&~n&&(k(t,e.options.selectedClass,!1),se.splice(n,1))}},eventProperties:function(){var n=this,o=[],i=[];return se.forEach(function(t){var e;o.push({multiDragElement:t,index:t.sortableIndex}),e=de&&t!==re?-1:de?F(t,":not(."+n.options.selectedClass+")"):F(t),i.push({multiDragElement:t,index:e})}),{items:e(se),clones:[].concat(ce),oldIndicies:o,newIndicies:i}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":1<t.length&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}),Rt});;
7633/* AUTOGENERATED: chosen.jquery.js */
7634/*!
7635Chosen, a Select Box Enhancer for jQuery and Prototype
7636by Patrick Filler for Harvest, http://getharvest.com
7637
7638Version 1.8.7
7639Full source at https://github.com/harvesthq/chosen
7640Copyright (c) 2011-2018 Harvest http://getharvest.com
7641
7642MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
7643This file is generated by `grunt build`, do not edit it by hand.
7644*/
7645
vendor: 47,116 bytes, lines 7646-8992
7646(function() {
7647  var $, AbstractChosen, Chosen, SelectParser,
7648    bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
7649    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
7650    hasProp = {}.hasOwnProperty;
7651
7652  SelectParser = (function() {
7653    function SelectParser() {
7654      this.options_index = 0;
7655      this.parsed = [];
7656    }
7657
7658    SelectParser.prototype.add_node = function(child) {
7659      if (child.nodeName.toUpperCase() === "OPTGROUP") {
7660        return this.add_group(child);
7661      } else {
7662        return this.add_option(child);
7663      }
7664    };
7665
7666    SelectParser.prototype.add_group = function(group) {
7667      var group_position, i, len, option, ref, results1;
7668      group_position = this.parsed.length;
7669      this.parsed.push({
7670        array_index: group_position,
7671        group: true,
7672        label: group.label,
7673        title: group.title ? group.title : void 0,
7674        children: 0,
7675        disabled: group.disabled,
7676        classes: group.className
7677      });
7678      ref = group.childNodes;
7679      results1 = [];
7680      for (i = 0, len = ref.length; i < len; i++) {
7681        option = ref[i];
7682        results1.push(this.add_option(option, group_position, group.disabled));
7683      }
7684      return results1;
7685    };
7686
7687    SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
7688      if (option.nodeName.toUpperCase() === "OPTION") {
7689        if (option.text !== "") {
7690          if (group_position != null) {
7691            this.parsed[group_position].children += 1;
7692          }
7693          this.parsed.push({
7694            array_index: this.parsed.length,
7695            options_index: this.options_index,
7696            value: option.value,
7697            text: option.text,
7698            html: option.innerHTML,
7699            title: option.title ? option.title : void 0,
7700            selected: option.selected,
7701            disabled: group_disabled === true ? group_disabled : option.disabled,
7702            group_array_index: group_position,
7703            group_label: group_position != null ? this.parsed[group_position].label : null,
7704            classes: option.className,
7705            style: option.style.cssText
7706          });
7707        } else {
7708          this.parsed.push({
7709            array_index: this.parsed.length,
7710            options_index: this.options_index,
7711            empty: true
7712          });
7713        }
7714        return this.options_index += 1;
7715      }
7716    };
7717
7718    return SelectParser;
7719
7720  })();
7721
7722  SelectParser.select_to_array = function(select) {
7723    var child, i, len, parser, ref;
7724    parser = new SelectParser();
7725    ref = select.childNodes;
7726    for (i = 0, len = ref.length; i < len; i++) {
7727      child = ref[i];
7728      parser.add_node(child);
7729    }
7730    return parser.parsed;
7731  };
7732
7733  AbstractChosen = (function() {
7734    function AbstractChosen(form_field, options1) {
7735      this.form_field = form_field;
7736      this.options = options1 != null ? options1 : {};
7737      this.label_click_handler = bind(this.label_click_handler, this);
7738      if (!AbstractChosen.browser_is_supported()) {
7739        return;
7740      }
7741      this.is_multiple = this.form_field.multiple;
7742      this.set_default_text();
7743      this.set_default_values();
7744      this.setup();
7745      this.set_up_html();
7746      this.register_observers();
7747      this.on_ready();
7748    }
7749
7750    AbstractChosen.prototype.set_default_values = function() {
7751      this.click_test_action = (function(_this) {
7752        return function(evt) {
7753          return _this.test_active_click(evt);
7754        };
7755      })(this);
7756      this.activate_action = (function(_this) {
7757        return function(evt) {
7758          return _this.activate_field(evt);
7759        };
7760      })(this);
7761      this.active_field = false;
7762      this.mouse_on_container = false;
7763      this.results_showing = false;
7764      this.result_highlighted = null;
7765      this.is_rtl = this.options.rtl || /\bchosen-rtl\b/.test(this.form_field.className);
7766      this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
7767      this.disable_search_threshold = this.options.disable_search_threshold || 0;
7768      this.disable_search = this.options.disable_search || false;
7769      this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
7770      this.group_search = this.options.group_search != null ? this.options.group_search : true;
7771      this.search_contains = this.options.search_contains || false;
7772      this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
7773      this.max_selected_options = this.options.max_selected_options || Infinity;
7774      this.inherit_select_classes = this.options.inherit_select_classes || false;
7775      this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
7776      this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
7777      this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
7778      this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
7779      this.case_sensitive_search = this.options.case_sensitive_search || false;
7780      return this.hide_results_on_select = this.options.hide_results_on_select != null ? this.options.hide_results_on_select : true;
7781    };
7782
7783    AbstractChosen.prototype.set_default_text = function() {
7784      if (this.form_field.getAttribute("data-placeholder")) {
7785        this.default_text = this.form_field.getAttribute("data-placeholder");
7786      } else if (this.is_multiple) {
7787        this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
7788      } else {
7789        this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
7790      }
7791      this.default_text = this.escape_html(this.default_text);
7792      return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
7793    };
7794
7795    AbstractChosen.prototype.choice_label = function(item) {
7796      if (this.include_group_label_in_selected && (item.group_label != null)) {
7797        return "<b class='group-name'>" + (this.escape_html(item.group_label)) + "</b>" + item.html;
7798      } else {
7799        return item.html;
7800      }
7801    };
7802
7803    AbstractChosen.prototype.mouse_enter = function() {
7804      return this.mouse_on_container = true;
7805    };
7806
7807    AbstractChosen.prototype.mouse_leave = function() {
7808      return this.mouse_on_container = false;
7809    };
7810
7811    AbstractChosen.prototype.input_focus = function(evt) {
7812      if (this.is_multiple) {
7813        if (!this.active_field) {
7814          return setTimeout(((function(_this) {
7815            return function() {
7816              return _this.container_mousedown();
7817            };
7818          })(this)), 50);
7819        }
7820      } else {
7821        if (!this.active_field) {
7822          return this.activate_field();
7823        }
7824      }
7825    };
7826
7827    AbstractChosen.prototype.input_blur = function(evt) {
7828      if (!this.mouse_on_container) {
7829        this.active_field = false;
7830        return setTimeout(((function(_this) {
7831          return function() {
7832            return _this.blur_test();
7833          };
7834        })(this)), 100);
7835      }
7836    };
7837
7838    AbstractChosen.prototype.label_click_handler = function(evt) {
7839      if (this.is_multiple) {
7840        return this.container_mousedown(evt);
7841      } else {
7842        return this.activate_field();
7843      }
7844    };
7845
7846    AbstractChosen.prototype.results_option_build = function(options) {
7847      var content, data, data_content, i, len, ref, shown_results;
7848      content = '';
7849      shown_results = 0;
7850      ref = this.results_data;
7851      for (i = 0, len = ref.length; i < len; i++) {
7852        data = ref[i];
7853        data_content = '';
7854        if (data.group) {
7855          data_content = this.result_add_group(data);
7856        } else {
7857          data_content = this.result_add_option(data);
7858        }
7859        if (data_content !== '') {
7860          shown_results++;
7861          content += data_content;
7862        }
7863        if (options != null ? options.first : void 0) {
7864          if (data.selected && this.is_multiple) {
7865            this.choice_build(data);
7866          } else if (data.selected && !this.is_multiple) {
7867            this.single_set_selected_text(this.choice_label(data));
7868          }
7869        }
7870        if (shown_results >= this.max_shown_results) {
7871          break;
7872        }
7873      }
7874      return content;
7875    };
7876
7877    AbstractChosen.prototype.result_add_option = function(option) {
7878      var classes, option_el;
7879      if (!option.search_match) {
7880        return '';
7881      }
7882      if (!this.include_option_in_results(option)) {
7883        return '';
7884      }
7885      classes = [];
7886      if (!option.disabled && !(option.selected && this.is_multiple)) {
7887        classes.push("active-result");
7888      }
7889      if (option.disabled && !(option.selected && this.is_multiple)) {
7890        classes.push("disabled-result");
7891      }
7892      if (option.selected) {
7893        classes.push("result-selected");
7894      }
7895      if (option.group_array_index != null) {
7896        classes.push("group-option");
7897      }
7898      if (option.classes !== "") {
7899        classes.push(option.classes);
7900      }
7901      option_el = document.createElement("li");
7902      option_el.className = classes.join(" ");
7903      if (option.style) {
7904        option_el.style.cssText = option.style;
7905      }
7906      option_el.setAttribute("data-option-array-index", option.array_index);
7907      option_el.innerHTML = option.highlighted_html || option.html;
7908      if (option.title) {
7909        option_el.title = option.title;
7910      }
7911      return this.outerHTML(option_el);
7912    };
7913
7914    AbstractChosen.prototype.result_add_group = function(group) {
7915      var classes, group_el;
7916      if (!(group.search_match || group.group_match)) {
7917        return '';
7918      }
7919      if (!(group.active_options > 0)) {
7920        return '';
7921      }
7922      classes = [];
7923      classes.push("group-result");
7924      if (group.classes) {
7925        classes.push(group.classes);
7926      }
7927      group_el = document.createElement("li");
7928      group_el.className = classes.join(" ");
7929      group_el.innerHTML = group.highlighted_html || this.escape_html(group.label);
7930      if (group.title) {
7931        group_el.title = group.title;
7932      }
7933      return this.outerHTML(group_el);
7934    };
7935
7936    AbstractChosen.prototype.results_update_field = function() {
7937      this.set_default_text();
7938      if (!this.is_multiple) {
7939        this.results_reset_cleanup();
7940      }
7941      this.result_clear_highlight();
7942      this.results_build();
7943      if (this.results_showing) {
7944        return this.winnow_results();
7945      }
7946    };
7947
7948    AbstractChosen.prototype.reset_single_select_options = function() {
7949      var i, len, ref, result, results1;
7950      ref = this.results_data;
7951      results1 = [];
7952      for (i = 0, len = ref.length; i < len; i++) {
7953        result = ref[i];
7954        if (result.selected) {
7955          results1.push(result.selected = false);
7956        } else {
7957          results1.push(void 0);
7958        }
7959      }
7960      return results1;
7961    };
7962
7963    AbstractChosen.prototype.results_toggle = function() {
7964      if (this.results_showing) {
7965        return this.results_hide();
7966      } else {
7967        return this.results_show();
7968      }
7969    };
7970
7971    AbstractChosen.prototype.results_search = function(evt) {
7972      if (this.results_showing) {
7973        return this.winnow_results();
7974      } else {
7975        return this.results_show();
7976      }
7977    };
7978
7979    AbstractChosen.prototype.winnow_results = function(options) {
7980      var escapedQuery, fix, i, len, option, prefix, query, ref, regex, results, results_group, search_match, startpos, suffix, text;
7981      this.no_results_clear();
7982      results = 0;
7983      query = this.get_search_text();
7984      escapedQuery = query.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
7985      regex = this.get_search_regex(escapedQuery);
7986      ref = this.results_data;
7987      for (i = 0, len = ref.length; i < len; i++) {
7988        option = ref[i];
7989        option.search_match = false;
7990        results_group = null;
7991        search_match = null;
7992        option.highlighted_html = '';
7993        if (this.include_option_in_results(option)) {
7994          if (option.group) {
7995            option.group_match = false;
7996            option.active_options = 0;
7997          }
7998          if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
7999            results_group = this.results_data[option.group_array_index];
8000            if (results_group.active_options === 0 && results_group.search_match) {
8001              results += 1;
8002            }
8003            results_group.active_options += 1;
8004          }
8005          text = option.group ? option.label : option.text;
8006          if (!(option.group && !this.group_search)) {
8007            search_match = this.search_string_match(text, regex);
8008            option.search_match = search_match != null;
8009            if (option.search_match && !option.group) {
8010              results += 1;
8011            }
8012            if (option.search_match) {
8013              if (query.length) {
8014                startpos = search_match.index;
8015                prefix = text.slice(0, startpos);
8016                fix = text.slice(startpos, startpos + query.length);
8017                suffix = text.slice(startpos + query.length);
8018                option.highlighted_html = (this.escape_html(prefix)) + "<em>" + (this.escape_html(fix)) + "</em>" + (this.escape_html(suffix));
8019              }
8020              if (results_group != null) {
8021                results_group.group_match = true;
8022              }
8023            } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
8024              option.search_match = true;
8025            }
8026          }
8027        }
8028      }
8029      this.result_clear_highlight();
8030      if (results < 1 && query.length) {
8031        this.update_results_content("");
8032        return this.no_results(query);
8033      } else {
8034        this.update_results_content(this.results_option_build());
8035        if (!(options != null ? options.skip_highlight : void 0)) {
8036          return this.winnow_results_set_highlight();
8037        }
8038      }
8039    };
8040
8041    AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
8042      var regex_flag, regex_string;
8043      regex_string = this.search_contains ? escaped_search_string : "(^|\\s|\\b)" + escaped_search_string + "[^\\s]*";
8044      if (!(this.enable_split_word_search || this.search_contains)) {
8045        regex_string = "^" + regex_string;
8046      }
8047      regex_flag = this.case_sensitive_search ? "" : "i";
8048      return new RegExp(regex_string, regex_flag);
8049    };
8050
8051    AbstractChosen.prototype.search_string_match = function(search_string, regex) {
8052      var match;
8053      match = regex.exec(search_string);
8054      if (!this.search_contains && (match != null ? match[1] : void 0)) {
8055        match.index += 1;
8056      }
8057      return match;
8058    };
8059
8060    AbstractChosen.prototype.choices_count = function() {
8061      var i, len, option, ref;
8062      if (this.selected_option_count != null) {
8063        return this.selected_option_count;
8064      }
8065      this.selected_option_count = 0;
8066      ref = this.form_field.options;
8067      for (i = 0, len = ref.length; i < len; i++) {
8068        option = ref[i];
8069        if (option.selected) {
8070          this.selected_option_count += 1;
8071        }
8072      }
8073      return this.selected_option_count;
8074    };
8075
8076    AbstractChosen.prototype.choices_click = function(evt) {
8077      evt.preventDefault();
8078      this.activate_field();
8079      if (!(this.results_showing || this.is_disabled)) {
8080        return this.results_show();
8081      }
8082    };
8083
8084    AbstractChosen.prototype.keydown_checker = function(evt) {
8085      var ref, stroke;
8086      stroke = (ref = evt.which) != null ? ref : evt.keyCode;
8087      this.search_field_scale();
8088      if (stroke !== 8 && this.pending_backstroke) {
8089        this.clear_backstroke();
8090      }
8091      switch (stroke) {
8092        case 8:
8093          this.backstroke_length = this.get_search_field_value().length;
8094          break;
8095        case 9:
8096          if (this.results_showing && !this.is_multiple) {
8097            this.result_select(evt);
8098          }
8099          this.mouse_on_container = false;
8100          break;
8101        case 13:
8102          if (this.results_showing) {
8103            evt.preventDefault();
8104          }
8105          break;
8106        case 27:
8107          if (this.results_showing) {
8108            evt.preventDefault();
8109          }
8110          break;
8111        case 32:
8112          if (this.disable_search) {
8113            evt.preventDefault();
8114          }
8115          break;
8116        case 38:
8117          evt.preventDefault();
8118          this.keyup_arrow();
8119          break;
8120        case 40:
8121          evt.preventDefault();
8122          this.keydown_arrow();
8123          break;
8124      }
8125    };
8126
8127    AbstractChosen.prototype.keyup_checker = function(evt) {
8128      var ref, stroke;
8129      stroke = (ref = evt.which) != null ? ref : evt.keyCode;
8130      this.search_field_scale();
8131      switch (stroke) {
8132        case 8:
8133          if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
8134            this.keydown_backstroke();
8135          } else if (!this.pending_backstroke) {
8136            this.result_clear_highlight();
8137            this.results_search();
8138          }
8139          break;
8140        case 13:
8141          evt.preventDefault();
8142          if (this.results_showing) {
8143            this.result_select(evt);
8144          }
8145          break;
8146        case 27:
8147          if (this.results_showing) {
8148            this.results_hide();
8149          }
8150          break;
8151        case 9:
8152        case 16:
8153        case 17:
8154        case 18:
8155        case 38:
8156        case 40:
8157        case 91:
8158          break;
8159        default:
8160          this.results_search();
8161          break;
8162      }
8163    };
8164
8165    AbstractChosen.prototype.clipboard_event_checker = function(evt) {
8166      if (this.is_disabled) {
8167        return;
8168      }
8169      return setTimeout(((function(_this) {
8170        return function() {
8171          return _this.results_search();
8172        };
8173      })(this)), 50);
8174    };
8175
8176    AbstractChosen.prototype.container_width = function() {
8177      if (this.options.width != null) {
8178        return this.options.width;
8179      } else {
8180        return this.form_field.offsetWidth + "px";
8181      }
8182    };
8183
8184    AbstractChosen.prototype.include_option_in_results = function(option) {
8185      if (this.is_multiple && (!this.display_selected_options && option.selected)) {
8186        return false;
8187      }
8188      if (!this.display_disabled_options && option.disabled) {
8189        return false;
8190      }
8191      if (option.empty) {
8192        return false;
8193      }
8194      return true;
8195    };
8196
8197    AbstractChosen.prototype.search_results_touchstart = function(evt) {
8198      this.touch_started = true;
8199      return this.search_results_mouseover(evt);
8200    };
8201
8202    AbstractChosen.prototype.search_results_touchmove = function(evt) {
8203      this.touch_started = false;
8204      return this.search_results_mouseout(evt);
8205    };
8206
8207    AbstractChosen.prototype.search_results_touchend = function(evt) {
8208      if (this.touch_started) {
8209        return this.search_results_mouseup(evt);
8210      }
8211    };
8212
8213    AbstractChosen.prototype.outerHTML = function(element) {
8214      var tmp;
8215      if (element.outerHTML) {
8216        return element.outerHTML;
8217      }
8218      tmp = document.createElement("div");
8219      tmp.appendChild(element);
8220      return tmp.innerHTML;
8221    };
8222
8223    AbstractChosen.prototype.get_single_html = function() {
8224      return "<a class=\"chosen-single chosen-default\">\n  <span>" + this.default_text + "</span>\n  <div><b></b></div>\n</a>\n<div class=\"chosen-drop\">\n  <div class=\"chosen-search\">\n    <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" />\n  </div>\n  <ul class=\"chosen-results\"></ul>\n</div>";
8225    };
8226
8227    AbstractChosen.prototype.get_multi_html = function() {
8228      return "<ul class=\"chosen-choices\">\n  <li class=\"search-field\">\n    <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" value=\"" + this.default_text + "\" />\n  </li>\n</ul>\n<div class=\"chosen-drop\">\n  <ul class=\"chosen-results\"></ul>\n</div>";
8229    };
8230
8231    AbstractChosen.prototype.get_no_results_html = function(terms) {
8232      return "<li class=\"no-results\">\n  " + this.results_none_found + " <span>" + (this.escape_html(terms)) + "</span>\n</li>";
8233    };
8234
8235    AbstractChosen.browser_is_supported = function() {
8236      if ("Microsoft Internet Explorer" === window.navigator.appName) {
8237        return document.documentMode >= 8;
8238      }
8239      if (/iP(od|hone)/i.test(window.navigator.userAgent) || /IEMobile/i.test(window.navigator.userAgent) || /Windows Phone/i.test(window.navigator.userAgent) || /BlackBerry/i.test(window.navigator.userAgent) || /BB10/i.test(window.navigator.userAgent) || /Android.*Mobile/i.test(window.navigator.userAgent)) {
8240        return false;
8241      }
8242      return true;
8243    };
8244
8245    AbstractChosen.default_multiple_text = "Select Some Options";
8246
8247    AbstractChosen.default_single_text = "Select an Option";
8248
8249    AbstractChosen.default_no_result_text = "No results match";
8250
8251    return AbstractChosen;
8252
8253  })();
8254
8255  $ = jQuery;
8256
8257  $.fn.extend({
8258    chosen: function(options) {
8259      if (!AbstractChosen.browser_is_supported()) {
8260        return this;
8261      }
8262      return this.each(function(input_field) {
8263        var $this, chosen;
8264        $this = $(this);
8265        chosen = $this.data('chosen');
8266        if (options === 'destroy') {
8267          if (chosen instanceof Chosen) {
8268            chosen.destroy();
8269          }
8270          return;
8271        }
8272        if (!(chosen instanceof Chosen)) {
8273          $this.data('chosen', new Chosen(this, options));
8274        }
8275      });
8276    }
8277  });
8278
8279  Chosen = (function(superClass) {
8280    extend(Chosen, superClass);
8281
8282    function Chosen() {
8283      return Chosen.__super__.constructor.apply(this, arguments);
8284    }
8285
8286    Chosen.prototype.setup = function() {
8287      this.form_field_jq = $(this.form_field);
8288      return this.current_selectedIndex = this.form_field.selectedIndex;
8289    };
8290
8291    Chosen.prototype.set_up_html = function() {
8292      var container_classes, container_props;
8293      container_classes = ["chosen-container"];
8294      container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
8295      if (this.inherit_select_classes && this.form_field.className) {
8296        container_classes.push(this.form_field.className);
8297      }
8298      if (this.is_rtl) {
8299        container_classes.push("chosen-rtl");
8300      }
8301      container_props = {
8302        'class': container_classes.join(' '),
8303        'title': this.form_field.title
8304      };
8305      if (this.form_field.id.length) {
8306        container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
8307      }
8308      this.container = $("<div />", container_props);
8309      this.container.width(this.container_width());
8310      if (this.is_multiple) {
8311        this.container.html(this.get_multi_html());
8312      } else {
8313        this.container.html(this.get_single_html());
8314      }
8315      this.form_field_jq.hide().after(this.container);
8316      this.dropdown = this.container.find('div.chosen-drop').first();
8317      this.search_field = this.container.find('input').first();
8318      this.search_results = this.container.find('ul.chosen-results').first();
8319      this.search_field_scale();
8320      this.search_no_results = this.container.find('li.no-results').first();
8321      if (this.is_multiple) {
8322        this.search_choices = this.container.find('ul.chosen-choices').first();
8323        this.search_container = this.container.find('li.search-field').first();
8324      } else {
8325        this.search_container = this.container.find('div.chosen-search').first();
8326        this.selected_item = this.container.find('.chosen-single').first();
8327      }
8328      this.results_build();
8329      this.set_tab_index();
8330      return this.set_label_behavior();
8331    };
8332
8333    Chosen.prototype.on_ready = function() {
8334      return this.form_field_jq.trigger("chosen:ready", {
8335        chosen: this
8336      });
8337    };
8338
8339    Chosen.prototype.register_observers = function() {
8340      this.container.on('touchstart.chosen', (function(_this) {
8341        return function(evt) {
8342          _this.container_mousedown(evt);
8343        };
8344      })(this));
8345      this.container.on('touchend.chosen', (function(_this) {
8346        return function(evt) {
8347          _this.container_mouseup(evt);
8348        };
8349      })(this));
8350      this.container.on('mousedown.chosen', (function(_this) {
8351        return function(evt) {
8352          _this.container_mousedown(evt);
8353        };
8354      })(this));
8355      this.container.on('mouseup.chosen', (function(_this) {
8356        return function(evt) {
8357          _this.container_mouseup(evt);
8358        };
8359      })(this));
8360      this.container.on('mouseenter.chosen', (function(_this) {
8361        return function(evt) {
8362          _this.mouse_enter(evt);
8363        };
8364      })(this));
8365      this.container.on('mouseleave.chosen', (function(_this) {
8366        return function(evt) {
8367          _this.mouse_leave(evt);
8368        };
8369      })(this));
8370      this.search_results.on('mouseup.chosen', (function(_this) {
8371        return function(evt) {
8372          _this.search_results_mouseup(evt);
8373        };
8374      })(this));
8375      this.search_results.on('mouseover.chosen', (function(_this) {
8376        return function(evt) {
8377          _this.search_results_mouseover(evt);
8378        };
8379      })(this));
8380      this.search_results.on('mouseout.chosen', (function(_this) {
8381        return function(evt) {
8382          _this.search_results_mouseout(evt);
8383        };
8384      })(this));
8385      this.search_results.on('mousewheel.chosen DOMMouseScroll.chosen', (function(_this) {
8386        return function(evt) {
8387          _this.search_results_mousewheel(evt);
8388        };
8389      })(this));
8390      this.search_results.on('touchstart.chosen', (function(_this) {
8391        return function(evt) {
8392          _this.search_results_touchstart(evt);
8393        };
8394      })(this));
8395      this.search_results.on('touchmove.chosen', (function(_this) {
8396        return function(evt) {
8397          _this.search_results_touchmove(evt);
8398        };
8399      })(this));
8400      this.search_results.on('touchend.chosen', (function(_this) {
8401        return function(evt) {
8402          _this.search_results_touchend(evt);
8403        };
8404      })(this));
8405      this.form_field_jq.on("chosen:updated.chosen", (function(_this) {
8406        return function(evt) {
8407          _this.results_update_field(evt);
8408        };
8409      })(this));
8410      this.form_field_jq.on("chosen:activate.chosen", (function(_this) {
8411        return function(evt) {
8412          _this.activate_field(evt);
8413        };
8414      })(this));
8415      this.form_field_jq.on("chosen:open.chosen", (function(_this) {
8416        return function(evt) {
8417          _this.container_mousedown(evt);
8418        };
8419      })(this));
8420      this.form_field_jq.on("chosen:close.chosen", (function(_this) {
8421        return function(evt) {
8422          _this.close_field(evt);
8423        };
8424      })(this));
8425      this.search_field.on('blur.chosen', (function(_this) {
8426        return function(evt) {
8427          _this.input_blur(evt);
8428        };
8429      })(this));
8430      this.search_field.on('keyup.chosen', (function(_this) {
8431        return function(evt) {
8432          _this.keyup_checker(evt);
8433        };
8434      })(this));
8435      this.search_field.on('keydown.chosen', (function(_this) {
8436        return function(evt) {
8437          _this.keydown_checker(evt);
8438        };
8439      })(this));
8440      this.search_field.on('focus.chosen', (function(_this) {
8441        return function(evt) {
8442          _this.input_focus(evt);
8443        };
8444      })(this));
8445      this.search_field.on('cut.chosen', (function(_this) {
8446        return function(evt) {
8447          _this.clipboard_event_checker(evt);
8448        };
8449      })(this));
8450      this.search_field.on('paste.chosen', (function(_this) {
8451        return function(evt) {
8452          _this.clipboard_event_checker(evt);
8453        };
8454      })(this));
8455      if (this.is_multiple) {
8456        return this.search_choices.on('click.chosen', (function(_this) {
8457          return function(evt) {
8458            _this.choices_click(evt);
8459          };
8460        })(this));
8461      } else {
8462        return this.container.on('click.chosen', function(evt) {
8463          evt.preventDefault();
8464        });
8465      }
8466    };
8467
8468    Chosen.prototype.destroy = function() {
8469      $(this.container[0].ownerDocument).off('click.chosen', this.click_test_action);
8470      if (this.form_field_label.length > 0) {
8471        this.form_field_label.off('click.chosen');
8472      }
8473      if (this.search_field[0].tabIndex) {
8474        this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
8475      }
8476      this.container.remove();
8477      this.form_field_jq.removeData('chosen');
8478      return this.form_field_jq.show();
8479    };
8480
8481    Chosen.prototype.search_field_disabled = function() {
8482      this.is_disabled = this.form_field.disabled || this.form_field_jq.parents('fieldset').is(':disabled');
8483      this.container.toggleClass('chosen-disabled', this.is_disabled);
8484      this.search_field[0].disabled = this.is_disabled;
8485      if (!this.is_multiple) {
8486        this.selected_item.off('focus.chosen', this.activate_field);
8487      }
8488      if (this.is_disabled) {
8489        return this.close_field();
8490      } else if (!this.is_multiple) {
8491        return this.selected_item.on('focus.chosen', this.activate_field);
8492      }
8493    };
8494
8495    Chosen.prototype.container_mousedown = function(evt) {
8496      var ref;
8497      if (this.is_disabled) {
8498        return;
8499      }
8500      if (evt && ((ref = evt.type) === 'mousedown' || ref === 'touchstart') && !this.results_showing) {
8501        evt.preventDefault();
8502      }
8503      if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
8504        if (!this.active_field) {
8505          if (this.is_multiple) {
8506            this.search_field.val("");
8507          }
8508          $(this.container[0].ownerDocument).on('click.chosen', this.click_test_action);
8509          this.results_show();
8510        } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
8511          evt.preventDefault();
8512          this.results_toggle();
8513        }
8514        return this.activate_field();
8515      }
8516    };
8517
8518    Chosen.prototype.container_mouseup = function(evt) {
8519      if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
8520        return this.results_reset(evt);
8521      }
8522    };
8523
8524    Chosen.prototype.search_results_mousewheel = function(evt) {
8525      var delta;
8526      if (evt.originalEvent) {
8527        delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
8528      }
8529      if (delta != null) {
8530        evt.preventDefault();
8531        if (evt.type === 'DOMMouseScroll') {
8532          delta = delta * 40;
8533        }
8534        return this.search_results.scrollTop(delta + this.search_results.scrollTop());
8535      }
8536    };
8537
8538    Chosen.prototype.blur_test = function(evt) {
8539      if (!this.active_field && this.container.hasClass("chosen-container-active")) {
8540        return this.close_field();
8541      }
8542    };
8543
8544    Chosen.prototype.close_field = function() {
8545      $(this.container[0].ownerDocument).off("click.chosen", this.click_test_action);
8546      this.active_field = false;
8547      this.results_hide();
8548      this.container.removeClass("chosen-container-active");
8549      this.clear_backstroke();
8550      this.show_search_field_default();
8551      this.search_field_scale();
8552      return this.search_field.blur();
8553    };
8554
8555    Chosen.prototype.activate_field = function() {
8556      if (this.is_disabled) {
8557        return;
8558      }
8559      this.container.addClass("chosen-container-active");
8560      this.active_field = true;
8561      this.search_field.val(this.search_field.val());
8562      return this.search_field.focus();
8563    };
8564
8565    Chosen.prototype.test_active_click = function(evt) {
8566      var active_container;
8567      active_container = $(evt.target).closest('.chosen-container');
8568      if (active_container.length && this.container[0] === active_container[0]) {
8569        return this.active_field = true;
8570      } else {
8571        return this.close_field();
8572      }
8573    };
8574
8575    Chosen.prototype.results_build = function() {
8576      this.parsing = true;
8577      this.selected_option_count = null;
8578      this.results_data = SelectParser.select_to_array(this.form_field);
8579      if (this.is_multiple) {
8580        this.search_choices.find("li.search-choice").remove();
8581      } else {
8582        this.single_set_selected_text();
8583        if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
8584          this.search_field[0].readOnly = true;
8585          this.container.addClass("chosen-container-single-nosearch");
8586        } else {
8587          this.search_field[0].readOnly = false;
8588          this.container.removeClass("chosen-container-single-nosearch");
8589        }
8590      }
8591      this.update_results_content(this.results_option_build({
8592        first: true
8593      }));
8594      this.search_field_disabled();
8595      this.show_search_field_default();
8596      this.search_field_scale();
8597      return this.parsing = false;
8598    };
8599
8600    Chosen.prototype.result_do_highlight = function(el) {
8601      var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
8602      if (el.length) {
8603        this.result_clear_highlight();
8604        this.result_highlight = el;
8605        this.result_highlight.addClass("highlighted");
8606        maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
8607        visible_top = this.search_results.scrollTop();
8608        visible_bottom = maxHeight + visible_top;
8609        high_top = this.result_highlight.position().top + this.search_results.scrollTop();
8610        high_bottom = high_top + this.result_highlight.outerHeight();
8611        if (high_bottom >= visible_bottom) {
8612          return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
8613        } else if (high_top < visible_top) {
8614          return this.search_results.scrollTop(high_top);
8615        }
8616      }
8617    };
8618
8619    Chosen.prototype.result_clear_highlight = function() {
8620      if (this.result_highlight) {
8621        this.result_highlight.removeClass("highlighted");
8622      }
8623      return this.result_highlight = null;
8624    };
8625
8626    Chosen.prototype.results_show = function() {
8627      if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
8628        this.form_field_jq.trigger("chosen:maxselected", {
8629          chosen: this
8630        });
8631        return false;
8632      }
8633      this.container.addClass("chosen-with-drop");
8634      this.results_showing = true;
8635      this.search_field.focus();
8636      this.search_field.val(this.get_search_field_value());
8637      this.winnow_results();
8638      return this.form_field_jq.trigger("chosen:showing_dropdown", {
8639        chosen: this
8640      });
8641    };
8642
8643    Chosen.prototype.update_results_content = function(content) {
8644      return this.search_results.html(content);
8645    };
8646
8647    Chosen.prototype.results_hide = function() {
8648      if (this.results_showing) {
8649        this.result_clear_highlight();
8650        this.container.removeClass("chosen-with-drop");
8651        this.form_field_jq.trigger("chosen:hiding_dropdown", {
8652          chosen: this
8653        });
8654      }
8655      return this.results_showing = false;
8656    };
8657
8658    Chosen.prototype.set_tab_index = function(el) {
8659      var ti;
8660      if (this.form_field.tabIndex) {
8661        ti = this.form_field.tabIndex;
8662        this.form_field.tabIndex = -1;
8663        return this.search_field[0].tabIndex = ti;
8664      }
8665    };
8666
8667    Chosen.prototype.set_label_behavior = function() {
8668      this.form_field_label = this.form_field_jq.parents("label");
8669      if (!this.form_field_label.length && this.form_field.id.length) {
8670        this.form_field_label = $("label[for='" + this.form_field.id + "']");
8671      }
8672      if (this.form_field_label.length > 0) {
8673        return this.form_field_label.on('click.chosen', this.label_click_handler);
8674      }
8675    };
8676
8677    Chosen.prototype.show_search_field_default = function() {
8678      if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
8679        this.search_field.val(this.default_text);
8680        return this.search_field.addClass("default");
8681      } else {
8682        this.search_field.val("");
8683        return this.search_field.removeClass("default");
8684      }
8685    };
8686
8687    Chosen.prototype.search_results_mouseup = function(evt) {
8688      var target;
8689      target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
8690      if (target.length) {
8691        this.result_highlight = target;
8692        this.result_select(evt);
8693        return this.search_field.focus();
8694      }
8695    };
8696
8697    Chosen.prototype.search_results_mouseover = function(evt) {
8698      var target;
8699      target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
8700      if (target) {
8701        return this.result_do_highlight(target);
8702      }
8703    };
8704
8705    Chosen.prototype.search_results_mouseout = function(evt) {
8706      if ($(evt.target).hasClass("active-result") || $(evt.target).parents('.active-result').first()) {
8707        return this.result_clear_highlight();
8708      }
8709    };
8710
8711    Chosen.prototype.choice_build = function(item) {
8712      var choice, close_link;
8713      choice = $('<li />', {
8714        "class": "search-choice"
8715      }).html("<span>" + (this.choice_label(item)) + "</span>");
8716      if (item.disabled) {
8717        choice.addClass('search-choice-disabled');
8718      } else {
8719        close_link = $('<a />', {
8720          "class": 'search-choice-close',
8721          'data-option-array-index': item.array_index
8722        });
8723        close_link.on('click.chosen', (function(_this) {
8724          return function(evt) {
8725            return _this.choice_destroy_link_click(evt);
8726          };
8727        })(this));
8728        choice.append(close_link);
8729      }
8730      return this.search_container.before(choice);
8731    };
8732
8733    Chosen.prototype.choice_destroy_link_click = function(evt) {
8734      evt.preventDefault();
8735      evt.stopPropagation();
8736      if (!this.is_disabled) {
8737        return this.choice_destroy($(evt.target));
8738      }
8739    };
8740
8741    Chosen.prototype.choice_destroy = function(link) {
8742      if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
8743        if (this.active_field) {
8744          this.search_field.focus();
8745        } else {
8746          this.show_search_field_default();
8747        }
8748        if (this.is_multiple && this.choices_count() > 0 && this.get_search_field_value().length < 1) {
8749          this.results_hide();
8750        }
8751        link.parents('li').first().remove();
8752        return this.search_field_scale();
8753      }
8754    };
8755
8756    Chosen.prototype.results_reset = function() {
8757      this.reset_single_select_options();
8758      this.form_field.options[0].selected = true;
8759      this.single_set_selected_text();
8760      this.show_search_field_default();
8761      this.results_reset_cleanup();
8762      this.trigger_form_field_change();
8763      if (this.active_field) {
8764        return this.results_hide();
8765      }
8766    };
8767
8768    Chosen.prototype.results_reset_cleanup = function() {
8769      this.current_selectedIndex = this.form_field.selectedIndex;
8770      return this.selected_item.find("abbr").remove();
8771    };
8772
8773    Chosen.prototype.result_select = function(evt) {
8774      var high, item;
8775      if (this.result_highlight) {
8776        high = this.result_highlight;
8777        this.result_clear_highlight();
8778        if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
8779          this.form_field_jq.trigger("chosen:maxselected", {
8780            chosen: this
8781          });
8782          return false;
8783        }
8784        if (this.is_multiple) {
8785          high.removeClass("active-result");
8786        } else {
8787          this.reset_single_select_options();
8788        }
8789        high.addClass("result-selected");
8790        item = this.results_data[high[0].getAttribute("data-option-array-index")];
8791        item.selected = true;
8792        this.form_field.options[item.options_index].selected = true;
8793        this.selected_option_count = null;
8794        if (this.is_multiple) {
8795          this.choice_build(item);
8796        } else {
8797          this.single_set_selected_text(this.choice_label(item));
8798        }
8799        if (this.is_multiple && (!this.hide_results_on_select || (evt.metaKey || evt.ctrlKey))) {
8800          if (evt.metaKey || evt.ctrlKey) {
8801            this.winnow_results({
8802              skip_highlight: true
8803            });
8804          } else {
8805            this.search_field.val("");
8806            this.winnow_results();
8807          }
8808        } else {
8809          this.results_hide();
8810          this.show_search_field_default();
8811        }
8812        if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
8813          this.trigger_form_field_change({
8814            selected: this.form_field.options[item.options_index].value
8815          });
8816        }
8817        this.current_selectedIndex = this.form_field.selectedIndex;
8818        evt.preventDefault();
8819        return this.search_field_scale();
8820      }
8821    };
8822
8823    Chosen.prototype.single_set_selected_text = function(text) {
8824      if (text == null) {
8825        text = this.default_text;
8826      }
8827      if (text === this.default_text) {
8828        this.selected_item.addClass("chosen-default");
8829      } else {
8830        this.single_deselect_control_build();
8831        this.selected_item.removeClass("chosen-default");
8832      }
8833      return this.selected_item.find("span").html(text);
8834    };
8835
8836    Chosen.prototype.result_deselect = function(pos) {
8837      var result_data;
8838      result_data = this.results_data[pos];
8839      if (!this.form_field.options[result_data.options_index].disabled) {
8840        result_data.selected = false;
8841        this.form_field.options[result_data.options_index].selected = false;
8842        this.selected_option_count = null;
8843        this.result_clear_highlight();
8844        if (this.results_showing) {
8845          this.winnow_results();
8846        }
8847        this.trigger_form_field_change({
8848          deselected: this.form_field.options[result_data.options_index].value
8849        });
8850        this.search_field_scale();
8851        return true;
8852      } else {
8853        return false;
8854      }
8855    };
8856
8857    Chosen.prototype.single_deselect_control_build = function() {
8858      if (!this.allow_single_deselect) {
8859        return;
8860      }
8861      if (!this.selected_item.find("abbr").length) {
8862        this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
8863      }
8864      return this.selected_item.addClass("chosen-single-with-deselect");
8865    };
8866
8867    Chosen.prototype.get_search_field_value = function() {
8868      return this.search_field.val();
8869    };
8870
8871    Chosen.prototype.get_search_text = function() {
8872      return $.trim(this.get_search_field_value());
8873    };
8874
8875    Chosen.prototype.escape_html = function(text) {
8876      return $('<div/>').text(text).html();
8877    };
8878
8879    Chosen.prototype.winnow_results_set_highlight = function() {
8880      var do_high, selected_results;
8881      selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
8882      do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
8883      if (do_high != null) {
8884        return this.result_do_highlight(do_high);
8885      }
8886    };
8887
8888    Chosen.prototype.no_results = function(terms) {
8889      var no_results_html;
8890      no_results_html = this.get_no_results_html(terms);
8891      this.search_results.append(no_results_html);
8892      return this.form_field_jq.trigger("chosen:no_results", {
8893        chosen: this
8894      });
8895    };
8896
8897    Chosen.prototype.no_results_clear = function() {
8898      return this.search_results.find(".no-results").remove();
8899    };
8900
8901    Chosen.prototype.keydown_arrow = function() {
8902      var next_sib;
8903      if (this.results_showing && this.result_highlight) {
8904        next_sib = this.result_highlight.nextAll("li.active-result").first();
8905        if (next_sib) {
8906          return this.result_do_highlight(next_sib);
8907        }
8908      } else {
8909        return this.results_show();
8910      }
8911    };
8912
8913    Chosen.prototype.keyup_arrow = function() {
8914      var prev_sibs;
8915      if (!this.results_showing && !this.is_multiple) {
8916        return this.results_show();
8917      } else if (this.result_highlight) {
8918        prev_sibs = this.result_highlight.prevAll("li.active-result");
8919        if (prev_sibs.length) {
8920          return this.result_do_highlight(prev_sibs.first());
8921        } else {
8922          if (this.choices_count() > 0) {
8923            this.results_hide();
8924          }
8925          return this.result_clear_highlight();
8926        }
8927      }
8928    };
8929
8930    Chosen.prototype.keydown_backstroke = function() {
8931      var next_available_destroy;
8932      if (this.pending_backstroke) {
8933        this.choice_destroy(this.pending_backstroke.find("a").first());
8934        return this.clear_backstroke();
8935      } else {
8936        next_available_destroy = this.search_container.siblings("li.search-choice").last();
8937        if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
8938          this.pending_backstroke = next_available_destroy;
8939          if (this.single_backstroke_delete) {
8940            return this.keydown_backstroke();
8941          } else {
8942            return this.pending_backstroke.addClass("search-choice-focus");
8943          }
8944        }
8945      }
8946    };
8947
8948    Chosen.prototype.clear_backstroke = function() {
8949      if (this.pending_backstroke) {
8950        this.pending_backstroke.removeClass("search-choice-focus");
8951      }
8952      return this.pending_backstroke = null;
8953    };
8954
8955    Chosen.prototype.search_field_scale = function() {
8956      var div, i, len, style, style_block, styles, width;
8957      if (!this.is_multiple) {
8958        return;
8959      }
8960      style_block = {
8961        position: 'absolute',
8962        left: '-1000px',
8963        top: '-1000px',
8964        display: 'none',
8965        whiteSpace: 'pre'
8966      };
8967      styles = ['fontSize', 'fontStyle', 'fontWeight', 'fontFamily', 'lineHeight', 'textTransform', 'letterSpacing'];
8968      for (i = 0, len = styles.length; i < len; i++) {
8969        style = styles[i];
8970        style_block[style] = this.search_field.css(style);
8971      }
8972      div = $('<div />').css(style_block);
8973      div.text(this.get_search_field_value());
8974      $('body').append(div);
8975      width = div.width() + 25;
8976      div.remove();
8977      if (this.container.is(':visible')) {
8978        width = Math.min(this.container.outerWidth() - 10, width);
8979      }
8980      return this.search_field.width(width);
8981    };
8982
8983    Chosen.prototype.trigger_form_field_change = function(extra) {
8984      this.form_field_jq.trigger("input", extra);
8985      return this.form_field_jq.trigger("change", extra);
8986    };
8987
8988    return Chosen;
8989
8990  })(AbstractChosen);
8991
8992}).call(this);
8992;
8993/* AUTOGENERATED: scripts.js */
8994/* vim: set ts=2 sw=2 sts=2 et: */
8995
8996/**
8997 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
8998 * See https://www.x-cart.com/license-agreement.html for license details.
8999 */
9000
9001/**
9002 * For the text input, set the handler that transforms the input's label depending on if the field is empty.
9003 * By default, text inputs should have placeholder and thus, labels can be transformed in CSS with a :placeholder-shown
9004 * rule. That handler should be set only for the fields w/o placeholders.
9005 *
9006 * @param {Element} el Text field.
9007 */
9008const setLabelHandler = (el) => {
9009  if (el && !el.classList.contains('handled')) {
9010    const handleFocusedClass = () => {
9011      if (el.querySelector('option[selected]') && el.classList.contains('focused')) {
9012        return
9013      }
9014      el.classList.toggle('focused', !!el.value);
9015    };
9016
9017    ['focus', 'blue', 'change'].forEach(event => {
9018      el.addEventListener(event, handleFocusedClass);
9019    });
9020
9021    el.classList.add('handled');
9022    handleFocusedClass();
9023  }
9024};
9025
9026xcart.microhandlers.add(
9027  'LabelHandler',
9028  '.field__field:not(.handled):not([placeholder])',
9029  function () {
9030    setLabelHandler(this);
9031  }
9032);
9033
9034xcart.registerTriggersBind(
9035  'update-product-page',
9036  function () {
9037    document.querySelectorAll('.field__field:not(.handled)').forEach(elem => {
9038      setLabelHandler(elem);
9039    });
9040  }
9041);
9042
9043function setPasswordDifficultyColor(elem, difficulty) {
9044  elem.toggleClass('weak', (difficulty === 'Weak password'));
9045  elem.toggleClass('good', (difficulty === 'Good password'));
9046  elem.toggleClass('strong', (difficulty === 'Strong password'));
9047}
9048
9049xcart.microhandlers.add(
9050  'ProductSortHandler',
9051  '.sort-box:not(.handled)',
9052  function () {
9053    const labelContainer = this.querySelector('.sort-box__label-container');
9054
9055    if (labelContainer) {
9056      labelContainer.addEventListener('click', () => {
9057        labelContainer.classList.toggle('sort-box__label-container--active');
9058      });
9059
9060      this.querySelectorAll('.sort-box__list-item-link').forEach(link => {
9061        link.addEventListener('click', () => {
9062          labelContainer.classList.remove('sort-box__label-container--active');
9063        });
9064      });
9065    }
9066
9067    document.addEventListener('click', (e) => {
9068      if (e.target && !xcart.parents(e.target, '.sort-box').length) {
9069        this.querySelectorAll('.sort-box__label-container--active').forEach(elem => {
9070          elem.classList.remove('sort-box__label-container--active');
9071        });
9072      }
9073    });
9074
9075    this.classList.add('handled');
9076  }
9077);
9078
9079/**
9080 * Get the active window height - w/o the header area, bottom menu (in case it's visible), etc.
9081 *
9082 * @return {number} Active window height.
9083 */
9084function getActiveWindowHeight() {
9085  window.activeWindowHeight = window.innerHeight;
9086
9087  const headerArea = document.getElementById('header-area');
9088  if (headerArea) {
9089    window.activeWindowHeight -= headerArea.getBoundingClientRect().height;
9090  }
9091
9092  const bottomPanel = document.querySelector('.bottom-panel');
9093  if (bottomPanel) {
9094    window.activeWindowHeight -= headerArea.getBoundingClientRect().height;
9095  }
9096
9097  document.dispatchEvent(new Event('calculateActiveWindowHeight')); // window.activeWindowHeight is expected to be
9098                                                                    // changed here.
9099  return window.activeWindowHeight;
9100}
9101
9102function getActiveWindowTop() {
9103  window.stickyWindowTop = 0;
9104
9105  const headerArea = document.getElementById('header-area');
9106  if (headerArea) {
9107    window.stickyWindowTop += headerArea.getBoundingClientRect().height;
9108  }
9109
9110  document.dispatchEvent(new Event('calculateStickyWindowTop'));
9111
9112  return window.stickyWindowTop;
9113}
9114
9115function getPreloaderSVG() {
9116  return '<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" preserveAspectRatio="xMidYMid" style="margin:auto;background:0 0;display:block;shape-rendering:auto" viewBox="0 0 100 100"><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5"><animate attributeName="opacity" begin="-0.8888888888888888s" dur="1s" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></rect><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5" transform="rotate(40 50 50)"><animate attributeName="opacity" begin="-0.7777777777777778s" dur="1s" keyTimes="0;
91161" repeatCount="indefinite" values="1;0"/></rect><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5" transform="rotate(80 50 50)"><animate attributeName="opacity" begin="-0.6666666666666666s" dur="1s" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></rect><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5" transform="rotate(120 50 50)"><animate attributeName="opacity" begin="-0.5555555555555556s" dur="1s" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></rect><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5" transform="rotate(160 50 50)"><animate attributeName="opacity" begin="-0.4444444444444444s" dur="1s" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></rect><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5" transform="rotate(200 50 50)"><animate attributeName="opacity" begin="-0.3333333333333333s" dur="1s" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></rect><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5" transform="rotate(240 50 50)"><animate attributeName="opacity" begin="-0.2222222222222222s" dur="1s" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></rect><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5" transform="rotate(280 50 50)"><animate attributeName="opacity" begin="-0.1111111111111111s" dur="1s" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></rect><rect width="7" height="13" x="46.5" y="24.5" fill="currentColor" rx="3.5" ry="6.5" transform="rotate(320 50 50)"><animate attributeName="opacity" begin="0s" dur="1s" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></rect></svg>';
9117}
9118
9119/**
9120 * A $(<some HTML code>) analog.
9121 *
9122 * @param {string} html
9123 *
9124 * @return {Element}
9125 */
9126xcart.createDOMTreeFromHTML = (html) => {
9127  const result = document.createElement('DIV');
9128  result.innerHTML = html;
9129
9130  return result;
9131};
9132
9133/**
9134 * Generate random ID for the DOM element.
9135 *
9136 * @param {string} [prefix] Random ID prefix. Optional.
9137 * @param {string} [postfix] Random ID postfix. Optional.
9138 *
9139 * @return {string} Randomly generated ID.
9140 */
9141xcart.generateRandomId = (prefix, postfix) => {
9142  let result = prefix ? prefix : 'id';
9143
9144  result += Math.round(Math.random() * 1000000000).toString();
9145
9146  if (postfix) {
9147    result += postfix;
9148  }
9149
9150  return result;
9151};
9152
9153window.options = {};
9154
9155const phoneFieldHandler = (field) => {
9156  xcart.parents(field, '.wrapper-intl-phone-number').forEach(wrapper => {
9157    wrapper.classList.toggle('filled', !!field.value);
9158  });
9159};
9160
9161const handlePhoneField = (field) => {
9162  const fieldHandler = () => phoneFieldHandler(field);
9163
9164  fieldHandler();
9165  field.addEventListener('focus', fieldHandler);
9166  field.addEventListener('blur', fieldHandler);
9167  field.addEventListener('input', fieldHandler);
9168
9169  field.classList.add('handled');
9170
9171  xcart.parents(field, '.wrapper-intl-phone-number').forEach(container => {
9172    container.querySelectorAll('label.field__label').forEach(label => {
9173      label.setAttribute('for', field.getAttribute('id'));
9174    });
9175  });
9176};
9177
9178xcart.microhandlers.add(
9179  'phonHandlers',
9180  '.iti .field-phone, .iti .xc-intl-phone-number',
9181  function () {
9182    handlePhoneField(this);
9183  }
9184);
9185
9186xcart.microhandlers.add(
9187  'selectFilledClass',
9188  'select:not([data-fill-handler])',
9189  function () {
9190    const handleFilledClass = () => {
9191      if (this.value && !this.classList.contains('filled')) {
9192        this.classList.add('filled');
9193
9194        return;
9195      }
9196
9197      if (this.options) {
9198        for (let i = 0; i < this.options.length; i++) {
9199          if (!this.options[i].value && this.options[i].innerText.trim()) {
9200            if (!this.classList.contains('filled')) {
9201              this.classList.add('filled');
9202            }
9203
9204            return;
9205          }
9206        }
9207      }
9208
9209      if (!this.value && this.classList.contains('filled')) {
9210        this.classList.remove('filled');
9211      }
9212    };
9213
9214    this.addEventListener('change', handleFilledClass);
9215    this.addEventListener('focus', handleFilledClass);
9216    this.addEventListener('blur', handleFilledClass);
9217    handleFilledClass();
9218    this.setAttribute('data-fill-handler', '1');
9219  }
9220);
9221
9222xcart.microhandlers.add(
9223  'ProductCellWidthHandler',
9224  '.product-cell',
9225  function () {
9226    const handler = () => {
9227      this.style.setProperty('--product-cell-width', Math.round(this.getBoundingClientRect().width) + 'px');
9228    };
9229
9230    if ('ResizeObserver' in window) {
9231      (new ResizeObserver(handler)).observe(this);
9232    } else {
9233      window.addEventListener('resize', handler, {passive: true});
9234      window.addEventListener('orientationchange', handler, {passive: true});
9235    }
9236
9237    handler();
9238  }
9239);
9240
9241window.addEventListener('load', () => {
9242  document.querySelectorAll('.iti .field-phone, .iti .xc-intl-phone-number').forEach(field => {
9243    if (!field.classList.contains('handled')) {
9244      handlePhoneField(field);
9245    }
9246  });
9247});;
9248/* AUTOGENERATED: dropdown.js */
9249/* vim: set ts=2 sw=2 sts=2 et: */
9250
9251/**
9252 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
9253 * See https://www.x-cart.com/license-agreement.html for license details.
9254 */
9255
9256const Dropdown = function () {
9257
9258  let opened = null;
9259
9260  /**
9261   * @param {Element} dropdown
9262   * @return {boolean}
9263   */
9264  this.isOpened = (dropdown) => {
9265    return dropdown && dropdown.classList.contains('opened');
9266  };
9267
9268  /**
9269   * @param {Element|string} dropdown Dropdown DOM node or its selector.
9270   */
9271  this.open = (dropdown) => {
9272    if (typeof dropdown === 'string') {
9273      dropdown = document.querySelector(dropdown);
9274    }
9275
9276    if (dropdown && !this.isOpened(dropdown)) {
9277      if (opened && opened !== dropdown) {
9278        this.close();
9279      }
9280
9281      opened = dropdown;
9282      dropdown.classList.add('opened');
9283      document.documentElement.classList.add('dropdown-opened');
9284      MobileMenu.getInstance().close();
9285    }
9286  };
9287
9288  /**
9289   * @param {Element|string} dropdown Dropdown DOM node or its selector.
9290   */
9291  this.close = (dropdown) => {
9292    if (typeof dropdown === 'undefined') {
9293      dropdown = opened;
9294    }
9295    if (typeof dropdown === 'string') {
9296      dropdown = document.querySelector(dropdown);
9297    }
9298
9299    if (dropdown && this.isOpened(dropdown)) {
9300      dropdown.classList.remove('opened');
9301      if (dropdown === opened) {
9302        opened = null;
9303        document.documentElement.classList.remove('dropdown-opened');
9304      }
9305    }
9306  };
9307};
9308
9309xcart.dropdown = new Dropdown();
9310
9311xcart.bind('mobile-menu.opened', () => {
9312  xcart.dropdown.close();
9313});;
9314/* AUTOGENERATED: top-menu.js */
9315/* vim: set ts=2 sw=2 sts=2 et: */
9316
9317/**
9318 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
9319 * See https://www.x-cart.com/license-agreement.html for license details.
9320 */
9321
9322const TopMenu = function () {
9323
9324  /**
9325   * Returns a DOM node or an element matching the selector.
9326   *
9327   * @param {Element|string} elem Element or an element selector.
9328   *
9329   * @return {Element|null} Element, null if selector is passed and there is no matching elements.
9330   */
9331  const getElement = (elem) => {
9332    if (typeof elem === 'string') {
9333      elem = document.querySelector(elem);
9334    }
9335
9336    return elem;
9337  };
9338
9339  this.close = (elem) => {
9340    if (elem) {
9341      elem.classList.remove('header-bar__column-list-item--active');
9342    }
9343  };
9344
9345  this.open = (elem) => {
9346    if (elem) {
9347      elem.classList.add('header-bar__column-list-item--active');
9348    }
9349  };
9350
9351  /**
9352   * @param {Element|string} elem
9353   * @return {boolean}
9354   */
9355  this.isOpened = (elem) => {
9356    elem = getElement(elem);
9357
9358    return elem && elem.classList && elem.classList.contains('header-bar__column-list-item--active');
9359  };
9360
9361  /**
9362   * @return {NodeListOf<Element>}
9363   */
9364  this.getOpenedMenus = () => {
9365    return document.querySelectorAll('#header-bar .header-bar__column-list-item--active');
9366  };
9367
9368  /**
9369   *
9370   * @param {Element|string} elem
9371   * @param {string} content
9372   */
9373  this.setItemBadge = (elem, content) => {
9374    elem = getElement(elem);
9375    if (elem) {
9376      const btn = elem.classList.contains('header-bar__column-list-item-button')
9377        ? elem
9378        : elem.querySelector('.header-bar__column-list-item-button');
9379
9380      if (btn) {
9381        let badge = btn.querySelector('.badge');
9382        if (!badge && content) {
9383          badge = document.createElement('SPAN');
9384          badge.classList.add('badge', 'header-bar__column-list-item-button-badge');
9385          btn.appendChild(badge);
9386        }
9387
9388        if (content) {
9389          badge.innerHTML = content;
9390        } else if (badge) {
9391          btn.removeChild(badge);
9392        }
9393      }
9394    }
9395  };
9396
9397  /**
9398   * @param {Element|null} exceptThis
9399   */
9400  this.closeMenus = (exceptThis = null) => {
9401    this.getOpenedMenus().forEach(item => {
9402      if (item !== exceptThis && item.classList.contains('header-bar__column-list-item--active')) {
9403        xcart.trigger('top-menu-closed', {menu: item});
9404        item.classList.remove('header-bar__column-list-item--active');
9405      }
9406    });
9407  };
9408
9409  /**
9410   * @param {Element|string} elem
9411   * @param {boolean} open
9412   */
9413  this.toggle = (elem, open) => {
9414    elem = getElement(elem);
9415
9416    if (elem) {
9417      const button = elem.querySelector(':scope > .header-bar__column-list-item-button');
9418      if (typeof open === 'undefined') {
9419        open = !this.isOpened(elem);
9420      }
9421
9422      elem.classList.toggle('header-bar__column-list-item--active', open);
9423      if (button && !open) {
9424        button.blur();
9425      }
9426
9427      this.closeMenus(elem);
9428    }
9429  };
9430
9431  /**
9432   * @param {Element} elem
9433   *
9434   * @return boolean
9435   */
9436  this.isOpened = (elem) => {
9437    return elem && elem.classList.contains('header-bar__column-list-item--active');
9438  };
9439
9440  /**
9441   * @param {Element|string} [root]
9442   */
9443  this.updateButtonHandlers = (root) => {
9444    let furtherButtons;
9445    let backButtons;
9446
9447    if (root && typeof root === 'string') {
9448      furtherButtons = document.querySelectorAll(`${root} .top-menu__categories-item-further:not([data-handled])`);
9449      backButtons = document.querySelectorAll(`${root} .top-menu__categories-item-back:not([data-handled])`);
9450    } else if (root) {
9451      furtherButtons = root.querySelectorAll(`.top-menu__categories-item-further:not([data-handled])`);
9452      backButtons = root.querySelectorAll(`.top-menu__categories-item-back:not([data-handled])`);
9453    } else {
9454      furtherButtons = document.querySelectorAll('#header-bar .top-menu__categories-item-further:not([data-handled])');
9455      backButtons = document.querySelectorAll('#header-bar .top-menu__categories-item-back:not([data-handled])');
9456    }
9457
9458    furtherButtons.forEach(button => {
9459      button.addEventListener('click', () => {
9460        button.parentNode.classList.add('top-menu__categories-item--open');
9461        button.parentNode.parentNode.classList.add('open');
9462      });
9463
9464      button.setAttribute('data-handled', true);
9465    });
9466
9467    backButtons.forEach(button => {
9468      button.addEventListener('click', () => {
9469        const parentListItem = button.parentNode.parentNode.parentNode;
9470
9471        parentListItem.classList.remove('top-menu__categories-item--open');
9472        parentListItem.parentNode.classList.remove('open');
9473      });
9474    });
9475  };
9476
9477  this.init = () => {
9478    document.querySelectorAll('.header-bar__column-list-item-button').forEach(button => {
9479      button.addEventListener('click', () => {
9480        this.toggle(button.parentNode);
9481      });
9482    });
9483
9484    document.addEventListener('click', (e) => {
9485      let clickedInSubmenu = null;
9486      let elem = e.target;
9487
9488      while (elem && elem.classList && !clickedInSubmenu) {
9489        if (elem.classList.contains('header-bar__column-list-item')) {
9490          clickedInSubmenu = elem;
9491        }
9492        elem = elem.parentNode;
9493      }
9494
9495      this.closeMenus(clickedInSubmenu);
9496    });
9497
9498    this.updateButtonHandlers();
9499
9500    xcart.bind('popup.open', () => {
9501      this.closeMenus();
9502    });
9503
9504    xcart.trigger('navbar.desktop.loaded');
9505  };
9506
9507};
9508
9509TopMenu.prototype.instance = null;
9510
9511TopMenu.getInstance = () => {
9512  if (!TopMenu.prototype.instance) {
9513    TopMenu.prototype.instance = new TopMenu();
9514    TopMenu.prototype.instance.init();
9515  }
9516
9517  return TopMenu.prototype.instance;
9518};
9519
9520TopMenu.getInstance();
9521
9522(function () {
9523  const desktopModeSwitcherContainer = document.querySelector('.account-links__list-item--mode');
9524  if (desktopModeSwitcherContainer) {
9525    const desktopModeSwitcher = desktopModeSwitcherContainer.querySelector('.switcher-container');
9526
9527    if (desktopModeSwitcher) {
9528      desktopModeSwitcherContainer.addEventListener('click', (e) => {
9529        let hasClickedOnSwitcher = false;
9530        let elem = e.target;
9531
9532        while (elem) {
9533          if (elem === desktopModeSwitcher) {
9534            hasClickedOnSwitcher = true;
9535            break;
9536          }
9537          elem = elem.parentNode;
9538        }
9539
9540        if (!hasClickedOnSwitcher) {
9541          desktopModeSwitcher.click();
9542        }
9543      });
9544    }
9545  }
9546})();;
9547/* AUTOGENERATED: script.js */
9548/* vim: set ts=2 sw=2 sts=2 et: */
9549
9550/**
9551 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
9552 * See https://www.x-cart.com/license-agreement.html for license details.
9553 */
9554
9555const MobileMenu = function () {
9556  const mobileMenuToggleButton = document.getElementById('main_menu');
9557  const container = document.documentElement;
9558  const OPEN_CLASS = 'slidebar-open';
9559  const mobileMenuRoot = document.getElementById('slidebar');
9560  const itemsWithSubmenus = mobileMenuRoot ? mobileMenuRoot.querySelectorAll('.top-menu__item--has-submenu') : [];
9561  const mobileMenuHolder = mobileMenuRoot ? mobileMenuRoot.querySelector('.slidebar-list__holder') : null;
9562  const mobileMenuContainer = mobileMenuRoot ? mobileMenuRoot.querySelector('.slidebar-list__container') : null;
9563  const mobileMainMenu = mobileMenuRoot
9564    ? mobileMenuRoot.querySelector('.slidebar-list__holder > .slidebar-list')
9565    : null;
9566  const mobileMenuCategoriesItem = mobileMenuRoot ? mobileMenuRoot.querySelector('.top-menu__item--categories') : null;
9567  const mobileMenuBackButtons = mobileMenuRoot
9568    ? mobileMenuRoot.querySelectorAll('.top-menu__categories-item-back')
9569    : [];
9570  const SUBMENU_CLOSE_DURATION = 500;
9571
9572  let isMobileMenuOpen = false;
9573
9574  /**
9575   * @param {boolean} [open] Whether the menu should be open.
9576   */
9577  this.toggle = (open) => {
9578    if (typeof open === 'undefined') {
9579      open = !isMobileMenuOpen;
9580    }
9581
9582    if (!isMobileMenuOpen && open) {
9583      this.switchToMainMenu();
9584    } else if (isMobileMenuOpen && !open) {
9585      xcart.trigger('mobile-menu.item.selected', {item: null});
9586    }
9587
9588    isMobileMenuOpen = open;
9589    container.classList.toggle(OPEN_CLASS, open);
9590
9591    xcart.trigger('mobile-menu.toggle', {open: open});
9592    xcart.trigger(open ? 'mobile-menu.opened' : 'mobile-menu.closed');
9593  };
9594
9595  const adjustMobileMenuHolderHeight = (mobileMenu) => {
9596    if (mobileMenuHolder) {
9597      mobileMenu.style.minHeight = '0';
9598      mobileMenuHolder.style.height = `${mobileMenu ? mobileMenu.scrollHeight : 0}px`;
9599      mobileMenu.style.minHeight = null;
9600    }
9601  };
9602
9603  /**
9604   * @param {CallableFunction} callback
9605   */
9606  const makeInstant = (callback) => {
9607    mobileMenuHolder.classList.add('slidebar--instant');
9608    callback();
9609
9610    requestAnimationFrame(() => {
9611      mobileMenuHolder.classList.remove('slidebar--instant');
9612    });
9613  };
9614
9615  /**
9616   * @param {Element} item
9617   * @param {boolean} [instant]
9618   */
9619  const openSubmenu = (item, instant = false) => {
9620    const subMenu = item.querySelector(':scope > .sublevel');
9621    item.parentNode.classList.add('slidebar--open');
9622    const scrolledBy = mobileMenuContainer.scrollTop;
9623
9624    if (!instant && scrolledBy > 0) {
9625      item.parentNode.style.top = `-${scrolledBy}px`;
9626
9627      if (subMenu) {
9628        subMenu.style.top = `${scrolledBy}px`;
9629      }
9630
9631      setTimeout(() => {
9632        item.parentNode.style.top = null;
9633        if (subMenu) {
9634          subMenu.style.top = null;
9635        }
9636      }, SUBMENU_CLOSE_DURATION);
9637    }
9638
9639    item.classList.add('top-menu__item--active');
9640    adjustMobileMenuHolderHeight(subMenu ? subMenu : null);
9641    xcart.trigger('mobile-menu.item.selected', {item: item});
9642  };
9643
9644  /**
9645   * @param {Element} item
9646   */
9647  const closeSubmenu = (item) => {
9648    const subLevelMenu = item.querySelector(':scope > .sublevel');
9649
9650    if (subLevelMenu) {
9651      subLevelMenu.style.height = `${subLevelMenu.scrollHeight}px`;
9652      setTimeout(() => {
9653        subLevelMenu.style.height = null;
9654      }, SUBMENU_CLOSE_DURATION);
9655    }
9656
9657    item.parentNode.classList.remove('slidebar--open');
9658    item.classList.remove('top-menu__item--active');
9659    adjustMobileMenuHolderHeight(item.parentNode);
9660  };
9661
9662  this.open = () => {
9663    adjustMobileMenuHolderHeight(mobileMainMenu);
9664    this.toggle(true);
9665  };
9666
9667  this.close = () => {
9668    this.toggle(false);
9669  };
9670
9671  this.switchToMainMenu = () => {
9672    if (mobileMenuRoot && mobileMenuHolder) {
9673      makeInstant(() => {
9674        mobileMenuRoot.querySelectorAll('.top-menu__item--active').forEach(elem => {
9675          elem.classList.remove('top-menu__item--active');
9676        });
9677
9678        mobileMenuRoot.querySelectorAll('.slidebar--open').forEach(elem => {
9679          elem.classList.remove('slidebar--open');
9680        });
9681
9682        mobileMenuHolder.style.height = null;
9683      });
9684
9685      xcart.trigger('mobile-menu.item.selected', {item: null});
9686    }
9687  };
9688
9689  this.openCatalog = () => {
9690    if (!isMobileMenuOpen) {
9691      this.open();
9692    }
9693
9694    makeInstant(() => {
9695      this.switchToMainMenu();
9696      if (mobileMenuCategoriesItem) {
9697        openSubmenu(mobileMenuCategoriesItem, true);
9698      }
9699    });
9700  };
9701
9702  this.isCatalogOpened = () => {
9703    return isMobileMenuOpen
9704      && mobileMenuCategoriesItem
9705      && mobileMenuCategoriesItem.classList.contains('top-menu__item--active');
9706  };
9707
9708  this.init = () => {
9709    if (mobileMenuToggleButton) {
9710      mobileMenuToggleButton.addEventListener('click', (e) => {
9711        this.toggle();
9712        e.preventDefault();
9713      });
9714    }
9715
9716    itemsWithSubmenus.forEach((item) => {
9717      item.firstElementChild.addEventListener('click', (e) => {
9718        openSubmenu(item);
9719        e.preventDefault();
9720        e.stopPropagation();
9721      });
9722    });
9723
9724    mobileMenuBackButtons.forEach((btn) => {
9725      btn.addEventListener('click', (e) => {
9726        closeSubmenu(btn.parentNode.parentNode.parentNode);
9727        e.stopPropagation();
9728      });
9729    });
9730
9731    document.querySelectorAll('.top-menu__item--categories .top-menu__item--level-1 .top-menu__item--title').forEach(
9732      (item) => {
9733        item.addEventListener('click', () => {
9734          closeSubmenu(item.parentNode.parentNode);
9735        });
9736      }
9737    );
9738
9739    xcart.trigger('navbar.mobile.loaded');
9740  };
9741};
9742
9743MobileMenu.prototype.instance = null;
9744
9745MobileMenu.getInstance = () => {
9746  if (!MobileMenu.prototype.instance) {
9747    MobileMenu.prototype.instance = new MobileMenu();
9748    MobileMenu.prototype.instance.init();
9749  }
9750
9751  return MobileMenu.prototype.instance;
9752};
9753
9754MobileMenu.getInstance();;
9755/* AUTOGENERATED: popup.js */
9756/* vim: set ts=2 sw=2 sts=2 et: */
9757
9758/**
9759 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
9760 * See https://www.x-cart.com/license-agreement.html for license details.
9761 */
9762
9763/* Wrap popups into a couple of containers, so we can center them using CSS only */
9764xcart.bind('popup.open', () => {
9765  requestAnimationFrame(() => {
9766    if (popup.currentPopup && popup.currentPopup.widget) {
9767      const root = popup.currentPopup.widget[0];
9768      let container = root.querySelector(':scope > .ui-dialog__container');
9769
9770      if (root.children.length > 1 || !container) {
9771        if (!container) {
9772          container = document.createElement('DIV');
9773          container.className = 'ui-dialog__container';
9774          root.appendChild(container);
9775        }
9776
9777        let inner = container.querySelector(':scope > .ui-dialog__inner');
9778        if (!inner) {
9779          inner = document.createElement('DIV');
9780          inner.className = 'ui-dialog__inner';
9781          container.appendChild(inner);
9782        }
9783
9784        let content = inner.querySelector(':scope > .ui-dialog__window');
9785        if (!content) {
9786          content = document.createElement('DIV');
9787          content.className = 'ui-dialog__window';
9788          inner.appendChild(content);
9789        }
9790
9791        Array.from(root.childNodes).forEach(child => {
9792          if (child !== container) {
9793            content.appendChild(child);
9794          }
9795        });
9796
9797        const quasiHeader = content.querySelector('.block.block-block > .head-h2, .popup-title-container');
9798        if (quasiHeader) {
9799          const realTitle = root.querySelector('.ui-dialog-title');
9800          if (realTitle) {
9801            realTitle.innerHTML = quasiHeader.innerHTML;
9802          }
9803          quasiHeader.parentNode.removeChild(quasiHeader);
9804        }
9805      }
9806
9807      if (!root.hasAttribute('data-popup-handled')) {
9808        root.setAttribute('data-popup-handled', '1');
9809        root.addEventListener('click', (e) => {
9810          if (
9811            e.target.classList.contains('ui-dialog__inner')
9812            || e.target.classList.contains('ui-dialog__container')
9813            || e.target.classList.contains('ui-dialog')
9814          ) {
9815            popup.close();
9816          }
9817        });
9818      }
9819    }
9820  });
9821});;
9822/* AUTOGENERATED: tabs-navigation.js */
9823/* vim: set ts=2 sw=2 sts=2 et: */
9824
9825/**
9826 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
9827 * See https://www.x-cart.com/license-agreement.html for license details.
9828 */
9829
9830/**
9831 * @param {{root: Element, prev?: Element, next?: Element, container: Element, list: Element, tabs: Element[]}} dom
9832 * @param {{scrollIntoViewOnClick: boolean}} options
9833 */
9834function TabsNavigation(dom, options) {
9835  const updateNavButtonsState = () => {
9836    if (dom.container.scrollLeft > 5) {
9837      dom.prev.removeAttribute('disabled');
9838    } else {
9839      dom.prev.setAttribute('disabled', 'disabled');
9840    }
9841
9842    if (dom.container.scrollLeft + dom.container.getBoundingClientRect().width >= dom.container.scrollWidth - 5) {
9843      dom.next.setAttribute('disabled', 'disabled');
9844    } else {
9845      dom.next.removeAttribute('disabled');
9846    }
9847  };
9848
9849  const getNavButtonIconHTML = () => {
9850    return '<svg aria-hidden="true" class="inline-icon inline-icon--arrow tabs-nav__btn-icon" width="24" height="24"' +
9851      ' viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">' +
9852      '<path d="M16.663 4.672a.933.933 0 0 1-.27.662l-6.807 6.8 6.807 6.8a.937.937 0 0 1-1.324 
98521.325l-7.46-7.463a.933.933 0 0 ' +
9853      '1 0-1.324l7.46-7.463a.933.933 0 0 1 1.594.663Z">' +
9854      '</path></svg>';
9855  };
9856
9857  /**
9858   * @param {string} btnExtraClass
9859   * @param {string} accessibleText
9860   *
9861   * @return {Element}
9862   */
9863  const getNavButtonElement = (btnExtraClass, accessibleText) => {
9864    const btn = document.createElement('BUTTON');
9865    btn.setAttribute('class', `tabs-nav__btn ${btnExtraClass}`);
9866    btn.setAttribute('disabled', 'disabled');
9867    btn.innerHTML = getNavButtonIconHTML();
9868
9869    const accessible = document.createElement('SPAN');
9870    accessible.innerHTML = accessibleText;
9871    accessible.setAttribute('class', 'visually-hidden');
9872    btn.appendChild(accessible);
9873
9874    return btn;
9875  };
9876
9877  const getPrevNavButtonElement = () => {
9878    return getNavButtonElement('tabs-nav__btn--prev', xcart.t('Previous tab'));
9879  };
9880
9881  const getNextNavButtonElement = () => {
9882    return getNavButtonElement('tabs-nav__btn--next', xcart.t('Next tab'));
9883  };
9884
9885  const setNavButtons = () => {
9886    dom.prev = getPrevNavButtonElement();
9887    dom.next = getNextNavButtonElement();
9888
9889    dom.container.parentElement.insertBefore(dom.prev, dom.container);
9890    dom.container.parentElement.appendChild(dom.next);
9891  };
9892
9893  /**
9894   * @param {number} scrollBy
9895   */
9896  const scroll = (scrollBy) => {
9897    dom.container.scrollLeft += scrollBy;
9898  };
9899
9900  const getContainerPaddingRight = () => {
9901    let containerPaddingRight = parseInt(getComputedStyle(dom.container).paddingRight);
9902    if (!containerPaddingRight) {
9903      containerPaddingRight = 0;
9904    }
9905
9906    return Math.max(
9907      containerPaddingRight,
9908      dom.next.getBoundingClientRect().width
9909    );
9910  };
9911
9912  const getContainerPaddingLeft = () => {
9913    let containerPaddingLeft = parseInt(getComputedStyle(dom.container).paddingLeft);
9914    if (!containerPaddingLeft) {
9915      containerPaddingLeft = 0;
9916    }
9917
9918    return Math.max(
9919      containerPaddingLeft,
9920      dom.prev.getBoundingClientRect().width
9921    );
9922  };
9923
9924  const scrollRight = () => {
9925    let firstTab = null;
9926    const containerRect = dom.container.getBoundingClientRect();
9927    const containerPaddingRight = getContainerPaddingRight();
9928
9929    dom.tabs.forEach(
9930      (tab) => {
9931        if (
9932          !firstTab
9933          && tab.getBoundingClientRect().right >= containerRect.right - containerPaddingRight
9934        ) {
9935          firstTab = tab;
9936        }
9937      }
9938    );
9939
9940    if (firstTab) {
9941      scroll(firstTab.getBoundingClientRect().left - containerRect.left - getContainerPaddingLeft());
9942    }
9943  };
9944
9945  /**
9946   * @return {Element|null}
9947   */
9948  const getActiveTab = () => {
9949    let result = null;
9950
9951    dom.tabs.forEach(
9952      (tab) => {
9953        if (
9954          !result
9955          && (
9956            tab.classList.contains('active')
9957            || tab.querySelector('.nav-link.active, [data-tab-navigator].active')
9958          )
9959        ) {
9960          result = tab;
9961        }
9962      }
9963    );
9964
9965    return result;
9966  };
9967
9968  /**
9969   * @param {Element|null} tab
9970   */
9971  const scrollTabIntoView = (tab) => {
9972    if (tab) {
9973      const activeTabRect = tab.getBoundingClientRect();
9974      const containerRect = dom.container.getBoundingClientRect();
9975      const containerPaddingLeft = getContainerPaddingLeft();
9976      const containerPaddingRight = getContainerPaddingRight();
9977
9978      if (activeTabRect.left < containerRect.left + containerPaddingLeft) {
9979        scroll(activeTabRect.left - containerRect.left - containerPaddingLeft);
9980      } else if (activeTabRect.right > containerRect.right - containerPaddingRight) {
9981        scroll(activeTabRect.right - containerRect.right + containerPaddingRight);
9982      }
9983    }
9984  };
9985
9986  const scrollActiveTabIntoView = () => {
9987    scrollTabIntoView(getActiveTab());
9988  };
9989
9990  const scrollLeft = () => {
9991    let firstTab = null;
9992    const containerRect = dom.container.getBoundingClientRect();
9993    const containerPaddingLeft = getContainerPaddingLeft();
9994
9995    for (let i = dom.tabs.length - 1; i >= 0; i--) {
9996      if (dom.tabs[i].getBoundingClientRect().left <= (containerRect.left + containerPaddingLeft)) {
9997        firstTab = dom.tabs[i];
9998        break;
9999      }
10000    }
10001
10002    if (firstTab) {
10003      scroll(getContainerPaddingRight() + firstTab.getBoundingClientRect().right - containerRect.right);
10004    }
10005  };
10006
10007  const isListScrollable = () => {
10008    let result = false;
10009    const containerRect = dom.container.getBoundingClientRect();
10010    dom.tabs.forEach(
10011      (tab) => {
10012        const tabRect = tab.getBoundingClientRect();
10013
10014        if (tabRect.left < containerRect || tabRect.right > containerRect.right) {
10015          result = true;
10016        }
10017      }
10018    );
10019
10020    return result;
10021  };
10022
10023  const updateScrollableState = () => {
10024    const isScrollable = isListScrollable();
10025    const hasScrollableClass = dom.root.classList.contains('tabs-nav--scrollable');
10026
10027    if (isScrollable && !hasScrollableClass) {
10028      dom.root.classList.add('tabs-nav--scrollable');
10029    } else if (!isScrollable && hasScrollableClass) {
10030      dom.root.classList.remove('tabs-nav--scrollable');
10031    }
10032  };
10033
10034  const resizeHandler = () => {
10035    updateNavButtonsState();
10036    scrollActiveTabIntoView();
10037    updateScrollableState();
10038  };
10039
10040  const setEventListeners = () => {
10041    dom.container.addEventListener('scroll', updateNavButtonsState, {passive: true});
10042
10043    dom.next.addEventListener('click', scrollRight);
10044    dom.prev.addEventListener('click', scrollLeft);
10045
10046    dom.tabs.forEach(
10047      (tab) => {
10048        if (options.scrollIntoViewOnClick) {
10049          tab.addEventListener(
10050            'click',
10051            () => {
10052              scrollTabIntoView(tab);
10053            }
10054          );
10055        }
10056      }
10057    );
10058
10059    (new ResizeObserver(resizeHandler)).observe(dom.container);
10060
10061    resizeHandler();
10062    document.addEventListener('DOMContentLoaded', resizeHandler);
10063    window.addEventListener('load', resizeHandler);
10064  };
10065
10066  const init = () => {
10067    setNavButtons();
10068    updateNavButtonsState();
10069    setEventListeners();
10070  };
10071
10072  init();
10073}
10074
10075xcart.microhandlers.add(
10076  'TabsNavigation',
10077  '[data-tabs-navigation]',
10078  function () {
10079    new TabsNavigation(
10080      {
10081        root: this,
10082        container: this.querySelector('[data-tabs-container]'),
10083        list: this.querySelector('[data-tabs-list]'),
10084        tabs: this.querySelectorAll('[data-tab]')
10085      },
10086      {
10087        scrollIntoViewOnClick: this.hasAttribute('data-tabs-nav-scroll-to-view-on-click')
10088      }
10089    );
10090  }
10091);;
10092/* AUTOGENERATED: ajax-categories.js */
10093/* vim: set ts=2 sw=2 sts=2 et: */
10094
10095/**
10096 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
10097 * See https://www.x-cart.com/license-agreement.html for license details.
10098 */
10099
10100const AjaxCategories = function () {
10101  /**
10102   * @param {number} categoryId
10103   * @param {number} level
10104   * @param {string} mode
10105   *
10106   * @return {{url: string}}
10107   */
10108  const getAjaxConfig = (categoryId, level, mode) => (
10109    {
10110      url: xliteConfig.script +
10111        '?target=category&widget=\\XC\\AutoMobileSkin\\Module\\QSL\\FlyoutCategoriesMenu\\View\\TopCategories' +
10112        `&category_id=${categoryId}&level=${level}&mode=${mode}`
10113    }
10114  );
10115
10116  /**
10117   * Render ajax category loader inside a DOM element.
10118   *
10119   * @param {Element} elem
10120   * @param {string} [tag] Loader root tag. Default - 'LI'.
10121   */
10122  this.setLoadingState = (elem, tag) => {
10123    if (!tag) {
10124      tag = 'LI';
10125    }
10126
10127    const root = document.createElement(tag);
10128    root.className = 'top-menu__categories-item--loader';
10129
10130    const waitBlockOverlay = document.createElement('DIV');
10131    waitBlockOverlay.className = 'wait-block-overlay';
10132    root.appendChild(waitBlockOverlay);
10133
10134    const waitBlock = document.createElement('DIV');
10135    waitBlock.className = 'wait-block';
10136    waitBlock.appendChild(document.createElement('DIV'));
10137    waitBlockOverlay.appendChild(waitBlock);
10138
10139    const loader = document.createElement('SPAN');
10140    loader.className = 'flyout-menu-category-loader';
10141    loader.innerHTML = 'Loading';
10142    waitBlockOverlay.appendChild(loader);
10143
10144    elem.appendChild(root);
10145  };
10146
10147  /**
10148   * Remove ajax category loader from a DOM element.
10149   *
10150   * @param {Element} elem
10151   */
10152  this.unsetLoadingState = (elem) => {
10153    elem.querySelectorAll('.top-menu__categories-item--loader').forEach((loader) => {
10154      loader.parentNode.removeChild(loader);
10155    });
10156  };
10157
10158  /**
10159   * @param {number} categoryId
10160   * @param {number} depth
10161   * @param {string} mode
10162   * @param {function} callback
10163   */
10164  this.loadSubcategories = (categoryId, depth, mode, callback) => {
10165    jQuery.ajax(
10166      getAjaxConfig(categoryId, depth, mode)
10167    ).done(
10168      /**
10169       * @param {string} data
10170       */
10171      (data) => {
10172        callback(data);
10173      }
10174    );
10175  };
10176
10177  /**
10178   * @param {Element} elem
10179   * @param {string} [mode]
10180   */
10181  const initCommonHandler = (elem, mode = 'desktop') => {
10182    elem.addEventListener('click', () => {
10183      const item = elem.nextElementSibling;
10184
10185      if (
10186        item
10187        && !item.querySelector(
10188          '.top-menu__categories-item-link, .top-menu__categories-item--loader, .mobile-menu__categories-item-link'
10189        )
10190      ) {
10191        this.setLoadingState(item);
10192
10193        this.loadSubcategories(
10194          parseInt(elem.getAttribute('data-category-id')),
10195          parseInt(elem.getAttribute('data-category-level')),
10196          mode,
10197          (data) => {
10198            this.unsetLoadingState(item);
10199            elem.removeAttribute('data-ajax-category');
10200
10201            xcart.createDOMTreeFromHTML(data).querySelectorAll(
10202              '.top-menu__categories-item:not(.top-menu__categories-item--back), ' +
10203              '.mobile-menu__categories-item:not(.mobile-menu__categories-item--back)'
10204            ).forEach(child => {
10205              item.appendChild(child);
10206            });
10207
10208            if (mode === 'mobile') {
10209              MobileCatalog.getInstance().updateHandlers();
10210            } else {
10211              TopMenu.getInstance().updateButtonHandlers(item);
10212            }
10213
10214            this.init();
10215          }
10216        );
10217      }
10218    });
10219
10220    elem.setAttribute('data-ajax-category-handled', '');
10221  };
10222
10223  /**
10224   * @param {Element} elem
10225   */
10226  const initMobileHandler = (elem) => {
10227    initCommonHandler(elem, 'mobile');
10228  };
10229
10230  this.init = () => {
10231    document.querySelectorAll(
10232      '.top-menu__categories-item-further[data-ajax-category]:not([data-ajax-category-handled])'
10233    ).forEach((btn) => {
10234      initCommonHandler(btn);
10235    });
10236
10237    document.querySelectorAll(
10238      '.mobile_header .mobile-menu__categories-item-link[data-ajax-category]:not([data-ajax-category-handled])'
10239    ).forEach((btn) => {
10240      initMobileHandler(btn);
10241    });
10242  };
10243};
10244
10245AjaxCategories.prototype.instance = null;
10246
10247AjaxCategories.getInstance = () => {
10248  if (!AjaxCategories.prototype.instance) {
10249    AjaxCategories.prototype.instance = new AjaxCategories();
10250    AjaxCategories.prototype.instance.init();
10251  }
10252
10253  return AjaxCategories.prototype.instance;
10254};
10255
10256document.addEventListener('DOMContentLoaded', function () {
10257  AjaxCategories.getInstance();
10258});;
10259/* AUTOGENERATED: init.js */
10260/* vim: set ts=2 sw=2 sts=2 et: */
10261
10262/**
10263 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
10264 * See https://www.x-cart.com/license-agreement.html for license details.
10265 */
10266
10267(function ($) {
10268  var body = $('body'),
10269    cloudSearchData = xcart.getCommentedData(body, 'cloudSearch')
10270
10271  window.Cloud_Search = {
10272    apiUrl: cloudSearchData.apiUrl,
10273    apiKey: cloudSearchData.apiKey,
10274    price_template: cloudSearchData.priceTemplate,
10275    selector: cloudSearchData.selector,
10276    lang: cloudSearchData.lng,
10277    EventHandlers: {OnPopupRender: []},
10278    requestData: _.extend(cloudSearchData.requestData, document.documentElement.lang ? {lang: document.documentElement.lang} : {}),
10279    positionPopupAt: function (searchInput) {
10280      var elem = searchInput.closest('.simple-search-box')
10281
10282      return elem.length === 1 ? elem : searchInput
10283    },
10284    pricesUrl: cloudSearchData.dynamicPricesEnabled
10285      ? URLHandler.buildURL({target: 'cloud_search_api', action: 'get_prices'})
10286      : null
10287  }
10288})(jQuery);;
10289/* AUTOGENERATED: loader.js */
10290/* vim: set ts=2 sw=2 sts=2 et: */
10291
10292/**
10293 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
10294 * See https://www.x-cart.com/license-agreement.html for license details.
10295 */
10296
10297(function () {
10298  var cs = document.createElement('script')
10299  cs.type = 'text/javascript'
10300  cs.async = true
10301  cs.src = 'https://cstatic.x-cart.com/cloud_search_xcart_v2.js'
10302
10303  var s = document.getElementsByTagName('script')[0]
10304  s.parentNode.insertBefore(cs, s)
10305})();;
10306/* AUTOGENERATED: scripts.js */
10307/* vim: set ts=2 sw=2 sts=2 et: */
10308
10309/**
10310 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
10311 * See https://www.x-cart.com/license-agreement.html for license details.
10312 */
10313
10314document.querySelectorAll('.simple-search__back').forEach(btn => {
10315  btn.addEventListener('click', () => {
10316    const csCancelButton = document.querySelector('.cloud-search-mobile__cancel');
10317
10318    if (csCancelButton) {
10319      csCancelButton.click();
10320    }
10321
10322    document.documentElement.classList.remove('cs-mobile-open');
10323    document.documentElement.classList.remove('cloud-search-mobile-open');
10324    document.querySelectorAll('.cloud-search-mobile__input-clear--visible').forEach(block => {
10325      block.classList.remove('cloud-search-mobile__input-clear--visible');
10326    });
10327  });
10328});
10329
10330xcart.microhandlers.add(
10331  'simple-search-add-html-class',
10332  '#search_menu',
10333  function () {
10334    this.addEventListener('click', () => {
10335      document.documentElement.classList.add('cs-mobile-open');
10336    });
10337  }
10338);
10339
10340const csMobilePanelObserver = new MutationObserver(() => {
10341  const csInput = document.querySelector('.cloud-search-mobile__input');
10342
10343  if (csInput && !document.querySelector('.cloud-search-mobile__input-clear')) {
10344    let btn = document.createElement('BUTTON');
10345    const csInputField = csInput.querySelector('input[type="search"]');
10346    const csCancelButton = document.querySelector('.cloud-search-mobile__cancel');
10347    const originalInputField = document.querySelector('#mobile_search input[name="substring"]');
10348    const submitBtn = document.querySelector('#mobile_search .simple-search__submit');
10349
10350    csInputField.addEventListener('input', () => {
10351      btn.classList.toggle('cloud-search-mobile__input-clear--visible', !!csInputField.value);
10352    });
10353
10354    btn.setAttribute('class', 'cloud-search-mobile__input-clear');
10355    btn.addEventListener('click', (e) => {
10356      btn.classList.remove('cloud-search-mobile__input-clear--visible');
10357
10358      if (csCancelButton) {
10359        csCancelButton.click();
10360      }
10361
10362      csInputField.value = '';
10363      csInputField.focus();
10364      e.preventDefault();
10365    });
10366
10367    if (originalInputField && submitBtn && csInputField) {
10368      submitBtn.addEventListener('click', () => {
10369        originalInputField.value = csInputField.value;
10370      });
10371
10372      csInputField.addEventListener('keypress', e => {
10373        if (e.key === 'Enter' || e.code === 'Enter') {
10374          submitBtn.click();
10375          e.stopPropagation();
10376          e.stopImmediatePropagation();
10377          e.preventDefault();
10378        }
10379      });
10380    }
10381
10382    const standardClearButton = document.querySelector('.simple-search__clear');
10383    if (standardClearButton) {
10384      btn.innerHTML = standardClearButton.innerHTML;
10385    }
10386
10387    csInputField.parentNode.appendChild(btn);
10388    csMobilePanelObserver.disconnect();
10389  }
10390});
10391
10392csMobilePanelObserver.observe(
10393  document.querySelector('body'),
10394  {
10395    attributes: false,
10396    characterData: false,
10397    childList: true,
10398    subtree: true
10399  }
10400);;
10401/* AUTOGENERATED: jquery.mmenu.min.all.js */
10402/*
10403 * jQuery mmenu v5.3.3
10404 * @requires jQuery 1.7.0 or later
10405 *
10406 * mmenu.frebsite.nl
10407 *
10408 * Copyright (c) Fred Heusschen
10409 * www.frebsite.nl
10410 *
10411 * Licensed under the MIT license:
10412 * http://en.wikipedia.org/wiki/MIT_License
10413 */
10414!function(e){var t,n,s,a,i="mmenu";e[i]||(e[i]=function(e,t,n){this.$menu=e,this._api=["bind","init","update","setSelected","getInstance","openPanel","closePanel","closeAllPanels"],this.opts=t,this.conf=n,this.vars={},this.cbck={},"function"==typeof this.___deprecated&&this.___deprecated(),this._initMenu(),this._initAnchors();var s=this.$menu.children(this.conf.panelNodetype);return this._initAddons(),this.init(s),"function"==typeof this.___debug&&this.___debug(),this},e[i].version="5.3.3",e[i].addons={},e[i].uniqueId=0,e[i].defaults={extensions:[],navbar:{add:!0,title:"Menu",titleLink:"panel"},onClick:{setSelected:!0},slidingSubmenus:!0},e[i].configuration={classNames:{divider:"Divider",inset:"Inset",panel:"Panel",selected:"Selected",spacer:"Spacer",vertical:"Vertical"},clone:!1,openingInterval:25,panelNodetype:"ul, ol, div",transitionDuration:400},e[i].prototype={init:function(e){e=e.not("."+t.nopanel),e=this._initPanels(e),this.trigger("init",e),this.trigger("update")},update:function(){this.trigger("update")},setSelected:function(e){this.$menu.find("."+t.listview).children().removeClass(t.selected),e.addClass(t.selected),this.trigger("setSelected",e)},openPanel:function(e){var n=e.parent();if(n.hasClass(t.vertical)){var s=n.parents("."+t.subopened);
10414if(s.length)return this.openPanel(s.first());n.addClass(t.opened)}else{if(e.hasClass(t.current))return;var a=this.$menu.children("."+t.panel),i=a.filter("."+t.current);a.removeClass(t.highest).removeClass(t.current).not(e).not(i).not("."+t.vertical).addClass(t.hidden),e.hasClass(t.opened)?e.nextAll("."+t.opened).addClass(t.highest).removeClass(t.opened).removeClass(t.subopened):(e.addClass(t.highest),i.addClass(t.subopened)),e.removeClass(t.hidden).addClass(t.current),setTimeout(function(){e.removeClass(t.subopened).addClass(t.opened)},this.conf.openingInterval)}this.trigger("openPanel",e)},closePanel:function(e){var n=e.parent();n.hasClass(t.vertical)&&(n.removeClass(t.opened),this.trigger("closePanel",e))},closeAllPanels:function(){this.$menu.find("."+t.listview).children().removeClass(t.selected).filter("."+t.vertical).removeClass(t.opened);var e=this.$menu.children("."+t.panel).first();this.$menu.children("."+t.panel).not(e).removeClass(t.subopened).removeClass(t.opened).removeClass(t.current).removeClass(t.highest).addClass(t.hidden),this.openPanel(e)},togglePanel:function(e){var n=e.parent();n.hasClass(t.vertical)&&this[n.hasClass(t.opened)?"closePanel":"openPanel"](e)},getInstance:function(){return this},bind:function(e,t){this.cbck[e]=this.cbck[e]||[],this.cbck[e].push(t)},trigger:function(){var e=Array.prototype.slice.call(arguments),t=e.shift();if(this.cbck[t])for(var n=0,s=this.cbck[t].length;n<s;n++)this.cbck[t][n].apply(this,e)},_initMenu:function(){this.opts.offCanvas&&this.conf.clone&&(this.$menu=this.$menu.clone(!0),this.$menu.add(this.$menu.find("[id]")).filter("[id]").each(function(){e(this).attr("id",t.mm(e(this).attr("id")))})),this.$menu.contents().each(function(){3==e(this)[0].nodeType&&e(this).remove()}),this.$menu.parent().addClass(t.wrapper);var n=[t.menu];this.opts.slidingSubmenus||n.push(t.vertical),this.opts.extensions=this.opts.extensions.length?"mm-"+this.opts.extensions.join(" mm-"):"",this.opts.extensions&&n.push(this.opts.extensions),this.$menu.addClass(n.join(" "))},_initPanels:function(s){var a=this,i=this.__findAddBack(s,"ul, ol");this.__refactorClass(i,this.conf.classNames.inset,"inset").addClass(t.nolistview+" "+t.nopanel),i.not("."+t.nolistview).addClass(t.listview);var l=this.__findAddBack(s,"."+t.listview).children();this.__refactorClass(l,this.conf.classNames.selected,"selected"),this.__refactorClass(l,this.conf.classNames.divider,"divider"),this.__refactorClass(l,this.conf.classNames.spacer,"spacer"),this.__refactorClass(this.__findAddBack(s,"."+this.conf.classNames.panel),this.conf.classNames.panel,"panel");var r=e(),d=s.add(s.find("."+t.panel)).add(this.__findAddBack(s,"."+t.listview).children().children(this.conf.panelNodetype)).not("."+t.nopanel);this.__refactorClass(d,this.conf.classNames.vertical,"vertical"),this.opts.slidingSubmenus||d.addClass(t.vertical),d.each(function(){var n=e(this),s=n;n.is("ul, ol")?(n.wrap('<div class="'+t.panel+'" />'),s=n.parent()):s.addClass(t.panel);var i=n.attr("id");n.removeAttr("id"),s.attr("id",i||a.__getUniqueId()),n.hasClass(t.vertical)&&(n.removeClass(a.conf.classNames.vertical),s.add(s.parent()).addClass(t.vertical)),r=r.add(s)});var o=e("."+t.panel,this.$menu);r.each(function(s){var i=e(this),l=(o=i.parent()).children("a, span").first();if(o.is("."+t.menu)||(o.data(n.sub,i),i.data(n.parent,o)),!o.children("."+t.next).length&&o.parent().is("."+t.listview)){var r=i.attr("id"),d=e('<a class="'+t.next+'" href="#'+r+'" data-target="#'+r+'" />').insertBefore(l);l.is("span")&&d.addClass(t.fullsubopen)}if(!i.children("."+t.navbar).length&&!o.hasClass(t.vertical)){if(o.parent().is("."+t.listview))var o=o.closest("."+t.panel);else o=(l=o.closest("."+t.panel).find('a[href="#'+i.attr("id")+'"]').first()).closest("."+t.panel);var c=e('<div class="'+t.navbar+'" />');if(o.length){r=o.attr("id");switch(a.opts.navbar.titleLink){case"anchor":_url=l.attr("href");break;case"panel":case"parent":_url="#"+r;break;case"none":default:_url=!1}var h=document.createElement("a");h.className=t.title,h.textContent=l.text(),_url&&(h.href=_url),c.append('<a class="'+t.btn+" "+t.prev+'" href="#'+r+'" data-target="#'+r+'"></a>').append(h).prependTo(i),a.opts.navbar.add&&i.addClass(t.hasnavbar)}else a.opts.navbar.title&&(c.append('<a class="'+t.title+'">'+a.opts.navbar.title+"</a>").prependTo(i),a.opts.navbar.add&&i.addClass(t.hasnavbar))}});var c=this.__findAddBack(s,"."+t.listview).children("."+t.selected).removeClass(t.selected).last(
10414).addClass(t.selected);c.add(c.parentsUntil("."+t.menu,"li")).filter("."+t.vertical).addClass(t.opened).end().not("."+t.vertical).each(function(){e(this).parentsUntil("."+t.menu,"."+t.panel).not("."+t.vertical).first().addClass(t.opened).parentsUntil("."+t.menu,"."+t.panel).not("."+t.vertical).first().addClass(t.opened).addClass(t.subopened)}),c.children("."+t.panel).not("."+t.vertical).addClass(t.opened).parentsUntil("."+t.menu,"."+t.panel).not("."+t.vertical).first().addClass(t.opened).addClass(t.subopened);var h=o.filter("."+t.opened);return h.length||(h=r.first()),h.addClass(t.opened).last().addClass(t.current),r.not("."+t.vertical).not(h.last()).addClass(t.hidden).end().appendTo(this.$menu),r},_initAnchors:function(){var n=this;a.$body.on(s.click+"-oncanvas","a[href]",function(s){var l=e(this),r=!1,d=n.$menu.find(l).length;for(var o in e[i].addons)if(r=e[i].addons[o].clickAnchor.call(n,l,d))break;if(!r&&d){var c=l.attr("href");if(c.length>1&&"#"==c.slice(0,1))try{var h=e(c,n.$menu);h.is("."+t.panel)&&(r=!0,n[l.parent().hasClass(t.vertical)?"togglePanel":"openPanel"](h))}catch(e){}}if(r&&s.preventDefault(),!r&&d&&l.is("."+t.listview+" > li > a")&&!l.is('[rel="external"]')&&!l.is('[target="_blank"]')){n.__valueOrFn(n.opts.onClick.setSelected,l)&&n.setSelected(e(s.target).parent());var u=n.__valueOrFn(n.opts.onClick.preventDefault,l,"#"==c.slice(0,1));u&&s.preventDefault(),n.__valueOrFn(n.opts.onClick.blockUI,l,!u)&&a.$html.addClass(t.blocking),n.__valueOrFn(n.opts.onClick.close,l,u)&&n.close()}})},_initAddons:function(){for(var t in e[i].addons)e[i].addons[t].add.call(this),e[i].addons[t].add=function(){};for(var t in e[i].addons)e[i].addons[t].setup.call(this)},__api:function(){var t=this,n={};return e.each(this._api,function(e){var s=this;n[s]=function(){var e=t[s].apply(t,arguments);return void 0===e?n:e}}),n},__valueOrFn:function(e,t,n){return"function"==typeof e?e.call(t[0]):void 0===e&&void 0!==n?n:e},__refactorClass:function(e,n,s){return e.filter("."+n).removeClass(n).addClass(t[s])},__findAddBack:function(e,t){return e.find(t).add(e.filter(t))},__filterListItems:function(e){return e.not("."+t.divider).not("."+t.hidden)},__transitionend:function(e,t,n){var a=!1,i=function(){a||t.call(e[0]),a=!0};e.one(s.transitionend,i),e.one(s.webkitTransitionEnd,i),setTimeout(i,1.1*n)},__getUniqueId:function(){return t.mm(e[i].uniqueId++)}},e.fn[i]=function(l,r){return function(){if(e[i].glbl)return;a={$wndw:e(window),$html:e("html"),$body:e("body")},t={},n={},s={},e.each([t,n,s],function(e,t){t.add=function(e){e=e.split(" ");for(var n=0,s=e.length;n<s;n++)t[e[n]]=t.mm(e[n])}}),t.mm=function(e){return"mm-"+e},t.add("wrapper menu panel nopanel current highest opened subopened navbar hasnavbar title btn prev next listview nolistview inset vertical selected divider spacer hidden fullsubopen"),t.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},n.mm=function(e){return"mm-"+e},n.add("parent sub"),s.mm=function(e){return e+".mm"},s.add("transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend click keydown"),e[i]._c=t,e[i]._d=n,e[i]._e=s,e[i].glbl=a}(),l=e.extend(!0,{},e[i].defaults,l),r=e.extend(!0,{},e[i].configuration,r),this.each(function(){var t=e(this);if(!t.data(i)){var n=new e[i](t,l,r);t.data(i,n.__api())}})},e[i].support={touch:"ontouchstart"in window||navigator.msMaxTouchPoints})}(jQuery);
10415/*
10416 * jQuery mmenu offCanvas addon
10417 * mmenu.frebsite.nl
10418 *
10419 * Copyright (c) Fred Heusschen
10420 */
10421!function(t){var e="mmenu",o="offCanvas";t[e].addons[o]={setup:function(){if(this.opts[o]){var n=this.opts[o],i=this.conf[o];a=t[e].glbl,this._api=t.merge(this._api,["open","close","setPage"]),("top"==n.position||"bottom"==n.position)&&(n.zposition="front"),"string"!=typeof i.pageSelector&&(i.pageSelector="> "+i.pageNodetype),a.$allMenus=(a.$allMenus||t()).add(this.$menu),this.vars.opened=!1;var r=[s.offcanvas];"left"!=n.position&&r.push(s.mm(n.position)),"back"!=n.zposition&&r.push(s.mm(n.zposition)),this.$menu.addClass(r.join(" ")).parent().removeClass(s.wrapper),this.setPage(a.$page),this._initBlocker(),this["_initWindow_"+o](),this.$menu[i.menuInjectMethod+"To"](i.menuWrapperSelector)}},add:function(){s=t[e]._c,n=t[e]._d,i=t[e]._e,s.add("offcanvas slideout modal background opening blocker page"),n.add("style"),i.add("resize")},clickAnchor:function(t){if(!this.opts[o])return!1;var e=this.$menu.attr("id");if(e&&e.length&&(this.conf.clone&&(e=s.umm(e)),t.is('[href="#'+e+'"]')))return this.open(),!0;if(a.$page){var e=a.$page.first().attr("id");return e&&e.length&&t.is('[href="#'+e+'"]')?(this.close(),!0):!1}}},t[e].defaults[o]={position:"left",zposition:"back",modal:!1,moveBackgroun
10421d:!0},t[e].configuration[o]={pageNodetype:"div",pageSelector:null,wrapPageIfNeeded:!0,menuWrapperSelector:"body",menuInjectMethod:"prepend"},t[e].prototype.open=function(){if(!this.vars.opened){var t=this;this._openSetup(),setTimeout(function(){t._openFinish()},this.conf.openingInterval),this.trigger("open")}},t[e].prototype._openSetup=function(){var e=this;this.closeAllOthers(),a.$page.each(function(){t(this).data(n.style,t(this).attr("style")||"")}),a.$wndw.trigger(i.resize+"-offcanvas",[!0]);var r=[s.opened];this.opts[o].modal&&r.push(s.modal),this.opts[o].moveBackground&&r.push(s.background),"left"!=this.opts[o].position&&r.push(s.mm(this.opts[o].position)),"back"!=this.opts[o].zposition&&r.push(s.mm(this.opts[o].zposition)),this.opts.extensions&&r.push(this.opts.extensions),a.$html.addClass(r.join(" ")),setTimeout(function(){e.vars.opened=!0},this.conf.openingInterval),this.$menu.addClass(s.current+" "+s.opened)},t[e].prototype._openFinish=function(){var t=this;this.__transitionend(a.$page.first(),function(){t.trigger("opened")},this.conf.transitionDuration),a.$html.addClass(s.opening),this.trigger("opening")},t[e].prototype.close=function(){if(this.vars.opened){var e=this;this.__transitionend(a.$page.first(),function(){e.$menu.removeClass(s.current).removeClass(s.opened),a.$html.removeClass(s.opened).removeClass(s.modal).removeClass(s.background).removeClass(s.mm(e.opts[o].position)).removeClass(s.mm(e.opts[o].zposition)),e.opts.extensions&&a.$html.removeClass(e.opts.extensions),a.$page.each(function(){t(this).attr("style",t(this).data(n.style))}),e.vars.opened=!1,e.trigger("closed")},this.conf.transitionDuration),a.$html.removeClass(s.opening),this.trigger("close"),this.trigger("closing")}},t[e].prototype.closeAllOthers=function(){a.$allMenus.not(this.$menu).each(function(){var o=t(this).data(e);o&&o.close&&o.close()})},t[e].prototype.setPage=function(e){var n=this,i=this.conf[o];e&&e.length||(e=a.$body.find(i.pageSelector),e.length>1&&i.wrapPageIfNeeded&&(e=e.wrapAll("<"+this.conf[o].pageNodetype+" />").parent())),e.each(function(){t(this).attr("id",t(this).attr("id")||n.__getUniqueId())}),e.addClass(s.page+" "+s.slideout),a.$page=e,this.trigger("setPage",e)},t[e].prototype["_initWindow_"+o]=function(){a.$wndw.off(i.keydown+"-offcanvas").on(i.keydown+"-offcanvas",function(t){return a.$html.hasClass(s.opened)&&9==t.keyCode?(t.preventDefault(),!1):void 0});var t=0;a.$wndw.off(i.resize+"-offcanvas").on(i.resize+"-offcanvas",function(e,o){if(1==a.$page.length&&(o||a.$html.hasClass(s.opened))){var n=a.$wndw.height();(o||n!=t)&&(t=n,a.$page.css("minHeight",n))}})},t[e].prototype._initBlocker=function(){var e=this;a.$blck||(a.$blck=t('<div id="'+s.blocker+'" class="'+s.slideout+'" />')),a.$blck.appendTo(a.$body).off(i.touchstart+"-offcanvas "+i.touchmove+"-offcanvas").on(i.touchstart+"-offcanvas "+i.touchmove+"-offcanvas",function(t){t.preventDefault(),t.stopPropagation(),a.$blck.trigger(i.mousedown+"-offcanvas")}).off(i.mousedown+"-offcanvas").on(i.mousedown+"-offcanvas",function(t){t.preventDefault(),a.$html.hasClass(s.modal)||(e.closeAllOthers(),e.close())})};var s,n,i,a}(jQuery);
10422/*
10423 * jQuery mmenu autoHeight addon
10424 * mmenu.frebsite.nl
10425 *
10426 * Copyright (c) Fred Heusschen
10427 */
10428!function(t){var e="mmenu",i="autoHeight";t[e].addons[i]={setup:function(){if(this.opts.offCanvas){switch(this.opts.offCanvas.position){case"left":case"right":return}var n=this,o=this.opts[i];if(this.conf[i],h=t[e].glbl,"boolean"==typeof o&&o&&(o={height:"auto"}),"object"!=typeof o&&(o={}),o=this.opts[i]=t.extend(!0,{},t[e].defaults[i],o),"auto"==o.height){this.$menu.addClass(s.autoheight);var u=function(t){var e=this.$menu.children("."+s.current);_top=parseInt(e.css("top"),10)||0,_bot=parseInt(e.css("bottom"),10)||0,this.$menu.addClass(s.measureheight),t=t||this.$menu.children("."+s.current),t.is("."+s.vertical)&&(t=t.parents("."+s.panel).not("."+s.vertical).first()),this.$menu.height(t.outerHeight()+_top+_bot).removeClass(s.measureheight)};this.bind("update",u),this.bind("openPanel",u),this.bind("closePanel",u),this.bind("open",u),h.$wndw.off(a.resize+"-autoheight").on(a.resize+"-autoheight",function(){u.call(n)})}}},add:function(){s=t[e]._c,n=t[e]._d,a=t[e]._e,s.add("autoheight measureheight"),a.add("resize")},clickAnchor:function(){}},t[e].defaults[i]={height:"default"};var s,n,a,h}(jQuery);
10429/*
10430 * jQuery mmenu backButton addon
10431 * mmenu.frebsite.nl
10432 *
10433 * Copyright (c) Fred Heusschen
10434 */
10435!function(o){var t="mmenu",n="backButton";o[t].addons[n]={setup:function(){if(this.opts.offCanvas){var i=this,e=this.opts[n];if(this.conf[n],a=o[t].glbl,"boolean"==typeof e&&(e={close:e}),"object"!=typeof e&&(e={}),e=o.extend(!0,{},o[t].defaults[n],e),e.close){var c="#"+i.$menu.attr("id");this.bind("opened",function(){location.hash!=c&&history.pushState(null,document.title,c)}),o(window).on("popstate",function(o){a.$html.hasClass(s.opened)?(o.stopPropagation(),i.close()):location.hash==c&&(o.stopPropagation(),i.open())})}}},add:function(){return window.history&&window.history.pushState?(s=o[t]._c,i=o[t]._d,e=o[t]._e,void 0):(o[t].addons[n].setup=function(){},void 0)},clickAnchor:function(){}},o[t].defaults[n]={close:!1};var s,i,e,a}(jQuery);
10436/*
10437 * jQuery mmenu counters addon
10438 * mmenu.frebsite.nl
10439 *
10440 * Copyright (c) Fred Heusschen
10441 */
10442!function(t){var n="mmenu",e="counters";t[n].addons[e]={setup:function(){var c=this,o=this.opts[e];this.conf[e],s=t[n].glbl,"boolean"==typeof o&&(o={add:o,update:o}),"object"!=typeof o&&(o={}),o=this.opts[e]=t.extend(!0,{},t[n].defaults[e],o),this.bind("init",function(n){this.__refactorClass(t("em",n),this.conf.classNames[e].counter,"counter")}),o.add&&this.bind("init",function(n){n.each(function(){var n=t(this).data(a.parent);
10442n&&(n.children("em."+i.counter).length||n.prepend(t('<em class="'+i.counter+'" />')))})}),o.update&&this.bind("update",function(){this.$menu.find("."+i.panel).each(function(){var n=t(this),e=n.data(a.parent);if(e){var s=e.children("em."+i.counter);s.length&&(n=n.children("."+i.listview),n.length&&s.html(c.__filterListItems(n.children()).length))}})})},add:function(){i=t[n]._c,a=t[n]._d,c=t[n]._e,i.add("counter search noresultsmsg")},clickAnchor:function(){}},t[n].defaults[e]={add:!1,update:!1},t[n].configuration.classNames[e]={counter:"Counter"};var i,a,c,s}(jQuery);
10443/*
10444 * jQuery mmenu dividers addon
10445 * mmenu.frebsite.nl
10446 *
10447 * Copyright (c) Fred Heusschen
10448 */
10449!function(i){var e="mmenu",s="dividers";i[e].addons[s]={setup:function(){var n=this,a=this.opts[s];if(this.conf[s],l=i[e].glbl,"boolean"==typeof a&&(a={add:a,fixed:a}),"object"!=typeof a&&(a={}),a=this.opts[s]=i.extend(!0,{},i[e].defaults[s],a),this.bind("init",function(){this.__refactorClass(i("li",this.$menu),this.conf.classNames[s].collapsed,"collapsed")}),a.add&&this.bind("init",function(e){switch(a.addTo){case"panels":var s=e;break;default:var s=i(a.addTo,this.$menu).filter("."+d.panel)}i("."+d.divider,s).remove(),s.find("."+d.listview).not("."+d.vertical).each(function(){var e="";n.__filterListItems(i(this).children()).each(function(){var s=i.trim(i(this).children("a, span").text()).slice(0,1).toLowerCase();s!=e&&s.length&&(e=s,i('<li class="'+d.divider+'">'+s+"</li>").insertBefore(this))})})}),a.collapse&&this.bind("init",function(e){i("."+d.divider,e).each(function(){var e=i(this),s=e.nextUntil("."+d.divider,"."+d.collapsed);s.length&&(e.children("."+d.subopen).length||(e.wrapInner("<span />"),e.prepend('<a href="#" class="'+d.subopen+" "+d.fullsubopen+'" />')))})}),a.fixed){var o=function(e){e=e||this.$menu.children("."+d.current);var s=e.find("."+d.divider).not("."+d.hidden);if(s.length){this.$menu.addClass(d.hasdividers);var n=e.scrollTop()||0,t="";e.is(":visible")&&e.find("."+d.divider).not("."+d.hidden).each(function(){i(this).position().top+n<n+1&&(t=i(this).text())}),this.$fixeddivider.text(t)}else this.$menu.removeClass(d.hasdividers)};this.$fixeddivider=i('<ul class="'+d.listview+" "+d.fixeddivider+'"><li class="'+d.divider+'"></li></ul>').prependTo(this.$menu).children(),this.bind("openPanel",o),this.bind("init",function(e){e.off(t.scroll+"-dividers "+t.touchmove+"-dividers").on(t.scroll+"-dividers "+t.touchmove+"-dividers",function(){o.call(n,i(this))})})}},add:function(){d=i[e]._c,n=i[e]._d,t=i[e]._e,d.add("collapsed uncollapsed fixeddivider hasdividers"),t.add("scroll")},clickAnchor:function(i,e){if(this.opts[s].collapse&&e){var n=i.parent();if(n.is("."+d.divider)){var t=n.nextUntil("."+d.divider,"."+d.collapsed);return n.toggleClass(d.opened),t[n.hasClass(d.opened)?"addClass":"removeClass"](d.uncollapsed),!0}}return!1}},i[e].defaults[s]={add:!1,addTo:"panels",fixed:!1,collapse:!1},i[e].configuration.classNames[s]={collapsed:"Collapsed"};var d,n,t,l}(jQuery);
10450/*
10451 * jQuery mmenu dragOpen addon
10452 * mmenu.frebsite.nl
10453 *
10454 * Copyright (c) Fred Heusschen
10455 */
10456!function(e){function t(e,t,n){return t>e&&(e=t),e>n&&(e=n),e}var n="mmenu",o="dragOpen";e[n].addons[o]={setup:function(){if(this.opts.offCanvas){var i=this,a=this.opts[o],p=this.conf[o];if(r=e[n].glbl,"boolean"==typeof a&&(a={open:a}),"object"!=typeof a&&(a={}),a=this.opts[o]=e.extend(!0,{},e[n].defaults[o],a),a.open){var d,f,c,u,h,l={},m=0,g=!1,v=!1,w=0,_=0;switch(this.opts.offCanvas.position){case"left":case"right":l.events="panleft panright",l.typeLower="x",l.typeUpper="X",v="width";break;case"top":case"bottom":l.events="panup pandown",l.typeLower="y",l.typeUpper="Y",v="height"}switch(this.opts.offCanvas.position){case"right":case"bottom":l.negative=!0,u=function(e){e>=r.$wndw[v]()-a.maxStartPos&&(m=1)};break;default:l.negative=!1,u=function(e){e<=a.maxStartPos&&(m=1)}}switch(this.opts.offCanvas.position){case"left":l.open_dir="right",l.close_dir="left";break;case"right":l.open_dir="left",l.close_dir="right";break;case"top":l.open_dir="down",l.close_dir="up";break;case"bottom":l.open_dir="up",l.close_dir="down"}switch(this.opts.offCanvas.zposition){case"front":h=function(){return this.$menu};break;default:h=function(){return e("."+s.slideout)}}var b=this.__valueOrFn(a.pageNode,this.$menu,r.$page);"string"==typeof b&&(b=e(b));var y=new Hammer(b[0],a.vendors.hammer);y.on("panstart",function(e){u(e.center[l.typeLower]),r.$slideOutNodes=h(),g=l.open_dir}).on(l.events+" panend",function(e){m>0&&e.preventDefault()}).on(l.events,function(e){if(d=e["delta"+l.typeUpper],l.negative&&(d=-d),d!=w&&(g=d>=w?l.open_dir:l.close_dir),w=d,w>a.threshold&&1==m){if(r.$html.hasClass(s.opened))return;m=2,i._openSetup(),i.trigger("opening"),r.$html.addClass(s.dragging),_=t(r.$wndw[v]()*p[v].perc,p[v].min,p[v].max)}2==m&&(f=t(w,10,_)-("front"==i.opts.offCanvas.zposition?_:0),l.negative&&(f=-f),c="translate"+l.typeUpper+"("+f+"px )",r.$slideOutNodes.css({"-webkit-transform":"-webkit-"+c,transform:c}))}).on("panend",function(){2==m&&(r.$html.removeClass(s.dragging),r.$slideOutNodes.css("transform",""),i[g==l.open_dir?"_openFinish":"close"]()),m=0})}}},add:function(){return"function"!=typeof Hammer||Hammer.VERSION<2?(e[n].addons[o].setup=function(){},void 0):(s=e[n]._c,i=e[n]._d,a=e[n]._e,s.add("dragging"),void 0)},clickAnchor:function(){}},e[n].defaults[o]={open:!1,maxStartPos:100,threshold:50,vendors:{hammer
10456:{}}},e[n].configuration[o]={width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}};var s,i,a,r}(jQuery);
10457/*
10458 * jQuery mmenu fixedElements addon
10459 * mmenu.frebsite.nl
10460 *
10461 * Copyright (c) Fred Heusschen
10462 */
10463!function(i){var s="mmenu",n="fixedElements";i[s].addons[n]={setup:function(){if(this.opts.offCanvas){this.opts[n],this.conf[n],o=i[s].glbl;var a=function(i){var s=this.conf.classNames[n].fixed;this.__refactorClass(i.find("."+s),s,"slideout").appendTo(o.$body)};a.call(this,o.$page),this.bind("setPage",a)}},add:function(){a=i[s]._c,t=i[s]._d,e=i[s]._e,a.add("fixed")},clickAnchor:function(){}},i[s].configuration.classNames[n]={fixed:"Fixed"};var a,t,e,o}(jQuery);
10464/*
10465 * jQuery mmenu iconPanels addon
10466 * mmenu.frebsite.nl
10467 *
10468 * Copyright (c) Fred Heusschen
10469 */
10470!function(e){var n="mmenu",i="iconPanels";e[n].addons[i]={setup:function(){var a=this,l=this.opts[i];if(this.conf[i],d=e[n].glbl,"boolean"==typeof l&&(l={add:l}),"number"==typeof l&&(l={add:!0,visible:l}),"object"!=typeof l&&(l={}),l=this.opts[i]=e.extend(!0,{},e[n].defaults[i],l),l.visible++,l.add){this.$menu.addClass(s.iconpanel);for(var t=[],o=0;o<=l.visible;o++)t.push(s.iconpanel+"-"+o);t=t.join(" ");var c=function(n){var i=a.$menu.children("."+s.panel).removeClass(t),d=i.filter("."+s.subopened);d.removeClass(s.hidden).add(n).slice(-l.visible).each(function(n){e(this).addClass(s.iconpanel+"-"+n)})};this.bind("openPanel",c),this.bind("init",function(n){c.call(a,a.$menu.children("."+s.current)),l.hideNavbars&&n.removeClass(s.hasnavbar),n.each(function(){e(this).children("."+s.subblocker).length||e(this).prepend('<a href="#'+e(this).closest("."+s.panel).attr("id")+'" class="'+s.subblocker+'" />')})})}},add:function(){s=e[n]._c,a=e[n]._d,l=e[n]._e,s.add("iconpanel subblocker")},clickAnchor:function(){}},e[n].defaults[i]={add:!1,visible:3,hideNavbars:!1};var s,a,l,d}(jQuery);
10471/*
10472 * jQuery mmenu navbar addon
10473 * mmenu.frebsite.nl
10474 *
10475 * Copyright (c) Fred Heusschen
10476 */
10477!function(n){var a="mmenu",e="navbars";n[a].addons[e]={setup:function(){var r=this,i=this.opts[e],c=this.conf[e];if(s=n[a].glbl,"undefined"!=typeof i){i instanceof Array||(i=[i]);var d={};n.each(i,function(s){var o=i[s];"boolean"==typeof o&&o&&(o={}),"object"!=typeof o&&(o={}),"undefined"==typeof o.content&&(o.content=["prev","title"]),o.content instanceof Array||(o.content=[o.content]),o=n.extend(!0,{},r.opts.navbar,o);var l=o.position,h=o.height;"number"!=typeof h&&(h=1),h=Math.min(4,Math.max(1,h)),"bottom"!=l&&(l="top"),d[l]||(d[l]=0),d[l]++;var f=n("<div />").addClass(t.navbar+" "+t.navbar+"-"+l+" "+t.navbar+"-"+l+"-"+d[l]+" "+t.navbar+"-size-"+h);d[l]+=h-1;for(var v=0,u=o.content.length;u>v;v++){var p=n[a].addons[e][o.content[v]]||!1;p?p.call(r,f,o,c):(p=o.content[v],p instanceof n||(p=n(o.content[v])),p.each(function(){f.append(n(this))}))}var b=Math.ceil(f.children().not("."+t.btn).length/h);b>1&&f.addClass(t.navbar+"-content-"+b),f.children("."+t.btn).length&&f.addClass(t.hasbtns),f.prependTo(r.$menu)});for(var o in d)r.$menu.addClass(t.hasnavbar+"-"+o+"-"+d[o])}},add:function(){t=n[a]._c,r=n[a]._d,i=n[a]._e,t.add("close hasbtns")},clickAnchor:function(){}},n[a].configuration[e]={breadcrumbSeparator:"/"},n[a].configuration.classNames[e]={panelTitle:"Title",panelNext:"Next",panelPrev:"Prev"};var t,r,i,s}(jQuery),/*
10478 * jQuery mmenu navbar addon breadcrumbs content
10479 * mmenu.frebsite.nl
10480 *
10481 * Copyright (c) Fred Heusschen
10482 */
10483    function(n){var a="mmenu",e="navbars",t="breadcrumbs";n[a].addons[e][t]=function(e,t,r){var i=n[a]._c,s=n[a]._d;i.add("breadcrumbs separator"),e.append('<span class="'+i.breadcrumbs+'"></span>'),this.bind("init",function(a){a.removeClass(i.hasnavbar).each(function(){for(var a=[],e=n(this),t=n('<span class="'+i.breadcrumbs+'"></span>'),c=n(this).children().first(),d=!0;c&&c.length;){c.is("."+i.panel)||(c=c.closest("."+i.panel));var o=c.children("."+i.navbar).children("."+i.title).text();a.unshift(d?"<span>"+o+"</span>":'<a href="#'+c.attr("id")+'">'+o+"</a>"),d=!1,c=c.data(s.parent)}t.append(a.join('<span class="'+i.separator+'">'+r.breadcrumbSeparator+"</span>")).appendTo(e.children("."+i.navbar))})});var c=function(){var n=this.$menu.children("."+i.current),a=e.find("."+i.breadcrumbs),t=n.children("."+i.navbar).children("."+i.breadcrumbs);a.html(t.html())};this.bind("openPanel",c),this.bind("init",c)}}(jQuery),/*
10484 * jQuery mmenu navbar addon close content
10485 * mmenu.frebsite.nl
10486 *
10487 * Copyright (c) Fred Heusschen
10488 */
10489    function(n){var a="mmenu",e="navbars",t="close";n[a].addons[e][t]=function(e){var t=n[a]._c,r=n[a].glbl;e.append('<a class="'+t.close+" "+t.btn+'" href="#"></a>');var i=function(n){e.find("."+t.close).attr("href","#"+n.attr("id"))};i.call(this,r.$page),this.bind("setPage",i)}}(jQuery),/*
10490 * jQuery mmenu navbar addon next content
10491 * mmenu.frebsite.nl
10492 *
10493 * Copyright (c) Fred Heusschen
10494 */
10495    function(n){var a="mmenu",e="navbars",t="next";n[a].addons[e][t]=function(t){var r=n[a]._c;t.append('<a class="'+r.next+" "+r.btn+'" href="#"></a>');var i=function(n){n=n||this.$menu.children("."+r.current);var a=t.find("."+r.next),i=n.find("."+this.conf.classNames[e].panelNext),s=i.attr("href"),c=i.html();a[s?"attr":"removeAttr"]("href",s),a[s||c?"removeClass":"addClass"](r.hidden),a.html(c)};this.bind("openPanel",i),this.bind("init",function(){i.call(this)})}}(jQuery),/*
10496 * jQuery mmenu navbar addon prev content
10497 * mmenu.frebsite.nl
10498 *
10499 * Copyright (c) Fred Heusschen
10500 */
10501    function(n){var a="mmenu",e="navbars",t="prev";n[a].addons[e][t]=function(t){var r=n[a]._c;t.append('<a class="'+r.prev+" "+r.btn+'" href="#"></a>'),this.bind("init",function(n){n.removeClass(r.hasnavbar)});var i=function(){var n=this.$menu.children("."+r.current),a=t.find("."+r.prev),i=n.find("."+this.conf.classNames[e].panelPrev);i.length||(i=n.children("."+r.navbar).children("."+r.prev));var s=i.attr("href"),c=i.html();a[s?"attr":"removeAttr"]("href",s),a[s||c?"removeClass":"addClass"](r.hidden),a.html(c)};this.bind("openPanel",i),this.bind("init",i)}}(jQuery),/*
10502 * jQuery mmenu navbar addon searchfield content
10503 * mmenu.frebsite.nl
10504 *
10505 * Copyright (c) Fred Heusschen
10506 */
10507    function(n){var a="mmenu",e="navbars",t="searchfield";n[a].addons[e][t]=function(e){var t=n[a]._c,r=n('<div class="'+t.search+'" />').appendTo(e);"object"!=typeof this.opts.searchfield&&(this.opts.searchfield={}),this.opts.searchfield.add=!0,this.opts.searchfield.addTo=r}}(jQuery),/*
10508 * jQuery mmenu navbar addon title content
10509 * mmenu.frebsite.nl
10510 *
10511 * Copyright (c) Fred Heusschen
10512 */
10513    function(n){var a="mmenu",e="navbars",t="title";n[a].addons[e][t]=function(t,r){var i=n[a]._c;t.append('<a class="'+i.title+'"></a>');var s=function(n){n=n||this.$menu.children("."+i.current);var a=t.find("."+i.title),s=n.find("."+this.conf.classNames[e].panelTitle);s.length||(s=n.children("."+i.navbar).children("."+i.title));var c=s.attr("href"),d=s.html()||r.title;a[c?"attr":"removeAttr"]("href",c),a[c||d?"removeClass":"addClass"](i.hidden),a.html(d)};
10513this.bind("openPanel",s),this.bind("init",function(){s.call(this)})}}(jQuery);
10514/*
10515 * jQuery mmenu searchfield addon
10516 * mmenu.frebsite.nl
10517 *
10518 * Copyright (c) Fred Heusschen
10519 */
10520!function(e){function s(e){switch(e){case 9:case 16:case 17:case 18:case 37:case 38:case 39:case 40:return!0}return!1}var n="mmenu",a="searchfield";e[n].addons[a]={setup:function(){var o=this,d=this.opts[a],c=this.conf[a];r=e[n].glbl,"boolean"==typeof d&&(d={add:d}),"object"!=typeof d&&(d={}),d=this.opts[a]=e.extend(!0,{},e[n].defaults[a],d),this.bind("close",function(){this.$menu.find("."+t.search).find("input").blur()}),this.bind("init",function(n){if(d.add){switch(d.addTo){case"panels":var a=n;break;default:var a=e(d.addTo,this.$menu)}a.each(function(){var s=e(this);if(!s.is("."+t.panel)||!s.is("."+t.vertical)){if(!s.children("."+t.search).length){var n=c.form?"form":"div",a=e("<"+n+' class="'+t.search+'" />');if(c.form&&"object"==typeof c.form)for(var l in c.form)a.attr(l,c.form[l]);a.append('<input placeholder="'+d.placeholder+'" type="text" autocomplete="off" />'),s.hasClass(t.search)?s.replaceWith(a):s.prepend(a).addClass(t.hassearch)}if(d.noResults){var i=s.closest("."+t.panel).length;if(i||(s=o.$menu.children("."+t.panel).first()),!s.children("."+t.noresultsmsg).length){var r=s.children("."+t.listview).first();e('<div class="'+t.noresultsmsg+'" />').append(d.noResults)[r.length?"insertAfter":"prependTo"](r.length?r:s)}}}}),d.search&&e("."+t.search,this.$menu).each(function(){var n=e(this),a=n.closest("."+t.panel).length;if(a)var r=n.closest("."+t.panel),c=r;else var r=e("."+t.panel,o.$menu),c=o.$menu;var h=n.children("input"),u=o.__findAddBack(r,"."+t.listview).children("li"),f=u.filter("."+t.divider),p=o.__filterListItems(u),v="> a",m=v+", > span",b=function(){var s=h.val().toLowerCase();r.scrollTop(0),p.add(f).addClass(t.hidden).find("."+t.fullsubopensearch).removeClass(t.fullsubopen).removeClass(t.fullsubopensearch),p.each(function(){var n=e(this),a=v;(d.showTextItems||d.showSubPanels&&n.find("."+t.next))&&(a=m),e(a,n).text().toLowerCase().indexOf(s)>-1&&n.add(n.prevAll("."+t.divider).first()).removeClass(t.hidden)}),d.showSubPanels&&r.each(function(){var s=e(this);o.__filterListItems(s.find("."+t.listview).children()).each(function(){var s=e(this),n=s.data(l.sub);s.removeClass(t.nosubresults),n&&n.find("."+t.listview).children().removeClass(t.hidden)})}),e(r.get().reverse()).each(function(s){var n=e(this),i=n.data(l.parent);i&&(o.__filterListItems(n.find("."+t.listview).children()).length?(i.hasClass(t.hidden)&&i.children("."+t.next).not("."+t.fullsubopen).addClass(t.fullsubopen).addClass(t.fullsubopensearch),i.removeClass(t.hidden).removeClass(t.nosubresults).prevAll("."+t.divider).first().removeClass(t.hidden)):a||(n.hasClass(t.opened)&&setTimeout(function(){o.openPanel(i.closest("."+t.panel))},1.5*(s+1)*o.conf.openingInterval),i.addClass(t.nosubresults)))}),c[p.not("."+t.hidden).length?"removeClass":"addClass"](t.noresults),this.update()};h.off(i.keyup+"-searchfield "+i.change+"-searchfield").on(i.keyup+"-searchfield",function(e){s(e.keyCode)||b.call(o)}).on(i.change+"-searchfield",function(){b.call(o)})})}})},add:function(){t=e[n]._c,l=e[n]._d,i=e[n]._e,t.add("search hassearch noresultsmsg noresults nosubresults fullsubopensearch"),i.add("change keyup")},clickAnchor:function(){}},e[n].defaults[a]={add:!1,addTo:"panels",search:!0,placeholder:"Search",noResults:"No results found.",showTextItems:!1,showSubPanels:!0},e[n].configuration[a]={form:!1};var t,l,i,r}(jQuery);
10521/*
10522 * jQuery mmenu sectionIndexer addon
10523 * mmenu.frebsite.nl
10524 *
10525 * Copyright (c) Fred Heusschen
10526 */
10527!function(e){var a="mmenu",r="sectionIndexer";e[a].addons[r]={setup:function(){var i=this,d=this.opts[r];this.conf[r],s=e[a].glbl,"boolean"==typeof d&&(d={add:d}),"object"!=typeof d&&(d={}),d=this.opts[r]=e.extend(!0,{},e[a].defaults[r],d),this.bind("init",function(a){if(d.add){switch(d.addTo){case"panels":var r=a;break;default:var r=e(d.addTo,this.$menu).filter("."+n.panel)}r.find("."+n.divider).closest("."+n.panel).addClass(n.hasindexer)}if(!this.$indexer&&this.$menu.children("."+n.hasindexer).length){this.$indexer=e('<div class="'+n.indexer+'" />').prependTo(this.$menu).append('<a href="#a">a</a><a href="#b">b</a><a href="#c">c</a><a href="#d">d</a><a href="#e">e</a><a href="#f">f</a><a href="#g">g</a><a href="#h">h</a><a href="#i">i</a><a href="#j">j</a><a href="#k">k</a><a href="#l">l</a><a href="#m">m</a><a href="#n">n</a><a href="#o">o</a><a href="#p">p</a><a href="#q">q</a><a href="#r">r</a><a href="#s">s</a><a href="#t">t</a><a href="#u">u</a><a href="#v">v</a><a href="#w">w</a><a href="#x">x</a><a href="#y">y</a><a href="#z">z</a>'),this.$indexer.children().on(t.mouseover+"-sectionindexer "+n.touchstart+"-sectionindexer",function(){var a=e(this).attr("href").slice(1),r=i.$menu.children("."+n.current),t=r.find("."+n.listview),s=!1,d=r.scrollTop(),h=t.position().top+parseInt(t.css("margin-top"),10)+parseInt(t.css("padding-top"),10)+d;r.scrollTop(0),t.children("."+n.divider).not("."+n.hidden).each(function(){s===!1&&a==e(this).text().slice(0,1).toLowerCase()&&(s=e(this).position().top+h)}),r.scrollTop(s!==!1?s:d)});var s=function(e){i.$menu[(e.hasClass(n.hasindexer)?"add":"remove")+"Class"](n.hasindexer)};this.bind("openPanel",s),s.call(this,this.$menu.children("."+n.current))}})},add:function(){n=e[a]._c,i=e[a]._d,t=e[a]._e,n.add("indexer hasindexer"),t.add("mouseover touchstart")},clickAnchor:function(e){return e.parent().is("."+n.indexer)?!0:void 0}},e[a].defaults[r]={add:!1,addTo:"panels"};var n,i,t,s}(jQuery);
10528/*
10529 * jQuery mmenu toggles addon
10530 * mmenu.frebsite.nl
10531 *
10532 * Copyright (c) Fred Heusschen
10533 */
10534!function(t){var e="mmenu",c="toggles";t[e].addons[c]={setup:function(){var n=this;this.opts[c],this.conf[c],l=t[e].glbl,this.bind("init",function(e){this.__refactorClass(t("input",e),this.conf.classNames[c].toggle,"toggle"),this.__refactorClass(t("input",e),this.conf.classNames[c].check,"check"),t("input."+s.toggle+", input."+s.check,e).each(function(){var e=t(this),c=e.closest("li"),i=e.hasClass(s.toggle)?"toggle":"check",l=e.attr("id")||n.__getUniqueId();c.children('label[for="'+l+'"]').length||(e.attr("id",l),c.prepend(e),t('<label for="'+l+'" class="'+s[i]+'"></label>').insertBefore(c.children("a, span").last()))})})},add:function(){s=t[e]._c,n=t[e]._d,i=t[e]._e,s.add("toggle check")},clickAnchor:function(){}},t[e].configuration.classNames[c]={toggle:"Toggle",check:"Check"};var s,n,i,l}(jQuery);;
10535/* AUTOGENERATED: slidebar.js */
10536/* vim: set ts=2 sw=2 sts=2 et: */
10537
10538/**
10539 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
10540 * See https://www.x-cart.com/license-agreement.html for license details.
10541 */
10542
10543function slidebar() {
10544  var self = this;
10545  jQuery(function () {
10546    xcart.trigger('mm-menu.before_create', jQuery('#slidebar'));
10547    jQuery('#slidebar').mmenu(self.options, self.configuration);
10548
10549    var api = jQuery('#slidebar').data('mmenu');
10550
10551    if (!_.isUndefined(api)) {
10552      xcart.trigger('mm-menu.created', api);
10553      api.bind('closed', function () {
10554        api.closeAllPanels();
10555      });
10556    }
10557
10558    jQuery('.dropdown-menu#search_box').parent().on('shown.bs.dropdown', function () {
10559      jQuery('#header').addClass('hidden');
10560    });
10561
10562    jQuery('.dropdown-menu#search_box').parent().on('hidden.bs.dropdown', function () {
10563      jQuery('#header').removeClass('hidden');
10564    });
10565  });
10566}
10567
10568slidebar.prototype.options = {
10569  extensions: ['pagedim-black'],
10570  navbar: {
10571    title: xcart.t('Menu')
10572  },
10573  offCanvas: {
10574    pageSelector: "#page-wrapper"
10575  }
10576};
10577
10578slidebar.prototype.configuration = {
10579  panelNodetype: "ul, ol"
10580};
10581
10582xcart.bind('navbar.mobile.loaded', function () {
10583  xcart.autoload(slidebar);
10584});;
10585/* AUTOGENERATED: controller.js */
10586/* vim: set ts=2 sw=2 sts=2 et: */
10587
10588/**
10589 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
10590 * See https://www.x-cart.com/license-agreement.html for license details.
10591 */
10592
10593var MESSAGE_INFO = 'info';
10594var MESSAGE_WARNING = 'warning';
10595var MESSAGE_ERROR = 'error';
10596
10597/**
10598 * Controller
10599 */
10600
10601// Constructor
10602function TopMessages(container) {
10603  if (!container) {
10604    return false;
10605  }
10606
10607  this.container = jQuery(container).eq(0);
10608  if (!this.container.length) {
10609    return false;
10610  }
10611
10612  this.messages = {};
10613
10614  // Add listeners
10615
10616  // Close button
10617  jQuery('button.close', this.container).click(
10618    _.bind(
10619      function (event) {
10620        event.stopPropagation();
10621        this.clearRecords();
10622
10623        return false;
10624      },
10625      this
10626    )
10627  ).hover(
10628    function () {
10629      jQuery(this).addClass('close-hover');
10630    },
10631    function () {
10632      jQuery(this).removeClass('close-hover');
10633    }
10634  );
10635
10636  // Global event
10637  if ('undefined' != typeof (window.xcart)) {
10638    xcart.bind(
10639      'message',
10640      _.bind(
10641        function (event, data) {
10642          return this.messageHandler(data.message, data.type);
10643        },
10644        this
10645      )
10646    );
10647
10648    xcart.bind(
10649      'messages',
10650      function (event, data) {
10651        for (var i in data) {
10652          xcart.trigger('message', data[i]);
10653        }
10654      }
10655    );
10656
10657    xcart.bind(
10658      'clearMessages',
10659      _.bind(
10660        function (event) {
10661          this.clearRecords();
10662        },
10663        this
10664      )
10665    );
10666  }
10667
10668  // Remove dump items (W3C compatibility)
10669  jQuery('li.dump', this.container).remove();
10670
10671  // Initial show
10672  if (!this.isVisible() && jQuery('li', this.container).length) {
10673    setTimeout(
10674      _.bind(
10675        function () {
10676          this.show();
10677
10678          // Set initial timers
10679          jQuery('li.info', this.container).each(
10680            _.bind(
10681              function (idx, elm) {
10682                this.setTimer(elm);
10683              },
10684              this
10685            )
10686          );
10687        },
10688        this
10689      ),
10690      1000
10691    );
10692
10693  } else {
10694
10695    // Set initial timers
10696    jQuery('li.info', this.container).each(
10697      _.bind(
10698        function (idx, elm) {
10699          this.setTimer(elm);
10700        },
10701        this
10702      )
10703    );
10704  }
10705}
10706
10707/**
10708 * Properties
10709 */
10710TopMessages.prototype.container = null;
10711TopMessages.prototype.to = null;
10712
10713TopMessages.prototype.ttl = 10000;
10714
10715/**
10716 * Methods
10717 */
10718
10719// Check visibility
10720TopMessages.prototype.isVisible = function () {
10721  return this.container.css('display') != 'none';
10722};
10723
10724// Show widget
10725TopMessages.prototype.show = function () {
10726  this.container.slideDown();
10727};
10728
10729// Hide widget
10730TopMessages.prototype.hide = function (callback) {
10731  this.container.slideUp(callback);
10732};
10733
10734TopMessages.prototype.getMessageFromText = function (element) {
10735  return element.find('.message').length > 0
10736    ? element.find('.message')
10737    : element;
10738};
10739
10740TopMessages.prototype.getSameRecord = function (ul, text) {
10741  var self = this;
10742
10743  return ul.find('li').filter(function () {
10744    var htmlContent = jQuery('<div />').html(text);
10745    if (htmlContent.length > 0) {
10746      text = htmlContent.find('.message').length > 0
10747        ? htmlContent.find('.message').text()
10748        : text;
10749    }
10750
10751    if (text) {
10752      text = text.replace(/^[\s\n]+|[\s\n]+$/gm, '');
10753    }
10754
10755    var realElement = self.getMessageFromText(jQuery(this));
10756    var reg = new RegExp(text + ' \\\((\\\d*?)\\\)', 'i');
10757    var realText = realElement.text().replace(/^[\s\n]+|[\s\n]+$/gm, '');
10758
10759    return realText === text || realText.match(reg);
10760  }).get(0);
10761};
10762
10763TopMessages.prototype.updateRecord = function (li) {
10764  var recordLi = jQuery(li).find('.message').length > 0
10765    ? jQuery(li).find('.message')
10766    : jQuery(li);
10767  var array = /(.*) \((\d*?)\)/i.exec(recordLi.text());
10768  var oldText = array && array[1]
10769    ? array[1]
10770    : recordLi.text();
10771  var oldIndex = array && array[2]
10772    ? array[2]
10773    : 0;
10774
10775  oldText = oldText.replace(/^[\s\n]+|[\s\n]+$/gm, '');
10776  recordLi.text(oldText + ' (' + (intval(oldIndex) + 1) + ')');
10777};
10778
10779// Add record
10780TopMessages.prototype.addRecord = function (text, type) {
10781  if (!type
10782    || (MESSAGE_INFO != type && MESSAGE_WARNING != type && MESSAGE_ERROR != type)
10783  ) {
10784    type = MESSAGE_INFO;
10785  }
10786
10787  var ul = jQuery('ul', this.container).length
10788    ? jQuery('ul', this.container)
10789    : jQuery(document.createElement('UL')).appendTo(this.container);
10790
10791  var sameLi = this.getSameRecord(ul, text);
10792  var hash = objectHash.sha1({text: text, type: type});
10793
10794  if (sameLi) {
10795    this.updateRecord(sameLi);
10796    li = sameLi;
10797  } else {
10798    var li = document.createElement('LI');
10799    li.innerHTML = text;
10800    li.className = type;
10801    li.style.display = 'none';
10802
10803    ul.append(li);
10804  }
10805
10806  li.hash = hash;
10807  this.messages[hash] = {text: text, type: type};
10808
10809  if (
10810    ul.find('li').length
10811    && !this.isVisible()
10812  ) {
10813    this.show();
10814  }
10815
10816  jQuery(li).slideDown('fast');
10817
10818  if (type == MESSAGE_INFO) {
10819    this.setTimer(li);
10820  }
10821};
10822
10823// Clear record
10824TopMessages.prototype.hideRecord = function (li) {
10825  if (jQuery('li:not(.remove)', this.container).length == 1) {
10826    this.clearRecords();
10827
10828  } else {
10829    jQuery(li).addClass('remove').slideUp(
10830      'fast',
10831      function () {
10832        jQuery(this).remove();
10833
10834        if (this.messages && typeof li.hash !== 'undefined') {
10835          delete this.messages[li.hash];
10836        }
10837      }
10838    );
10839  }
10840};
10841
10842// Clear all records
10843TopMessages.prototype.clearRecords = function () {
10844  var container = this.container;
10845  this.hide(function () {
10846    jQuery('li', container).remove();
10847    this.messages = {};
10848  });
10849};
10850
10851// Set record timer
10852TopMessages.prototype.setTimer = function (li) {
10853  li = jQuery(li).get(0);
10854
10855  if (li.timer) {
10856    clearTimeout(li.timer);
10857    li.timer = false;
10858  }
10859
10860  var o = this;
10861  li.timer = setTimeout(
10862    function () {
10863      o.hideRecord(li);
10864    },
10865    this.ttl
10866  );
10867};
10868
10869TopMessages.prototype.hasVisibleMessages = function () {
10870  return Object.keys(this.messages).length > 0;
10871};
10872
10873TopMessages.instance = null;
10874
10875// onmessage event handler
10876TopMessages.prototype.messageHandler = function (text, type) {
10877  this.addRecord(text, type);
10878};
10879
10880jQuery(function () {
10881  TopMessages.instance = new TopMessages(jQuery('#status-messages'));
10882});;
10883/* AUTOGENERATED: button.js */
10884/* vim: set ts=2 sw=2 sts=2 et: */
10885
10886/**
10887 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
10888 * See https://www.x-cart.com/license-agreement.html for license details.
10889 */
10890
10891function setFormAttribute(form, name, value)
10892{
10893  form.elements[name].value = value;
10894}
10895
10896function setFormAction(form, action)
10897{
10898    setFormAttribute('action', action);
10899}
10900
10901function submitForm(form, attrs)
10902{
10903  jQuery.each(
10904    attrs,
10905    function (name, value) {
10906      var e = form.elements.namedItem(name);
10907      if (e) {
10908        e.value = value;
10909      }
10910    }
10911  );
10912
10913	jQuery(form).submit();
10914}
10915
10916function submitFormDefault(form, action)
10917{
10918	var attrs = {};
10919  if (typeof(action) != 'undefined' && action !== null) {
10920  	attrs['action'] = action;
10921  }
10922
10923	submitForm(form, attrs);
10924}
10925
10926jQuery(document).ready(function () {
10927  jQuery('a.disabled').click(function(event){
10928    event.preventDefault();
10929  });
10930});;
10931/* AUTOGENERATED: badge.js */
10932/* vim: set ts=2 sw=2 sts=2 et: */
10933
10934/**
10935 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
10936 * See https://www.x-cart.com/license-agreement.html for license details.
10937 */
10938
10939jQuery(function () {
10940  var headerBar = $('.desktop-header');
10941  headerBar.on('affix-top.bs.affix', function () {
10942    $(this).find('.header_paypal-icon span').fadeIn();
10943  });
10944  headerBar.on('affixed.bs.affix', function () {
10945    $(this).find('.header_paypal-icon span').fadeOut();
10946  });
10947});;
10948/* AUTOGENERATED: ga-search.js */
10949/* vim: set ts=2 sw=2 sts=2 et: */
10950
10951/**
10952 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
10953 * See https://www.x-cart.com/license-agreement.html for license details.
10954 */
10955
10956define('googleAnalytics/base/searchEvent', [ 'googleAnalytics/event' ], function(Event) {
10957  return Event.extend({
10958    namespace: 'search',
10959
10960    processReady () {
10961      jQuery('.search-product-form button[type=\'submit\'], .simple-search-product-form button[type=\'submit\']').click(_.bind(this.registerSearchSubstring, this))
10962    },
10963
10964    registerSearchSubstring (event) {
10965      var substring = jQuery(event.currentTarget).closest('form').find('input[name="substring"]').val()
10966      if (substring) {
10967        this.sendSearchSubstringEvent(substring, event)
10968      }
10969    },
10970
10971    sendSearchSubstringEvent (substring, event) {
10972    }
10973  });
10974});;
10975/* AUTOGENERATED: ga-search.js */
10976/* vim: set ts=2 sw=2 sts=2 et: */
10977
10978/**
10979 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
10980 * See https://www.x-cart.com/license-agreement.html for license details.
10981 */
10982
10983define('googleAnalytics/searchEvent', [ 'googleAnalytics/base/searchEvent', 'googleAnalytics/event', 'googleAnalytics/core' ], function(GASearchEventBase, Event, gaCore) {
10984
10985  let GASearchEvent = GASearchEventBase.extend({
10986    is_sent: false,
10987
10988    sendSearchSubstringEvent (substring, event) {
10989      var self = this
10990      if (self.is_sent || !gaCore.instance.isAvailable()) {
10991        return
10992      }
10993      event.preventDefault()
10994      self.sendEvent('search', {
10995        search_term: substring,
10996        event_callback () {
10997          self.createFunctionWithTimeout(function (e) {
10998            self.is_sent = true
10999            e.currentTarget.click()
11000          }, event, 1000)
11001        }
11002      })
11003    }
11004
11005  })
11006
11007  GASearchEvent.instance = new GASearchEvent();
11008
11009  return GASearchEvent;
11010});;
11011/* AUTOGENERATED: text.js */
11012/* vim: set ts=2 sw=2 sts=2 et: */
11013
11014/**
11015 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
11016 * See https://www.x-cart.com/license-agreement.html for license details.
11017 */
11018
11019xcart.bind(
11020  'load',
11021  function(event) {
11022    jQuery('.input-field-wrapper').each(function () {
11023      var obj = jQuery(this);
11024
11025      var inputField = jQuery('input,textarea', obj);
11026      var defaultValue = xcart.getCommentedData(obj, 'defaultValue');
11027      var type = inputField.attr('type');
11028
11029      if (
11030        '' !== defaultValue
11031        && null !== defaultValue
11032        && 'checkbox' != type
11033        && 'radio' != type
11034        && 'file' != type
11035        && 'image' != type
11036        && 'submit' != type
11037        && 'button' != type
11038      ) {
11039
11040        if ('' === inputField.val()) {
11041          inputField.val(defaultValue).addClass('default-value');
11042        }
11043
11044        inputField.click(
11045          function () {
11046            if (defaultValue === inputField.val()) {
11047              inputField.removeClass('default-value').val('');
11048            }
11049          }
11050        ).blur(
11051          function () {
11052            if ('' === inputField.val()) {
11053              inputField.addClass('default-value').val(defaultValue);
11054            }
11055          }
11056        );
11057
11058        inputField
11059          .parents('form')
11060          .submit(
11061            function() {
11062              if (defaultValue === inputField.val()) {
11063                inputField.val('');
11064              }
11065
11066              return true;
11067            }
11068          );
11069      }
11070    });
11071  }
11072);;
11073/* AUTOGENERATED: layout_block_controller.js */
11074/* vim: set ts=2 sw=2 sts=2 et: */
11075
11076/**
11077 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
11078 * See https://www.x-cart.com/license-agreement.html for license details.
11079 */
11080
11081if (_.isUndefined(jQuery.getQueryParameters)) {
11082  jQuery.extend({
11083    getQueryParameters : function(str) {
11084      return (str || document.location.search).replace(/(^\?)/,'').split("&").map(function(n){return n = n.split("="),this[n[0]] = n[1],this}.bind({}))[0];
11085    }
11086  });
11087}
11088
11089function LayoutBlockWidget(base)
11090{
11091  LayoutBlockWidget.superclass.constructor.apply(this, arguments);
11092
11093  this.widgetClass = this.base.data('widget');
11094
11095  this.widgetTarget = xcart.getTarget();
11096
11097  xcart.bind('layout.block.reload', _.bind(this.reload, this));
11098
11099  this.base.data('controller', this);
11100}
11101
11102extend(LayoutBlockWidget, ALoadable);
11103
11104LayoutBlockWidget.prototype.reloadIfError = false;
11105
11106LayoutBlockWidget.prototype.shadeWidget = true;
11107
11108LayoutBlockWidget.prototype.defineWidgetParams = function() {
11109  return _.defaults(
11110    {
11111      'displayGroup': this.base.data('display')
11112    },
11113    _.pick(jQuery.getQueryParameters(), (value, key, object) => {
11114      return key !== 'displayMode';
11115    })
11116  );
11117};
11118
11119LayoutBlockWidget.prototype.reload = function(event, args) {
11120  if (args.id === this.base.data('id') && this.base.data('is-reloaded-widget') === 1) {
11121    this.widgetParams = this.defineWidgetParams();
11122    this.load();
11123  }
11124};
11125
11126// Place parsed request data into DOM
11127LayoutBlockWidget.prototype.insertIntoDOM = function(box)
11128{
11129  this.base.find('.list-item-content').html(box);
11130  return this.base;
11131};
11132
11133// Extract widget content
11134LayoutBlockWidget.prototype.extractContent = function(box)
11135{
11136  box = jQuery(this.containerRequestPattern, box);
11137  return box.children();
11138};
11139
11140LayoutBlockWidget.autoload = function() {
11141  jQuery('.list-item[data-display]').each(function () {
11142    new LayoutBlockWidget(this);
11143  });
11144};
11145
11146xcart.autoload(LayoutBlockWidget);;
11147/* AUTOGENERATED: script.js */
11148/* vim: set ts=2 sw=2 sts=2 et: */
11149
11150/**
11151 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
11152 * See https://www.x-cart.com/license-agreement.html for license details.
11153 */
11154
11155function myGarageReposition() {
11156  const win = window.innerWidth;
11157  const myGarageDesktop = jQuery('#my-garage-desktop');
11158  const myGarageMobile = jQuery('#my-garage-mobile');
11159  const myGarageDropdown = jQuery('#my-garage');
11160
11161  if (win < 992) {
11162    if (!myGarageMobile.children().length) {
11163      myGarageMobile.html(myGarageDropdown.detach());
11164    }
11165  } else {
11166    if (!myGarageDesktop.children().length) {
11167      myGarageDesktop.html(myGarageDropdown.detach());
11168    }
11169  }
11170}
11171
11172window.addEventListener('resize', () => {
11173  myGarageReposition();
11174}, {passive: true});
11175
11176xcart.autoload(myGarageReposition);
11177
11178xcart.microhandlers.add(
11179  'remove-single-stored-selector',
11180  '.remove-single-stored-selector',
11181  function () {
11182    jQuery(this).click(function () {
11183      xcart.post(URLHandler.buildURL({
11184        target: 'level_selector',
11185        action: 'remove_single_stored',
11186        selectorId: jQuery(this).data('selectorid')
11187      }));
11188    });
11189  }
11190);
11191
11192xcart.microhandlers.add(
11193  'remove-all-stored-selectors',
11194  '.remove-all-stored-selectors',
11195  function () {
11196    jQuery(this).click(function () {
11197      const selectorIds = xcart.getCommentedData(
11198        jQuery(this).closest('.my-garage__dropdown'),
11199        'mmyStoredSelectors'
11200      );
11201
11202      xcart.post(URLHandler.buildURL({
11203        target: 'level_selector',
11204        action: 'remove_all_stored',
11205        selectorIds: selectorIds || null
11206      }));
11207    });
11208  }
11209);
11210
11211xcart.bind('popup.close', () => {
11212  if (jQuery('.add-vehicle').length) {
11213    jQuery('.add-vehicle')
11214      .find('.level1-selector')
11215      .val('')
11216      .trigger('change');
11217  }
11218});;
11219/* AUTOGENERATED: script.js */
11220/* vim: set ts=2 sw=2 sts=2 et: */
11221
11222/**
11223 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
11224 * See https://www.x-cart.com/license-agreement.html for license details.
11225 */
11226
11227function AddVehiclePopupButton()
11228{
11229  AddVehiclePopupButton.superclass.constructor.apply(this, arguments);
11230}
11231
11232extend(AddVehiclePopupButton, PopupButton);
11233AddVehiclePopupButton.prototype.pattern = '.add-vehicle-popup';
11234AddVehiclePopupButton.prototype.callback = function(selector)
11235{
11236  PopupButton.prototype.callback.apply(this, arguments);
11237}
11238
11239xcart.autoload(AddVehiclePopupButton);;
11240/* AUTOGENERATED: script.js */
11241/* vim: set ts=2 sw=2 sts=2 et: */
11242
11243/**
11244 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
11245 * See https://www.x-cart.com/license-agreement.html for license details.
11246 */
11247
11248function SearchVINBlockView(base)
11249{
11250
11251  var args = Array.prototype.slice.call(arguments, 0);
11252  this.callSupermethod('constructor', args);
11253
11254  this.form = this.base
11255    ? this.base.find('form').get(0)
11256    : null;
11257
11258  if (this.form) {
11259    this.setSelectorId(this.form);
11260
11261    jQuery(this.form).bind('beforeSubmit', _.bind(this.beforeSubmit, this));
11262
11263    this.form.commonController.enableBackgroundSubmit(
11264      undefined,
11265      _.bind(this.handleResponse, this)
11266    );
11267
11268    this.bindClearAction(base);
11269
11270    this.findButtonDisabler(this.form);
11271  }
11272
11273  const searchVehicleSwitcher = this.base.siblings('.search-vehicle-switcher');
11274  searchVehicleSwitcher.find('.tag').click(function () {
11275    xcart.trigger('switchVINsearch');
11276  });
11277
11278  xcart.bind('switchVINsearch', _.bind(this.handleSwitch, this));
11279}
11280
11281extend(SearchVINBlockView, ALoadable);
11282
11283SearchVINBlockView.autoload = function()
11284{
11285  jQuery('.search-vehicle-block').each(
11286    function() {
11287      new SearchVINBlockView(this);
11288    }
11289  );
11290};
11291
11292xcart.microhandlers.add(
11293  'addVehiclePopup',
11294  '.add-vehicle',
11295  function () {
11296    let vinBlock = jQuery(this).find('.search-vehicle-block').get(0)
11297    jQuery('button.add-vehicle-popup').data('without-close', 'none'); /* Wrong logic in popup_button.js */
11298
11299    setTimeout(function () {
11300      new SearchVINBlockView(vinBlock);
11301    }, 0);
11302  }
11303);
11304
11305// Widget target
11306SearchVINBlockView.prototype.widgetTarget = 'search_vehicle';
11307
11308// Widget class name
11309SearchVINBlockView.prototype.widgetClass = '\\XC\\VINLookup\\View\\SearchVIN';
11310
11311SearchVINBlockView.prototype.handleSwitch = function() {
11312  const $base = jQuery(this.base);
11313  let switcher = $base.siblings('.search-vehicle-switcher');
11314  switcher.toggleClass('search-by-vin');
11315
11316  let newTitle;
11317  if (switcher.hasClass('search-by-vin')) {
11318    newTitle = switcher.children('.vin-tag').html();
11319  } else {
11320    newTitle = switcher.children('.mmy-tag').html();
11321  }
11322
11323  this.switchLookupModeTitle(newTitle);
11324
11325  const isVinCodeFieldEmpty = !$base.find('input[name="vinCode"]').val();
11326  const $submitBtn = $base.find('button[type="submit"]');
11327
11328  $submitBtn.prop('disabled', isVinCodeFieldEmpty);
11329  $submitBtn.toggleClass('disabled', isVinCodeFieldEmpty);
11330
11331  $base.toggleClass('hidden');
11332  $base.siblings('.levels-selectors').toggleClass('hidden');
11333  $base.siblings('.find-level-button').toggleClass('hidden');
11334
11335  if (!$base.hasClass('hidden')) {
11336    $base.siblings('label.add-to-garage').removeClass('disabled');
11337  } else if ($base.siblings('.levels-selectors').find('.no-value-selected').length > 0) {
11338    $base.siblings('label.add-to-garage').addClass('disabled');
11339  }
11340
11341  let mainCheckbox = $base.siblings('label.add-to-garage');
11342  if ($base.find('label.add-to-garage').length === 0) {
11343    $base.find('button[type="submit"]').before(mainCheckbox.clone());
11344    mainCheckbox.toggleClass('switch-sm-hide');
11345  } else {
11346    mainCheckbox.toggleClass('switch-sm-hide');
11347  }
11348}
11349
11350SearchVINBlockView.prototype.switchLookupModeTitle = function(newTitle) {
11351  const $base = jQuery(this.base);
11352
11353  let titleHeader = $base.siblings('.header-position-title');
11354  let titleDialog = $base.closest('.ui-dialog').find('.ui-dialog-title');
11355  let titleH3 = $base.closest('.block-level-selector').find('h3 .title .text');
11356
11357  if (titleHeader.children('.active-level').length === 0) {
11358    titleHeader.children('.text').html(newTitle);
11359    titleDialog.html(newTitle);
11360    titleH3.html(newTitle);
11361  }
11362}
11363
11364SearchVINBlockView.prototype.findButtonDisabler = function(form) {
11365  let findBtn = jQuery(form).find('button[type="submit"]');
11366  jQuery(form.elements.namedItem('vinCode')).on('keyup', function() {
11367    if ($(this).val().length === 0) {
11368      findBtn.addClass('disabled').prop('disabled', true);
11369    } else {
11370      findBtn.removeClass('disabled').prop('disabled', false);
11371    }
11372  });
11373}
11374
11375SearchVINBlockView.prototype.setSelectorId = function(form) {
11376  let mainSelector = form.closest('.root-level-selector-box');
11377  let selectorId = jQuery(mainSelector).data('selectorid');
11378
11379  jQuery(form).find('input[name="selectorid"]').val(selectorId);
11380}
11381
11382SearchVINBlockView.prototype.beforeSubmit = function() {
11383  this.unmarkInvalidInput();
11384  this.markAsInfoError(false);
11385
11386  this.fillCustomInputs();
11387}
11388
11389SearchVINBlockView.prototype.handleResponse = function(event, result) {
11390  if (result.isValid && result.textStatus === 'success') {
11391    data = JSON.parse(result.data);
11392
11393    if (typeof(data.info) !== 'undefined') {
11394      this.processInfo(data);
11395    } else if (typeof(data.error) !== 'undefined') {
11396      this.processError(data);
11397    } else {
11398      this.processSuccess(data);
11399    }
11400    jQuery('button.submit', this.base).removeAttr('disabled');
11401  }
11402}
11403
11404SearchVINBlockView.prototype.processSuccess = function(data) {
11405  xcart.trigger('switchVINsearch');
11406
11407  let base = jQuery('.root-level-selector-box[data-selectorid=' + data.selectorId + ']');
11408
11409  this.selectMMYFields(base, data.selected);
11410  this.changeTitle(base, data.titleText, data.levelName);
11411  this.showTooltipSelectSubmodel(data)
11412
11413  xcart.trigger('vinSuccessfullySelectedGA', {
11414    'data': data
11415  })
11416}
11417
11418SearchVINBlockView.prototype.changeTitle = function(base, titleText, levelName) {
11419  let titleHeader = base.find('.header-position-title');
11420  let titleH3 = base.closest('.block-level-selector').find('h3 .title');
11421  this.previousTitle = titleHeader.html();
11422
11423  titleHeader.addClass('active');
11424  titleHeader.children('.text').html(titleText + ':');
11425  titleHeader.children('.active-level').remove();
11426  titleHeader.children('.text').after('<span class="active-level">' + levelName + '</span>');
11427
11428  titleH3.children('.text').html(titleText + ':');
11429  titleH3.children('.value').remove();
11430  titleH3.children('.text').after('<span class="value">' + levelName + '</span>');
11431}
11432
11433SearchVINBlockView.prototype.showTooltipSelectSubmodel = function (data) {
11434  if (data.showTooltipSelectSubmodel) {
11435    const tooltipSelector = $('.select_submodel_tooltip')
11436    tooltipSelector.show()
11437    xcart.trigger('disable-select-last-level-for-one-item')
11438  }
11439}
11440
11441SearchVINBlockView.prototype.bindClearAction = function(base) {
11442  const mainBlock = jQuery(base).parent();
11443  mainBlock.find('.clear-active-selector').on('click', _.bind(function () {
11444    mainBlock.find('.header-position-title').html(this.previousTitle);
11445  }, this));
11446};
11447
11448SearchVINBlockView.prototype.temporaryDisableSelectorAutofocus = function ($selector) {
11449  const selector = $selector.get(0);
11450
11451  if (selector && selector.getAttribute('data-auto-focus')) {
11452    selector.setAttribute('data-auto-focus', '0');
11453  }
11454};
11455
11456SearchVINBlockView.prototype.selectMMYFields = function(base, selected) {
11457  for (let level in selected) {
11458    let levelIndex = parseInt(level);
11459    const $select =  base.find('.level' + level + '-selector');
11460    const root = this;
11461
11462    this.temporaryDisableSelectorAutofocus($select);
11463
11464    if (levelIndex === 1) {
11465      this.changeMMYFieldValue($select, selected[levelIndex].id);
11466    } else {
11467      xcart.bind(
11468        'reloadlevel' + levelIndex,
11469        _.once(function (event, data) {
11470          root.changeMMYFieldValue($select, selected[levelIndex].id);
11471        })
11472      );
11473    }
11474  }
11475}
11476
11477SearchVINBlockView.prototype.changeMMYFieldValue = function($select, value)
11478{
11479  if (jQuery('option:not(.empty)', $select).length !== 1) {
11480    $select.val(value).change();
11481    $select.trigger('chosen:updated');
11482  }
11483}
11484
11485
11486SearchVINBlockView.prototype.processInfo = function(data) {
11487  this.markAsInfoError(true);
11488  this.markInvalidInput(data.info);
11489  this.removeErrorClasses();
11490}
11491
11492SearchVINBlockView.prototype.processError = function(data) {
11493  this.markInvalidInput(data.error);
11494}
11495
11496SearchVINBlockView.prototype.markAsInfoError = function(info) {
11497  const $el = this.base.find('.vincode-value .input-field-wrapper');
11498  $el.toggleClass('lookup-info-message', info);
11499}
11500
11501SearchVINBlockView.prototype.unmarkInvalidInput = function() {
11502  this.form.elements.namedItem('vinCode').unmarkAsInvalid();
11503}
11504
11505SearchVINBlockView.prototype.markInvalidInput = function(message) {
11506  const input = this.form.elements.namedItem('vinCode');
11507  jQuery(input).tooltip({
11508    title:     message,
11509    placement: 'bottom',
11510    trigger:   'manual'
11511  });
11512  input.errorTooltipAssigned = true;
11513  input.markAsInvalid(message, null, true);
11514}
11515
11516SearchVINBlockView.prototype.fillCustomInputs = function() {
11517  const storeCheckbox = this.base.parent().find('.add-to-garage:visible').find('input.level-store');
11518  if (storeCheckbox.length > 0) {
11519    jQuery(this.form).find('input[name="levelStore"]').val(store
11519Checkbox.prop('checked') ? 1 : 0);
11520  }
11521}
11522
11523SearchVINBlockView.prototype.removeErrorClasses = function() {
11524  this.base.find('.vin-search-box').removeClass('has-error');
11525  this.base.find('.vincode-value .input-field-wrapper').removeClass('has-error');
11526  this.base.find('.vincode-value input').removeClass('validation-error');
11527}
11528
11529// Get event namespace (prefix)
11530SearchVINBlockView.prototype.getEventNamespace = function() {
11531  return 'search_vehicle';
11532}
11533
11534xcart.microhandlers.add(
11535  'hideSelectSubmodelTooltip',
11536  '.level4-selector',
11537  function () {
11538    const selectSubmodelTooltip = $('.select_submodel_tooltip')
11539    const hideSelectSubmodelTooptip = () => {
11540      if (selectSubmodelTooltip.length) {
11541        selectSubmodelTooltip.hide()
11542      }
11543    }
11544
11545    $(document).on('blur change', '.level4-selector', function () {
11546      hideSelectSubmodelTooptip()
11547    })
11548  }
11549);
11550
11551xcart.autoload(SearchVINBlockView);;
11552/* AUTOGENERATED: account-menu.js */
11553/* vim: set ts=2 sw=2 sts=2 et: */
11554
11555/**
11556 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
11557 * See https://www.x-cart.com/license-agreement.html for license details.
11558 */
11559
11560xcart.bind('updateProductComparison', (e, data) => {
11561  const accountMenuLinks = document.querySelectorAll('.account-links__list-item--compare');
11562  if (data && accountMenuLinks.length) {
11563    const total = (data.count && data.count > 0) ? data.count : 0;
11564
11565    accountMenuLinks.forEach(link => {
11566      link.classList.toggle('account-links__list-item--disabled', (total < 2));
11567      let badge = link.querySelector('.account-links__list-item-badge');
11568
11569      if (total > 0) {
11570        if (!badge) {
11571          badge = document.createElement('SPAN');
11572          badge.className = 'account-links__list-item-badge';
11573          link.querySelector('.account-links__list-item-link').appendChild(badge);
11574        }
11575
11576        badge.innerHTML = total;
11577      } else if (badge) {
11578        badge.parentNode.removeChild(badge);
11579      }
11580    });
11581  }
11582});;
11583/* AUTOGENERATED: account-menu.js */
11584/* vim: set ts=2 sw=2 sts=2 et: */
11585
11586/**
11587 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
11588 * See https://www.x-cart.com/license-agreement.html for license details.
11589 */
11590
11591xcart.bind('updateWishlistProductsCount', (e, data) => {
11592  const accountMenuLinks = document.querySelectorAll('.account-links__list-item--wishlist');
11593
11594  if (data && data.hasOwnProperty('count') && accountMenuLinks.length) {
11595    accountMenuLinks.forEach(link => {
11596      let badge = link.querySelector('.account-links__list-item-badge');
11597
11598      if (!badge) {
11599        badge = document.createElement('SPAN');
11600        badge.className = 'account-links__list-item-badge';
11601        link.querySelector('.account-links__list-item-link').appendChild(badge);
11602      }
11603
11604      badge.innerHTML = data.count;
11605    });
11606  }
11607});
11608
11609xcart.microhandlers.add(
11610  'WishlistMenuLinks',
11611  '.account-links__list-item--wishlist > a',
11612  function () {
11613    this.addEventListener(
11614      'click',
11615      (e) => {
11616        const parentClasses = this.parentNode.classList;
11617
11618        if (parentClasses.contains('must-be-logged-in') && parentClasses.contains('log-in')) {
11619          const loginButton = document.querySelector('.account-links__list-item--login button');
11620
11621          if (loginButton) {
11622            loginButton.click();
11623            e.preventDefault();
11624            e.stopPropagation();
11625          }
11626        }
11627      }
11628    );
11629  }
11630);;
11631/* AUTOGENERATED: popup_button.js */
11632/* vim: set ts=2 sw=2 sts=2 et: */
11633
11634/**
11635 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
11636 * See https://www.x-cart.com/license-agreement.html for license details.
11637 */
11638
11639xcart.autoload(PopupButton);;
11640/* AUTOGENERATED: minicart.js */
11641/* vim: set ts=2 sw=2 sts=2 et: */
11642
11643/**
11644 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
11645 * See https://www.x-cart.com/license-agreement.html for license details.
11646 */
11647
11648/**
11649 * Controller
11650 */
11651
11652function MinicartController(base)
11653{
11654  this.callSupermethod('constructor', arguments);
11655
11656  if (this.base && this.base.length) {
11657    this.block = new MinicartView(this.base);
11658    xcart.bind(['updateCart', 'updateMiniCart'], _.bind(this.handleUpdate
11658Cart, this));
11659  }
11660}
11661
11662extend(MinicartController, AController);
11663
11664// Controller name
11665MinicartController.prototype.name = 'MinicartController';
11666
11667// Find pattern
11668MinicartController.prototype.findPattern = '.lc-minicart';
11669
11670// Controller associated widget
11671MinicartController.prototype.block = null;
11672
11673// Initialize controller
11674MinicartController.prototype.initialize = function()
11675{
11676  var o = this;
11677
11678  this.base.bind(
11679    'reload',
11680    function(event, box) {
11681      o.bind(box);
11682    }
11683  );
11684}
11685
11686MinicartController.prototype.handleUpdateCart = function(event, data)
11687{
11688  if (data.items || data.total) {
11689    if ('undefined' != typeof(data.itemsCount)) {
11690      this.updateItemsCount(data.itemsCount);
11691    }
11692
11693    this.block.load();
11694  }
11695}
11696
11697MinicartController.prototype.updateItemsCount = function(count)
11698{
11699  this.base.find('.minicart-items-number').html(count);
11700
11701  if (0 < count) {
11702    this.base.removeClass('empty');
11703    this.base.find('.items-list')
11704      .removeClass('empty-cart')
11705      .addClass('full-cart');
11706
11707  } else {
11708    this.base.addClass('empty');
11709    this.base.find('.items-list')
11710      .removeClass('full-cart')
11711      .addClass('empty-cart');
11712    this.block.toggleViewMode(false);
11713  }
11714
11715}
11716
11717/**
11718 * Widget
11719 */
11720
11721function MinicartView(base)
11722{
11723  this.callSupermethod('constructor', arguments);
11724
11725  this.bind('local.preload', _.bind(this.handlePreload, this));
11726  this.bind('local.loadingError', _.bind(this.handleLoaded, this));
11727}
11728
11729extend(MinicartView, ALoadable);
11730
11731// No shade widget
11732MinicartView.prototype.shadeWidget = false;
11733
11734// Widget target
11735MinicartView.prototype.widgetTarget = 'cart';
11736
11737// Widget class name
11738MinicartView.prototype.widgetClass = '\\XLite\\View\\Minicart';
11739
11740// Expanded mode flag
11741MinicartView.prototype.isExpanded = false;
11742
11743// Body handler is binded or not
11744MinicartView.prototype.bodyHandlerBinded = false;
11745
11746// Postprocess widget
11747MinicartView.prototype.postprocess = function(isSuccess)
11748{
11749  this.callSupermethod('postprocess', arguments);
11750
11751  if (isSuccess) {
11752
11753    // Get display mode
11754    var re = /lc-minicart-([^ ]+)/;
11755    if (!this.widgetParams && this.base.attr('class') && -1 != this.base.attr('class').search(re)) {
11756      if (!this.widgetParams) {
11757        this.widgetParams = {};
11758      }
11759
11760      var m = this.base.attr('class').match(re);
11761      this.widgetParams.displayMode = m[1];
11762    }
11763
11764    // Initialize view mode toggle mechanism
11765    this.base.click(_.bind(
11766      function(event) {
11767        this.toggleViewMode();
11768      },
11769      this
11770    ));
11771
11772    if (!this.bodyHandlerBinded) {
11773      jQuery('body').click(_.bind(
11774        function (event) {
11775          if (event.target !== this.base.get(0)
11776            && !jQuery.contains(this.base.get(0), event.target)
11777          ) {
11778            this.toggleViewMode(false);
11779          }
11780        },
11781        this
11782      ));
11783
11784      this.bodyHandlerBinded = true;
11785    }
11786
11787    jQuery('.items-list', this.base).click(
11788      function(event) {
11789        event.stopPropagation();
11790      }
11791    );
11792
11793    if (this.isExpanded) {
11794      this.base.addClass('expanded').removeClass('collapsed');
11795    }
11796
11797    jQuery('a.item-attribute-values', this.base).map(function() {
11798      attachTooltip(jQuery('span', this), jQuery(jQuery(this).attr('data-rel')).html(), 'bottom');
11799    });
11800  }
11801};
11802
11803MinicartView.prototype.handlePreload = function(event, state)
11804{
11805  var box = this.base.find('.items-list');
11806
11807  if (box.length) {
11808    var overlay = jQuery(document.createElement('div'));
11809    overlay
11810      .addClass('wait-overlay')
11811      .append('<div></div>');
11812    box.append(overlay);
11813  }
11814};
11815
11816MinicartView.prototype.handleLoaded = function(event, state)
11817{
11818  this.base.find('.wait-overlay').remove();
11819};
11820
11821// Toggle view mode
11822MinicartView.prototype.toggleViewMode = function(expand)
11823{
11824  var old = this.isExpanded;
11825
11826  if (expand !== true && expand !== false) {
11827      expand = !this.base.hasClass('expanded');
11828  }
11829
11830  if (expand && this.base.hasClass('empty')) {
11831    expand = false;
11832  }
11833
11834  this.isExpanded = expand;
11835
11836  if (expand) {
11837    this.base.addClass('expanded').removeClass('collapsed');
11838    if (old != this.isExpanded) {
11839      this.triggerVent('opened', this);
11840    }
11841
11842  } else {
11843    this.base.removeClass('expanded').addClass('collapsed');
11844    if (old != this.isExpanded) {
11845      this.triggerVent('closed', this);
11846    }
11847  }
11848};
11849
11850// Get event namespace (prefix)
11851MinicartView.prototype.getEventNamespace = function()
11852{
11853  return 'minicart';
11854};
11855
11856xcart.autoload(MinicartController);;
11857/* AUTOGENERATED: minicart.js */
11858/* vim: set ts=2 sw=2 sts=2 et: */
11859
11860/**
11861 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
11862 * See https://www.x-cart.com/license-agreement.html for license details.
11863 */
11864
11865const desktopHeader = document.querySelector('.desktop-header');
11866
11867function materializeMinicart () {
11868  const rect = desktopHeader.getBoundingClientRect();
11869
11870  // Hidden desktop header means there is a mobile view
11871  if (rect.width === 0 && rect.height === 0) {
11872    switchMinicarts('.mobile_header .lc-minicart-placeholder');
11873  } else if (!desktopHeader.querySelector('.lc-minicart')) {
11874    switchMinicarts('.desktop-header .lc-minicart-placeholder');
11875  }
11876}
11877
11878/**
11879 * @param {string} target
11880 */
11881function switchMinicarts (target) {
11882  const placeholder = document.createElement('div');
11883  const minicart = document.querySelector('.lc-minicart');
11884  const targetElement = document.querySelector(target);
11885
11886  placeholder.classList.add('lc-minicart-placeholder');
11887  if (minicart && targetElement) {
11888    minicart.after(placeholder);
11889    targetElement.replaceWith(minicart);
11890  }
11891}
11892
11893materializeMinicart();
11894window.addEventListener('resize', materializeMinicart, {passive: true});
11895
11896xcart.bind('updateCart', (e, data) => {
11897  if (typeof (data.itemsCount) !== 'undefined') {
11898    TopMenu.getInstance().setItemBadge(
11899      '.header-bar__column-list-item-button--cart',
11900      (data.itemsCount <= 9 ? data.itemsCount : '9+')
11901    );
11902  }
11903});;
11904/* AUTOGENERATED: search.js */
11905/* vim: set ts=2 sw=2 sts=2 et: */
11906
11907/**
11908 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
11909 * See https://www.x-cart.com/license-agreement.html for license details.
11910 */
11911
11912const Search = function () {
11913  const searchButton = document.getElementById('search_menu');
11914  const container = document.querySelector('.mobile_header-search_menu');
11915  const searchField = document.querySelector('.mobile_header input[name="substring"]');
11916  const backButton = document.querySelector('.mobile_header .simple-search__back');
11917  const clearButton = document.querySelector('.mobile_header .simple-search__clear');
11918
11919  this.isShown = () => {
11920    return container && container.classList.contains('open');
11921  };
11922
11923  /**
11924   * @param {boolean} [show]
11925   */
11926  this.toggle = (show) => {
11927    if (typeof show === 'undefined') {
11928      show = !this.isShown();
11929    }
11930
11931    if (container) {
11932      container.classList.toggle('open', show);
11933    }
11934    searchButton.setAttribute('aria-expanded', show ? 'true' : 'false');
11935
11936    const elementToFocus = show ? searchField : searchButton;
11937    if (elementToFocus) {
11938      elementToFocus.focus();
11939    }
11940  };
11941
11942  /**
11943   * @param {string} text
11944   */
11945  this.setSearchQuery = (text) => {
11946    if (searchField) {
11947      searchField.value = text;
11948    }
11949  };
11950
11951  this.show = () => {
11952    if (!this.isShown()) {
11953      this.setSearchQuery('');
11954    }
11955    this.toggle(true);
11956  };
11957
11958  this.hide = () => {
11959    this.toggle(false);
11960  };
11961
11962  this.init = () => {
11963    if (searchButton) {
11964      searchButton.addEventListener('click', (e) => {
11965        this.show();
11966        e.preventDefault();
11967      });
11968    }
11969
11970    if (backButton) {
11971      backButton.addEventListener('click', (e) => {
11972        this.hide();
11973        e.preventDefault();
11974      });
11975    }
11976
11977    if (searchField) {
11978      searchField.addEventListener('keydown', (e) => {
11979        if (e.code === 'Escape') {
11980          this.hide();
11981          e.preventDefault();
11982        }
11983      });
11984
11985      if (clearButton) {
11986        searchField.addEventListener('input', () => {
11987          clearButton.classList.toggle('simple-search__clear--visible', !!searchField.value);
11988        });
11989
11990        clearButton.addEventListener('click', () => {
11991          clearButton.classList.remove('simple-search__clear--visible');
11992          searchField.focus();
11993        });
11994      }
11995    }
11996  };
11997};
11998
11999Search.prototype.instance = null;
12000
12001Search.getInstance = () => {
12002  if (!Search.prototype.instance) {
12003    Search.prototype.instance = new Search();
12004    Search.prototype.instance.init();
12005  }
12006
12007  return Search.prototype.instance;
12008};
12009
12010Search.getInstance();;
12011/* AUTOGENERATED: catalog.js */
12012/* vim: set ts=2 sw=2 sts=2 et: */
12013
12014/**
12015 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
12016 * See https://www.x-cart.com/license-agreement.html for license details.
12017 */
12018
12019const MobileCatalog = function () {
12020  let items = [];
12021  let backButtons = [];
12022  let list = document.querySelector('.mobile-menu__categories');
12023  const listWrapper = document.querySelector('.mobile-menu__categories-list > .dropdown-menu');
12024
12025  let updateItemsList = () => {
12026    items = document.querySelectorAll(
12027      '.mobile-menu__categories-item--has-children > .mobile-menu__categories-item-link'
12028    );
12029    backButtons = document.querySelectorAll('.mobile-menu__categories-item-back');
12030  };
12031
12032  /**
12033   * @param {Element} elem
12034   * @param {boolean} [open]
12035   */
12036  this.toggle = (elem, open) => {
12037    let listItem = elem;
12038    if (listItem.classList.contains('mobile-menu__categories-item-link')) {
12039      listItem = listItem.parentNode;
12040    }
12041
12042    if (typeof open === 'undefined') {
12043      open = !this.isOpen(elem);
12044    }
12045
12046    const itemTitle =
12047      listItem.querySelector(':scope > .mobile-menu__categories-item-link > .mobile-menu__categories-item-title');
12048    xcart.trigger(
12049      (open ? 'catalog.category.open' : 'catalog.category.close'),
12050      {
12051        mobile: true,
12052        item: listItem,
12053        title: itemTitle ? itemTitle.innerHTML : ''
12054      }
12055    );
12056
12057    listItem.classList.toggle('mobile-menu__categories-item--open', open);
12058    if (listItem.classList.contains('mobile-menu__categories-item--level-1')) {
12059      list.classList.toggle('mobile-menu__categories--open', open);
12060      listWrapper.classList.toggle('open', open);
12061    }
12062
12063    if (!open) {
12064      this.closeSubmenus(listItem);
12065    }
12066  };
12067
12068  /**
12069   * @param {Element} elem
12070   * @return {boolean}
12071   */
12072  this.isOpen = (elem) => {
12073    return elem.parentNode.classList.contains('mobile-menu__categories-item--open');
12074  };
12075
12076  /**
12077   * @param {Element} elem
12078   */
12079  this.close = (elem) => {
12080    this.toggle(elem, false);
12081  };
12082
12083  /**
12084   * @param {Element} elem
12085   */
12086  this.open = (elem) => {
12087    this.toggle(elem, true);
12088  };
12089
12090  /**
12091   * @param {Element} elem
12092   */
12093  this.closeSubmenus = (elem) => {
12094    elem.querySelectorAll('.mobile-menu__categories-item--open').forEach(item => {
12095      this.close(item);
12096    });
12097  };
12098
12099  this.closeAll = () => {
12100    this.closeSubmenus(listWrapper);
12101  };
12102
12103  this.updateHandlers = () => {
12104    updateItemsList();
12105
12106    items.forEach(item => {
12107      if (!item.hasAttribute('data-handled')) {
12108        item.addEventListener('click', (e) => {
12109          this.toggle(item);
12110          e.preventDefault();
12111        });
12112      }
12113
12114      item.setAttribute('data-handled', true);
12115    });
12116
12117    backButtons.forEach(button => {
12118      if (!button.hasAttribute('data-handled')) {
12119        button.addEventListener('click', () => {
12120          this.close(button.parentNode.parentNode.parentNode);
12121        });
12122      }
12123
12124      button.setAttribute('data-handled', true);
12125    });
12126  };
12127
12128  this.init = () => {
12129    this.updateHandlers();
12130  };
12131
12132  this.updateMobileMenuList = () => {
12133    list = document.querySelector('.mobile-menu__categories');
12134  };
12135};
12136
12137MobileCatalog.prototype.instance = null;
12138
12139MobileCatalog.getInstance = () => {
12140  if (!MobileCatalog.prototype.instance) {
12141    MobileCatalog.prototype.instance = new MobileCatalog();
12142    MobileCatalog.prototype.instance.init();
12143  }
12144
12145  return MobileCatalog.prototype.instance;
12146};
12147
12148MobileCatalog.getInstance();;
12149/* AUTOGENERATED: jquery.listItem.js */
12150/* vim: set ts=2 sw=2 sts=2 et: */
12151
12152/**
12153 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
12154 * See https://www.x-cart.com/license-agreement.html for license details.
12155 */
12156
12157(function ($) {
12158  var undefined;
12159
12160  var options = {
12161    prefix: 'list-item__'
12162  };
12163
12164  var focusAction = function (element) {
12165    let stickyElements = [];
12166    const additionalSpace = 20;
12167    const elem = element.get(0);
12168    const scrollStart = window.pageYOffset;
12169    let elemStartPosition = elem.getBoundingClientRect().top;
12170    let scrollBy = 0;
12171    let scrolledByOnPreviousStep = null;
12172    let elemTopOnPreviousStep = null;
12173
12174    const recalculateScrollCoords = function() {
12175      window.themeTweakerStickyElements = [
12176        '.desktop-header',
12177        '.themetweaker-panel--header'
12178      ];
12179      const evt = new CustomEvent('themeTweakerStickyElementsCollect');
12180      window.dispatchEvent(evt);
12181      stickyElements = window.themeTweakerStickyElements.slice(0, window.themeTweakerStickyElements.length);
12182      const elemCurrentTop = elem.getBoundingClientRect().top;
12183      if (
12184        scrolledByOnPreviousStep !== null
12185        && elemTopOnPreviousStep !== null
12186        && elemCurrentTop !== elemTopOnPreviousStep - scrolledByOnPreviousStep
12187      ) {
12188        elemStartPosition += (elemCurrentTop - elemTopOnPreviousStep + scrolledByOnPreviousStep);
12189      }
12190      scrollBy = elemStartPosition - additionalSpace;
12191      stickyElements.forEach(function(selector) {
12192        if (typeof selector === 'function') {
12193          scrollBy -= selector();
12194        } else if (typeof selector === 'string') {
12195          document.querySelectorAll(selector).forEach(function(element) {
12196            scrollBy -= element.getBoundingClientRect().height;
12197          });
12198        } else if (typeof selector === 'object' && typeof selector.getBoundingClientRect === 'function') {
12199          scrollBy -= selector.getBoundingClientRect().height;
12200        }
12201      });
12202      elemTopOnPreviousStep = elemCurrentTop;
12203    }
12204    recalculateScrollCoords();
12205
12206    const timeStart = Date.now();
12207    const duration = 300;
12208    const frameStep = function() {
12209      const percentage = Math.min(((Date.now() - timeStart) / duration), 1);
12210      const step = 1 - ( 1 - percentage ) * ( 1 - percentage );
12211      recalculateScrollCoords();
12212      scrolledByOnPreviousStep = Math.round(scrollStart + scrollBy * step) - window.pageYOffset;
12213      window.scrollTo(0, Math.round(scrollStart + scrollBy * step));
12214      if (percentage < 1)
12215        requestAnimationFrame(frameStep);
12216    }
12217    requestAnimationFrame(frameStep);
12218  }
12219
12220  var methods = {
12221    focus: function () {
12222      let element = $(this);
12223      $(this).on('animationend', _.once(function () {
12224        focusAction(element);
12225      }));
12226    },
12227    selected: function () {
12228      focusAction($(this));
12229    },
12230    show: function () {
12231      this.each(function () {
12232        $(this).on('animationend', _.once(function () {
12233          $(this).removeClass(options.prefix + 'showing');
12234          $(this).css('max-height', '');
12235        }));
12236        $(this).css('max-height', $(this).data('height'));
12237        $(this).removeClass(options.prefix + 'hidden');
12238        $(this).removeClass(options.prefix + 'sidebar-hidden');
12239        $(this).addClass(options.prefix + 'showing');
12240      });
12241    },
12242    hide: function () {
12243      this.each(function () {
12244        $(this).data('height', $(this).outerHeight());
12245        $(this).css('max-height', $(this).outerHeight());
12246        $(this).on('animationend', _.once(function () {
12247          $(this).removeClass(options.prefix + 'hiding');
12248          $(this).addClass(options.prefix + 'hidden');
12249          $(this).css('max-height', 0);
12250        }));
12251        $(this).addClass(options.prefix + 'hiding');
12252      });
12253    },
12254    isHidden: function () {
12255      return this.hasClass(options.prefix + 'hidden') || this.hasClass(options.prefix + 'temporary');
12256    },
12257    isSidebarHidden: function() {
12258      return this.hasClass(options.prefix + 'sidebar-hidden');
12259    },
12260  };
12261
12262  $.fn.listItem = function (method) {
12263    if (methods[method]) {
12264      return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
12265    } else if (typeof method === 'object' || !method) {
12266      return methods.init.apply(this, arguments);
12267    } else {
12268      $.error('Метод с именем ' + method + ' не определен для jQuery.listItem');
12269    }
12270  };
12271})(jQuery);;
12272/* AUTOGENERATED: list_container.js */
12273/* vim: set ts=2 sw=2 sts=2 et: */
12274
12275/**
12276 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
12277 * See https://www.x-cart.com/license-agreement.html for license details.
12278 */
12279
12280function ListContainer(element) {
12281  this.base = $(element);
12282  this.instances = [];
12283
12284  var self = this;
12285  var groups = $(this.base).find('.group-items.movable-group');
12286
12287  $('.group-item').mouseenter(function () {
12288    if (!$(this).closest('.group-items').hasClass('group-items__on-move')) {
12289      $(this).removeClass('group-item__not-hoverable');
12290    }
12291  })
12292
12293  groups.each(function () {
12294    var instance = Sortable.create(this, {
12295      animation: 150,
12296      handle: '.themetweaker-panel-move',
12297      group: 'common',
12298      ghostClass: "sortable-ghost",  // Class name for the drop placeholder
12299      chosenClass: "sortable-chosen",  // Class name for the chosen item
12300      dragClass: "sortable-drag",
12301      onStart: _.bind(self.onStart, self),
12302      onEnd: _.bind(self.onEnd, self),
12303      onMove: _.bind(self.onMove, self),
12304      filter: ".group-item-hidden",
12305    });
12306
12307    this.querySelectorAll('.themetweaker-panel-move').forEach((mover) => {
12308      mover.addEventListener("click", function(e) {
12309        e.stopPropagation();
12310      });
12311    });
12312
12313    self.instances.push(instance);
12314  });
12315}
12316
12317ListContainer.prototype.move = function (item) {
12318  var from = item.closest('.list-items-group');
12319  var center = $('.list-items-group[data-list="center"]');
12320
12321  if (center.length > 0) {
12322    center.append(item);
12323    var event = new Event('add');
12324    event.from = from;
12325    event.to = center;
12326    event.item = item;
12327    this.onAdd(event);
12328  } else {
12329    console.error('Can\'t move item to center group, because it doesn\'t exist');
12330  }
12331};
12332
12333ListContainer.prototype.onStart = function (event) {
12334  xcart.trigger('layout.dragStart');
12335  $('.group-item').addClass('group-item__not-hoverable');
12336  $('.group-items').addClass('group-items__on-move');
12337};
12338
12339ListContainer.prototype.onEnd = function (event) {
12340  $('.group-items').removeClass('group-items__on-move');
12341  xcart.trigger('layout.dragStop');
12342};
12343
12344ListContainer.prototype.onRemove = function (event) {
12345
12346};
12347
12348
12349ListContainer.prototype.onFilter = function (event) {
12350
12351};
12352
12353ListContainer.prototype.onMove = function (event) {
12354  xcart.trigger(
12355    'layout.listElemMoved',
12356    event
12357  );
12358};
12359
12360xcart.autoload(ListContainer, '.layout-editor-sidebar');;
12361/* AUTOGENERATED: handlers.js */
12362/* vim: set ts=2 sw=2 sts=2 et: */
12363
12364/**
12365 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
12366 * See https://www.x-cart.com/license-agreement.html for license details.
12367 */
12368
12369xcart.microhandlers.add(
12370  'select-your-vehicle-toggle',
12371  '#page .block-level-selector .title:not(.handled)',
12372  function () {
12373    this.addEventListener('click', () => {
12374      const arrow = this.querySelector('.arrow');
12375
12376      if (arrow) {
12377        const arrowRect = arrow.getBoundingClientRect();
12378
12379        if (arrowRect.width > 0 && arrowRect.height > 0) {
12380          const block = this.parentNode;
12381          const isOpen = (block.classList.contains('collapsed') || block.classList.contains('initially-collapsed'));
12382          block.classList.toggle('collapsed', !isOpen);
12383          block.classList.remove('initially-collapsed');
12384        }
12385      }
12386    });
12387    this.classList.add('handled');
12388  }
12389);;
12390/* AUTOGENERATED: script.js */
12391/* vim: set ts=2 sw=2 sts=2 et: */
12392
12393/**
12394 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
12395 * See https://www.x-cart.com/license-agreement.html for license details.
12396 */
12397
12398let isLastLevelSelected = false;
12399const isInitiallyCollapsed = jQuery('.block-level-selector').hasClass('initially-collapsed');
12400const isInitiallyExpanded = !isInitiallyCollapsed;
12401const collapsedClass = isInitiallyCollapsed ? 'initially-collapsed' : 'collapsed';
12402const levelDisplayCount = jQuery('.levels-selectors-box').data('level-display-count');
12403const SCREEN_SM_MIN = 768;
12404const SCREEN_MD_MIN = 992;
12405const collapsedBlockLevelSelectorHeight = 60;
12406let isNeedSelectLastLevelForOneItem = true;
12407let isMainEvent = true;
12408
12409function setLevelFilterHandlers($root) {
12410
12411  $root.on('focus', function () {
12412    $root.parent().parent().addClass('focused');
12413    onChangeHandler();
12414  });
12415
12416  $root.on('blur', function () {
12417    $root.parent().parent().toggleClass('focused', !!$root.val());
12418    onChangeHandler();
12419  });
12420
12421  const toggleSelected = ($container, isValueSelected) => {
12422    $container.toggleClass('no-value-selected', !isValueSelected);
12423    $container.toggleClass('selected', isValueSelected);
12424  };
12425  const onChangeHandler = () => {
12426    const isValueSelected = !!$root.val();
12427
12428    toggleSelected($root.parent().parent(), isValueSelected);
12429    toggleSelected($root.parents('.level-selector-box'), isValueSelected);
12430  };
12431
12432  $root.on('change', onChangeHandler);
12433  onChangeHandler();
12434}
12435
12436function shouldAutoFocusOnNextMMYSelector() {
12437  const isIos = () => {
12438    if (navigator.userAgentData) {
12439      if (navigator.userAgentData?.platform?.toLowerCase() === 'ios') {
12440        return true;
12441      }
12442    }
12443
12444    return /iphone|ipad|ipod/i.test(navigator.userAgent.toLowerCase());
12445  };
12446
12447  return !isIos();
12448}
12449
12450/**
12451 * @param {Element|null} selector
12452 */
12453function focusChosenSelector(selector) {
12454  if (selector) {
12455    const chosenContainer = selector.parentNode.querySelector('.chosen-container');
12456
12457    if (chosenContainer) {
12458      jQuery(chosenContainer).trigger('mousedown.chosen');
12459    }
12460  }
12461}
12462
12463function handleMMYSelectorAutoFocus($selector) {
12464  const selectorToFocus = $selector.get(0);
12465  if (!selectorToFocus) {
12466    return;
12467  }
12468
12469  let isAutoOpenAttrValue = selectorToFocus.getAttribute('data-auto-open');
12470
12471  if (isAutoOpenAttrValue === '1') {
12472    focusChosenSelector(selectorToFocus);
12473  } else if (isAutoOpenAttrValue === '0') {
12474    selectorToFocus.setAttribute('data-auto-open', '1');
12475  }
12476}
12477
12478function setChosenHandlers(select) {
12479  const listMinHeightPixels = 60;
12480  const $select = $(select);
12481
12482  $select.on(
12483    'chosen:ready',
12484    function () {
12485      const $parent = $select.parent();
12486      const $searchInput = jQuery('.chosen-search-input', $parent);
12487      const $searchContainer = jQuery('.chosen-container', $parent);
12488
12489      $select.on(
12490        'change',
12491        () => {
12492          select.classList.toggle('focused', !!select.value);
12493        }
12494      );
12495
12496      const searchInputHandler = () => {
12497        $searchContainer.toggleClass('chosen-container-filtered', !!$searchInput.val());
12498      };
12499
12500      $searchInput.on('input focus blur', searchInputHandler);
12501
12502      $searchInput.on(
12503        'keydown.chosen',
12504        (event) => {
12505          if (event.originalEvent.key === 'Escape') {
12506            $select.trigger('chosen:close');
12507          }
12508        }
12509      );
12510
12511      $searchContainer.on(
12512        'click.chosen',
12513        (event) => {
12514          if (event.target.classList.contains('active-result')) {
12515            requestAnimationFrame(
12516              () => {
12517                $select.trigger('chosen:close');
12518              }
12519            );
12520          }
12521        }
12522      );
12523
12524      const list = select.parentNode.querySelector('.chosen-results');
12525      if (list) {
12526        const listResizeHandler = () => {
12527          const maxHeight = Math.max(
12528            listMinHeightPixels,
12529            document.documentElement.clientHeight - list.getBoundingClientRect().top - 20
12530          );
12531          list.style.maxHeight = maxHeight + 'px';
12532        };
12533
12534        $select.on('chosen:showing_dropdown', listResizeHandler);
12535        window.addEventListener('resize', listResizeHandler);
12536        window.addEventListener('orientationchange', listResizeHandler);
12537      }
12538    }
12539  );
12540
12541  $select.on(
12542    'change',
12543    function () {
12544      requestAnimationFrame(
12545        () => {
12546          $select.trigger('chosen:close');
12547        }
12548      );
12549    }
12550  );
12551
12552  $select.chosen({
12553    no_results_text: xcart.t('No results match'),
12554    search_contains: true
12555  });
12556}
12557
12558xcart.microhandlers.add(
12559  'level1selector',
12560  '.level1-selector',
12561  function () {
12562    const $this = jQuery(this),
12563      container = $this.closest('.root-level-selector-box'),
12564      selectorId = container.data('selectorid');
12565
12566    isLastLevelSelected = false;
12567
12568    $this.change(function () {
12569      const selected = jQuery('option:selected', $this);
12570      isLastLevelSelected = false;
12571
12572      xcart.trigger('level2-clear', {selectorId: selectorId});
12573
12574      if (!selected.hasClass('empty')) {
12575        xcart.trigger('levels-reloading');
12576
12577        xcart.post(URLHandler.buildURL({
12578          target: 'level_selector',
12579          action: 'select_level1',
12580          id: $this.val(),
12581          selectorId: selectorId
12582        }), function (xhr, status, data) {
12583          xcart.trigger('reloadlevel2', JSON.parse(data));
12584          $this.focusout();
12585        });
12586
12587        if (!container.find('.clear-active-selector').hasClass('has-active-selection')) {
12588          container.find('.clear-active-selector')
12589            .removeClass('disabled')
12590            .parent().removeClass('disabled');
12591        }
12592
12593        $this.addClass('selected').parent().parent().addClass('selected');
12594      } else {
12595        $this.removeClass('selected').parent().parent().removeClass('selected');
12596      }
12597    });
12598
12599    setLevelFilterHandlers($this);
12600    setChosenHandlers(this);
12601  }
12602);
12603
12604xcart.microhandlers.add(
12605  'level2selector',
12606  '.level2-selector',
12607  function () {
12608    const $this = jQuery(this);
12609    const selectorId = $this.closest('.root-level-selector-box').data('selectorid');
12610    let changeSelection = false;
12611
12612    $this.on('click mousedown touchstart keydown', function () {
12613      changeSelection = true;
12614    });
12615
12616    $this.on(
12617      'chosen:ready',
12618      function () {
12619        const $chosenContainer = jQuery('.chosen-container', $this.parent());
12620
12621        $chosenContainer.on('click mousedown touchstart keydown', function () {
12622          changeSelection = true;
12623        });
12624      }
12625    );
12626
12627    $this.change(function () {
12628      if (changeSelection) {
12629        isLastLevelSelected = false;
12630      }
12631
12632      const selected = jQuery('option:selected', $this);
12633
12634      if (!isLastLevelSelected) {
12635        xcart.trigger('level3-clear', {selectorId: selectorId});
12636      }
12637
12638      if (!selected.hasClass('empty')) {
12639        xcart.trigger('levels-reloading');
12640
12641        xcart.post(URLHandler.buildURL({
12642          target: 'level_selector',
12643          action: 'select_level2',
12644          id: $this.val(),
12645          selectorId: $this.closest('.root-level-selector-box').data('selectorid')
12646        }), function (xhr, status, data) {
12647          if (!isLastLevelSelected) {
12648            xcart.trigger('reloadlevel3', JSON.parse(data));
12649          }
12650
12651          if (levelDisplayCount === 2) {
12652            xcart.trigger('lastlevelselected', JSON.parse(data));
12653          }
12654        });
12655
12656        $this.addClass('selected').parent().parent().addClass('selected');
12657      } else {
12658        $this.removeClass('selected').parent().parent().removeClass('selected');
12659      }
12660    });
12661
12662    setLevelFilterHandlers($this);
12663    setChosenHandlers(this);
12664  }
12665);
12666
12667xcart.microhandlers.add(
12668  'level3selector',
12669  '.level3-selector',
12670  function () {
12671    const $this = jQuery(this);
12672    const selectorId = $this.closest('.root-level-selector-box').data('selectorid');
12673    let changeSelection = false;
12674
12675    $this.on('click mousedown touchstart keydown', function () {
12676      changeSelection = true;
12677    });
12678
12679    $this.on(
12680      'chosen:ready',
12681      function () {
12682        const $chosenContainer = jQuery('.chosen-container', $this.parent());
12683
12684        $chosenContainer.on('click mousedown touchstart keydown', function () {
12685          changeSelection = true;
12686        });
12687      }
12688    );
12689
12690    $this.change(function () {
12691      if (changeSelection) {
12692        isLastLevelSelected = false;
12693      }
12694
12695      const selected = jQuery('option:selected', $this);
12696
12697      if (!isLastLevelSelected) {
12698        xcart.trigger('level4-clear', {selectorId: selectorId});
12699      }
12700
12701      if (!selected.hasClass('empty')) {
12702        xcart.trigger('levels-reloading');
12703
12704        xcart.post(URLHandler.buildURL({
12705          target: 'level_selector',
12706          action: 'select_level3',
12707          id: $this.val(),
12708          selectorId: $this.closest('.root-level-selector-box').data('selectorid')
12709        }), function (xhr, status, data) {
12710          if (!isLastLevelSelected) {
12711            xcart.trigger('reloadlevel4', JSON.parse(data));
12712          }
12713
12714          if (levelDisplayCount === 3) {
12715            xcart.trigger('lastlevelselected', JSON.parse(data));
12716          }
12717        });
12718
12719        $this.addClass('selected').parent().parent().addClass('selected');
12720      } else {
12721        $this.removeClass('selected').parent().parent().removeClass('selected');
12722      }
12723    });
12724
12725    setLevelFilterHandlers($this);
12726    setChosenHandlers(this);
12727  }
12728);
12729
12730xcart.microhandlers.add(
12731  'level4selector',
12732  '.level4-selector',
12733  function () {
12734    const $this = jQuery(this);
12735    let changeSelection = false;
12736
12737    $this.on('click mousedown touchstart keydown', function () {
12738      changeSelection = true;
12739    });
12740
12741    $this.on(
12742      'chosen:ready',
12743      function () {
12744        const $chosenContainer = jQuery('.chosen-container', $this.parent());
12745
12746        $chosenContainer.on('click mousedown touchstart keydown', function () {
12747          changeSelection = true;
12748        });
12749      }
12750    );
12751
12752    $this.change(function () {
12753      if (changeSelection) {
12754        isLastLevelSelected = false;
12755      }
12756
12757      xcart.post(URLHandler.buildURL({
12758        target: 'level_selector',
12759        action: 'select_level4',
12760        id: $this.val(),
12761        selectorId: $this.closest('.root-level-selector-box').data('selectorid')
12762      }));
12763
12764      const selected = jQuery('option:selected', $this);
12765
12766      if (!selected.hasClass('empty')) {
12767        $this.addClass('selected').parent().parent().addClass('selected');
12768      } else {
12769        $this.removeClass('selected').parent().parent().removeClass('selected');
12770      }
12771    });
12772
12773    setLevelFilterHandlers($this);
12774    setChosenHandlers(this);
12775  }
12776);
12777
12778xcart.microhandlers.add(
12779  'clear-active-selector',
12780  '.clear-active-selector',
12781  function () {
12782    const $this = jQuery(this);
12783
12784    $this.click(function () {
12785      xcart.post(URLHandler.buildURL({
12786        target: 'level_selector',
12787        action: 'clear_active',
12788        current_url: window.location.href
12789      }));
12790    });
12791  }
12792);
12793
12794xcart.microhandlers.add(
12795  'remove-stored-selector',
12796  '.remove-stored-selector',
12797  function () {
12798    jQuery(this).click(function () {
12799      xcart.post(URLHandler.buildURL({
12800        target: 'level_selector',
12801        action: 'remove_active_stored'
12802      }));
12803    });
12804  }
12805);
12806
12807xcart.microhandlers.add(
12808  'find-level-button',
12809  '.find-level-button',
12810  function () {
12811    const getFirstNotSelectedSelector = (selectorsBox) => {
12812      if (selectorsBox) {
12813        let selector = null;
12814
12815        for (let i = 1; i <= 4; i++) {
12816          selector = selectorsBox.querySelector(`select.level${i}-selector`);
12817
12818          if (
12819            selector
12820            && (
12821              !selector.value
12822              || parseInt(selector.value) < 0
12823            )
12824          ) {
12825            return selector;
12826          }
12827        }
12828      }
12829
12830      return null;
12831    };
12832
12833    jQuery('.find-level-button').click(function () {
12834      const notSelectedSelector = getFirstNotSelectedSelector(
12835        this.closest('.levels-selectors-box')
12836      );
12837
12838      if (notSelectedSelector) {
12839        requestAnimationFrame(
12840          () => {
12841            focusChosenSelector(notSelectedSelector);
12842          }
12843        );
12844
12845        return;
12846      }
12847
12848      xcart.trigger('levels-reloading');
12849
12850      xcart.trigger('check_is_main_level_request', {data: this});
12851      if (!isMainEvent) {
12852        isMainEvent = true;
12853        return;
12854      }
12855
12856      const $this = jQuery(this).closest('.root-level-selector-box');
12857
12858      if ($this.closest('.add-vehicle').length) {
12859        $this
12860          .closest('.add-vehicle')
12861          .find('input.level-store', $this)
12862          .prop('checked', true);
12863      }
12864
12865      xcart.post(URLHandler.buildURL({
12866        target: 'level_selector',
12867        action: (jQuery('input.level-store', $this).length > 0 && jQuery('input.level-store', $this).prop('checked'))
12868          ? 'store_find'
12869          : 'find',
12870        id: jQuery('.levels-selectors select:last', $this).val()
12871      }));
12872    });
12873  }
12874);
12875
12876/**
12877 * Fixed panel toggler
12878 */
12879const MMY_AFFIX_SELECTORS = '.mmy-selector-clicker';
12880
12881jQuery(document).on('click', MMY_AFFIX_SELECTORS, function (e) {
12882  const $this = jQuery(this);
12883  const container = $this.closest('.block-level-selector');
12884
12885  if (
12886    !container.hasClass('active')
12887    && jQuery(e.target)[0].className !== 'add-to-garage'
12888    && jQuery(e.target)[0].className !== 'level-store form-element'
12889    && jQuery(e.target)[0].className !== 'clear-active-wrapper'
12890    && jQuery(e.target)[0].className !== 'clear-active-selector has-active-selection'
12891    && !jQuery(e.target).parent().hasClass('clear-active-selector')
12892  ) {
12893    container.addClass('active');
12894  } else {
12895    if (
12896      jQuery(e.target)[0].className === 'mmy-selector-clicker'
12897    ) {
12898      container.removeClass('active');
12899    }
12900  }
12901
12902  if (isInitiallyExpanded) {
12903    container.on('affixed.bs.affix', function () {
12904      container.removeClass('active');
12905    }).on('affix-top.bs.affix', function () {
12906      container.removeClass('active');
12907    });
12908  }
12909});
12910
12911function isMobile() {
12912  return window.visualViewport.width < SCREEN_SM_MIN;
12913}
12914
12915/**
12916 * Select your vehicle sticky
12917 */
12918function levelsSelectorsReposition() {
12919  const SIDEBAR = 'sidebar',
12920    TOP = 'center',
12921    levelsSelectors = jQuery('.sidebar .block-level-selector'),
12922    levelsSelectorsContainer = levelsSelectors.parent(),
12923    listContainer = levelsSelectorsContainer.parent(),
12924    position = listContainer.data('group'),
12925    marker = jQuery('<div class="block-level-selector-checkpoint" />'),
12926    topBox = jQuery('#page > .list-container[data-group="header"]');
12927
12928  if (isMobile()) {
12929    if (position === SIDEBAR) {
12930      marker.insertAfter(levelsSelectors);
12931
12932      topBox.html(levelsSelectorsContainer.detach())
12933        .addClass('repositioned');
12934
12935      if (isInitiallyExpanded) {
12936        addAffixForInitiallyExpandedInMobiles('top');
12937      }
12938    }
12939  } else {
12940    if (position === TOP && listContainer.hasClass('repositioned')) {
12941      const addedMarker = jQuery('.block-level-selector-checkpoint');
12942
12943      topBox.removeClass('repositioned');
12944
12945      jQuery(window).off('.affix');
12946
12947      levelsSelectors
12948        .detach()
12949        .removeClass(collapsedClass + ' affix')
12950        .removeData('bs.affix')
12951        .insertAfter(addedMarker);
12952
12953      addedMarker.remove();
12954    }
12955  }
12956}
12957
12958jQuery(document).ready(function () {
12959  const handleSelectorOnPageScrollHide = function () {
12960    const selectVehicle = document.querySelector('#page .list-container[data-group="header"] .block-level-selector');
12961    if (selectVehicle && !isMobile() && selectVehicle.classList.contains('with-affix')) {
12962      if (!selectVehicle.classList.contains('affix')) {
12963        selectVehicle.classList.add('affix');
12964      }
12965      if (selectVehicle.classList.contains('active')) {
12966        selectVehicle.classList.remove('active');
12967      }
12968    }
12969  };
12970
12971  const handleSelectorOnPageScrollShow = function () {
12972    const selectVehicle = document.querySelector('#page .list-container[data-group="header"] .block-level-selector');
12973    if (selectVehicle && !isMobile() && selectVehicle.classList.contains('with-affix')) {
12974      if (selectVehicle.classList.contains('affix')) {
12975        selectVehicle.classList.remove('affix');
12976      }
12977      if (!selectVehicle.classList.contains('active')) {
12978        selectVehicle.classList.add('active');
12979      }
12980    }
12981  };
12982
12983  jQuery('.desktop-header')
12984    .bind('affixed-top.bs.affix', handleSelectorOnPageScrollShow)
12985    .bind('affixed.bs.affix', handleSelectorOnPageScrollHide);
12986
12987  const addClickHandlerForHeader = function () {
12988    $('#page .block-level-selector h3').unbind('click').click(function () {
12989      if (
12990        (isMobile() && $(this).find('.arrow').is(':visible'))
12991        || $(this).closest('.sidebar').length
12992      ) {
12993        $(this).parent().toggleClass(collapsedClass);
12994      }
12995    });
12996  };
12997  addClickHandlerForHeader();
12998  xcart.bind('loader.loaded', addClickHandlerForHeader);
12999
13000  const calculateHeaderHeight = function () {
13001    const header = document.getElementById('header-area');
13002
13003    window.stickyHeaderHeight = header
13004      ? header.getBoundingClientRect().height
13005      : 0;
13006
13007    window.dispatchEvent(
13008      new Event('stickyHeaderElements')  // window.stickyHeaderHeight is expected to be changed in the event listeners
13009    );
13010    return window.stickyHeaderHeight;
13011  };
13012
13013  let scrollEventListened = false;
13014  const isProductPage = document.querySelector('body').classList.contains('target-product');
13015
13016  const handleSelectorOnPageScroll = function () {
13017    const selectVehicle = document.querySelector('#page .list-container[data-group="header"] .block-level-selector');
13018    if (selectVehicle && !isMobile()) {
13019      const vehicleParent = selectVehicle.parentNode;
13020      const vehicleParentRect = vehicleParent.getBoundingClientRect();
13021      const headerHeight = isProductPage
13022        ? parseInt(calculateHeaderHeight(), 10) - parseInt(vehicleParentRect.height, 10)
13023        : parseInt(calculateHeaderHeight(), 10);
13024
13025      if (vehicleParentRect.bottom < headerHeight) {
13026        handleSelectorOnPageScrollHide();
13027      } else {
13028        handleSelectorOnPageScrollShow();
13029      }
13030    }
13031  };
13032
13033  const asyncHandleSelectorOnPageScroll = function () {
13034    if (isMobile()) {
13035      const selectVehicle = document.querySelector('#page > .list-container[data-group="header"] .block-level-selector');
13036      if (selectVehicle) {
13037        selectVehicle.classList.add('affix');
13038      }
13039      if (scrollEventListened && selectVehicle) {
13040        selectVehicle.classList.add('collapsed');
13041        window.removeEventListener('scroll', handleSelectorOnPageScroll);
13042        scrollEventListened = false;
13043      }
13044    } else {
13045      setTimeout(handleSelectorOnPageScroll, 50);
13046      if (!scrollEventListened) {
13047        window.addEventListener('scroll', handleSelectorOnPageScroll, {passive: true});
13048        scrollEventListened = true;
13049      }
13050    }
13051  };
13052
13053  if (!jQuery('.sidebar .block-level-selector').length) {
13054    asyncHandleSelectorOnPageScroll();
13055    window.addEventListener('resize', asyncHandleSelectorOnPageScroll, {passive: true});
13056    window.addEventListener('orientationchange', asyncHandleSelectorOnPageScroll, {passive: true});
13057  } else {
13058    levelsSelectorsReposition();
13059  }
13060
13061  window.addEventListener('themeTweakerStickyElementsCollect', function () {
13062    window.themeTweakerStickyElements.push(function () {
13063      return (document.querySelector('.block-level-selector.affix') ? 60 : 0);
13064    });
13065  });
13066
13067  window.addEventListener('themetweaker_debug_layer_zindex', function (e) {
13068    if (e && e.detail && e.detail.path && e.detail.debugLayer && e.detail.element) {
13069      e.detail.path.forEach(function (elem) {
13070        if (elem.classList.contains('block-level-selector') && elem.classList.contains('affix')) {
13071          e.detail.element.removeAttribute('data-should-decrease-z-index');
13072          if (!e.detail.debugLayer.hasClass('tpl-debug--increased-z-index')) {
13073            e.detail.debugLayer.addClass('tpl-debug--increased-z-index');
13074          }
13075        }
13076      });
13077    }
13078  });
13079});
13080
13081function addAffixForInitiallyExpandedInMobiles(type) {
13082  const levelSelectorBox = jQuery('.block-level-selector');
13083  let topOffset = levelSelectorBox.outerHeight();
13084
13085  if (type === 'bottom') {
13086    topOffset += jQuery('.bannerBox').outerHeight();
13087  }
13088
13089  if (jQuery(window).scrollTop() > topOffset) {
13090    levelSelectorBox.addClass(collapsedClass);
13091  }
13092
13093  levelSelectorBox.affix({
13094    offset: {
13095      top: function () {
13096        return topOffset;
13097      }
13098    }
13099  }).on('affixed.bs.affix', function () {
13100    levelSelectorBox.addClass(collapsedClass);
13101  }).on('affixed-top.bs.affix', function () {
13102    levelSelectorBox.removeClass(collapsedClass);
13103  });
13104}
13105
13106window.addEventListener('resize', () => {
13107  levelsSelectorsReposition();
13108}, {passive: true});
13109
13110xcart.bind(
13111  'lastleveldeselected',
13112  function (event, result) {
13113    isLastLevelSelected = false;
13114
13115    const container = jQuery('.root-level-selector-box[data-selectorid=' + result.selectorId + ']');
13116
13117    container
13118      .find('label.add-to-garage')
13119      .addClass('disabled')
13120      .find('.level-store')
13121      .prop('checked', false);
13122  }
13123);
13124
13125xcart.bind(
13126  'lastlevelselected',
13127  function (event, result) {
13128    isLastLevelSelected = true;
13129
13130    const container = jQuery('.root-level-selector-box[data-selectorid=' + result.selectorId + ']');
13131    const addToGarageLabel = container.find('label.add-to-garage');
13132
13133    if (result.isActiveLevelStored) {
13134      addToGarageLabel
13135        .addClass('disabled')
13136        .find('.level-store')
13137        .prop('checked', true);
13138    } else {
13139      addToGarageLabel
13140        .removeClass('disabled')
13141        .find('.level-store')
13142        .prop('checked', false);
13143    }
13144  }
13145);
13146
13147/**
13148 * Filling the levels content
13149 */
13150function renderOptions(select, value) {
13151  select.each(function () {
13152    if (parseInt(jQuery('option:last', this).val()) !== parseInt(value.id)) {
13153      jQuery('option:last', this).after('<option value="' + value.id + '">' + value.value + '</option>');
13154    }
13155  });
13156}
13157
13158xcart.bind(
13159  'reloadlevel2',
13160  function (event, result) {
13161    const data = result.data;
13162    const $this = jQuery('.root-level-selector-box[data-selectorid=' + result.selectorId + '] .level2-selector');
13163
13164    xcart.trigger('levels-reloading-clear');
13165    xcart.trigger('level3-clear', {selectorId: result.selectorId});
13166
13167    jQuery.each(data, function (index, value) {
13168      renderOptions($this, value);
13169    });
13170
13171    if (data.length === 1) {
13172      jQuery($this).val(data[0].id).change();
13173    } else if (shouldAutoFocusOnNextMMYSelector()) {
13174      $this.focus();
13175    }
13176
13177    $this.trigger('chosen:updated');
13178
13179    if (shouldAutoFocusOnNextMMYSelector()) {
13180      handleMMYSelectorAutoFocus($this);
13181    }
13182  }
13183);
13184
13185xcart.bind(
13186  'reloadlevel3',
13187  function (event, result) {
13188    const data = result.data;
13189    const $this = jQuery('.root-level-selector-box[data-selectorid=' + result.selectorId + '] .level3-selector');
13190
13191    xcart.trigger('levels-reloading-clear');
13192    xcart.trigger('level4-clear', {selectorId: result.selectorId});
13193
13194    jQuery.each(data, function (index, value) {
13195      renderOptions($this, value);
13196    });
13197
13198    if (data.length === 1) {
13199      jQuery($this).val(data[0].id).change();
13200    } else if (shouldAutoFocusOnNextMMYSelector()) {
13201      $this.focus();
13202    }
13203
13204    $this.trigger('chosen:updated');
13205
13206    if (shouldAutoFocusOnNextMMYSelector()) {
13207      handleMMYSelectorAutoFocus($this);
13208    }
13209  }
13210);
13211
13212xcart.bind(
13213  'reloadlevel4',
13214  function (event, result) {
13215    const data = result.data;
13216    const $this = jQuery('.root-level-selector-box[data-selectorid=' + result.selectorId + '] .level4-selector');
13217
13218    xcart.trigger('levels-reloading-clear');
13219
13220    jQuery.each(data, function (index, value) {
13221      renderOptions($this, value);
13222    });
13223
13224    if (data.length === 1 && isNeedSelectLastLevelForOneItem) {
13225      jQuery($this).val(data[0].id).change();
13226    }
13227    if (shouldAutoFocusOnNextMMYSelector()) {
13228      $this.focus();
13229    }
13230    $this.trigger('chosen:updated');
13231
13232    if (shouldAutoFocusOnNextMMYSelector()) {
13233      handleMMYSelectorAutoFocus($this);
13234    }
13235
13236    isNeedSelectLastLevelForOneItem = true;
13237  }
13238);
13239
13240/**
13241 * Clearing levels
13242 */
13243xcart.bind(
13244  'level1-clear',
13245  function (event, result) {
13246    const $this = jQuery('.root-level-selector-box[data-selectorid=' + result.selectorId + '] .level1-selector');
13247
13248    jQuery('option', $this).each(function (index, elem) {
13249      if (!jQuery(elem).hasClass('empty')) {
13250        $this.removeClass('selected').parent().parent().removeClass('selected focused').addClass('no-value-selected');
13251        $this.removeClass('selected').parent().parent().parent().removeClass('selected focused').addClass('no-value-selected');
13252      } else {
13253        jQuery(elem).attr({'selected': 'selected'});
13254      }
13255    });
13256
13257    xcart.trigger('level2-clear', {selectorId: result.selectorId});
13258  }
13259);
13260
13261xcart.bind(
13262  'level2-clear',
13263  function (event, result) {
13264    const $this = jQuery('.root-level-selector-box[data-selectorid=' + result.selectorId + '] .level2-selector');
13265
13266    jQuery('option', $this).each(function (index, elem) {
13267      if (!jQuery(elem).hasClass('empty')) {
13268        jQuery(elem).remove();
13269        $this.removeClass('selected').parent().parent().removeClass('selected focused').addClass('no-value-selected');
13270        $this.removeClass('selected').parent().parent().parent().removeClass('selected focused').addClass('no-value-selected');
13271      }
13272    });
13273    $this.trigger('chosen:updated');
13274
13275    xcart.trigger('level3-clear', {selectorId: result.selectorId});
13276  }
13277);
13278
13279xcart.bind(
13280  'level3-clear',
13281  function (event, result) {
13282    const $this = jQuery('.root-level-selector-box[data-selectorid=' + result.selectorId + '] .level3-selector');
13283
13284    jQuery('option', $this).each(function (index, elem) {
13285      if (!jQuery(elem).hasClass('empty')) {
13286        jQuery(elem).remove();
13287        $this.removeClass('selected').parent().parent().removeClass('selected focused').addClass('no-value-selected');
13288        $this.removeClass('selected').parent().parent().parent().removeClass('selected focused').addClass('no-value-selected');
13289      }
13290    });
13291    $this.trigger('chosen:updated');
13292
13293    xcart.trigger('level4-clear', {selectorId: result.selectorId});
13294  }
13295);
13296
13297xcart.bind(
13298  'level4-clear',
13299  function (event, result) {
13300    const container = jQuery('.root-level-selector-box[data-selectorid=' + result.selectorId + ']'),
13301      $this = container.find('.level4-selector');
13302
13303    jQuery('option', $this).each(function (index, elem) {
13304      if (!jQuery(elem).hasClass('empty')) {
13305        jQuery(elem).remove();
13306        $this.removeClass('selected').parent().parent().removeClass('selected focused').addClass('no-value-selected');
13307        $this.removeClass('selected').parent().parent().parent().removeClass('selected focused').addClass('no-value-selected');
13308      }
13309    });
13310    $this.trigger('chosen:updated');
13311
13312    container.find('label.add-to-garage').addClass('disabled').find('.level-store').prop('checked', false);
13313  }
13314);
13315
13316xcart.bind(
13317  'reloadpage',
13318  function () {
13319    window.location.reload();
13320  }
13321);
13322
13323xcart.bind(
13324  'reloadfrontpage',
13325  function (event, result) {
13326  }
13327);
13328
13329xcart.bind(
13330  'levels-reloading',
13331  function () {
13332    jQuery('.levels-selectors').addClass('reloading');
13333    jQuery('.levels-selectors .chosen-search-input').attr('disabled', 'disabled');
13334    jQuery('.levels-selectors select').trigger('chosen:close');
13335  }
13336);
13337
13338xcart.bind(
13339  'levels-reloading-clear',
13340  function () {
13341    jQuery('.levels-selectors').removeClass('reloading');
13342    jQuery('.levels-selectors .chosen-search-input').removeAttr('disabled');
13343    jQuery('.levels-selectors select').trigger('chosen:close');
13344  }
13345);
13346
13347xcart.bind('disable-select-last-level-for-one-item',
13348  function () {
13349    isNeedSelectLastLevelForOneItem = false;
13350  }
13351);
13352
13353xcart.bind('set-main-level-request', function (event, data) {
13354  isMainEvent = data.isMainEvent;
13355});;
13356/* AUTOGENERATED: handlers.js */
13357/* vim: set ts=2 sw=2 sts=2 et: */
13358
13359/**
13360 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
13361 * See https://www.x-cart.com/license-agreement.html for license details.
13362 */
13363
13364const levelSelectorsSelector = '.level1-selector, .level2-selector, .level3-selector, .level4-selector';
13365
13366xcart.microhandlers.add(
13367  'level-selectors',
13368  levelSelectorsSelector,
13369  function () {
13370    document.querySelectorAll(levelSelectorsSelector).forEach(
13371      elem => {
13372        if (!elem.hasAttribute('data-handled')) {
13373          new CommonElement(elem);
13374          elem.setAttribute('data-handled', '1');
13375
13376          const changeHandler = () => {
13377            const box = xcart.parents(elem, '.level-selector-box');
13378            if (box.length) {
13379              box[0].classList.toggle('selected', !!elem.value);
13380            }
13381          };
13382
13383          elem.addEventListener('change', changeHandler);
13384          elem.addEventListener('focus', changeHandler);
13385          elem.addEventListener('blur', changeHandler);
13386          changeHandler();
13387        }
13388      }
13389    );
13390  }
13391);
13392
13393const selectorHandler = () => {
13394  requestAnimationFrame(() => {
13395    document.querySelectorAll(levelSelectorsSelector).forEach(
13396      elem => {
13397        elem.classList.toggle('focused', !!elem.value);
13398      }
13399    );
13400  });
13401};
13402
13403for (let i = 1; i <= 4; i++) {
13404  xcart.bind('reloadlevel' + i, selectorHandler);
13405  xcart.bind('level' + i + '-clear', selectorHandler);
13406}
13407
13408xcart.bind('lastlevelselected', function (event, result) {
13409  const container = jQuery('.root-level-selector-box[data-selectorid=' + result.selectorId + ']');
13410  const findLevelButton = container.find('.find-level-button');
13411  findLevelButton.removeClass('disabled');
13412});
13413
13414xcart.bind('lastleveldeselected', function (event, result) {
13415  const container = jQuery('.root-level-selector-box[data-selectorid=' + result.selectorId + ']');
13416  const findLevelButton = container.find('.find-level-button');
13417  findLevelButton.addClass('disabled');
13418});
13419
13420(function () {
13421
13422  const getLevelSelectorBlockHeightIfSticky = () => {
13423    const levelSelector = document.querySelector('.block-level-selector');
13424    let result = 0;
13425
13426    if (levelSelector && getComputedStyle(levelSelector).position === 'fixed') {
13427      result =
13428        (
13429          levelSelector.classList.contains('collapsed')
13430          || levelSelector.classList.contains('initially-collapsed')
13431        )
13432          ? levelSelector.getBoundingClientRect().height
13433          : 60;
13434    }
13435
13436    return result;
13437  };
13438
13439  document.addEventListener('calculateActiveWindowHeight', () => {
13440    window.activeWindowHeight -= getLevelSelectorBlockHeightIfSticky();
13441  });
13442
13443  document.addEventListener('calculateStickyWindowTop', () => {
13444    window.stickyWindowTop += getLevelSelectorBlockHeightIfSticky();
13445  });
13446
13447  document.addEventListener(
13448    'qsl-make--calculate-header-height',
13449    (e) => {
13450      // Might be "calc(...)" or might be set not in pixels, so we need to set this to the real element and then detect
13451      // its height.
13452      const headerAreaHeight = getComputedStyle(document.body).getPropertyValue('--header-area-height');
13453
13454      const testDiv = document.createElement('div');
13455      testDiv.style.visibility = 'hidden';
13456      testDiv.style.pointerEvents = 'none';
13457      testDiv.style.position = 'absolute';
13458      testDiv.style.width = '1px';
13459      testDiv.style.left = '-10px';
13460      testDiv.style.height = headerAreaHeight;
13461      document.body.appendChild(testDiv);
13462
13463      e.detail.headerHeight += Math.round(testDiv.getBoundingClientRect().height);
13464
13465      document.body.removeChild(testDiv);
13466    }
13467  );
13468
13469  const mediaQuery = matchMedia('(min-width: 992px)');
13470  const selectorBlock = document.querySelector('#header-top .block-level-selector, #header-bottom .block-level-selector');
13471  const headerArea = document.getElementById('header-area');
13472  let handlerSet = false;
13473
13474  const scrollHandler = () => {
13475    if (selectorBlock && headerArea) {
13476      const container = selectorBlock.parentNode;
13477      const rect = container.getBoundingClientRect();
13478      const headerHeight = getHeaderHeight();
13479      const clearLink = selectorBlock.querySelector('.clear-active-selector.has-active-selection');
13480      const selectorClickerHeight = selectorBlock.querySelector('.mmy-selector-clicker').getBoundingClientRect().height;
13481      let paddingTop = parseInt(getComputedStyle(selectorBlock).paddingTop) ?? 0;
13482
13483      if ((rect.bottom - selectorClickerHeight - paddingTop) < headerHeight) {
13484        if (selectorBlock.classList.contains('active')) {
13485          selectorBlock.classList.remove('active');
13486        }
13487
13488        if (!selectorBlock.classList.contains('scrolled')) {
13489          selectorBlock.classList.add('scrolled');
13490        }
13491      } else {
13492        if (!selectorBlock.classList.contains('active')) {
13493          if (!clearLink) {
13494            selectorBlock.classList.add('active');
13495            container.classList.add('opened');
13496          } else {
13497            container.classList.remove('opened');
13498          }
13499        }
13500
13501        if (selectorBlock.classList.contains('scrolled')) {
13502          selectorBlock.classList.remove('scrolled');
13503        }
13504      }
13505    }
13506  };
13507
13508  const getHeaderHeight = () => {
13509    const headerHeightObj = {headerHeight: 0};
13510
13511    document.dispatchEvent(
13512      new CustomEvent(
13513        'qsl-make--calculate-header-height',
13514        {detail: headerHeightObj}
13515      )
13516    );
13517
13518    return headerHeightObj.headerHeight;
13519  };
13520
13521  const maybeSetHandler = () => {
13522    if (mediaQuery.matches && !handlerSet && selectorBlock && headerArea) {
13523      window.addEventListener('scroll', scrollHandler);
13524      scrollHandler();
13525      handlerSet = true;
13526    } else if ((!mediaQuery.matches || !selectorBlock || !headerArea) && handlerSet) {
13527      window.removeEventListener('scroll', scrollHandler);
13528      handlerSet = false;
13529    }
13530  };
13531
13532  maybeSetHandler();
13533  mediaQuery.addEventListener('change', maybeSetHandler);
13534
13535  document.querySelectorAll('.mmy-selector-clicker').forEach(clicker => {
13536    clicker.addEventListener('click', () => {
13537      const root = clicker.parentNode.parentNode.parentNode;
13538      root.classList.add('clicked');
13539      root.parentNode.classList.toggle('opened', !root.classList.contains('active'));
13540    });
13541  });
13542})();
13543
13544xcart.microhandlers.add(
13545  'test',
13546  '.level-selector-box select',
13547  function () {
13548    if (
13549      !this.getAttribute('id')
13550      && this.nextElementSibling
13551      && this.nextElementSibling.tagName.toLowerCase() === 'label'
13552    ) {
13553      const randomId = xcart.generateRandomId('selector');
13554
13555      this.setAttribute('id', randomId);
13556      this.nextElementSibling.setAttribute('for', randomId);
13557    }
13558  }
13559);;
13560/* AUTOGENERATED: search.js */
13561/* vim: set ts=2 sw=2 sts=2 et: */
13562
13563/**
13564 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
13565 * See https://www.x-cart.com/license-agreement.html for license details.
13566 */
13567
13568xcart.bind('switchVINsearch', function () {
13569  document.querySelectorAll('.block-level-selector-container').forEach(
13570    (container) => {
13571      requestAnimationFrame(
13572        () => {
13573          container.classList.toggle(
13574            'block-level-selector-container--vin',
13575            container.querySelector('.search-vehicle-switcher.search-by-vin')
13576          );
13577        }
13578      );
13579    }
13580  );
13581});
13582
13583xcart.microhandlers.add(
13584  'vin-lookup-form-submit-fixes',
13585  '.search-vehicle-block > form',
13586  function () {
13587    const $this = jQuery(this);
13588    const submitBtn = document.querySelector('.search-vehicle-block .btn');
13589
13590    if (submitBtn) {
13591      $this.bind('beforeSubmit', () => {
13592        submitBtn.classList.add('submit-disabled');
13593      });
13594
13595      $this.bind('afterSubmit', () => {
13596        submitBtn.classList.remove('submit-disabled');
13597      });
13598    }
13599  }
13600);
13601
13602xcart.microhandlers.add(
13603  'correct-mmy-selector-height',
13604  '.block-level-selector-container',
13605  function () {
13606    let vinLookupTooltip = null;
13607    let vinLookupTooltipHeight = 0;
13608    const $searchVehicleForm = jQuery('.search-vehicle-block > form');
13609    const searchVehicleBlock = this.querySelector('.search-vehicle-block');
13610
13611    const updateVinLookupTooltipHeight = () => {
13612      vinLookupTooltip = this.querySelector('.vin-search-box .tooltip');
13613      vinLookupTooltipHeight = vinLookupTooltip ? vinLookupTooltip.getBoundingClientRect().height : 0;
13614    };
13615
13616    const correctTooltipHeightCssCustomProperty = () => {
13617      this.style.setProperty(
13618        '--mmy-selector-vin-lookup-error-tooltip-height',
13619        vinLookupTooltipHeight + 'px'
13620      );
13621    };
13622
13623    const fullRepaint = () => {
13624      updateVinLookupTooltipHeight();
13625      correctTooltipHeightCssCustomProperty();
13626    };
13627
13628    const fullRepaintOnNextTick = () => {
13629      setTimeout(() => {
13630        fullRepaint();
13631      }, 1);
13632    };
13633
13634    fullRepaint();
13635
13636    $searchVehicleForm.bind('afterSubmit', fullRepaintOnNextTick);
13637
13638    window.addEventListener('resize', fullRepaint, {passive: true});
13639    window.addEventListener('orientationchange', fullRepaint, {passive: true});
13640
13641    if (searchVehicleBlock) {
13642      const observer = new MutationObserver(fullRepaint);
13643
13644      observer.observe(
13645        searchVehicleBlock,
13646        {
13647          attributes: false,
13648          childList: true,
13649          subtree: true
13650        }
13651      );
13652    }
13653  }
13654);
13655
13656xcart.microhandlers.add(
13657  'ConnectVINSearchFieldLabel',
13658  '.input-text-searchvinbox input[name="vinCode"]',
13659  function () {
13660    const fieldLabel = this.parentNode.querySelector('.field__label');
13661
13662    if (!this.getAttribute('id') && fieldLabel) {
13663      const label = document.createElement('LABEL');
13664      const randomId = xcart.generateRandomId('vin');
13665      label.className = fieldLabel.className;
13666      label.innerHTML = fieldLabel.innerHTML;
13667      label.setAttribute('for', randomId);
13668
13669      fieldLabel.parentNode.insertBefore(label, fieldLabel);
13670      fieldLabel.parentNode.removeChild(fieldLabel);
13671
13672      this.setAttribute('id', randomId);
13673    }
13674  }
13675);;
13676/* AUTOGENERATED: jquery.cycle2.min.js */
13677/*!
13678 * jQuery Cycle2; version: 2.1.6 build: 20141007
13679 * http://jquery.malsup.com/cycle2/
13680 * Copyright (c) 2014 M. Alsup; Dual licensed: MIT/GPL
13681 */
13682!function(a){"use strict";function b(a){return(a||"").toLowerCase()}var c="2.1.6";a.fn.cycle=function(c){var d;return 0!==this.length||a.isReady?this.each(function(){var d,e,f,g,h=a(this),i=a.fn.cycle.log;if(!h.data("cycle.opts")){(h.data("cycle-log")===!1||c&&c.log===!1||e&&e.log===!1)&&(i=a.noop),i("--c2 init--"),d=h.data();for(var j in d)d.hasOwnProperty(j)&&/^cycle[A-Z]+/.test(j)&&(g=d[j],f=j.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,b),i(f+":",g,"("+typeof g+")"),d[f]=g);e=a.extend({},a.fn.cycle.defaults,d,c||{}
vendor: 19,117 bytes, lines 13682-13689
13682),e.timeoutId=0,e.paused=e.paused||!1,e.container=h,e._maxZ=e.maxZ,e.API=a.extend({_container:h},a.fn.cycle.API),e.API.log=i,e.API.trigger=function(a,b){return e.container.trigger(a,b),e.API},h.data("cycle.opts",e),h.data("cycle.API",e.API),e.API.trigger("cycle-bootstrap",[e,e.API]),e.API.addInitialSlides(),e.API.preInitSlideshow(),e.slides.length&&e.API.initSlideshow()}}):(d={s:this.selector,c:this.context},a.fn.cycle.log("requeuing slideshow (dom not ready)"),a(function(){a(d.s,d.c).cycle(c)}),this)},a.fn.cycle.API={opts:function(){return this._container.data("cycle.opts")},addInitialSlides:function(){var b=this.opts(),c=b.slides;b.slideCount=0,b.slides=a(),c=c.jquery?c:b.container.find(c),b.random&&c.sort(function(){return Math.random()-.5}),b.API.add(c)},preInitSlideshow:function(){var b=this.opts();b.API.trigger("cycle-pre-initialize",[b]);var c=a.fn.cycle.transitions[b.fx];c&&a.isFunction(c.preInit)&&c.preInit(b),b._preInitialized=!0},postInitSlideshow:function(){var b=this.opts();b.API.trigger("cycle-post-initialize",[b]);var c=a.fn.cycle.transitions[b.fx];c&&a.isFunction(c.postInit)&&c.postInit(b)},initSlideshow:function(){var b,c=this.opts(),d=c.container;c.API.calcFirstSlide(),"static"==c.container.css("position")&&c.container.css("position","relative"),a(c.slides[c.currSlide]).css({opacity:1,display:"flex",visibility:"visible"}),c.API.stackSlides(c.slides[c.currSlide],c.slides[c.nextSlide],!c.reverse),c.pauseOnHover&&(c.pauseOnHover!==!0&&(d=a(c.pauseOnHover)),d.hover(function(){c.API.pause(!0)},function(){c.API.resume(!0)})),c.timeout&&(b=c.API.getSlideOpts(c.currSlide),c.API.queueTransition(b,b.timeout+c.delay)),c._initialized=!0,c.API.updateView(!0),c.API.trigger("cycle-initialized",[c]),c.API.postInitSlideshow()},pause:function(b){var c=this.opts(),d=c.API.getSlideOpts(),e=c.hoverPaused||c.paused;b?c.hoverPaused=!0:c.paused=!0,e||(c.container.addClass("cycle-paused"),c.API.trigger("cycle-paused",[c]).log("cycle-paused"),d.timeout&&(clearTimeout(c.timeoutId),c.timeoutId=0,c._remainingTimeout-=a.now()-c._lastQueue,(c._remainingTimeout<0||isNaN(c._remainingTimeout))&&(c._remainingTimeout=void 0)))},resume:function(a){var b=this.opts(),c=!b.hoverPaused&&!b.paused;a?b.hoverPaused=!1:b.paused=!1,c||(b.container.removeClass("cycle-paused"),0===b.slides.filter(":animated").length&&b.API.queueTransition(b.API.getSlideOpts(),b._remainingTimeout),b.API.trigger("cycle-resumed",[b,b._remainingTimeout]).log("cycle-resumed"))},add:function(b,c){var d,e=this.opts(),f=e.slideCount,g=!1;"string"==a.type(b)&&(b=a.trim(b)),a(b).each(function(){var b,d=a(this);c?e.container.prepend(d):e.container.append(d),e.slideCount++,b=e.API.buildSlideOpts(d),e.slides=c?a(d).add(e.slides):e.slides.add(d),e.API.initSlide(b,d,--e._maxZ),d.data("cycle.opts",b),e.API.trigger("cycle-slide-added",[e,b,d])}),e.API.updateView(!0),g=e._preInitialized&&2>f&&e.slideCount>=1,g&&(e._initialized?e.timeout&&(d=e.slides.length,e.nextSlide=e.reverse?d-1:1,e.timeoutId||e.API.queueTransition(e)):e.API.initSlideshow())},calcFirstSlide:function(){var a,b=this.opts();a=parseInt(b.startingSlide||0,10),(a>=b.slides.length||0>a)&&(a=0),b.currSlide=a,b.reverse?(b.nextSlide=a-1,b.nextSlide<0&&(b.nextSlide=b.slides.length-1)):(b.nextSlide=a+1,b.nextSlide==b.slides.length&&(b.nextSlide=0))},calcNextSlide:function(){var a,b=this.opts();b.reverse?(a=b.nextSlide-1<0,b.nextSlide=a?b.slideCount-1:b.nextSlide-1,b.currSlide=a?0:b.nextSlide+1):(a=b.nextSlide+1==b.slides.length,b.nextSlide=a?0:b.nextSlide+1,b.currSlide=a?b.slides.length-1:b.nextSlide-1)},calcTx:function(b,c){var d,e=b;return e._tempFx?d=a.fn.cycle.transitions[e._tempFx]:c&&e.manualFx&&(d=a.fn.cycle.transitions[e.manualFx]),d||(d=a.fn.cycle.transitions[e.fx]),e._tempFx=null,this.opts()._tempFx=null,d||(d=a.fn.cycle.transitions.fade,e.API.log('Transition "'+e.fx+'" not found.  Using fade.')),d},prepareTx:function(a,b){var c,d,e,f,g,h=this.opts();return h.slideCount<2?void(h.timeoutId=0):(!a||h.busy&&!h.manualTrump||(h.API.stopTransition(),h.busy=!1,clearTimeout(h.timeoutId),h.timeoutId=0),void(h.busy||(0!==h.timeoutId||a)&&(d=h.slides[h.currSlide],e=h.slides[h.nextSlide],f=h.API.getSlideOpts(h.nextSlide),g=h.API.calcTx(f,a),h._tx=g,a&&void 0!==f.manualSpeed&&(f.speed=f.manualSpeed),h.nextSlide!=h.currSlide&&(a||!h.paused&&!h.hoverPaused&&h.timeout)?(h.API.trigger("cycle-before",[f,d,e,b]),g.before&&g.before(f,d,e,b),c=function(){h.busy=!1,h.container.data("cycle.opts")&&(g.after&&g.after(f,d,e,b),h.API.trigger("cycle-after",[f,d,e,b]),h.API.queueTransition(f),h.API.updateView(!0))},h.busy=!0,g.transition?g.transition(f,d,e,b,c):h.API.doTransition(f,d,e,b,c),h.API.calcNextSlide(),h.API.updateView()):h.API.queueTransition(f))))},doTransition:function(b,c,d,e,f){var g=b,h=a(c),i=a(d),j=function(){i.animate(g.animIn||{opacity:1},g.speed,g.easeIn||g.easing,f)};i.css(g.cssBefore||{}),h.animate(g.animOut||{},g.speed,g.easeOut||g.easing,function(){h.css(g.cssAfter||{}),g.sync||j()}),g.sync&&j()},queueTransition:function(b,c){var d=this.opts(),e=void 0!==c?c:b.timeout;return 0===d.nextSlide&&0===--d.loop?(d.API.log("terminating; loop=0"),d.timeout=0,e?setTimeout(function(){d.API.trigger("cycle-finished",[d])},e):d.API.trigger("cycle-finished",[d]),void(d.nextSlide=d.currSlide)):void 0!==d.continueAuto&&(d.continueAuto===!1||a.isFunction(d.continueAuto)&&d.continueAuto()===!1)?(d.API.log("terminating automatic transitions"),d.timeout=0,void(d.timeoutId&&clearTimeout(d.timeoutId))):void(e&&(d._lastQueue=a.now(),void 0===c&&(d._remainingTimeout=b.timeout),d.paused||d.hoverPaused||(d.timeoutId=setTimeout(function(){d.API.prepareTx(!1,!d.reverse)},e))))},stopTransition:function(){var a=this.opts();a.slides.filter(":animated").length&&(a.slides.stop(!1,!0),a.API.trigger("cycle-transition-stopped",[a])),a._tx&&a._tx.stopTransition&&a._tx.stopTransition(a)},advanceSlide:function(a){var b=this.opts();return clearTimeout(b.timeoutId),b.timeoutId=0,b.nextSlide=b.currSlide+a,b.nextSlide<0?b.nextSlide=b.slides.length-1:b.nextSlide>=b.slides.length&&(b.nextSlide=0),b.API.prepareTx(!0,a>=0),!1},buildSlideOpts:function(c){var d,e,f=this.opts(),g=c.data()||{};for(var h in g)g.hasOwnProperty(h)&&/^cycle[A-Z]+/.test(h)&&(d=g[h],e=h.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,b),f.API.log("["+(f.slideCount-1)+"]",e+":",d,"("+typeof d+")"),g[e]=d);g=a.extend({},a.fn.cycle.defaults,f,g),g.slideNum=f.slideCount;try{delete g.API,delete g.slideCount,delete g.currSlide,delete g.nextSlide,delete g.slides}catch(i){}return g},getSlideOpts:function(b){var c=this.opts();void 0===b&&(b=c.currSlide);var d=c.slides[b],e=a(d).data("cycle.opts");return a.extend({},c,e)},initSlide:function(b,c,d){var e=this.opts();c.css(b.slideCss||{}),d>0&&c.css("zIndex",d),isNaN(b.speed)&&(b.speed=a.fx.speeds[b.speed]||a.fx.speeds._default),b.sync||(b.speed=b.speed/2),c.addClass(e.slideClass)},updateView:function(a,b){var c=this.opts();if(c._initialized){var d=c.API.getSlideOpts(),e=c.slides[c.currSlide];!a&&b!==!0&&(c.API.trigger("cycle-update-view-before",[c,d,e]),c.updateView<0)||(c.slideActiveClass&&c.slides.removeClass(c.slideActiveClass).eq(c.currSlide).addClass(c.slideActiveClass),a&&c.hideNonActive&&c.slides.filter(":not(."+c.slideActiveClass+")").css("visibility","hidden"),0===c.updateView&&setTimeout(function(){c.API.trigger("cycle-update-view",[c,d,e,a])},d.speed/(c.sync?2:1)),0!==c.updateView&&c.API.trigger("cycle-update-view",[c,d,e,a]),a&&c.API.trigger("cycle-update-view-after",[c,d,e]))}},getComponent:function(b){var c=this.opts(),d=c[b];return"string"==typeof d?/^\s*[\>|\+|~]/.test(d)?c.container.find(d):a(d):d.jquery?d:a(d)},stackSlides:function(b,c,d){var e=this.opts();b||(b=e.slides[e.currSlide],c=e.slides[e.nextSlide],d=!e.reverse),a(b).css("zIndex",e.maxZ);var f,g=e.maxZ-2,h=e.slideCount;if(d){for(f=e.currSlide+1;h>f;f++)a(e.slides[f]).css("zIndex",g--);for(f=0;f<e.currSlide;f++)a(e.slides[f]).css("zIndex",g--)}else{for(f=e.currSlide-1;f>=0;f--)a(e.slides[f]).css("zIndex",g--);for(f=h-1;f>e.currSlide;f--)a(e.slides[f]).css("zIndex",g--)}a(c).css("zIndex",e.maxZ-1)},getSlideIndex:function(a){return this.opts().slides.index(a)}},a.fn.cycle.log=function(){window.console&&console.log&&console.log("[cycle2] "+Array.prototype.join.call(arguments," "))},a.fn.cycle.version=function(){return"Cycle2: "+c},a.fn.cycle.transitions={custom:{},none:{before:function(a,b,c,d){a.API.stackSlides(c,b,d),a.cssBefore={opacity:1,visibility:"visible",display:"flex"}}},fade:{before:function(b,c,d,e){var f=b.API.getSlideOpts(b.nextSlide).slideCss||{};b.API.stackSlides(c,d,e),b.cssBefore=a.extend(f,{opacity:0,visibility:"visible",display:"flex"}),b.animIn={opacity:1},b.animOut={opacity:0}}},fadeout:{before:function(b,c,d,e){var f=b.API.getSlideOpts(b.nextSlide).slideCss||{};b.API.stackSlides(c,d,e),b.cssBefore=a.extend(f,{opacity:1,visibility:"visible",display:"flex"}),b.animOut={opacity:0}}},scrollHorz:{before:function(a,b,c,d){a.API.stackSlides(b,c,d);var e=a.container.css("overflow","hidden").width();a.cssBefore={left:d?e:-e,top:0,opacity:1,visibility:"visible",display:"flex"},a.cssAfter={zIndex:a._maxZ-2,left:0},a.animIn={left:0},a.animOut={left:d?-e:e}}}},a.fn.cycle.defaults={allowWrap:!0,autoSelector:".cycle-slideshow[data-cycle-auto-init!=false]",delay:0,easing:null,fx:"fade",hideNonActive:!0,loop:0,manualFx:void 0,manualSpeed:void 0,manualTrump:!0,maxZ:100,pauseOnHover:!1,reverse:!1,slideActiveClass:"cycle-slide-active",slideClass:"cycle-slide",slideCss:{position:"absolute",top:0,left:0},slides:"> img",speed:500,startingSlide:0,sync:!0,timeout:4e3,updateView:0},a(document).ready(function(){a(a.fn.cycle.defaults.autoSelector).cycle()})}(jQuery),/*! Cycle2 autoheight plugin; Copyright (c) M.Alsup, 2012; version: 20130913 */
13683    function(a){"use strict";function b(b,d){var e,f,g,h=d.autoHeight;if("container"==h)f=a(d.slides[d.currSlide]).outerHeight(),d.container.height(f);else if(d._autoHeightRatio)d.container.height(d.container.width()/d._autoHeightRatio);else if("calc"===h||"number"==a.type(h)&&h>=0){if(g="calc"===h?c(b,d):h>=d.slides.length?0:h,g==d._sentinelIndex)return;d._sentinelIndex=g,d._sentinel&&d._sentinel.remove(),e=a(d.slides[g].cloneNode(!0)),e.removeAttr("id name rel").find("[id],[name],[rel]").removeAttr("id name rel"),e.css({position:"static",visibility:"hidden",display:"block"}).prependTo(d.container).addClass("cycle-sentinel cycle-slide").removeClass("cycle-slide-active"),e.find("*").css("visibility","hidden"),d._sentinel=e}}function c(b,c){var d=0,e=-1;return c.slides.each(function(b){var c=a(this).height();c>e&&(e=c,d=b)}),d}function d(b,c,d,e){var f=a(e).outerHeight();c.container.animate({height:f},c.autoHeightSpeed,c.autoHeightEasing)}function e(c,f){f._autoHeightOnResize&&(a(window).off("resize orientationchange",f._autoHeightOnResize),f._autoHeightOnResize=null),f.container.off("cycle-slide-added cycle-slide-removed",b),f.container.off("cycle-destroyed",e),f.container.off("cycle-before",d),f._sentinel&&(f._sentinel.remove(),f._sentinel=null)}a.extend(a.fn.cycle.defaults,{autoHeight:0,autoHeightSpeed:250,autoHeightEasing:null}),a(document).on("cycle-initialized",function(c,f){function g(){b(c,f)}var h,i=f.autoHeight,j=a.type(i),k=null;("string"===j||"number"===j)&&(f.container.on("cycle-slide-added cycle-slide-removed",b),f.container.on("cycle-destroyed",e),"container"==i?f.container.on("cycle-before",d):"string"===j&&/\d+\:\d+/.test(i)&&(h=i.match(/(\d+)\:(\d+)/),h=h[1]/h[2],f._autoHeightRatio=h),"number"!==j&&(f._autoHeightOnResize=function(){clearTimeout(k),k=setTimeout(g,50)},a(window).on("resize orientationchange",f._autoHeightOnResize)),setTimeout(g,30))})}(jQuery),/*! caption plugin for Cycle2;  version: 20130306 */
13684    function(a){"use strict";a.extend(a.fn.cycle.defaults,{caption:"> .cycle-caption",captionTemplate:"{{slideNum}} / {{slideCount}}",overlay:"> .cycle-overlay",overlayTemplate:"<div>{{title}}</div><div>{{desc}}</div>",captionModule:"caption"}),a(document).on("cycle-update-view",function(b,c,d,e){if("caption"===c.captionModule){a.each(["caption","overlay"],function(){var a=this,b=d[a+"Template"],f=c.API.getComponent(a);f.length&&b?(f.html(c.API.tmpl(b,d,c,e)),f.show()):f.hide()})}}),a(document).on("cycle-destroyed",function(b,c){var d;a.each(["caption","overlay"],function(){var a=this,b=c[a+"Template"];c[a]&&b&&(d=c.API.getComponent("caption"),d.empty())})})}(jQuery),/*! command plugin for Cycle2;  version: 20140415 */
13685    function(a){"use strict";var b=a.fn.cycle;a.fn.cycle=function(c){var d,e,f,g=a.makeArray(arguments);return"number"==a.type(c)?this.cycle("goto",c):"string"==a.type(c)?this.each(function(){var h;return d=c,f=a(this).data("cycle.opts"),void 0===f?void b.log('slideshow must be initialized before sending commands; "'+d+'" ignored'):(d="goto"==d?"jump":d,e=f.API[d],a.isFunction(e)?(h=a.makeArray(g),h.shift(),e.apply(f.API,h)):void b.log("unknown command: ",d))}):b.apply(this,arguments)},a.extend(a.fn.cycle,b),a.extend(b.API,{next:function(){var a=this.opts();if(!a.busy||a.manualTrump){var b=a.reverse?-1:1;a.allowWrap===!1&&a.currSlide+b>=a.slideCount||(a.API.advanceSlide(b),a.API.trigger("cycle-next",[a]).log("cycle-next"))}},prev:function(){var a=this.opts();if(!a.busy||a.manualTrump){var b=a.reverse?1:-1;a.allowWrap===!1&&a.currSlide+b<0||(a.API.advanceSlide(b),a.API.trigger("cycle-prev",[a]).log("cycle-prev"))}},destroy:function(){this.stop();var b=this.opts(),c=a.isFunction(a._data)?a._data:a.noop;clearTimeout(b.timeoutId),b.timeoutId=0,b.API.stop(),b.API.trigger("cycle-destroyed",[b]).log("cycle-destroyed"),b.container.removeData(),c(b.container[0],"parsedAttrs",!1),b.retainStylesOnDestroy||(b.container.removeAttr("style"),b.slides.removeAttr("style"),b.slides.removeClass(b.slideActiveClass)),b.slides.each(function(){var d=a(this);d.removeData(),d.removeClass(b.slideClass),c(this,"parsedAttrs",!1)})},jump:function(a,b){var c,d=this.opts();if(!d.busy||d.manualTrump){var e=parseInt(a,10);if(isNaN(e)||0>e||e>=d.slides.length)return void d.API.log("goto: invalid slide index: "+e);if(e==d.currSlide)return void d.API.log("goto: skipping, already on slide",e);d.nextSlide=e,clearTimeout(d.timeoutId),d.timeoutId=0,d.API.log("goto: ",e," (zero-index)"),c=d.currSlide<d.nextSlide,d._tempFx=b,d.API.prepareTx(!0,c)}},stop:function(){var b=this.opts(),c=b.container;clearTimeout(b.timeoutId),b.timeoutId=0,b.API.stopTransition(),b.pauseOnHover&&(b.pauseOnHover!==!0&&(c=a(b.pauseOnHover)),c.off("mouseenter mouseleave")),b.API.trigger("cycle-stopped",[b]).log("cycle-stopped")},reinit:function(){var a=this.opts();a.API.destroy(),a.container.cycle()},remove:function(b){for(var c,d,e=this.opts(),f=[],g=1,h=0;h<e.slides.length;h++)c=e.slides[h],h==b?d=c:(f.push(c),a(c).data("cycle.opts").slideNum=g,g++);d&&(e.slides=a(f),e.slideCount--,a(d).remove(),b==e.currSlide?e.API.advanceSlide(1):b<e.currSlide?e.currSlide--:e.currSlide++,e.API.trigger("cycle-slide-removed",[e,b,d]).log("cycle-slide-removed"),e.API.updateView())}}),a(document).on("click.cycle","[data-cycle-cmd]",function(b){b.preventDefault();var c=a(this),d=c.data("cycle-cmd"),e=c.data("cycle-context")||".cycle-slideshow";a(e).cycle(d,c.data("cycle-arg"))})}(jQuery),/*! hash plugin for Cycle2;  version: 20130905 */
13686    function(a){"use strict";function b(b,c){var d;return b._hashFence?void(b._hashFence=!1):(d=window.location.hash.substring(1),void b.slides.each(function(e){if(a(this).data("cycle-hash")==d){if(c===!0)b.startingSlide=e;else{var f=b.currSlide<e;b.nextSlide=e,b.API.prepareTx(!0,f)}return!1}}))}a(document).on("cycle-pre-initialize",function(c,d){b(d,!0),d._onHashChange=function(){b(d,!1)},a(window).on("hashchange",d._onHashChange)}),a(document).on("cycle-update-view",function(a,b,c){c.hash&&"#"+c.hash!=window.location.hash&&(b._hashFence=!0,window.location.hash=c.hash)}),a(document).on("cycle-destroyed",function(b,c){c._onHashChange&&a(window).off("hashchange",c._onHashChange)})}(jQuery),/*! loader plugin for Cycle2;  version: 20131121 */
13687    function(a){"use strict";a.extend(a.fn.cycle.defaults,{loader:!1}),a(document).on("cycle-bootstrap",function(b,c){function d(b,d){function f(b){var f;"wait"==c.loader?(h.push(b),0===j&&(h.sort(g),e.apply(c.API,[h,d]),c.container.removeClass("cycle-loading"))):(f=a(c.slides[c.currSlide]),e.apply(c.API,[b,d]),f.show(),c.container.removeClass("cycle-loading"))}function g(a,b){return a.data("index")-b.data("index")}var h=[];if("string"==a.type(b))b=a.trim(b);else if("array"===a.type(b))for(var i=0;i<b.length;i++)b[i]=a(b[i])[0];b=a(b);var j=b.length;j&&(b.css("visibility","hidden").appendTo("body").each(function(b){function g(){0===--i&&(--j,f(k))}var i=0,k=a(this),l=k.is("img")?k:k.find("img");return k.data("index",b),l=l.filter(":not(.cycle-loader-ignore)").filter(':not([src=""])'),l.length?(i=l.length,void l.each(function(){this.complete?g():a(this).load(function(){g()}).on("error",function(){0===--i&&(c.API.log("slide skipped; img not loaded:",this.src),0===--j&&"wait"==c.loader&&e.apply(c.API,[h,d]))})})):(--j,void h.push(k))}),j&&c.container.addClass("cycle-loading"))}var e;c.loader&&(e=c.API.add,c.API.add=d)})}(jQuery),/*! pager plugin for Cycle2;  version: 20140415 */
13688    function(a){"use strict";function b(b,c,d){var e,f=b.API.getComponent("pager");f.each(function(){var f=a(this);if(c.pagerTemplate){var g=b.API.tmpl(c.pagerTemplate,c,b,d[0]);e=a(g).appendTo(f)}else e=f.children().eq(b.slideCount-1);e.on(b.pagerEvent,function(a){b.pagerEventBubble||a.preventDefault(),b.API.page(f,a.currentTarget)})})}function c(a,b){var c=this.opts();if(!c.busy||c.manualTrump){var d=a.children().index(b),e=d,f=c.currSlide<e;c.currSlide!=e&&(c.nextSlide=e,c._tempFx=c.pagerFx,c.API.prepareTx(!0,f),c.API.trigger("cycle-pager-activated",[c,a,b]))}}a.extend(a.fn.cycle.defaults,{pager:"> .cycle-pager",pagerActiveClass:"cycle-pager-active",pagerEvent:"click.cycle",pagerEventBubble:void 0,pagerTemplate:"<span>&bull;</span>"}),a(document).on("cycle-bootstrap",function(a,c,d){d.buildPagerLink=b}),a(document).on("cycle-slide-added",function(a,b,d,e){b.pager&&(b.API.buildPagerLink(b,d,e),b.API.page=c)}),a(document).on("cycle-slide-removed",function(b,c,d){if(c.pager){var e=c.API.getComponent("pager");e.each(function(){var b=a(this);a(b.children()[d]).remove()})}}),a(document).on("cycle-update-view",function(b,c){var d;c.pager&&(d=c.API.getComponent("pager"),d.each(function(){a(this).children().removeClass(c.pagerActiveClass).eq(c.currSlide).addClass(c.pagerActiveClass)}))}),a(document).on("cycle-destroyed",function(a,b){var c=b.API.getComponent("pager");c&&(c.children().off(b.pagerEvent),b.pagerTemplate&&c.empty())})}(jQuery),/*! prevnext plugin for Cycle2;  version: 20140408 */
13689    function(a){"use strict";a.extend(a.fn.cycle.defaults,{next:"> .cycle-next",nextEvent:"click.cycle",disabledClass:"disabled",prev:"> .cycle-prev",prevEvent:"click.cycle",swipe:!1}),a(document).on("cycle-initialized",function(a,b){if(b.API.getComponent("next").on(b.nextEvent,function(a){a.preventDefault(),b.API.next()}),b.API.getComponent("prev").on(b.prevEvent,function(a){a.preventDefault(),b.API.prev()}
13689),b.swipe){var c=b.swipeVert?"swipeUp.cycle":"swipeLeft.cycle swipeleft.cycle",d=b.swipeVert?"swipeDown.cycle":"swipeRight.cycle swiperight.cycle";b.container.on(c,function(){b._tempFx=b.swipeFx,b.API.next()}),b.container.on(d,function(){b._tempFx=b.swipeFx,b.API.prev()})}}),a(document).on("cycle-update-view",function(a,b){if(!b.allowWrap){var c=b.disabledClass,d=b.API.getComponent("next"),e=b.API.getComponent("prev"),f=b._prevBoundry||0,g=void 0!==b._nextBoundry?b._nextBoundry:b.slideCount-1;b.currSlide==g?d.addClass(c).prop("disabled",!0):d.removeClass(c).prop("disabled",!1),b.currSlide===f?e.addClass(c).prop("disabled",!0):e.removeClass(c).prop("disabled",!1)}}),a(document).on("cycle-destroyed",function(a,b){b.API.getComponent("prev").off(b.nextEvent),b.API.getComponent("next").off(b.prevEvent),b.container.off("swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle")})}(jQuery),/*! progressive loader plugin for Cycle2;  version: 20130315 */
13690    function(a){"use strict";a.extend(a.fn.cycle.defaults,{progressive:!1}),a(document).on("cycle-pre-initialize",function(b,c){if(c.progressive){var d,e,f=c.API,g=f.next,h=f.prev,i=f.prepareTx,j=a.type(c.progressive);if("array"==j)d=c.progressive;else if(a.isFunction(c.progressive))d=c.progressive(c);else if("string"==j){if(e=a(c.progressive),d=a.trim(e.html()),!d)return;if(/^(\[)/.test(d))try{d=a.parseJSON(d)}catch(k){return void f.log("error parsing progressive slides",k)}else d=d.split(new RegExp(e.data("cycle-split")||"\n")),d[d.length-1]||d.pop()}i&&(f.prepareTx=function(a,b){var e,f;return a||0===d.length?void i.apply(c.API,[a,b]):void(b&&c.currSlide==c.slideCount-1?(f=d[0],d=d.slice(1),c.container.one("cycle-slide-added",function(a,b){setTimeout(function(){b.API.advanceSlide(1)},50)}),c.API.add(f)):b||0!==c.currSlide?i.apply(c.API,[a,b]):(e=d.length-1,f=d[e],d=d.slice(0,e),c.container.one("cycle-slide-added",function(a,b){setTimeout(function(){b.currSlide=1,b.API.advanceSlide(-1)},50)}),c.API.add(f,!0)))}),g&&(f.next=function(){var a=this.opts();if(d.length&&a.currSlide==a.slideCount-1){var b=d[0];d=d.slice(1),a.container.one("cycle-slide-added",function(a,b){g.apply(b.API),b.container.removeClass("cycle-loading")}),a.container.addClass("cycle-loading"),a.API.add(b)}else g.apply(a.API)}),h&&(f.prev=function(){var a=this.opts();if(d.length&&0===a.currSlide){var b=d.length-1,c=d[b];d=d.slice(0,b),a.container.one("cycle-slide-added",function(a,b){b.currSlide=1,b.API.advanceSlide(-1),b.container.removeClass("cycle-loading")}),a.container.addClass("cycle-loading"),a.API.add(c,!0)}else h.apply(a.API)})}})}(jQuery),/*! tmpl plugin for Cycle2;  version: 20121227 */
13691    function(a){"use strict";a.extend(a.fn.cycle.defaults,{tmplRegex:"{{((.)?.*?)}}"}),a.extend(a.fn.cycle.API,{tmpl:function(b,c){var d=new RegExp(c.tmplRegex||a.fn.cycle.defaults.tmplRegex,"g"),e=a.makeArray(arguments);return e.shift(),b.replace(d,function(b,c){var d,f,g,h,i=c.split(".");for(d=0;d<e.length;d++)if(g=e[d]){if(i.length>1)for(h=g,f=0;f<i.length;f++)g=h,h=h[i[f]]||c;else h=g[c];if(a.isFunction(h))return h.apply(g,e);if(void 0!==h&&null!==h&&h!=c)return h}return c})}})}(jQuery);;
13692/* AUTOGENERATED: jquery.cycle2.flip.js */
13693/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20141007 */
13694!function(a){"use strict";function b(b){return{preInit:function(a){a.slides.css(d)},transition:function(c,d,e,f,g){var h=c,i=a(d),j=a(e),k=h.speed/2;b.call(j,-90),j.css({display:"flex",visibility:"visible","background-position":"-90px",opacity:1}),i.css("background-position","0px"),i.animate({backgroundPosition:90},{step:b,duration:k,easing:h.easeOut||h.easing,complete:function(){c.API.updateView(!1,!0),j.animate({backgroundPosition:0},{step:b,duration:k,easing:h.easeIn||h.easing,complete:g})}})}}}function c(b){return function(c){var d=a(this);d.css({"-webkit-transform":"rotate"+b+"("+c+"deg)","-moz-transform":"rotate"+b+"("+c+"deg)","-ms-transform":"rotate"+b+"("+c+"deg)","-o-transform":"rotate"+b+"("+c+"deg)",transform:"rotate"+b+"("+c+"deg)"})}}var d,e=document.createElement("div").style,f=a.fn.cycle.transitions,g=void 0!==e.transform||void 0!==e.MozTransform||void 0!==e.webkitTransform||void 0!==e.oTransform||void 0!==e.msTransform;g&&void 0!==e.msTransform&&(e.msTransform="rotateY(0deg)",e.msTransform||(g=!1)),g?(f.flipHorz=b(c("Y")),f.flipVert=b(c("X")),d={"-webkit-backface-visibility":"hidden","-moz-backface-visibility":"hidden","-o-backface-visibility":"hidden","backface-visibility":"hidden"}):(f.flipHorz=f.scrollHorz,f.flipVert=f.scrollVert||f.scrollHorz)}(jQuery);;
13695/* AUTOGENERATED: jquery.cycle2.swipe.min.js */
13696/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20141007 */
13697!function(a){"use strict";a.event.special.swipe=a.event.special.swipe||{scrollSupressionThreshold:10,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,setup:function(){var b=a(this);
13697b.bind("touchstart",function(c){function d(b){if(g){var c=b.originalEvent.touches?b.originalEvent.touches[0]:b;e={time:(new Date).getTime(),coords:[c.pageX,c.pageY]},Math.abs(g.coords[0]-e.coords[0])>a.event.special.swipe.scrollSupressionThreshold&&b.preventDefault()}}var e,f=c.originalEvent.touches?c.originalEvent.touches[0]:c,g={time:(new Date).getTime(),coords:[f.pageX,f.pageY],origin:a(c.target)};b.bind("touchmove",d).one("touchend",function(){b.unbind("touchmove",d),g&&e&&e.time-g.time<a.event.special.swipe.durationThreshold&&Math.abs(g.coords[0]-e.coords[0])>a.event.special.swipe.horizontalDistanceThreshold&&Math.abs(g.coords[1]-e.coords[1])<a.event.special.swipe.verticalDistanceThreshold&&g.origin.trigger("swipe").trigger(g.coords[0]>e.coords[0]?"swipeleft":"swiperight"),g=e=void 0})})}},a.event.special.swipeleft=a.event.special.swipeleft||{setup:function(){a(this).bind("swipe",a.noop)}},a.event.special.swiperight=a.event.special.swiperight||a.event.special.swipeleft}(jQuery);;
13698/* AUTOGENERATED: jquery.cycle2.scrollVert.js */
13699/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20141007 */
13700!function(a){"use strict";a.fn.cycle.transitions.scrollVert={before:function(a,b,c,d){a.API.stackSlides(a,b,c,d);var e=a.container.css("overflow","hidden").height();a.cssBefore={top:d?-e:e,left:0,opacity:1,display:"flex",visibility:"visible"},a.animIn={top:0},a.animOut={top:d?e:-e}}}}(jQuery);;
13701/* AUTOGENERATED: jquery.cycle2.tile.js */
13702/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20141007 */
13703!function(a){"use strict";a.fn.cycle.transitions.tileSlide=a.fn.cycle.transitions.tileBlind={before:function(b,c,d,e){b.API.stackSlides(c,d,e),a(c).css({display:"flex",visibility:"visible"}),b.container.css("overflow","hidden"),b.tileDelay=b.tileDelay||"tileSlide"==b.fx?100:125,b.tileCount=b.tileCount||7,b.tileVertical=b.tileVertical!==!1,b.container.data("cycleTileInitialized")||(b.container.on("cycle-destroyed",a.proxy(this.onDestroy,b.API)),b.container.data("cycleTileInitialized",!0))},transition:function(b,c,d,e,f){function g(a){m.eq(a).animate(t,{duration:b.speed,easing:b.easing,complete:function(){(e?p-1===a:0===a)&&b._tileAniCallback()}}),setTimeout(function(){(e?p-1!==a:0!==a)&&g(e?a+1:a-1)},b.tileDelay)}b.slides.not(c).not(d).css("visibility","hidden");var h,i,j,k,l,m=a(),n=a(c),o=a(d),p=b.tileCount,q=b.tileVertical,r=b.container.height(),s=b.container.width();q?(i=Math.floor(s/p),k=s-i*(p-1),j=l=r):(i=k=s,j=Math.floor(r/p),l=r-j*(p-1)),b.container.find(".cycle-tiles-container").remove();var t,u={left:0,top:0,overflow:"hidden",position:"absolute",margin:0,padding:0};t=q?"tileSlide"==b.fx?{top:r}:{width:0}:"tileSlide"==b.fx?{left:s}:{height:0};var v=a('<div class="cycle-tiles-container"></div>');v.css({zIndex:n.css("z-index"),overflow:"visible",position:"absolute",top:0,left:0,direction:"ltr"}),v.insertBefore(d);for(var w=0;p>w;w++)h=a("<div></div>").css(u).css({width:p-1===w?k:i,height:p-1===w?l:j,marginLeft:q?w*i:0,marginTop:q?0:w*j}).append(n.clone().css({position:"relative",maxWidth:"none",width:n.width(),margin:0,padding:0,marginLeft:q?-(w*i):0,marginTop:q?0:-(w*j)})),m=m.add(h);v.append(m),n.css("visibility","hidden"),o.css({opacity:1,display:"flex",visibility:"visible"}),g(e?0:p-1),b._tileAniCallback=function(){o.css({display:"flex",visibility:"visible"}),n.css("visibility","hidden"),v.remove(),f()}},stopTransition:function(a){a.container.find("*").stop(!0,!0),a._tileAniCallback&&a._tileAniCallback()},onDestroy:function(){var a=this.opts();a.container.find(".cycle-tiles-container").remove()}}}(jQuery);;
13704/* AUTOGENERATED: script.js */
13705/* vim: set ts=2 sw=2 sts=2 et: */
13706
13707/**
13708 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
13709 * See https://www.x-cart.com/license-agreement.html for license details.
13710 */
13711
13712$(document).ready(function () {
13713    decorate(
13714        'ProductsListView',
13715        'openQuickLookParams',
13716        function (elem) {
13717            var params = arguments.callee.previousMethod.apply(this, arguments);
13718            params.ignoreCycle2Lib = true;
13719
13720            return params;
13721        }
13722    );
13723});;
13724/* AUTOGENERATED: filters_store.js */
13725/* vim: set ts=2 sw=2 sts=2 et: */
13726
13727/**
13728 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
13729 * See https://www.x-cart.com/license-agreement.html for license details.
13730 */
13731
13732define('cs_filters/store', ['vue/vuex', 'js/underscore'], function (Vuex, _) {
13733  return new Vuex.Store({
13734    state: {
13735      filtersSelectedValues: []
13736    },
13737    mutations: {
13738      setFiltersValues: function (state, filters) {
13739        state.filtersSelectedValues = filters
13740      },
13741      removeEntireFilter: function (state, filterId) {
13742        state.filtersSelectedValues = state.filtersSelectedValues.filter(item => item.filterId !== filterId);
13743      },
13744      removeFilter: function (state, { filterId, value }) {
13745        state.filtersSelectedValues = state.filtersSelectedValues.filter(item => {
13746          if (item.filterId !== filterId) {
13747            return true;
13748          }
13749          if (Array.isArray(value)) {
13750            return false;
13751          }
13752          if (Array.isArray(item.value)) {
13753            const existedValue = item.value.filter(v => v === value);
13754            if (existedValue.length > 0) {
13755              return false;
13756            }
13757          }
13758          return true
13759        });
13760      }
13761    },
13762    actions: {
13763      updateFiltersValues: function (context, filters) {
13764        context.commit('setFiltersValues', filters)
13765      },
13766      removeEntireFilter: function (context, filterId) {
13767        context.commit('removeEntireFilter', filterId);
13768      },
13769      removeFilterValue: function (context, payload) {
13770        context.commit('removeFilter', payload);
13771      }
13772    }
13773  })
13774});;
13775/* AUTOGENERATED: filters_values_list_comp.js */
13776/* vim: set ts=2 sw=2 sts=2 et: */
13777
13778/**
13779 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
13780 * See https://www.x-cart.com/license-agreement.html for license details.
13781 */
13782
13783define('cs_filters/filters-values-list-comp', ['vue/vue', 'vue/vuex', 'js/underscore'], function (Vue, Vuex, _) {
13784  return Vue.extend({
13785    template: '#cloud-filters-values-list-box',
13786    data() {
13787      return {
13788        activePopoverIndex: null,
13789        touchStartY: 0,
13790        touchMoveY: 0,
13791        originalTitle: null
13792      }
13793    },
13794    computed: {
13795      filtersSelectedValues: function () {
13796        xcart.trigger('cloud-filters-values-list-box.changed')
13797        return this.$store.state.filtersSelectedValues
13798      },
13799      isExistFiltersSelectedValues: function () {
13800        return !_.isEmpty(this.$store.state.filtersSelectedValues)
13801      },
13802      groupedFilterValues: function () {
13803        let groupedValues = {};
13804        let order = [];
13805
13806        this.filtersSelectedValues.forEach((item, originalIndex) => {
13807          if (!groupedValues[item.filterId]) {
13808            groupedValues[item.filterId] = {
13809              name: item.name,
13810              filterId: item.filterId,
13811              value: [],
13812              visibleValue: [],
13813              indexes: {}
13814            };
13815            order.push(item.filterId);
13816          }
13817          if (Array.isArray(item.value)) {
13818            item.value.forEach((val, i) => {
13819              groupedValues[item.filterId].indexes[groupedValues[item.filterId].value.length] = originalIndex;
13820              groupedValues[item.filterId].value.push(val);
13821              groupedValues[item.filterId].visibleValue.push(item.visibleValue[i]);
13822            });
13823          } else {
13824            groupedValues[item.filterId].value = item.value;
13825            groupedValues[item.filterId].visibleValue = item.visibleValue;
13826          }
13827        });
13828
13829        return order.map(id => groupedValues[id]);
13830      }
13831    },
13832    methods: _.extend(
13833      Vuex.mapActions([
13834        'updateFiltersValues',
13835        'removeFilterValue',
13836        'removeEntireFilter'
13837      ]), {
13838      clearFilters: function () {
13839        this.updateFiltersValues([])
13840      },
13841        removeValue: function(groupIndex, valueIndex, event) {
13842          if (event) {
13843            event.stopPropagation();
13844          }
13845
13846          const filterValue = this.groupedFilterValues[groupIndex];
13847          if (!filterValue) return;
13848
13849          if (this.isPrice(filterValue)) {
13850            this.removeFilterValue({
13851              filterId: 'price',
13852              value: filterValue.value
13853            });
13854            return;
13855          }
13856
13857          if (this.isSingleFilterGroupedValue(filterValue)) {
13858            this.removeFilterValue({
13859              filterId: filterValue.filterId,
13860              value: filterValue.value[0]
13861            });
13862            return;
13863          }
13864
13865          if (valueIndex !== undefined) {
13866            const lengthForClosingPopover = 2;
13867            if (filterValue.value.length === lengthForClosingPopover) {
13868              this.closePopovers();
13869            }
13870
13871            this.removeFilterValue({
13872              filterId: filterValue.filterId,
13873              value: filterValue.value[valueIndex]
13874            });
13875          }
13876        },
13877        removeEntireFilterByIndex: function(groupIndex) {
13878          const filterValue = this.groupedFilterValues[groupIndex];
13879          if (filterValue) {
13880            this.closePopovers();
13881            this.removeEntireFilter(filterValue.filterId);
13882          }
13883        },
13884      isSingleFilterGroupedValue: function (filterValue)   {
13885        return filterValue.value.length === 1
13886      },
13887      isPrice: function (filterValue) {
13888        return filterValue.filterId === 'price'
13889      },
13890      isMinPrice: function(filterValue) {
13891        return _.has(filterValue.visibleValue, 'min_price');
13892      },
13893      isMaxPrice: function(filterValue) {
13894        return _.has(filterValue.visibleValue, 'max_price');
13895      },
13896      getMinPrice: function (filterValue) {
13897        if (this.isMinPrice(filterValue)) {
13898          return filterValue.visibleValue.min_price;
13899        }
13900
13901        return 0
13902      },
13903      getMaxPrice: function (filterValue) {
13904        if (this.isMaxPrice(filterValue)) {
13905          return filterValue.visibleValue.max_price;
13906        }
13907
13908        return 0
13909      },
13910      filterTagId: function (filterValue) {
13911        if (filterValue.filterId === 'price') {
13912          return 'price'
13913        } else {
13914          return window.xcart.utils.hash(filterValue.filterId + filterValue.visibleValue.toString());
13915        }
13916      },
13917        togglePopover(index) {
13918          if (this.activePopoverIndex === index) {
13919            this.closePopovers();
13920          } else {
13921            this.activePopoverIndex = index;
13922            this.updateNavbarTitleToBack();
13923            this.setPopoverHeight()
13924          }
13925        },
13926        isAutomobileSkin() {
13927          return $('html').is('[data-theme]');
13928        },
13929        toggleMobileNavbarOverflow (isOpened) {
13930          if (this.isDesktop() || this.isAutomobileSkin()) {
13931            return
13932          }
13933
13934          $('#cloud-filters-mobile')
13935            .children()
13936            .each(function () {
13937              const $el = $(this)
13938              if (
13939                $el.hasClass('cloud-filters-selected-values-mobile') ||
13940                $el.hasClass('mm-navbar')
13941              ) {
13942                return
13943              }
13944
13945              if (isOpened) {
13946                $el.addClass('filter-hidden');
13947              } else {
13948                $el.removeClass('filter-hidden')
13949              }
13950            })
13951        },
13952        setPopoverHeight() {
13953          if (!this.isDesktop() && this.isAutomobileSkin()) {
13954            this.$nextTick(() => {
13955              const popover = this.$el.querySelector('.filters-popover');
13956              if (popover) {
13957                const contentHeight = popover.scrollHeight + 2;
13958                popover.style.height = `${contentHeight}px`;
13959              }
13960            });
13961          }
13962        },
13963        resetPopoverHeightIfDesktop() {
13964          if (this.isDesktop()) {
13965            const popover = this.$el.querySelector('.filters-popover');
13966            if (popover) {
13967              popover.style.height = 'auto';
13968            }
13969          }
13970        },
13971        closePopovers(event) {
13972          if (!event || !this.$el.querySelector('.filters-popover')?.contains(event.target)) {
13973            this.activePopoverIndex = null;
13974            this.restoreNavbarTitle();
13975          }
13976        },
13977        handleClickOutside(event) {
13978          if (!this.$el.contains(event.target) ||
13979            !event.target.closest('.filters-popover')) {
13980            this.closePopovers();
13981          }
13982        },
13983        isDesktop() {
13984          return window.innerWidth > 768;
13985        },
13986        onTouchStart(e) {
13987          if (this.isDesktop()) {
13988            return;
13989          }
13990          this.touchStartY = e.touches[0].clientY;
13991        },
13992        onTouchMove(e) {
13993          if (this.isDesktop()) {
13994            return;
13995          }
13996          this.touchMoveY = e.touches[0].clientY;
13997        },
13998        onTouchEnd(e) {
13999          if (this.isDesktop()) return;
14000
14001          const popoverEl = this.$el.querySelector('.filters-popover');
14002          if (!popoverEl) return;
14003
14004          const contentEl = popoverEl.querySelector('.filters-popover__content');
14005          const headerEl = popoverEl.querySelector('.filters-drawer__header');
14006          const swipeDistance = this.touchMoveY - this.touchStartY;
14007
14008          if (swipeDistance < 50) {
14009            return;
14010          }
14011
14012          const touch = e.changedTouches[0];
14013          const headerRect = headerEl.getBoundingClientRect();
14014          const contentRect = contentEl.getBoundingClientRect();
14015
14016          const isTouchInHeader = (
14017            touch.clientY >= headerRect.top &&
14018            touch.clientY >= headerRect.bottom
14019          );
14020
14021          const isTouchInContent = (
14022            touch.clientY >= contentRect.top &&
14023            touch.clientY <= contentRect.bottom
14024          );
14025
14026          if (contentEl.scrollTop <= 0 && isTouchInContent && !(contentEl.scrollWidth > contentEl.clientWidth)) {
14027            this.togglePopover(this.activePopoverIndex);
14028            return;
14029          }
14030
14031          if (isTouchInHeader && (touch.target.className === 'filters-drawer' || $(touch.target).find('.filters-drawer').length > 0)) {
14032            this.togglePopover(this.activePopoverIndex);
14033          }
14034        },
14035        updateNavbarTitleToBack() {
14036          const navbar = $('.mm-navbar-top:visible');
14037
14038          if (navbar.length === 0) return;
14039
14040          const title = navbar.find('.mm-title');
14041
14042          if (title.length === 0) return;
14043
14044          if (this.originalTitle === null) {
14045            this.originalTitle = title.text();
14046          }
14047
14048          const backTitle = xcart.t('[csf] Back')
14049
14050          title.html(`<a href="javascript:void(0)" class="filters-mm-back-link">${backTitle}</a>`);
14051
14052          title.find('.mm-back-link').on('click', (e) => {
14053            e.preventDefault();
14054            this.closePopovers();
14055          });
14056        },
14057        restoreNavbarTitle() {
14058          const navbar = $('.mm-navbar-top:visible');
14059          if (!navbar || this.originalTitle === null) return;
14060
14061          const title = navbar.find('.mm-title');
14062          if (title) {
14063            title.html(this.originalTitle);
14064          }
14065
14066          this.originalTitle = null;
14067        }
14068    }),
14069    watch: {
14070      activePopoverIndex(newValue, oldValue) {
14071        this.toggleMobileNavbarOverflow(newValue !== null);
14072      }
14073    },
14074    mounted() {
14075      document.addEventListener('click', this.handleClickOutside);
14076      window.addEventListener('touchstart', this.onTouchStart, { passive: true });
14077      window.addEventListener('touchmove', this.onTouchMove, { passive: true });
14078      window.addEventListener('touchend', this.onTouchEnd, { passive: true });
14079      window.addEventListener('resize', this.resetPopoverHeightIfDesktop);
14080    },
14081    beforeDestroy() {
14082      document.removeEventListener('click', this.handleClickOutside);
14083      window.removeEventListener('touchstart', this.onTouchStart);
14084      window.removeEventListener('touchmove', this.onTouchMove);
14085      window.removeEventListener('touchend', this.onTouchEnd);
14086      window.removeEventListener('resize', this.resetPopoverHeightIfDesktop);
14087    }
14088  })
14089});;
14090/* AUTOGENERATED: filters_values_list_box.js */
14091/* vim: set ts=2 sw=2 sts=2 et: */
14092
14093/**
14094 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
14095 * See https://www.x-cart.com/license-agreement.html for license details.
14096 */
14097
14098define('cs_filters/filters-selected-values-list-box', ['vue/vue', 'cs_filters/store', 'cs_filters/filters-values-list-comp', 'js/underscore'], function (Vue, Store, FiltersValuesListBox, _) {
14099  const CommonFiltersValuesListBox = Vue.extend({
14100    store: Store,
14101    components: {
14102      'cloud-filters-values-list-box': FiltersValuesListBox
14103    }
14104  })
14105
14106  return new CommonFiltersValuesListBox({el: '#cloud-filters-selected-values'})
14107});;
14108/* AUTOGENERATED: home.js */
14109/* vim: set ts=2 sw=2 sts=2 et: */
14110
14111/**
14112 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
14113 * See https://www.x-cart.com/license-agreement.html for license details.
14114 */
14115
14116document.querySelectorAll('.subcat-home__container').forEach(container => {
14117  container.querySelectorAll('.subcat-home__item-button').forEach(btn => {
14118    btn.addEventListener('click', () => {
14119      if (!btn.classList.contains('subcat-home__item-button--active')) {
14120        container.querySelectorAll('.subcat-home__item-button--active').forEach(button => {
14121          button.classList.remove('subcat-home__item-button--active', 'active');
14122        });
14123
14124        container.querySelectorAll('.subcat-home__subcategories-item--active').forEach(tab => {
14125          tab.classList.remove('subcat-home__subcategories-item--active');
14126        });
14127
14128        btn.classList.add('subcat-home__item-button--active', 'active');
14129
14130        const tab = container.querySelector(
14131          '.subcat-home__subcategories-item[data-index="'
14132          + btn.getAttribute('data-index')
14133          + '"]'
14134        );
14135
14136        if (tab) {
14137          tab.classList.add('subcat-home__subcategories-item--active');
14138        }
14139      }
14140    });
14141  });
14142});;
14143/* AUTOGENERATED: updateBrandResponseHash.js */
14144/* vim: set ts=2 sw=2 sts=2 et: */
14145
14146/**
14147 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
14148 * See https://www.x-cart.com/license-agreement.html for license details.
14149 */
14150
14151function getBrandBlockFqnFromCssClasses(block) {
14152  let fqn = '';
14153
14154  block.classList.forEach((cssClass) => {
14155    if (cssClass.indexOf('block-brands--fqn-') === 0) {
14156      fqn = cssClass.split('block-brands--fqn-')[1] ?? '';
14157    }
14158  });
14159
14160  return fqn;
14161}
14162
14163xcart.microhandlers.add(
14164  'BrandBlockUpdateCacheableHash',
14165  '.block-brands',
14166  function () {
14167    if (window.updateCsBrandResponseHash) {
14168      navigator.sendBeacon(
14169        URLHandler.buildURL({
14170          target: 'cs_brand_response_hash',
14171          widget: getBrandBlockFqnFromCssClasses(this),
14172          category_id: window?.currentCategoryId
14173        })
14174      );
14175    }
14176  }
14177);;
14178/* AUTOGENERATED: items_list.js */
14179/* vim: set ts=2 sw=2 sts=2 et: */
14180
14181/**
14182 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
14183 * See https://www.x-cart.com/license-agreement.html for license details.
14184 */
14185
14186// Main class
14187function ListsController(base)
14188{
14189  ListsController.superclass.constructor.apply(this, arguments);
14190
14191  if (this.base && this.base.length) {
14192    this.block = this.getListView();
14193  }
14194}
14195
14196extend(ListsController, AController);
14197
14198ListsController.prototype.name = 'ItemsListController';
14199
14200ListsController.prototype.findPattern = '.items-list';
14201
14202ListsController.prototype.block = null;
14203
14204ListsController.prototype.selfUpdated = false;
14205
14206ListsController.prototype.getListView = function()
14207{
14208  return new ListView(this.base);
14209};
14210
14211// Initialize controller
14212ListsController.prototype.initialize = function()
14213{
14214  var o = this;
14215
14216  this.base.bind(
14217    'reload',
14218    function(event, box) {
14219      o.bind(box);
14220    }
14221  );
14222};
14223
14224/**
14225 * Main widget (listView)
14226 */
14227
14228function ListView(base)
14229{
14230  this.widgetClass  = xcart.getCommentedData(base, 'widget_class');
14231  this.widgetTarget = xcart.getCommentedData(base, 'widget_target');
14232  this.widgetParams = xcart.getCommentedData(base, 'widget_params');
14233  this.replaceState = xcart.getCommentedData(base, 'replaceState');
14234  this.replaceStatePrefix = xcart.getCommentedData(base, 'replaceStatePrefix');
14235  this.listenToGetParams = xcart.getCommentedData(base, 'listenToGetParams');
14236
14237  ListView.superclass.constructor.apply(this, arguments);
14238}
14239
14240extend(ListView, ALoadable);
14241
14242ListView.prototype.getCurrentPageIdParam = function() {
14243  const url = new URL(window.location);
14244  const urlParams = url.searchParams;
14245
14246  return urlParams.has('pageId')
14247    ? { 'pageId': parseInt(urlParams.get('pageId'), 10) }
14248    : {};
14249};
14250
14251ListView.prototype.load = function(params)
14252{
14253  if (this.replaceState) {
14254    this.doReplaceState(params);
14255  }
14256
14257  if (this.listenToGetParams) {
14258    const url = new URL(window.location);
14259    const urlParams = url.searchParams;
14260
14261    _.mapObject(params, (value, key) => {
14262      if (key === 'pageId') {
14263        urlParams.set(key, value);
14264      }
14265
14266      if (key !== 'pageId' && key !== 'displayMode') {
14267        urlParams.delete('pageId');
14268      }
14269    });
14270
14271
14272    url.searchParams = urlParams.toString();
14273
14274    history.pushState({}, null, url.toString());
14275  }
14276
14277  if (!xcart.isRequesterEnabled) {
14278    return false;
14279  }
14280
14281  if (this.isLoading) {
14282    this.deferredLoad = true;
14283    return true;
14284  }
14285
14286  this.isLoading = true;
14287  this.deferredLoad = false;
14288
14289  this.lastLoadParams = params;
14290
14291  const newUrl = this.buildWidgetRequestURL(params);
14292
14293  if (this.base) {
14294    this.base.trigger('preload', [this, newUrl]);
14295
14296    if (typeof(this.preloadHandler) == 'function') {
14297      // Call preload event handler
14298      this.preloadHandler.call(this.base);
14299    }
14300  }
14301
14302  var state = { 'widget': this, 'url': newUrl, 'options': this.getLoaderOptions() }
14303
14304  this.triggerVent('preload', state);
14305
14306  this.saveState();
14307
14308  this.shade();
14309
14310  state.xhr = xcart.get(state.url, this.loadHandlerCallback, null, state.options);
14311
14312  this.triggerVent('afterload', state);
14313
14314  return state.xhr;
14315};
14316
14317
14318ListView.prototype.shadeWidget = true;
14319
14320ListView.prototype.sessionCell = null;
14321
14322ListView.prototype.postprocess = function(isSuccess, initial)
14323{
14324  ListView.superclass.postprocess.apply(this, arguments);
14325
14326  if (isSuccess) {
14327
14328    const o = this;
14329
14330    // Register page click handler
14331    jQuery('.pagination a', this.base).click(
14332      function() {
14333        // scroll page to list top
14334        jQuery('html, body').animate({scrollTop: o.base.offset().top});
14335
14336        return !o.load({'pageId': xcart.getValueFromClass(this, 'page')});
14337      }
14338    );
14339    jQuery('input.page-length').validationEngine();
14340
14341    // Register page count change handler
14342    jQuery('input.page-length', this.base).change(
14343      function() {
14344        if (!o.isLoading) {
14345          if(!jQuery(this).validationEngine('validate')) {
14346            count = parseInt(jQuery(this).val());
14347
14348            if (isNaN(count)) {
14349              //TODO We must take it from the previous widget parameters ...
14350              count = 10;
14351
14352            } else if (count < 1) {
14353              count = 1;
14354            }
14355
14356            if (count != jQuery(this).val()) {
14357              jQuery(this).val(count);
14358            }
14359
14360            o.load({
14361              'pageId': 1,
14362              'itemsPerPage': count
14363            });
14364          }
14365        }
14366      }
14367    );
14368
14369    jQuery('input.page-length', this.base).keypress(
14370      function(event) {
14371        if (event.keyCode == 13) {
14372          jQuery(event.currentTarget).change();
14373        }
14374      }
14375    );
14376
14377    window.addEventListener('popstate', function () {
14378      if (xcart.getCommentedData(o.base, 'listenToGetParams')) {
14379        location.reload();
14380      }
14381    });
14382  }
14383};;
14384/* AUTOGENERATED: products_list.js */
14385/* vim: set ts=2 sw=2 sts=2 et: */
14386
14387/**
14388 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
14389 * See https://www.x-cart.com/license-agreement.html for license details.
14390 */
14391
14392function ProductsListView(base)
14393{
14394  ProductsListView.superclass.constructor.apply(this, arguments);
14395
14396  xcart.bind('popup.close', _.bind(this.handleCloseQuickLookPopup, this));
14397
14398  this.requests = [];
14399}
14400
14401extend(ProductsListView, ListView);
14402
14403// Products list class
14404function ProductsListController(base)
14405{
14406  ProductsListController.superclass.constructor.apply(this, arguments);
14407
14408  xcart.bind('updateCart', _.bind(this.updateCartHandler, this));
14409}
14410
14411extend(ProductsListController, ListsController);
14412
14413ProductsListController.prototype.name = 'ProductsListController';
14414
14415ProductsListController.prototype.findPattern += '.items-list-products';
14416
14417ProductsListController.prototype.getListView = function()
14418{
14419  return new ProductsListView(this.base);
14420};
14421
14422ProductsListController.prototype.updateCartHandler = function(event, data) {
14423  if (_.isUndefined(data.items)) {
14424    return;
14425  }
14426
14427  for (let i = 0; i < data.items.length; i++) {
14428    if (data.items[i].object_type == 'product') {
14429
14430      // Added mark
14431      const productPattern = '.product.productid-' + data.items[i].object_id;
14432      const product = jQuery(productPattern, this.base);
14433      const oldQty = product.find('.qty-in-cart').val();
14434
14435      if (
14436        !oldQty
14437        || !data.items[i].quantity_change
14438        || !product.hasClass('qty-update-is-needed')
14439      ) {
14440        return;
14441      }
14442
14443      const newQty = parseInt(oldQty) + data.items[i].quantity_change;
14444
14445      if (newQty > 0) {
14446        product.addClass('product-added');
14447        if (this.block) {
14448          this.block.triggerVent('item.addedToCart', {'view': this, 'item': product});
14449        }
14450
14451      } else {
14452        product.removeClass('product-added');
14453        if (this.block) {
14454          this.block.triggerVent('item.removedFromCart', {'view': this, 'item': product});
14455        }
14456      }
14457
14458      if (product.hasClass('qty-update-is-needed')) {
14459        product
14460          .find('.qty-in-cart')
14461          .val(newQty);
14462
14463        product.removeClass('qty-update-is-needed');
14464      }
14465
14466      // Check inventory limit
14467      if (data.items[i].is_limit) {
14468        product.addClass('out-of-stock');
14469
14470        product
14471          .find('.increase-qty')
14472          .prop('disabled', true);
14473
14474        product
14475          .find('.add-to-cart')
14476          .prop('disabled', true);
14477
14478        if (this.block) {
14479          this.block.triggerVent('item.outOfStock', {'view': this, 'item': product});
14480        }
14481
14482      } else {
14483        product.removeClass('out-of-stock all-stock-in-cart')
14484
14485        product
14486          .find('.increase-qty')
14487          .prop('disabled', false);
14488
14489        product
14490          .find('.add-to-cart')
14491          .prop('disabled', false);
14492
14493        if (this.block) {
14494          this.block.triggerVent('item.stockIncrease', {'view': this, 'item': product});
14495        }
14496      }
14497    }
14498  }
14499};
14500
14501ProductsListView.prototype.postprocess = function(isSuccess, initial)
14502{
14503  ProductsListView.superclass.postprocess.apply(this, arguments);
14504
14505  const self = this;
14506
14507  if (isSuccess) {
14508
14509    // Column switcher for 'table' display mode
14510    jQuery('.products-table .column-switcher', this.base).commonController('markAsColumnSwitcher');
14511
14512    const currentPageIdParam = self.getCurrentPageIdParam();
14513
14514    // Register "Changing display mode" handler
14515    jQuery('.display-modes a', this.base).click(
14516      function() {
14517        return !self.load({
14518          ...currentPageIdParam,
14519          'displayMode': jQuery(this).attr('class')
14520        });
14521      }
14522    );
14523
14524    // Register "Sort by" selector handler
14525    jQuery('.sort-crit a', this.base).click(
14526      function () {
14527        return !self.load({
14528          'pageId': 1,
14529          'sortBy': jQuery(this).data('sort-by'),
14530          'sortOrder': jQuery(this).data('sort-order'),
14531          'mode': 'append'
14532        });
14533      }
14534    );
14535
14536    xcart.bind(
14537      'afterPopupPlace',
14538      function() {
14539        new ProductDetailsController(jQuery('.ui-dialog div.product-quicklook'));
14540      }
14541    );
14542
14543    // Manual set cell's height
14544    this.base.find('table.products-grid tr').each(
14545      function () {
14546        let height = 0;
14547        jQuery('div.product', this).each(
14548          function() {
14549            height = Math.max(height, jQuery(this).height());
14550          }
14551        );
14552      }
14553    );
14554
14555    // Process click on 'Add to cart' buttons by AJAX
14556    jQuery('.add-to-cart, .increase-qty', this.base).not('.link').each(
14557      function (index, elem) {
14558        jQuery(elem).click(function() {
14559
14560          let product = $(elem).closest('.product-cell').find('.product');
14561          if (!product.length) {
14562            product = $(elem).closest('.product-cell');
14563          }
14564
14565          const pid = xcart.getValueFromClass(product, 'productid');
14566          const forceOptions = product.is('.need-choose-options');
14567          const changeQuantityButtons = self.getChangeQuantityButtons(product);
14568
14569          if (pid && !self.isLoading) {
14570            changeQuantityButtons.forEach((button) => {
14571              button.element.prop('disabled', true);
14572            });
14573          }
14574
14575          product.addClass('qty-update-is-needed');
14576
14577          if (forceOptions) {
14578            changeQuantityButtons.forEach((button) => {
14579              button.element.prop('disabled', button.disabledState);
14580            });
14581            self.openQuickLook(product);
14582          } else {
14583            xcart.trigger('addToCartViaClick', {productId: pid});
14584
14585            self.addToCart(elem)
14586              .always(function() {
14587                changeQuantityButtons.forEach((button) => {
14588                  button.element.prop('disabled', button.disabledState);
14589                });
14590              });
14591          }
14592        });
14593      }
14594    );
14595
14596    // Process click on 'Decrease quantity' button by AJAX
14597    jQuery('.decrease-qty', this.base).each(
14598      function (index, elem) {
14599        jQuery(elem).click(function() {
14600          let product = $(elem).closest('.product-cell').find('.product');
14601          if (!product.length) {
14602            product = $(elem).closest('.product-cell');
14603          }
14604
14605          const pid = xcart.getValueFromClass(product, 'productid');
14606          const changeQuantityButtons = self.getChangeQuantityButtons(product);
14607
14608          if (pid && !self.isLoading) {
14609            changeQuantityButtons.forEach((button) => {
14610              button.element.prop('disabled', true);
14611            });
14612          }
14613
14614          product.addClass('qty-update-is-needed');
14615
14616          xcart.trigger('removeFromCartViaClick', {productId: pid});
14617
14618          self.removeFromCart(elem)
14619            .always(function() {
14620              changeQuantityButtons.forEach((button) => {
14621                button.element.prop('disabled', button.disabledState);
14622              });
14623            });
14624        });
14625      }
14626    );
14627  } // if (isSuccess)
14628}; // ProductsListView.prototype.postprocess()
14629
14630
14631ProductsListView.prototype.productPattern = '.products-grid .product, .products-list .product, .products-sidebar .product';
14632
14633
14634// Post AJAX request to add product to cart
14635ProductsListView.prototype.addToCart = function (elem) {
14636  const $elem = jQuery(elem);
14637  const pid = xcart.getValueFromClass($elem, 'productid');
14638
14639  let xhr = new $.Deferred();
14640
14641  if (pid && !this.isLoading) {
14642    if (this) {
14643      xhr = xcart.post(
14644        URLHandler.buildURL({ target: 'cart', action: 'add' }),
14645        _.bind(this.handleAddToCart, this),
14646        this.addToCartRequestParams($elem),
14647        {
14648          rpc: true
14649        }
14650      );
14651    }
14652  } else {
14653    xhr.reject();
14654  }
14655
14656  return xhr;
14657};
14658
14659ProductsListView.prototype.addToCartRequestParams = function ($elem) {
14660  const pid = xcart.getValueFromClass($elem, 'productid');
14661  const isProductAdded = ($elem.closest('.product-added').length > 0);
14662
14663  return {
14664    target: 'cart',
14665    action: 'add',
14666    product_id: pid,
14667    addLastUpdatedItem: isProductAdded
14668  }
14669}
14670
14671ProductsListView.prototype.handleAddToCart = function (XMLHttpRequest, textStatus, data, isValid) {
14672  if (!isValid) {
14673    xcart.trigger(
14674      'message',
14675      {
14676        text: 'An error occurred during adding the product to cart. Please refresh the page and try to add the product to cart again or contact the store administrator.',
14677        type: 'error'
14678      }
14679    );
14680  }
14681};
14682
14683// Post AJAX request to remove product from cart
14684ProductsListView.prototype.removeFromCart = function (elem) {
14685  const $elem = jQuery(elem);
14686  const pid = xcart.getValueFromClass($elem, 'productid');
14687
14688  let xhr = new $.Deferred();
14689
14690  if (pid && !this.isLoading) {
14691    if (this) {
14692      xhr = xcart.post(
14693        URLHandler.buildURL({ target: 'cart', action: 'remove' }),
14694        _.bind(this.handleRemoveFromCart, this),
14695        this.removeFormCartRequestParams($elem),
14696        {
14697          rpc: true
14698        }
14699      );
14700    }
14701  } else {
14702    xhr.reject();
14703  }
14704
14705  return xhr;
14706};
14707
14708ProductsListView.prototype.removeFormCartRequestParams = function (elem) {
14709  const pid = xcart.getValueFromClass(elem, 'productid');
14710
14711  return {
14712    target:     'cart',
14713    action:     'remove',
14714    product_id: pid
14715  }
14716}
14717
14718ProductsListView.prototype.handleRemoveFromCart = function (XMLHttpRequest, textStatus, data, isValid) {
14719  if (!isValid) {
14720    xcart.trigger(
14721      'message',
14722      {
14723        text: 'An error occurred during removing the product from cart. Please refresh the page and try to remove the product from cart again or contact the store administrator.',
14724        type: 'error'
14725      }
14726    );
14727  }
14728};
14729
14730ProductsListView.prototype.focusOnFirstOption = _.once(function() {
14731  xcart.bind('afterPopupPlace', function(event, data){
14732    if (popup.currentPopup.box.hasClass('ctrl-customer-quicklook')) {
14733      const option = popup.currentPopup.box.find('.editable-attributes select, input').filter(':visible').first();
14734      option.focus();
14735    }
14736  })
14737});
14738
14739ProductsListView.prototype.openQuickLook = function(elem) {
14740  this.focusOnFirstOption();
14741  return !popup.load(
14742    URLHandler.buildURL(this.openQuickLookParams(elem)),
14743    function () {
14744      jQuery('.formError').hide();
14745    },
14746    50000
14747  );
14748};
14749
14750ProductsListView.prototype.handleCloseQuickLookPopup = function(event, data)
14751{
14752  if (data.box && data.box.find('.product-quicklook').length > 0 && jQuery('body').find(data.box).length > 0) {
14753    data.box.dialog('destroy');
14754    data.box.remove();
14755  }
14756};
14757
14758ProductsListView.prototype.openQuickLookParams = function (elem) {
14759  const product_id = xcart.getValueFromClass(elem, 'productid');
14760
14761  return {
14762    target:      'quick_look',
14763    action:      '',
14764    product_id:  product_id,
14765    only_center: 1
14766  }
14767}
14768
14769// Get event namespace (prefix)
14770ProductsListView.prototype.getEventNamespace = function () {
14771  return 'list.products';
14772};
14773
14774ProductsListView.prototype.getChangeQuantityButtons = function (product) {
14775  const result = [];
14776  const buttons = [
14777    product.find('.add-to-cart'),
14778    product.find('.increase-qty'),
14779    product.find('.decrease-qty')
14780  ];
14781
14782  buttons.forEach((button) => {
14783    result.push({
14784      'element': button,
14785      'disabledState': button.prop('disabled')
14786    })
14787  });
14788
14789  return result;
14790}
14791
14792/**
14793 * Load product lists controller
14794 */
14795xcart.autoload(ProductsListController);;
14796/* AUTOGENERATED: script.js */
14797/* vim: set ts=2 sw=2 sts=2 et: */
14798
14799/**
14800 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
14801 * See https://www.x-cart.com/license-agreement.html for license details.
14802 */
14803
14804function product_comparison() {
14805  jQuery('div.compare-checkbox').mouseover(
14806    function() {
14807      jQuery(this).parent().addClass('visible');
14808    }
14809  );
14810
14811  jQuery('.compare-checkbox input').not('.binded').each(
14812    function() {
14813      var pr = jQuery(this);
14814      pr.change(
14815        function() {
14816          var action = pr.prop('checked') ? 'add' : 'delete';
14817          xcart.post(
14818            URLHandler.buildURL(
14819              {
14820                target: 'product_comparison',
14821                action: action
14822              }
14823            ),
14824            function(XMLHttpRequest, textStatus, data, valid) {
14825              if (data) {
14826                data = jQuery.parseJSON(data);
14827                if (data.count > 0) {
14828                  jQuery('div.compare-popup').removeClass('hide_item');
14829                } else {
14830                  jQuery('div.compare-popup').addClass('hide_item');
14831                }
14832                if (data.count > 1) {
14833                  jQuery('button.compare').removeClass('disabled');
14834                } else {
14835                  jQuery('button.compare').addClass('disabled');
14836                }
14837                jQuery('.compare-products-selected').text(data.title);
14838              }
14839            },
14840            {
14841              target:     'product_comparison',
14842              action:     action,
14843              product_id: pr.data('id')
14844            },
14845            {
14846              rpc: true
14847            }
14848          );
14849        }
14850      );
14851      xcart.bind('updateProductComparison',
14852        function(event, data) {
14853          if (data.productId == pr.data('id')) {
14854            if (data.action == 'add') {
14855              pr.prop('checked', 'checked');
14856
14857            } else {
14858              pr.prop('checked', false);
14859            }
14860          }
14861        }
14862      );
14863    }
14864  ).addClass('binded');
14865};
14866/* AUTOGENERATED: script.js */
14867/* vim: set ts=2 sw=2 sts=2 et: */
14868
14869/**
14870 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
14871 * See https://www.x-cart.com/license-agreement.html for license details.
14872 */
14873
14874xcart.bind(
14875  'load',
14876  function() {
14877    decorate(
14878      'ProductsListView',
14879      'postprocess',
14880      function(isSuccess, initial)
14881      {
14882        arguments.callee.previousMethod.apply(this, arguments);
14883
14884        if (isSuccess) {
14885          jQuery('div.product').mouseover(
14886            function() {
14887              jQuery(this).addClass('compare');
14888            }
14889          ).mouseout(
14890            function() {
14891              jQuery(this).removeClass('compare');
14892            }
14893          );
14894
14895          jQuery('div.add-to-compare.products div.compare-popup').mouseleave(
14896            function() {
14897              jQuery(this).removeClass('visible');
14898            }
14899          );
14900
14901          product_comparison();
14902        }
14903      }
14904    );
14905  }
14906);;
14907/* AUTOGENERATED: attributetoform.js */
14908/* vim: set ts=2 sw=2 sts=2 et: */
14909
14910/**
14911 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
14912 * See https://www.x-cart.com/license-agreement.html for license details.
14913 */
14914
14915jQuery(function () {
14916    $(document).on('click', '.add2cart', function () {
14917        var form_id = $('form.product-details').attr('id');
14918        $('.editable-attributes :input').each(function () {
14919            $(this).attr('form', form_id);
14920        });
14921    });
14922});;
14923/* AUTOGENERATED: controller.js */
14924/* vim: set ts=2 sw=2 sts=2 et: */
14925
14926/**
14927 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
14928 * See https://www.x-cart.com/license-agreement.html for license details.
14929 */
14930
14931/**
14932 * Controller
14933 */
14934
14935function ProductDetailsController(base)
14936{
14937  var o = this;
14938  ProductDetailsController.superclass.constructor.apply(this, arguments);
14939
14940  if (
14941    this.base
14942    && this.base.get(0)
14943    && (
14944      xcart.getCommentedData(jQuery('body'), 'product_id')
14945      || (
14946        jQuery('form.product-details', this.base).get(0)
14947        && jQuery('form.product-details', this.base).get(0).elements.namedItem('product_id')
14948      )
14949    )
14950  ) {
14951    this.productId = xcart.getCommentedData(jQuery('body'), 'product_id')
14952      ? xcart.getCommentedData(jQuery('body'), 'product_id')
14953      : jQuery('form.product-details', this.base).get(0).elements.namedItem('product_id').value;
14954
14955    this.block = new ProductDetailsView(this.base, this.productId);
14956
14957    xcart.bind(
14958      'updateCart',
14959      function(event, data) {
14960        var i;
14961
14962        if (!_.isUndefined(data.items)) {
14963          for (i = 0; i < data.items.length; i++) {
14964            if (data.items[i].object_type == 'product' && data.items[i].object_id == o.productId) {
14965              if (0 < data.items[i].quantity && !jQuery('body').hasClass('added-product')) {
14966                jQuery('body').addClass('added-product')
14967                  .removeClass('non-added-product');
14968
14969              } else if (0 == data.items[i].quantity && jQuery('body').hasClass('added-product')) {
14970                jQuery('body').addClass('non-added-product')
14971                  .removeClass('added-product');
14972              }
14973            }
14974          }
14975
14976          if (!o.selfAdded) {
14977            for (i = 0; i < data.items.length; i++) {
14978              if (data.items[i].object_type == 'product' && data.items[i].object_id == o.productId) {
14979                o.block.load();
14980              }
14981            }
14982          }
14983        }
14984      }
14985    );
14986
14987    var use = this.base.data('use-widgets-collection');
14988    if ('undefined' == typeof(use) || use) {
14989      xcart.callTriggersBind('update-product-page');
14990    }
14991  }
14992}
14993
14994extend(ProductDetailsController, AController);
14995
14996// Prodiuct id
14997ProductDetailsController.prototype.productId = null;
14998
14999// Controller name
15000ProductDetailsController.prototype.name = 'ProductDetailsController';
15001
15002// Find pattern
15003ProductDetailsController.prototype.findPattern = 'div.product-details';
15004
15005// Controller associated main widget
15006ProductDetailsController.prototype.block = null;
15007
15008// Controller associated buttons block widget
15009ProductDetailsController.prototype.buttonsBlock = null;
15010
15011ProductDetailsController.prototype.selfAdded = false;
15012
15013// Initialize controller
15014ProductDetailsController.prototype.initialize = function()
15015{
15016  this.base.bind(
15017    'reload',
15018    _.bind(
15019      function(event, box) {
15020        this.bind(box);
15021      },
15022      this
15023    )
15024  );
15025};
15026
15027/**
15028 * Main widget
15029 */
15030
15031function ProductDetailsView (base, productId) {
15032  this.callSupermethod('constructor', arguments);
15033
15034  this.productId = productId;
15035
15036  this.bind('local.loaded', function () {
15037    xcart.trigger('update-product-page', productId);
15038  });
15039
15040  xcart.bind('mm-menu.created', function(event, api){
15041    if (_.has(jQuery, 'colorbox')) {
15042      jQuery.colorbox.remove();
15043    }
15044  });
15045  xcart.bind('initialize-product-gallery', _.bind(this.initializeGallery, this));
15046
15047  this.linkClickHandler = _.bind(
15048    function(event)
15049    {
15050      event.stopPropagation();
15051
15052      this.showLightbox();
15053      jQuery('.product-image-gallery li.selected a', this.base).eq(0).trigger('click');
15054
15055      return false;
15056    },
15057    this
15058  );
15059}
15060
15061extend(ProductDetailsView, ALoadable);
15062
15063// Prodiuct id
15064ProductDetailsView.prototype.productId = null;
15065
15066ProductDetailsView.prototype.shadeClass = 'wait-progress overlay-blur-base';
15067// Widget target
15068ProductDetailsView.prototype.widgetTarget = 'product';
15069
15070// Widget class name
15071ProductDetailsView.prototype.widgetClass = '\\XLite\\View\\Product\\Details\\Customer\\Page\\Main';
15072
15073// Imgaes gallery
15074ProductDetailsView.prototype.galleries = null;
15075
15076// Zoom layer max. width
15077ProductDetailsView.prototype.zoomMaxWidth = 460;
15078
15079// Width after which the zoom will be initialized
15080ProductDetailsView.prototype.zoomWidth = 991;
15081
15082// Zoom widget
15083ProductDetailsView.prototype.zoomWidget = false;
15084
15085// Zoom layer max. width
15086ProductDetailsView.prototype.kZoom = 1.3;
15087
15088ProductDetailsView.prototype.shadeWidget = function()
15089{
15090  return 0 == this.base.parents('.ui-dialog').length;
15091};
15092
15093ProductDetailsView.prototype.preloadHandler = function ()
15094{
15095  if (this.hasClass('product-quicklook')) {
15096    popup.close();
15097  }
15098};
15099
15100ProductDetailsView.prototype.initializeGallery = function ()
15101{
15102  var self = this;
15103  self.galleries = [];
15104  jQuery('.product-image-gallery', this.base).each(function () {
15105    self.galleries.push($(this).find('li'));
15106  });
15107};
15108
15109ProductDetailsView.prototype.applyToGalleries = function (callback)
15110{
15111  if (this.galleries) {
15112    var self = this;
15113    this.galleries.forEach(function (gallery) {
15114      callback.apply(self, [gallery]);
15115    })
15116  }
15117};
15118
15119// Postprocess widget
15120ProductDetailsView.prototype.postprocess = function(isSuccess, initial)
15121{
15122  this.callSupermethod('postprocess', arguments);
15123
15124  if (isSuccess) {
15125    // Hide popup title
15126    jQuery(this.base).parents('.ui-dialog').eq(0).addClass('no-title');
15127
15128    this.initializeGallery();
15129
15130    var o = this;
15131
15132    // Bind the cloud zoom triggering event.
15133    // The element initializes itself the cloud zoom widget
15134    jQuery('.cloud-zoom', this.base).bind(
15135      'cloud-zoom',
15136      function (event) {
15137        var rel;
15138        if (jQuery(window).width() > o.zoomWidth) {
15139          if (jQuery(this).data('zoom')) {
15140            jQuery(this).data('zoom').destroy();
15141          }
15142
15143          var baseRel = _.object(_.map(jQuery(this).data('rel-base').split(','), function (value, key, list) {
15144            return _.map(_.trim(value).split(':'), function (value) {return _.trim(value);});
15145          }));
15146          jQuery(this).attr('data-rel', jQuery(this).data('rel-base'));
15147
15148          // adjust zoom width and height for current image
15149          var img = jQuery('img', this);
15150
15151          if (typeof jQuery(this).CloudZoom !== "undefined") {
15152            jQuery(this).CloudZoom();
15153          };
15154
15155          rel = xcart.getRelArray(jQuery(this));
15156          rel.zoomWidth = Math.min(img.width(), baseRel.zoomWidth);
15157          rel.zoomHeight = Math.min(img.height(), baseRel.zoomHeight);
15158          rel.adjustX  = intval(img.offset().left - jQuery(this).offset().left);
15159
15160          if (rel.position !== "'inside'") {
15161            rel.adjustX += 10;
15162            jQuery(this).closest('.cloud-zoom-photo').addClass('cloud-zoom-outside').removeClass('cloud-zoom-inside');
15163          }
15164
15165
15166          xcart.setRelArray(jQuery(this), rel);
15167
15168          if (typeof jQuery(this).CloudZoom !== "undefined") {
15169            jQuery(this).CloudZoom();
15170          };
15171
15172          jQuery('.image .product-photo img', o.base).css({width: '', height: ''});
15173        } else {
15174          jQuery(this).closest('.cloud-zoom-photo').removeClass('cloud-zoom-outside').addClass('cloud-zoom-inside');
15175
15176          jQuery(this).attr('data-rel', jQuery(this).data('rel-base'));
15177
15178          if (jQuery(this).data('zoom')) {
15179            jQuery(this).data('zoom').destroy();
15180          }
15181
15182          rel = xcart.getRelArray(jQuery(this));
15183
15184          var photo = jQuery('.image .product-photo', o.base);
15185          rel.position = "'inside'";
15186          rel.adjustX  = intval(
15187            photo.find('img').offset().left - photo.find('.cloud-zoom').offset().left
15188          );
15189
15190          xcart.setRelArray(jQuery(this), rel);
15191
15192          jQuery(this).CloudZoom();
15193
15194          jQuery('.image .product-photo img', o.base).css({width: 'auto', height: 'auto'});
15195        }
15196      }
15197    );
15198
15199    // Arrow-based image navigation
15200    jQuery('.image .left-arrow', this.base).click(
15201      function (event) {
15202        o.switchImage(-1);
15203      }
15204    );
15205
15206    jQuery('.image .right-arrow', this.base).click(
15207      function (event) {
15208        o.switchImage(1);
15209      }
15210    );
15211
15212    // Form AJAX-based submit
15213    var form = this.base.find('form.product-details').get(0);
15214    if (form) {
15215      form.commonController
15216        .enableBackgroundSubmit()
15217        .bind('local.beforeSubmit', _.bind(this.addProductToCart, this))
15218        .bind('local.submitted', _.bind(this.postprocessAdd2Cart, this))
15219    }
15220
15221    // Cloud zoom
15222    var cloud = jQuery('.cloud-zoom', this.base);
15223
15224    if (cloud.length) {
15225      // The zoom effect is removed from Quick look
15226      this.zoomWidget = !this.base.hasClass('product-quicklook');
15227
15228      if (xcart.getCommentedData(cloud, 'kZoom')) {
15229        this.kZoom = xcart.getCommentedData(cloud, 'kZoom');
15230      }
15231
15232      var imageWrapper = jQuery(document.createElement('div')).addClass('wrapper');
15233
15234      cloud.wrap(imageWrapper);
15235    }
15236
15237    // Change Continue shopping button for QuickLook mode
15238    if (this.base.hasClass('product-quicklook') && 0 < this.base.parents('.blockUI').length) {
15239      jQuery('button.continue', this.base)
15240        .unbind('click')
15241        .removeAttr('onclick');
15242      jQuery('button.continue', this.base).click(
15243        function() {
15244          popup.close();
15245          return false;
15246        }
15247      );
15248    }
15249
15250    // Show Lightbox on the image click
15251    cloud.click(
15252      function(event) {
15253        o.showLightbox();
15254        jQuery('.product-image-gallery li.selected a').eq(0).trigger('click');
15255
15256        return false;
15257      }
15258    );
15259
15260    // Gallery
15261    if (typeof(window.lightBoxImagesDir) != 'undefined') {
15262      jQuery('.loupe', this.base).click(
15263        function(event) {
15264          o.showLightbox();
15265          setTimeout(
15266            function() {
15267              jQuery('.product-image-gallery li.selected a').eq(0).trigger('click');
15268            },
15269            500
15270          );
15271
15272          return false;
15273        }
15274      );
15275    }
15276
15277    this.hideLightbox();
15278
15279    // Tabs
15280    var tabsBase = jQuery('.product-details-tabs', this.base);
15281    var initialURL = document.location.toString().split('#')[0];
15282
15283    tabsBase.find('.tabs li a').click(
15284      _.bind(
15285        function (event) {
15286          event.preventDefault();
15287
15288          var link = jQuery(event.currentTarget);
15289          this.openTab(link);
15290
15291          if (history.replaceState) {
15292            history.replaceState(null, null, initialURL + '#' + link.data('id'));
15293
15294          } else {
15295            self.location.hash = link.data('id');
15296          }
15297        },
15298        this
15299      )
15300    );
15301
15302    this.checkLocation();
15303
15304    if (jQuery('.product-image-gallery li a', this.base).length) {
15305      // TODO: improve to skip additional JS manipulations
15306      // like resizing etc when it is not needed
15307      jQuery('.product-image-gallery li a', o.base).first().click();
15308    } else if (this.zoomWidget && !cloud.data('zoom')) {
15309      cloud.trigger('cloud-zoom');
15310    }
15311
15312    jQuery('a.link-to-tab').click(
15313      _.bind(
15314        function (event) {
15315          self.location = event.currentTarget.href;
15316          this.checkLocation();
15317        },
15318        this
15319      )
15320    );
15321  }
15322};
15323
15324ProductDetailsView.prototype.openTab = function(link)
15325{
15326  var tabsBase = jQuery('.product-details-tabs', this.base);
15327
15328  link = jQuery(link);
15329  tabsBase.find('.tabs li').removeClass('active');
15330  link.parent().addClass('active');
15331
15332  tabsBase.find('.tabs-container .tab-container').hide();
15333  tabsBase.find('.tabs-container #' + link.data('id')).show();
15334
15335  this.triggerVent('tab.open', { widget: this, tab: link });
15336
15337  if (link.closest('.panel').find('.panel-collapse').length) {
15338    var pane = link.closest('.panel').find('.panel-collapse').first();
15339    pane.on('transitionend webkitTransitionEnd oTransitionEnd', function () {
15340      pane.unbind('transitionend webkitTransitionEnd oTransitionEnd');
15341      $('html, body').animate({
15342        scrollTop: (link.offset().top - $('#header-area').height())
15343      },300);
15344    });
15345
15346    if (pane.hasClass('in')) {
15347      setTimeout(function () {
15348        $('html, body').animate({
15349            scrollTop: (link.offset().top - $('#header-area').height())
15350        }, 300);
15351      }, 0);
15352      pane.unbind('transitionend webkitTransitionEnd oTransitionEnd');
15353    }
15354    pane.collapse('show');
15355  }
15356};
15357
15358ProductDetailsView.prototype.checkLocation = function()
15359{
15360    var hash = ((self.location.hash) + '').replace(/^#/, '');
15361    if (hash) {
15362      var tabsBase = jQuery('.product-details-tabs', this.base);
15363      var found = null;
15364
15365      var state = {
15366        'widget': this,
15367        'hash':   hash
15368      };
15369
15370      this.triggerVent('tab.hash.resolve', state);
15371      hash = state.hash;
15372
15373      tabsBase.find('.tabs li a').each(
15374        function() {
15375          var link = jQuery(this);
15376          if (link.data('id') == hash) {
15377            found = link;
15378          } else if (link.data('alt-id') == hash) {
15379            found = link;
15380          }
15381        }
15382      );
15383
15384      state = {
15385        'tab':    found,
15386        'widget': this,
15387        'hash':   hash
15388      };
15389
15390      this.triggerVent('tab.detection', state);
15391
15392      if (state.tab) {
15393        this.openTab(state.tab);
15394      } else {
15395        tabsBase.find('a[data-id="' + hash + '"]').first().click();
15396      }
15397    } else {
15398      var tabsBase = jQuery('.product-details-tabs', this.base);
15399      this.openTab(tabsBase.find('.tabs li a').first());
15400    }
15401};
15402
15403ProductDetailsView.prototype.showLightbox = function()
15404{
15405  if (_.has(jQuery, 'colorbox')) {
15406    jQuery('.product-image-gallery a', this.base)
15407      .unbind('click')
15408      .colorbox(this.getColorboxOptions());
15409  };
15410};
15411
15412ProductDetailsView.prototype.hideLightbox = function()
15413{
15414  var o = this;
15415
15416  jQuery('.product-image-gallery a', this.base)
15417    .unbind('click')
15418    .bind(
15419      'click',
15420      function(event) {
15421        event.stopPropagation();
15422        o.selectImage(
15423          jQuery.inArray(this, jQuery(this).parents('ul').eq(0).find('a').get())
15424        );
15425
15426        return false;
15427      }
15428    );
15429};
15430
15431ProductDetailsView.prototype.getColorboxOptions = function () {
15432  return {
15433    onComplete: function () {
15434      jQuery('#cboxCurrent').css('display', 'none');
15435      jQuery('#cboxTitle').text(jQuery('img', this).attr('alt'));
15436    },
15437    onClosed: _.bind(this.hideLightbox, this),
15438    maxWidth: jQuery(window).width(),
15439    maxHeight: jQuery(window).height(),
15440    title: jQuery('.product-photo img', this.base).attr('alt')
15441  };
15442};
15443
15444// Get base element for shade / unshade operation
15445ProductDetailsView.prototype.getShadeBase = function () {
15446  return jQuery('.shade-base', this.base).eq(0);
15447};
15448
15449// Image gallery switcher
15450ProductDetailsView.prototype.switchImage = function (diff) {
15451  var next = -1;
15452
15453  this.applyToGalleries(function (gallery) {
15454    if (next !== -1) {
15455      return;
15456    }
15457    var selected = -1;
15458    var i = 0;
15459
15460    // Detect current index
15461    gallery.each(function () {
15462      if (selected === -1 && jQuery(this).hasClass('selected')) {
15463        selected = i;
15464      }
15465      i++;
15466    });
15467
15468    if (selected === -1) {
15469      selected = 0;
15470    }
15471
15472    // Calculate new position
15473    next = selected + diff;
15474
15475    if (next < 0) {
15476      next = gallery.length - Math.abs(next) % gallery.length;
15477    } else if (next >= gallery.length) {
15478      next = next % gallery.length;
15479    }
15480  });
15481
15482  this.selectImage(next);
15483};
15484
15485// Select image from gallery
15486ProductDetailsView.prototype.selectImage = function (pos) {
15487  this.applyToGalleries(function (gallery) {
15488    gallery.removeClass('selected');
15489
15490    // Refresh main image and another options + cloud zoom plugin restart
15491    var next = gallery.eq(pos);
15492    next.addClass('selected');
15493
15494    if (this.zoomWidget) {
15495      var cloud = jQuery('.cloud-zoom', this.base);
15496
15497      if (cloud.data('zoom')) {
15498        cloud.data('zoom').destroy();
15499      } else {
15500        cloud.unbind('click', this.linkClickHandler);
15501      }
15502
15503      cloud.attr('href', jQuery('a', next).attr('href'));
15504    }
15505
15506    var middle = jQuery('img.middle', next).eq(0);
15507    if (middle.length > 0) {
15508      var src = middle.attr('src') || null;
15509      var srcset = middle.attr('srcset') || null;
15510      var alt = middle.attr('alt') || null;
15511      jQuery('.image .product-photo img', this.base)
15512        .hide()
15513        .attr('src', src)
15514        .attr('srcset', srcset)
15515        .attr('alt', alt)
15516        .show();
15517    }
15518
15519    if (jQuery('a', next).length) {
15520      var params = jQuery('a', next).attr('rev');
15521
15522      if (this.zoomWidget && params) {
15523        var tmp = xcart.parseObjectString('{' + params + '}');
15524        if (
15525          tmp &&
15526          (tmp.width > (middle.width()  * this.kZoom)
15527          || tmp.height > (middle.width()  * this.kZoom))
15528        ) {
15529          cloud.trigger('cloud-zoom');
15530        } else {
15531          cloud.click(this.linkClickHandler);
15532        }
15533      }
15534    }
15535  })
15536};
15537
15538// Get additional parameters
15539ProductDetailsView.prototype.getParams = function(params)
15540{
15541  params = this.callSupermethod('getParams', arguments);
15542
15543  params.product_id = this.productId;
15544  params.added = 1;
15545
15546  return params;
15547};
15548
15549// Form submit handler
15550ProductDetailsView.prototype.addProductToCart = function(event)
15551{
15552  // We do not shade widgets collection after the product is added to cart
15553  xcart.doShadeWidgetsCollection = false;
15554  this.base.get(0).controller.selfAdded = true;
15555  this.gatherFormFields();
15556};
15557
15558ProductDetailsView.prototype.gatherFormFields = function()
15559{
15560  var elements = jQuery('input:not(:checkbox,:radio),select,textarea,input:checkbox:checked,input:radio:checked', this.base);
15561
15562  for (i = 0; i < elements.length; i++) {
15563    if (
15564      (jQuery(elements[i]).hasClass('form-control')
15565        || jQuery(elements[i]).parents('.attribute-values').length !== 0
15566      )
15567      && 0 == jQuery(elements[i]).parents('form').length
15568    ) {
15569      jQuery('<input>').attr({
15570        type: 'hidden',
15571        name: jQuery(elements[i]).prop('name'),
15572        value: jQuery(elements[i]).val()
15573      }).appendTo('form.product-details');
15574    }
15575  }
15576}
15577
15578// Form POST processor
15579ProductDetailsView.prototype.postprocessAdd2Cart = function(event, data)
15580{
15581  this.base.get(0).controller.selfAdded = false;
15582
15583  data.isValid ? this.load() : this.unshade();
15584};
15585
15586// Get event namespace (prefix)
15587ProductDetailsView.prototype.getEventNamespace = function()
15588{
15589  return 'block.product.details';
15590};
15591
15592xcart.autoload(ProductDetailsController);
15593
15594xcart.bind('updateCart', (event, data) => {
15595  let isProductInCart = false;
15596  const productDetailsBlock = document.querySelector('.product-details.box-product');
15597  if (data.items && productDetailsBlock) {
15598    const productId = parseInt(document.querySelector('input[name="product_id"]').value);
15599    data.items.forEach(item => {
15600      if (item.object_id === productId) {
15601        isProductInCart = true;
15602      }
15603    });
15604    productDetailsBlock.classList.toggle('product-added', isProductInCart);
15605  }
15606});
15607
15608xcart.bind(
15609  'update-product-page',
15610  function (event, productId)
15611  {
15612    xcart.processUpdateWidgetsCollection(
15613      'update-product-page',
15614      '\\XLite\\View\\ProductPageCollection',
15615      {product_id: productId},
15616      '.product-info-' + productId
15617    );
15618  }
15619);
15620
15621var resizerTimer;
15622
15623jQuery(window).resize(
15624  function (event) {
15625    clearTimeout(resizerTimer);
15626    resizerTimer = setTimeout(
15627      function () {
15628        jQuery('.cloud-zoom').trigger('cloud-zoom');
15629      },
15630      500
15631    );
15632  }
15633);
15634
15635define("ProductDetails", function () {});;
15636/* AUTOGENERATED: controller.js */
15637/* vim: set ts=2 sw=2 sts=2 et: */
15638
15639/**
15640 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
15641 * See https://www.x-cart.com/license-agreement.html for license details.
15642 */
15643
15644var old_postprocess = ProductDetailsView.prototype.postprocess;
15645ProductDetailsView.prototype.postprocess = function(isSuccess, initial) {
15646  old_postprocess.apply(this, arguments);
15647
15648  if (isSuccess) {
15649    var initialURL = document.location.toString().split('#')[0];
15650    $('.product-tabs-brief-info li a').click(
15651      _.bind(
15652        function (event) {
15653          event.preventDefault();
15654          var id = $(event.currentTarget).data('id');
15655
15656          var link = jQuery($('.product-details .product-details-tabs a[data-id="' + id + '"]'));
15657
15658          if (!link.length) {
15659            link = jQuery($('.product-details .product-details-tabs a[data-alt-id="' + id + '"]'));
15660          }
15661
15662          this.openTab(link);
15663
15664          if (history.replaceState) {
15665            history.replaceState(null, null, initialURL + '#' + link.data('id'));
15666
15667          } else {
15668            self.location.hash = link.data('id');
15669          }
15670
15671          $('html, body').animate({
15672            scrollTop: $('.product-details .product-details-tabs').offset().top - 100
15673          }, 800, 'easeInOutCubic').on('mousewheel', function () {
15674            $(this).stop();
15675          });
15676        },
15677        this
15678      )
15679    );
15680  }
15681};;
15682/* AUTOGENERATED: product.js */
15683/* vim: set ts=2 sw=2 sts=2 et: */
15684
15685/**
15686 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
15687 * See https://www.x-cart.com/license-agreement.html for license details.
15688 */
15689
15690function getStickyImageTop() {
15691  let result = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--rhythmic-unit'));
15692  if (!result) {
15693    result = 0;
15694  }
15695
15696  return result + getActiveWindowTop();
15697}
15698
15699/* Product photo is sticky only if the window's active height is not bigger than the photo's height. */
15700const maybeMakePhotoSticky = () => {
15701  const photoContainer = document.querySelector('.image-container');
15702
15703  if (photoContainer) {
15704    const photoArea = photoContainer.querySelector('.image-container .image-wrapper');
15705
15706    if (photoArea) {
15707      const photoContainerRect = photoContainer.getBoundingClientRect();
15708      const productAreaRect = photoContainer.parentNode.getBoundingClientRect();
15709      const isSticky = photoContainerRect.width < productAreaRect.width
15710        && getActiveWindowHeight() >= photoArea.getBoundingClientRect().height;
15711
15712      photoArea.classList.toggle('image--sticky', isSticky);
15713      if (isSticky) {
15714        document.documentElement.style.setProperty('--image-top', `${getStickyImageTop()}px`);
15715      }
15716    }
15717  }
15718};
15719
15720const updatePriceBlockRightMargin = () => {
15721  let priceBlockRightMargin = 0;
15722  const priceBlock = document.querySelector('.product-price-base');
15723  const buttonsRow = document.querySelector('.product-buttons .buttons-row');
15724  const buttonsCell = buttonsRow?.querySelector('.add-button-buttons');
15725
15726  if (
15727    priceBlock
15728    && buttonsCell
15729  ) {
15730    if (window.matchMedia('(min-width: 480px) and (max-width: 767px)').matches) {
15731      priceBlockRightMargin = buttonsCell.getBoundingClientRect().width
15732        + parseInt(window.getComputedStyle(buttonsRow).columnGap
15732);
15733
15734      if (isNaN(priceBlockRightMargin)) {
15735        priceBlockRightMargin = 0;
15736      }
15737    } else if (window.matchMedia('(min-width: 992px)').matches) {
15738      priceBlockRightMargin = Math.floor(
15739        buttonsRow.getBoundingClientRect().right - buttonsCell.getBoundingClientRect().right
15740      );
15741    }
15742  }
15743
15744  priceBlockRightMargin = Math.max(0, priceBlockRightMargin);
15745
15746  priceBlock?.style.setProperty('--price-block-right-margin', `${priceBlockRightMargin}px`);
15747  priceBlock?.classList.add('initialized');
15748};
15749
15750const repaintProductPageElements = () => {
15751  maybeMakePhotoSticky();
15752  updatePriceBlockRightMargin();
15753};
15754
15755repaintProductPageElements();
15756document.addEventListener('DOMContentLoaded', repaintProductPageElements);
15757window.addEventListener('load', repaintProductPageElements);
15758window.addEventListener('resize', repaintProductPageElements);
15759window.addEventListener('orientationchange', repaintProductPageElements);
15760
15761document.addEventListener('DOMContentLoaded', () => {
15762  const handler = ProductDetailsView.prototype.getColorboxOptions;
15763
15764  ProductDetailsView.prototype.getColorboxOptions = function () {
15765    const func = _.bind(handler, this);
15766    const result = func();
15767    const onComplete = result.onComplete;
15768    const onClosed = result.onClosed;
15769    const onLoad = result.onLoad;
15770    const onOpen = result.onOpen;
15771    const arrowElement = document.querySelector('.top-menu__categories-item-further-icon');
15772
15773    const updateColorboxButtonsContent = () => {
15774      if (arrowElement) {
15775        const arrowHTML = arrowElement.outerHTML.replace('top-menu__categories-item-further-icon', '');
15776        const prevButton = document.getElementById('cboxPrevious');
15777        const nextButton = document.getElementById('cboxNext');
15778        const closeButton = document.getElementById('cboxClose');
15779        const preloader = document.getElementById('cboxLoadingGraphic');
15780
15781        if (prevButton) {
15782          prevButton.innerHTML = arrowHTML;
15783        }
15784        if (nextButton) {
15785          nextButton.innerHTML = arrowHTML;
15786        }
15787        if (closeButton) {
15788          closeButton.innerHTML = '<svg class="inline-icon inline-icon--plus" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 2.4a1.2 1.2 0 0 0-1.2 1.2v7.2H3.6a1.2 1.2 0 1 0 0 2.4h7.2v7.2a1.2 1.2 0 0 0 2.4 0v-7.2h7.2a1.2 1.2 0 0 0 0-2.4h-7.2V3.6A1.2 1.2 0 0 0 12 2.4Z" fill="currentColor"></path></svg>';
15789        }
15790        if (preloader) {
15791          preloader.innerHTML = getPreloaderSVG();
15792        }
15793      }
15794    };
15795
15796    result.onComplete = function () {
15797      updateColorboxButtonsContent();
15798      onComplete();
15799    };
15800
15801    result.onOpen = function () {
15802      updateColorboxButtonsContent();
15803      document.body.classList.add('colorbox-opened');
15804      if (onOpen) {
15805        onOpen();
15806      }
15807    };
15808
15809    result.onLoad = function () {
15810      updateColorboxButtonsContent();
15811      if (onLoad) {
15812        onLoad();
15813      }
15814    };
15815
15816    result.onClosed = function () {
15817      document.body.classList.remove('colorbox-opened');
15818      if (onClosed) {
15819        onClosed();
15820      }
15821    };
15822
15823    return result;
15824  };
15825
15826  const productDetailsContainer = document.querySelector('.product-details')?.parentNode;
15827  if (productDetailsContainer) {
15828    (new MutationObserver(updatePriceBlockRightMargin)).observe(
15829      productDetailsContainer,
15830      {
15831        childList: true,
15832        subtree: true,
15833        attributes: false,
15834        characterData: true
15835      }
15836    );
15837  }
15838});
15839
15840(function () {
15841
15842  let space = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--rhythmic-unit'));
15843  if (isNaN(space)) {
15844    space = 0;
15845  }
15846  space += 20;
15847
15848  const listScroller = document.querySelector('div.tabs');
15849
15850  if (listScroller) {
15851
15852    const maybeScrollList = function () {
15853      const activeListItem = document.querySelector('ul.tabs.primary li.active');
15854      const rect = activeListItem.getBoundingClientRect();
15855
15856      if (rect.left < space) {
15857        listScroller.scrollBy(rect.left - space, 0);
15858      } else if (rect.right >= window.innerWidth - space) {
15859        listScroller.scrollBy(rect.right - window.innerWidth + space, 0);
15860      }
15861    };
15862
15863    const observer = new MutationObserver(maybeScrollList);
15864
15865    observer.observe(
15866      listScroller,
15867      {
15868        attributes: true,
15869        childList: true,
15870        subtree: true
15871      }
15872    );
15873
15874    maybeScrollList();
15875
15876    window.addEventListener('resize', maybeScrollList, {passive: true});
15877  }
15878})();;
15879/* AUTOGENERATED: fitment.js */
15880/* vim: set ts=2 sw=2 sts=2 et: */
15881
15882/**
15883 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
15884 * See https://www.x-cart.com/license-agreement.html for license details.
15885 */
15886
15887xcart.microhandlers.add(
15888  'product-fitment-click-handler',
15889  '.product-fitment:not(.fitment-type-universal)',
15890  function () {
15891    this.addEventListener('click', () => {
15892      let specLink = document.querySelector('a[data-id="product-details-tab-specification"]');
15893      let specTable = document.querySelector('#product-details-tab-specification .product-fitment-tab-table');
15894
15895      if (!specTable) {
15896        specLink = document.querySelector('a[data-id="product-details-tab-fitment"]');
15897        specTable = document.querySelector('#product-details-tab-fitment .product-fitment-tab-table');
15898      }
15899
15900      if (specLink && specTable) {
15901        specLink.click();
15902        requestAnimationFrame(() => {
15903          jQuery('html').animate({
15904            scrollTop: window.scrollY
15905              + specTable.parentNode.previousElementSibling.getBoundingClientRect().top
15906              - getActiveWindowTop()
15907          });
15908        });
15909      }
15910    });
15911  }
15912);;
15913/* AUTOGENERATED: gallery.js */
15914/* vim: set ts=2 sw=2 sts=2 et: */
15915
15916/**
15917 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
15918 * See https://www.x-cart.com/license-agreement.html for license details.
15919 */
15920
15921const ProductGallery = function (root) {
15922
15923  const isMobileMode = () => {
15924    return getComputedStyle(root).overflowY === 'hidden';
15925  };
15926
15927  const imageLinks = root.querySelectorAll('a[rel="lightbox"]');
15928  const list = root.querySelector('ul');
15929  const container = root.parentNode;
15930  const prevButton = container.querySelector('.product-image-gallery__nav--prev');
15931  const nextButton = container.querySelector('.product-image-gallery__nav--next');
15932  let navContainer = document.querySelector('.gallery-nav__container');
15933  let navButtons = [];
15934  let isAutoScrolling = false;
15935
15936  if (!navContainer) {
15937    navContainer = document.createElement('DIV');
15938    navContainer.className = 'gallery-nav__container';
15939    container.appendChild(navContainer);
15940  }
15941
15942  const fullUpdate = () => {
15943    updatePagesCount();
15944    this.updateActiveButton();
15945    updatePrevNextButtons();
15946  };
15947
15948  const isButtonActive = (i) => {
15949    return navButtons[i] && navButtons[i].classList.contains('gallery-nav__button--active');
15950  };
15951
15952  const updatePrevNextButtons = () => {
15953    if (isMobileMode()) {
15954      const rootClientWidth = root.getBoundingClientRect().width;
15955
15956      if (root.scrollLeft > 0 && prevButton.hasAttribute('disabled')) {
15957        prevButton.removeAttribute('disabled');
15958      } else if (root.scrollLeft <= 0 && !prevButton.hasAttribute('disabled')) {
15959        prevButton.setAttribute('disabled', 'disabled');
15960      }
15961
15962      if (root.scrollLeft + rootClientWidth < root.scrollWidth && nextButton.hasAttribute('disabled')) {
15963        nextButton.removeAttribute('disabled');
15964      } else if (root.scrollLeft + rootClientWidth >= root.scrollWidth && !nextButton.hasAttribute('disabled')) {
15965        nextButton.setAttribute('disabled', 'disabled');
15966      }
15967    } else {
15968      const rootClientHeight = root.getBoundingClientRect().height;
15969
15970      if (root.scrollTop > 0 && prevButton.hasAttribute('disabled')) {
15971        prevButton.removeAttribute('disabled');
15972      } else if (root.scrollTop <= 0 && !prevButton.hasAttribute('disabled')) {
15973        prevButton.setAttribute('disabled', 'disabled');
15974      }
15975
15976      if (root.scrollTop + rootClientHeight < root.scrollHeight && nextButton.hasAttribute('disabled')) {
15977        nextButton.removeAttribute('disabled');
15978      } else if (root.scrollTop + rootClientHeight >= root.scrollHeight && !nextButton.hasAttribute('disabled')) {
15979        nextButton.setAttribute('disabled', 'disabled');
15980      }
15981    }
15982  };
15983
15984  this.getPagesCount = () => {
15985    let result = 0;
15986
15987    if (isMobileMode()) {
15988      const rootWidth = root.getBoundingClientRect().width;
15989
15990      result = Math.ceil(list.scrollWidth / rootWidth);
15991      if (list.scrollWidth % rootWidth < 20) {
15992        result--;
15993      }
15994    } else {
15995      result = Math.ceil(list.scrollHeight / root.getBoundingClientRect().height);
15996    }
15997
15998    return result;
15999  };
16000
16001  const updatePagesCount = () => {
16002    let newCount = this.getPagesCount();
16003
16004    container.classList.toggle('gallery--single-screen', (newCount < 2));
16005    container.classList.toggle('gallery--multi-screen', (newCount >= 2));
16006
16007    if (newCount < 2) {
16008
16009      if (navButtons.length) {
16010        navButtons.forEach(btn => {
16011          btn.parentNode.removeChild(btn);
16012        });
16013        navButtons = [];
16014      }
16015
16016    } else if (newCount < navButtons.length) {
16017
16018      for (let i = newCount; i < navButtons.length; i++) {
16019        navButtons[i].parentNode.removeChild(navButtons[i]);
16020      }
16021      navButtons.splice(newCount);
16022
16023    } else if (newCount > navButtons.length) {
16024
16025      let i = navButtons.length;
16026      for (; i < newCount; i++) {
16027        let btn = document.createElement('BUTTON');
16028        let page = i;
16029
16030        btn.className = 'gallery-nav__button';
16031        btn.addEventListener('click', () => {
16032          this.setPage(page);
16033        });
16034
16035        navButtons.push(btn);
16036        navContainer.appendChild(btn);
16037      }
16038
16039    }
16040  };
16041
16042  this.setPage = (i) => {
16043    this.setActiveButton(i);
16044    isAutoScrolling = true;
16045    root.scrollTo(i * root.getBoundingClientRect().width, 0);
16046
16047    setTimeout(() => {
16048      isAutoScrolling = false;
16049    }, 500);
16050  };
16051
16052  /**
16053   * @param {number} i
16054   * @return void
16055   */
16056  this.setActiveButton = (i) => {
16057    if (navButtons.length === 0) {
16058      return;
16059    }
16060
16061    while (i < 0) {
16062      i += navButtons.length;
16063    }
16064    while (i >= navButtons.length) {
16065      i -= navButtons.length;
16066    }
16067
16068    if (!isButtonActive(i)) {
16069      navButtons.forEach((btn, j) => {
16070        btn.classList.toggle('gallery-nav__button--active', (i === j));
16071      });
16072    }
16073  };
16074
16075  /**
16076   * @return {number}
16077   */
16078  this.getActivePage = () => {
16079    const rootClientWidth = root.getBoundingClientRect().width;
16080
16081    if (root.scrollLeft + rootClientWidth >= root.scrollWidth - 20) {
16082      return this.getPagesCount() - 1;
16083    }
16084
16085    return Math.floor((root.scrollLeft + rootClientWidth - 80) / rootClientWidth);
16086  };
16087
16088  this.updateActiveButton = () => {
16089    this.setActiveButton(this.getActivePage());
16090  };
16091
16092  const scrollHandler = () => {
16093    updatePrevNextButtons();
16094    if (!isAutoScrolling) {
16095      this.updateActiveButton();
16096    }
16097  };
16098
16099  fullUpdate();
16100  root.classList.add('handled');
16101
16102  window.addEventListener('resize', fullUpdate);
16103  window.addEventListener('orientationchange', fullUpdate);
16104
16105  root.addEventListener('scroll', scrollHandler);
16106
16107  prevButton.addEventListener('click', () => {
16108    if (isMobileMode()) {
16109      root.scrollBy(-root.getBoundingClientRect().width, 0);
16110    } else {
16111      root.scrollBy(0, -root.getBoundingClientRect().height);
16112    }
16113  });
16114
16115  nextButton.addEventListener('click', () => {
16116    if (isMobileMode()) {
16117      root.scrollBy(root.getBoundingClientRect().width, 0);
16118    } else {
16119      root.scrollBy(0, root.getBoundingClientRect().height);
16120    }
16121  });
16122
16123  imageLinks.forEach((link, i) => {
16124    link.addEventListener('click', () => {
16125      const rect = link.getBoundingClientRect();
16126      const rootRect = root.getBoundingClientRect();
16127
16128      let space = Math.max(0, parseInt(getComputedStyle(link).getPropertyValue('--page-hspace')));
16129      if (!space) {
16130        space = 0;
16131      }
16132
16133      if (isMobileMode()) {
16134
16135        if (rect.right > rootRect.right - space) {
16136          root.scrollBy(rect.right - rootRect.right + space, 0);
16137        } else if (rect.left < rootRect.left + space) {
16138          root.scrollBy(rect.left - rootRect.left - space, 0);
16139        }
16140
16141      } else {
16142
16143        if (rect.bottom > rootRect.bottom - space) {
16144          root.scrollBy(0, rect.bottom - rootRect.bottom + space);
16145        } else if (rect.top < rootRect.top + space) {
16146          root.scrollBy(0, rect.top - rootRect.top - space);
16147        }
16148
16149      }
16150    });
16151  });
16152};
16153
16154xcart.microhandlers.add(
16155  'ProductGallery',
16156  '.product-image-gallery:not(.handled)',
16157  function () {
16158    new ProductGallery(this);
16159  }
16160);;
16161/* AUTOGENERATED: controller.js */
16162/* vim: set ts=2 sw=2 sts=2 et: */
16163
16164/**
16165 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
16166 * See https://www.x-cart.com/license-agreement.html for license details.
16167 */
16168
16169/**
16170 * Controller
16171 */
16172
16173function ProductQuantityBoxView(base)
16174{
16175  this.base = jQuery(base);
16176
16177  if (this.base && this.base.length && this.base.find('input.quantity').length > 0) {
16178
16179    this.block = this.base.find('input.quantity');
16180
16181    var form = this.block.get(0).form;
16182    form.commonController.switchControlReadiness(true);
16183
16184    form.commonController
16185      .bind('local.ready', _.bind(this.handleFormReady, this))
16186      .bind('local.unready', _.bind(this.handleFormUnready, this));
16187
16188    this.block.on(
16189      'input',
16190      _.bind(this.handleQuantityChange, this)
16191    );
16192
16193    this.isCartPage = jQuery('div#cart').length > 0;
16194
16195    if (!this.isCartPage) {
16196
16197      this.actionButton = jQuery(this.base)
16198        .parents('div.product-buttons')
16199        .find('button.add2cart, button.buy-more');
16200
16201    } else {
16202
16203      this.actionButton = jQuery('ul.totals li.button button');
16204
16205    }
16206  }
16207
16208  Base.apply(this, arguments);
16209
16210  this.initialize();
16211}
16212
16213extend(ProductQuantityBoxView, Base);
16214
16215// Controller associated main widget
16216ProductQuantityBoxView.prototype.base = null;
16217
16218// Controller associated main widget
16219ProductQuantityBoxView.prototype.block = null;
16220
16221// Controller associated main widget
16222ProductQuantityBoxView.prototype.isCartPage = false;
16223
16224// Initialize controller
16225ProductQuantityBoxView.prototype.initialize = function()
16226{
16227};
16228
16229ProductQuantityBoxView.prototype.handleQuantityChange = function(event)
16230{
16231  jQuery(event.currentTarget).change();
16232}
16233
16234ProductQuantityBoxView.prototype.handleFormReady = function(event)
16235{
16236  this.actionButton
16237    .removeAttr('disabled')
16238    .removeClass('disabled add2cart-disabled');
16239}
16240
16241ProductQuantityBoxView.prototype.handleFormUnready = function(event)
16242{
16243  this.actionButton
16244    .prop('disabled', 'disabled')
16245    .addClass('disabled add2cart-disabled');
16246}
16247
16248// Get event namespace (prefix)
16249ProductQuantityBoxView.prototype.getEventNamespace = function()
16250{
16251  return 'product.details.quantityBox';
16252}
16253
16254xcart.registerTriggersBind(
16255  'update-product-page',
16256  function()
16257  {
16258    var container = jQuery('span.quantity-box-container');
16259
16260    new ProductQuantityBoxView(container);
16261    if (container.parents('form').get(0) && container.parents('form').get(0).commonController) {
16262      container.parents('form').get(0).commonController.bindElements();
16263    }
16264  }
16265);
16266
16267xcart.registerShadowWidgets(
16268  'update-product-page',
16269  function()
16270  {
16271    return '.widget-fingerprint-product-quantity, .widget-fingerprint-product-add-button';
16272  }
16273);;
16274/* AUTOGENERATED: quantity.js */
16275/* vim: set ts=2 sw=2 sts=2 et: */
16276
16277/**
16278 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
16279 * See https://www.x-cart.com/license-agreement.html for license details.
16280 */
16281
16282const QuantityBox = function (root) {
16283  const decreaseQtyBtn = root.querySelector('.decrease-qty');
16284  const increaseQtyBtn = root.querySelector('.increase-qty');
16285  const qtyField = root.querySelector('.qty-in-cart');
16286
16287  const getCurrentCount = () => {
16288    let count = parseInt(qtyField.value);
16289    if (!count) { // In case of count is NaN
16290      count = -1;
16291    }
16292
16293    return count;
16294  };
16295
16296  const updateQuantity = (count, triggerUpdate = true) => {
16297    const min = parseInt(qtyField.getAttribute('min'));
16298    const max = parseInt(qtyField.getAttribute('data-max'));
16299
16300    if (min && max) {
16301      count = parseInt(count);
16302      if (!count) { // In case of count is NaN
16303        count = 0;
16304      }
16305
16306      count = Math.min(max, Math.max(min, Math.abs(count)));
16307
16308      if (count <= min) {
16309        decreaseQtyBtn.setAttribute('disabled', 'disabled');
16310      } else {
16311        decreaseQtyBtn.removeAttribute('disabled');
16312      }
16313      decreaseQtyBtn.classList.toggle('disabled', (count <= min));
16314
16315      if (count >= max) {
16316        increaseQtyBtn.setAttribute('disabled', 'disabled');
16317      } else {
16318        increaseQtyBtn.removeAttribute('disabled');
16319      }
16320      increaseQtyBtn.classList.toggle('disabled', (count >= max));
16321
16322      qtyField.value = count;
16323      if (qtyField.classList.contains('watcher') && triggerUpdate && qtyField.validate()) {
16324        qtyField.dispatchEvent(new Event('blur'));
16325      }
16326      qtyField.dispatchEvent(new Event('focus'));
16327      if (triggerUpdate) {
16328        qtyField.dispatchEvent(new Event('change'));
16329      }
16330    }
16331  };
16332
16333  increaseQtyBtn.addEventListener('click', () => {
16334    updateQuantity(getCurrentCount() + 1);
16335  });
16336
16337  decreaseQtyBtn.addEventListener('click', () => {
16338    updateQuantity(getCurrentCount() - 1);
16339  });
16340
16341  qtyField.addEventListener('input', () => {
16342    updateQuantity(qtyField.value, false);
16343  });
16344
16345  root.classList.add('handled');
16346};
16347
16348xcart.microhandlers.add(
16349  'QuantityBoxes',
16350  '.change-qty:not(.handled)',
16351  function () {
16352    new QuantityBox(this);
16353  }
16354);;
16355/* AUTOGENERATED: script.js */
16356/* vim: set ts=2 sw=2 sts=2 et: */
16357
16358/**
16359 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
16360 * See https://www.x-cart.com/license-agreement.html for license details.
16361 */
16362
16363// Get product attribute element by name
16364function product_attribute(name_of_attribute)
16365{
16366  var e = jQuery('form[name="add_to_cart"] :input').filter(
16367    function() {
16368      return this.name && this.name.search(name_of_attribute) !== -1;
16369    }
16370  );
16371
16372  return e.get(0);
16373}
16374
16375let textAttrCache = [];
16376
16377function getAttributeValuesParams(product)
16378{
16379  let activeAttributeValues = '';
16380  let base = '.product-info-' + product.product_id;
16381
16382  jQuery("ul.attribute-values input[type=checkbox]", jQuery(base).last()).each(function(index, elem) {
16383    activeAttributeValues += jQuery(elem).data('attribute-id') + '_';
16384    activeAttributeValues += jQuery(elem).is(":checked") ?  jQuery(elem).val() : jQuery(elem).data('unchecked');
16385    activeAttributeValues += ',';
16386  });
16387
16388  jQuery("ul.attribute-values select", jQuery(base).last()).each(function(index, elem) {
16389    activeAttributeValues += jQuery(elem).data('attribute-id') + '_' + jQuery(elem).val() + ',';
16390  });
16391
16392  jQuery("ul.attribute-values textarea", jQuery(base).last()).each(function(index, elem) {
16393    textAttrCache[jQuery(elem).data('attribute-id')] = jQuery(elem).val();
16394  });
16395
16396  jQuery("ul.attribute-values input.blocks-input", jQuery(base).last()).each(function(index, elem) {
16397    activeAttributeValues += jQuery(elem).data('attribute-id') + '_' + jQuery(elem).val() + ',';
16398  });
16399
16400  return {
16401    attribute_values: activeAttributeValues
16402  };
16403}
16404
16405/**
16406 * Product attributes triggers are inputs and selectors
16407 * of the attribute-values block
16408 *
16409 * @returns {String}
16410 */
16411function getAttributeValuesTriggers()
16412{
16413  return 'ul.attribute-values input, ul.attribute-values select';
16414}
16415
16416function getAttributeValuesShadowWidgets()
16417{
16418  return '.widget-fingerprint-product-price';
16419}
16420
16421function bindAttributeValuesTriggers()
16422{
16423  const handler = function (productId) {
16424    xcart.trigger('update-product-page', productId);
16425  };
16426
16427  const obj = jQuery("ul.attribute-values").closest('.product-details-info').find('form.product-details');
16428  if (obj.length > 0) {
16429    const productId = jQuery('input[name="product_id"]', obj).val();
16430
16431    jQuery("ul.attribute-values input[type='checkbox']").unbind('change').bind('change', function () { handler(productId); });
16432    jQuery("ul.attribute-values input.blocks-input").unbind('change').bind('change', function () { handler(productId); });
16433    jQuery("ul.attribute-values select").unbind('change').bind('change', function () { handler(productId); });
16434
16435    jQuery("ul.attribute-values textarea").each(function(index, elem) {
16436      if (textAttrCache[jQuery(elem).data('attribute-id')]) {
16437        jQuery(elem).val(textAttrCache[jQuery(elem).data('attribute-id')]);
16438      }
16439    });
16440  }
16441}
16442
16443function BlocksSelector()
16444{
16445  jQuery('.product-details-info').on(
16446    'click',
16447    '.block-value:not(.selected)',
16448    function () {
16449      const $blockValue = jQuery(this);
16450      const blockValueId = $blockValue.data('value');
16451      const blockValueName = $blockValue.find('.block-value-name').html();
16452      const blockValueModifiers = $blockValue.data('modifiers');
16453      const blocksName = $blockValue.data('name');
16454
16455      const $blocksSelector = $blockValue.closest('.blocks-selector');
16456      const $blocksTitle = $blocksSelector.find('.blocks-title');
16457      const $blocksInput = $blocksSelector.find('.blocks-input');
16458
16459      $blocksTitle.removeClass('not-selected');
16460      $blocksInput.val(blockValueId).change();
16461      $blocksTitle.find('.attr-value-name').html(blockValueName);
16462      $blocksTitle.find('.attr-value-modifiers').html(blockValueModifiers);
16463
16464      unselectAllBlocks(blocksName);
16465      $blockValue.addClass('selected');
16466    }
16467  );
16468
16469  let timeout;
16470  let $tooltip;
16471
16472  setTimeout(() => {
16473    jQuery('.product-details-info, .change-attribute-values').on({
16474      mouseenter: function () {
16475        $tooltip = jQuery(this).find('.unavailable-tooltip');
16476        timeout = setTimeout(function () {
16477          $tooltip.show(100);
16478        }, 250);
16479      },
16480      mouseleave: function () {
16481        clearTimeout(timeout);
16482        if ($tooltip !== undefined) {
16483          $tooltip.hide(100);
16484        }
16485      }
16486    }, '.block-value');
16487  }, 1);
16488}
16489
16490function unselectAllBlocks(blocksName) {
16491  jQuery(`.block-value[data-name="${blocksName}"]`).removeClass('selected');
16492}
16493
16494xcart.autoload(BlocksSelector);
16495xcart.bind('block.product.details.postprocess', BlocksSelector);
16496xcart.registerWidgetsParamsGetter('update-product-page', getAttributeValuesParams);
16497xcart.registerWidgetsTriggers('update-product-page', getAttributeValuesTriggers);
16498xcart.registerTriggersBind('update-product-page', bindAttributeValuesTriggers);
16499xcart.registerShadowWidgets('update-product-page', getAttributeValuesShadowWidgets);
16500xcart.registerShadowWidgets('update-product-page', function() {
16501  return '.widget-fingerprint-common-attributes';
16502});;
16503/* AUTOGENERATED: rating.js */
16504/* vim: set ts=2 sw=2 sts=2 et: */
16505
16506/**
16507 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
16508 * See https://www.x-cart.com/license-agreement.html for license details.
16509 */
16510
16511CommonForm.elementControllers.push(
16512  {
16513    pattern: '.button-average-rating',
16514    handler: function () {
16515      jQuery(this)
16516        .click(function() {
16517          jQuery('.product-average-rating-container').toggle();
16518        });
16519    }
16520  }
16521);
16522
16523CommonForm.elementControllers.push(
16524  {
16525    pattern: 'div.vote-bar',
16526    handler: function () {
16527
16528      var $tooltip = jQuery(this).closest('div').parent().children('.rating-tooltip');
16529      var $div = jQuery(this).closest('div');
16530
16531      var timeout;
16532
16533      $div.hover(
16534          function() {
16535            timeout = setTimeout(function(){
16536              $tooltip.show(100);
16537            }, 250);
16538          },
16539          function() {
16540            clearTimeout(timeout);
16541            $tooltip.hide(100);
16542          }
16543        );
16544    }
16545  }
16546);;
16547/* AUTOGENERATED: script.js */
16548/* vim: set ts=2 sw=2 sts=2 et: */
16549
16550/**
16551 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
16552 * See https://www.x-cart.com/license-agreement.html for license details.
16553 */
16554
16555const Products = function () {
16556
16557  /**
16558   * @param {Element} block
16559   * @param {boolean} isAdded
16560   */
16561  const setAdded = (block, isAdded) => {
16562    if (block) {
16563      block.classList.toggle('product-added', !!isAdded);
16564    }
16565  };
16566
16567  /**
16568   * @param {Element} block
16569   * @param {boolean} isLoading
16570   */
16571  const setLoading = (block, isLoading) => {
16572    if (block) {
16573      block.classList.toggle('qty-update-is-needed', !!isLoading);
16574    }
16575  };
16576
16577  /**
16578   * @param {number} productId
16579   * @return {NodeListOf<Element>}
16580   */
16581  this.getProductBlocks = (productId) => {
16582    return document.querySelectorAll('.products-grid .product.productid-' + productId);
16583  };
16584
16585  /**
16586   * @param {Element} block
16587   * @return {boolean}
16588   */
16589  this.isLoading = (block) => {
16590    return block && block.classList.contains('qty-update-is-needed');
16591  };
16592
16593  /**
16594   * Whether the product is added to cart.
16595   * @param {Element} block
16596   * @return {boolean}
16597   */
16598  this.isAdded = (block) => {
16599    return block && block.classList.contains('product-added');
16600  };
16601
16602  /**
16603   * Get the list of the product buttons (comparison button, wishlist button, etc.)
16604   * @param {Element} block
16605   * @return {NodeListOf<Element>}
16606   */
16607  this.getButtons = (block) => {
16608    return block ? block.querySelectorAll('.product-photo__button') : [];
16609  };
16610
16611  /**
16612   * @param {Element} button
16613   * @return {boolean}
16614   */
16615  this.isButtonLoading = (button) => {
16616    return button && button.classList.contains('product-photo__button--loading');
16617  };
16618
16619  /**
16620   * @param {Element} button
16621   * @param {boolean} isLoading
16622   */
16623  this.setButtonLoading = (button, isLoading) => {
16624    if (button) {
16625      button.classList.toggle('product-photo__button--loading', !!isLoading);
16626    }
16627  };
16628
16629  /**
16630   * @param {number} productId
16631   * @param {number} newCount
16632   * @param {boolean} isLimit
16633   */
16634  this.setCount = (productId, newCount, isLimit) => {
16635    newCount = Math.max(0, newCount);
16636    const blocks = this.getProductBlocks(productId);
16637
16638    blocks.forEach(block => {
16639      setLoading(block, false);
16640      setAdded(block, (newCount > 0));
16641
16642      const countField = block.parentNode.querySelector('.qty-in-cart');
16643      if (countField) {
16644        countField.value = newCount;
16645      }
16646
16647      block.parentNode.querySelectorAll('.increase-qty-container > button').forEach(btn => {
16648        if (isLimit) {
16649          btn.setAttribute('disabled', 'disabled');
16650        } else {
16651          btn.removeAttribute('disabled');
16652        }
16653      });
16654
16655    });
16656  };
16657
16658  this.init = () => {
16659    xcart.bind('updateCart', (e, data) => {
16660      if (data.items) {
16661        data.items.forEach(item => {
16662          if (item.object_id && item.hasOwnProperty('quantity')) {
16663            Products.getInstance().setCount(item.object_id, item.quantity, item.is_limit);
16664          }
16665        });
16666      }
16667    });
16668  };
16669};
16670
16671Products.prototype.instance = null;
16672
16673Products.getInstance = () => {
16674  if (!Products.prototype.instance) {
16675    Products.prototype.instance = new Products();
16676    Products.prototype.instance.init();
16677  }
16678
16679  return Products.prototype.instance;
16680};
16681
16682Products.getInstance();;
16683/* AUTOGENERATED: close-button.js */
16684/* vim: set ts=2 sw=2 sts=2 et: */
16685
16686/**
16687 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
16688 * See https://www.x-cart.com/license-agreement.html for license details.
16689 */
16690
16691xcart.bind(
16692  'init-close-wishlist',
16693  function () {
16694    jQuery('a.wishlist-close').click(function () {
16695      xcart.trigger('send-close-wishlist', {link: jQuery(this)});
16696
16697      return false;
16698    });
16699  }
16700);
16701
16702xcart.bind(
16703  'send-close-wishlist',
16704  _.bind(
16705    function(event, data) {
16706      var link = data.link;
16707
16708      xcart.get(
16709        link.attr('href'),
16710        function () {
16711          jQuery('a.wishlist-close').closest('.items-list')[0].controller.block.load();
16712        }
16713      );
16714    },
16715    this
16716  )
16717);
16718
16719xcart.bind('list.products.loaded', function (event, data) {
16720    if(data.widgetClass == "QSL\\MyWishlist\\View\\ItemsList\\Product\\Customer\\WishlistPage"
16721        && jQuery(".items-list.wishlist-products .product-cell").length === 0){
16722        jQuery(".wishlist-container")
16723            .html("<div class='no-wishlist-products'>" + xcart.t("Feel free to add any product you like to your wishlist") + "</div>");
16724    }
16725});
16726
16727xcart.bind('loginfirst', function (event, message) {
16728  xcart.trigger('message', {type: 'info', message: message});
16729});
16730
16731xcart.bind('productaddedtowishlist', function (event, data) {
16732  jQuery('.product.productid-' + data.productid + ' a.add-to-wishlist').addClass('fa-heart').removeClass('fa-heart-o');
16733});
16734
16735jQuery(document).ready(function () {
16736  xcart.microhandlers.add(
16737    'CloseWishlist',
16738    'a.wishlist-close:first',
16739    function () {
16740      xcart.trigger('init-close-wishlist');
16741    }
16742  );
16743
16744  xcart.microhandlers.add(
16745    'AddToWishlist',
16746    'a.add-to-wishlist',
16747    function () {
16748      var $this = jQuery(this);
16749      $this.click(function () {
16750
16751        if ($this.hasClass('log-in')) {
16752          return false;
16753        }
16754
16755        var urlData = {
16756          target : 'wishlist',
16757          action : 'add_to_wishlist',
16758          list   : 1,
16759          product_id: $this.data('productid')
16760        };
16761
16762        xcart.post(
16763          URLHandler.buildURL(urlData),
16764          function (XMLHttpRequest, textStatus, data, isValidXML) {
16765          }
16766        );
16767
16768        return false;
16769      });
16770    }
16771  );
16772});;
16773/* AUTOGENERATED: products_list.js */
16774/* vim: set ts=2 sw=2 sts=2 et: */
16775
16776/**
16777 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
16778 * See https://www.x-cart.com/license-agreement.html for license details.
16779 */
16780
16781decorate(
16782  'ProductsListView',
16783  'addToCartRequestParams',
16784  function (elem) {
16785    var params = arguments.callee.previousMethod.apply(this, arguments);
16786
16787    var ecData = jQuery('*[data-ga-ec-action]', elem.closest('.add-to-cart-button'));
16788    if (!_.isUndefined(ecData) && ecData.length !== 0) {
16789      var context = ecData.data('ga-ec-action').context;
16790
16791      if (!_.isUndefined(context.list)) {
16792        params.ga_list = context.list;
16793      }
16794    }
16795
16796    return params;
16797  }
16798);
16799
16800decorate(
16801  'ProductsListView',
16802  'openQuickLookParams',
16803  function (elem) {
16804    var params = arguments.callee.previousMethod.apply(this, arguments);
16805
16806    var ecData = jQuery('*[data-ga-ec-action]', elem);
16807    if (!_.isUndefined(ecData) && ecData.length !== 0) {
16808      var context = ecData.data('ga-ec-action').context;
16809
16810      if (!_.isUndefined(context.list)) {
16811        params.ga_list = context.list;
16812      }
16813    }
16814
16815    return params;
16816  }
16817);;
16818/* AUTOGENERATED: product_list_popup.js */
16819/* vim: set ts=2 sw=2 sts=2 et: */
16820
16821/**
16822 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
16823 * See https://www.x-cart.com/license-agreement.html for license details.
16824 */
16825
16826document.addEventListener('DOMContentLoaded', function () {
16827  const processor = new AddToCartPopupProcessor()
16828  processor.processAddToCartButtons()
16829})
16830
16831function AddToCartPopupProcessor () {
16832  this.bindEvents()
16833  this.isPopupDynamicallyClosedForever = false
16834}
16835
16836AddToCartPopupProcessor.prototype.bindEvents = function () {
16837  xcart.bind('list.products.loaded', (event) => {
16838    this.processAddToCartButtons()
16839  })
16840}
16841
16842AddToCartPopupProcessor.prototype.processAddToCartButtons = function () {
16843  const _this = this
16844
16845  decorate(
16846    'ProductsListView',
16847    'postprocess',
16848    function (isSuccess, initial) {
16849      document.querySelectorAll('.add-to-cart, .increase-qty').forEach((item) => {
16850        if (_this.isNeedOpenPopup(item)) {
16851
16852          item.addEventListener('click', (event) => {
16853            if (_this.isPopupDynamicallyClosedForever) {
16854              return
16855            }
16856
16857            event.stopImmediatePropagation()
16858
16859            const conditionData = _this.getPopupListConditionData(item)
16860            const productWrapper = _this.getProductWrapper(item)
16861            const productId = xcart.getValueFromClass(productWrapper, 'productid') ?? ''
16862            const showDoesntFitPopup = !conditionData.isEmptyAuto
16863
16864            if (conditionData.forceProductOptionSelected) {
16865              window.location.assign(productWrapper.querySelector('.url').getAttribute('href'))
16866            } else {
16867              _this.openPopup(productId, showDoesntFitPopup);
16868
16869              const $item = $(item);
16870
16871              if ($item.is('.add-to-cart')) {
16872                // Mark only last clicked button as last-clicked
16873                $('.add-to-cart').removeClass('last-clicked');
16874                $item.addClass('last-clicked');
16875              }
16876            }
16877          })
16878        }
16879      })
16880
16881      arguments.callee.previousMethod.apply(this, arguments)
16882    }
16883  )
16884
16885  xcart.bind('selected_popup_close_forever', function () {
16886    _this.isPopupDynamicallyClosedForever = true
16887  })
16888}
16889
16890AddToCartPopupProcessor.prototype.isNeedOpenPopup = function (addToCartElement) {
16891  const popupConditionData = this.getPopupListConditionData(addToCartElement)
16892  if (!popupConditionData) {
16893    return false
16894  }
16895
16896  const isPopupClosedForever = this.isPopupDynamicallyClosedForever || popupConditionData.isClosePopupForever
16897
16898  return ((popupConditionData.isEmptyAuto && popupConditionData.isVehicleSpecific) ||
16899    (!popupConditionData.isFitVehicle && popupConditionData.isPopupOpened === null)) && !isPopupClosedForever
16900}
16901
16902AddToCartPopupProcessor.prototype.openPopup = function (productId, showDoesntFitPopup) {
16903  popup.load(URLHandler.buildURL({
16904    widget: 'QSL\\Make\\View\\SelectMMYSPopup\\SelectMMYSPopupWithReloadPage',
16905    target: 'add_vehicle',
16906    productId: productId,
16907    showCloseButton: true,
16908    showDoesntFitPopup: showDoesntFitPopup,
16909    isListPage: true,
16910    source: "addToCart"
16911  }))
16912}
16913
16914AddToCartPopupProcessor.prototype.getProductWrapper = function (addToCartElement) {
16915  return addToCartElement.closest('.product') ?
16916    addToCartElement.closest('.product') :
16917    addToCartElement.closest('.box-product').querySelector('.product')
16918}
16919
16920AddToCartPopupProcessor.prototype.getPopupListConditionData = function (addToCartElement) {
16921  const productWrapper = this.getProductWrapper(addToCartElement)
16922
16923  const popupConditionData = productWrapper
16924    ?.querySelector('.select_vehicle_on_specific_product')
16925    ?.getAttribute('data')
16926
16927  if (!popupConditionData) {
16928    return null
16929  }
16930
16931  return JSON.parse(popupConditionData)
16932};
16933/* AUTOGENERATED: add-to-compare.js */
16934/* vim: set ts=2 sw=2 sts=2 et: */
16935
16936/**
16937 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
16938 * See https://www.x-cart.com/license-agreement.html for license details.
16939 */
16940
16941if (!Products) {
16942  window.Products = {};
16943}
16944
16945Products.prototype.setComparison = (productId, isAddedToComparison) => {
16946  Products.getInstance().getProductBlocks(productId).forEach(block => {
16947    block.querySelectorAll('.compare-checkbox').forEach(checkbox => {
16948      checkbox.classList.toggle('compare-checkbox--added', !!isAddedToComparison);
16949      checkbox.checked = !!isAddedToComparison;
16950    });
16951  });
16952};
16953
16954Products.prototype.setComparisonButtonsLoading = (productId, isLoading) => {
16955  Products.getInstance().getProductBlocks(productId).forEach(block => {
16956    block.querySelectorAll('.compare-checkbox').forEach(check => {
16957      Products.getInstance().setButtonLoading(check, isLoading);
16958    });
16959  });
16960};
16961
16962xcart.microhandlers.add(
16963  'CompareCheck',
16964  '.compare-check:not(.handled)',
16965  function () {
16966    this.addEventListener('change', () => {
16967      Products.getInstance().setComparisonButtonsLoading(this.getAttribute('data-id'), true);
16968    });
16969    this.classList.add('handled');
16970  }
16971);
16972
16973xcart.bind('updateProductComparison', (e, data) => {
16974  if (data && data.productId) {
16975    Products.getInstance().setComparisonButtonsLoading(data.productId, false);
16976    Products.getInstance().setComparison(data.productId, (data.action === 'add'));
16977  }
16978});;
16979/* AUTOGENERATED: wholesale_product_page.js */
16980/* vim: set ts=2 sw=2 sts=2 et: */
16981
16982/**
16983 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
16984 * See https://www.x-cart.com/license-agreement.html for license details.
16985 */
16986
16987function getWholesaleParams(product)
16988{
16989  var base = jQuery('.product-info-' + product.product_id);
16990
16991  return {
16992    quantity: jQuery(".product-qty input[type='number']", base).val()
16993  };
16994}
16995
16996function getWholesaleTriggers()
16997{
16998  return ".product-qty input[type='text']";
16999}
17000
17001function getWholesaleShadowWidgets()
17002{
17003    return '.widget-fingerprint-product-price';
17004}
17005
17006function bindWholesaleTriggers()
17007{
17008  var handler = function (productId, qty) {
17009    xcart.trigger('update-product-page', productId);
17010  };
17011
17012  var timer;
17013  var forms = jQuery(".product-qty.wholesale-price-defined input[type='number']").closest('form');
17014
17015  if (forms) {
17016    forms.each(function(id, obj) {
17017      var productId = jQuery('input[name="product_id"]', obj).val();
17018      before_handler(obj, timer, handler, productId);
17019    });
17020  }
17021}
17022
17023function before_handler(obj, timer, handler, productId) {
17024  jQuery(".product-qty.wholesale-price-defined input[type='number']", obj)
17025    .one(
17026      'input',
17027      function (event) {
17028        clearTimeout(timer);
17029        timer = setTimeout(
17030          function () {
17031            var ctrl = event.currentTarget.commonController;
17032            if (ctrl.isChanged() && ctrl.validate(true)) {
17033              ctrl.saveValue();
17034              handler(productId);
17035            } else {
17036              before_handler(obj, timer, handler, productId);
17037            }
17038          },
17039          2000
17040        );
17041    });
17042}
17043
17044xcart.registerWidgetsParamsGetter('update-product-page', getWholesaleParams);
17045xcart.registerWidgetsTriggers('update-product-page', getWholesaleTriggers);
17046xcart.registerTriggersBind('update-product-page', bindWholesaleTriggers);
17047xcart.registerShadowWidgets('update-product-page', getWholesaleShadowWidgets);
17048xcart.registerShadowWidgets('update-product-page', function(){
17049  return '.widget-fingerprint-product-wholesale-prices';
17050});
17051xcart.registerShadowWidgets('update-product-page', function(){
17052  return '.widget-fingerprint-wholesale-quantity';
17053});;
17054/* AUTOGENERATED: add-to-wishlist.js */
17055/* vim: set ts=2 sw=2 sts=2 et: */
17056
17057/**
17058 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
17059 * See https://www.x-cart.com/license-agreement.html for license details.
17060 */
17061
17062Products.prototype.setAddedToWishlist = (productId, isAddedToWishlist) => {
17063  Products.getInstance().getProductBlocks(productId).forEach(block => {
17064    block.querySelectorAll('.add-to-wishlist__wrapper').forEach(wrapper => {
17065      wrapper.classList.toggle('add-to-wishlist__wrapper--added', !!isAddedToWishlist);
17066    });
17067  });
17068};
17069
17070Products.prototype.setWishlistButtonsLoading = (productId, isLoading) => {
17071  Products.getInstance().getProductBlocks(productId).forEach(block => {
17072    block.querySelectorAll('.add-to-wishlist__wrapper').forEach(link => {
17073      Products.getInstance().setButtonLoading(link, isLoading);
17074    });
17075  });
17076};
17077
17078xcart.microhandlers.add(
17079  'AddToWishlistInit',
17080  'a.add-to-wishlist:not(.handled)',
17081  function () {
17082    this.addEventListener('click', () => {
17083      if (this.classList.contains('must-be-logged-in') && this.classList.contains('log-in')) {
17084        const loginButton = document.querySelector('.account-links__list-item--login button');
17085        if (loginButton) {
17086          loginButton.click();
17087        }
17088      } else {
17089        Products.getInstance().setWishlistButtonsLoading(this.getAttribute('data-productid'), true);
17090      }
17091    });
17092
17093    this.classList.add('handled');
17094  }
17095);
17096
17097
17098xcart.bind('productAddedToWishlist', function (event, data) {
17099  if (data && data.productid) {
17100    Products.getInstance().setWishlistButtonsLoading(data.productid, false);
17101    Products.getInstance().setAddedToWishlist(data.productid, true);
17102  }
17103});
17104
17105
17106xcart.microhandlers.add(
17107  'close-wishlist-link-handler',
17108  '.wishlist-close',
17109  function () {
17110    this.addEventListener('click', () => {
17111      this.parentNode.classList.add('product-photo__button--loading');
17112    });
17113  }
17114);;
17115/* AUTOGENERATED: script.js */
17116/* vim: set ts=2 sw=2 sts=2 et: */
17117
17118/**
17119 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
17120 * See https://www.x-cart.com/license-agreement.html for license details.
17121 */
17122
17123const BottomMenu = function () {
17124  let buttons = [];
17125
17126  const ACTIVE_CSS_CLASS = 'bottom-panel__button--active';
17127
17128  /**
17129   * Add a button to the bottom panel.
17130   *
17131   * @param {Element} btnDomRoot Button DOM root node.
17132   * @param {object} [options] Options. Possible object keys: 'onActivate', 'onDeactivate', 'onToggle', 'onClick',
17133   *                         'toggleable'.
17134   */
17135  this.addButton = (btnDomRoot, options) => {
17136    if (btnDomRoot) {
17137      options = Object.assign({
17138        onActivate: null,
17139        onDeactivate: null,
17140        onToggle: null,
17141        onClick: null,
17142        toggleable: true
17143      }, options);
17144
17145      options.domRoot = btnDomRoot;
17146
17147      if (options.onClick) {
17148        btnDomRoot.addEventListener('click', options.onClick);
17149      }
17150
17151      btnDomRoot.addEventListener('click', () => {
17152        if (this.isButtonToggleable(btnDomRoot)) {
17153          this.toggleButton(btnDomRoot);
17154        }
17155      });
17156
17157      buttons.push(options);
17158    }
17159  };
17160
17161  /**
17162   * @param {Element|object} button An instance of the inner button object or a button's root DOM node.
17163   * @return {boolean}
17164   */
17165  this.isButtonActive = (button) => {
17166    const btn = this.findButton(button);
17167
17168    return btn && btn.domRoot.classList.contains(ACTIVE_CSS_CLASS);
17169  };
17170
17171  /**
17172   * @param {Element|object} button An instance of the inner button object or a button's root DOM node.
17173   * @return {boolean}
17174   */
17175  this.isButtonToggleable = (button) => {
17176    const btn = this.findButton(button);
17177
17178    if (btn) {
17179      const result = (typeof btn.toggleable === 'function')
17180        ? btn.toggleable()
17181        : btn.toggleable;
17182
17183      return !!result;
17184    }
17185
17186    return false;
17187  };
17188
17189  /**
17190   * @return Array<Element>
17191   */
17192  this.getActiveButtons = () => {
17193    let result = [];
17194
17195    buttons.forEach(btn => {
17196      if (this.isButtonActive(btn)) {
17197        result.push(btn.domRoot);
17198      }
17199    });
17200
17201    return result;
17202  };
17203
17204  /**
17205   * Find a button by its root DOM node.
17206   *
17207   * @param {Element|object} button An instance of the inner button object or a button's root DOM node.
17208   * @return {object|null}
17209   */
17210  this.findButton = (button) => {
17211    let result = null;
17212
17213    if (button) {
17214      buttons.forEach(btn => {
17215        if (
17216          (button.domRoot && button === btn)
17217          || btn.domRoot === button
17218        ) {
17219          result = btn;
17220        }
17221      });
17222    }
17223
17224    return result;
17225  };
17226
17227  /**
17228   * @param {Element|object} button An instance of the inner button object or a button's root DOM node.
17229   */
17230  this.deactivateButton = (button) => {
17231    const btn = this.findButton(button);
17232
17233    if (btn && this.isButtonActive(btn)) {
17234      btn.domRoot.classList.remove(ACTIVE_CSS_CLASS);
17235
17236      if (btn.onToggle) {
17237        btn.onToggle(false);
17238      }
17239      if (btn.onDeactivate) {
17240        btn.onDeactivate();
17241      }
17242
17243      xcart.trigger('bottom-panel-button-state-deactivated', {button: btn.domRoot});
17244      xcart.trigger('bottom-panel-button-state-change', {button: btn.domRoot, state: false});
17245      if (document.activeElement === btn.domRoot) {
17246        btn.domRoot.blur();
17247      }
17248    }
17249  };
17250
17251  /**
17252   * @param {Element|object} button An instance of the inner button object or a button's root DOM node.
17253   */
17254  this.activateButton = (button) => {
17255    const btn = this.findButton(button);
17256
17257    if (btn && !this.isButtonActive(btn)) {
17258      buttons.forEach(aBtn => {
17259        if (aBtn !== btn) {
17260          this.deactivateButton(aBtn);
17261        }
17262      });
17263
17264      const mobileSearchBackButton = document.querySelector('#mobile_search .simple-search__back');
17265      if (mobileSearchBackButton) {
17266        const rect = mobileSearchBackButton.getBoundingClientRect();
17267
17268        if (rect.width > 0 && rect.height > 0) {
17269          mobileSearchBackButton.click();
17270        }
17271      }
17272
17273      btn.domRoot.classList.add(ACTIVE_CSS_CLASS);
17274      if (btn.onToggle) {
17275        btn.onToggle(true);
17276      }
17277      if (btn.onActivate) {
17278        btn.onActivate();
17279      }
17280
17281      xcart.trigger('bottom-panel-button-state-activated', {button: btn.domRoot});
17282      xcart.trigger('bottom-panel-button-state-change', {button: btn.domRoot, state: true});
17283    }
17284  };
17285
17286  this.toggleButton = (button) => {
17287    button = this.findButton(button);
17288
17289    if (button) {
17290      if (this.isButtonActive(button)) {
17291        this.deactivateButton(button);
17292      } else {
17293        this.activateButton(button);
17294      }
17295    }
17296  };
17297
17298  /**
17299   * @param {Element|object} button An instance of the inner button object or a button's root DOM node.
17300   * @param {string} badge Badge inner HTML.
17301   */
17302  this.setItemBadge = (button, badge) => {
17303    const btn = this.findButton(button);
17304    if (btn) {
17305      let badgeDom = btn.domRoot.querySelector('.bottom-panel__button-badge');
17306
17307      if (!badge && badgeDom) {
17308        badgeDom.parentNode.removeChild(badgeDom);
17309      } else if (badge) {
17310        if (!badgeDom) {
17311          badgeDom = document.createElement('SPAN');
17312          badgeDom.className = 'badge bottom-panel__button-badge';
17313
17314          const icon = btn.domRoot.querySelector('.bottom-panel__button-icon');
17315          if (icon) {
17316            icon.insertBefore(badgeDom, icon.firstElementChild);
17317          }
17318        }
17319        badgeDom.innerHTML = badge;
17320      }
17321    }
17322  };
17323
17324  /**
17325   * @param {Element|object} button An instance of the inner button object or a button's root DOM node.
17326   * @param {object} options New button options. Possible object keys: 'onActivate', 'onDeactivate', 'onToggle',
17327   *                         'onClick', 'toggleable'.
17328   * @return {boolean} True if options are successfully updated, false otherwise (i.e. button has not found).
17329   */
17330  this.setOptions = (button, options) => {
17331    button = this.findButton(button);
17332
17333    if (button) {
17334      for (let i = 0; i < buttons.length; i++) {
17335        if (buttons[i] === button) {
17336          if (options.onClick) {
17337            buttons[i].domRoot.removeEventListener('click', options.onClick);
17338          }
17339
17340          buttons[i] = Object.assign(buttons[i], options);
17341
17342          return true;
17343        }
17344      }
17345    }
17346
17347    return false;
17348  };
17349
17350  this.init = () => {
17351
17352    const homeButton = document.querySelector('.bottom-panel__button--home');
17353    if (homeButton && !homeButton.hasAttribute('href')) {
17354      this.addButton(
17355        homeButton,
17356        {
17357          toggleable: () => !this.isButtonActive(homeButton)
17358        }
17359      );
17360
17361      xcart.bind('bottom-panel-button-state-deactivated', (e, data) => {
17362        /*
17363         * We need this because during the button activation process, all the active buttons are deactivated first.
17364         * So, the event is fired when the last active button has been deactivated but the one that will be activated
17365         * has not been activated yet. In this case, it will be assumed that there is no active buttons on the panel, so
17366         * the home button will be activated. And then one more button will also be activated, making it two active
17367         * buttons at the same time in the bottom panel. To avoid it, we postpone the check for the active buttons count
17368         * until the next frame.
17369         */
17370        requestAnimationFrame(() => {
17371          if (
17372            (!data.button || data.button !== homeButton)
17373            && BottomMenu.getInstance().getActiveButtons().length === 0
17374          ) {
17375            BottomMenu.getInstance().activateButton(homeButton);
17376          }
17377        });
17378
17379        homeButton.addEventListener('click', () => {
17380          xcart.dropdown.close();
17381          MobileMenu.getInstance().close();
17382        });
17383      });
17384
17385      xcart.bind('mobile-menu.opened', () => {
17386        BottomMenu.getInstance().activateButton(homeButton);
17387      });
17388    }
17389
17390    const catalogButton = document.querySelector('.bottom-panel__button--catalog');
17391    const mobileCatalog = document.querySelector('.mobile-menu__categories-list');
17392    if (catalogButton && mobileCatalog) {
17393      this.addButton(
17394        catalogButton,
17395        {
17396          onActivate: () => {
17397            xcart.dropdown.open(mobileCatalog);
17398          },
17399          onDeactivate: () => {
17400            xcart.dropdown.close(mobileCatalog);
17401            MobileCatalog.getInstance().closeAll();
17402          },
17403          toggleable: () => !this.isButtonActive(catalogButton)
17404        }
17405      );
17406    }
17407
17408    const cartButton = document.querySelector('.bottom-panel__button--cart');
17409    if (cartButton) {
17410      const isLink = cartButton.tagName.toLowerCase() === 'a';
17411      let params = {
17412        toggleable: () => (
17413          !isLink
17414          && (!this.isButtonActive(cartButton) || xcart.getTarget() === 'cart')
17415        )
17416      };
17417
17418      if (!isLink) {
17419        if (xcart.getTarget() === 'cart') {
17420          cartButton.addEventListener('click', () => {
17421            xcart.dropdown.close();
17422            MobileMenu.getInstance().close();
17423          });
17424        } else {
17425          params.onActivate = () => {
17426            xcart.dropdown.open('.lc-minicart');
17427          };
17428
17429          params.onDeactivate = () => {
17430            xcart.dropdown.close('.lc-minicart');
17431          };
17432        }
17433      }
17434
17435      this.addButton(cartButton, params);
17436
17437      xcart.bind('updateCart', (e, data) => {
17438        if (typeof (data.itemsCount) !== 'undefined') {
17439          this.setItemBadge(cartButton, (data.itemsCount <= 9 ? data.itemsCount : '9+'));
17440        }
17441      });
17442    }
17443
17444    const accountButton = document.querySelector('.bottom-panel__button--account');
17445    const accountMenu = document.querySelector('.dropdown--account');
17446    if (accountButton && accountMenu) {
17447      this.addButton(
17448        accountButton,
17449        {
17450          onActivate: () => {
17451            xcart.dropdown.open(accountMenu);
17452          },
17453          onDeactivate: () => {
17454            xcart.dropdown.close(accountMenu);
17455          },
17456          toggleable: () => !this.isButtonActive(accountButton)
17457        }
17458      );
17459
17460      accountButton.addEventListener('click', () => {
17461        if (!xcart.dropdown.isOpened(accountMenu)) {
17462          xcart.dropdown.open(accountMenu);
17463        }
17464      });
17465    }
17466  };
17467};
17468
17469BottomMenu.prototype.instance = null;
17470
17471BottomMenu.getInstance = () => {
17472  if (!BottomMenu.prototype.instance) {
17473    BottomMenu.prototype.instance = new BottomMenu();
17474    BottomMenu.prototype.instance.init();
17475  }
17476
17477  return BottomMenu.prototype.instance;
17478};
17479
17480BottomMenu.getInstance();;
17481/* AUTOGENERATED: catalog.js */
17482/* vim: set ts=2 sw=2 sts=2 et: */
17483
17484/**
17485 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
17486 * See https://www.x-cart.com/license-agreement.html for license details.
17487 */
17488
17489xcart.microhandlers.add(
17490  'MobileCatalogAjaxLoad',
17491  '.bottom-panel__button--catalog[data-ajax-category-id]:not([data-ajax-handled])',
17492  function () {
17493    this.addEventListener('click', () => {
17494      const mobileCatalogContainer = document.querySelector('.mobile-menu__categories-list > .dropdown-menu');
17495
17496      if (
17497        !mobileCatalogContainer.querySelector('.mobile-menu__categories')
17498        && !mobileCatalogContainer.querySelector('.top-menu__categories-item--loader')
17499      ) {
17500        const ajaxCategories = AjaxCategories.getInstance();
17501
17502        ajaxCategories.setLoadingState(mobileCatalogContainer, 'DIV');
17503
17504        ajaxCategories.loadSubcategories(
17505          parseInt(this.getAttribute('data-ajax-category-id')),
17506          0,
17507          'mobile',
17508          (data) => {
17509            ajaxCategories.unsetLoadingState(mobileCatalogContainer);
17510            this.removeAttribute('data-ajax-category');
17511
17512            xcart.createDOMTreeFromHTML(data).querySelectorAll('.mobile-menu__categories').forEach(
17513              child => {
17514                mobileCatalogContainer.appendChild(child);
17515              }
17516            );
17517
17518            MobileCatalog.getInstance().updateMobileMenuList();
17519            MobileCatalog.getInstance().updateHandlers();
17520
17521            ajaxCategories.init();
17522          }
17523        );
17524      }
17525    });
17526
17527    this.setAttribute('data-ajax-handled', 'true');
17528  }
17529);;
17530/* AUTOGENERATED: garage.js */
17531/* vim: set ts=2 sw=2 sts=2 et: */
17532
17533/**
17534 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
17535 * See https://www.x-cart.com/license-agreement.html for license details.
17536 */
17537
17538(() => {
17539  const garageBlock = document.getElementById('my-garage');
17540  const garageBtn = document.querySelector('.bottom-panel__button--garage');
17541
17542  if (garageBtn) {
17543    const bottomMenu = BottomMenu.getInstance();
17544
17545    bottomMenu.addButton(
17546      garageBtn,
17547      {
17548        onActivate: () => {
17549          xcart.dropdown.open(garageBlock);
17550        },
17551        onDeactivate: () => {
17552          xcart.dropdown.close(garageBlock);
17553        },
17554        toggleable: () => !BottomMenu.getInstance().isButtonActive(garageBtn)
17555      }
17556    );
17557
17558    xcart.bind('mobile-menu.opened', () => {
17559      bottomMenu.deactivateButton(garageBtn);
17560    });
17561  }
17562})();;
17563/* AUTOGENERATED: subscribe.js */
17564/* vim: set ts=2 sw=2 sts=2 et: */
17565
17566/**
17567 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
17568 * See https://www.x-cart.com/license-agreement.html for license details.
17569 */
17570
17571function SubscribeBlockView(base)
17572{
17573  var args = Array.prototype.slice.call(arguments, 0);
17574  this.callSupermethod('constructor', args);
17575  var s = this;
17576  xcart.bind('changeSuccessMessage', function (event, data) {
17577    if (data && typeof data.message !== 'undefined') {
17578      s.changeSuccessMessage(data.message)
17579    }
17580  });
17581
17582  // Form
17583  var form = this.base
17584    ? this.base.find('.subscription-form-block form').get(0)
17585    : null;
17586  if (form) {
17587    form.commonController.enableBackgroundSubmit(
17588      undefined,
17589      _.bind(
17590        function(event, result){
17591          if (result.isValid && result.textStatus === 'success') {
17592            this.processSuccess();
17593          } else {
17594            this.processError();
17595          }
17596        },
17597        this
17598      )
17599    );
17600  }
17601}
17602
17603extend(SubscribeBlockView, ALoadable);
17604
17605SubscribeBlockView.autoload = function()
17606{
17607  jQuery('.subscription-block').each(
17608    function() {
17609      new SubscribeBlockView(this);
17610    }
17611  );
17612};
17613
17614// Widget target
17615SubscribeBlockView.prototype.widgetTarget = 'newsletter_subscriptions';
17616
17617// Widget class name
17618SubscribeBlockView.prototype.widgetClass = '\\XC\\NewsletterSubscriptions\\View\\SubscribeBlock';
17619
17620SubscribeBlockView.prototype.processSuccess = function()
17621{
17622  this.base.find('.subscription-form-block').hide();
17623
17624  this.base.find('.subscription-error-block').hide();
17625
17626  this.base.find('.subscription-success-block').removeClass('hidden');
17627  this.base.find('.subscription-success-block').show();
17628}
17629
17630SubscribeBlockView.prototype.processError = function()
17631{
17632  this.base.find('.subscription-error-block').removeClass('hidden');
17633  this.base.find('.subscription-error-block').show();
17634}
17635
17636// Get event namespace (prefix)
17637SubscribeBlockView.prototype.getEventNamespace = function()
17638{
17639  return 'NewsletterSubscriptions';
17640}
17641
17642SubscribeBlockView.prototype.changeSuccessMessage = function (message) {
17643  this.base.find('.subscription-success-block').html(message)
17644}
17645
17646xcart.autoload(SubscribeBlockView);;
17647/* AUTOGENERATED: jquery_footer.js */
17648/* vim: set ts=2 sw=2 sts=2 et: */
17649
17650/**
17651 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
17652 * See https://www.x-cart.com/license-agreement.html for license details.
17653 */
17654
17655// function footer () {
17656//   var fh = jQuery('#footer-area').height();
17657//   if (fh > 150) {
17658//     jQuery('#page').css('padding-bottom', fh);
17659//   }
17660// }
17661
17662function mobileDropdown () {
17663  if (jQuery('#top-menu.dropdown-menu').hasClass('scrollable') == true) {
17664    jQuery('#top-menu.dropdown-menu').removeClass('scrollable').removeAttr('style');
17665  }
17666  var h1 = jQuery(window).height();
17667  var h2 = jQuery('#top-menu.dropdown-menu').height();
17668  var h3 = jQuery('.mobile_header ul.nav-pills').height();
17669  if (h1 < h2+h3) {
17670    jQuery('#top-menu.dropdown-menu').addClass('scrollable').height(h1-h3);
17671  }
17672}
17673
17674jQuery(function () {
17675  mobileDropdown();
17676  jQuery(window).resize(mobileDropdown);
17677  jQuery(function () {
17678    jQuery('.top-main-menu a, .top-main-menu .primary-title').on('touchstart', function (e) {
17679      if (jQuery(this).hasClass('tap') !== true && jQuery(this).parent().parent().hasClass('tap') !== true) {
17680        jQuery('ul.tap, a.tap, .primary-title.tap').removeClass('tap');
17681      }
17682      if (jQuery(this).next('ul').length !== 0) {
17683        jQuery(this).toggleClass('tap');
17684        if (jQuery(this).hasClass('tap') == true) {
17685          e.preventDefault();
17686        }
17687        jQuery(this).next('ul').toggleClass('tap');
17688      }
17689      jQuery(document).on('touchstart', function (e) {
17690        if (jQuery(e.target).closest('.tap').length == 0) {
17691          jQuery('ul.tap, a.tap, .primary-title.tap').removeClass('tap');
17692        }
17693      });
17694    });
17695  });
17696});;
17697/* AUTOGENERATED: header-widget-common.js */
17698/* vim: set ts=2 sw=2 sts=2 et: */
17699
17700/**
17701 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
17702 * See https://www.x-cart.com/license-agreement.html for license details.
17703 */
17704
17705var wishlistUpdateCountHandler = function (event, data) {
17706  var count = data.count;
17707  var count_container = $('.wishlist-product-count');
17708  var heart = count_container.siblings('i');
17709  var old_count = parseInt(count_container.eq(0).text())? parseInt(count_container.eq(0).text()) : 0;
17710
17711  var settings_icon = $('.header_settings');
17712  var mobile_slidebar_icon = $('.mobile_header-slidebar');
17713
17714  var indicator = [settings_icon, mobile_slidebar_icon];
17715
17716
17717  // Change indication
17718
17719  indicator.forEach(function (entry) {
17720    if (count > old_count && !entry.hasClass('recently-updated')) {
17721      entry.addClass('recently-updated');
17722    }
17723  });
17724
17725  // Change items count
17726
17727  count_container.html(count);
17728
17729  if (count == 0) {
17730    heart.removeClass('fa-heart-o fa-heart').addClass('fa-heart-o');
17731  } else {
17732    heart.removeClass('fa-heart-o fa-heart').addClass('fa-heart');
17733  }
17734
17735
17736};
17737
17738// Reload on event. it is used when we create profile during wishlist adding
17739xcart.bind('doreloadpage', function () {
17740  self.location.reload();
17741});
17742
17743xcart.bind('updateWishlistProductsCount', wishlistUpdateCountHandler);
17744
17745xcart.bind('popup.open', function () {
17746  xcart.autoload(PopupButton);
17747});;
17748/* AUTOGENERATED: ga-core.js */
17749/* vim: set ts=2 sw=2 sts=2 et: */
17750
17751/**
17752 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
17753 * See https://www.x-cart.com/license-agreement.html for license details.
17754 */
17755
17756define('googleAnalytics/base/core', ['js/underscore'], function(_) {
17757  return Object.extend({
17758
17759    settings: {
17760      sendPageview: true,
17761      currency: 'USD'
17762    },
17763
17764    constructor: function () {
17765      let $initScript = jQuery('#ga-init-script')
17766      if ($initScript.length) {
17767        this.settings = _.defaults(
17768          $initScript.data('settings'),
17769          this.settings
17770        )
17771      }
17772
17773      this.initialize()
17774    },
17775
17776    getSetting (name) {
17777      return this.settings[name]
17778    },
17779
17780    initialize () {
17781      if (this.settings.sendPageview) {
17782        jQuery().ready(_.bind(this.sendPageViewInit, this))
17783      }
17784    },
17785
17786    sendPageViewInit () {
17787    },
17788
17789    registerPageView () {
17790    },
17791
17792    registerEvent () {
17793    },
17794
17795    isAvailable () {
17796    }
17797  });
17798});;
17799/* AUTOGENERATED: ga-event.js */
17800/* vim: set ts=2 sw=2 sts=2 et: */
17801
17802/**
17803 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
17804 * See https://www.x-cart.com/license-agreement.html for license details.
17805 */
17806
17807define('googleAnalytics/event', [ 'googleAnalytics/core', 'js/underscore' ], function(GACore, _) {
17808  return Object.extend({
17809    constructor: function () {
17810      this.coreInstance = GACore.instance
17811
17812      this.initialize()
17813    },
17814
17815    initialize() {
17816      jQuery().ready(_.bind(function () {
17817        this.executeIsBecomesAvailable(this.processReady, 10, 100);
17818      }, this));
17819
17820      this.bindListeners()
17821    },
17822
17823    bindListeners () {
17824      _.each(
17825        this.getListeners(),
17826        _.bind(
17827          function (handler, eventName) {
17828            xcart.bind(eventName, _.bind(function (event, params) {
17829              const callback = _.partial(handler, event, params)
17830              this.executeIsBecomesAvailable(callback, 10, 100);
17831            }, this))
17832          },
17833          this
17834        )
17835      )
17836    },
17837
17838    executeIsBecomesAvailable(callback, count, delay) {
17839      if (!this.coreInstance.isAvailable()) {
17840        if (count > 0) {
17841          console.log('XCart-GA: waiting for GA', count, this);
17842          _.delay(_.partial(_.bind(this.executeIsBecomesAvailable, this), c
17842allback, count - 1, delay), delay);
17843        } else {
17844          console.warn('XCart-GA: GA not available', callback, this);
17845          callback.apply(this);
17846        }
17847
17848        return;
17849      }
17850
17851      callback.apply(this);
17852    },
17853
17854    createFunctionWithTimeout (callback, args, opt_timeout) {
17855      var called = false
17856
17857      function fn () {
17858        if (!called) {
17859          called = true
17860          callback(args)
17861        }
17862      }
17863
17864      setTimeout(fn, opt_timeout || 500)
17865      return fn
17866    },
17867
17868    getListeners () {
17869      return {}
17870    },
17871
17872    processReady () {
17873    },
17874
17875    sendPageView () {
17876      this.coreInstance.registerPageView()
17877    },
17878
17879    sendEvent (name, label, value, namespace) {
17880      this.coreInstance.registerEvent(namespace || this.namespace, name, label, value)
17881    }
17882  });
17883});;
17884/* AUTOGENERATED: ga-core.js */
17885/* vim: set ts=2 sw=2 sts=2 et: */
17886
17887/**
17888 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
17889 * See https://www.x-cart.com/license-agreement.html for license details.
17890 */
17891
17892define('googleAnalytics/core', ['googleAnalytics/base/core', 'googleAnalytics/mapper', 'js/underscore'], function(GACoreBase, GAMapper, _) {
17893  let GACore = GACoreBase.extend({
17894
17895    sendPageViewInit () {
17896      GACore.superclass.sendPageViewInit.apply(this, arguments)
17897
17898      xcart.trigger('ga-pageview-sending')
17899      xcart.trigger('ga-pageview-sent')
17900
17901      if ('undefined' != typeof (window.gtag) && this.settings.measurementId) {
17902        gtag('get', this.settings.measurementId, 'session_id', _.bind(this.onSessionIdReceived, this));
17903      }
17904    },
17905
17906    sendGTagEvent (action, data) {
17907      if ('undefined' != typeof (window.gtag) && action && !_.isEmpty(data)) {
17908        gtag('event', action, GAMapper.prototype.map(action, data))
17909      }
17910    },
17911
17912    onSessionIdReceived (id) {
17913      jQuery.cookie('xcart_ga_session', id);
17914    },
17915
17916    registerEvent () {
17917      if (!_.isEmpty(arguments)) {
17918        var args = [
17919          arguments[1] || undefined,
17920          arguments[2] || undefined
17921        ]
17922        this.sendGTagEvent.apply(this, args)
17923      }
17924    },
17925
17926    isAvailable () {
17927      return !_.isUndefined(window.gaGlobal)
17928    }
17929  })
17930
17931  GACore.instance = new GACore();
17932
17933  return GACore;
17934});;
17935/* AUTOGENERATED: ga-mapper.js */
17936/* vim: set ts=2 sw=2 sts=2 et: */
17937
17938/**
17939 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
17940 * See https://www.x-cart.com/license-agreement.html for license details.
17941 */
17942
17943define('googleAnalytics/mapper', ['js/underscore'], function(_) {
17944  return Object.extend({
17945
17946    map (action, data) {
17947      return data
17948    }
17949
17950  });
17951});;
17952/* AUTOGENERATED: ga-ec-core.js */
17953/* vim: set ts=2 sw=2 sts=2 et: */
17954
17955/**
17956 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
17957 * See https://www.x-cart.com/license-agreement.html for license details.
17958 */
17959
17960define('googleAnalytics/base/eCommerceCoreEvent', ['googleAnalytics/event', 'js/underscore'], function (GAEvent, _) {
17961  let eCommerceCoreEventBase = GAEvent.extend({
17962    constructor: function () {
17963      eCommerceCoreEventBase.superclass.constructor.apply(this, arguments)
17964    },
17965
17966    getActions (type, context) {
17967      if (!jQuery(context).length) {
17968        context = document
17969      }
17970
17971      var actionsOnPage = _.map(
17972        jQuery('*[data-ga-ec-action]', context),
17973        function (actionEl) {
17974          return jQuery(actionEl).data('ga-ec-action')
17975        }
17976      )
17977
17978      return _.filter(actionsOnPage, function (action) {
17979        return action['ga-type'] === type
17980      })
17981    }
17982  })
17983
17984  return eCommerceCoreEventBase;
17985});;
17986/* AUTOGENERATED: ga-ec-impressions.js */
17987/* vim: set ts=2 sw=2 sts=2 et: */
17988
17989/**
17990 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
17991 * See https://www.x-cart.com/license-agreement.html for license details.
17992 */
17993
17994define('googleAnalytics/base/eCommerceImpressionsEvent', ['googleAnalytics/eCommerceCoreEvent', 'js/underscore'], function (eCommerceCoreEvent, _) {
17995  let eCommerceImpressionsEventBase = eCommerceCoreEvent.extend({
17996
17997    chunkThreshold: 6000,
17998    processedImpressions: {},
17999
18000    initialize() {
18001      eCommerceImpressionsEventBase.superclass.initialize.apply(this, arguments)
18002      this.resetContainer()
18003    },
18004
18005    resetContainer () {
18006      this.container = {}
18007    },
18008
18009    getListeners () {
18010      return {
18011        'ga-pageview-sending': this.registerAllImpressionsInitial,
18012        'list.products.loaded': this.registerAllImpressionsInList,
18013        'ga-ec-addImpression': this.addImpressionExternalHandler
18014      }
18015    },
18016
18017    registerAllImpressionsInitial (event, data) {
18018      var self = this
18019
18020      self.processImpressionsList(self.getActions('impression'))
18021    },
18022
18023    registerAllImpressionsInList (event, widget) {
18024      var self = this
18025
18026      self.processedImpressions = {}
18027
18028      self.processImpressionsList(self.getActions('impression', widget['base']))
18029    },
18030
18031    addImpressionExternalHandler (event, data) {
18032      this.addImpression(data)
18033    },
18034
18035    processImpressionsList (actionsData) {
18036      var self = this
18037      var length = 0
18038
18039      _.each(
18040        actionsData,
18041        function (action, index) {
18042          if (self.addImpression(action.data)) {
18043            length += JSON.stringify(action.data).length
18044          }
18045          if (self.calculateChunkThresholdLength(length) > self.chunkThreshold) {
18046            self.flushImpressions()
18047            length = 0
18048          }
18049        }
18050      )
18051
18052      if (length) {
18053        self.flushImpressions()
18054      }
18055    },
18056
18057    calculateChunkThresholdLength (length) {
18058      return length
18059    },
18060
18061    addImpression (impressionData) {
18062      var self = this
18063      var result = false
18064      var hash = self.getImpressionHash(impressionData)
18065
18066      if (hash && !self.processedImpressions[hash]) {
18067        self.addImpressionAction(impressionData)
18068        result = true
18069
18070        self.processedImpressions[hash] = true
18071      }
18072
18073      return result
18074    },
18075
18076    getImpressionHash (data) {
18077      return null
18078    },
18079
18080    addImpressionAction (data) {
18081    },
18082
18083    flushImpressions () {
18084    }
18085
18086  })
18087
18088  return eCommerceImpressionsEventBase;
18089});;
18090/* AUTOGENERATED: ga-ec-shopping-cart.js */
18091/* vim: set ts=2 sw=2 sts=2 et: */
18092
18093/**
18094 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18095 * See https://www.x-cart.com/license-agreement.html for license details.
18096 */
18097
18098define('googleAnalytics/base/GAShoppingCartHandleEvent', ['googleAnalytics/eCommerceCoreEvent', 'js/underscore'], function(eCommerceCoreEvent, _) {
18099  let GAShoppingCartHandleEventBase = eCommerceCoreEvent.extend({
18100    namespace: 'Product',
18101    chunkThreshold: 6000,
18102
18103    constructor: function () {
18104      GAShoppingCartHandleEventBase.superclass.constructor.apply(this, arguments)
18105      this.resetContainer()
18106    },
18107
18108    resetContainer () {
18109      this.container = {}
18110    },
18111
18112    getListeners () {
18113      return {
18114        'ga-pageview-sending': this.registerViewCart,
18115        'ga-update-cart': this.registerUpdateCart
18116      }
18117    },
18118
18119    registerViewCart (event, data) {
18120      var self = this
18121
18122      var actionData = _.first(self.getActions('view_cart'))
18123      if (actionData && !_.isUndefined(actionData.data)) {
18124        self.processViewCart(actionData.data)
18125      }
18126    },
18127
18128    processViewCart (cartData) {
18129      var self = this
18130      var length = 0
18131      var baseLength = JSON.stringify(this.container).length
18132
18133      _.each(
18134        cartData.items,
18135        function (item, index) {
18136          self.addCartItemAction(item)
18137          length += JSON.stringify(item).length
18138          if ((length + baseLength) > self.chunkThreshold) {
18139            self.flushViewCart()
18140            length = 0
18141          }
18142        }
18143      )
18144
18145      if (length) {
18146        self.flushViewCart()
18147      }
18148    },
18149
18150    addCartItemAction (data) {
18151    },
18152
18153    flushViewCart () {
18154    },
18155
18156    registerUpdateCart (event, parent_data) {
18157      var data = parent_data.data
18158      if (data.items) {
18159        for (var i = 0; i < data.items.length; i++) {
18160          var item = data.items[i]
18161
18162          if (item.quantity_change > 0) {
18163            this.registerAddItem(item['ga-data'], item.quantity_change)
18164          } else if (item.quantity_change < 0) {
18165            this.registerRemoveItem(item['ga-data'], item.quantity_change)
18166          }
18167        }
18168      }
18169      this.registerItemsChange(data)
18170    },
18171
18172    registerItemsChange (data) {
18173    },
18174    registerAddItem (item) {
18175    },
18176    registerRemoveItem (item) {
18177    }
18178  })
18179
18180  return GAShoppingCartHandleEventBase;
18181});;
18182/* AUTOGENERATED: ga-ec-change-item.js */
18183/* vim: set ts=2 sw=2 sts=2 et: */
18184
18185/**
18186 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18187 * See https://www.x-cart.com/license-agreement.html for license details.
18188 */
18189
18190define('googleAnalytics/base/eCommerceChangeItemEvent', ['googleAnalytics/eCommerceCoreEvent', 'js/underscore'], function (eCommerceCoreEvent, _) {
18191  return eCommerceCoreEvent.extend({
18192        namespace: 'Product',
18193
18194        getListeners () {
18195          return {
18196            productAddedToCart: this.registerAddToCart,
18197            productsAddedToCart: this.registerAddsToCart
18198          }
18199        },
18200
18201        registerAddToCart (event, data) {
18202        },
18203
18204        registerAddsToCart (event, data) {
18205        }
18206
18207      });
18208    }
18209);;
18210/* AUTOGENERATED: ga-ec-product-details-shown.js */
18211/* vim: set ts=2 sw=2 sts=2 et: */
18212
18213/**
18214 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18215 * See https://www.x-cart.com/license-agreement.html for license details.
18216 */
18217
18218define('googleAnalytics/base/eCommerceDetailsShownEvent', ['googleAnalytics/eCommerceCoreEvent', 'js/underscore'], function (eCommerceCoreEvent, _) {
18219  return eCommerceCoreEvent.extend({
18220
18221    getListeners () {
18222      return {
18223        'ga-pageview-sending': this.registerAllDetailsShown
18224      }
18225    },
18226
18227    registerAllDetailsShown (event, data) {
18228      var self = this
18229
18230      _.each(
18231        this.getActions('addProduct'),
18232        function (action, index) {
18233          self.registerDetailsShown(action.data)
18234        }
18235      )
18236    },
18237
18238    registerDetailsShown (addProductData) {
18239    }
18240
18241  });
18242});;
18243/* AUTOGENERATED: ga-ec-product-click.js */
18244/* vim: set ts=2 sw=2 sts=2 et: */
18245
18246/**
18247 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18248 * See https://www.x-cart.com/license-agreement.html for license details.
18249 */
18250
18251define('googleAnalytics/base/eCommerceProductClickEvent', ['googleAnalytics/eCommerceCoreEvent', 'js/underscore'], function (eCommerceCoreEvent, _) {
18252  let eCommerceProductClickEventBase = eCommerceCoreEvent.extend({
18253
18254    constructor: function () {
18255      eCommerceProductClickEventBase.superclass.constructor.apply(this, arguments)
18256
18257      var productLinks = jQuery('.products a.product-thumbnail, .products a.fn, .products a.url')
18258
18259      var self = this
18260
18261      productLinks.click(function (event) {
18262        var dataOwner = jQuery('*[data-ga-ec-action]', jQuery(event.currentTarget).parents('.product'))
18263
18264        if (dataOwner.length) {
18265          self.onProductDetailsClick(
18266            dataOwner.data('ga-ec-action').data,
18267            event
18268          )
18269        }
18270
18271        return true
18272      })
18273    },
18274
18275    onProductDetailsClick (data) {
18276    }
18277
18278  })
18279
18280  return eCommerceProductClickEventBase;
18281});;
18282/* AUTOGENERATED: ga-change-shipping.js */
18283/* vim: set ts=2 sw=2 sts=2 et: */
18284
18285/**
18286 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18287 * See https://www.x-cart.com/license-agreement.html for license details.
18288 */
18289
18290define('googleAnalytics/base/changeShippingEvent', [ 'googleAnalytics/eCommerceCoreEvent' ], function(Event) {
18291  return Event.extend({
18292    namespace: 'Checkout',
18293
18294    getListeners () {
18295      return {
18296        updateCart: this.updateCartHandler
18297      }
18298    },
18299
18300    updateCartHandler (event, data) {
18301      var actionData = _.first(this.getActions('checkout'))
18302
18303      if (actionData && data.shippingMethodName) {
18304        this.sendChangeMethodEvent(data.shippingMethodName, data.shippingTotal || null, actionData)
18305      }
18306    },
18307
18308    sendChangeMethodEvent (methodName) {
18309    }
18310  });
18311});;
18312/* AUTOGENERATED: ga-change-payment.js */
18313/* vim: set ts=2 sw=2 sts=2 et: */
18314
18315/**
18316 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18317 * See https://www.x-cart.com/license-agreement.html for license details.
18318 */
18319
18320define('googleAnalytics/base/changePaymentMethod', [ 'googleAnalytics/eCommerceCoreEvent' ], function(Event) {
18321  return Event.extend({
18322    namespace: 'Checkout',
18323
18324    getListeners () {
18325      return {
18326        updateCart: this.updateCartHandler
18327      }
18328    },
18329
18330    updateCartHandler (event, data) {
18331      var actionData = _.first(this.getActions('checkout'))
18332
18333      if (actionData && data.paymentMethodName && xcart.getTarget() === 'checkout') {
18334        this.sendChangeMethodEvent(data.paymentMethodName, actionData)
18335      }
18336    },
18337
18338    sendChangeMethodEvent (methodName) {
18339    }
18340  });
18341});;
18342/* AUTOGENERATED: ga-ec-checkout.js */
18343/* vim: set ts=2 sw=2 sts=2 et: */
18344
18345/**
18346 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18347 * See https://www.x-cart.com/license-agreement.html for license details.
18348 */
18349
18350define('googleAnalytics/base/eCommerceCheckoutStepsEvent', ['googleAnalytics/eCommerceCoreEvent', 'js/underscore'],
18351  function (eCommerceCoreEvent, _) {
18352
18353    return eCommerceCoreEvent.extend({
18354      ADDRESS_STEP: 'address',
18355      SHIPPING_STEP: 'shipping',
18356      PAYMENT_STEP: 'payment',
18357      PLACE_STEP: 'place',
18358      COMPLETE_STEP: 'complete',
18359
18360      namespace: 'Checkout',
18361
18362      getListeners () {
18363        return {
18364          'ga-checkout-step-entered': this.handleStepEntered,
18365          'ga-checkout-step-completed': this.handleStepCompleted
18366        }
18367      },
18368
18369      handleStepEntered (event, data) {
18370        var actionData = _.first(
18371          this.getActions('checkout')
18372        )
18373
18374        if (actionData) {
18375          this._handleStepEntered(data.step, data, actionData)
18376        }
18377      },
18378
18379      handleStepCompleted (event, data) {
18380        const actionsName = data.step === this.COMPLETE_STEP
18381          ? 'checkout_complete'
18382          : 'checkout'
18383        var actionData = _.first(
18384          this.getActions(actionsName)
18385        )
18386
18387        if (actionData) {
18388          this._handleStepCompleted(data.step, data, actionData)
18389        }
18390      },
18391
18392
18393      _handleStepEntered (step, data, actionData) {
18394      },
18395      _handleStepCompleted (step, data, actionData) {
18396      }
18397    });
18398  }
18399);;
18400/* AUTOGENERATED: checkout-complete.js */
18401/* vim: set ts=2 sw=2 sts=2 et: */
18402
18403/**
18404 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18405 * See https://www.x-cart.com/license-agreement.html for license details.
18406 */
18407
18408define('googleAnalytics/checkoutCompleteEvent', ['googleAnalytics/eCommerceCoreEvent'], function(eCommerceCoreEvent) {
18409  let GACheckoutCompleteEvent = eCommerceCoreEvent.extend({
18410    namespace: 'Checkout',
18411
18412    getListeners () {
18413      return {
18414        'ga-pageview-sending': this.registerInvoiceEnter
18415      }
18416    },
18417
18418    registerInvoiceEnter () {
18419      xcart.trigger('ga-checkout-step-completed', {
18420        step: 'complete'
18421      })
18422    }
18423  })
18424
18425  GACheckoutCompleteEvent.instance = new GACheckoutCompleteEvent();
18426
18427  return GACheckoutCompleteEvent;
18428});;
18429/* AUTOGENERATED: ga-ec-purchase.js */
18430/* vim: set ts=2 sw=2 sts=2 et: */
18431
18432/**
18433 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18434 * See https://www.x-cart.com/license-agreement.html for license details.
18435 */
18436
18437define('googleAnalytics/base/eCommercePurchaseEvent', ['googleAnalytics/eCommerceCoreEvent', 'js/underscore'],
18438    function (eCommerceCoreEvent, _) {
18439      return eCommerceCoreEvent.extend({
18440
18441        getListeners () {
18442          return {
18443            'ga-pageview-sending': this.registerPurchase
18444          }
18445        },
18446
18447        registerPurchase (event, data) {
18448          //to prevent sending purchase action before step 5 checkout action
18449          setTimeout(this._registerPurchase.bind(this), 300)
18450        },
18451
18452        _registerPurchase (event, data) {
18453          var actionData = _.first(this.getActions('purchase'))
18454
18455          if (actionData) {
18456            this._registerPurchaseEvent(
18457              actionData['data']['products'],
18458              actionData['data']['actionData']
18459            )
18460          }
18461        },
18462
18463        _registerPurchaseEvent (productsData, actionData) {
18464        }
18465
18466      });
18467    }
18468);;
18469/* AUTOGENERATED: ga-vehicle.js */
18470/* vim: set ts=2 sw=2 sts=2 et: */
18471
18472/**
18473 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18474 * See https://www.x-cart.com/license-agreement.html for license details.
18475 */
18476
18477define('googleAnalytics/base/vehicle_event', ['googleAnalytics/eCommerceCoreEvent'], function (eCommerceCoreEvent) {
18478
18479  return eCommerceCoreEvent.extend({
18480    namespace: 'vehicleEvent',
18481
18482    findGaLevelSelectorData () {
18483      return $('.last_make_vehicle_data')
18484    },
18485
18486    processReady () {
18487      this.processGaEvents()
18488      this.processSuccessfullySelectedVin()
18489    },
18490
18491    processGaEvents () {
18492      const levelSelectors = this.findGaLevelSelectorData()
18493
18494      if (!levelSelectors.length) {
18495        return
18496      }
18497
18498      const _this = this
18499
18500      levelSelectors.each(function () {
18501        const gaEvent = $(this).attr('data-ga-ec-action')
18502        const parsedEvent = JSON.parse(gaEvent)
18503        _this.sendVehicleEvent(parsedEvent)
18504      })
18505    },
18506
18507    processSuccessfullySelectedVin() {
18508      const _this = this
18509      xcart.bind('vinSuccessfullySelectedGA', function (event, data) {
18510        const formattedEvent = _this.formatVinDataForSendEvent(data.data)
18511        const configuredEvents = _this.setEventsForVinSelect(formattedEvent, data.data.isAddToGarage)
18512        configuredEvents.forEach((item) => {
18513          _this.sendVehicleEvent(item)
18514        })
18515      });
18516    },
18517
18518    formatVinDataForSendEvent(data) {
18519      const levels = [1, 2, 3, 4]
18520      let eventData = {
18521        data: {
18522          vehicle: '',
18523        }
18524      }
18525
18526      levels.forEach(function (item, index) {
18527        if (data.selected[item]) {
18528          if (index > 0) {
18529
18530            eventData.data.vehicle += '/';
18531          }
18532          eventData.data.vehicle += data.selected[item].value;
18533        }
18534      });
18535
18536      const keys = Object.keys(data.selected)
18537
18538      const lastKey = keys[keys.length - 1]
18539
18540      eventData.data['level' + lastKey + '_id'] = data.selected[lastKey].id;
18541
18542      return eventData
18543    },
18544
18545    setEventsForVinSelect(event, isAddToGarage) {
18546      let events = [{...event, 'ga-type': 'select_vehicle'}]
18547
18548      if (isAddToGarage) {
18549        events.push({...event, 'ga-type': 'add_vehicle'})
18550      }
18551
18552      return events
18553    },
18554
18555    sendVehicleEvent (eventData) {
18556
18557    }
18558
18559  })
18560});;
18561/* AUTOGENERATED: ga-ec-wishlist.js */
18562/* vim: set ts=2 sw=2 sts=2 et: */
18563
18564/**
18565 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18566 * See https://www.x-cart.com/license-agreement.html for license details.
18567 */
18568
18569define('googleAnalytics/base/eCommerceWishlistHandleEvent', ['googleAnalytics/eCommerceCoreEvent', 'js/underscore'], function (eCommerceCoreEvent, _) {
18570  return eCommerceCoreEvent.extend({
18571      namespace: 'Product',
18572
18573      getListeners () {
18574        return {
18575          gaProductAddedToWishlist: this.registerAddToWishlist
18576        }
18577      },
18578
18579      registerAddToWishlist (event, data) {
18580      }
18581
18582    });
18583  }
18584);;
18585/* AUTOGENERATED: ga-ec-core.js */
18586/* vim: set ts=2 sw=2 sts=2 et: */
18587
18588/**
18589 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18590 * See https://www.x-cart.com/license-agreement.html for license details.
18591 */
18592
18593define('googleAnalytics/eCommerceCoreEvent', ['googleAnalytics/base/eCommerceCoreEvent', 'googleAnalytics/event', 'js/underscore'], function (eCommerceCoreEventBase, GAEvent, _) {
18594  let eCommerceCoreEvent = eCommerceCoreEventBase.extend({
18595    container: {}
18596  })
18597
18598  eCommerceCoreEvent.instance = new eCommerceCoreEvent();
18599
18600  return eCommerceCoreEvent;
18601});;
18602/* AUTOGENERATED: ga-ec-impressions.js */
18603/* vim: set ts=2 sw=2 sts=2 et: */
18604
18605/**
18606 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18607 * See https://www.x-cart.com/license-agreement.html for license details.
18608 */
18609
18610define('googleAnalytics/eCommerceImpressionsEvent', ['googleAnalytics/base/eCommerceImpressionsEvent', 'googleAnalytics/eCommerceCoreEvent', 'js/underscore'], function (eCommerceImpressionsEventBase, eCommerceCoreEvent, _) {
18611  let eCommerceImpressionEvent = eCommerceImpressionsEventBase.extend({
18612
18613    initialize () {
18614      eCommerceImpressionEvent.superclass.initialize.apply(this, arguments)
18615      var currency = this.coreInstance.getSetting('currency')
18616      this.list_container_tpl = {
18617        currency,
18618        item_list_name: '',
18619        items: []
18620      }
18621    },
18622
18623    resetContainer () {
18624      this.container.lists = {}
18625    },
18626
18627    getImpressionHash (data) {
18628      return window.xcart.utils.hash(
18629        _.omit(data, 'index')
18630      )
18631    },
18632
18633    getListHash (list) {
18634      return window.xcart.utils.hash({name: list})
18635    },
18636
18637    calculateChunkThresholdLength (length) {
18638      return JSON.stringify(this.container).length
18639    },
18640
18641    addImpressionAction (data) {
18642      var listHash = this.getListHash(data.item_list_name)
18643
18644      if (_.isUndefined(this.container.lists[listHash])) {
18645        this.container.lists[listHash] = JSON.parse(JSON.stringify(this.list_container_tpl))
18646      }
18647      this.container.lists[listHash].item_list_name = data.item_list_name
18648      this.container.lists[listHash].items.push(data)
18649    },
18650
18651    flushImpressions () {
18652      for (var listHash in this.container.lists) {
18653        if (this.container.lists.hasOwnProperty(listHash)) {
18654          this.sendEvent('view_item_list', this.container.lists[listHash])
18655        }
18656      }
18657      this.resetContainer()
18658    }
18659
18660  })
18661
18662  eCommerceImpressionEvent.instance = new eCommerceImpressionEvent();
18663
18664  return eCommerceImpressionEvent;
18665});;
18666/* AUTOGENERATED: ga-ec-shopping-cart.js */
18667/* vim: set ts=2 sw=2 sts=2 et: */
18668
18669/**
18670 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18671 * See https://www.x-cart.com/license-agreement.html for license details.
18672 */
18673
18674define('googleAnalytics/GAShoppingCartHandleEvent', ['googleAnalytics/base/GAShoppingCartHandleEvent', 'js/underscore'], function(GAShoppingCartHandleEventBase, _) {
18675  let GAShoppingCartHandleEvent = GAShoppingCartHandleEventBase.extend({
18676    changes: {
18677      add: [],
18678      remove: []
18679    },
18680
18681    resetContainer () {
18682      var actionData = _.first(this.getActions('view_cart'))
18683      var currency = this.coreInstance.getSetting('currency')
18684      var value = 0
18685
18686      if (actionData && !_.isUndefined(actionData.context)) {
18687        if (actionData.context.currency) {
18688          currency = actionData.context.currency
18689        }
18690        if (actionData.context.value) {
18691          value = actionData.context.value
18692        }
18693      }
18694
18695      this.container = {
18696        currency,
18697        items: []
18698      }
18699
18700      if (value) {
18701        this.container.value = value
18702      }
18703    },
18704
18705    addCartItemAction (data) {
18706      this.container.items.push(data)
18707    },
18708
18709    flushViewCart () {
18710      this.sendEvent('view_cart', this.container)
18711      this.resetContainer()
18712    },
18713
18714    registerAddItem (item, quantity_change) {
18715      item.quantity = Math.abs(quantity_change)
18716      this.changes.add.push(item)
18717    },
18718
18719    registerRemoveItem (item, quantity_change) {
18720      item.quantity = Math.abs(quantity_change)
18721      this.changes.remove.push(item)
18722    },
18723
18724    registerItemsChange (data) {
18725      var currency = this.coreInstance.getSetting('currency')
18726
18727      if (this.changes.add.length) {
18728        this.sendEvent('add_to_cart', {
18729          currency,
18730          value: this.calculateChangesValue(this.changes.add),
18731          items: this.changes.add
18732        })
18733        this.changes.add = []
18734      }
18735
18736      if (this.changes.remove.length) {
18737        this.sendEvent('remove_from_cart', {
18738          currency,
18739          value: this.calculateChangesValue(this.changes.remove),
18740          items: this.changes.remove
18741        })
18742        this.changes.remove = []
18743      }
18744    },
18745
18746    calculateChangesValue (items) {
18747      var value = 0
18748
18749      _.each(
18750        items,
18751        function (item, index) {
18752          value += parseFloat(item.price) * item.quantity
18753        }
18754      )
18755
18756      return value
18757    }
18758
18759  })
18760
18761  GAShoppingCartHandleEvent.instance = new GAShoppingCartHandleEvent();
18762
18763  return GAShoppingCartHandleEvent;
18764});;
18765/* AUTOGENERATED: ga-ec-change-item.js */
18766/* vim: set ts=2 sw=2 sts=2 et: */
18767
18768/**
18769 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18770 * See https://www.x-cart.com/license-agreement.html for license details.
18771 */
18772
18773define('googleAnalytics/eCommerceChangeItemEvent', ['googleAnalytics/base/eCommerceChangeItemEvent', 'js/underscore'], function (eCommerceChangeItemEventBase, _) {
18774      let eCommerceChangeItemEvent = eCommerceChangeItemEventBase.extend({
18775
18776        registerAddToCart (event, data) {
18777          var currency = this.coreInstance.getSetting('currency')
18778          var gaProductData = data.gaProductData
18779
18780          if (gaProductData) {
18781            if (!_.isUndefined(gaProductData.list)) {
18782              gaProductData.item_list_name = gaProductData.list
18783            }
18784            this.sendEvent('add_to_cart', {
18785              currency,
18786              items: [gaProductData]
18787            })
18788          }
18789        },
18790
18791        registerAddsToCart (event, products) {
18792          let gaProducts = [];
18793          products.forEach((product) => {
18794            let gaProductData = product.gaProductData;
18795            if (gaProductData) {
18796              if (!_.isUndefined(gaProductData.list)) {
18797                gaProductData.item_list_name = gaProductData.list;
18798              }
18799              gaProducts.push(gaProductData);
18800            }
18801          }, products);
18802
18803          if (!_.isEmpty(gaProducts)) {
18804            const currency = this.coreInstance.getSetting('currency');
18805            this.sendEvent('add_to_cart', {
18806              currency,
18807              items: gaProducts
18808            });
18809          }
18810        }
18811
18812      });
18813
18814      eCommerceChangeItemEvent.instance = new eCommerceChangeItemEvent();
18815
18816      return eCommerceChangeItemEvent;
18817    }
18818);;
18819/* AUTOGENERATED: ga-ec-product-details-shown.js */
18820/* vim: set ts=2 sw=2 sts=2 et: */
18821
18822/**
18823 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18824 * See https://www.x-cart.com/license-agreement.html for license details.
18825 */
18826
18827define('googleAnalytics/eCommerceDetailsShownEvent', ['googleAnalytics/base/eCommerceDetailsShownEvent', 'js/underscore'], function (eCommerceDetailsShownEventBase, _) {
18828  let eCommerceDetailsShownEvent = eCommerceDetailsShownEventBase.extend({
18829
18830    registerDetailsShown (addProductData) {
18831      var currency = this.coreInstance.getSetting('currency')
18832      this.sendEvent('view_item', {
18833        currency,
18834        items: [addProductData]
18835      })
18836    }
18837
18838  })
18839
18840  eCommerceDetailsShownEvent.instance = new eCommerceDetailsShownEvent();
18841
18842  return eCommerceDetailsShownEvent;
18843});;
18844/* AUTOGENERATED: ga-ec-product-click.js */
18845/* vim: set ts=2 sw=2 sts=2 et: */
18846
18847/**
18848 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18849 * See https://www.x-cart.com/license-agreement.html for license details.
18850 */
18851
18852define('googleAnalytics/eCommerceProductClickEvent', ['googleAnalytics/base/eCommerceProductClickEvent', 'js/underscore', 'googleAnalytics/core'], function (eCommerceProductClickEventBase, _, gaCore) {
18853
18854  let eCommerceProductClickEvent = eCommerceProductClickEventBase.extend({
18855    is_sent: false,
18856
18857    onProductDetailsClick (data, event) {
18858      var self = this
18859
18860      if (self.is_sent || !gaCore.instance.isAvailable()) {
18861        return
18862      }
18863
18864      event.preventDefault()
18865
18866      this.sendEvent('select_item', {
18867        item_list_name: data.item_list_name,
18868        items: [data],
18869        event_callback () {
18870          self.createFunctionWithTimeout(function (e) {
18871            self.is_sent = true
18872            e.currentTarget.click()
18873          }, event)
18874        }
18875      })
18876    }
18877
18878  })
18879
18880  eCommerceProductClickEvent.instance = new eCommerceProductClickEvent();
18881
18882  return eCommerceProductClickEvent;
18883});;
18884/* AUTOGENERATED: ga-change-shipping.js */
18885/* vim: set ts=2 sw=2 sts=2 et: */
18886
18887/**
18888 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18889 * See https://www.x-cart.com/license-agreement.html for license details.
18890 */
18891
18892define('googleAnalytics/changeShippingEvent', [ 'googleAnalytics/base/changeShippingEvent', 'googleAnalytics/event' ], function(GAChangeShippingEventBase, Event) {
18893  let GAChangeShippingEvent = GAChangeShippingEventBase.extend({
18894    sendChangeMethodEvent (methodName, value, actionData) {
18895      const currency = this.coreInstance.getSetting('currency')
18896
18897      this.sendEvent('add_shipping_info', {
18898        value,
18899        currency,
18900        shipping_tier: methodName,
18901        items: actionData.data.products
18902      })
18903    }
18904  })
18905
18906  GAChangeShippingEvent.instance = new GAChangeShippingEvent();
18907
18908  return GAChangeShippingEvent;
18909});;
18910/* AUTOGENERATED: ga-change-payment.js */
18911/* vim: set ts=2 sw=2 sts=2 et: */
18912
18913/**
18914 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18915 * See https://www.x-cart.com/license-agreement.html for license details.
18916 */
18917
18918define('googleAnalytics/changePaymentMethod', [ 'googleAnalytics/base/changePaymentMethod', 'googleAnalytics/event' ], function(GAChangePaymentEventBase, Event) {
18919  let GAChangePaymentEvent = GAChangePaymentEventBase.extend({
18920    sendChangeMethodEvent (methodName, actionData) {
18921      this.sendEvent('add_payment_info', {
18922        payment_type: methodName,
18923        items: actionData.data.products
18924      })
18925    }
18926  })
18927
18928  GAChangePaymentEvent.instance = new GAChangePaymentEvent();
18929
18930  return GAChangePaymentEvent;
18931});;
18932/* AUTOGENERATED: ga-ec-checkout.js */
18933/* vim: set ts=2 sw=2 sts=2 et: */
18934
18935/**
18936 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
18937 * See https://www.x-cart.com/license-agreement.html for license details.
18938 */
18939
18940define('googleAnalytics/eCommerceCheckoutStepsEvent', [ 'googleAnalytics/base/eCommerceCheckoutStepsEvent', 'googleAnalytics/event' ], function(eCommerceCheckoutStepBaseEvent, Event) {
18941  let eCommerceCheckoutStepEvent = eCommerceCheckoutStepBaseEvent.extend({
18942    _handleStepEntered (step, data, actionData) {
18943      const currency = this.coreInstance.getSetting('currency')
18944
18945      switch (step) {
18946        case this.ADDRESS_STEP:
18947          this.sendEvent('begin_checkout', {
18948            currency,
18949            items: actionData.data.products
18950          })
18951
18952          break
18953
18954        case this.SHIPPING_STEP:
18955          // TODO Methods reloading should be handled
18956          this.sendEvent('add_shipping_info', {
18957            value: actionData.data.shipping_value,
18958            currency,
18959            shipping_tier: actionData.data.shipping_method,
18960            items: actionData.data.products
18961          })
18962          break
18963
18964        case this.PAYMENT_STEP:
18965          this.sendEvent('add_payment_info', {
18966            payment_type: actionData.data.payment_method,
18967            items: actionData.data.products
18968          })
18969          break
18970
18971        case this.PLACE_STEP:
18972          break
18973
18974        case this.COMPLETE_STEP:
18975          break
18976      }
18977    },
18978
18979    _handleStepCompleted (step, data, actionData) {
18980      switch (step) {
18981        case this.ADDRESS_STEP:
18982          break
18983
18984        case this.SHIPPING_STEP:
18985          break
18986
18987        case this.PAYMENT_STEP:
18988          break
18989
18990        case this.PLACE_STEP:
18991          break
18992
18993        case this.COMPLETE_STEP:
18994          break
18995      }
18996    }
18997  })
18998
18999  eCommerceCheckoutStepEvent.instance = new eCommerceCheckoutStepEvent();
19000
19001  return eCommerceCheckoutStepEvent;
19002});;
19003/* AUTOGENERATED: ga-ec-purchase.js */
19004/* vim: set ts=2 sw=2 sts=2 et: */
19005
19006/**
19007 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
19008 * See https://www.x-cart.com/license-agreement.html for license details.
19009 */
19010
19011define('googleAnalytics/purchaseEvent', ['googleAnalytics/base/eCommercePurchaseEvent', 'js/underscore'],
19012    function (eCommercePurchaseBaseEvent, _) {
19013      let eCommercePurchaseEvent = eCommercePurchaseBaseEvent.extend({
19014        _registerPurchaseEvent (productsData, actionData) {
19015          if (_.isUndefined(actionData.items)) {
19016            actionData.items = productsData
19017          }
19018          this.sendEvent('purchase', actionData)
19019        }
19020
19021      })
19022
19023      eCommercePurchaseEvent.instance = new eCommercePurchaseEvent();
19024
19025      return eCommercePurchaseEvent;
19026    }
19027);;
19028/* AUTOGENERATED: ga-vehicle.js */
19029/* vim: set ts=2 sw=2 sts=2 et: */
19030
19031/**
19032 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
19033 * See https://www.x-cart.com/license-agreement.html for license details.
19034 */
19035
19036define('googleAnalytics/vehicle_event', ['googleAnalytics/base/vehicle_event'], function (vehicleEvent) {
19037  const handleVehicleEvent = vehicleEvent.extend({
19038    sendVehicleEvent (eventData) {
19039      this.sendEvent(eventData['ga-type'], eventData.data)
19040    }
19041  })
19042
19043  handleVehicleEvent.instance = new handleVehicleEvent()
19044
19045  return handleVehicleEvent
19046});;
19047/* AUTOGENERATED: ga-ec-wishlist.js */
19048/* vim: set ts=2 sw=2 sts=2 et: */
19049
19050/**
19051 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
19052 * See https://www.x-cart.com/license-agreement.html for license details.
19053 */
19054
19055define('googleAnalytics/eCommerceWishlistHandleEvent', ['googleAnalytics/base/eCommerceWishlistHandleEvent', 'js/underscore'], function (eCommerceWishlistHandleEventBase, _) {
19056  let eCommerceWishlistHandleEvent = eCommerceWishlistHandleEventBase.extend({
19057
19058    registerAddToWishlist (event, data) {
19059      var gaProductData = data.gaProductData
19060
19061      if (gaProductData) {
19062        if (!_.isUndefined(gaProductData.list)) {
19063          gaProductData.item_list_name = gaProductData.list
19064        }
19065
19066        this.sendEvent('add_to_wishlist', {
19067          items: [gaProductData]
19068        })
19069      }
19070    }
19071
19072  })
19073
19074    eCommerceWishlistHandleEvent.instance = new eCommerceWishlistHandleEvent();
19075
19076    return eCommerceWishlistHandleEvent;
19077  }
19078);;

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.