(function(e){var h=e.onerror,f=new XMLHttpRequest,l=0,m=function(c){var a="",b;for(b in c)c.hasOwnProperty(b)&&(0l++&&(f.open("POST",ajaxPrefix+"error/logJsError",!0),f.setRequestHeader("Content-type","application/x-www-form-urlencoded"),f.send(m(g)));return h?h(c,a,b):!1}})(window);!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),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("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,""],area:[1,""],param:[1,""],thead:[1,""],tr:[2,""],col:[2,""],td:[3,""],_default:k.htmlSerialize?[0,"",""]:[1,"X","
"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" a",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();ca",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u
"']/g,J=RegExp(G.source),Y=RegExp(H.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,nn=/<%=([\s\S]+?)%>/g,tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rn=/^\w*$/,en=/^\./,un=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,on=/[\\^$.*+?()[\]{}|]/g,fn=RegExp(on.source),cn=/^\s+|\s+$/g,an=/^\s+/,ln=/\s+$/,sn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,hn=/\{\n\/\* \[wrapped with (.+)\] \*/,pn=/,? & /,_n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vn=/\\(\\)?/g,gn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dn=/\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,bn=/^0b[01]+$/i,xn=/^\[object .+?Constructor\]$/,jn=/^0o[0-7]+$/i,wn=/^(?:0|[1-9]\d*)$/,mn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,An=/($^)/,kn=/['\n\r\u2028\u2029\\]/g,En="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",On="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+En,Sn="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",In=RegExp("['\u2019]","g"),Rn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),zn=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+Sn+En,"g"),Wn=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)|\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)|\\d+",On].join("|"),"g"),Bn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Ln=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Un="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Cn={};Cn["[object Float32Array]"]=Cn["[object Float64Array]"]=Cn["[object Int8Array]"]=Cn["[object Int16Array]"]=Cn["[object Int32Array]"]=Cn["[object Uint8Array]"]=Cn["[object Uint8ClampedArray]"]=Cn["[object Uint16Array]"]=Cn["[object Uint32Array]"]=true,Cn["[object Arguments]"]=Cn["[object Array]"]=Cn["[object ArrayBuffer]"]=Cn["[object Boolean]"]=Cn["[object DataView]"]=Cn["[object Date]"]=Cn["[object Error]"]=Cn["[object Function]"]=Cn["[object Map]"]=Cn["[object Number]"]=Cn["[object Object]"]=Cn["[object RegExp]"]=Cn["[object Set]"]=Cn["[object String]"]=Cn["[object WeakMap]"]=false;var Dn={};Dn["[object Arguments]"]=Dn["[object Array]"]=Dn["[object ArrayBuffer]"]=Dn["[object DataView]"]=Dn["[object Boolean]"]=Dn["[object Date]"]=Dn["[object Float32Array]"]=Dn["[object Float64Array]"]=Dn["[object Int8Array]"]=Dn["[object Int16Array]"]=Dn["[object Int32Array]"]=Dn["[object Map]"]=Dn["[object Number]"]=Dn["[object Object]"]=Dn["[object RegExp]"]=Dn["[object Set]"]=Dn["[object String]"]=Dn["[object Symbol]"]=Dn["[object Uint8Array]"]=Dn["[object Uint8ClampedArray]"]=Dn["[object Uint16Array]"]=Dn["[object Uint32Array]"]=true,Dn["[object Error]"]=Dn["[object Function]"]=Dn["[object WeakMap]"]=false;var Mn,Tn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$n=parseFloat,Fn=parseInt,Nn=typeof global=="object"&&global&&global.Object===Object&&global,Pn=typeof self=="object"&&self&&self.Object===Object&&self,Zn=Nn||Pn||Function("return this")(),qn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vn=qn&&typeof module=="object"&&module&&!module.nodeType&&module,Kn=Vn&&Vn.exports===qn,Gn=Kn&&Nn.process;n:{try{Mn=Gn&&Gn.binding&&Gn.binding("util");break n}catch(n){}Mn=void 0}var Hn=Mn&&Mn.isArrayBuffer,Jn=Mn&&Mn.isDate,Yn=Mn&&Mn.isMap,Qn=Mn&&Mn.isRegExp,Xn=Mn&&Mn.isSet,nt=Mn&&Mn.isTypedArray,tt=j("length"),rt=w({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),et=w({"&":"&","<":"<",">":">",'"':""","'":"'"}),ut=w({"&":"&","<":"<",">":">",""":'"',"'":"'"}),it=function w(En){function On(n){if(xu(n)&&!af(n)&&!(n instanceof Mn)){if(n instanceof zn)return n;if(ci.call(n,"__wrapped__"))return Pe(n)}return new zn(n)}function Sn(){}function zn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=F}function Mn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Tn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function dt(n,t,r,e,i,o){var f,c=1&t,a=2&t,l=4&t;if(r&&(f=i?r(n,e,i,o):r(n)),f!==F)return f;if(!bu(n))return n;if(e=af(n)){if(f=Ee(n),!c)return Mr(n,f)}else{var s=yo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(sf(n))return Wr(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Oe(n),!c)return a?Fr(n,pt(f,n)):$r(n,ht(f,n))}else{if(!Dn[s])return i?n:{};f=Se(n,s,dt,c)}}if(o||(o=new Vn),i=o.get(n))return i;o.set(n,f);var a=l?a?ye:de:a?Uu:Lu,p=e?F:a(n);return u(p||n,function(e,u){p&&(u=e,e=n[u]),at(f,u,dt(e,t,r,u,n,o))}),f}function yt(n){var t=Lu(n);return function(r){return bt(r,n,t)}}function bt(n,t,r){var e=r.length;if(null==n)return!e;for(n=ni(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===F&&!(u in n)||!i(o))return false}return true}function xt(n,t,r){if(typeof n!="function")throw new ei("Expected a function");return jo(function(){n.apply(F,r)},t)}function jt(n,t,r,e){var u=-1,i=c,o=true,f=n.length,s=[],h=t.length;if(!f)return s;r&&(t=l(t,S(r))),e?(i=a,o=false):200<=t.length&&(i=R,o=false,t=new qn(t));n:for(;++ut}function Bt(n,t){return null!=n&&ci.call(n,t)}function Lt(n,t){return null!=n&&t in ni(n)}function Ut(n,t,r){for(var e=r?a:c,u=n[0].length,i=n.length,o=i,f=Hu(i),s=1/0,h=[];o--;){var p=n[o];o&&t&&(p=l(p,S(t))),s=Mi(p.length,s),f[o]=!r&&(t||120<=u&&120<=p.length)?new qn(o&&p):F}var p=n[0],_=-1,v=f[0];n:for(;++_t.length?n:It(n,vr(t,0,-1)),t=null==n?n:n[$e(Ge(t))],null==t?F:r(t,n,e)}function Mt(n){return xu(n)&&"[object Arguments]"==zt(n)}function Tt(n){return xu(n)&&"[object ArrayBuffer]"==zt(n)}function $t(n){return xu(n)&&"[object Date]"==zt(n)}function Ft(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!xu(n)&&!xu(t))t=n!==n&&t!==t;else n:{var i=af(n),o=af(t),f=i?"[object Array]":yo(n),c=o?"[object Array]":yo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&sf(n)){if(!sf(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Vn),t=i||gf(n)?_e(n,t,r,e,Ft,u):ve(n,t,f,r,e,Ft,u);else{if(!(1&r)&&(i=a&&ci.call(n,"__wrapped__"),f=o&&ci.call(t,"__wrapped__"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Vn),t=Ft(n,t,r,e,u);break n}if(c)t:if(u||(u=new Vn),i=1&r,f=de(n),o=f.length,c=de(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:ci.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++at?r:0,Re(t,r)?n[t]:F}function rr(n,t,r){var e=-1;return t=l(t.length?t:[Nu],S(je())),n=Yt(n,function(n){return{a:l(t,function(t){return t(n)}),b:++e,c:n}}),A(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e=f?c:c*("desc"==r[e]?-1:1);break n}}e=n.b-t.b}return e})}function er(n,t){return ur(n,t,function(t,r){return Bu(n,r)})}function ur(n,t,r){for(var e=-1,u=t.length,i={};++et||9007199254740991t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Hu(u);++e=u){for(;e>>1,o=n[i];null!==o&&!Au(o)&&(r?o<=t:ot.length?n:It(n,vr(t,0,-1)),null==n||delete n[$e(Ge(t))]}function Ar(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++ie)return e?wr(n[0]):[];for(var u=-1,i=Hu(e);++u=e?n:vr(n,t,r)}function Wr(n,t){if(t)return n.slice();var r=n.length,r=yi?yi(r):new n.constructor(r);return n.copy(r),r}function Br(n){var t=new n.constructor(n.byteLength);return new di(t).set(new di(n)),t}function Lr(n,t){return new n.constructor(t?Br(n.buffer):n.buffer,n.byteOffset,n.length)}function Ur(n,t){if(n!==t){var r=n!==F,e=null===n,u=n===n,i=Au(n),o=t!==F,f=null===t,c=t===t,a=Au(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&nu?F:i,u=1),t=ni(t);++eo&&f[0]!==a&&f[o-1]!==a?[]:C(f,a),o-=c.length,or?r?ar(t,n):t:(r=ar(t,Ri(n/T(t))),Bn.test(t)?zr($(r),0,n).join(""):r.slice(0,n))}function ue(n,t,e,u){function i(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Hu(l+c),h=this&&this!==Zn&&this instanceof i?f:n;++at||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Cr(e,r,h[4]):r,i[4]=e?C(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Dr(e,r,h[6]):r,i[6]=e?C(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Mi(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0],t=i[1],r=i[2],e=i[3],u=i[4],f=i[9]=i[9]===F?c?0:n.length:Di(i[9]-a,0),!f&&24&t&&(t&=-25),De((h?lo:xo)(t&&1!=t?8==t||16==t?Jr(n,t,f):32!=t&&33!=t||u.length?Xr.apply(F,i):ue(n,t,r,e):Vr(n,t,r),i),n,t)}function se(n,t,r,e){return n===F||hu(n,ii[r])&&!ci.call(e,r)?t:n}function he(n,t,r,e,u,i){return bu(n)&&bu(t)&&(i.set(t,n),nr(n,t,F,he,i),i.delete(t)),n}function pe(n){return wu(n)?F:n}function _e(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t;var c=-1,a=true,l=2&r?new qn:F;for(i.set(n,t),i.set(t,n);++cr&&(r=Di(e+r,0)),g(n,je(t,3),r)):-1}function qe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==F&&(u=Ou(r),u=0>r?Di(e+u,0):Mi(u,e-1)),g(n,je(t,3),u,true)}function Ve(n){return(null==n?0:n.length)?kt(n,1):[]}function Ke(n){return n&&n.length?n[0]:F}function Ge(n){var t=null==n?0:n.length;return t?n[t-1]:F}function He(n,t){return n&&n.length&&t&&t.length?or(n,t):n}function Je(n){return null==n?n:Ni.call(n)}function Ye(n){if(!n||!n.length)return[];var t=0;return n=f(n,function(n){if(_u(n))return t=Di(n.length,t),true}),E(t,function(t){return l(n,j(t))})}function Qe(n,t){if(!n||!n.length)return[];var e=Ye(n);return null==t?e:l(e,function(n){return r(t,F,n)})}function Xe(n){return n=On(n),n.__chain__=true,n}function nu(n,t){return t(n)}function tu(){return this}function ru(n,t){return(af(n)?u:oo)(n,je(t,3))}function eu(n,t){return(af(n)?i:fo)(n,je(t,3))}function uu(n,t){return(af(n)?l:Yt)(n,je(t,3))}function iu(n,t,r){return t=r?F:t,t=n&&null==t?n.length:t,le(n,128,F,F,F,F,t)}function ou(n,t){var r;if(typeof t!="function")throw new ei("Expected a function");return n=Ou(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=F),r}}function fu(n,t,r){return t=r?F:t,n=le(n,8,F,F,F,F,F,t),n.placeholder=fu.placeholder,n}function cu(n,t,r){return t=r?F:t,n=le(n,16,F,F,F,F,F,t),n.placeholder=cu.placeholder,n}function au(n,t,r){function e(t){var r=c,e=a;return c=a=F,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===F||r>=t||0>r||g&&n>=l}function i(){var n=Jo();if(u(n))return o(n);var r,e=jo;r=n-_,n=t-(n-p),r=g?Mi(n,l-r):n,h=e(i,r)}function o(n){return h=F,d&&c?e(n):(c=a=F,s)}function f(){var n=Jo(),r=u(n);if(c=arguments,a=this,p=n,r){if(h===F)return _=n=p,h=jo(i,t),v?e(n):s;if(g)return h=jo(i,t),e(p)}return h===F&&(h=jo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ei("Expected a function");return t=Iu(t)||0,bu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Di(Iu(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==F&&ho(h),_=0,c=p=a=h=F},f.flush=function(){return h===F?s:o(Jo())},f}function lu(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e),r.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new ei("Expected a function");return r.cache=new(lu.Cache||Pn),r}function su(n){if(typeof n!="function")throw new ei("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function hu(n,t){return n===t||n!==n&&t!==t}function pu(n){return null!=n&&yu(n.length)&&!gu(n);}function _u(n){return xu(n)&&pu(n)}function vu(n){if(!xu(n))return false;var t=zt(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!wu(n)}function gu(n){return!!bu(n)&&(n=zt(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function du(n){return typeof n=="number"&&n==Ou(n)}function yu(n){return typeof n=="number"&&-1=n}function bu(n){var t=typeof n;return null!=n&&("object"==t||"function"==t);}function xu(n){return null!=n&&typeof n=="object"}function ju(n){return typeof n=="number"||xu(n)&&"[object Number]"==zt(n)}function wu(n){return!(!xu(n)||"[object Object]"!=zt(n))&&(n=bi(n),null===n||(n=ci.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&fi.call(n)==hi))}function mu(n){return typeof n=="string"||!af(n)&&xu(n)&&"[object String]"==zt(n)}function Au(n){return typeof n=="symbol"||xu(n)&&"[object Symbol]"==zt(n)}function ku(n){if(!n)return[];if(pu(n))return mu(n)?$(n):Mr(n);if(Ai&&n[Ai]){n=n[Ai]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=yo(n),("[object Map]"==t?L:"[object Set]"==t?D:Du)(n)}function Eu(n){return n?(n=Iu(n),n===N||n===-N?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Ou(n){n=Eu(n);var t=n%1;return n===n?t?n-t:n:0}function Su(n){return n?gt(Ou(n),0,4294967295):0}function Iu(n){if(typeof n=="number")return n;if(Au(n))return P;if(bu(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,n=bu(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(cn,"");var t=bn.test(n);return t||jn.test(n)?Fn(n.slice(2),t?2:8):yn.test(n)?P:+n}function Ru(n){return Tr(n,Uu(n))}function zu(n){return null==n?"":jr(n)}function Wu(n,t,r){return n=null==n?F:It(n,t),n===F?r:n}function Bu(n,t){return null!=n&&ke(n,t,Lt)}function Lu(n){return pu(n)?Gn(n):Ht(n)}function Uu(n){if(pu(n))n=Gn(n,true);else if(bu(n)){var t,r=Le(n),e=[];for(t in n)("constructor"!=t||!r&&ci.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in ni(n))t.push(r);n=t}return n}function Cu(n,t){if(null==n)return{};var r=l(ye(n),function(n){return[n]});return t=je(t),ur(n,r,function(n,r){return t(n,r[0])})}function Du(n){return null==n?[]:I(n,Lu(n))}function Mu(n){return Nf(zu(n).toLowerCase())}function Tu(n){return(n=zu(n))&&n.replace(mn,rt).replace(Rn,"")}function $u(n,t,r){return n=zu(n),t=r?F:t,t===F?Ln.test(n)?n.match(Wn)||[]:n.match(_n)||[]:n.match(t)||[]}function Fu(n){return function(){return n}}function Nu(n){return n}function Pu(n){return Gt(typeof n=="function"?n:dt(n,1))}function Zu(n,t,r){var e=Lu(t),i=St(t,e);null!=r||bu(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=St(t,Lu(t)));var o=!(bu(r)&&"chain"in r&&!r.chain),f=gu(n);return u(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Mr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,s([this.value()],arguments))})}),n}function qu(){}function Vu(n){return We(n)?j($e(n)):ir(n)}function Ku(){return[]}function Gu(){return false}En=null==En?Zn:it.defaults(Zn.Object(),En,it.pick(Zn,Un));var Hu=En.Array,Ju=En.Date,Yu=En.Error,Qu=En.Function,Xu=En.Math,ni=En.Object,ti=En.RegExp,ri=En.String,ei=En.TypeError,ui=Hu.prototype,ii=ni.prototype,oi=En["__core-js_shared__"],fi=Qu.prototype.toString,ci=ii.hasOwnProperty,ai=0,li=function(){var n=/[^.]+$/.exec(oi&&oi.keys&&oi.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),si=ii.toString,hi=fi.call(ni),pi=Zn._,_i=ti("^"+fi.call(ci).replace(on,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vi=Kn?En.Buffer:F,gi=En.Symbol,di=En.Uint8Array,yi=vi?vi.f:F,bi=U(ni.getPrototypeOf,ni),xi=ni.create,ji=ii.propertyIsEnumerable,wi=ui.splice,mi=gi?gi.isConcatSpreadable:F,Ai=gi?gi.iterator:F,ki=gi?gi.toStringTag:F,Ei=function(){try{var n=Ae(ni,"defineProperty");return n({},"",{}),n}catch(n){}}(),Oi=En.clearTimeout!==Zn.clearTimeout&&En.clearTimeout,Si=Ju&&Ju.now!==Zn.Date.now&&Ju.now,Ii=En.setTimeout!==Zn.setTimeout&&En.setTimeout,Ri=Xu.ceil,zi=Xu.floor,Wi=ni.getOwnPropertySymbols,Bi=vi?vi.isBuffer:F,Li=En.isFinite,Ui=ui.join,Ci=U(ni.keys,ni),Di=Xu.max,Mi=Xu.min,Ti=Ju.now,$i=En.parseInt,Fi=Xu.random,Ni=ui.reverse,Pi=Ae(En,"DataView"),Zi=Ae(En,"Map"),qi=Ae(En,"Promise"),Vi=Ae(En,"Set"),Ki=Ae(En,"WeakMap"),Gi=Ae(ni,"create"),Hi=Ki&&new Ki,Ji={},Yi=Fe(Pi),Qi=Fe(Zi),Xi=Fe(qi),no=Fe(Vi),to=Fe(Ki),ro=gi?gi.prototype:F,eo=ro?ro.valueOf:F,uo=ro?ro.toString:F,io=function(){function n(){}return function(t){return bu(t)?xi?xi(t):(n.prototype=t,t=new n,n.prototype=F,t):{}}}();On.templateSettings={escape:Q,evaluate:X,interpolate:nn,variable:"",imports:{_:On}},On.prototype=Sn.prototype,On.prototype.constructor=On,zn.prototype=io(Sn.prototype),zn.prototype.constructor=zn,Mn.prototype=io(Sn.prototype),Mn.prototype.constructor=Mn,Tn.prototype.clear=function(){this.__data__=Gi?Gi(null):{},this.size=0},Tn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n],this.size-=n?1:0,n},Tn.prototype.get=function(n){var t=this.__data__;return Gi?(n=t[n],"__lodash_hash_undefined__"===n?F:n):ci.call(t,n)?t[n]:F},Tn.prototype.has=function(n){var t=this.__data__;return Gi?t[n]!==F:ci.call(t,n)},Tn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Gi&&t===F?"__lodash_hash_undefined__":t,this},Nn.prototype.clear=function(){this.__data__=[],this.size=0},Nn.prototype.delete=function(n){var t=this.__data__;return n=lt(t,n),!(0>n)&&(n==t.length-1?t.pop():wi.call(t,n,1),--this.size,true)},Nn.prototype.get=function(n){var t=this.__data__;return n=lt(t,n),0>n?F:t[n][1]},Nn.prototype.has=function(n){return-1e?(++this.size,r.push([n,t])):r[e][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Tn,map:new(Zi||Nn),string:new Tn}},Pn.prototype.delete=function(n){return n=we(this,n).delete(n),this.size-=n?1:0,n},Pn.prototype.get=function(n){return we(this,n).get(n);},Pn.prototype.has=function(n){return we(this,n).has(n)},Pn.prototype.set=function(n,t){var r=we(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},qn.prototype.add=qn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},qn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.clear=function(){this.__data__=new Nn,this.size=0},Vn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Vn.prototype.get=function(n){return this.__data__.get(n)},Vn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Nn){var e=r.__data__;if(!Zi||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Pn(e)}return r.set(n,t),this.size=r.size,this};var oo=Zr(Et),fo=Zr(Ot,true),co=qr(),ao=qr(true),lo=Hi?function(n,t){return Hi.set(n,t),n}:Nu,so=Ei?function(n,t){return Ei(n,"toString",{configurable:true,enumerable:false,value:Fu(t),writable:true})}:Nu,ho=Oi||function(n){return Zn.clearTimeout(n)},po=Vi&&1/D(new Vi([,-0]))[1]==N?function(n){return new Vi(n)}:qu,_o=Hi?function(n){return Hi.get(n)}:qu,vo=Wi?function(n){return null==n?[]:(n=ni(n),f(Wi(n),function(t){return ji.call(n,t)}))}:Ku,go=Wi?function(n){for(var t=[];n;)s(t,vo(n)),n=bi(n);return t}:Ku,yo=zt;(Pi&&"[object DataView]"!=yo(new Pi(new ArrayBuffer(1)))||Zi&&"[object Map]"!=yo(new Zi)||qi&&"[object Promise]"!=yo(qi.resolve())||Vi&&"[object Set]"!=yo(new Vi)||Ki&&"[object WeakMap]"!=yo(new Ki))&&(yo=function(n){var t=zt(n);if(n=(n="[object Object]"==t?n.constructor:F)?Fe(n):"")switch(n){case Yi:return"[object DataView]";case Qi:return"[object Map]";case Xi:return"[object Promise]";case no:return"[object Set]";case to:return"[object WeakMap]"}return t});var bo=oi?gu:Gu,xo=Me(lo),jo=Ii||function(n,t){return Zn.setTimeout(n,t)},wo=Me(so),mo=function(n){n=lu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return en.test(n)&&t.push(""),n.replace(un,function(n,r,e,u){t.push(e?u.replace(vn,"$1"):r||n)}),t}),Ao=lr(function(n,t){return _u(n)?jt(n,kt(t,1,_u,true)):[]}),ko=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),je(r,2)):[]}),Eo=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),F,r):[]}),Oo=lr(function(n){var t=l(n,Sr);return t.length&&t[0]===n[0]?Ut(t):[]}),So=lr(function(n){var t=Ge(n),r=l(n,Sr);return t===Ge(r)?t=F:r.pop(),r.length&&r[0]===n[0]?Ut(r,je(t,2)):[]}),Io=lr(function(n){var t=Ge(n),r=l(n,Sr);return(t=typeof t=="function"?t:F)&&r.pop(),r.length&&r[0]===n[0]?Ut(r,F,t):[]}),Ro=lr(He),zo=ge(function(n,t){var r=null==n?0:n.length,e=vt(n,t);return fr(n,l(t,function(n){return Re(n,r)?+n:n}).sort(Ur)),e}),Wo=lr(function(n){return wr(kt(n,1,_u,true))}),Bo=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),wr(kt(n,1,_u,true),je(t,2))}),Lo=lr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;return wr(kt(n,1,_u,true),F,t)}),Uo=lr(function(n,t){return _u(n)?jt(n,t):[]}),Co=lr(function(n){return Er(f(n,_u))}),Do=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),Er(f(n,_u),je(t,2))}),Mo=lr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;return Er(f(n,_u),F,t)}),To=lr(Ye),$o=lr(function(n){var t=n.length,t=1=t}),cf=Mt(function(){return arguments}())?Mt:function(n){return xu(n)&&ci.call(n,"callee")&&!ji.call(n,"callee")},af=Hu.isArray,lf=Hn?S(Hn):Tt,sf=Bi||Gu,hf=Jn?S(Jn):$t,pf=Yn?S(Yn):Nt,_f=Qn?S(Qn):qt,vf=Xn?S(Xn):Vt,gf=nt?S(nt):Kt,df=oe(Jt),yf=oe(function(n,t){return n<=t}),bf=Pr(function(n,t){if(Le(t)||pu(t))Tr(t,Lu(t),n);else for(var r in t)ci.call(t,r)&&at(n,r,t[r])}),xf=Pr(function(n,t){Tr(t,Uu(t),n)}),jf=Pr(function(n,t,r,e){Tr(t,Uu(t),n,e)}),wf=Pr(function(n,t,r,e){Tr(t,Lu(t),n,e)}),mf=ge(vt),Af=lr(function(n){return n.push(F,se),r(jf,F,n)}),kf=lr(function(n){return n.push(F,he),r(Rf,F,n)}),Ef=ne(function(n,t,r){n[t]=r},Fu(Nu)),Of=ne(function(n,t,r){ci.call(n,t)?n[t].push(r):n[t]=[r]},je),Sf=lr(Dt),If=Pr(function(n,t,r){nr(n,t,r)}),Rf=Pr(function(n,t,r,e){nr(n,t,r,e)}),zf=ge(function(n,t){var r={};if(null==n)return r;var e=false;t=l(t,function(t){return t=Rr(t,n),e||(e=1--n)return t.apply(this,arguments)}},On.ary=iu,On.assign=bf,On.assignIn=xf,On.assignInWith=jf,On.assignWith=wf,On.at=mf,On.before=ou,On.bind=Yo,On.bindAll=Zf,On.bindKey=Qo,On.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return af(n)?n:[n]},On.chain=Xe,On.chunk=function(n,t,r){if(t=(r?ze(n,t,r):t===F)?1:Di(Ou(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Hu(Ri(r/t));et?0:t,e)):[]},On.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0,0>t?0:t)):[]},On.dropRightWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true,true):[]},On.dropWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true):[]},On.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&ze(n,t,r)&&(r=0,e=u),u=n.length,r=Ou(r),0>r&&(r=-r>u?0:u+r),e=e===F||e>u?u:Ou(e),0>e&&(e+=u),e=r>e?0:Su(e);r>>0,r?(n=zu(n))&&(typeof t=="string"||null!=t&&!_f(t))&&(t=jr(t),!t&&Bn.test(n))?zr($(n),0,r):n.split(t,r):[]},On.spread=function(n,t){if(typeof n!="function")throw new ei("Expected a function");return t=null==t?0:Di(Ou(t),0),lr(function(e){var u=e[t];return e=zr(e,0,t),u&&s(e,u),r(n,this,e)})},On.tail=function(n){var t=null==n?0:n.length;return t?vr(n,1,t):[]},On.take=function(n,t,r){return n&&n.length?(t=r||t===F?1:Ou(t),vr(n,0,0>t?0:t)):[]},On.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0>t?0:t,e)):[]},On.takeRightWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),false,true):[]},On.takeWhile=function(n,t){return n&&n.length?Ar(n,je(t,3)):[]},On.tap=function(n,t){return t(n),n},On.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ei("Expected a function");return bu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),au(n,t,{leading:e,maxWait:t,trailing:u})},On.thru=nu,On.toArray=ku,On.toPairs=Bf,On.toPairsIn=Lf,On.toPath=function(n){return af(n)?l(n,$e):Au(n)?[n]:Mr(mo(zu(n)))},On.toPlainObject=Ru,On.transform=function(n,t,r){var e=af(n),i=e||sf(n)||gf(n);if(t=je(t,4),null==r){var o=n&&n.constructor;r=i?e?new o:[]:bu(n)&&gu(o)?io(bi(n)):{}}return(i?u:Et)(n,function(n,e,u){return t(r,n,e,u)}),r},On.unary=function(n){return iu(n,1)},On.union=Wo,On.unionBy=Bo,On.unionWith=Lo,On.uniq=function(n){return n&&n.length?wr(n):[]},On.uniqBy=function(n,t){return n&&n.length?wr(n,je(t,2)):[]},On.uniqWith=function(n,t){return t=typeof t=="function"?t:F,n&&n.length?wr(n,F,t):[]},On.unset=function(n,t){return null==n||mr(n,t);},On.unzip=Ye,On.unzipWith=Qe,On.update=function(n,t,r){return null==n?n:pr(n,t,Ir(r)(It(n,t)),void 0)},On.updateWith=function(n,t,r,e){return e=typeof e=="function"?e:F,null!=n&&(n=pr(n,t,Ir(r)(It(n,t)),e)),n},On.values=Du,On.valuesIn=function(n){return null==n?[]:I(n,Uu(n))},On.without=Uo,On.words=$u,On.wrap=function(n,t){return rf(Ir(t),n)},On.xor=Co,On.xorBy=Do,On.xorWith=Mo,On.zip=To,On.zipObject=function(n,t){return Or(n||[],t||[],at)},On.zipObjectDeep=function(n,t){return Or(n||[],t||[],pr);},On.zipWith=$o,On.entries=Bf,On.entriesIn=Lf,On.extend=xf,On.extendWith=jf,Zu(On,On),On.add=nc,On.attempt=Pf,On.camelCase=Uf,On.capitalize=Mu,On.ceil=tc,On.clamp=function(n,t,r){return r===F&&(r=t,t=F),r!==F&&(r=Iu(r),r=r===r?r:0),t!==F&&(t=Iu(t),t=t===t?t:0),gt(Iu(n),t,r)},On.clone=function(n){return dt(n,4)},On.cloneDeep=function(n){return dt(n,5)},On.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,5,t)},On.cloneWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,4,t)},On.conformsTo=function(n,t){return null==t||bt(n,t,Lu(t))},On.deburr=Tu,On.defaultTo=function(n,t){return null==n||n!==n?t:n},On.divide=rc,On.endsWith=function(n,t,r){n=zu(n),t=jr(t);var e=n.length,e=r=r===F?e:gt(Ou(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},On.eq=hu,On.escape=function(n){return(n=zu(n))&&Y.test(n)?n.replace(H,et):n},On.escapeRegExp=function(n){return(n=zu(n))&&fn.test(n)?n.replace(on,"\\$&"):n},On.every=function(n,t,r){var e=af(n)?o:wt;return r&&ze(n,t,r)&&(t=F),e(n,je(t,3));},On.find=Po,On.findIndex=Ze,On.findKey=function(n,t){return v(n,je(t,3),Et)},On.findLast=Zo,On.findLastIndex=qe,On.findLastKey=function(n,t){return v(n,je(t,3),Ot)},On.floor=ec,On.forEach=ru,On.forEachRight=eu,On.forIn=function(n,t){return null==n?n:co(n,je(t,3),Uu)},On.forInRight=function(n,t){return null==n?n:ao(n,je(t,3),Uu)},On.forOwn=function(n,t){return n&&Et(n,je(t,3))},On.forOwnRight=function(n,t){return n&&Ot(n,je(t,3))},On.get=Wu,On.gt=of,On.gte=ff,On.has=function(n,t){return null!=n&&ke(n,t,Bt);},On.hasIn=Bu,On.head=Ke,On.identity=Nu,On.includes=function(n,t,r,e){return n=pu(n)?n:Du(n),r=r&&!e?Ou(r):0,e=n.length,0>r&&(r=Di(e+r,0)),mu(n)?r<=e&&-1r&&(r=Di(e+r,0)),d(n,t,r)):-1},On.inRange=function(n,t,r){return t=Eu(t),r===F?(r=t,t=0):r=Eu(r),n=Iu(n),n>=Mi(t,r)&&n=n},On.isSet=vf,On.isString=mu,On.isSymbol=Au,On.isTypedArray=gf,On.isUndefined=function(n){return n===F},On.isWeakMap=function(n){return xu(n)&&"[object WeakMap]"==yo(n)},On.isWeakSet=function(n){return xu(n)&&"[object WeakSet]"==zt(n)},On.join=function(n,t){return null==n?"":Ui.call(n,t)},On.kebabCase=Cf,On.last=Ge,On.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==F&&(u=Ou(r),u=0>u?Di(e+u,0):Mi(u,e-1)),t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=g(n,b,u,true);return n},On.lowerCase=Df,On.lowerFirst=Mf,On.lt=df,On.lte=yf,On.max=function(n){return n&&n.length?mt(n,Nu,Wt):F},On.maxBy=function(n,t){return n&&n.length?mt(n,je(t,2),Wt):F},On.mean=function(n){return x(n,Nu)},On.meanBy=function(n,t){return x(n,je(t,2))},On.min=function(n){return n&&n.length?mt(n,Nu,Jt):F},On.minBy=function(n,t){return n&&n.length?mt(n,je(t,2),Jt):F},On.stubArray=Ku,On.stubFalse=Gu,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return true},On.multiply=uc,On.nth=function(n,t){return n&&n.length?tr(n,Ou(t)):F},On.noConflict=function(){return Zn._===this&&(Zn._=pi),this},On.noop=qu,On.now=Jo,On.pad=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return!t||e>=t?n:(t=(t-e)/2,ee(zi(t),r)+n+ee(Ri(t),r))},On.padEnd=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return t&&et){var e=n;n=t,t=e}return r||n%1||t%1?(r=Fi(),Mi(n+r*(t-n+$n("1e-"+((r+"").length-1))),t)):cr(n,t);},On.reduce=function(n,t,r){var e=af(n)?h:m,u=3>arguments.length;return e(n,je(t,4),r,u,oo)},On.reduceRight=function(n,t,r){var e=af(n)?p:m,u=3>arguments.length;return e(n,je(t,4),r,u,fo)},On.repeat=function(n,t,r){return t=(r?ze(n,t,r):t===F)?1:Ou(t),ar(zu(n),t)},On.replace=function(){var n=arguments,t=zu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},On.result=function(n,t,r){t=Rr(t,n);var e=-1,u=t.length;for(u||(u=1,n=F);++en||9007199254740991=i)return n;if(i=r-T(e),1>i)return e;if(r=o?zr(o,0,i).join(""):n.slice(0,i),u===F)return r+e;if(o&&(i+=r.length-i),_f(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=ti(u.source,zu(dn.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===F?i:c)}}else n.indexOf(jr(u),i)!=i&&(u=r.lastIndexOf(u),-1e.__dir__?"Right":"")}),e},Mn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;Mn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:je(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");Mn.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Mn.prototype[n]=function(){return this.__filtered__?new Mn(this):this[r](1);}}),Mn.prototype.compact=function(){return this.filter(Nu)},Mn.prototype.find=function(n){return this.filter(n).head()},Mn.prototype.findLast=function(n){return this.reverse().find(n)},Mn.prototype.invokeMap=lr(function(n,t){return typeof n=="function"?new Mn(this):this.map(function(r){return Dt(r,n,t)})}),Mn.prototype.reject=function(n){return this.filter(su(je(n)))},Mn.prototype.slice=function(n,t){n=Ou(n);var r=this;return r.__filtered__&&(0t)?new Mn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==F&&(t=Ou(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Mn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Mn.prototype.toArray=function(){return this.take(4294967295)},Et(Mn.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=On[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(On.prototype[t]=function(){function t(n){return n=u.apply(On,s([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Mn,a=f[0],l=c||af(o);l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=i&&!h,c=c&&!p;return!i&&l?(o=c?o:new Mn(this),o=n.apply(o,f),o.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(o,h)):a&&c?n.apply(this,f):(o=this.thru(t),a?e?o.value()[0]:o.value():o)})}),u("pop push shift sort splice unshift".split(" "),function(n){var t=ui[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);On.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(af(u)?u:[],n)}return this[r](function(r){return t.apply(af(r)?r:[],n)})}}),Et(Mn.prototype,function(n,t){var r=On[t];if(r){var e=r.name+"";(Ji[e]||(Ji[e]=[])).push({name:t,func:r})}}),Ji[Xr(F,2).name]=[{name:"wrapper",func:F}],Mn.prototype.clone=function(){var n=new Mn(this.__wrapped__);return n.__actions__=Mr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Mr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Mr(this.__views__),n},Mn.prototype.reverse=function(){if(this.__filtered__){var n=new Mn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Mn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=af(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c=this.__values__.length;return{done:n,value:n?F:this.__values__[this.__index__++]}},On.prototype.plant=function(n){for(var t,r=this;r instanceof Sn;){var e=Pe(r);e.__index__=0,e.__values__=F,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},On.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Mn?(this.__actions__.length&&(n=new Mn(this)),n=n.reverse(),n.__actions__.push({func:nu,args:[Je],thisArg:F}),new zn(n,this.__chain__)):this.thru(Je);},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return kr(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,Ai&&(On.prototype[Ai]=tu),On}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zn._=it,define(function(){return it})):Vn?((Vn.exports=it)._=it,qn._=it):Zn._=it}).call(this);(function(factory){if(typeof define==='function'&&define.amd){define(['jquery','lodash'],factory);}
else if(typeof exports!=='undefined'){try{jQuery=require('jquery');}
catch(e){}
try{_=require('lodash');}
catch(e){}
factory(jQuery,_);}
else{factory(jQuery,_);}})(function($,_){var scope=window;var obsolete=function(f,oldName,newName){var wrapper=function(){console.warn('gridstack.js: Function `'+oldName+'` is deprecated as of v0.2.5 and has been replaced '+'with `'+newName+'`. It will be **completely** removed in v1.0.');return f.apply(this,arguments);};wrapper.prototype=f.prototype;return wrapper;};var obsoleteOpts=function(oldName,newName){console.warn('gridstack.js: Option `'+oldName+'` is deprecated as of v0.2.5 and has been replaced with `'+
newName+'`. It will be **completely** removed in v1.0.');};var Utils={isIntercepted:function(a,b){return!(a.x+a.width<=b.x||b.x+b.width<=a.x||a.y+a.height<=b.y||b.y+b.height<=a.y);},sort:function(nodes,dir,width){width=width||_.chain(nodes).map(function(node){return node.x+node.width;}).max().value();dir=dir!=-1?1:-1;return _.sortBy(nodes,function(n){return dir*(n.x+n.y*width);});},createStylesheet:function(id){var style=document.createElement('style');style.setAttribute('type','text/css');style.setAttribute('data-gs-style-id',id);if(style.styleSheet){style.styleSheet.cssText='';}
else{style.appendChild(document.createTextNode(''));}
document.getElementsByTagName('head')[0].appendChild(style);return style.sheet;},removeStylesheet:function(id){$('STYLE[data-gs-style-id='+id+']').remove();},insertCSSRule:function(sheet,selector,rules,index){if(typeof sheet.insertRule==='function'){sheet.insertRule(selector+'{'+rules+'}',index);}
else if(typeof sheet.addRule==='function'){sheet.addRule(selector,rules,index);}},toBool:function(v){if(typeof v=='boolean'){return v;}
if(typeof v=='string'){v=v.toLowerCase();return!(v===''||v=='no'||v=='false'||v=='0');}
return Boolean(v);},_collisionNodeCheck:function(n){return n!=this.node&&Utils.isIntercepted(n,this.nn);},_didCollide:function(bn){return Utils.isIntercepted({x:this.n.x,y:this.newY,width:this.n.width,height:this.n.height,},bn);},_isAddNodeIntercepted:function(n){return Utils.isIntercepted({x:this.x,y:this.y,width:this.node.width,height:this.node.height,},n);},parseHeight:function(val){var height=val;var heightUnit='px';if(height&&_.isString(height)){var match=height.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw)?$/);if(!match){throw new Error('Invalid height');}
heightUnit=match[2]||'px';height=parseFloat(match[1]);}
return{height:height,unit:heightUnit,};},};Utils.is_intercepted=obsolete(Utils.isIntercepted,'is_intercepted','isIntercepted');Utils.create_stylesheet=obsolete(Utils.createStylesheet,'create_stylesheet','createStylesheet');Utils.remove_stylesheet=obsolete(Utils.removeStylesheet,'remove_stylesheet','removeStylesheet');Utils.insert_css_rule=obsolete(Utils.insertCSSRule,'insert_css_rule','insertCSSRule');function GridStackDragDropPlugin(grid){this.grid=grid;}
GridStackDragDropPlugin.registeredPlugins=[];GridStackDragDropPlugin.registerPlugin=function(pluginClass){GridStackDragDropPlugin.registeredPlugins.push(pluginClass);};GridStackDragDropPlugin.prototype.resizable=function(el,opts){return this;};GridStackDragDropPlugin.prototype.draggable=function(el,opts){return this;};GridStackDragDropPlugin.prototype.droppable=function(el,opts){return this;};GridStackDragDropPlugin.prototype.isDroppable=function(el){return false;};GridStackDragDropPlugin.prototype.on=function(el,eventName,callback){return this;};var idSeq=0;var GridStackEngine=function(width,onchange,floatMode,height,items){this.width=width;this.float=floatMode||false;this.height=height||0;this.nodes=items||[];this.onchange=onchange||function(){};this._updateCounter=0;this._float=this.float;this._addedNodes=[];this._removedNodes=[];};GridStackEngine.prototype.batchUpdate=function(){this._updateCounter=1;this.float=true;};GridStackEngine.prototype.commit=function(){if(this._updateCounter!==0){this._updateCounter=0;this.float=this._float;this._packNodes();this._notify();}};GridStackEngine.prototype.getNodeDataByDOMEl=function(el){return _.find(this.nodes,function(n){return el.get(0)===n.el.get(0);});};GridStackEngine.prototype._fixCollisions=function(node){var self=this;this._sortNodes(-1);var nn=node;var hasLocked=Boolean(_.find(this.nodes,function(n){return n.locked;}));if(!this.float&&!hasLocked){nn={x:0,y:node.y,width:this.width,height:node.height,};}
while(true){var collisionNode=_.find(this.nodes,_.bind(Utils._collisionNodeCheck,{node:node,nn:nn,}));if(typeof collisionNode=='undefined'){return;}
this.moveNode(collisionNode,collisionNode.x,node.y+node.height,collisionNode.width,collisionNode.height,true);}};GridStackEngine.prototype.isAreaEmpty=function(x,y,width,height){var nn={x:x||0,y:y||0,width:width||1,height:height||1,};var collisionNode=_.find(this.nodes,_.bind(function(n){return Utils.isIntercepted(n,nn);},this));return collisionNode===null||typeof collisionNode==='undefined';};GridStackEngine.prototype._sortNodes=function(dir){this.nodes=Utils.sort(this.nodes,dir,this.width);};GridStackEngine.prototype._packNodes=function(){this._sortNodes();if(this.float){_.each(this.nodes,_.bind(function(n,i){if(n._updating||typeof n._origY=='undefined'||n.y==n._origY){return;}
var newY=n.y;while(newY>=n._origY){var collisionNode=_.chain(this.nodes).find(_.bind(Utils._didCollide,{n:n,newY:newY,})).value();if(!collisionNode){n._dirty=true;n.y=newY;}
--newY;}},this));}
else{_.each(this.nodes,_.bind(function(n,i){if(n.locked){return;}
while(n.y>0){var newY=n.y-1;var canBeMoved=i===0;if(i>0){var collisionNode=_.chain(this.nodes).take(i).find(_.bind(Utils._didCollide,{n:n,newY:newY,})).value();canBeMoved=typeof collisionNode=='undefined';}
if(!canBeMoved){break;}
n._dirty=n.y!=newY;n.y=newY;}},this));}};GridStackEngine.prototype._prepareNode=function(node,resizing){node=_.defaults(node||{},{width:1,height:1,x:0,y:0,});node.x=parseInt(''+node.x);node.y=parseInt(''+node.y);node.width=parseInt(''+node.width);node.height=parseInt(''+node.height);node.autoPosition=node.autoPosition||false;node.noResize=node.noResize||false;node.noMove=node.noMove||false;if(node.width>this.width){node.width=this.width;}
else if(node.width<1){node.width=1;}
if(node.height<1){node.height=1;}
if(node.x<0){node.x=0;}
if(node.x+node.width>this.width){if(resizing){node.width=this.width-node.x;}
else{node.x=this.width-node.width;}}
if(node.y<0){node.y=0;}
return node;};GridStackEngine.prototype._notify=function(){var args=Array.prototype.slice.call(arguments,0);args[0]=typeof args[0]==='undefined'?[]:[args[0]];args[1]=typeof args[1]==='undefined'?true:args[1];if(this._updateCounter){return;}
var deletedNodes=args[0].concat(this.getDirtyNodes());this.onchange(deletedNodes,args[1]);};GridStackEngine.prototype.cleanNodes=function(){if(this._updateCounter){return;}
_.each(this.nodes,function(n){n._dirty=false;});};GridStackEngine.prototype.getDirtyNodes=function(){return _.filter(this.nodes,function(n){return n._dirty;});};GridStackEngine.prototype.addNode=function(node,triggerAddEvent){node=this._prepareNode(node);if(typeof node.maxWidth!='undefined'){node.width=Math.min(node.width,node.maxWidth);}
if(typeof node.maxHeight!='undefined'){node.height=Math.min(node.height,node.maxHeight);}
if(typeof node.minWidth!='undefined'){node.width=Math.max(node.width,node.minWidth);}
if(typeof node.minHeight!='undefined'){node.height=Math.max(node.height,node.minHeight);}
node._id=++idSeq;node._dirty=true;if(node.autoPosition){this._sortNodes();for(var i=0;;++i){var x=i%this.width;var y=Math.floor(i/this.width);if(x+node.width>this.width){continue;}
if(!_.find(this.nodes,_.bind(Utils._isAddNodeIntercepted,{x:x,y:y,node:node,}))){node.x=x;node.y=y;break;}}}
this.nodes.push(node);if(typeof triggerAddEvent!='undefined'&&triggerAddEvent){this._addedNodes.push(_.clone(node));}
this._fixCollisions(node);this._packNodes();this._notify();return node;};GridStackEngine.prototype.removeNode=function(node,detachNode){detachNode=typeof detachNode==='undefined'?true:detachNode;this._removedNodes.push(_.clone(node));node._id=null;this.nodes=_.without(this.nodes,node);this._packNodes();this._notify(node,detachNode);};GridStackEngine.prototype.canMoveNode=function(node,x,y,width,height){if(!this.isNodeChangedPosition(node,x,y,width,height)){return false;}
var hasLocked=Boolean(_.find(this.nodes,function(n){return n.locked;}));if(!this.height&&!hasLocked){return true;}
var clonedNode;var clone=new GridStackEngine(this.width,null,this.float,0,_.map(this.nodes,function(n){if(n==node){clonedNode=$.extend({},n);return clonedNode;}
return $.extend({},n);}));if(typeof clonedNode==='undefined'){return true;}
clone.moveNode(clonedNode,x,y,width,height);var res=true;if(hasLocked){res&=!Boolean(_.find(clone.nodes,function(n){return n!=clonedNode&&Boolean(n.locked)&&Boolean(n._dirty);}));}
if(this.height){res&=clone.getGridHeight()<=this.height;}
return res;};GridStackEngine.prototype.canBePlacedWithRespectToHeight=function(node){if(!this.height){return true;}
var clone=new GridStackEngine(this.width,null,this.float,0,_.map(this.nodes,function(n){return $.extend({},n);}));clone.addNode(node);return clone.getGridHeight()<=this.height;};GridStackEngine.prototype.isNodeChangedPosition=function(node,x,y,width,height){if(typeof x!='number'){x=node.x;}
if(typeof y!='number'){y=node.y;}
if(typeof width!='number'){width=node.width;}
if(typeof height!='number'){height=node.height;}
if(typeof node.maxWidth!='undefined'){width=Math.min(width,node.maxWidth);}
if(typeof node.maxHeight!='undefined'){height=Math.min(height,node.maxHeight);}
if(typeof node.minWidth!='undefined'){width=Math.max(width,node.minWidth);}
if(typeof node.minHeight!='undefined'){height=Math.max(height,node.minHeight);}
if(node.x==x&&node.y==y&&node.width==width&&node.height==height){return false;}
return true;};GridStackEngine.prototype.moveNode=function(node,x,y,width,height,noPack){if(!this.isNodeChangedPosition(node,x,y,width,height)){return node;}
if(typeof x!='number'){x=node.x;}
if(typeof y!='number'){y=node.y;}
if(typeof width!='number'){width=node.width;}
if(typeof height!='number'){height=node.height;}
if(typeof node.maxWidth!='undefined'){width=Math.min(width,node.maxWidth);}
if(typeof node.maxHeight!='undefined'){height=Math.min(height,node.maxHeight);}
if(typeof node.minWidth!='undefined'){width=Math.max(width,node.minWidth);}
if(typeof node.minHeight!='undefined'){height=Math.max(height,node.minHeight);}
if(node.x==x&&node.y==y&&node.width==width&&node.height==height){return node;}
var resizing=node.width!=width;node._dirty=true;node.x=x;node.y=y;node.width=width;node.height=height;node.lastTriedX=x;node.lastTriedY=y;node.lastTriedWidth=width;node.lastTriedHeight=height;node=this._prepareNode(node,resizing);this._fixCollisions(node);if(!noPack){this._packNodes();this._notify();}
return node;};GridStackEngine.prototype.getGridHeight=function(){return _.reduce(this.nodes,function(memo,n){return Math.max(memo,n.y+n.height);},0);};GridStackEngine.prototype.getVisibleGridHeight=function(){return _.reduce(this.nodes.filter(function(elem){return $(elem.el).css('display')!=='none';}),function(memo,n){return Math.max(memo,n.y+n.height);},0);};GridStackEngine.prototype.beginUpdate=function(node){_.each(this.nodes,function(n){n._origY=n.y;});node._updating=true;};GridStackEngine.prototype.endUpdate=function(){_.each(this.nodes,function(n){n._origY=n.y;});var n=_.find(this.nodes,function(n){return n._updating;});if(n){n._updating=false;}};var GridStack=function(el,opts){var self=this;var oneColumnMode,isAutoCellHeight;opts=opts||{};this.container=$(el);if(typeof opts.handle_class!=='undefined'){opts.handleClass=opts.handle_class;obsoleteOpts('handle_class','handleClass');}
if(typeof opts.item_class!=='undefined'){opts.itemClass=opts.item_class;obsoleteOpts('item_class','itemClass');}
if(typeof opts.placeholder_class!=='undefined'){opts.placeholderClass=opts.placeholder_class;obsoleteOpts('placeholder_class','placeholderClass');}
if(typeof opts.placeholder_text!=='undefined'){opts.placeholderText=opts.placeholder_text;obsoleteOpts('placeholder_text','placeholderText');}
if(typeof opts.cell_height!=='undefined'){opts.cellHeight=opts.cell_height;obsoleteOpts('cell_height','cellHeight');}
if(typeof opts.vertical_margin!=='undefined'){opts.verticalMargin=opts.vertical_margin;obsoleteOpts('vertical_margin','verticalMargin');}
if(typeof opts.min_width!=='undefined'){opts.minWidth=opts.min_width;obsoleteOpts('min_width','minWidth');}
if(typeof opts.static_grid!=='undefined'){opts.staticGrid=opts.static_grid;obsoleteOpts('static_grid','staticGrid');}
if(typeof opts.is_nested!=='undefined'){opts.isNested=opts.is_nested;obsoleteOpts('is_nested','isNested');}
if(typeof opts.always_show_resize_handle!=='undefined'){opts.alwaysShowResizeHandle=opts.always_show_resize_handle;obsoleteOpts('always_show_resize_handle','alwaysShowResizeHandle');}
opts.itemClass=opts.itemClass||'grid-stack-item';var isNested=this.container.closest('.'+opts.itemClass).length>0;this.opts=_.defaults(opts||{},{width:parseInt(this.container.attr('data-gs-width'))||12,height:parseInt(this.container.attr('data-gs-height'))||0,itemClass:'grid-stack-item',placeholderClass:'grid-stack-placeholder',placeholderText:'',handle:'.grid-stack-item-content',handleClass:null,cellHeight:60,verticalMargin:20,auto:true,minWidth:768,float:false,staticGrid:false,_class:'grid-stack-instance-'+(Math.random()*10000).toFixed(0),animate:Boolean(this.container.attr('data-gs-animate'))||false,alwaysShowResizeHandle:opts.alwaysShowResizeHandle||false,resizable:_.defaults(opts.resizable||{},{autoHide:!(opts.alwaysShowResizeHandle||false),handles:'se',}),draggable:_.defaults(opts.draggable||{},{handle:(opts.handleClass?'.'+opts.handleClass:(opts.handle?opts.handle:''))||'.grid-stack-item-content',scroll:false,appendTo:'body',}),disableDrag:opts.disableDrag||false,disableResize:opts.disableResize||false,rtl:'auto',removable:false,removeTimeout:2000,verticalMarginUnit:'px',cellHeightUnit:'px',disableOneColumnMode:opts.disableOneColumnMode||false,oneColumnModeClass:opts.oneColumnModeClass||'grid-stack-one-column-mode',ddPlugin:null,});if(this.opts.ddPlugin===false){this.opts.ddPlugin=GridStackDragDropPlugin;}
else if(this.opts.ddPlugin===null){this.opts.ddPlugin=_.first(GridStackDragDropPlugin.registeredPlugins)||GridStackDragDropPlugin;}
this.dd=new this.opts.ddPlugin(this);if(this.opts.rtl==='auto'){this.opts.rtl=this.container.css('direction')==='rtl';}
if(this.opts.rtl){this.container.addClass('grid-stack-rtl');}
this.opts.isNested=isNested;isAutoCellHeight=this.opts.cellHeight==='auto';if(isAutoCellHeight){self.cellHeight(self.cellWidth(),true);}
else{this.cellHeight(this.opts.cellHeight,true);}
this.verticalMargin(this.opts.verticalMargin,true);this.container.addClass(this.opts._class);this._setStaticClass();if(isNested){this.container.addClass('grid-stack-nested');}
this._initStyles();this.grid=new GridStackEngine(this.opts.width,function(nodes,detachNode){detachNode=typeof detachNode==='undefined'?true:detachNode;var maxHeight=0;_.each(nodes,function(n){if(detachNode&&n._id===null){if(n.el){n.el.remove();}}
else{n.el.attr('data-gs-x',n.x).attr('data-gs-y',n.y).attr('data-gs-width',n.width).attr('data-gs-height',n.height);maxHeight=Math.max(maxHeight,n.y+n.height);}});self._updateStyles(maxHeight+10);},this.opts.float,this.opts.height);if(this.opts.auto){var elements=[];var _this=this;this.container.children('.'+this.opts.itemClass+':not(.'+this.opts.placeholderClass+')').each(function(index,el){el=$(el);elements.push({el:el,i:parseInt(el.attr('data-gs-x'))+parseInt(el.attr('data-gs-y'))*_this.opts.width,});});_.chain(elements).sortBy(function(x){return x.i;}).each(function(i){self._prepareElement(i.el);}).value();}
this.setAnimation(this.opts.animate);this.placeholder=$(''+'
'+this.opts.placeholderText+'
').hide();this._updateContainerHeight();this._updateHeightsOnResize=_.throttle(function(){self.cellHeight(self.cellWidth(),false);},100);this.onResizeHandler=function(){if(isAutoCellHeight){self._updateHeightsOnResize();}
if(self._isOneColumnMode()&&!self.opts.disableOneColumnMode){if(oneColumnMode){return;}
self.container.addClass(self.opts.oneColumnModeClass);oneColumnMode=true;self.grid._sortNodes();_.each(self.grid.nodes,function(node){self.container.append(node.el);if(self.opts.staticGrid){return;}
self.dd.draggable(node.el,'disable');self.dd.resizable(node.el,'disable');node.el.trigger('resize');});}
else{if(!oneColumnMode){return;}
self.container.removeClass(self.opts.oneColumnModeClass);oneColumnMode=false;if(self.opts.staticGrid){return;}
_.each(self.grid.nodes,function(node){if(!node.noMove&&!self.opts.disableDrag){self.dd.draggable(node.el,'enable');}
if(!node.noResize&&!self.opts.disableResize){self.dd.resizable(node.el,'enable');}
node.el.trigger('resize');});}};$(window).resize(this.onResizeHandler);this.onResizeHandler();if(!self.opts.staticGrid&&typeof self.opts.removable==='string'){var trashZone=$(self.opts.removable);if(!this.dd.isDroppable(trashZone)){this.dd.droppable(trashZone,{accept:'.'+self.opts.itemClass,});}
this.dd.on(trashZone,'dropover',function(event,ui){var el=$(ui.draggable);var node=el.data('_gridstack_node');if(node._grid!==self){return;}
self._setupRemovingTimeout(el);}).on(trashZone,'dropout',function(event,ui){var el=$(ui.draggable);var node=el.data('_gridstack_node');if(node._grid!==self){return;}
self._clearRemovingTimeout(el);});}
if(!self.opts.staticGrid&&self.opts.acceptWidgets){var draggingElement=null;var onDrag=function(event,ui){var el=draggingElement;var node=el.data('_gridstack_node');var pos=self.getCellFromPixel(ui.offset,true);var x=Math.max(0,pos.x);var y=Math.max(0,pos.y);if(!node._added){node._added=true;node.el=el;node.x=x;node.y=y;self.grid.cleanNodes();self.grid.beginUpdate(node);self.grid.addNode(node);self.container.append(self.placeholder);self.placeholder.attr('data-gs-x',node.x).attr('data-gs-y',node.y).attr('data-gs-width',node.width).attr('data-gs-height',node.height).show();node.el=self.placeholder;node._beforeDragX=node.x;node._beforeDragY=node.y;self._updateContainerHeight();}
else{if(!self.grid.canMoveNode(node,x,y)){return;}
self.grid.moveNode(node,x,y);self._updateContainerHeight();}};this.dd.droppable(self.container,{accept:function(el){el=$(el);var node=el.data('_gridstack_node');if(node&&node._grid===self){return false;}
return el.is(self.opts.acceptWidgets===true?'.grid-stack-item':self.opts.acceptWidgets);},}).on(self.container,'dropover',function(event,ui){var offset=self.container.offset();var el=$(ui.draggable);var cellWidth=self.cellWidth();var cellHeight=self.cellHeight();var origNode=el.data('_gridstack_node');var width=origNode?origNode.width:(Math.ceil(el.outerWidth()/cellWidth));var height=origNode?origNode.height:(Math.ceil(el.outerHeight()/cellHeight));draggingElement=el;var node=self.grid._prepareNode({width:width,height:height,_added:false,_temporary:true,});el.data('_gridstack_node',node);el.data('_gridstack_node_orig',origNode);el.on('drag',onDrag);}).on(self.container,'dropout',function(event,ui){var el=$(ui.draggable);el.unbind('drag',onDrag);var node=el.data('_gridstack_node');node.el=null;self.grid.removeNode(node);self.placeholder.detach();self._updateContainerHeight();el.data('_gridstack_node',el.data('_gridstack_node_orig'));}).on(self.container,'drop',function(event,ui){self.placeholder.detach();var node=$(ui.draggable).data('_gridstack_node');node._grid=self;var el=$(ui.draggable).clone(false);el.data('_gridstack_node',node);var originalNode=$(ui.draggable).data('_gridstack_node_orig');if(typeof originalNode!=='undefined'){originalNode._grid._triggerRemoveEvent();}
$(ui.draggable).remove();node.el=el;self.placeholder.hide();el.attr('data-gs-x',node.x).attr('data-gs-y',node.y).attr('data-gs-width',node.width).attr('data-gs-height',node.height).addClass(self.opts.itemClass).removeAttr('style').enableSelection().removeData('draggable').removeClass('ui-draggable ui-draggable-dragging ui-draggable-disabled').unbind('drag',onDrag);self.container.append(el);self._prepareElementsByNode(el,node);self._updateContainerHeight();self.grid._addedNodes.push(node);self._triggerAddEvent();self._triggerChangeEvent();self.grid.endUpdate();});}};GridStack.prototype._triggerChangeEvent=function(forceTrigger){var elements=this.grid.getDirtyNodes();var hasChanges=false;var eventParams=[];if(elements&&elements.length){eventParams.push(elements);hasChanges=true;}
if(hasChanges||forceTrigger===true){this.container.trigger('change',eventParams);}};GridStack.prototype._triggerAddEvent=function(){if(this.grid._addedNodes&&this.grid._addedNodes.length>0){this.container.trigger('added',[_.map(this.grid._addedNodes,_.clone)]);this.grid._addedNodes=[];}};GridStack.prototype._triggerRemoveEvent=function(){if(this.grid._removedNodes&&this.grid._removedNodes.length>0){this.container.trigger('removed',[_.map(this.grid._removedNodes,_.clone)]);this.grid._removedNodes=[];}};GridStack.prototype._initStyles=function(){if(this._stylesId){Utils.removeStylesheet(this._stylesId);}
this._stylesId='gridstack-style-'+(Math.random()*100000).toFixed();this._styles=Utils.createStylesheet(this._stylesId);if(this._styles!==null){this._styles._max=0;}};GridStack.prototype._updateStyles=function(maxHeight){if(this._styles===null||typeof this._styles==='undefined'){return;}
var prefix='.'+this.opts._class+' .'+this.opts.itemClass;var self=this;var getHeight;if(typeof maxHeight=='undefined'){maxHeight=this._styles._max;}
this._initStyles();this._updateContainerHeight();if(!this.opts.cellHeight){return;}
if(this._styles._max!==0&&maxHeight<=this._styles._max){return;}
if(!this.opts.verticalMargin||this.opts.cellHeightUnit===this.opts.verticalMarginUnit){getHeight=function(nbRows,nbMargins){return(self.opts.cellHeight*nbRows+self.opts.verticalMargin*nbMargins)+
self.opts.cellHeightUnit;};}
else{getHeight=function(nbRows,nbMargins){if(!nbRows||!nbMargins){return(self.opts.cellHeight*nbRows+self.opts.verticalMargin*nbMargins)+
self.opts.cellHeightUnit;}
return'calc('+((self.opts.cellHeight*nbRows)+self.opts.cellHeightUnit)+' + '+
((self.opts.verticalMargin*nbMargins)+self.opts.verticalMarginUnit)+')';};}
if(this._styles._max===0){Utils.insertCSSRule(this._styles,prefix,'min-height: '+getHeight(1,0)+';',0);}
if(maxHeight>this._styles._max){for(var i=this._styles._max;i=self.grid.width||y<0||(!self.grid.float&&y>self.grid.getGridHeight())){if(!node._temporaryRemoved){if(self.opts.removable===true){self._setupRemovingTimeout(el);}
x=node._beforeDragX;y=node._beforeDragY;self.placeholder.detach();self.placeholder.hide();self.grid.removeNode(node);self._updateContainerHeight();node._temporaryRemoved=true;}}
else{self._clearRemovingTimeout(el);if(node._temporaryRemoved){self.grid.addNode(node);self.placeholder.attr('data-gs-x',x).attr('data-gs-y',y).attr('data-gs-width',width).attr('data-gs-height',height).show();self.container.append(self.placeholder);node.el=self.placeholder;node._temporaryRemoved=false;}}}
else if(event.type=='resize'){if(x<0){return;}}
var lastTriedWidth=typeof width!=='undefined'?width:node.lastTriedWidth;var lastTriedHeight=typeof height!=='undefined'?height:node.lastTriedHeight;if(!self.grid.canMoveNode(node,x,y,width,height)||(node.lastTriedX===x&&node.lastTriedY===y&&node.lastTriedWidth===lastTriedWidth&&node.lastTriedHeight===lastTriedHeight)){return;}
node.lastTriedX=x;node.lastTriedY=y;node.lastTriedWidth=width;node.lastTriedHeight=height;self.grid.moveNode(node,x,y,width,height);self._updateContainerHeight();};var onStartMoving=function(event,ui){self.container.append(self.placeholder);var o=$(this);self.grid.cleanNodes();self.grid.beginUpdate(node);cellWidth=self.cellWidth();var strictCellHeight=Math.ceil(o.outerHeight()/o.attr('data-gs-height'));cellHeight=self.container.height()/parseInt(self.container.attr('data-gs-current-height'));self.placeholder.attr('data-gs-x',o.attr('data-gs-x')).attr('data-gs-y',o.attr('data-gs-y')).attr('data-gs-width',o.attr('data-gs-width')).attr('data-gs-height',o.attr('data-gs-height')).show();node.el=self.placeholder;node._beforeDragX=node.x;node._beforeDragY=node.y;self.dd.resizable(el,'option','minWidth',cellWidth*(node.minWidth||1));self.dd.resizable(el,'option','minHeight',strictCellHeight*(node.minHeight||1));if(event.type=='resizestart'){o.find('.grid-stack-item').trigger('resizestart');}};var onEndMoving=function(event,ui){var o=$(this);if(!o.data('_gridstack_node')){return;}
var forceNotify=false;self.placeholder.detach();node.el=o;self.placeholder.hide();if(node._isAboutToRemove){forceNotify=true;var gridToNotify=el.data('_gridstack_node')._grid;gridToNotify._triggerRemoveEvent();el.removeData('_gridstack_node');el.remove();}
else{self._clearRemovingTimeout(el);if(!node._temporaryRemoved){o.attr('data-gs-x',node.x).attr('data-gs-y',node.y).attr('data-gs-width',node.width).attr('data-gs-height',node.height).removeAttr('style');}
else{o.attr('data-gs-x',node._beforeDragX).attr('data-gs-y',node._beforeDragY).attr('data-gs-width',node.width).attr('data-gs-height',node.height).removeAttr('style');node.x=node._beforeDragX;node.y=node._beforeDragY;self.grid.addNode(node);}}
self._updateContainerHeight();self._triggerChangeEvent(forceNotify);self.grid.endUpdate();var nestedGrids=o.find('.grid-stack');if(nestedGrids.length&&event.type=='resizestop'){nestedGrids.each(function(index,el){$(el).data('gridstack').onResizeHandler();});o.find('.grid-stack-item').trigger('resizestop');o.find('.grid-stack-item').trigger('gsresizestop');}
if(event.type=='resizestop'){self.container.trigger('gsresizestop',o);}};this.dd.draggable(el,{start:onStartMoving,stop:onEndMoving,drag:dragOrResize,}).resizable(el,{start:onStartMoving,stop:onEndMoving,resize:dragOrResize,});if(node.noMove||(this._isOneColumnMode()&&!self.opts.disableOneColumnMode)||this.opts.disableDrag){this.dd.draggable(el,'disable');}
if(node.noResize||(this._isOneColumnMode()&&!self.opts.disableOneColumnMode)||this.opts.disableResize){this.dd.resizable(el,'disable');}
el.attr('data-gs-locked',node.locked?'yes':null);};GridStack.prototype._prepareElement=function(el,triggerAddEvent){triggerAddEvent=typeof triggerAddEvent!='undefined'?triggerAddEvent:false;var self=this;el=$(el);el.addClass(this.opts.itemClass);var node=self.grid.addNode({x:el.attr('data-gs-x'),y:el.attr('data-gs-y'),width:el.attr('data-gs-width'),height:el.attr('data-gs-height'),maxWidth:el.attr('data-gs-max-width'),minWidth:el.attr('data-gs-min-width'),maxHeight:el.attr('data-gs-max-height'),minHeight:el.attr('data-gs-min-height'),autoPosition:Utils.toBool(el.attr('data-gs-auto-position')),noResize:Utils.toBool(el.attr('data-gs-no-resize')),noMove:Utils.toBool(el.attr('data-gs-no-move')),locked:Utils.toBool(el.attr('data-gs-locked')),el:el,id:el.attr('data-gs-id'),_grid:self,},triggerAddEvent);el.data('_gridstack_node',node);this._prepareElementsByNode(el,node);};GridStack.prototype.setAnimation=function(enable){if(enable){this.container.addClass('grid-stack-animate');}
else{this.container.removeClass('grid-stack-animate');}};GridStack.prototype.addWidget=function(el,x,y,width,height,autoPosition,minWidth,maxWidth,minHeight,maxHeight,id){el=$(el);if(typeof x!='undefined'){el.attr('data-gs-x',x);}
if(typeof y!='undefined'){el.attr('data-gs-y',y);}
if(typeof width!='undefined'){el.attr('data-gs-width',width);}
if(typeof height!='undefined'){el.attr('data-gs-height',height);}
if(typeof autoPosition!='undefined'){el.attr('data-gs-auto-position',autoPosition?'yes':null);}
if(typeof minWidth!='undefined'){el.attr('data-gs-min-width',minWidth);}
if(typeof maxWidth!='undefined'){el.attr('data-gs-max-width',maxWidth);}
if(typeof minHeight!='undefined'){el.attr('data-gs-min-height',minHeight);}
if(typeof maxHeight!='undefined'){el.attr('data-gs-max-height',maxHeight);}
if(typeof id!='undefined'){el.attr('data-gs-id',id);}
this.container.append(el);this._prepareElement(el,true);this._triggerAddEvent();this._updateContainerHeight();this._triggerChangeEvent(true);return el;};GridStack.prototype.makeWidget=function(el){el=$(el);this._prepareElement(el,true);this._triggerAddEvent();this._updateContainerHeight();this._triggerChangeEvent(true);return el;};GridStack.prototype.willItFit=function(x,y,width,height,autoPosition){var node={x:x,y:y,width:width,height:height,autoPosition:autoPosition,};return this.grid.canBePlacedWithRespectToHeight(node);};GridStack.prototype.removeWidget=function(el,detachNode){detachNode=typeof detachNode==='undefined'?true:detachNode;el=$(el);var node=el.data('_gridstack_node');if(!node){node=this.grid.getNodeDataByDOMEl(el);}
this.grid.removeNode(node,detachNode);el.removeData('_gridstack_node');this._updateContainerHeight();if(detachNode){el.remove();}
this._triggerChangeEvent(true);this._triggerRemoveEvent();};GridStack.prototype.removeAll=function(detachNode){_.each(this.grid.nodes,_.bind(function(node){this.removeWidget(node.el,detachNode);},this));this.grid.nodes=[];this._updateContainerHeight();};GridStack.prototype.destroy=function(detachGrid){$(window).off('resize',this.onResizeHandler);this.disable();if(typeof detachGrid!='undefined'&&!detachGrid){this.removeAll(false);this.container.removeData('gridstack');}
else{this.container.remove();}
Utils.removeStylesheet(this._stylesId);if(this.grid){this.grid=null;}};GridStack.prototype.resizable=function(el,val){var self=this;el=$(el);el.each(function(index,el){el=$(el);var node=el.data('_gridstack_node');if(typeof node=='undefined'||node===null){return;}
node.noResize=!(val||false);if(node.noResize||(self._isOneColumnMode()&&!self.opts.disableOneColumnMode)){self.dd.resizable(el,'disable');}
else{self.dd.resizable(el,'enable');}});return this;};GridStack.prototype.movable=function(el,val){var self=this;el=$(el);el.each(function(index,el){el=$(el);var node=el.data('_gridstack_node');if(typeof node=='undefined'||node===null){return;}
node.noMove=!(val||false);if(node.noMove||(self._isOneColumnMode()&&!self.opts.disableOneColumnMode)){self.dd.draggable(el,'disable');el.removeClass('ui-draggable-handle');}
else{self.dd.draggable(el,'enable');el.addClass('ui-draggable-handle');}});return this;};GridStack.prototype.enableMove=function(doEnable,includeNewWidgets){this.movable(this.container.children('.'+this.opts.itemClass),doEnable);if(includeNewWidgets){this.opts.disableDrag=!doEnable;}};GridStack.prototype.enableResize=function(doEnable,includeNewWidgets){this.resizable(this.container.children('.'+this.opts.itemClass),doEnable);if(includeNewWidgets){this.opts.disableResize=!doEnable;}};GridStack.prototype.disable=function(){this.movable(this.container.children('.'+this.opts.itemClass),false);this.resizable(this.container.children('.'+this.opts.itemClass),false);this.container.trigger('disable');};GridStack.prototype.enable=function(){this.movable(this.container.children('.'+this.opts.itemClass),true);this.resizable(this.container.children('.'+this.opts.itemClass),true);this.container.trigger('enable');};GridStack.prototype.locked=function(el,val){el=$(el);el.each(function(index,el){el=$(el);var node=el.data('_gridstack_node');if(typeof node=='undefined'||node===null){return;}
node.locked=(val||false);el.attr('data-gs-locked',node.locked?'yes':null);});return this;};GridStack.prototype.maxHeight=function(el,val){el=$(el);el.each(function(index,el){el=$(el);var node=el.data('_gridstack_node');if(typeof node==='undefined'||node===null){return;}
if(!isNaN(val)){node.maxHeight=(val||false);el.attr('data-gs-max-height',val);}});return this;};GridStack.prototype.minHeight=function(el,val){el=$(el);el.each(function(index,el){el=$(el);var node=el.data('_gridstack_node');if(typeof node==='undefined'||node===null){return;}
if(!isNaN(val)){node.minHeight=(val||false);el.attr('data-gs-min-height',val);}});return this;};GridStack.prototype.maxWidth=function(el,val){el=$(el);el.each(function(index,el){el=$(el);var node=el.data('_gridstack_node');if(typeof node==='undefined'||node===null){return;}
if(!isNaN(val)){node.maxWidth=(val||false);el.attr('data-gs-max-width',val);}});return this;};GridStack.prototype.minWidth=function(el,val){el=$(el);el.each(function(index,el){el=$(el);var node=el.data('_gridstack_node');if(typeof node==='undefined'||node===null){return;}
if(!isNaN(val)){node.minWidth=(val||false);el.attr('data-gs-min-width',val);}});return this;};GridStack.prototype._updateElement=function(el,callback){el=$(el).first();var node=el.data('_gridstack_node');if(typeof node=='undefined'||node===null){return;}
var self=this;self.grid.cleanNodes();self.grid.beginUpdate(node);callback.call(this,el,node);self._updateContainerHeight();self._triggerChangeEvent();self.grid.endUpdate();};GridStack.prototype.resize=function(el,width,height){this._updateElement(el,function(el,node){width=(width!==null&&typeof width!='undefined')?width:node.width;height=(height!==null&&typeof height!='undefined')?height:node.height;console.log('re');this.grid.moveNode(node,node.x,node.y,width,height);});};GridStack.prototype.move=function(el,x,y){this._updateElement(el,function(el,node){x=(x!==null&&typeof x!='undefined')?x:node.x;y=(y!==null&&typeof y!='undefined')?y:node.y;this.grid.moveNode(node,x,y,node.width,node.height);});};GridStack.prototype.update=function(el,x,y,width,height){this._updateElement(el,function(el,node){x=(x!==null&&typeof x!='undefined')?x:node.x;y=(y!==null&&typeof y!='undefined')?y:node.y;width=(width!==null&&typeof width!='undefined')?width:node.width;height=(height!==null&&typeof height!='undefined')?height:node.height;this.grid.moveNode(node,x,y,width,height);});};GridStack.prototype.verticalMargin=function(val,noUpdate){if(typeof val=='undefined'){return this.opts.verticalMargin;}
var heightData=Utils.parseHeight(val);if(this.opts.verticalMarginUnit===heightData.unit&&this.opts.height===heightData.height){return;}
this.opts.verticalMarginUnit=heightData.unit;this.opts.verticalMargin=heightData.height;if(!noUpdate){this._updateStyles();}};GridStack.prototype.cellHeight=function(val,noUpdate){if(typeof val=='undefined'){if(this.opts.cellHeight){return this.opts.cellHeight;}
var o=this.container.children('.'+this.opts.itemClass).first();return Math.ceil(o.outerHeight()/o.attr('data-gs-height'));}
var heightData=Utils.parseHeight(val);if(this.opts.cellHeightUnit===heightData.heightUnit&&this.opts.height===heightData.height){return;}
this.opts.cellHeightUnit=heightData.unit;this.opts.cellHeight=heightData.height;if(!noUpdate){this._updateStyles();}};GridStack.prototype.cellWidth=function(){return this.container.outerWidth()/this.opts.width;};GridStack.prototype.getCellFromPixel=function(position,useOffset){var containerPos=(typeof useOffset!='undefined'&&useOffset)?this.container.offset():this.container.position();var relativeLeft=position.left-containerPos.left;var relativeTop=position.top-containerPos.top;var columnWidth=Math.floor(this.container.width()/this.opts.width);var rowHeight=Math.floor(this.container.height()/parseInt(this.container.attr('data-gs-current-height')));return{x:Math.floor(relativeLeft/columnWidth),y:Math.floor(relativeTop/rowHeight),};};GridStack.prototype.batchUpdate=function(){this.grid.batchUpdate();};GridStack.prototype.commit=function(){this.grid.commit();this._updateContainerHeight();};GridStack.prototype.isAreaEmpty=function(x,y,width,height){return this.grid.isAreaEmpty(x,y,width,height);};GridStack.prototype.setStatic=function(staticValue){this.opts.staticGrid=(staticValue===true);this.enableMove(!staticValue);this.enableResize(!staticValue);this._setStaticClass();};GridStack.prototype._setStaticClass=function(){var staticClassName='grid-stack-static';if(this.opts.staticGrid===true){this.container.addClass(staticClassName);}
else{this.container.removeClass(staticClassName);}};GridStack.prototype._updateNodeWidths=function(oldWidth,newWidth){this.grid._sortNodes();this.grid.batchUpdate();var node={},nodes=_.cloneDeep(this.grid.nodes);for(var i=0;i .grid-stack-item');$fields.each(function(ind,elem){var $field=$(elem);model.push({name:$field.attr(_this.attrName),x:$field.attr('data-gs-x'),y:$field.attr('data-gs-y'),w:$field.attr('data-gs-width'),h:$field.attr('data-gs-height'),});});return JSON.stringify(model);};MerlinGrid.prototype.import=function(model){var modelObj;try{modelObj=JSON.parse(model);}
catch(e){console.debug(e);return;}
this.grid.batchUpdate();for(var ind=0;ind ["+this.attrName+"=\""+modelObj[ind].name+"\"]")[0];this.grid.update($field,parseInt(modelObj[ind].x),parseInt(modelObj[ind].y),parseInt(modelObj[ind].w),parseInt(modelObj[ind].h));}
this.grid.commit();};MerlinGrid.prototype.adaptAbandoned=function(){var $abandonedFields=this.$container.find('> .searchbox-dd-item').not(this.$importedList);$abandonedFields.each(function(ind,elem){var $field=$(elem);console.log({x:$field.attr('data-gs-x'),y:$field.attr('data-gs-y'),w:$field.attr('data-gs-width'),h:$field.attr('data-gs-height'),});});};MerlinGrid.prototype.changeSize=function(columns){if(columns){if(columns>60){columns=60;}
if(columns<=0){columns=1;}
this.grid.setGridWidth(columns,false);}};return MerlinGrid;}());!function(t,e,i){!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):jQuery&&!jQuery.fn.qtip&&t(jQuery)}(function(s){"use strict";function o(t,e,i,o){this.id=i,this.target=t,this.tooltip=E,this.elements={target:t},this._id=R+"-"+i,this.timers={img:{}},this.options=e,this.plugins={},this.cache={event:{},target:s(),disabled:k,attr:o,onTooltip:k,lastClass:""},this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=k}
function n(t){return t===E||"object"!==s.type(t)}
function r(t){return!(s.isFunction(t)||t&&t.attr||t.length||"object"===s.type(t)&&(t.jquery||t.then))}
function a(t){var e,i,o,a;return n(t)?k:(n(t.metadata)&&(t.metadata={type:t.metadata}),"content"in t&&(e=t.content,n(e)||e.jquery||e.done?e=t.content={text:i=r(e)?k:e}:i=e.text,"ajax"in e&&(o=e.ajax,a=o&&o.once!==k,delete e.ajax,e.text=function(t,e){var n=i||s(this).attr(e.options.content.attr)||"Loading...",r=s.ajax(s.extend({},o,{context:e})).then(o.success,E,o.error).then(function(t){return t&&a&&e.set("content.text",t),t},function(t,i,s){e.destroyed||0===t.status||e.set("content.text",i+": "+s)});return a?n:(e.set("content.text",n),r)}),"title"in e&&(s.isPlainObject(e.title)&&(e.button=e.title.button,e.title=e.title.text),r(e.title||k)&&(e.title=k))),"position"in t&&n(t.position)&&(t.position={my:t.position,at:t.position}),"show"in t&&n(t.show)&&(t.show=t.show.jquery?{target:t.show}:t.show===W?{ready:W}:{event:t.show}),"hide"in t&&n(t.hide)&&(t.hide=t.hide.jquery?{target:t.hide}:{event:t.hide}),"style"in t&&n(t.style)&&(t.style={classes:t.style}),s.each(B,function(){this.sanitize&&this.sanitize(t)}),t)}
function h(t,e){for(var i,s=0,o=t,n=e.split(".");o=o[n[s++]];)s0?setTimeout(s.proxy(t,this),e):(t.call(this),void 0)}
function u(t){this.tooltip.hasClass(Z)||(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this.timers.show=d.call(this,function(){this.toggle(W,t)},this.options.show.delay))}
function p(t){if(!this.tooltip.hasClass(Z)&&!this.destroyed){var e=s(t.relatedTarget),i=e.closest(U)[0]===this.tooltip[0],o=e[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==e[0]&&"mouse"===this.options.position.target&&i||this.options.hide.fixed&&/mouse(out|leave|move)/.test(t.type)&&(i||o))try{t.preventDefault(),t.stopImmediatePropagation()}catch(n){}else this.timers.hide=d.call(this,function(){this.toggle(k,t)},this.options.hide.delay,this)}}
function f(t){!this.tooltip.hasClass(Z)&&this.options.hide.inactive&&(clearTimeout(this.timers.inactive),this.timers.inactive=d.call(this,function(){this.hide(t)},this.options.hide.inactive))}
function g(t){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(t)}
function m(t,i,o){s(e.body).delegate(t,(i.split?i:i.join("."+R+" "))+"."+R,function(){var t=C.api[s.attr(this,Y)];t&&!t.disabled&&o.apply(t,arguments)})}
function v(t,i,n){var r,h,l,c,d,u=s(e.body),p=t[0]===e?u:t,f=t.metadata?t.metadata(n.metadata):E,g="html5"===n.metadata.type&&f?f[n.metadata.name]:E,m=t.data(n.metadata.name||"qtipopts");try{m="string"==typeof m?s.parseJSON(m):m}catch(v){}
if(c=s.extend(W,{},C.defaults,n,"object"==typeof m?a(m):E,a(g||f)),h=c.position,c.id=i,"boolean"==typeof c.content.text){if(l=t.attr(c.content.attr),c.content.attr===k||!l)return k;c.content.text=l}
if(h.container.length||(h.container=u),h.target===k&&(h.target=p),c.show.target===k&&(c.show.target=p),c.show.solo===W&&(c.show.solo=h.container.closest("body")),c.hide.target===k&&(c.hide.target=p),c.position.viewport===W&&(c.position.viewport=h.container),h.container=h.container.eq(0),h.at=new T(h.at,W),h.my=new T(h.my),t.data(R))if(c.overwrite)t.qtip("destroy",!0);else if(c.overwrite===k)return k;return t.attr(H,i),c.suppress&&(d=t.attr("title"))&&t.removeAttr("title").attr(ee,d).attr("title",""),r=new o(t,c,i,!!l),t.data(R,r),r}
function y(t){return t.charAt(0).toUpperCase()+t.slice(1)}
function b(t,e){var s,o,n=e.charAt(0).toUpperCase()+e.slice(1),r=(e+" "+me.join(n+" ")+n).split(" "),a=0;if(ge[e])return t.css(ge[e]);for(;s=r[a++];)if((o=t.css(s))!==i)return ge[e]=s,o}
function w(t,e){return Math.ceil(parseFloat(b(t,e)))}
function _(t,e){this._ns="tip",this.options=e,this.offset=e.offset,this.size=[e.width,e.height],this.init(this.qtip=t)}
function x(t,e){this.options=e,this._ns="-modal",this.init(this.qtip=t)}
var C,q,T,j,z,W=!0,k=!1,E=null,A="x",M="y",S="width",L="height",D="top",I="left",P="bottom",F="right",$="center",N="flipinvert",O="shift",B={},R="qtip",H="data-hasqtip",Y="data-qtip-id",X=["ui-widget","ui-tooltip"],U="."+R,Q="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),J=R+"-fixed",V=R+"-default",G=R+"-focus",K=R+"-hover",Z=R+"-disabled",te="_replacedByqTip",ee="oldtitle",ie={ie:function(){for(var t=4,i=e.createElement("div");(i.innerHTML="")&&i.getElementsByTagName("i")[0];t+=1);return t>4?t:0/0}(),iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||k};q=o.prototype,q._when=function(t){return s.when.apply(s,t)},q.render=function(t){if(this.rendered||this.destroyed)return this;var e,i=this,o=this.options,n=this.cache,r=this.elements,a=o.content.text,h=o.content.title,l=o.content.button,c=o.position,d=("."+this._id+" ",[]);return s.attr(this.target[0],"aria-describedby",this._id),n.posClass=this._createPosClass((this.position={my:c.my,at:c.at}).my),this.tooltip=r.tooltip=e=s("",{id:this._id,"class":[R,V,o.style.classes,n.posClass].join(" "),width:o.style.width||"",height:o.style.height||"",tracking:"mouse"===c.target&&c.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":k,"aria-describedby":this._id+"-content","aria-hidden":W}).toggleClass(Z,this.disabled).attr(Y,this.id).data(R,this).appendTo(c.container).append(r.content=s("",{"class":R+"-content",id:this._id+"-content","aria-atomic":W})),this.rendered=-1,this.positioning=W,h&&(this._createTitle(),s.isFunction(h)||d.push(this._updateTitle(h,k))),l&&this._createButton(),s.isFunction(a)||d.push(this._updateContent(a,k)),this.rendered=W,this._setWidget(),s.each(B,function(t){var e;"render"===this.initialize&&(e=this(i))&&(i.plugins[t]=e)}),this._unassignEvents(),this._assignEvents(),this._when(d).then(function(){i._trigger("render"),i.positioning=k,i.hiddenDuringWait||!o.show.ready&&!t||i.toggle(W,n.event,k),i.hiddenDuringWait=k}),C.api[this.id]=this,this},q.destroy=function(t){function e(){if(!this.destroyed){this.destroyed=W;var t,e=this.target,i=e.attr(ee);this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove(),s.each(this.plugins,function(){this.destroy&&this.destroy()});for(t in this.timers)clearTimeout(this.timers[t]);e.removeData(R).removeAttr(Y).removeAttr(H).removeAttr("aria-describedby"),this.options.suppress&&i&&e.attr("title",i).removeAttr(ee),this._unassignEvents(),this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=E,delete C.api[this.id]}}
return this.destroyed?this.target:(t===W&&"hide"!==this.triggering||!this.rendered?e.call(this):(this.tooltip.one("tooltiphidden",s.proxy(e,this)),!this.triggering&&this.hide()),this.target)},j=q.checks={builtin:{"^id$":function(t,e,i,o){var n=i===W?C.nextid:i,r=R+"-"+n;n!==k&&n.length>0&&!s("#"+r).length?(this._id=r,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):t[e]=o},"^prerender":function(t,e,i){i&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(t,e,i){this._updateContent(i)},"^content.attr$":function(t,e,i,s){this.options.content.text===this.target.attr(s)&&this._updateContent(this.target.attr(i))},"^content.title$":function(t,e,i){return i?(i&&!this.elements.title&&this._createTitle(),this._updateTitle(i),void 0):this._removeTitle()},"^content.button$":function(t,e,i){this._updateButton(i)},"^content.title.(text|button)$":function(t,e,i){this.set("content."+e,i)},"^position.(my|at)$":function(t,e,i){"string"==typeof i&&(this.position[e]=t[e]=new T(i,"at"===e))},"^position.container$":function(t,e,i){this.rendered&&this.tooltip.appendTo(i)},"^show.ready$":function(t,e,i){i&&(!this.rendered&&this.render(W)||this.toggle(W))},"^style.classes$":function(t,e,i,s){this.rendered&&this.tooltip.removeClass(s).addClass(i)},"^style.(width|height)":function(t,e,i){this.rendered&&this.tooltip.css(e,i)},"^style.widget|content.title":function(){this.rendered&&this._setWidget()},"^style.def":function(t,e,i){this.rendered&&this.tooltip.toggleClass(V,!!i)},"^events.(render|show|move|hide|focus|blur)$":function(t,e,i){this.rendered&&this.tooltip[(s.isFunction(i)?"":"un")+"bind"]("tooltip"+e,i)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){if(this.rendered){var t=this.options.position;this.tooltip.attr("tracking","mouse"===t.target&&t.adjust.mouse),this._unassignEvents(),this._assignEvents()}}}},q.get=function(t){if(this.destroyed)return this;var e=h(this.options,t.toLowerCase()),i=e[0][e[1]];return i.precedance?i.string():i};var se=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,oe=/^prerender|show\.ready/i;q.set=function(t,e){if(this.destroyed)return this;var i,o=this.rendered,n=k,r=this.options;return this.checks,"string"==typeof t?(i=t,t={},t[i]=e):t=s.extend({},t),s.each(t,function(e,i){if(o&&oe.test(e))return delete t[e],void 0;var a,l=h(r,e.toLowerCase());a=l[0][l[1]],l[0][l[1]]=i&&i.nodeType?s(i):i,n=se.test(e)||n,t[e]=[l[0],l[1],i,a]}),a(r),this.positioning=W,s.each(t,s.proxy(l,this)),this.positioning=k,this.rendered&&this.tooltip[0].offsetWidth>0&&n&&this.reposition("mouse"===r.position.target?E:this.cache.event),this},q._update=function(t,e){var i=this,o=this.cache;return this.rendered&&t?(s.isFunction(t)&&(t=t.call(this.elements.target,o.event,this)||""),s.isFunction(t.then)?(o.waiting=W,t.then(function(t){return o.waiting=k,i._update(t,e)},E,function(t){return i._update(t,e)})):t===k||!t&&""!==t?k:(t.jquery&&t.length>0?e.empty().append(t.css({display:"block",visibility:"visible"})):e.html(t),this._waitForContent(e).then(function(t){i.rendered&&i.tooltip[0].offsetWidth>0&&i.reposition(o.event,!t.length)}))):k},q._waitForContent=function(t){var e=this.cache;return e.waiting=W,(s.fn.imagesLoaded?t.imagesLoaded():s.Deferred().resolve([])).done(function(){e.waiting=k}).promise()},q._updateContent=function(t,e){this._update(t,this.elements.content,e)},q._updateTitle=function(t,e){this._update(t,this.elements.title,e)===k&&this._removeTitle(k)},q._createTitle=function(){var t=this.elements,i=this._id+"-title";t.titlebar&&this._removeTitle(),t.titlebar=s(e.createElement("div")).addClass(R+"-titlebar "+(this.options.style.widget?c("header"):"background-color-1 text-color-12")).append(t.title=s("",{id:i,"class":R+"-title","aria-atomic":W})).insertBefore(t.content),this.options.content.button&&this._createButton()},q._removeTitle=function(t){var e=this.elements;e.title&&(e.titlebar.remove(),e.titlebar=e.title=e.button=E,t!==k&&this.reposition())},q._createPosClass=function(t){return R+"-pos-"+(t||this.options.position.my).abbrev()},q.reposition=function(i,o){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=W;var n,r,a,h,l=this.cache,c=this.tooltip,d=this.options.position,u=d.target,p=d.my,f=d.at,g=d.viewport,m=d.container,v=d.adjust,y=v.method.split(" "),b=c.outerWidth(k),w=c.outerHeight(k),_=0,x=0,C=c.css("position"),q={left:0,top:0},T=c[0].offsetWidth>0,j=i&&"scroll"===i.type,z=s(t),E=m[0].ownerDocument,A=this.mouse;if(s.isArray(u)&&2===u.length)f={x:I,y:D},q={left:u[0],top:u[1]};else if("mouse"===u)f={x:I,y:D},(!v.mouse||this.options.hide.distance)&&l.origin&&l.origin.pageX?i=l.origin:!i||i&&("resize"===i.type||"scroll"===i.type)?i=l.event:A&&A.pageX&&(i=A),"static"!==C&&(q=m.offset()),E.body.offsetWidth!==(t.innerWidth||E.documentElement.clientWidth)&&(r=s(e.body).offset()),q={left:i.pageX-q.left+(r&&r.left||0),top:i.pageY-q.top+(r&&r.top||0)},v.mouse&&j&&A&&(q.left-=(A.scrollX||0)-z.scrollLeft(),q.top-=(A.scrollY||0)-z.scrollTop());else{if("event"===u?i&&i.target&&"scroll"!==i.type&&"resize"!==i.type?l.target=s(i.target):i.target||(l.target=this.elements.target):"event"!==u&&(l.target=s(u.jquery?u:this.elements.target)),u=l.target,u=s(u).eq(0),0===u.length)return this;u[0]===e||u[0]===t?(_=ie.iOS?t.innerWidth:u.width(),x=ie.iOS?t.innerHeight:u.height(),u[0]===t&&(q={top:(g||u).scrollTop(),left:(g||u).scrollLeft()})):B.imagemap&&u.is("area")?n=B.imagemap(this,u,f,B.viewport?y:k):B.svg&&u&&u[0].ownerSVGElement?n=B.svg(this,u,f,B.viewport?y:k):(_=u.outerWidth(k),x=u.outerHeight(k),q=u.offset()),n&&(_=n.width,x=n.height,r=n.offset,q=n.position),q=this.reposition.offset(u,q,m),(ie.iOS>3.1&&ie.iOS<4.1||ie.iOS>=4.3&&ie.iOS<4.33||!ie.iOS&&"fixed"===C)&&(q.left-=z.scrollLeft(),q.top-=z.scrollTop()),(!n||n&&n.adjustable!==k)&&(q.left+=f.x===F?_:f.x===$?_/2:0,q.top+=f.y===P?x:f.y===$?x/2:0)}
return q.left+=v.x+(p.x===F?-b:p.x===$?-b/2:0),q.top+=v.y+(p.y===P?-w:p.y===$?-w/2:0),B.viewport?(a=q.adjusted=B.viewport(this,q,d,_,x,b,w),r&&a.left&&(q.left+=r.left),r&&a.top&&(q.top+=r.top),a.my&&(this.position.my=a.my)):q.adjusted={left:0,top:0},l.posClass!==(h=this._createPosClass(this.position.my))&&c.removeClass(l.posClass).addClass(l.posClass=h),this._trigger("move",[q,g.elem||g],i)?(delete q.adjusted,o===k||!T||isNaN(q.left)||isNaN(q.top)||"mouse"===u||!s.isFunction(d.effect)?c.css(q):s.isFunction(d.effect)&&(d.effect.call(c,this,s.extend({},q)),c.queue(function(t){s(this).css({opacity:"",height:""}),ie.ie&&this.style.removeAttribute("filter"),t()})),this.positioning=k,this):this},q.reposition.offset=function(t,i,o){function n(t,e){i.left+=e*t.scrollLeft(),i.top+=e*t.scrollTop()}
if(!o[0])return i;var r,a,h,l,c=s(t[0].ownerDocument),d=!!ie.ie&&"CSS1Compat"!==e.compatMode,u=o[0];do"static"!==(a=s.css(u,"position"))&&("fixed"===a?(h=u.getBoundingClientRect(),n(c,-1)):(h=s(u).position(),h.left+=parseFloat(s.css(u,"borderLeftWidth"))||0,h.top+=parseFloat(s.css(u,"borderTopWidth"))||0),i.left-=h.left+(parseFloat(s.css(u,"marginLeft"))||0),i.top-=h.top+(parseFloat(s.css(u,"marginTop"))||0),r||"hidden"===(l=s.css(u,"overflow"))||"visible"===l||(r=s(u)));while(u=u.offsetParent);return r&&(r[0]!==c[0]||d)&&n(r,1),i};var ne=(T=q.reposition.Corner=function(t,e){t=(""+t).replace(/([A-Z])/," $1").replace(/middle/gi,$).toLowerCase(),this.x=(t.match(/left|right/i)||t.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(t.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.forceY=!!e;var i=t.charAt(0);this.precedance="t"===i||"b"===i?M:A}).prototype;ne.invert=function(t,e){this[t]=this[t]===I?F:this[t]===F?I:e||this[t]},ne.string=function(t){var e=this.x,i=this.y,s=e!==i?"center"===e||"center"!==i&&(this.precedance===M||this.forceY)?[i,e]:[e,i]:[e];return t!==!1?s.join(" "):s},ne.abbrev=function(){var t=this.string(!1);return t[0].charAt(0)+(t[1]&&t[1].charAt(0)||"")},ne.clone=function(){return new T(this.string(),this.forceY)},q.toggle=function(t,i){var o=this.cache,n=this.options,r=this.tooltip;if(i){if(/over|enter/.test(i.type)&&o.event&&/out|leave/.test(o.event.type)&&n.show.target.add(i.target).length===n.show.target.length&&r.has(i.relatedTarget).length)return this;o.event=s.event.fix(i)}
if(this.waiting&&!t&&(this.hiddenDuringWait=W),!this.rendered)return t?this.render(1):this;if(this.destroyed||this.disabled)return this;var a,h,l,c=t?"show":"hide",d=this.options[c],u=(this.options[t?"hide":"show"],this.options.position),p=this.options.content,f=this.tooltip.css("width"),g=this.tooltip.is(":visible"),m=t||1===d.target.length,v=!i||d.target.length<2||o.target[0]===i.target;return(typeof t).search("boolean|number")&&(t=!g),a=!r.is(":animated")&&g===t&&v,h=a?E:!!this._trigger(c,[90]),this.destroyed?this:(h!==k&&t&&this.focus(i),!h||a?this:(s.attr(r[0],"aria-hidden",!t),t?(this.mouse&&(o.origin=s.event.fix(this.mouse)),s.isFunction(p.text)&&this._updateContent(p.text,k),s.isFunction(p.title)&&this._updateTitle(p.title,k),!z&&"mouse"===u.target&&u.adjust.mouse&&(s(e).bind("mousemove."+R,this._storeMouse),z=W),f||r.css("width",r.outerWidth(k)),this.reposition(i,arguments[2]),f||r.css("width",""),d.solo&&("string"==typeof d.solo?s(d.solo):s(U,d.solo)).not(r).not(d.target).qtip("hide",s.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete o.origin,z&&!s(U+'[tracking="true"]:visible',d.solo).not(r).length&&(s(e).unbind("mousemove."+R),z=k),this.blur(i)),l=s.proxy(function(){t?(ie.ie&&r[0].style.removeAttribute("filter"),r.css("overflow",""),"string"==typeof d.autofocus&&s(this.options.show.autofocus,r).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):r.css({display:"",visibility:"",opacity:"",left:"",top:""}),this._trigger(t?"visible":"hidden")},this),d.effect===k||m===k?(r[c](),l()):s.isFunction(d.effect)?(r.stop(1,1),d.effect.call(r,this),r.queue("fx",function(t){l(),t()})):r.fadeTo(90,t?1:0,l),t&&d.target.trigger("qtip-"+this.id+"-inactive"),this))},q.show=function(t){return this.toggle(W,t)},q.hide=function(t){return this.toggle(k,t)},q.focus=function(t){if(!this.rendered||this.destroyed)return this;var e=s(U),i=this.tooltip,o=parseInt(i[0].style.zIndex,10),n=C.zindex+e.length;return i.hasClass(G)||this._trigger("focus",[n],t)&&(o!==n&&(e.each(function(){this.style.zIndex>o&&(this.style.zIndex=this.style.zIndex-1)}),e.filter("."+G).qtip("blur",t)),i.addClass(G)[0].style.zIndex=n),this},q.blur=function(t){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass(G),this._trigger("blur",[this.tooltip.css("zIndex")],t),this)},q.disable=function(t){return this.destroyed?this:("toggle"===t?t=!(this.rendered?this.tooltip.hasClass(Z):this.disabled):"boolean"!=typeof t&&(t=W),this.rendered&&this.tooltip.toggleClass(Z,t).attr("aria-disabled",t),this.disabled=!!t,this)},q.enable=function(){return this.disable(k)},q._createButton=function(){var t=this,i=this.elements,o=i.tooltip,n=this.options.content.button,closeText=this.options.content.closeText||translations.cancel;i.button&&i.button.remove(),i.button=n.jquery?n:s(e.createElement("div")).addClass("qtip-close btn-close").html(""+closeText+" "),i.button.appendTo(i.titlebar||o).attr("role","button").click(function(e){console.log(Z);console.log(o.hasClass(Z));return o.hasClass(Z)||t.hide(e),k})},q._updateButton=function(t){if(!this.rendered)return k;var e=this.elements.button;t?this._createButton():e.remove()},q._setWidget=function(){var t=this.options.style.widget,e=this.elements,i=e.tooltip,s=i.hasClass(Z);i.removeClass(Z),Z=t?"ui-state-disabled":"qtip-disabled",i.toggleClass(Z,s),i.toggleClass("ui-helper-reset "+c(),t).toggleClass(V,this.options.style.def&&!t),e.content&&e.content.toggleClass(c("content"),t),e.titlebar&&e.titlebar.toggleClass(c("header"),t),e.button&&e.button.toggleClass(R+"-icon",!t)},q._storeMouse=function(t){return(this.mouse=s.event.fix(t)).type="mousemove",this},q._bind=function(t,e,i,o,n){if(t&&i&&e.length){var r="."+this._id+(o?"-"+o:"");return s(t).bind((e.split?e:e.join(r+" "))+r,s.proxy(i,n||this)),this}},q._unbind=function(t,e){return t&&s(t).unbind("."+this._id+(e?"-"+e:"")),this},q._trigger=function(t,e,i){var o=s.Event("tooltip"+t);return o.originalEvent=i&&s.extend({},i)||this.cache.event||E,this.triggering=t,this.tooltip.trigger(o,[this].concat(e||[])),this.triggering=k,!o.isDefaultPrevented()},q._bindEvents=function(t,e,i,o,n,r){var a=i.filter(o).add(o.filter(i)),h=[];a.length&&(s.each(e,function(e,i){var o=s.inArray(i,t);o>-1&&h.push(t.splice(o,1)[0])}),h.length&&(this._bind(a,h,function(t){var e=this.rendered?this.tooltip[0].offsetWidth>0:!1;(e?r:n).call(this,t)}),i=i.not(a),o=o.not(a))),this._bind(i,t,n),this._bind(o,e,r)},q._assignInitialEvents=function(t){function e(t){return this.disabled||this.destroyed?k:(this.cache.event=t&&s.event.fix(t),this.cache.target=t&&s(t.target),clearTimeout(this.timers.show),this.timers.show=d.call(this,function(){this.render("object"==typeof t||i.show.ready)},i.prerender?0:i.show.delay),void 0)}
var i=this.options,o=i.show.target,n=i.hide.target,r=i.show.event?s.trim(""+i.show.event).split(" "):[],a=i.hide.event?s.trim(""+i.hide.event).split(" "):[];this._bind(this.elements.target,["remove","removeqtip"],function(){this.destroy(!0)},"destroy"),/mouse(over|enter)/i.test(i.show.event)&&!/mouse(out|leave)/i.test(i.hide.event)&&a.push("mouseleave"),this._bind(o,"mousemove",function(t){this._storeMouse(t),this.cache.onTarget=W}),this._bindEvents(r,a,o,n,e,function(){return this.timers?(clearTimeout(this.timers.show),void 0):k}),(i.show.ready||i.prerender)&&e.call(this,t)},q._assignEvents=function(){var i=this,o=this.options,n=o.position,r=this.tooltip,a=o.show.target,h=o.hide.target,l=n.container,c=n.viewport,d=s(e),m=(s(e.body),s(t)),v=o.show.event?s.trim(""+o.show.event).split(" "):[],y=o.hide.event?s.trim(""+o.hide.event).split(" "):[];s.each(o.events,function(t,e){i._bind(r,"toggle"===t?["tooltipshow","tooltiphide"]:["tooltip"+t],e,null,r)}),/mouse(out|leave)/i.test(o.hide.event)&&"window"===o.hide.leave&&this._bind(d,["mouseout","blur"],function(t){/select|option/.test(t.target.nodeName)||t.relatedTarget||this.hide(t)}),o.hide.fixed?h=h.add(r.addClass(J)):/mouse(over|enter)/i.test(o.show.event)&&this._bind(h,"mouseleave",function(){clearTimeout(this.timers.show)}),(""+o.hide.event).indexOf("unfocus")>-1&&this._bind(l.closest("html"),["mousedown","touchstart"],function(t){var e=s(t.target),i=this.rendered&&!this.tooltip.hasClass(Z)&&this.tooltip[0].offsetWidth>0,o=e.parents(U).filter(this.tooltip[0]).length>0;e[0]===this.target[0]||e[0]===this.tooltip[0]||o||this.target.has(e[0]).length||!i||this.hide(t)}),"number"==typeof o.hide.inactive&&(this._bind(a,"qtip-"+this.id+"-inactive",f,"inactive"),this._bind(h.add(r),C.inactiveEvents,f)),this._bindEvents(v,y,a,h,u,p),this._bind(a.add(r),"mousemove",function(t){if("number"==typeof o.hide.distance){var e=this.cache.origin||{},i=this.options.hide.distance,s=Math.abs;(s(t.pageX-e.pageX)>=i||s(t.pageY-e.pageY)>=i)&&this.hide(t)}
this._storeMouse(t)}),"mouse"===n.target&&n.adjust.mouse&&(o.hide.event&&this._bind(a,["mouseenter","mouseleave"],function(t){return this.cache?(this.cache.onTarget="mouseenter"===t.type,void 0):k}),this._bind(d,"mousemove",function(t){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(Z)&&this.tooltip[0].offsetWidth>0&&this.reposition(t)})),(n.adjust.resize||c.length)&&this._bind(s.event.special.resize?c:m,"resize",g),n.adjust.scroll&&this._bind(m.add(n.container),"scroll",g)},q._unassignEvents=function(){var i=this.options,o=i.show.target,n=i.hide.target,r=s.grep([this.elements.target[0],this.rendered&&this.tooltip[0],i.position.container[0],i.position.viewport[0],i.position.container.closest("html")[0],t,e],function(t){return"object"==typeof t});o&&o.toArray&&(r=r.concat(o.toArray())),n&&n.toArray&&(r=r.concat(n.toArray())),this._unbind(r)._unbind(r,"destroy")._unbind(r,"inactive")},s(function(){m(U,["mouseenter","mouseleave"],function(t){var e="mouseenter"===t.type,i=s(t.currentTarget),o=s(t.relatedTarget||t.target),n=this.options;e?(this.focus(t),i.hasClass(J)&&!i.hasClass(Z)&&clearTimeout(this.timers.hide)):"mouse"===n.position.target&&n.position.adjust.mouse&&n.hide.event&&n.show.target&&!o.closest(n.show.target[0]).length&&this.hide(t),i.toggleClass(K,e)}),m("["+Y+"]",Q,f)}),C=s.fn.qtip=function(t,e,o){var n=(""+t).toLowerCase(),r=E,h=s.makeArray(arguments).slice(1),l=h[h.length-1],c=this[0]?s.data(this[0],R):E;return!arguments.length&&c||"api"===n?c:"string"==typeof t?(this.each(function(){var t=s.data(this,R);if(!t)return W;if(l&&l.timeStamp&&(t.cache.event=l),!e||"option"!==n&&"options"!==n)t[n]&&t[n].apply(t,h);else{if(o===i&&!s.isPlainObject(e))return r=t.get(e),k;t.set(e,o)}}),r!==E?r:this):"object"!=typeof t&&arguments.length?void 0:(c=a(s.extend(W,{},t)),this.each(function(t){var e,i;return i=s.isArray(c.id)?c.id[t]:c.id,i=!i||i===k||i.length<1||C.api[i]?C.nextid++:i,e=v(s(this),i,c),e===k?W:(C.api[i]=e,s.each(B,function(){"initialize"===this.initialize&&this(e)}),e._assignInitialEvents(l),void 0)}))},s.qtip=o,C.api={},s.each({attr:function(t,e){if(this.length){var i=this[0],o="title",n=s.data(i,"qtip");if(t===o&&n&&"object"==typeof n&&n.options.suppress)return arguments.length<2?s.attr(i,ee):(n&&n.options.content.attr===o&&n.cache.attr&&n.set("content.text",e),this.attr(ee,e))}
return s.fn["attr"+te].apply(this,arguments)},clone:function(t){var e=(s([]),s.fn["clone"+te].apply(this,arguments));return t||e.filter("["+ee+"]").attr("title",function(){return s.attr(this,ee)}).removeAttr(ee),e}},function(t,e){if(!e||s.fn[t+te])return W;var i=s.fn[t+te]=s.fn[t];s.fn[t]=function(){return e.apply(this,arguments)||i.apply(this,arguments)}}),s.ui||(s["cleanData"+te]=s.cleanData,s.cleanData=function(t){for(var e,i=0;(e=s(t[i])).length;i++)if(e.attr(H))try{e.triggerHandler("removeqtip")}catch(o){}
s["cleanData"+te].apply(this,arguments)}),C.version="2.2.1",C.nextid=0,C.inactiveEvents=Q,C.zindex=15e3,C.defaults={prerender:k,id:k,overwrite:W,suppress:W,content:{text:W,attr:"title",title:k,button:k},position:{my:"top left",at:"bottom right",target:k,container:k,viewport:k,adjust:{x:0,y:0,mouse:W,scroll:W,resize:W,method:"flipinvert flipinvert"},effect:function(t,e){s(this).animate(e,{duration:200,queue:k})}},show:{target:k,event:"mouseenter",effect:W,delay:90,solo:k,ready:k,autofocus:k},hide:{target:k,event:"mouseleave",effect:W,delay:0,fixed:k,inactive:k,leave:"window",distance:k},style:{classes:"",widget:k,width:k,height:k,def:W},events:{render:E,move:E,show:E,hide:E,toggle:E,visible:E,hidden:E,focus:E,blur:E}};var re,ae="margin",he="border",le="color",ce="background-color",de="transparent",ue=" !important",pe=!!e.createElement("canvas").getContext,fe=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,ge={},me=["Webkit","O","Moz","ms"];if(pe)var ve=t.devicePixelRatio||1,ye=function(){var t=e.createElement("canvas").getContext("2d");return t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||1}(),be=ve/ye;else var we=function(t,e,i){return"'};s.extend(_.prototype,{init:function(t){var e,i;i=this.element=t.elements.tip=s("",{"class":R+"-tip"}).prependTo(t.tooltip),pe?(e=s("").appendTo(this.element)[0].getContext("2d"),e.lineJoin="miter",e.miterLimit=1e5,e.save()):(e=we("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(e+e),t._bind(s("*",i).add(i),["click","mousedown"],function(t){t.stopPropagation()},this._ns)),t._bind(t.tooltip,"tooltipmove",this.reposition,this._ns,this),this.create()},_swapDimensions:function(){this.size[0]=this.options.height,this.size[1]=this.options.width},_resetDimensions:function(){this.size[0]=this.options.width,this.size[1]=this.options.height},_useTitle:function(t){var e=this.qtip.elements.titlebar;return e&&(t.y===D||t.y===$&&this.element.position().top+this.size[1]/2+this.options.offsetd&&!fe.test(o[1])&&(o[0]=o[1]),this.border=d=g.border!==W?g.border:d):this.border=d=0,c=this.size=this._calculateSize(e),p.css({width:c[0],height:c[1],lineHeight:c[1]+"px"}),l=e.precedance===M?[y(v.x===I?d:v.x===F?c[0]-m[0]-d:(c[0]-m[0])/2),y(v.y===D?c[1]-m[1]:0)]:[y(v.x===I?c[0]-m[0]:0),y(v.y===D?d:v.y===P?c[1]-m[1]-d:(c[1]-m[1])/2)],pe?(r=f[0].getContext("2d"),r.restore(),r.save(),r.clearRect(0,0,6e3,6e3),a=this._calculateTip(v,m,be),h=this._calculateTip(v,this.size,be),f.attr(S,c[0]*be).attr(L,c[1]*be),f.css(S,c[0]).css(L,c[1]),this._drawCoords(r,h),r.fillStyle=o[1],r.fill(),r.translate(l[0]*be,l[1]*be),this._drawCoords(r,a),r.fillStyle=o[0],r.fill()):(a=this._calculateTip(v),a="m"+a[0]+","+a[1]+" l"+a[2]+","+a[3]+" "+a[4]+","+a[5]+" xe",l[2]=d&&/^(r|b)/i.test(e.string())?8===ie.ie?2:1:0,f.css({coordsize:c[0]+d+" "+(c[1]+d),antialias:""+(v.string().indexOf($)>-1),left:l[0]-l[2]*Number(n===A),top:l[1]-l[2]*Number(n===M),width:c[0]+d,height:c[1]+d}).each(function(t){var e=s(this);e[e.prop?"prop":"attr"]({coordsize:c[0]+d+" "+(c[1]+d),path:a,fillcolor:o[0],filled:!!t,stroked:!t}).toggle(!(!d&&!t)),!t&&e.html(we("stroke",'weight="'+2*d+'px" color="'+o[1]+'" miterlimit="1000" joinstyle="miter"'))})),t.opera&&setTimeout(function(){u.tip.css({display:"inline-block",visibility:"visible"})},1),i!==k&&this.calculate(e,c)},calculate:function(t,e){if(!this.enabled)return k;var i,o,n=this,r=this.qtip.elements,a=this.element,h=this.options.offset,l=(r.tooltip.hasClass("ui-widget"),{});return t=t||this.corner,i=t.precedance,e=e||this._calculateSize(t),o=[t.x,t.y],i===A&&o.reverse(),s.each(o,function(s,o){var a,c,d;o===$?(a=i===M?I:D,l[a]="50%",l[ae+"-"+a]=-Math.round(e[i===M?0:1]/2)+h):(a=n._parseWidth(t,o,r.tooltip),c=n._parseWidth(t,o,r.content),d=n._parseRadius(t),l[o]=Math.max(-n.border,s?c:h+(d>a?d:-a)))}),l[t[i]]-=e[i===A?0:1],a.css({margin:"",top:"",bottom:"",left:"",right:""}).css(l),l},reposition:function(t,e,s){function o(t,e,i,s,o){t===O&&l.precedance===e&&c[s]&&l[i]!==$?l.precedance=l.precedance===A?M:A:t!==O&&c[s]&&(l[e]=l[e]===$?c[s]>0?s:o:l[e]===s?o:s)}function n(t,e,o){l[t]===$?g[ae+"-"+e]=f[t]=r[ae+"-"+e]-c[e]:(a=r[o]!==i?[c[e],-r[e]]:[-c[e],r[e]],(f[t]=Math.max(a[0],a[1]))>a[0]&&(s[e]-=c[e],f[e]=k),g[r[o]!==i?o:e]=f[t])}if(this.enabled){var r,a,h=e.cache,l=this.corner.clone(),c=s.adjusted,d=e.options.position.adjust.method.split(" "),u=d[0],p=d[1]||d[0],f={left:k,top:k,x:0,y:0},g={};this.corner.fixed!==W&&(o(u,A,M,I,F),o(p,M,A,D,P),(l.string()!==h.corner.string()||h.cornerTop!==c.top||h.cornerLeft!==c.left)&&this.update(l,k)),r=this.calculate(l),r.right!==i&&(r.left=-r.right),r.bottom!==i&&(r.top=-r.bottom),r.user=this.offset,(f.left=u===O&&!!c.left)&&n(A,I,F),(f.top=p===O&&!!c.top)&&n(M,D,P),this.element.css(g).toggle(!(f.x&&f.y||l.x===$&&f.y||l.y===$&&f.x)),s.left-=r.left.charAt?r.user:u!==O||f.top||!f.left&&!f.top?r.left+this.border:0,s.top-=r.top.charAt?r.user:p!==O||f.left||!f.left&&!f.top?r.top+this.border:0,h.cornerLeft=c.left,h.cornerTop=c.top,h.corner=l.clone()}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns),this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}}),re=B.tip=function(t){return new _(t,t.options.style.tip)},re.initialize="render",re.sanitize=function(t){if(t.style&&"tip"in t.style){var e=t.style.tip;"object"!=typeof e&&(e=t.style.tip={corner:e}),/string|boolean/i.test(typeof e.corner)||(e.corner=W)}},j.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create(),this.qtip.reposition()},"^style.tip.(height|width)$":function(t){this.size=[t.width,t.height],this.update(),this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}},s.extend(W,C.defaults,{style:{tip:{corner:W,mimic:k,width:6,height:6,border:W,offset:0}}}),B.viewport=function(i,s,o,n,r,a,h){function l(t,e,i,o,n,r,a,h,l){var c=s[n],y=w[t],b=_[t],x=i===O,C=y===n?l:y===r?-l:-l/2,q=b===n?h:b===r?-h:-h/2,T=m[n]+v[n]-(p?0:u[n]),j=T-c,z=c+l-(a===S?f:g)-T,W=C-(w.precedance===t||y===w[e]?q:0)-(b===$?h/2:0);return x?(W=(y===n?1:-1)*C,s[n]+=j>0?j:z>0?-z:0,s[n]=Math.max(-u[n]+v[n],c-W,Math.min(Math.max(-u[n]+v[n]+(a===S?f:g),c+W),s[n],"center"===y?c-C:1e9))):(o*=i===N?2:0,j>0&&(y!==n||z>0)?(s[n]-=W+o,d.invert(t,n)):z>0&&(y!==r||j>0)&&(s[n]-=(y===$?-W:W)+o,d.invert(t,r)),s[n]z&&(s[n]=c,d=w.clone())),s[n]-c}var c,d,u,p,f,g,m,v,y=o.target,b=i.elements.tooltip,w=o.my,_=o.at,x=o.adjust,C=x.method.split(" "),q=C[0],T=C[1]||C[0],j=o.viewport,z=o.container,W=(i.cache,{left:0,top:0});return j.jquery&&y[0]!==t&&y[0]!==e.body&&"none"!==x.method?(u=z.offset()||W,p="static"===z.css("position"),c="fixed"===b.css("position"),f=j[0]===t?j.width():j.outerWidth(k),g=j[0]===t?j.height():j.outerHeight(k),m={left:c?0:j.scrollLeft(),top:c?0:j.scrollTop()},v=j.offset()||W,("shift"!==q||"shift"!==T)&&(d=w.clone()),W={left:"none"!==q?l(A,M,q,x.x,I,F,S,n,a):0,top:"none"!==T?l(M,A,T,x.y,D,P,L,r,h):0,my:d}):W};var _e,xe,Ce="qtip-modal",qe="."+Ce;xe=function(){function t(t){if(s.expr[":"].focusable)return s.expr[":"].focusable;var e,i,o,n=!isNaN(s.attr(t,"tabindex")),r=t.nodeName&&t.nodeName.toLowerCase();return"area"===r?(e=t.parentNode,i=e.name,t.href&&i&&"map"===e.nodeName.toLowerCase()?(o=s("img[usemap=#"+i+"]")[0],!!o&&o.is(":visible")):!1):/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||n:n}function i(t){c.length<1&&t.length?t.not("body").blur():c.first().focus()}function o(t){if(h.is(":visible")){var e,o=s(t.target),a=n.tooltip,l=o.closest(U);e=l.length<1?k:parseInt(l[0].style.zIndex,10)>parseInt(a[0].style.zIndex,10),e||o.closest(U)[0]===a[0]||i(o),r=t.target===c[c.length-1]}}var n,r,a,h,l=this,c={};s.extend(l,{init:function(){return h=l.elem=s("",{id:"qtip-overlay",html:"",mousedown:function(){return k}}).hide(),s(e.body).bind("focusin"+qe,o),s(e).bind("keydown"+qe,function(t){n&&n.options.show.modal.escape&&27===t.keyCode&&n.hide(t)}),h.bind("click"+qe,function(t){n&&n.options.show.modal.blur&&n.hide(t)}),l},update:function(e){n=e,c=e.options.show.modal.stealfocus!==k?e.tooltip.find("*").filter(function(){return t(this)}):[]},toggle:function(t,o,r){var c=(s(e.body),t.tooltip),d=t.options.show.modal,u=d.effect,p=o?"show":"hide",f=h.is(":visible"),g=s(qe).filter(":visible:not(:animated)").not(c);return l.update(t),o&&d.stealfocus!==k&&i(s(":focus")),h.toggleClass("blurs",d.blur),o&&h.appendTo(e.body),h.is(":animated")&&f===o&&a!==k||!o&&g.length?l:(h.stop(W,k),s.isFunction(u)?u.call(h,o):u===k?h[p]():h.fadeTo(parseInt(r,10)||90,o?1:0,function(){o||h.hide()}),o||h.queue(function(t){h.css({left:"",top:""}),s(qe).length||h.detach(),t()}),a=o,n.destroyed&&(n=E),l)}}),l.init()},xe=new xe,s.extend(x.prototype,{init:function(t){var e=t.tooltip;return this.options.on?(t.elements.overlay=xe.elem,e.addClass(Ce).css("z-index",C.modal_zindex+s(qe).length),t._bind(e,["tooltipshow","tooltiphide"],function(t,i,o){var n=t.originalEvent;if(t.target===e[0])if(n&&"tooltiphide"===t.type&&/mouse(leave|enter)/.test(n.type)&&s(n.relatedTarget).closest(xe.elem[0]).length)try{t.preventDefault()}catch(r){}else(!n||n&&"tooltipsolo"!==n.type)&&this.toggle(t,"tooltipshow"===t.type,o)},this._ns,this),t._bind(e,"tooltipfocus",function(t,i){if(!t.isDefaultPrevented()&&t.target===e[0]){var o=s(qe),n=C.modal_zindex+o.length,r=parseInt(e[0].style.zIndex,10);xe.elem[0].style.zIndex=n-1,o.each(function(){this.style.zIndex>r&&(this.style.zIndex-=1)}),o.filter("."+G).qtip("blur",t.originalEvent),e.addClass(G)[0].style.zIndex=n,xe.update(i);try{t.preventDefault()}catch(a){}}},this._ns,this),t._bind(e,"tooltiphide",function(t){t.target===e[0]&&s(qe).filter(":visible").not(e).last().qtip("focus",t)},this._ns,this),void 0):this},toggle:function(t,e,i){return t&&t.isDefaultPrevented()?this:(xe.toggle(this.qtip,!!e,i),void 0)},destroy:function(){this.qtip.tooltip.removeClass(Ce),this.qtip._unbind(this.qtip.tooltip,this._ns),xe.toggle(this.qtip,k),delete this.qtip.elements.overlay}}),_e=B.modal=function(t){return new x(t,t.options.show.modal)},_e.sanitize=function(t){t.show&&("object"!=typeof t.show.modal?t.show.modal={on:!!t.show.modal}:"undefined"==typeof t.show.modal.on&&(t.show.modal.on=W))},C.modal_zindex=C.zindex-200,_e.initialize="render",j.modal={"^show.modal.(on|blur)$":function(){this.destroy(),this.init(),this.qtip.elems.overlay.toggle(this.qtip.tooltip[0].offsetWidth>0)}},s.extend(W,C.defaults,{show:{modal:{on:k,effect:W,blur:W,stealfocus:W,escape:W}}})})}(window,document);var __extends=(this&&this.__extends)||(function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||({__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b;})||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p];};return extendStatics(d,b);};return function(d,b){if(typeof b!=="function"&&b!==null)
throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d;}
d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __());};})();var MerlinGridSearchbox=(function(_super){__extends(MerlinGridSearchbox,_super);function MerlinGridSearchbox($container,staticGrid){if(staticGrid===void 0){staticGrid=true;}
var _this=_super.call(this,$container,{staticGrid:staticGrid,attrName:'data-field-type',})||this;_this.savedLayout='';var gridWidth=parseInt(_this.$container.closest('[merlin-grid]').attr('merlin-grid'))*5;_this.options={width:gridWidth,height:30,verticalMargin:0,animate:!_this.staticGrid,float:true,cellHeight:12,handle:'.searchbox-dd-handle',itemClass:'grid-stack-item',alwaysShowResizeHandle:!_this.staticGrid,staticGrid:_this.staticGrid,disableResize:_this.staticGrid,disableDrag:_this.staticGrid,minWidth:1009,};return _this;}
MerlinGridSearchbox.prototype.init=function(){var _this=this;var fieldsMap=[{selector:'[data-field-type="date"]',minW:10,},{selector:'[data-field-type="participants"]',minW:10,},{selector:'[data-field-type="insuranceparticipant"]',minW:7,},{selector:'[data-field-type="dynhtllocation"]',minW:12,},{selector:'[data-field-type="searchbtn"]',minW:4,},{selector:'[data-field-type="multiflight-fields-controller"]',minW:12,},{selector:'[data-field-type^="multiflight-field-"]',minW:24,},],$gridItems=this.$container.find('> .searchbox-dd-item');for(var ii=0;ii0){$gridItems.filter(fieldMap.selector).attr('data-gs-min-width',fieldMap.minW);}}
$gridItems.filter(':not([data-gs-min-width])').attr('data-gs-min-width',6);this.$container.addClass('grid-stack').addClass('grid-stack-'+this.options.width);$gridItems.addClass('grid-stack-item').attr('data-gs-max-height','12');if(this.$container.hasClass('fields-labels')){this.minFieldHeight=6;}
else{this.minFieldHeight=4;}
$gridItems.attr('data-gs-min-height',this.minFieldHeight);if(this.staticGrid){this.$container.addClass('grid-disabled');}
else{$gridItems.append($(''));}
this.$container.gridstack(this.options);this.grid=this.$container.data('gridstack');if(this.staticGrid){this.$container.on('click',function(e){_this.$container.css('height',_this.grid.getGridHeight(true)*_this.options.cellHeight);});setTimeout(function(){_this.$container.css('height',_this.grid.getGridHeight(true)*_this.options.cellHeight);},0);}
if(!this.staticGrid){this.grid.dd.on('.grid-stack-item','resize',function(e){_this.generateSizeLabel(e.currentTarget);});this.$container.on('change',function(e){var $fields=_this.getContainer().find('> .grid-stack-item');$fields.each(function(ind,elem){_this.generateSizeLabel(elem);});});setTimeout(function(){var $fields=_this.getContainer().find('> .grid-stack-item');$fields.each(function(ind,elem){_this.generateSizeLabel(elem);});},0);}
setTimeout(function(){_this.savedLayout=_this.getContainer().closest('.tab-pane').attr('data-layout-model')||'';},0);};MerlinGridSearchbox.prototype.generateSizeLabel=function(el){var $node=$(el),nodeData=$node.data('_gridstack_node');if(!_.isUndefined(nodeData)){$node.attr('data-size-label',nodeData.width+' x '+nodeData.height);}
else{$node.attr('data-size-label','_ x _');}};MerlinGridSearchbox.prototype.resetFields=function(){var _this=this;var $fields=this.getContainer().find('> .grid-stack-item'),posLeft=0,posTop=0,$lastField,lastWidth=0,fieldsMap=[],totalWidth=0;var defaultHeight=this.minFieldHeight,gridWidth=this.options.width;$fields.each(function(ind,elem){var $field=$(elem),minW=parseInt($field.attr('data-gs-min-width'));fieldsMap.push({elem:$field,minW:minW,});totalWidth+=minW;});this.grid.batchUpdate();$fields.each(function(ind,elem){var $field=$(elem),minW=parseInt($field.attr('data-gs-min-width'));if(posLeft+lastWidth+minW>gridWidth){if($lastField){_this.grid.update($lastField[0],posLeft,posTop,gridWidth-posLeft,defaultHeight);}
posLeft=0;posTop+=defaultHeight;}
else{posLeft+=lastWidth;}
_this.grid.update($field[0],posLeft,posTop,(ind+1===$fields.length)?(gridWidth-posLeft):minW,defaultHeight);lastWidth=minW;$lastField=$field;});this.grid.commit();};MerlinGridSearchbox.prototype.makeWide=function(){var _this=this;var $fields=this.getContainer().find('> .grid-stack-item'),fieldsLen=$fields.length,fieldWidth=Math.floor(24/fieldsLen),firstFieldAdditionalLen=24-(fieldWidth*fieldsLen);this.grid.batchUpdate();if(fieldWidth<4){var fieldsRows=Math.ceil(fieldsLen/6),fieldsLeft=fieldsLen,fieldsRowLen=Math.ceil(fieldsLen/fieldsRows);for(var ii=0;ii
=fieldsRowLen)?Math.floor(24/fieldsRowLen):Math.floor(24/fieldsLeft);firstFieldAdditionalLen=(fieldsLeft>=fieldsRowLen)?(24-(fieldWidth*fieldsRowLen)):(24-(fieldWidth*fieldsLeft));for(var jj=0;jj").attr("name",validator.submitButton.name).val($(validator.submitButton).val()).appendTo(validator.currentForm);}
result=validator.settings.submitHandler.call(validator,validator.currentForm,event);if(validator.submitButton){hidden.remove();}
if(result!==undefined){return result;}
return false;}
return true;}
if(validator.cancelSubmit){validator.cancelSubmit=false;return handle();}
if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false;}
return handle();}else{validator.focusInvalid();return false;}});}
return validator;},valid:function(){var valid,validator;if($(this[0]).is("form")){valid=this.validate().form();}else{valid=true;validator=$(this[0].form).validate();this.each(function(){valid=validator.element(this)&&valid;});}
return valid;},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value);});return result;},rules:function(command,argument){var element=this[0],settings,staticRules,existingRules,data,param,filtered;if(command){settings=$.data(element.form,"validator").settings;staticRules=settings.rules;existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));delete existingRules.messages;staticRules[element.name]=existingRules;if(argument.messages){settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages);}
break;case"remove":if(!argument){delete staticRules[element.name];return existingRules;}
filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method];if(method==="required"){$(element).removeAttr("aria-required");}});return filtered;}}
data=$.validator.normalizeRules($.extend({},$.validator.classRules(element),$.validator.attributeRules(element),$.validator.dataRules(element),$.validator.staticRules(element)),element);if(data.required){param=data.required;delete data.required;data=$.extend({required:param},data);$(element).attr("aria-required","true");}
if(data.remote){param=data.remote;delete data.remote;data=$.extend(data,{remote:param});}
return data;}});$.extend($.expr[":"],{blank:function(a){return!$.trim(""+$(a).val());},filled:function(a){return!!$.trim(""+$(a).val());},unchecked:function(a){return!$(a).prop("checked");}});$.validator=function(options,form){this.settings=$.extend(true,{},$.validator.defaults,options);this.currentForm=form;this.init();};$.validator.format=function(source,params){if(arguments.length===1){return function(){var args=$.makeArray(arguments);args.unshift(source);return $.validator.format.apply(this,args);};}
if(arguments.length>2&¶ms.constructor!==Array){params=$.makeArray(arguments).slice(1);}
if(params.constructor!==Array){params=[params];}
$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),function(){return n;});});return source;};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:false,focusInvalid:true,alwaysGetElementIdOrName:false,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:":hidden",ignoreTitle:false,onfocusin:function(element){this.lastActive=element;if(this.settings.focusCleanup){if(this.settings.unhighlight){this.settings.unhighlight.call(this,element,this.settings.errorClass,this.settings.validClass);}
this.hideThese(this.errorsFor(element));}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element);}},onkeyup:function(element,event){if(event.which===9&&this.elementValue(element)===""){return;}else if(element.name in this.submitted||element===this.lastElement){this.element(element);}},onclick:function(element){if(element.name in this.submitted){this.element(element);}else if(element.parentNode.name in this.submitted){this.element(element.parentNode);}},highlight:function(element,errorClass,validClass){if(element.type==="radio"){this.findByName(element.name).addClass(errorClass).removeClass(validClass);}else{$(element).addClass(errorClass).removeClass(validClass);}},unhighlight:function(element,errorClass,validClass){if(element.type==="radio"){this.findByName(element.name).removeClass(errorClass).addClass(validClass);}else{$(element).removeClass(errorClass).addClass(validClass);}}},setDefaults:function(settings){$.extend($.validator.defaults,settings);},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:$.validator.format("Please enter no more than {0} characters."),minlength:$.validator.format("Please enter at least {0} characters."),rangelength:$.validator.format("Please enter a value between {0} and {1} characters long."),range:$.validator.format("Please enter a value between {0} and {1}."),max:$.validator.format("Please enter a value less than or equal to {0}."),min:$.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={}),rules;$.each(this.settings.groups,function(key,value){if(typeof value==="string"){value=value.split(/\s/);}
$.each(value,function(index,name){groups[name]=key;});});rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value);});function delegate(event){var validator=$.data(this[0].form,"validator"),eventType="on"+event.type.replace(/^validate/,""),settings=validator.settings;if(settings[eventType]&&!this.is(settings.ignore)){settings[eventType].call(validator,this[0],event);}}
$(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, "+"[type='number'], [type='search'] ,[type='tel'], [type='url'], "+"[type='email'], [type='datetime'], [type='date'], [type='month'], "+"[type='week'], [type='time'], [type='datetime-local'], "+"[type='range'], [type='color'], [type='radio'], [type='checkbox']","focusin focusout keyup",delegate).validateDelegate("select, option, [type='radio'], [type='checkbox']","click",delegate);if(this.settings.invalidHandler){$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler);}
$(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true");},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid()){$(this.currentForm).triggerHandler("invalid-form",[this]);}
this.showErrors();return this.valid();},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i]);}
return this.valid();},element:function(element){var cleanElement=this.clean(element),checkElement=this.validationTargetFor(cleanElement),result=true;this.lastElement=checkElement;if(checkElement===undefined){delete this.invalid[cleanElement.name];}else{this.prepareElement(checkElement);this.currentElements=$(checkElement);result=this.check(checkElement)!==false;if(result){delete this.invalid[checkElement.name];}else{this.invalid[checkElement.name]=true;}}
$(element).attr("aria-invalid",!result);if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers);}
this.showErrors();return result;},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]});}
this.successList=$.grep(this.successList,function(element){return!(element.name in errors);});}
if(this.settings.showErrors){this.settings.showErrors.call(this,this.errorMap,this.errorList);}else{this.defaultShowErrors();}},resetForm:function(){if($.fn.resetForm){$(this.currentForm).resetForm();}
this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass).removeData("previousValue").removeAttr("aria-invalid");},numberOfInvalids:function(){return this.objectLength(this.invalid);},objectLength:function(obj){var count=0,i;for(i in obj){count++;}
return count;},hideErrors:function(){this.hideThese(this.toHide);},hideThese:function(errors){errors.not(this.containers).text("");this.addWrapper(errors).hide();},valid:function(){return this.size()===0;},size:function(){return this.errorList.length;},focusInvalid:function(){if(this.settings.focusInvalid){try{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin");}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name===lastActive.name;}).length===1&&lastActive;},elements:function(){var validator=this,rulesCache={};return $(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled], [readonly]").not(this.settings.ignore).filter(function(){if(!this.name&&validator.settings.debug&&window.console){console.error("%o has no name assigned",this);}
if(this.name in rulesCache||!validator.objectLength($(this).rules())){return false;}
rulesCache[this.name]=true;return true;});},clean:function(selector){return $(selector)[0];},errors:function(){var errorClass=this.settings.errorClass.split(" ").join(".");return $(this.settings.errorElement+"."+errorClass,this.errorContext);},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.currentElements=$([]);},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element);},elementValue:function(element){var val,$element=$(element),type=element.type;if(type==="radio"||type==="checkbox"){return $("input[name='"+element.name+"']:checked").val();}else if(type==="number"&&typeof element.validity!=="undefined"){return element.validity.badInput?false:$element.val();}
val=$element.val();if(typeof val==="string"){return val.replace(/\r/g,"");}
return val;},check:function(element){element=this.validationTargetFor(this.clean(element));var rules=$(element).rules(),rulesCount=$.map(rules,function(n,i){return i;}).length,dependencyMismatch=false,val=this.elementValue(element),result,method,rule;for(method in rules){rule={method:method,parameters:rules[method]};try{result=$.validator.methods[method].call(this,val,element,rule.parameters);if(result==="dependency-mismatch"&&rulesCount===1){dependencyMismatch=true;continue;}
dependencyMismatch=false;if(result==="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return;}
if(!result){this.formatAndAdd(element,rule);return false;}}catch(e){if(this.settings.debug&&window.console){console.log("Exception occurred when checking element "+element.id+", check the '"+rule.method+"' method.",e);}
throw e;}}
if(dependencyMismatch){return;}
if(this.objectLength(rules)){this.successList.push(element);}
return true;},customDataMessage:function(element,method){return $(element).data("msg"+method.charAt(0).toUpperCase()+
method.substring(1).toLowerCase())||$(element).data("msg");},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor===String?m:m[method]);},findDefined:function(){for(var i=0;iWarning: No message defined for "+element.name+"");},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method),theregex=/\$?\{(\d+)\}/g;if(typeof message==="function"){message=message.call(this,rule.parameters,element);}else if(theregex.test(message)){message=$.validator.format(message.replace(theregex,"{$1}"),rule.parameters);}
this.errorList.push({message:message,element:element,method:rule.method});this.errorMap[element.name]=message;this.submitted[element.name]=message;},addWrapper:function(toToggle){if(this.settings.wrapper){toToggle=toToggle.add(toToggle.parent(this.settings.wrapper));}
return toToggle;},defaultShowErrors:function(){var i,elements,error;for(i=0;this.errorList[i];i++){error=this.errorList[i];if(this.settings.highlight){this.settings.highlight.call(this,error.element,this.settings.errorClass,this.settings.validClass);}
this.showLabel(error.element,error.message);}
if(this.errorList.length){this.toShow=this.toShow.add(this.containers);}
if(this.settings.success){for(i=0;this.successList[i];i++){this.showLabel(this.successList[i]);}}
if(this.settings.unhighlight){for(i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass,this.settings.validClass);}}
this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show();},validElements:function(){return this.currentElements.not(this.invalidElements());},invalidElements:function(){return $(this.errorList).map(function(){return this.element;});},showLabel:function(element,message){var place,group,errorID,error=this.errorsFor(element),elementID=this.idOrName(element),describedBy=$(element).attr("aria-describedby");if(error.length){error.removeClass(this.settings.validClass).addClass(this.settings.errorClass);error.html(message);}else{error=$("<"+this.settings.errorElement+">").attr("id",elementID+"-error").addClass(this.settings.errorClass).html(message||"");place=error;if(this.settings.wrapper){place=error.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();}
if(this.labelContainer.length){this.labelContainer.append(place);}else if(this.settings.errorPlacement){this.settings.errorPlacement(place,$(element));}else{place.insertAfter(element);}
if(error.is("label")){error.attr("for",elementID);}else if(error.parents("label[for='"+elementID+"']").length===0){errorID=error.attr("id").replace(/(:|\.|\[|\])/g,"\\$1");if(!describedBy){describedBy=errorID;}else if(!describedBy.match(new RegExp("\\b"+errorID+"\\b"))){describedBy+=" "+errorID;}
$(element).attr("aria-describedby",describedBy);group=this.groups[element.name];if(group){$.each(this.groups,function(name,testgroup){if(testgroup===group){$("[name='"+name+"']",this.currentForm).attr("aria-describedby",error.attr("id"));}});}}}
if(!message&&this.settings.success){error.text("");if(typeof this.settings.success==="string"){error.addClass(this.settings.success);}else{this.settings.success(error,element);}}
this.toShow=this.toShow.add(error);},errorsFor:function(element){var name=this.idOrName(element),describer=$(element).attr("aria-describedby"),selector="label[for='"+name+"'], label[for='"+name+"'] *";if(describer){selector=selector+", #"+describer.replace(/\s+/g,", #");}
return this.errors().filter(selector);},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)&&!this.settings.alwaysGetElementIdOrName?element.name:element.id||element.name);},validationTargetFor:function(element){if(this.checkable(element)){element=this.findByName(element.name);}
return $(element).not(this.settings.ignore)[0];},checkable:function(element){return(/radio|checkbox/i).test(element.type);},findByName:function(name){return $(this.currentForm).find("[name='"+name+"']");},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case"select":return $("option:selected",element).length;case"input":if(this.checkable(element)){return this.findByName(element.name).filter(":checked").length;}}
return value.length;},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true;},dependTypes:{"boolean":function(param){return param;},"string":function(param,element){return!!$(param,element.form).length;},"function":function(param,element){return param(element);}},optional:function(element){var val=this.elementValue(element);return!$.validator.methods.required.call(this,val,element)&&"dependency-mismatch";},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true;}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0;}
delete this.pending[element.name];if(valid&&this.pendingRequest===0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();this.formSubmitted=false;}else if(!valid&&this.pendingRequest===0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false;}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",{old:null,valid:true,message:this.defaultMessage(element,"remote")});}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},number:{number:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){if(className.constructor===String){this.classRuleSettings[className]=rules;}else{$.extend(this.classRuleSettings,className);}},classRules:function(element){var rules={},classes=$(element).attr("class");if(classes){$.each(classes.split(" "),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this]);}});}
return rules;},attributeRules:function(element){var rules={},$element=$(element),type=element.getAttribute("type"),method,value;for(method in $.validator.methods){if(method==="required"){value=element.getAttribute(method);if(value===""){value=true;}
value=!!value;}else{value=$element.attr(method);}
if(/min|max/.test(method)&&(type===null||/number|range|text/.test(type))){value=Number(value);}
if(value||value===0){rules[method]=value;}else if(type===method&&type!=="range"){rules[method]=true;}}
if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength;}
return rules;},dataRules:function(element){var method,value,rules={},$element=$(element);for(method in $.validator.methods){value=$element.data("rule"+method.charAt(0).toUpperCase()+method.substring(1).toLowerCase());if(value!==undefined){rules[method]=value;}}
return rules;},staticRules:function(element){var rules={},validator=$.data(element.form,"validator");if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{};}
return rules;},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return;}
if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break;}
if(keepRule){rules[prop]=val.param!==undefined?val.param:true;}else{delete rules[prop];}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter;});$.each(["minlength","maxlength"],function(){if(rules[this]){rules[this]=Number(rules[this]);}});$.each(["rangelength","range"],function(){var parts;if(rules[this]){if($.isArray(rules[this])){rules[this]=[Number(rules[this][0]),Number(rules[this][1])];}else if(typeof rules[this]==="string"){parts=rules[this].replace(/[\[\]]/g,"").split(/[\s,]+/);rules[this]=[Number(parts[0]),Number(parts[1])];}}});if($.validator.autoCreateRanges){if(rules.min!=null&&rules.max!=null){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max;}
if(rules.minlength!=null&&rules.maxlength!=null){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength;}}
return rules;},normalizeRule:function(data){if(typeof data==="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true;});data=transformed;}
return data;},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message!==undefined?message:$.validator.messages[name];if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name));}},methods:{required:function(value,element,param){if(!this.depend(param,element)){return"dependency-mismatch";}
if(element.nodeName.toLowerCase()==="select"){var val=$(element).val();return val&&val.length>0;}
if(this.checkable(element)){return this.getLength(value,element)>0;}
return $.trim(value).length>0;},email:function(value,element){return this.optional(element)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(value);},url:function(value,element){return this.optional(element)||/^(https?|s?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.test(value);},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value).toString());},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value);},creditcard:function(value,element){if(this.optional(element)){return"dependency-mismatch";}
if(/[^0-9 \-]+/.test(value)){return false;}
var nCheck=0,nDigit=0,bEven=false,n,cDigit;value=value.replace(/\D/g,"");if(value.length<13||value.length>19){return false;}
for(n=value.length-1;n>=0;n--){cDigit=value.charAt(n);nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9){nDigit-=9;}}
nCheck+=nDigit;bEven=!bEven;}
return(nCheck%10)===0;},minlength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength(value,element);return this.optional(element)||length>=param;},maxlength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength(value,element);return this.optional(element)||length<=param;},rangelength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength(value,element);return this.optional(element)||(length>=param[0]&&length<=param[1]);},min:function(value,element,param){return this.optional(element)||value>=param;},max:function(value,element,param){return this.optional(element)||value<=param;},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1]);},equalTo:function(value,element,param){var target=$(param);if(this.settings.onfocusout){target.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){$(element).valid();});}
return value===target.val();},remote:function(value,element,param){if(this.optional(element)){return"dependency-mismatch";}
var previous=this.previousValue(element),validator,data;if(!this.settings.messages[element.name]){this.settings.messages[element.name]={};}
previous.originalMessage=this.settings.messages[element.name].remote;this.settings.messages[element.name].remote=previous.message;param=typeof param==="string"&&{url:param}||param;if(previous.old===value){return previous.valid;}
previous.old=value;validator=this;this.startRequest(element);data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,context:validator.currentForm,success:function(response){var valid=response===true||response==="true",errors,message,submitted;validator.settings.messages[element.name].remote=previous.originalMessage;if(valid){submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);delete validator.invalid[element.name];validator.showErrors();}else{errors={};message=response||validator.defaultMessage(element,"remote");errors[element.name]=previous.message=$.isFunction(message)?message(value):message;validator.invalid[element.name]=true;validator.showErrors(errors);}
previous.valid=valid;validator.stopRequest(element,valid);}},param));return"pending";}}});$.format=function deprecated(){throw"$.format has been deprecated. Please use $.validator.format instead.";};var pendingRequests={},ajax;if($.ajaxPrefilter){$.ajaxPrefilter(function(settings,_,xhr){var port=settings.port;if(settings.mode==="abort"){if(pendingRequests[port]){pendingRequests[port].abort();}
pendingRequests[port]=xhr;}});}else{ajax=$.ajax;$.ajax=function(settings){var mode=("mode"in settings?settings:$.ajaxSettings).mode,port=("port"in settings?settings:$.ajaxSettings).port;if(mode==="abort"){if(pendingRequests[port]){pendingRequests[port].abort();}
pendingRequests[port]=ajax.apply(this,arguments);return pendingRequests[port];}
return ajax.apply(this,arguments);};}
$.extend($.fn,{validateDelegate:function(delegate,type,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments);}});}});}));(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","./jquery.validate"],factory);}else{factory(jQuery);}}(function($){(function(){function stripHtml(value){return value.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-âââ]*/g,"");}
$.validator.addMethod("maxWords",function(value,element,params){return this.optional(element)||stripHtml(value).match(/\b\w+\b/g).length<=params;},$.validator.format("Please enter {0} words or less."));$.validator.addMethod("minWords",function(value,element,params){return this.optional(element)||stripHtml(value).match(/\b\w+\b/g).length>=params;},$.validator.format("Please enter at least {0} words."));$.validator.addMethod("rangeWords",function(value,element,params){var valueStripped=stripHtml(value),regex=/\b\w+\b/g;return this.optional(element)||valueStripped.match(regex).length>=params[0]&&valueStripped.match(regex).length<=params[1];},$.validator.format("Please enter between {0} and {1} words."));}());$.validator.addMethod("accept",function(value,element,param){var typeParam=typeof param==="string"?param.replace(/\s/g,"").replace(/,/g,"|"):"image/*",optionalValue=this.optional(element),i,file;if(optionalValue){return optionalValue;}
if($(element).attr("type")==="file"){typeParam=typeParam.replace(/\*/g,".*");if(element.files&&element.files.length){for(i=0;i9&&phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/);},"Please specify a valid mobile number");$.validator.addMethod("nieES",function(value){"use strict";value=value.toUpperCase();if(!value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")){return false;}
if(/^[T]{1}/.test(value)){return(value[8]===/^[T]{1}[A-Z0-9]{8}$/.test(value));}
if(/^[XYZ]{1}/.test(value)){return(value[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(value.replace("X","0").replace("Y","1").replace("Z","2").substring(0,8)%23));}
return false;},"Please specify a valid NIE number.");$.validator.addMethod("nifES",function(value){"use strict";value=value.toUpperCase();if(!value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")){return false;}
if(/^[0-9]{8}[A-Z]{1}$/.test(value)){return("TRWAGMYFPDXBNJZSQVHLCKE".charAt(value.substring(8,0)%23)===value.charAt(8));}
if(/^[KLM]{1}/.test(value)){return(value[8]===String.fromCharCode(64));}
return false;},"Please specify a valid NIF number.");$.validator.addMethod("nowhitespace",function(value,element){return this.optional(element)||/^\S+$/i.test(value);},"No white space please");$.validator.addMethod("pattern",function(value,element,param){if(this.optional(element)){return true;}
if(typeof param==="string"){param=new RegExp(param);}
return param.test(value);},"Invalid format.");$.validator.addMethod("phoneNL",function(value,element){return this.optional(element)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);},"Please specify a valid phone number.");$.validator.addMethod("phoneUK",function(phone_number,element){phone_number=phone_number.replace(/\(|\)|\s+|-/g,"");return this.optional(element)||phone_number.length>9&&phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);},"Please specify a valid phone number");$.validator.addMethod("phoneUS",function(phone_number,element){phone_number=phone_number.replace(/\s+/g,"");return this.optional(element)||phone_number.length>9&&phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/);},"Please specify a valid phone number");$.validator.addMethod("phonesUK",function(phone_number,element){phone_number=phone_number.replace(/\(|\)|\s+|-/g,"");return this.optional(element)||phone_number.length>9&&phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/);},"Please specify a valid uk phone number");$.validator.addMethod("postalCodeCA",function(value,element){return this.optional(element)||/^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test(value);},"Please specify a valid postal code");$.validator.addMethod("postalcodeIT",function(value,element){return this.optional(element)||/^\d{5}$/.test(value);},"Please specify a valid postal code");$.validator.addMethod("postalcodeNL",function(value,element){return this.optional(element)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);},"Please specify a valid postal code");$.validator.addMethod("postcodeUK",function(value,element){return this.optional(element)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);},"Please specify a valid UK postcode");$.validator.addMethod("require_from_group",function(value,element,options){var $fields=$(options[1],element.form),$fieldsFirst=$fields.eq(0),validator=$fieldsFirst.data("valid_req_grp")?$fieldsFirst.data("valid_req_grp"):$.extend({},this),isValid=$fields.filter(function(){return validator.elementValue(this);}).length>=options[0];$fieldsFirst.data("valid_req_grp",validator);if(!$(element).data("being_validated")){$fields.data("being_validated",true);$fields.each(function(){validator.element(this);});$fields.data("being_validated",false);}
return isValid;},$.validator.format("Please fill at least {0} of these fields."));$.validator.addMethod("skip_or_fill_minimum",function(value,element,options){var $fields=$(options[1],element.form),$fieldsFirst=$fields.eq(0),validator=$fieldsFirst.data("valid_skip")?$fieldsFirst.data("valid_skip"):$.extend({},this),numberFilled=$fields.filter(function(){return validator.elementValue(this);}).length,isValid=numberFilled===0||numberFilled>=options[0];$fieldsFirst.data("valid_skip",validator);if(!$(element).data("being_validated")){$fields.data("being_validated",true);$fields.each(function(){validator.element(this);});$fields.data("being_validated",false);}
return isValid;},$.validator.format("Please either skip these fields or fill at least {0} of them."));jQuery.validator.addMethod("stateUS",function(value,element,options){var isDefault=typeof options==="undefined",caseSensitive=(isDefault||typeof options.caseSensitive==="undefined")?false:options.caseSensitive,includeTerritories=(isDefault||typeof options.includeTerritories==="undefined")?false:options.includeTerritories,includeMilitary=(isDefault||typeof options.includeMilitary==="undefined")?false:options.includeMilitary,regex;if(!includeTerritories&&!includeMilitary){regex="^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";}else if(includeTerritories&&includeMilitary){regex="^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";}else if(includeTerritories){regex="^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";}else{regex="^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";}
regex=caseSensitive?new RegExp(regex):new RegExp(regex,"i");return this.optional(element)||regex.test(value);},"Please specify a valid state");$.validator.addMethod("strippedminlength",function(value,element,param){return $(value).text().length>=param;},$.validator.format("Please enter at least {0} characters"));$.validator.addMethod("time",function(value,element){return this.optional(element)||/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/.test(value);},"Please enter a valid time, between 00:00 and 23:59");$.validator.addMethod("time12h",function(value,element){return this.optional(element)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);},"Please enter a valid time in 12-hour am/pm format");$.validator.addMethod("url2",function(value,element){return this.optional(element)||/^(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.test(value);},$.validator.messages.url);$.validator.addMethod("vinUS",function(v){if(v.length!==17){return false;}
var LL=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],VL=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],FL=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],rs=0,i,n,d,f,cd,cdv;for(i=0;i<17;i++){f=FL[i];d=v.slice(i,i+1);if(i===8){cdv=d;}
if(!isNaN(d)){d*=f;}else{for(n=0;n';for(var i=0;i<7;i++){if(i==6)
daysPanel+=''+this.days[0]+' | ';else
daysPanel+=''+this.days[i+1]+' | ';}
daysPanel+='';return daysPanel;};Calendar.prototype.getCalendarDayTableContent=function(displayedYear,displayedMonth,dates,hasLimits){if(hasLimits===void 0){hasLimits=false;}
var numOfDays=Calendar.getNumberOfDays(displayedYear,displayedMonth);var startingDay=Calendar.getFirstDayOfTheMonth(displayedYear,displayedMonth);var calendarTableContent='';calendarTableContent+=''
+this.monthsToChoose[displayedMonth]+' '+displayedYear+' |
'
+this.getDaysOfTheWeekTable()+'';var renderCellNumber;var disabledCell;var selectedCell;for(var i=0;i';for(var j=0;j<7;j++){renderCellNumber=1+j+i*7-startingDay;if(j+i*7 ';else{disabledCell=''+renderCellNumber+' | ';selectedCell=''+renderCellNumber+' | ';if(renderCellNumberdates.comebackDate.day&&hasLimits){calendarTableContent+=disabledCell;continue;}}}
if(dates.departureDate){if(displayedYear==dates.departureDate.year&&displayedMonth==dates.departureDate.month&&renderCellNumber==dates.departureDate.day){calendarTableContent+=selectedCell;continue;}}
if(dates.lastDate){if(displayedYear==dates.lastDate.year&&displayedMonth==dates.lastDate.month&&renderCellNumber==dates.lastDate.day){calendarTableContent+=selectedCell;continue;}}
calendarTableContent+=''+renderCellNumber+' | ';}
else{break;}}}
calendarTableContent+='';}
calendarTableContent+='';return calendarTableContent;};Calendar.prototype.checkPreviousMonth=function(year,month,currentDate){var prefix='';if(month-1>-1){return prefix+this.shortMonths[month-1]+'';}
else
return prefix+this.shortMonths[11]+'';};Calendar.prototype.checkNextMonth=function(year,month,finalDate){var prefix='';if(month+1<12){return prefix+this.shortMonths[month+1]+' ';}
else
return prefix+this.shortMonths[0]+' ';};Calendar.getNumberOfDays=function(year,month){var d=new Date(year,month+1,0);return d.getDate();};Calendar.getFirstDayOfTheMonth=function(year,month){var d=new Date(year,month,1);var dw=d.getDay()-1;if(dw==-1)
dw=6;return dw;};return Calendar;}());jQuery.expr[':'].parents=function(_elem,_i,_mSelector){return jQuery(_elem).parents(_mSelector[3]).length<1;};$.fn.searchBox=function(runSessionStorage){if(typeof runSessionStorage==='undefined'||runSessionStorage==false)
{runSessionStorage=false;}
try{sessionStorage.setItem('mod','mod');sessionStorage.removeItem('mod');}catch(e){runSessionStorage=false;}
try{$.fn.select2();$.fn.qtip();}catch(msg){return console.error('Missing SearchBox dependencies!\nCheck: jQuery, Select2, Qtip2');}
return this.each(function(index,element){new SearchBox(element,runSessionStorage);});};function inputMapIconPosition(){$('.search-hotel-location','.search-box').each(function(){var $findMapLabel=$(this).parent('.mc-input-container');if($findMapLabel.length){var labelWidth=$findMapLabel.find('.hotels-map-location-map-icon').innerWidth();if(labelWidth&&labelWidth>1){var tmp=labelWidth+5;tmp=tmp.toString()+'px';$findMapLabel.find('.mc-btn-clear').css('right',tmp);}}});}
function SearchBox(section,hasSessionStorage){"use strict";var $section=$(section),searchBox=this,$tabs=$section.find('.nav-tabs li a'),sectionId=$section.attr('id'),sectionSessionId=$section.parent().attr('data-widget-id')+'-',activeForm,searchType,searchDeparture,searchParking,searchAttributes,searchHtlTourOp,$btnSend,layout=parseInt($section.find('.tab-content').attr('data-layout'))||0,subsidiaryInputs={'attr':[],'hto':[],'dep':[],'obj':[],'to':[],'prk':[]},searchString="",ticketChange=(window['ticketchange']!==undefined)?window['ticketchange']:false,tabsMap={nf:0,ow:1,mf:2};this.setSessionStorageItem=function(name,value,text){if(hasSessionStorage){sessionStorage[sectionSessionId+name]=value+(text||'');}};this.getSessionStorageItem=function(name){return sessionStorage[sectionSessionId+name];};this.removeSessionStorageItem=function(name){sessionStorage.removeItem(sectionSessionId+name);};this.init=function(){setSbDefaultValues();var tabId;if(hasSessionStorage){getHistoryField();}
if($tabs.length){var currentTab=(ticketChange)?tabsMap[ticketChange['ticketchange-search']]:searchBox.getSessionStorageItem('tab');if(ticketChange||hasSessionStorage&¤tTab){$section.find('a[href="#'+sectionId+'-'+currentTab+'"]').click().not('.js-custom-color').css('color','');}
sectionSessionId=(sectionId+'-'+(currentTab||0)+'-');$tabs.on('click',function(){var $this=$(this),href=$this.attr('href').slice(1),$tab=$section.find('#'+href);if(hasSessionStorage){sectionSessionId=href+'-';searchBox.setSessionStorageItem('tab',href.split('-')[1]);}
expandMobileShortForm($section);$section.find('[data-hasqtip]').each(function(){$(this).qtip('hide');});if(!ticketChange){getTabFieldsDataFromSessionStorage($('#'+href));}
getActiveForm('#'+href);var $tabWrapper=$this.parent('li');if(!$tabWrapper.is('.active')&&$this.attr('data-inactive-color').length){$this.not('.js-custom-color').css('color','');$tabWrapper.siblings('li').not($tabWrapper).children('a').not('.js-custom-color').css('color',$this.attr('data-inactive-color'));}
closePanel();$section.find('.historyBox').hide();$section.find('.sb-side-panel-abort').filter(':visible').click();if(typeof $tab.attr('data-participant')!=typeof undefined||typeof $tab.attr('data-double-room')!=typeof undefined){$tab.find('.sb-side-panel-content').each(function(){var html='',$thisPanel=$(this);var $sidePanel=$thisPanel.closest('.sb-side-panel');var participantsHTML=''+translations.participantsTitle+'';var insuranceHTML=''+translations.insuranceParticipantsTitle+'';$thisPanel.find('.searchbox-element').each(function(){var $this=$(this);if(hasSessionStorage){var $selectChildren=$this.children('select');var $selectChildrenName=$selectChildren.attr('name');var sessionParticipantVal=searchBox.getSessionStorageItem($selectChildrenName);var $counterContainer=$this.siblings('.counter-container');var $counter=$counterContainer.find('input.pass-counter');if($selectChildrenName==='ad'&&sessionParticipantVal===undefined){sessionParticipantVal=searchBox.getSessionStorageItem('adt');}
if(sessionParticipantVal!==undefined&&sessionParticipantVal!==null&&$selectChildrenName!==undefined){$selectChildren.val(sessionParticipantVal).change();$counter.val(sessionParticipantVal);}}
if(($this.children('select').val()!='')&&($this.children('select').val()!=0)&&(typeof $this.children('select').val()!=typeof undefined)){html+=''+$.trim($this.find('select option:selected').text())+', ';}});if($sidePanel.hasClass('sb-side-panel-1')){if(html==''){html=participantsHTML;}
$tab.find('[data-field-type="htldoubleroom-1"]').find('input.participants-content[data-name="d-1"]').siblings('.mc-input').html(html);}else if($sidePanel.hasClass('sb-side-panel-2')){if(html==''){html=participantsHTML;}
$tab.find('[data-field-type="htldoubleroom-2"]').find('input.participants-content[data-name="d-2"]').siblings('.mc-input').html(html);}else if($sidePanel.hasClass('sb-side-panel-prt')){if(layout==3){var allSelectsValue=0;var allSelects=$sidePanel.find('.searchbox-element').find('select');allSelects.each(function(){allSelectsValue+=parseInt($(this).val());});html=''+translations.numberOfPersons({'num':allSelectsValue})+'';}else{if(html==''){html=participantsHTML;}}
$tab.find('input.participants-content[data-name="participants"]').siblings('.mc-input').html(html);}else if($sidePanel.hasClass('sb-side-panel-ins')){if(html==''){html=insuranceHTML;}
$tab.find('input.participants-content[data-name="insuranceparticipant"]').siblings('.mc-input').html(html);}
html='';});}
if(!(typeof $this.attr('data-history')!=typeof undefined)){$('.historyBox').hide();}});tabId=$section.find('.nav-tabs li.active a').attr('href');if(layout==3){$tabs.on('shown.bs.tab',function(e){$section.trigger('checkWideSearchboxFields');});}}else{tabId='#'+sectionId;}
getActiveForm(tabId);setUpFields();if(!ticketChange){getTabFieldsDataFromSessionStorage($(tabId));}
setUpListeners();if(ticketChange&&ticketChange["booking-pax"]){setParticipantsForTicketChange();}
setUpMultidynamicValidation($section);trunOnSessionStorage();configureGrid($section);correctDatesSuccession($section);if($section.find('.tab-pane[data-participant="1"]').length>0||$section.find('.tab-pane[data-double-room="1"]').length>0||$section.find('.tab-pane[data-insurance-participants="1"]').length>0){setUpSidePanel();setUpSidePanelFields();}
$section.ready(function(){setUpNavTabs($section);setUpMobileShortForm($section);});$(window).resize(function(){setUpNavTabs($section);setUpMobileShortForm($section);});};function correctFieldValues($tab){var layout=parseInt($tab.parent('.tab-content').attr('data-layout'))||0;if(layout===3){var $dateField=$tab.find('.wide-searchbox-input-2');if($dateField.val()){$dateField.trigger('displayDate');}}}
function correctDatesSuccession($section){var _MS_PER_DAY=1000*60*60*24;function dateDiffInDays(a,b){var utc1=Date.UTC(a.getFullYear(),a.getMonth(),a.getDate());var utc2=Date.UTC(b.getFullYear(),b.getMonth(),b.getDate());return Math.floor((utc2-utc1)/_MS_PER_DAY);}
function setSuccessorValidDate($dateFrom,$dateTo,daysToAdd){if(!$dateFrom||!$dateFrom.length||$dateFrom.val()==''||!$dateTo||!$dateTo.length||$dateTo.val()==''){return;}
var dateString1=$dateFrom.val().replace(/[^0-9\.]/g,'');var dateString2=$dateTo.val().replace(/[^0-9\.]/g,'');dateString1=dateString1.substr(6,4)+"-"+dateString1.substr(3,2)+"-"+dateString1.substr(0,2);dateString2=dateString2.substr(6,4)+"-"+dateString2.substr(3,2)+"-"+dateString2.substr(0,2);var date1=new Date(dateString1);var date2=new Date(dateString2);var dDiff=dateDiffInDays(date1,date2);if(!(dDiff(baseWidth*12))
_$section.attr('merlin-grid','12');else if(sectionWidth>(baseWidth*8))
_$section.attr('merlin-grid','8');else if(sectionWidth>(baseWidth*6))
_$section.attr('merlin-grid','6');else
_$section.attr('merlin-grid','4');}else{var classList=_$sectionContainer.attr('class'),gridNumber=(/col-lg-(\d{1,2})/g).exec(classList);if(gridNumber)
_$sectionContainer.attr('merlin-grid',gridNumber[1]);else
_$sectionContainer.attr('merlin-grid',12);}}
function getOpenerPosition($panel,$inputContainer){if($inputContainer.length>0){var inputContainerHeight=$inputContainer.outerHeight();var offsetLeft=$inputContainer.offset().left-$section.offset().left;var offsetRight=$inputContainer.offset().right-$section.offset().right;var offsetTop=$inputContainer.offset().top-$section.offset().top;$panel.css('top',offsetTop+inputContainerHeight+14);if(offsetLeft+$panel.width()+$section.offset().left>window.innerWidth&&$panel.hasClass('right-side-panel')){$panel.css('right',(offsetRight?offsetRight:'15px'));$panel.css('left','');}else{$panel.css('left',offsetLeft);$panel.css('right','');}}}
function setUpSidePanel(){var offsetLeft=$section.offset().left;var offsetRight=$(window).width()-($section.offset().left+$section.outerWidth());var $panel=$section.find('.sb-side-panel').removeClass('left-side-panel right-side-panel full-side-panel');var display=$panel.css("display");if($(window).width()/21.0){$panel.addClass('right-side-panel');}else if($section.width()>900){$panel.addClass('full-side-panel');}else{$panel.addClass('left-side-panel');}
if(window.innerWidth<992){$panel.addClass('mobile-sb-side-panel');$panel.removeAttr('style');$panel.css("display",display);$panel.find('.sb-side-panel-content').css('height',window.innerHeight-100);}else{var $inputContainer=$(document).find('.qtip-open');getOpenerPosition($panel,$inputContainer);$panel.removeClass('mobile-sb-side-panel');$panel.find('.sb-side-panel-content').css('height','auto');}}
function openPanel($this,validateInput){var $panel;setUpSidePanel();if(validateInput){$panel=$this.closest('.sb-side-panel');}else{switch($this.attr('data-field-type')){case'htldoubleroom-1':$panel=$this.closest('.row').siblings('.sb-side-panel-1');break;case'htldoubleroom-2':$panel=$this.closest('.row').siblings('.sb-side-panel-2');break;case'insuranceparticipant':$panel=$this.closest('.row').siblings('.sb-side-panel-ins');break;case'participants':$panel=$this.closest('.row').siblings('.sb-side-panel-prt');}}
$section=$panel.closest('section.search-box');if(layout==4){$panel.addClass('sb-side-panel-grid');}
$panel.show();resizePanel($panel);var $formActionButtons=$this.closest('form').find('.btn-send, .btn-reset');var display=$panel.css("display");$formActionButtons.css({'opacity':'.5','pointer-events':'none','cursor':'default'});if(window.innerWidth<992){$('html, body').css({'overflow':'hidden','height':'100%'});}
var $inputContainer=$this.find('.mc-input-container').addClass('qtip-open');getOpenerPosition($panel,$inputContainer);if(window.innerWidth<992){$panel.removeAttr('style');$panel.css("display",display);}
$section.closest('.sortable-col').css('z-index',99);if(layout==3||layout==4){var $participantsOverlay=$('');$panel.before($participantsOverlay);$participantsOverlay.one('click',function(){$('.sb-side-panel-abort').filter(':visible').trigger('click');});}
checkVisibility($panel);$('.pass-counter').trigger('change');}
function resizePanel($panel){if(window.innerWidth<992&&$panel.css('display')==='block'){$('html, body').css({'overflow':'hidden','height':'100%'});return;}
var isTourop=!!$('.js-vcms-container').length;var $sectionSB=$panel.closest('section.search-box');var $sbHeader=$sectionSB.find('.section-header');var $sbContent=$sectionSB.find('.section-content');var sbHeaderHeight=$sbHeader.is(':visible')?$sbHeader.outerHeight():0;var sbContentHeight=$sbContent.outerHeight();var searchBoxHeight=$sectionSB.outerHeight();var $panelTitle=$panel.find('.sb-side-panel-title');var $panelContent=$panel.find('.sb-side-panel-content');var $panelConfirmation=$panel.find('.sb-side-panel-confirmation');$panel.closest('.tab-content').css('position','static');$('html, body').css({'overflow':'','height':''});}
function closePanel($sec){$section=$sec||$section;layout=$section.find('.tab-content').attr('data-layout');$section.find('.participants.qtip-open').removeClass('qtip-open');$section.find('.sb-side-panel').hide().find('[data-hasqtip]').qtip('hide');$section.find('.btn-send, .btn-reset').css({'opacity':'1','pointer-events':'auto','cursor':'pointer'});$('html, body').css({'overflow':'','height':''});if(layout==3||layout==4){$('.participants-overlay').remove();}
$section.closest('.sortable-col').css('z-index','');}
function checkVisibility($panel){var docViewTop=$(window).scrollTop();var elemTop=$panel.offset().top;if(elemTop input[name="transport"]').val();}
function getParticipantsFieldTypes($panel){var participantsFields=[],fieldTypes=['adt','yth','inf','chd','stu','sen','sea','mil'];$panel.find('.searchbox-element').each(function(index){var fieldType=$(this).attr('data-field-type');if(fieldTypes.indexOf(fieldType)!==-1){participantsFields.push(fieldType);}});return participantsFields;}
function labelFrom(participantType,ageFrom,ageTo){var participantTypesMap=Object.freeze({'adt':'Adults','yth':'Youth','chd':'Children','inf':'Infants','stu':'Students','sen':'Seniors','sea':'Seamen','mil':'Military',}),isAgeToInfinite=isNaN(parseInt(ageTo)),label=isAgeToInfinite?translations['prtc'+participantTypesMap[participantType]+'WithAgeFrom']({'fromAge':ageFrom,}):translations['prtc'+participantTypesMap[participantType]+'WithAge']({'fromAge':ageFrom,'toAge':ageTo,});return label;}
function updateChildrenNumberField($panel,ageFrom,ageTo){var $childrenNumber=$panel.is('.children-number')?$panel:$panel.find('.children-number');$childrenNumber.attr('data-limit-closest-years',ageFrom).attr('data-max-years-back',ageTo+1);}
function updateAgeLabelsAndCalendars($panel,isCalendar){var tabType=getTabType($panel);var participantsAgeObj=getCountryAgeObject(tabType);var participantsFieldTypes=getParticipantsFieldTypes($panel);if(participantsFieldTypes.length>0){$panel.find('.searchbox-element').each(function(ind,elem){var $elem=$(elem),fieldType=$elem.attr('data-field-type');if(participantsFieldTypes.indexOf(fieldType)!==-1){var $labelElem=$elem.siblings('.input-label').children('.js-participant-label'),label,ageFrom=participantsAgeObj[fieldType].ageFrom,ageTo=participantsAgeObj[fieldType].ageTo;if(fieldType==='chd'){if($elem.closest('div.tab-pane').attr('data-iscampsearch')){ageFrom=$elem.data('min-child-age');ageTo=$elem.data('max-child-age');}
else{if(participantsFieldTypes.indexOf('yth')!==-1){ageTo=participantsAgeObj.yth.ageFrom-1;}
if(participantsFieldTypes.indexOf('inf')!==-1){ageFrom=participantsAgeObj.inf.ageTo+1;}}
updateChildrenNumberField($panel,ageFrom,ageTo);}
if(fieldType==='adt'){if(participantsFieldTypes.indexOf('yth')!==-1){ageFrom=participantsAgeObj.yth.ageTo+1;}}
if(fieldType==='adt'&&tabType!=='rflight'){label=translations.adt;}else if(fieldType==='chd'&&!isCalendar){label=translations.prtcChildren;}else{label=labelFrom(fieldType,ageFrom,ageTo);}
$labelElem.html(label);}});}
else{updateChildrenNumberField($panel,participantsAgeObj['inf'].ageFrom,participantsAgeObj['chd'].ageTo);}}
function setParticipantsForTicketChange(){var $sidePanel=$(".sb-side-panel-content",$section);var pax=JSON.parse(ticketChange["booking-pax"]);var birthdateContainersMap={chd:'.children-container',inf:'.child-container'};for(var pType in pax){var $fieldType=$("[data-field-type='"+pType+"']",$sidePanel);var count=pax[pType]["count"];var birthdates=pax[pType]["birthdates"];if($fieldType.length){$fieldType.find("select").val(count).trigger("change");if(birthdates.length&&birthdateContainersMap.hasOwnProperty(pType)){var $birthInputsContainer=$(birthdateContainersMap[pType],$sidePanel);var $birthInputs=$("input[type='hidden']",$birthInputsContainer);if($birthInputs.length){for(var i=0;i<$birthInputs.length;i++){$($birthInputs[i]).val(birthdates[i]).trigger("change");}}}}}}
function setUpSidePanelFields(){var counterInput=''+''+''+''+''+'
',$passengerGroupField=$('[data-field-type=\'passengerTypes\']'),html='',$counterContainer,$counter;$section.find('.tab-pane[data-participant="1"], .tab-pane[data-double-room="1"], .tab-pane[data-insurance-participants="1"]').each(function(){var $thisTab=$(this);$(this).find('.sb-side-panel-content').each(function(){var $thisPanel=$(this);var $sidePanel=$thisPanel.closest('.sb-side-panel');var isInsurance=!!$sidePanel.hasClass('sb-side-panel-ins');var participantsHTML=''+translations.participantsTitle+'';var insuranceHTML=''+translations.insuranceParticipantsTitle+'';var valCounter=0;var $tripParticipants=$thisTab.find('div[data-trip-participants]');if($tripParticipants.length){$thisPanel.attr('data-trip-only','1');$tripParticipants.find('.searchbox-element').each(function(index,elem){var newLabel=index==0?'adt':'chd';$(elem).attr('data-field-type',newLabel);index==1?$(elem).addClass('children-number children-contain'):null;}).prependTo($thisPanel);}
if(!isInsurance){$thisPanel.children('.searchbox-element').each(function(index){var $this=$(this);var $selectChildren=$this.children('select');var $selectChildrenName=$selectChildren.attr('name')==='ad'?'adt':$selectChildren.attr('name');if($selectChildrenName==='ad-2'){$selectChildrenName='adt-2';}
$this.removeClass('col-xs-12 col-md-6 sb-elem-halfsize');$this.addClass('col-xs-5');$this.find('select').addClass('participant-select');$this.wrap('');$this.before('
');$this.before(counterInput);if(!ticketChange){getTabFieldsDataFromSessionStorage($(this));}
$counterContainer=$this.siblings('.counter-container');$counterContainer.attr('data-field-type',$this.attr('data-field-type')).attr('data-index',index);$counter=$counterContainer.find('input.pass-counter');$counter.val($this.children('select').val());if(($selectChildren.val()!='')&&($selectChildren.val()!=0)&&(typeof $selectChildren.val()!=typeof undefined)){if(layout==3){valCounter+=parseInt($selectChildren.val());}else{html+=''+$.trim($this.find('select option:selected').text())+', ';}}});if(layout==3){html+=translations.numberOfPersons({'num':valCounter});}}else{var noParticipants=false;if($thisTab.is('[data-no-participants="1"]')){noParticipants=true}
prepareInsurancePanel($thisTab.find('[data-field-type="insuranceparticipant"]'),noParticipants);$thisPanel.find('.person-birth').each(function(){var $this=$(this);if(($this.val()!='')&&($this.val()!=0)&&(typeof $this.val()!=typeof undefined)){valCounter++;}});html=''+translations.numberOfPersons({'num':valCounter})+'';}
if($sidePanel.hasClass('sb-side-panel-1')){if(html==''){html=participantsHTML;}
$thisTab.find('[data-field-type="htldoubleroom-1"]').find('input.participants-content[data-name="d-1"]').siblings('.mc-input').html(html);}else if($sidePanel.hasClass('sb-side-panel-2')){if(html==''){html=participantsHTML;}
$thisTab.find('[data-field-type="htldoubleroom-2"]').find('input.participants-content[data-name="d-2"]').siblings('.mc-input').html(html);}else if($sidePanel.hasClass('sb-side-panel-prt')){if(html==''){html=participantsHTML;}
$thisTab.find('input.participants-content[data-name="participants"]').siblings('.mc-input').html(html);}else if(isInsurance){if(html==''){html=insuranceHTML;}
$thisTab.find('input.participants-content[data-name="insuranceparticipant"]').siblings('.mc-input').html(html);}
html='';updateAgeLabelsAndCalendars($thisPanel,false);});});var ssSelectsValue={};if(!ticketChange){$section.find('[data-field-type="participants"]:not(.children-contain) > .searchbox-element,'+'[data-field-type="htldoubleroom-1"] > .searchbox-element,'+'[data-field-type="htldoubleroom-2"] > .searchbox-element,'+'[data-field-type="insuranceparticipant"] > .searchbox-element').on('click',function(e){e.stopPropagation();var $sbSidePanel,$this=$(this).parent(),attr;switch($this.attr('data-field-type')){case'participants':$sbSidePanel=$this.closest('form').find('.sb-side-panel-prt');break;case'htldoubleroom-1':$sbSidePanel=$this.closest('form').find('.sb-side-panel-1');break;case'htldoubleroom-2':$sbSidePanel=$this.closest('form').find('.sb-side-panel-2');break;case'insuranceparticipant':$sbSidePanel=$this.closest('form').find('.sb-side-panel-ins');break;}
var $selectChildren=$sbSidePanel.find('.searchbox-element, [data-field-type="passengerTypes"]').children('select').each(function(){attr=$(this).attr('name');ssSelectsValue[attr]=$(this).val();});openPanel($this);if($selectChildren.length==0){$sbSidePanel.find('.sb-side-panel-element').find('input').each(function(){attr=$(this).attr('name');ssSelectsValue[attr]=$(this).val();});}
$sbSidePanel.find('.sb-side-panel-data').html($this.find('.mc-input').html());setUpInitialParticipantsAttrs($this.parents('form').find('.sb-side-panel'));});}else{$section.find('[data-field-type="participants"]').find(".mc-input-container").addClass("mc-disabled");}
$('.increment').on('click',function(e){e.stopImmediatePropagation();var $this=$(this);var highestValue=$this.closest('.sb-side-panel-element').find('select option').last().val();var $prevValue=$this.siblings('input').val();var $newValue=parseInt($prevValue)+1;controlExcludingParticipants(e,false);if($newValue>highestValue)$newValue=highestValue;$this.siblings('input').val($newValue).trigger('change');});$('.decrement').on('click',function(e){e.stopImmediatePropagation();var $this=$(this);var lowestValue=$this.closest('.sb-side-panel-element').find('select option').first().val();var $prevValue=$this.siblings('input').val();var $newValue=parseInt($prevValue)-1;if($newValuehighestValue){$this.val(highestValue);}});$('.pass-counter').on('change',function(e){e.stopImmediatePropagation();var $this=$(this);if($this.hasClass('no-participants'))
return false;var $select=$this.parent('.counter-container').siblings('.searchbox-element').children('select');var name=$select.attr('data-name')||$select.attr('name');var $childrenNumber=$this.parent('.counter-container').siblings('.children-number');$select.val($this.val()).change();name=(name==='ad')?'adt':name;if(name==='ad-2'){name='adt-2';}
if($childrenNumber.length){$childrenNumber.trigger('change');addChildren(Number($this.val()),$childrenNumber.find('select'));}
var label=$this.parent('.counter-container').siblings('.searchbox-element').find('select option:selected').text();var $mcInput=$this.parents('.sb-side-panel-content').siblings('.sb-side-panel-confirmation').find('.sb-side-panel-data');if($mcInput.find('span.pass-placeholder').length>0){$mcInput.find('span.pass-placeholder').remove();}
if($mcInput.find('span.'+name).length>0){$mcInput.find('span.'+name).remove();}
if($this.val()>0&&(layout!=3)){var participantsContent=$mcInput.html();participantsContent+=''+$.trim(label)+', ';$mcInput.html(participantsContent);}
var allSelectsValue=0;var panel=$this.closest('.sb-side-panel');var allSelects=panel.find('.searchbox-element').find('select[name="ad"]');if($mcInput.closest('.tab-pane').find('input[name="obt"]').val()==='OM'){allSelects=panel.find('.searchbox-element').find('select[name="ch"]');}
allSelects.each(function(){allSelectsValue+=parseInt($(this).val());});if(allSelectsValue==0){panel.find('.sb-side-panel-confirm').css({'opacity':'.5','pointer-events':'none','cursor':'default'});}else{panel.find('.sb-side-panel-confirm').css({'opacity':'1','pointer-events':'auto','cursor':'pointer'});}
if(layout==3){$mcInput.html(''+translations.numberOfPersons({'num':allSelectsValue})+'');}}).change();$('.input-container.searchbox-element select').on('change',function(){$(this).parent('.searchbox-element').siblings('.counter-container').find('input.pass-counter').val($(this).val());});$('.sb-side-panel-confirm').on('click',function(e){var $this=$(this),$panel=$this.closest('.sb-side-panel'),$participantsInput,$participantsData=$(this).parents('.sb-side-panel-confirmation').find('.sb-side-panel-data'),isInsurance=false;e.preventDefault();e.stopImmediatePropagation();if($panel.hasClass('sb-side-panel-1')){$participantsInput=$this.parents('form').find('[data-field-type="htldoubleroom-1"]').find('.mc-input');$participantsInput.html($participantsData.html());}else if($panel.hasClass('sb-side-panel-2')){$participantsInput=$this.parents('form').find('[data-field-type="htldoubleroom-2"]').find('.mc-input');$participantsInput.html($participantsData.html());}else if($panel.hasClass('sb-side-panel-ins')){$participantsInput=$this.parents('form').find('[data-field-type="insuranceparticipant"]').find('.mc-input');$participantsInput.html($participantsData.html());isInsurance=true;}else{$participantsInput=$this.parents('form').find('[data-field-type="participants"]').find('.mc-input');$participantsInput.html($participantsData.html());}
if(!isInsurance&&(layout!=3&&layout!=4))
sortParticipantsInput($participantsInput);$section.find('.participants-content').trigger('change');closePanel($this.closest('section.search-box'));var $input=$this.parents('.sb-side-panel-confirmation').siblings('.sb-side-panel-content').find('.error');if($input.length){$input.qtip('destroy',true);$input.removeData("hasqtip");$input.removeAttr("data-hasqtip");}
ssSelectsValue={};if(layout==3||layout==4){$participantsInput.siblings('.participants-content').val('fakeValue').trigger('change');}});$('.sb-side-panel-abort').on('click',function(e){e.preventDefault();e.stopImmediatePropagation();var $this=$(this);var $input=$this.parents('.sb-side-panel-confirmation').siblings('.sb-side-panel-content').find('.error');closePanel($this.closest('section.search-box'));$input.qtip('destroy',true);$input.removeData("hasqtip");$input.removeAttr("data-hasqtip");for(var property in ssSelectsValue){if(ssSelectsValue.hasOwnProperty(property)){searchBox.setSessionStorageItem(property,ssSelectsValue[property]);$this.parents('.sb-side-panel').children('.sb-side-panel-content').find('[name="'+property+'"]').val(ssSelectsValue[property]).change();}}
$section.find('.sb-side-panel-confirm').css({'opacity':'1','pointer-events':'auto','cursor':'pointer'});});if($section.find($passengerGroupField).length){var $select=$passengerGroupField.find("select"),storage=searchBox.getSessionStorageItem($select.attr("name")),$selected,allowedTypes;$selected=$select.find((storage!=="null"&&storage!==undefined)?"option[value='"+storage+"']":"option:selected");allowedTypes=$selected.attr("data-allowed-types");setAllowedPassengerTypes(allowedTypes);$select.on("change",function(){var $selected=$(this).find("option:selected");setAllowedPassengerTypes($selected.attr("data-allowed-types"));});}
var resizeTimer;$(window).resize(function(){clearTimeout(resizeTimer);resizeTimer=setTimeout(function(){setUpSidePanel();resizePanel(activeForm.find('.sb-side-panel'));},100);});}
function sortParticipantsInput($input){var numericallyOrderedElems=$input.find('span[data-index]').toArray().sort(function(a,b){return parseFloat($(a).attr('data-index'))-parseFloat($(b).attr('data-index'));});$input.empty().append(numericallyOrderedElems);}
function prepareInsurancePanel($insuranceField,noParticipants){var participantSum=0,turnCalendar=new TurnCalendar(100,0),$formContainer=$insuranceField.closest('form'),$panel=$formContainer.find('.sb-side-panel-ins'),$panelContent=$panel.find('.sb-side-panel-content'),fieldsSum=$panelContent.find('.row').length,html='';function createInsuranceRow(i){var defDate=new Date(),defDateStr,$returnNode;defDate.setDate(defDate.getDate()-30*365);defDateStr=(defDate.getDate()<10?'0':'')+defDate.getDate()+'.'+
(defDate.getMonth()<9?'0':'')+(defDate.getMonth()+1)+'.'+
defDate.getFullYear();$returnNode=$('