docs/js/alljs.js

109 lines
1.0 MiB
Raw Blame History

!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=a.document,m="2.1.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,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=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.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},n.extend=n.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||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},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=s(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(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;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=s(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&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","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}"+L+"?|("+L+")|.)","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)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(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||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(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 H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==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+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(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 pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&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="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(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 p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),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))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),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===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(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?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.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 gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.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},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.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=gb.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=gb.selectors={cacheLength:50,createPseudo:ib,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]||gb.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]&&gb.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("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.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.replace(Q," ")+" ").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()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(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),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.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:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=mb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=nb(b);function qb(){}qb.prototype=d.filters=d.pseudos,d.setFilters=new qb,g=gb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?gb.error(a):z(a,i).slice(0)};function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(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 tb(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 ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(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 wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(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?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(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 wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(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]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.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)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),gb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(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&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.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?n.extend(a,d):d}},e={};return d.pipe=d.then,n.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&&n.isFunction(a.promise)?e:0,g=1===f?a:n.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]&&n.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;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;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};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.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.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.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 L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!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(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1><$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=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=jb(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=jb(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?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1><$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(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,n.cleanData(ob(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,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.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}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.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",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),f.removeChild(c),b}})}}(),n.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 zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(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+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.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}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(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":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.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))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,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||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.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):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.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,n.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 Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.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 Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),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:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.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(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.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)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(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=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.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)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.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})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.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 n.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=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.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||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.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){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.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(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(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(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.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&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.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 cc=n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec=/#.*$/,fc=/([?&])_=[^&]*/,gc=/^(.*?):[ \t]*([^\r\n]*)$/gm,hc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ic=/^(?:GET|HEAD)$/,jc=/^\/\//,kc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lc={},mc={},nc="*/".concat("*"),oc=a.location.href,pc=kc.exec(oc.toLowerCase())||[];function qc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function rc(a,b,c,d){var e={},f=a===mc;function g(h){var i;return e[h]=!0,n.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 sc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function tc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function uc(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}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:oc,type:"GET",isLocal:hc.test(pc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?sc(sc(a,n.ajaxSettings),b):sc(n.ajaxSettings,a)},ajaxPrefilter:qc(lc),ajaxTransport:qc(mc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=gc.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e: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 c&&c.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||oc)+"").replace(ec,"").replace(jc,pc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=kc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===pc[1]&&h[2]===pc[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(pc[3]||("http:"===pc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),rc(lc,k,b,v),2===t)return v;i=n.event&&k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!ic.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=fc.test(d)?d.replace(fc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(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]?", "+nc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=rc(mc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=tc(k,v,f)),u=uc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=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,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var vc=/%20/g,wc=/\[\]$/,xc=/\r?\n/g,yc=/^(?:submit|button|image|reset|file)$/i,zc=/^(?:input|select|textarea|keygen)/i;function Ac(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||wc.test(a)?d(a,e):Ac(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Ac(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Ac(c,a[c],b,e);return d.join("&").replace(vc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&zc.test(this.nodeName)&&!yc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(xc,"\r\n")}}):{name:b.name,value:c.replace(xc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Bc=0,Cc={},Dc={0:200,1223:204},Ec=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Cc)Cc[a]()}),k.cors=!!Ec&&"withCredentials"in Ec,k.ajax=Ec=!!Ec,n.ajaxTransport(function(a){var b;return k.cors||Ec&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Bc;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)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Cc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Dc[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Cc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Fc=[],Gc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Fc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Gc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Gc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.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,Fc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Hc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Hc)return Hc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Ic=a.document.documentElement;function Jc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Jc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Ic;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ic})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Jc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.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?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Kc=a.jQuery,Lc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Lc),b&&a.jQuery===n&&(a.jQuery=Kc),n},typeof b===U&&(a.jQuery=a.$=n),n});String.prototype.score=function(word,fuzziness){'use strict';if(this===word){return 1;}if(word===""){return 0;}var runningScore=0,charScore,finalScore,string=this,lString=string.toLowerCase(),strLength=string.length,lWord=word.toLowerCase(),wordLength=word.length,idxOf,startAt=0,fuzzies=1,fuzzyFactor,i;if(fuzziness){fuzzyFactor=1-fuzziness;}if(fuzziness){for(i=0;i<wordLength;i+=1){idxOf=lString.indexOf(lWord[i],startAt);if(idxOf===-1){fuzzies+=fuzzyFactor;}else{if(startAt===idxOf){charScore=0.7;}else{charScore=0.1;if(string[idxOf-1]===' '){charScore+=0.8;}}if(string[idxOf]===word[i]){charScore+=0.1;}runningScore+=charScore;startAt=idxOf+1;}}}else{for(i=0;i<wordLength;i+=1){idxOf=lString.indexOf(lWord[i],startAt);if(-1===idxOf){return 0;}if(startAt===idxOf){charScore=0.7;}else{charScore=0.1;if(string[idxOf-1]===' '){charScore+=0.8;}}if(string[idxOf]===word[i]){charScore+=0.1;}runningScore+=charScore;startAt=idxOf+1;}}finalScore=0.5*(runningScore/strLength+runningScore/wordLength)/fuzzies;if((lWord[0]===lString[0])&&(finalScore<0.85)){finalScore+=0.15;}return finalScore;};(function(f,h){"object"===typeof exports?module.exports=h():"function"===typeof define&&define.amd?define(h):f.IPv6=h(f)})(this,function(f){var h=f&&f.IPv6;return{best:function(g){g=g.toLowerCase().split(":");var f=g.length,b=8;""===g[0]&&""===g[1]&&""===g[2]?(g.shift(),g.shift()):""===g[0]&&""===g[1]?g.shift():""===g[f-1]&&""===g[f-2]&&g.pop();f=g.length;-1!==g[f-1].indexOf(".")&&(b=7);var l;for(l=0;l<f&&""!==g[l];l++);if(l<b)for(g.splice(l,1,"0000");g.length<b;)g.splice(l,0,"0000");for(l=0;l<b;l++){for(var f=g[l].split(""),h=0;3>h;h++)if("0"===f[0]&&1<f.length)f.splice(0,1);else break;g[l]=f.join("")}var f=-1,q=h=0,m=-1,x=!1;for(l=0;l<b;l++)x?"0"===g[l]?q+=1:(x=!1,q>h&&(f=m,h=q)):"0"===g[l]&&(x=!0,m=l,q=1);q>h&&(f=m,h=q);1<h&&g.splice(f,h,"");f=g.length;b="";""===g[0]&&(b=":");for(l=0;l<f;l++){b+=g[l];if(l===f-1)break;b+=":"}""===g[f-1]&&(b+=":");return b},noConflict:function(){f.IPv6===this&&(f.IPv6=h);return this}}});(function(f){function h(b){throw RangeError(C[b]);}function g(b,e){for(var f=b.length;f--;)b[f]=e(b[f]);return b}function p(b,e){return g(b.split(y),e).join(".")}function b(b){for(var e=[],f=0,a=b.length,c,d;f<a;)c=b.charCodeAt(f++),55296<=c&&56319>=c&&f<a?(d=b.charCodeAt(f++),56320==(d&64512)?e.push(((c&1023)<<10)+(d&1023)+65536):(e.push(c),f--)):e.push(c);return e}function l(b){return g(b,function(b){var e="";65535<b&&(b-=65536,e+=z(b>>>10&1023|55296),b=56320|b&1023);return e+=z(b)}).join("")}function t(b,e){return b+22+75*(26>b)-((0!=e)<<5)}function q(b,e,f){var a=0;b=f?s(b/700):b>>1;for(b+=s(b/e);455<b;a+=36)b=s(b/35);return s(a+36*b/(b+38))}function m(b){var e=[],f=b.length,a,c=0,d=128,w=72,u,k,m,g,n;u=b.lastIndexOf("-");0>u&&(u=0);for(k=0;k<u;++k)128<=b.charCodeAt(k)&&h("not-basic"),e.push(b.charCodeAt(k));for(u=0<u?u+1:0;u<f;){k=c;a=1;for(m=36;;m+=36){u>=f&&h("invalid-input");g=b.charCodeAt(u++);g=10>g-48?g-22:26>g-65?g-65:26>g-97?g-97:36;(36<=g||g>s((2147483647-c)/a))&&h("overflow");c+=g*a;n=m<=w?1:m>=w+26?26:m-w;if(g<n)break;g=36-n;a>s(2147483647/g)&&h("overflow");a*=g}a=e.length+1;w=q(c-k,a,0==k);s(c/a)>2147483647-d&&h("overflow");d+=s(c/a);c%=a;e.splice(c++,0,d)}return l(e)}function x(e){var f,k,a,c,d,w,u,g,m,n=[],r,x,l;e=b(e);r=e.length;f=128;k=0;d=72;for(w=0;w<r;++w)m=e[w],128>m&&n.push(z(m));for((a=c=n.length)&&n.push("-");a<r;){u=2147483647;for(w=0;w<r;++w)m=e[w],m>=f&&m<u&&(u=m);x=a+1;u-f>s((2147483647-k)/x)&&h("overflow");k+=(u-f)*x;f=u;for(w=0;w<r;++w)if(m=e[w],m<f&&2147483647<++k&&h("overflow"),m==f){g=k;for(u=36;;u+=36){m=u<=d?1:u>=d+26?26:u-d;if(g<m)break;l=g-m;g=36-m;n.push(z(t(m+l%g,0)));g=s(l/g)}n.push(z(t(g,0)));d=q(k,x,a==c);k=0;++a}++k;++f}return n.join("")}var A="object"==typeof exports&&exports,k="object"==typeof module&&module&&module.exports==A&&module,n="object"==typeof global&&global;if(n.global===n||n.window===n)f=n;var r,v=/^xn--/,e=/[^ -~]/,y=/\x2E|\u3002|\uFF0E|\uFF61/g,C={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},s=Math.floor,z=String.fromCharCode,B;r={version:"1.2.3",ucs2:{decode:b,encode:l},decode:m,encode:x,toASCII:function(b){return p(b,function(b){return e.test(b)?"xn--"+x(b):b})},toUnicode:function(b){return p(b,function(b){return v.test(b)?m(b.slice(4).toLowerCase()):b})}};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return r});else if(A&&!A.nodeType)if(k)k.exports=r;else for(B in r)r.hasOwnProperty(B)&&(A[B]=r[B]);else f.punycode=r})(this);(function(f,h){"object"===typeof exports?module.exports=h():"function"===typeof define&&define.amd?define(h):f.SecondLevelDomains=h(f)})(this,function(f){var h=f&&f.SecondLevelDomains,g={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ","do":" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ","in":" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch "},has:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1)return!1;var h=f.lastIndexOf(".",b-1);if(0>=h||h>=b-1)return!1;var t=g.list[f.slice(b+1)];return t?0<=t.indexOf(" "+f.slice(h+1,b)+" "):!1},is:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1||0<=f.lastIndexOf(".",b-1))return!1;var h=g.list[f.slice(b+1)];return h?0<=h.indexOf(" "+f.slice(0,b)+" "):!1},get:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1)return null;var h=f.lastIndexOf(".",b-1);if(0>=h||h>=b-1)return null;var t=g.list[f.slice(b+1)];return!t||0>t.indexOf(" "+f.slice(h+1,b)+" ")?null:f.slice(h+1)},noConflict:function(){f.SecondLevelDomains===this&&(f.SecondLevelDomains=h);return this}};return g});(function(f,h){"object"===typeof exports?module.exports=h(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"===typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],h):f.URI=h(f.punycode,f.IPv6,f.SecondLevelDomains,f)})(this,function(f,h,g,p){function b(a,c){if(!(this instanceof b))return new b(a,c);void 0===a&&(a="undefined"!==typeof location?location.href+"":"");this.href(a);return void 0!==c?this.absoluteTo(c):this}function l(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function t(a){return void 0===a?"Undefined":String(Object.prototype.toString.call(a)).slice(8,-1)}function q(a){return"Array"===t(a)}function m(a,c){var d,b;if(q(c)){d=0;for(b=c.length;d<b;d++)if(!m(a,c[d]))return!1;return!0}var e=t(c);d=0;for(b=a.length;d<b;d++)if("RegExp"===e){if("string"===typeof a[d]&&a[d].match(c))return!0}else if(a[d]===c)return!0;return!1}function x(a,c){if(!q(a)||!q(c)||a.length!==c.length)return!1;a.sort();c.sort();for(var d=0,b=a.length;d<b;d++)if(a[d]!==c[d])return!1;return!0}function A(a){return escape(a)}function k(a){return encodeURIComponent(a).replace(/[!'()*]/g,A).replace(/\*/g,"%2A")}function n(a){return function(c,d){if(void 0===c)return this._parts[a]||"";this._parts[a]=c||null;this.build(!d);return this}}function r(a,c){return function(d,b){if(void 0===d)return this._parts[a]||"";null!==d&&(d+="",d.charAt(0)===c&&(d=d.substring(1)));this._parts[a]=d;this.build(!b);return this}}var v=p&&p.URI;b.version="1.14.1";var e=b.prototype,y=Object.prototype.hasOwnProperty;b._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,duplicateQueryParameters:b.duplicateQueryParameters,escapeQuerySpace:b.escapeQuerySpace}};b.duplicateQueryParameters=!1;b.escapeQuerySpace=!0;b.protocol_expression=/^[a-z][a-z0-9.+-]*$/i;b.idn_expression=/[^a-z0-9\.-]/i;b.punycode_expression=/(xn--)/i;b.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;b.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;b.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/ig;b.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u201e\u2018\u2019]+$/};b.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"};b.invalid_hostname_characters=/[^a-zA-Z0-9\.-]/;b.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"};b.getDomAttribute=function(a){if(a&&a.nodeName){var c=a.nodeName.toLowerCase();return"input"===c&&"image"!==a.type?void 0:b.domAttributes[c]}};b.encode=k;b.decode=decodeURIComponent;b.iso8859=function(){b.encode=escape;b.decode=unescape};b.unicode=function(){b.encode=k;b.decode=decodeURIComponent};b.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}}};b.encodeQuery=function(a,c){var d=b.encode(a+"");void 0===c&&(c=b.escapeQuerySpace);return c?d.replace(/%20/g,"+"):d};b.decodeQuery=function(a,c){a+="";void 0===c&&(c=b.escapeQuerySpace);try{return b.decode(c?a.replace(/\+/g,"%20"):a)}catch(d){return a}};b.recodePath=function(a){a=(a+"").split("/");for(var c=0,d=a.length;c<d;c++)a[c]=b.encodePathSegment(b.decode(a[c]));return a.join("/")};b.decodePath=function(a){a=(a+"").split("/");for(var c=0,d=a.length;c<d;c++)a[c]=b.decodePathSegment(a[c]);return a.join("/")};var C={encode:"encode",decode:"decode"},s,z=function(a,c){return function(d){try{return b[c](d+"").replace(b.characters[a][c].expression,function(d){return b.characters[a][c].map[d]})}catch(w){return d}}};for(s in C)b[s+"PathSegment"]=z("pathname",C[s]);b.encodeReserved=z("reserved","encode");b.parse=function(a,c){var d;c||(c={});d=a.indexOf("#");-1<d&&(c.fragment=a.substring(d+1)||null,a=a.substring(0,d));d=a.indexOf("?");-1<d&&(c.query=a.substring(d+1)||null,a=a.substring(0,d));"//"===a.substring(0,2)?(c.protocol=null,a=a.substring(2),a=b.parseAuthority(a,c)):(d=a.indexOf(":"),-1<d&&(c.protocol=a.substring(0,d)||null,c.protocol&&!c.protocol.match(b.protocol_expression)?c.protocol=void 0:"//"===a.substring(d+1,d+3)?(a=a.substring(d+3),a=b.parseAuthority(a,c)):(a=a.substring(d+1),c.urn=!0)));c.path=a;return c};b.parseHost=function(a,c){var d=a.indexOf("/"),b;-1===d&&(d=a.length);"["===a.charAt(0)?(b=a.indexOf("]"),c.hostname=a.substring(1,b)||null,c.port=a.substring(b+2,d)||null,"/"===c.port&&(c.port=null)):a.indexOf(":")!==a.lastIndexOf(":")?(c.hostname=a.substring(0,d)||null,c.port=null):(b=a.substring(0,d).split(":"),c.hostname=b[0]||null,c.port=b[1]||null);c.hostname&&"/"!==a.substring(d).charAt(0)&&(d++,a="/"+a);return a.substring(d)||"/"};b.parseAuthority=function(a,c){a=b.parseUserinfo(a,c);return b.parseHost(a,c)};b.parseUserinfo=function(a,c){var d=a.indexOf("/"),e=a.lastIndexOf("@",-1<d?d:a.length-1);-1<e&&(-1===d||e<d)?(d=a.substring(0,e).split(":"),c.username=d[0]?b.decode(d[0]):null,d.shift(),c.password=d[0]?b.decode(d.join(":")):null,a=a.substring(e+1)):(c.username=null,c.password=null);return a};b.parseQuery=function(a,c){if(!a)return{};a=a.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"");if(!a)return{};for(var d={},e=a.split("&"),f=e.length,k,g,m=0;m<f;m++)k=e[m].split("="),g=b.decodeQuery(k.shift(),c),k=k.length?b.decodeQuery(k.join("="),c):null,y.call(d,g)?("string"===typeof d[g]&&(d[g]=[d[g]]),d[g].push(k)):d[g]=k;return d};b.build=function(a){var c="";a.protocol&&(c+=a.protocol+":");a.urn||!c&&!a.hostname||(c+="//");c+=b.buildAuthority(a)||"";"string"===typeof a.path&&("/"!==a.path.charAt(0)&&"string"===typeof a.hostname&&(c+="/"),c+=a.path);"string"===typeof a.query&&a.query&&(c+="?"+a.query);"string"===typeof a.fragment&&a.fragment&&(c+="#"+a.fragment);return c};b.buildHost=function(a){var c="";if(a.hostname)c=b.ip6_expression.test(a.hostname)?c+("["+a.hostname+"]"):c+a.hostname;else return"";a.port&&(c+=":"+a.port);return c};b.buildAuthority=function(a){return b.buildUserinfo(a)+b.buildHost(a)};b.buildUserinfo=function(a){var c="";a.username&&(c+=b.encode(a.username),a.password&&(c+=":"+b.encode(a.password)),c+="@");return c};b.buildQuery=function(a,c,d){var e="",f,k,g,m;for(k in a)if(y.call(a,k)&&k)if(q(a[k]))for(f={},g=0,m=a[k].length;g<m;g++)void 0!==a[k][g]&&void 0===f[a[k][g]+""]&&(e+="&"+b.buildQueryParameter(k,a[k][g],d),!0!==c&&(f[a[k][g]+""]=!0));else void 0!==a[k]&&(e+="&"+b.buildQueryParameter(k,a[k],d));return e.substring(1)};b.buildQueryParameter=function(a,c,d){return b.encodeQuery(a,d)+(null!==c?"="+b.encodeQuery(c,d):"")};b.addQuery=function(a,c,d){if("object"===typeof c)for(var e in c)y.call(c,e)&&b.addQuery(a,e,c[e]);else if("string"===typeof c)void 0===a[c]?a[c]=d:("string"===typeof a[c]&&(a[c]=[a[c]]),q(d)||(d=[d]),a[c]=(a[c]||[]).concat(d));else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");};b.removeQuery=function(a,c,d){var e;if(q(c))for(d=0,e=c.length;d<e;d++)a[c[d]]=void 0;else if("object"===typeof c)for(e in c)y.call(c,e)&&b.removeQuery(a,e,c[e]);else if("string"===typeof c)if(void 0!==d)if(a[c]===d)a[c]=void 0;else{if(q(a[c])){e=a[c];var f={},k,g;if(q(d))for(k=0,g=d.length;k<g;k++)f[d[k]]=!0;else f[d]=!0;k=0;for(g=e.length;k<g;k++)void 0!==f[e[k]]&&(e.splice(k,1),g--,k--);a[c]=e}}else a[c]=void 0;else throw new TypeError("URI.addQuery() accepts an object, string as the first parameter");};b.hasQuery=function(a,c,d,e){if("object"===typeof c){for(var f in c)if(y.call(c,f)&&!b.hasQuery(a,f,c[f]))return!1;return!0}if("string"!==typeof c)throw new TypeError("URI.hasQuery() accepts an object, string as the name parameter");switch(t(d)){case"Undefined":return c in a;case"Boolean":return a=Boolean(q(a[c])?a[c].length:a[c]),d===a;case"Function":return!!d(a[c],c,a);case"Array":return q(a[c])?(e?m:x)(a[c],d):!1;case"RegExp":return q(a[c])?e?m(a[c],d):!1:Boolean(a[c]&&a[c].match(d));case"Number":d=String(d);case"String":return q(a[c])?e?m(a[c],d):!1:a[c]===d;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter");}};b.commonPath=function(a,c){var d=Math.min(a.length,c.length),b;for(b=0;b<d;b++)if(a.charAt(b)!==c.charAt(b)){b--;break}if(1>b)return a.charAt(0)===c.charAt(0)&&"/"===a.charAt(0)?"/":"";if("/"!==a.charAt(b)||"/"!==c.charAt(b))b=a.substring(0,b).lastIndexOf("/");return a.substring(0,b+1)};b.withinString=function(a,c,d){d||(d={});var e=d.start||b.findUri.start,f=d.end||b.findUri.end,k=d.trim||b.findUri.trim,g=/[a-z0-9-]=["']?$/i;for(e.lastIndex=0;;){var m=e.exec(a);if(!m)break;m=m.index;if(d.ignoreHtml){var n=a.slice(Math.max(m-3,0),m);if(n&&g.test(n))continue}var n=m+a.slice(m).search(f),h=a.slice(m,n).replace(k,"");d.ignore&&d.ignore.test(h)||(n=m+h.length,h=c(h,m,n,a),a=a.slice(0,m)+h+a.slice(n),e.lastIndex=m+h.length)}e.lastIndex=0;return a};b.ensureValidHostname=function(a){if(a.match(b.invalid_hostname_characters)){if(!f)throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available');if(f.toASCII(a).match(b.invalid_hostname_characters))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');}};b.noConflict=function(a){if(a)return a={URI:this.noConflict()},p.URITemplate&&"function"===typeof p.URITemplate.noConflict&&(a.URITemplate=p.URITemplate.noConflict()),p.IPv6&&"function"===typeof p.IPv6.noConflict&&(a.IPv6=p.IPv6.noConflict()),p.SecondLevelDomains&&"function"===typeof p.SecondLevelDomains.noConflict&&(a.SecondLevelDomains=p.SecondLevelDomains.noConflict()),a;p.URI===this&&(p.URI=v);return this};e.build=function(a){if(!0===a)this._deferred_build=!0;else if(void 0===a||this._deferred_build)this._string=b.build(this._parts),this._deferred_build=!1;return this};e.clone=function(){return new b(this)};e.valueOf=e.toString=function(){return this.build(!1)._string};e.protocol=n("protocol");e.username=n("username");e.password=n("password");e.hostname=n("hostname");e.port=n("port");e.query=r("query","?");e.fragment=r("fragment","#");e.search=function(a,c){var d=this.query(a,c);return"string"===typeof d&&d.length?"?"+d:d};e.hash=function(a,c){var d=this.fragment(a,c);return"string"===typeof d&&d.length?"#"+d:d};e.pathname=function(a,c){if(void 0===a||!0===a){var d=this._parts.path||(this._parts.hostname?"/":"");return a?b.decodePath(d):d}this._parts.path=a?b.recodePath(a):"/";this.build(!c);return this};e.path=e.pathname;e.href=function(a,c){var d;if(void 0===a)return this.toString();this._string="";this._parts=b._parts();var e=a instanceof b,f="object"===typeof a&&(a.hostname||a.path||a.pathname);a.nodeName&&(f=b.getDomAttribute(a),a=a[f]||"",f=!1);!e&&f&&void 0!==a.pathname&&(a=a.toString());if("string"===typeof a||a instanceof String)this._parts=b.parse(String(a),this._parts);else if(e||f)for(d in e=e?a._parts:a,e)y.call(this._parts,d)&&(this._parts[d]=e[d]);else throw new TypeError("invalid input");this.build(!c);return this};e.is=function(a){var c=!1,d=!1,e=!1,f=!1,k=!1,m=!1,n=!1,h=!this._parts.urn;this._parts.hostname&&(h=!1,d=b.ip4_expression.test(this._parts.hostname),e=b.ip6_expression.test(this._parts.hostname),c=d||e,k=(f=!c)&&g&&g.has(this._parts.hostname),m=f&&b.idn_expression.test(this._parts.hostname),n=f&&b.punycode_expression.test(this._parts.hostname));switch(a.toLowerCase()){case"relative":return h;case"absolute":return!h;case"domain":case"name":return f;case"sld":return k;case"ip":return c;case"ip4":case"ipv4":case"inet4":return d;case"ip6":case"ipv6":case"inet6":return e;case"idn":return m;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return n}return null};var B=e.protocol,D=e.port,E=e.hostname;e.protocol=function(a,c){if(void 0!==a&&a&&(a=a.replace(/:(\/\/)?$/,""),!a.match(b.protocol_expression)))throw new TypeError('Protocol "'+a+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return B.call(this,a,c)};e.scheme=e.protocol;e.port=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a&&(0===a&&(a=null),a&&(a+="",":"===a.charAt(0)&&(a=a.substring(1)),a.match(/[^0-9]/))))throw new TypeError('Port "'+a+'" contains characters other than [0-9]');return D.call(this,a,c)};e.hostname=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a){var d={};b.parseHost(a,d);a=d.hostname}return E.call(this,a,c)};e.host=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a)return this._parts.hostname?b.buildHost(this._parts):"";b.parseHost(a,this._parts);this.build(!c);return this};e.authority=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a)return this._parts.hostname?b.buildAuthority(this._parts):"";b.parseAuthority(a,this._parts);this.build(!c);return this};e.userinfo=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.username)return"";var d=b.buildUserinfo(this._parts);return d.substring(0,d.length-1)}"@"!==a[a.length-1]&&(a+="@");b.parseUserinfo(a,this._parts);this.build(!c);return this};e.resource=function(a,c){var d;if(void 0===a)return this.path()+this.search()+this.hash();d=b.parse(a);this._parts.path=d.path;this._parts.query=d.query;this._parts.fragment=d.fragment;this.build(!c);return this};e.subdomain=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var d=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,d)||""}d=this._parts.hostname.length-this.domain().length;d=this._parts.hostname.substring(0,d);d=new RegExp("^"+l(d));a&&"."!==a.charAt(a.length-1)&&(a+=".");a&&b.ensureValidHostname(a);this._parts.hostname=this._parts.hostname.replace(d,a);this.build(!c);return this};e.domain=function(a,c){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(c=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var d=this._parts.hostname.match(/\./g);if(d&&2>d.length)return this._parts.hostname;d=this._parts.hostname.length-this.tld(c).length-1;d=this._parts.hostname.lastIndexOf(".",d-1)+1;return this._parts.hostname.substring(d)||""}if(!a)throw new TypeError("cannot set domain empty");b.ensureValidHostname(a);!this._parts.hostname||this.is("IP")?this._parts.hostname=a:(d=new RegExp(l(this.domain())+"$"),this._parts.hostname=this._parts.hostname.replace(d,a));this.build(!c);return this};e.tld=function(a,c){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(c=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var d=this._parts.hostname.lastIndexOf("."),d=this._parts.hostname.substring(d+1);return!0!==c&&g&&g.list[d.toLowerCase()]?g.get(this._parts.hostname)||d:d}if(a)if(a.match(/[^a-zA-Z0-9-]/))if(g&&g.is(a))d=new RegExp(l(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(d,a);else throw new TypeError('TLD "'+a+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");d=new RegExp(l(this.tld())+"$");this._parts.hostname=this._parts.hostname.replace(d,a)}else throw new TypeError("cannot set TLD empty");this.build(!c);return this};e.directory=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var d=this._parts.path.length-this.filename().length-1,d=this._parts.path.substring(0,d)||(this._parts.hostname?"/":"");return a?b.decodePath(d):d}d=this._parts.path.length-this.filename().length;d=this._parts.path.substring(0,d);d=new RegExp("^"+l(d));this.is("relative")||(a||(a="/"),"/"!==a.charAt(0)&&(a="/"+a));a&&"/"!==a.charAt(a.length-1)&&(a+="/");a=b.recodePath(a);this._parts.path=this._parts.path.replace(d,a);this.build(!c);return this};e.filename=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var d=this._parts.path.lastIndexOf("/"),d=this._parts.path.substring(d+1);return a?b.decodePathSegment(d):d}d=!1;"/"===a.charAt(0)&&(a=a.substring(1));a.match(/\.?\//)&&(d=!0);var e=new RegExp(l(this.filename())+"$");a=b.recodePath(a);this._parts.path=this._parts.path.replace(e,a);d?this.normalizePath(c):this.build(!c);return this};e.suffix=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var d=this.filename(),e=d.lastIndexOf(".");if(-1===e)return"";d=d.substring(e+1);d=/^[a-z0-9%]+$/i.test(d)?d:"";return a?b.decodePathSegment(d):d}"."===a.charAt(0)&&(a=a.substring(1));if(d=this.suffix())e=a?new RegExp(l(d)+"$"):new RegExp(l("."+d)+"$");else{if(!a)return this;this._parts.path+="."+b.recodePath(a)}e&&(a=b.recodePath(a),this._parts.path=this._parts.path.replace(e,a));this.build(!c);return this};e.segment=function(a,c,d){var b=this._parts.urn?":":"/",e=this.path(),f="/"===e.substring(0,1),e=e.split(b);void 0!==a&&"number"!==typeof a&&(d=c,c=a,a=void 0);if(void 0!==a&&"number"!==typeof a)throw Error('Bad segment "'+a+'", must be 0-based integer');f&&e.shift();0>a&&(a=Math.max(e.length+a,0));if(void 0===c)return void 0===a?e:e[a];if(null===a||void 0===e[a])if(q(c)){e=[];a=0;for(var k=c.length;a<k;a++)if(c[a].length||e.length&&e[e.length-1].length)e.length&&!e[e.length-1].length&&e.pop(),e.push(c[a])}else{if(c||"string"===typeof c)""===e[e.length-1]?e[e.length-1]=c:e.push(c)}else c?e[a]=c:e.splice(a,1);f&&e.unshift("");return this.path(e.join(b),d)};e.segmentCoded=function(a,c,d){var e,f;"number"!==typeof a&&(d=c,c=a,a=void 0);if(void 0===c){a=this.segment(a,c,d);if(q(a))for(e=0,f=a.length;e<f;e++)a[e]=b.decode(a[e]);else a=void 0!==a?b.decode(a):void 0;return a}if(q(c))for(e=0,f=c.length;e<f;e++)c[e]=b.decode(c[e]);else c="string"===typeof c||c instanceof String?b.encode(c):c;return this.segment(a,c,d)};var F=e.query;e.query=function(a,c){if(!0===a)return b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"===typeof a){var d=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace),e=a.call(this,d);this._parts.query=b.buildQuery(e||d,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);this.build(!c);return this}return void 0!==a&&"string"!==typeof a?(this._parts.query=b.buildQuery(a,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!c),this):F.call(this,a,c)};e.setQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"===typeof a||a instanceof String)e[a]=void 0!==c?c:null;else if("object"===typeof a)for(var f in a)y.call(a,f)&&(e[f]=a[f]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");this._parts.query=b.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(d=c);this.build(!d);return this};e.addQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);b.addQuery(e,a,void 0===c?null:c);this._parts.query=b.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(d=c);this.build(!d);return this};e.removeQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);b.removeQuery(e,a,c);this._parts.query=b.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(d=c);this.build(!d);return this};e.hasQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return b.hasQuery(e,a,c,d)};e.setSearch=e.setQuery;e.addSearch=e.addQuery;e.removeSearch=e.removeQuery;e.hasSearch=e.hasQuery;e.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()};e.normalizeProtocol=function(a){"string"===typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!a));return this};e.normalizeHostname=function(a){this._parts.hostname&&(this.is("IDN")&&f?this._parts.hostname=f.toASCII(this._parts.hostname):this.is("IPv6")&&h&&(this._parts.hostname=h.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!a));return this};e.normalizePort=function(a){"string"===typeof this._parts.protocol&&this._parts.port===b.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!a));return this};e.normalizePath=function(a){if(this._parts.urn||!this._parts.path||"/"===this._parts.path)return this;var c,d=this._parts.path,e="",f,k;"/"!==d.charAt(0)&&(c=!0,d="/"+d);d=d.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/");c&&(e=d.substring(1).match(/^(\.\.\/)+/)||"")&&(e=e[0]);for(;;){f=d.indexOf("/..");if(-1===f)break;else if(0===f){d=d.substring(3);continue}k=d.substring(0,f).lastIndexOf("/");-1===k&&(k=f);d=d.substring(0,k)+d.substring(f+3)}c&&this.is("relative")&&(d=e+d.substring(1));d=b.recodePath(d);this._parts.path=d;this.build(!a);return this};e.normalizePathname=e.normalizePath;e.normalizeQuery=function(a){"string"===typeof this._parts.query&&(this._parts.query.length?this.query(b.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!a));return this};e.normalizeFragment=function(a){this._parts.fragment||(this._parts.fragment=null,this.build(!a));return this};e.normalizeSearch=e.normalizeQuery;e.normalizeHash=e.normalizeFragment;e.iso8859=function(){var a=b.encode,c=b.decode;b.encode=escape;b.decode=decodeURIComponent;this.normalize();b.encode=a;b.decode=c;return this};e.unicode=function(){var a=b.encode,c=b.decode;b.encode=k;b.decode=unescape;this.normalize();b.encode=a;b.decode=c;return this};e.readable=function(){var a=this.clone();a.username("").password("").normalize();var c="";a._parts.protocol&&(c+=a._parts.protocol+"://");a._parts.hostname&&(a.is("punycode")&&f?(c+=f.toUnicode(a._parts.hostname),a._parts.port&&(c+=":"+a._parts.port)):c+=a.host());a._parts.hostname&&a._parts.path&&"/"!==a._parts.path.charAt(0)&&(c+="/");c+=a.path(!0);if(a._parts.query){for(var d="",e=0,k=a._parts.query.split("&"),g=k.length;e<g;e++){var m=(k[e]||"").split("="),d=d+("&"+b.decodeQuery(m[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"));void 0!==m[1]&&(d+="="+b.decodeQuery(m[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}c+="?"+d.substring(1)}return c+=b.decodeQuery(a.hash(),!0)};e.absoluteTo=function(a){var c=this.clone(),d=["protocol","username","password","hostname","port"],e,f;if(this._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");a instanceof b||(a=new b(a));c._parts.protocol||(c._parts.protocol=a._parts.protocol);if(this._parts.hostname)return c;for(e=0;f=d[e];e++)c._parts[f]=a._parts[f];c._parts.path?".."===c._parts.path.substring(-2)&&(c._parts.path+="/"):(c._parts.path=a._parts.path,c._parts.query||(c._parts.query=a._parts.query));"/"!==c.path().charAt(0)&&(a=a.directory(),c._parts.path=(a?a+"/":"")+c._parts.path,c.normalizePath());c.build();return c};e.relativeTo=function(a){var c=this.clone().normalize(),d,e,f,k;if(c._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");a=(new b(a)).normalize();d=c._parts;e=a._parts;f=c.path();k=a.path();if("/"!==f.charAt(0))throw Error("URI is already relative");if("/"!==k.charAt(0))throw Error("Cannot calculate a URI relative to another relative URI");d.protocol===e.protocol&&(d.protocol=null);if(d.username===e.username&&d.password===e.password&&null===d.protocol&&null===d.username&&null===d.password&&d.hostname===e.hostname&&d.port===e.port)d.hostname=null,d.port=null;else return c.build();if(f===k)return d.path="",c.build();a=b.commonPath(c.path(),a.path());if(!a)return c.build();e=e.path.substring(a.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");d.path=e+d.path.substring(a.length);return c.build()};e.equals=function(a){var c=this.clone();a=new b(a);var d={},e={},f={},k;c.normalize();a.normalize();if(c.toString()===a.toString())return!0;d=c.query();e=a.query();c.query("");a.query("");if(c.toString()!==a.toString()||d.length!==e.length)return!1;d=b.parseQuery(d,this._parts.escapeQuerySpace);e=b.parseQuery(e,this._parts.escapeQuerySpace);for(k in d)if(y.call(d,k)){if(!q(d[k])){if(d[k]!==e[k])return!1}else if(!x(d[k],e[k]))return!1;f[k]=!0}for(k in e)if(y.call(e,k)&&!f[k])return!1;return!0};e.duplicateQueryParameters=function(a){this._parts.duplicateQueryParameters=!!a;return this};e.escapeQuerySpace=function(a){this._parts.escapeQuerySpace=!!a;return this};return b});(function(f,h){"object"===typeof exports?module.exports=h(require("./URI")):"function"===typeof define&&define.amd?define(["./URI"],h):f.URITemplate=h(f.URI,f)})(this,function(f,h){function g(b){if(g._cache[b])return g._cache[b];if(!(this instanceof g))return new g(b);this.expression=b;g._cache[b]=this;return this}function p(b){this.data=b;this.cache={}}var b=h&&h.URITemplate,l=Object.prototype.hasOwnProperty,t=g.prototype,q={"":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encode"},"+":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},"#":{prefix:"#",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},".":{prefix:".",separator:".",named:!1,empty_name_separator:!1,encode:"encode"},"/":{prefix:"/",separator:"/",named:!1,empty_name_separator:!1,encode:"encode"},";":{prefix:";",separator:";",named:!0,empty_name_separator:!1,encode:"encode"},"?":{prefix:"?",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"},"&":{prefix:"&",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"}};g._cache={};g.EXPRESSION_PATTERN=/\{([^a-zA-Z0-9%_]?)([^\}]+)(\}|$)/g;g.VARIABLE_PATTERN=/^([^*:]+)((\*)|:(\d+))?$/;g.VARIABLE_NAME_PATTERN=/[^a-zA-Z0-9%_]/;g.expand=function(b,f){var h=q[b.operator],k=h.named?"Named":"Unnamed",n=b.variables,r=[],v,e,l;for(l=0;e=n[l];l++)v=f.get(e.name),v.val.length?r.push(g["expand"+k](v,h,e.explode,e.explode&&h.separator||",",e.maxlength,e.name)):v.type&&r.push("");return r.length?h.prefix+r.join(h.separator):""};g.expandNamed=function(b,g,h,k,n,r){var v="",e=g.encode;g=g.empty_name_separator;var l=!b[e].length,q=2===b.type?"":f[e](r),s,p,t;p=0;for(t=b.val.length;p<t;p++)n?(s=f[e](b.val[p][1].substring(0,n)),2===b.type&&(q=f[e](b.val[p][0].substring(0,n)))):l?(s=f[e](b.val[p][1]),2===b.type?(q=f[e](b.val[p][0]),b[e].push([q,s])):b[e].push([void 0,s])):(s=b[e][p][1],2===b.type&&(q=b[e][p][0])),v&&(v+=k),h?v+=q+(g||s?"=":"")+s:(p||(v+=f[e](r)+(g||s?"=":"")),2===b.type&&(v+=q+","),v+=s);return v};g.expandUnnamed=function(b,g,h,k,n){var r="",l=g.encode;g=g.empty_name_separator;var e=!b[l].length,q,p,s,t;s=0;for(t=b.val.length;s<t;s++)n?p=f[l](b.val[s][1].substring(0,n)):e?(p=f[l](b.val[s][1]),b[l].push([2===b.type?f[l](b.val[s][0]):void 0,p])):p=b[l][s][1],r&&(r+=k),2===b.type&&(q=n?f[l](b.val[s][0].substring(0,n)):b[l][s][0],r+=q,r=h?r+(g||p?"=":""):r+","),r+=p;return r};g.noConflict=function(){h.URITemplate===g&&(h.URITemplate=b);return g};t.expand=function(b){var f="";this.parts&&this.parts.length||this.parse();b instanceof p||(b=new p(b));for(var h=0,k=this.parts.length;h<k;h++)f+="string"===typeof this.parts[h]?this.parts[h]:g.expand(this.parts[h],b);return f};t.parse=function(){var b=this.expression,f=g.EXPRESSION_PATTERN,h=g.VARIABLE_PATTERN,k=g.VARIABLE_NAME_PATTERN,n=[],r=0,l,e,p;for(f.lastIndex=0;;){e=f.exec(b);if(null===e){n.push(b.substring(r));break}else n.push(b.substring(r,e.index)),r=e.index+e[0].length;if(!q[e[1]])throw Error('Unknown Operator "'+e[1]+'" in "'+e[0]+'"');if(!e[3])throw Error('Unclosed Expression "'+e[0]+'"');l=e[2].split(",");for(var t=0,s=l.length;t<s;t++){p=l[t].match(h);if(null===p)throw Error('Invalid Variable "'+l[t]+'" in "'+e[0]+'"');if(p[1].match(k))throw Error('Invalid Variable Name "'+p[1]+'" in "'+e[0]+'"');l[t]={name:p[1],explode:!!p[3],maxlength:p[4]&&parseInt(p[4],10)}}if(!l.length)throw Error('Expression Missing Variable(s) "'+e[0]+'"');n.push({expression:e[0],operator:e[1],variables:l})}n.length||n.push(b);this.parts=n;return this};p.prototype.get=function(b){var f=this.data,g={type:0,val:[],encode:[],encodeReserved:[]},k;if(void 0!==this.cache[b])return this.cache[b];this.cache[b]=g;f="[object Function]"===String(Object.prototype.toString.call(f))?f(b):"[object Function]"===String(Object.prototype.toString.call(f[b]))?f[b](b):f[b];if(void 0!==f&&null!==f)if("[object Array]"===String(Object.prototype.toString.call(f))){k=0;for(b=f.length;k<b;k++)void 0!==f[k]&&null!==f[k]&&g.val.push([void 0,String(f[k])]);g.val.length&&(g.type=3)}else if("[object Object]"===String(Object.prototype.toString.call(f))){for(k in f)l.call(f,k)&&void 0!==f[k]&&null!==f[k]&&g.val.push([k,String(f[k])]);g.val.length&&(g.type=2)}else g.type=1,g.val.push([void 0,String(f)]);return g};f.expand=function(b,h){var l=(new g(b)).expand(h);return new f(l)};return g});(function(f,h){"object"===typeof exports?module.exports=h(require("jquery","./URI")):"function"===typeof define&&define.amd?define(["jquery","./URI"],h):h(f.jQuery,f.URI)})(this,function(f,h){function g(b){return b.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function p(b){var f=b.nodeName.toLowerCase();return"input"===f&&"image"!==b.type?void 0:h.domAttributes[f]}function b(b){return{get:function(g){return f(g).uri()[b]()},set:function(g,h){f(g).uri()[b](h);return h}}}function l(b,g){var h,l,e;if(!p(b)||!g)return!1;h=g.match(A);if(!h||!h[5]&&":"!==h[2]&&!q[h[2]])return!1;e=f(b).uri();if(h[5])return e.is(h[5]);if(":"===h[2])return l=h[1].toLowerCase()+":",q[l]?q[l](e,h[4]):!1;l=h[1].toLowerCase();return t[l]?q[h[2]](e[l](),h[4],l):!1}var t={},q={"=":function(b,f){return b===f},"^=":function(b,f){return!!(b+"").match(new RegExp("^"+g(f),"i"))},"$=":function(b,f){return!!(b+"").match(new RegExp(g(f)+"$","i"))},"*=":function(b,f,h){"directory"===h&&(b+="/");return!!(b+"").match(new RegExp(g(f),"i"))},"equals:":function(b,f){return b.equals(f)},"is:":function(b,f){return b.is(f)}};f.each("authority directory domain filename fragment hash host hostname href password path pathname port protocol query resource scheme search subdomain suffix tld username".split(" "),function(g,h){t[h]=!0;f.attrHooks["uri:"+h]=b(h)});var m=function(b,g){return f(b).uri().href(g).toString()};f.each(["src","href","action","uri","cite"],function(b,g){f.attrHooks[g]={set:m}});f.attrHooks.uri.get=function(b){return f(b).uri()};f.fn.uri=function(b){var f=this.first(),g=f.get(0),l=p(g);if(!l)throw Error('Element "'+g.nodeName+'" does not have either property: href, src, action, cite');if(void 0!==b){var e=f.data("uri");if(e)return e.href(b);b instanceof h||(b=h(b||""))}else{if(b=f.data("uri"))return b;b=h(f.attr(l)||"")}b._dom_element=g;b._dom_attribute=l;b.normalize();f.data("uri",b);return b};h.prototype.build=function(b){if(this._dom_element)this._string=h.build(this._parts),this._deferred_build=!1,this._dom_element.setAttribute(this._dom_attribute,this._string),this._dom_element[this._dom_attribute]=this._string;else if(!0===b)this._deferred_build=!0;else if(void 0===b||this._deferred_build)this._string=h.build(this._parts),this._deferred_build=!1;return this};var x,A=/^([a-zA-Z]+)\s*([\^\$*]?=|:)\s*(['"]?)(.+)\3|^\s*([a-zA-Z0-9]+)\s*$/;x=f.expr.createPseudo?f.expr.createPseudo(function(b){return function(f){return l(f,b)}}):function(b,f,g){return l(b,g[3])};f.expr[":"].uri=x;return f});(function(window,document,undefined){'use strict';function minErr(module,ErrorConstructor){ErrorConstructor=ErrorConstructor||Error;return function(){var code=arguments[0],prefix='['+(module?module+':':'')+code+'] ',template=arguments[1],templateArgs=arguments,message,i;message=prefix+template.replace(/\{\d+\}/g,function(match){var index=+match.slice(1,-1),arg;if(index+2<templateArgs.length){return toDebugString(templateArgs[index+2]);}return match;});message=message+'\nhttp://errors.angularjs.org/1.3.14/'+(module?module+'/':'')+code;for(i=2;i<arguments.length;i++){message=message+(i==2?'?':'&')+'p'+(i-2)+'='+encodeURIComponent(toDebugString(arguments[i]));}return new ErrorConstructor(message);};}var REGEX_STRING_REGEXP=/^\/(.+)\/([a-z]*)$/;var VALIDITY_STATE_PROPERTY='validity';var lowercase=function(string){return isString(string)?string.toLowerCase():string;};var hasOwnProperty=Object.prototype.hasOwnProperty;var uppercase=function(string){return isString(string)?string.toUpperCase():string;};var manualLowercase=function(s){return isString(s)?s.replace(/[A-Z]/g,function(ch){return String.fromCharCode(ch.charCodeAt(0)|32);}):s;};var manualUppercase=function(s){return isString(s)?s.replace(/[a-z]/g,function(ch){return String.fromCharCode(ch.charCodeAt(0)&~32);}):s;};if('i'!=='I'.toLowerCase()){lowercase=manualLowercase;uppercase=manualUppercase;}var
msie,jqLite,jQuery,slice=[].slice,splice=[].splice,push=[].push,toString=Object.prototype.toString,ngMinErr=minErr('ng'),angular=window.angular||(window.angular={}),angularModule,uid=0;msie=document.documentMode;function isArrayLike(obj){if(obj==null||isWindow(obj)){return false;}var length=obj.length;if(obj.nodeType===NODE_TYPE_ELEMENT&&length){return true;}return isString(obj)||isArray(obj)||length===0||typeof length==='number'&&length>0&&(length-1)in obj;}function forEach(obj,iterator,context){var key,length;if(obj){if(isFunction(obj)){for(key in obj){if(key!='prototype'&&key!='length'&&key!='name'&&(!obj.hasOwnProperty||obj.hasOwnProperty(key))){iterator.call(context,obj[key],key,obj);}}}else if(isArray(obj)||isArrayLike(obj)){var isPrimitive=typeof obj!=='object';for(key=0,length=obj.length;key<length;key++){if(isPrimitive||key in obj){iterator.call(context,obj[key],key,obj);}}}else if(obj.forEach&&obj.forEach!==forEach){obj.forEach(iterator,context,obj);}else{for(key in obj){if(obj.hasOwnProperty(key)){iterator.call(context,obj[key],key,obj);}}}}return obj;}function sortedKeys(obj){return Object.keys(obj).sort();}function forEachSorted(obj,iterator,context){var keys=sortedKeys(obj);for(var i=0;i<keys.length;i++){iterator.call(context,obj[keys[i]],keys[i]);}return keys;}function reverseParams(iteratorFn){return function(value,key){iteratorFn(key,value);};}function nextUid(){return++uid;}function setHashKey(obj,h){if(h){obj.$$hashKey=h;}else{delete obj.$$hashKey;}}function extend(dst){var h=dst.$$hashKey;for(var i=1,ii=arguments.length;i<ii;i++){var obj=arguments[i];if(obj){var keys=Object.keys(obj);for(var j=0,jj=keys.length;j<jj;j++){var key=keys[j];dst[key]=obj[key];}}}setHashKey(dst,h);return dst;}function int(str){return parseInt(str,10);}function inherit(parent,extra){return extend(Object.create(parent),extra);}function noop(){}noop.$inject=[];function identity($){return $;}identity.$inject=[];function valueFn(value){return function(){return value;};}function isUndefined(value){return typeof value==='undefined';}function isDefined(value){return typeof value!=='undefined';}function isObject(value){return value!==null&&typeof value==='object';}function isString(value){return typeof value==='string';}function isNumber(value){return typeof value==='number';}function isDate(value){return toString.call(value)==='[object Date]';}var isArray=Array.isArray;function isFunction(value){return typeof value==='function';}function isRegExp(value){return toString.call(value)==='[object RegExp]';}function isWindow(obj){return obj&&obj.window===obj;}function isScope(obj){return obj&&obj.$evalAsync&&obj.$watch;}function isFile(obj){return toString.call(obj)==='[object File]';}function isFormData(obj){return toString.call(obj)==='[object FormData]';}function isBlob(obj){return toString.call(obj)==='[object Blob]';}function isBoolean(value){return typeof value==='boolean';}function isPromiseLike(obj){return obj&&isFunction(obj.then);}var trim=function(value){return isString(value)?value.trim():value;};var escapeForRegexp=function(s){return s.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,'\\$1').replace(/\x08/g,'\\x08');};function isElement(node){return!!(node&&(node.nodeName||(node.prop&&node.attr&&node.find)));}function makeMap(str){var obj={},items=str.split(","),i;for(i=0;i<items.length;i++)obj[items[i]]=true;return obj;}function nodeName_(element){return lowercase(element.nodeName||(element[0]&&element[0].nodeName));}function includes(array,obj){return Array.prototype.indexOf.call(array,obj)!=-1;}function arrayRemove(array,value){var index=array.indexOf(value);if(index>=0)array.splice(index,1);return value;}function copy(source,destination,stackSource,stackDest){if(isWindow(source)||isScope(source)){throw ngMinErr('cpws',"Can't copy! Making copies of Window or Scope instances is not supported.");}if(!destination){destination=source;if(source){if(isArray(source)){destination=copy(source,[],stackSource,stackDest);}else if(isDate(source)){destination=new Date(source.getTime());}else if(isRegExp(source)){destination=new RegExp(source.source,source.toString().match(/[^\/]*$/)[0]);destination.lastIndex=source.lastIndex;}else if(isObject(source)){var emptyObject=Object.create(Object.getPrototypeOf(source));destination=copy(source,emptyObject,stackSource,stackDest);}}}else{if(source===destination)throw ngMinErr('cpi',"Can't copy! Source and destination are identical.");stackSource=stackSource||[];stackDest=stackDest||[];if(isObject(source)){var index=stackSource.indexOf(source);if(index!==-1)return stackDest[index];stackSource.push(source);stackDest.push(destination);}var result;if(isArray(source)){destination.length=0;for(var i=0;i<source.length;i++){result=copy(source[i],null,stackSource,stackDest);if(isObject(source[i])){stackSource.push(source[i]);stackDest.push(result);}destination.push(result);}}else{var h=destination.$$hashKey;if(isArray(destination)){destination.length=0;}else{forEach(destination,function(value,key){delete destination[key];});}for(var key in source){if(source.hasOwnProperty(key)){result=copy(source[key],null,stackSource,stackDest);if(isObject(source[key])){stackSource.push(source[key]);stackDest.push(result);}destination[key]=result;}}setHashKey(destination,h);}}return destination;}function shallowCopy(src,dst){if(isArray(src)){dst=dst||[];for(var i=0,ii=src.length;i<ii;i++){dst[i]=src[i];}}else if(isObject(src)){dst=dst||{};for(var key in src){if(!(key.charAt(0)==='$'&&key.charAt(1)==='$')){dst[key]=src[key];}}}return dst||src;}function equals(o1,o2){if(o1===o2)return true;if(o1===null||o2===null)return false;if(o1!==o1&&o2!==o2)return true;var t1=typeof o1,t2=typeof o2,length,key,keySet;if(t1==t2){if(t1=='object'){if(isArray(o1)){if(!isArray(o2))return false;if((length=o1.length)==o2.length){for(key=0;key<length;key++){if(!equals(o1[key],o2[key]))return false;}return true;}}else if(isDate(o1)){if(!isDate(o2))return false;return equals(o1.getTime(),o2.getTime());}else if(isRegExp(o1)&&isRegExp(o2)){return o1.toString()==o2.toString();}else{if(isScope(o1)||isScope(o2)||isWindow(o1)||isWindow(o2)||isArray(o2))return false;keySet={};for(key in o1){if(key.charAt(0)==='$'||isFunction(o1[key]))continue;if(!equals(o1[key],o2[key]))return false;keySet[key]=true;}for(key in o2){if(!keySet.hasOwnProperty(key)&&key.charAt(0)!=='$'&&o2[key]!==undefined&&!isFunction(o2[key]))return false;}return true;}}}return false;}var csp=function(){if(isDefined(csp.isActive_))return csp.isActive_;var active=!!(document.querySelector('[ng-csp]')||document.querySelector('[data-ng-csp]'));if(!active){try{new Function('');}catch(e){active=true;}}return(csp.isActive_=active);};function concat(array1,array2,index){return array1.concat(slice.call(array2,index));}function sliceArgs(args,startIndex){return slice.call(args,startIndex||0);}function bind(self,fn){var curryArgs=arguments.length>2?sliceArgs(arguments,2):[];if(isFunction(fn)&&!(fn instanceof RegExp)){return curryArgs.length?function(){return arguments.length?fn.apply(self,concat(curryArgs,arguments,0)):fn.apply(self,curryArgs);}:function(){return arguments.length?fn.apply(self,arguments):fn.call(self);};}else{return fn;}}function toJsonReplacer(key,value){var val=value;if(typeof key==='string'&&key.charAt(0)==='$'&&key.charAt(1)==='$'){val=undefined;}else if(isWindow(value)){val='$WINDOW';}else if(value&&document===value){val='$DOCUMENT';}else if(isScope(value)){val='$SCOPE';}return val;}function toJson(obj,pretty){if(typeof obj==='undefined')return undefined;if(!isNumber(pretty)){pretty=pretty?2:null;}return JSON.stringify(obj,toJsonReplacer,pretty);}function fromJson(json){return isString(json)?JSON.parse(json):json;}function startingTag(element){element=jqLite(element).clone();try{element.empty();}catch(e){}var elemHtml=jqLite('<div>').append(element).html();try{return element[0].nodeType===NODE_TYPE_TEXT?lowercase(elemHtml):elemHtml.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(match,nodeName){return'<'+lowercase(nodeName);});}catch(e){return lowercase(elemHtml);}}function tryDecodeURIComponent(value){try{return decodeURIComponent(value);}catch(e){}}function parseKeyValue(keyValue){var obj={},key_value,key;forEach((keyValue||"").split('&'),function(keyValue){if(keyValue){key_value=keyValue.replace(/\+/g,'%20').split('=');key=tryDecodeURIComponent(key_value[0]);if(isDefined(key)){var val=isDefined(key_value[1])?tryDecodeURIComponent(key_value[1]):true;if(!hasOwnProperty.call(obj,key)){obj[key]=val;}else if(isArray(obj[key])){obj[key].push(val);}else{obj[key]=[obj[key],val];}}}});return obj;}function toKeyValue(obj){var parts=[];forEach(obj,function(value,key){if(isArray(value)){forEach(value,function(arrayValue){parts.push(encodeUriQuery(key,true)+(arrayValue===true?'':'='+encodeUriQuery(arrayValue,true)));});}else{parts.push(encodeUriQuery(key,true)+(value===true?'':'='+encodeUriQuery(value,true)));}});return parts.length?parts.join('&'):'';}function encodeUriSegment(val){return encodeUriQuery(val,true).replace(/%26/gi,'&').replace(/%3D/gi,'=').replace(/%2B/gi,'+');}function encodeUriQuery(val,pctEncodeSpaces){return encodeURIComponent(val).replace(/%40/gi,'@').replace(/%3A/gi,':').replace(/%24/g,'$').replace(/%2C/gi,',').replace(/%3B/gi,';').replace(/%20/g,(pctEncodeSpaces?'%20':'+'));}var ngAttrPrefixes=['ng-','data-ng-','ng:','x-ng-'];function getNgAttribute(element,ngAttr){var attr,i,ii=ngAttrPrefixes.length;element=jqLite(element);for(i=0;i<ii;++i){attr=ngAttrPrefixes[i]+ngAttr;if(isString(attr=element.attr(attr))){return attr;}}return null;}function angularInit(element,bootstrap){var appElement,module,config={};forEach(ngAttrPrefixes,function(prefix){var name=prefix+'app';if(!appElement&&element.hasAttribute&&element.hasAttribute(name)){appElement=element;module=element.getAttribute(name);}});forEach(ngAttrPrefixes,function(prefix){var name=prefix+'app';var candidate;if(!appElement&&(candidate=element.querySelector('['+name.replace(':','\\:')+']'))){appElement=candidate;module=candidate.getAttribute(name);}});if(appElement){config.strictDi=getNgAttribute(appElement,"strict-di")!==null;bootstrap(appElement,module?[module]:[],config);}}function bootstrap(element,modules,config){if(!isObject(config))config={};var defaultConfig={strictDi:false};config=extend(defaultConfig,config);var doBootstrap=function(){element=jqLite(element);if(element.injector()){var tag=(element[0]===document)?'document':startingTag(element);throw ngMinErr('btstrpd',"App Already Bootstrapped with this Element '{0}'",tag.replace(/</,'&lt;').replace(/>/,'&gt;'));}modules=modules||[];modules.unshift(['$provide',function($provide){$provide.value('$rootElement',element);}]);if(config.debugInfoEnabled){modules.push(['$compileProvider',function($compileProvider){$compileProvider.debugInfoEnabled(true);}]);}modules.unshift('ng');var injector=createInjector(modules,config.strictDi);injector.invoke(['$rootScope','$rootElement','$compile','$injector',function bootstrapApply(scope,element,compile,injector){scope.$apply(function(){element.data('$injector',injector);compile(element)(scope);});}]);return injector;};var NG_ENABLE_DEBUG_INFO=/^NG_ENABLE_DEBUG_INFO!/;var NG_DEFER_BOOTSTRAP=/^NG_DEFER_BOOTSTRAP!/;if(window&&NG_ENABLE_DEBUG_INFO.test(window.name)){config.debugInfoEnabled=true;window.name=window.name.replace(NG_ENABLE_DEBUG_INFO,'');}if(window&&!NG_DEFER_BOOTSTRAP.test(window.name)){return doBootstrap();}window.name=window.name.replace(NG_DEFER_BOOTSTRAP,'');angular.resumeBootstrap=function(extraModules){forEach(extraModules,function(module){modules.push(module);});return doBootstrap();};if(isFunction(angular.resumeDeferredBootstrap)){angular.resumeDeferredBootstrap();}}function reloadWithDebugInfo(){window.name='NG_ENABLE_DEBUG_INFO!'+window.name;window.location.reload();}function getTestability(rootElement){var injector=angular.element(rootElement).injector();if(!injector){throw ngMinErr('test','no injector found for element argument to getTestability');}return injector.get('$$testability');}var SNAKE_CASE_REGEXP=/[A-Z]/g;function snake_case(name,separator){separator=separator||'_';return name.replace(SNAKE_CASE_REGEXP,function(letter,pos){return(pos?separator:'')+letter.toLowerCase();});}var bindJQueryFired=false;var skipDestroyOnNextJQueryCleanData;function bindJQuery(){var originalCleanData;if(bindJQueryFired){return;}jQuery=window.jQuery;if(jQuery&&jQuery.fn.on){jqLite=jQuery;extend(jQuery.fn,{scope:JQLitePrototype.scope,isolateScope:JQLitePrototype.isolateScope,controller:JQLitePrototype.controller,injector:JQLitePrototype.injector,inheritedData:JQLitePrototype.inheritedData});originalCleanData=jQuery.cleanData;jQuery.cleanData=function(elems){var events;if(!skipDestroyOnNextJQueryCleanData){for(var i=0,elem;(elem=elems[i])!=null;i++){events=jQuery._data(elem,"events");if(events&&events.$destroy){jQuery(elem).triggerHandler('$destroy');}}}else{skipDestroyOnNextJQueryCleanData=false;}originalCleanData(elems);};}else{jqLite=JQLite;}angular.element=jqLite;bindJQueryFired=true;}function assertArg(arg,name,reason){if(!arg){throw ngMinErr('areq',"Argument '{0}' is {1}",(name||'?'),(reason||"required"));}return arg;}function assertArgFn(arg,name,acceptArrayAnnotation){if(acceptArrayAnnotation&&isArray(arg)){arg=arg[arg.length-1];}assertArg(isFunction(arg),name,'not a function, got '+(arg&&typeof arg==='object'?arg.constructor.name||'Object':typeof arg));return arg;}function assertNotHasOwnProperty(name,context){if(name==='hasOwnProperty'){throw ngMinErr('badname',"hasOwnProperty is not a valid {0} name",context);}}function getter(obj,path,bindFnToScope){if(!path)return obj;var keys=path.split('.');var key;var lastInstance=obj;var len=keys.length;for(var i=0;i<len;i++){key=keys[i];if(obj){obj=(lastInstance=obj)[key];}}if(!bindFnToScope&&isFunction(obj)){return bind(lastInstance,obj);}return obj;}function getBlockNodes(nodes){var node=nodes[0];var endNode=nodes[nodes.length-1];var blockNodes=[node];do{node=node.nextSibling;if(!node)break;blockNodes.push(node);}while(node!==endNode);return jqLite(blockNodes);}function createMap(){return Object.create(null);}var NODE_TYPE_ELEMENT=1;var NODE_TYPE_TEXT=3;var NODE_TYPE_COMMENT=8;var NODE_TYPE_DOCUMENT=9;var NODE_TYPE_DOCUMENT_FRAGMENT=11;function setupModuleLoader(window){var $injectorMinErr=minErr('$injector');var ngMinErr=minErr('ng');function ensure(obj,name,factory){return obj[name]||(obj[name]=factory());}var angular=ensure(window,'angular',Object);angular.$$minErr=angular.$$minErr||minErr;return ensure(angular,'module',function(){var modules={};return function module(name,requires,configFn){var assertNotHasOwnProperty=function(name,context){if(name==='hasOwnProperty'){throw ngMinErr('badname','hasOwnProperty is not a valid {0} name',context);}};assertNotHasOwnProperty(name,'module');if(requires&&modules.hasOwnProperty(name)){modules[name]=null;}return ensure(modules,name,function(){if(!requires){throw $injectorMinErr('nomod',"Module '{0}' is not available! You either misspelled "+"the module name or forgot to load it. If registering a module ensure that you "+"specify the dependencies as the second argument.",name);}var invokeQueue=[];var configBlocks=[];var runBlocks=[];var config=invokeLater('$injector','invoke','push',configBlocks);var moduleInstance={_invokeQueue:invokeQueue,_configBlocks:configBlocks,_runBlocks:runBlocks,requires:requires,name:name,provider:invokeLater('$provide','provider'),factory:invokeLater('$provide','factory'),service:invokeLater('$provide','service'),value:invokeLater('$provide','value'),constant:invokeLater('$provide','constant','unshift'),animation:invokeLater('$animateProvider','register'),filter:invokeLater('$filterProvider','register'),controller:invokeLater('$controllerProvider','register'),directive:invokeLater('$compileProvider','directive'),config:config,run:function(block){runBlocks.push(block);return this;}};if(configFn){config(configFn);}return moduleInstance;function invokeLater(provider,method,insertMethod,queue){if(!queue)queue=invokeQueue;return function(){queue[insertMethod||'push']([provider,method,arguments]);return moduleInstance;};}});};});}function serializeObject(obj){var seen=[];return JSON.stringify(obj,function(key,val){val=toJsonReplacer(key,val);if(isObject(val)){if(seen.indexOf(val)>=0)return'<<already seen>>';seen.push(val);}return val;});}function toDebugString(obj){if(typeof obj==='function'){return obj.toString().replace(/ \{[\s\S]*$/,'');}else if(typeof obj==='undefined'){return'undefined';}else if(typeof obj!=='string'){return serializeObject(obj);}return obj;}var version={full:'1.3.14',major:1,minor:3,dot:14,codeName:'instantaneous-browserification'};function publishExternalAPI(angular){extend(angular,{'bootstrap':bootstrap,'copy':copy,'extend':extend,'equals':equals,'element':jqLite,'forEach':forEach,'injector':createInjector,'noop':noop,'bind':bind,'toJson':toJson,'fromJson':fromJson,'identity':identity,'isUndefined':isUndefined,'isDefined':isDefined,'isString':isString,'isFunction':isFunction,'isObject':isObject,'isNumber':isNumber,'isElement':isElement,'isArray':isArray,'version':version,'isDate':isDate,'lowercase':lowercase,'uppercase':uppercase,'callbacks':{counter:0},'getTestability':getTestability,'$$minErr':minErr,'$$csp':csp,'reloadWithDebugInfo':reloadWithDebugInfo});angularModule=setupModuleLoader(window);try{angularModule('ngLocale');}catch(e){angularModule('ngLocale',[]).provider('$locale',$LocaleProvider);}angularModule('ng',['ngLocale'],['$provide',function ngModule($provide){$provide.provider({$$sanitizeUri:$$SanitizeUriProvider});$provide.provider('$compile',$CompileProvider).directive({a:htmlAnchorDirective,input:inputDirective,textarea:inputDirective,form:formDirective,script:scriptDirective,select:selectDirective,style:styleDirective,option:optionDirective,ngBind:ngBindDirective,ngBindHtml:ngBindHtmlDirective,ngBindTemplate:ngBindTemplateDirective,ngClass:ngClassDirective,ngClassEven:ngClassEvenDirective,ngClassOdd:ngClassOddDirective,ngCloak:ngCloakDirective,ngController:ngControllerDirective,ngForm:ngFormDirective,ngHide:ngHideDirective,ngIf:ngIfDirective,ngInclude:ngIncludeDirective,ngInit:ngInitDirective,ngNonBindable:ngNonBindableDirective,ngPluralize:ngPluralizeDirective,ngRepeat:ngRepeatDirective,ngShow:ngShowDirective,ngStyle:ngStyleDirective,ngSwitch:ngSwitchDirective,ngSwitchWhen:ngSwitchWhenDirective,ngSwitchDefault:ngSwitchDefaultDirective,ngOptions:ngOptionsDirective,ngTransclude:ngTranscludeDirective,ngModel:ngModelDirective,ngList:ngListDirective,ngChange:ngChangeDirective,pattern:patternDirective,ngPattern:patternDirective,required:requiredDirective,ngRequired:requiredDirective,minlength:minlengthDirective,ngMinlength:minlengthDirective,maxlength:maxlengthDirective,ngMaxlength:maxlengthDirective,ngValue:ngValueDirective,ngModelOptions:ngModelOptionsDirective}).directive({ngInclude:ngIncludeFillContentDirective}).directive(ngAttributeAliasDirectives).directive(ngEventDirectives);$provide.provider({$anchorScroll:$AnchorScrollProvider,$animate:$AnimateProvider,$browser:$BrowserProvider,$cacheFactory:$CacheFactoryProvider,$controller:$ControllerProvider,$document:$DocumentProvider,$exceptionHandler:$ExceptionHandlerProvider,$filter:$FilterProvider,$interpolate:$InterpolateProvider,$interval:$IntervalProvider,$http:$HttpProvider,$httpBackend:$HttpBackendProvider,$location:$LocationProvider,$log:$LogProvider,$parse:$ParseProvider,$rootScope:$RootScopeProvider,$q:$QProvider,$$q:$$QProvider,$sce:$SceProvider,$sceDelegate:$SceDelegateProvider,$sniffer:$SnifferProvider,$templateCache:$TemplateCacheProvider,$templateRequest:$TemplateRequestProvider,$$testability:$$TestabilityProvider,$timeout:$TimeoutProvider,$window:$WindowProvider,$$rAF:$$RAFProvider,$$asyncCallback:$$AsyncCallbackProvider,$$jqLite:$$jqLiteProvider});}]);}JQLite.expando='ng339';var jqCache=JQLite.cache={},jqId=1,addEventListenerFn=function(element,type,fn){element.addEventListener(type,fn,false);},removeEventListenerFn=function(element,type,fn){element.removeEventListener(type,fn,false);};JQLite._data=function(node){return this.cache[node[this.expando]]||{};};function jqNextId(){return++jqId;}var SPECIAL_CHARS_REGEXP=/([\:\-\_]+(.))/g;var MOZ_HACK_REGEXP=/^moz([A-Z])/;var MOUSE_EVENT_MAP={mouseleave:"mouseout",mouseenter:"mouseover"};var jqLiteMinErr=minErr('jqLite');function camelCase(name){return name.replace(SPECIAL_CHARS_REGEXP,function(_,separator,letter,offset){return offset?letter.toUpperCase():letter;}).replace(MOZ_HACK_REGEXP,'Moz$1');}var SINGLE_TAG_REGEXP=/^<(\w+)\s*\/?>(?:<\/\1>|)$/;var HTML_REGEXP=/<|&#?\w+;/;var TAG_NAME_REGEXP=/<([\w:]+)/;var XHTML_TAG_REGEXP=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;var wrapMap={'option':[1,'<select multiple="multiple">','</select>'],'thead':[1,'<table>','</table>'],'col':[2,'<table><colgroup>','</colgroup></table>'],'tr':[2,'<table><tbody>','</tbody></table>'],'td':[3,'<table><tbody><tr>','</tr></tbody></table>'],'_default':[0,"",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;function jqLiteIsTextNode(html){return!HTML_REGEXP.test(html);}function jqLiteAcceptsData(node){var nodeType=node.nodeType;return nodeType===NODE_TYPE_ELEMENT||!nodeType||nodeType===NODE_TYPE_DOCUMENT;}function jqLiteBuildFragment(html,context){var tmp,tag,wrap,fragment=context.createDocumentFragment(),nodes=[],i;if(jqLiteIsTextNode(html)){nodes.push(context.createTextNode(html));}else{tmp=tmp||fragment.appendChild(context.createElement("div"));tag=(TAG_NAME_REGEXP.exec(html)||["",""])[1].toLowerCase();wrap=wrapMap[tag]||wrapMap._default;tmp.innerHTML=wrap[1]+html.replace(XHTML_TAG_REGEXP,"<$1></$2>")+wrap[2];i=wrap[0];while(i--){tmp=tmp.lastChild;}nodes=concat(nodes,tmp.childNodes);tmp=fragment.firstChild;tmp.textContent="";}fragment.textContent="";fragment.innerHTML="";forEach(nodes,function(node){fragment.appendChild(node);});return fragment;}function jqLiteParseHTML(html,context){context=context||document;var parsed;if((parsed=SINGLE_TAG_REGEXP.exec(html))){return[context.createElement(parsed[1])];}if((parsed=jqLiteBuildFragment(html,context))){return parsed.childNodes;}return[];}function JQLite(element){if(element instanceof JQLite){return element;}var argIsString;if(isString(element)){element=trim(element);argIsString=true;}if(!(this instanceof JQLite)){if(argIsString&&element.charAt(0)!='<'){throw jqLiteMinErr('nosel','Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');}return new JQLite(element);}if(argIsString){jqLiteAddNodes(this,jqLiteParseHTML(element));}else{jqLiteAddNodes(this,element);}}function jqLiteClone(element){return element.cloneNode(true);}function jqLiteDealoc(element,onlyDescendants){if(!onlyDescendants)jqLiteRemoveData(element);if(element.querySelectorAll){var descendants=element.querySelectorAll('*');for(var i=0,l=descendants.length;i<l;i++){jqLiteRemoveData(descendants[i]);}}}function jqLiteOff(element,type,fn,unsupported){if(isDefined(unsupported))throw jqLiteMinErr('offargs','jqLite#off() does not support the `selector` argument');var expandoStore=jqLiteExpandoStore(element);var events=expandoStore&&expandoStore.events;var handle=expandoStore&&expandoStore.handle;if(!handle)return;if(!type){for(type in events){if(type!=='$destroy'){removeEventListenerFn(element,type,handle);}delete events[type];}}else{forEach(type.split(' '),function(type){if(isDefined(fn)){var listenerFns=events[type];arrayRemove(listenerFns||[],fn);if(listenerFns&&listenerFns.length>0){return;}}removeEventListenerFn(element,type,handle);delete events[type];});}}function jqLiteRemoveData(element,name){var expandoId=element.ng339;var expandoStore=expandoId&&jqCache[expandoId];if(expandoStore){if(name){delete expandoStore.data[name];return;}if(expandoStore.handle){if(expandoStore.events.$destroy){expandoStore.handle({},'$destroy');}jqLiteOff(element);}delete jqCache[expandoId];element.ng339=undefined;}}function jqLiteExpandoStore(element,createIfNecessary){var expandoId=element.ng339,expandoStore=expandoId&&jqCache[expandoId];if(createIfNecessary&&!expandoStore){element.ng339=expandoId=jqNextId();expandoStore=jqCache[expandoId]={events:{},data:{},handle:undefined};}return expandoStore;}function jqLiteData(element,key,value){if(jqLiteAcceptsData(element)){var isSimpleSetter=isDefined(value);var isSimpleGetter=!isSimpleSetter&&key&&!isObject(key);var massGetter=!key;var expandoStore=jqLiteExpandoStore(element,!isSimpleGetter);var data=expandoStore&&expandoStore.data;if(isSimpleSetter){data[key]=value;}else{if(massGetter){return data;}else{if(isSimpleGetter){return data&&data[key];}else{extend(data,key);}}}}}function jqLiteHasClass(element,selector){if(!element.getAttribute)return false;return((" "+(element.getAttribute('class')||'')+" ").replace(/[\n\t]/g," ").indexOf(" "+selector+" ")>-1);}function jqLiteRemoveClass(element,cssClasses){if(cssClasses&&element.setAttribute){forEach(cssClasses.split(' '),function(cssClass){element.setAttribute('class',trim((" "+(element.getAttribute('class')||'')+" ").replace(/[\n\t]/g," ").replace(" "+trim(cssClass)+" "," ")));});}}function jqLiteAddClass(element,cssClasses){if(cssClasses&&element.setAttribute){var existingClasses=(' '+(element.getAttribute('class')||'')+' ').replace(/[\n\t]/g," ");forEach(cssClasses.split(' '),function(cssClass){cssClass=trim(cssClass);if(existingClasses.indexOf(' '+cssClass+' ')===-1){existingClasses+=cssClass+' ';}});element.setAttribute('class',trim(existingClasses));}}function jqLiteAddNodes(root,elements){if(elements){if(elements.nodeType){root[root.length++]=elements;}else{var length=elements.length;if(typeof length==='number'&&elements.window!==elements){if(length){for(var i=0;i<length;i++){root[root.length++]=elements[i];}}}else{root[root.length++]=elements;}}}}function jqLiteController(element,name){return jqLiteInheritedData(element,'$'+(name||'ngController')+'Controller');}function jqLiteInheritedData(element,name,value){if(element.nodeType==NODE_TYPE_DOCUMENT){element=element.documentElement;}var names=isArray(name)?name:[name];while(element){for(var i=0,ii=names.length;i<ii;i++){if((value=jqLite.data(element,names[i]))!==undefined)return value;}element=element.parentNode||(element.nodeType===NODE_TYPE_DOCUMENT_FRAGMENT&&element.host);}}function jqLiteEmpty(element){jqLiteDealoc(element,true);while(element.firstChild){element.removeChild(element.firstChild);}}function jqLiteRemove(element,keepData){if(!keepData)jqLiteDealoc(element);var parent=element.parentNode;if(parent)parent.removeChild(element);}function jqLiteDocumentLoaded(action,win){win=win||window;if(win.document.readyState==='complete'){win.setTimeout(action);}else{jqLite(win).on('load',action);}}var JQLitePrototype=JQLite.prototype={ready:function(fn){var fired=false;function trigger(){if(fired)return;fired=true;fn();}if(document.readyState==='complete'){setTimeout(trigger);}else{this.on('DOMContentLoaded',trigger);JQLite(window).on('load',trigger);}},toString:function(){var value=[];forEach(this,function(e){value.push(''+e);});return'['+value.join(', ')+']';},eq:function(index){return(index>=0)?jqLite(this[index]):jqLite(this[this.length+index]);},length:0,push:push,sort:[].sort,splice:[].splice};var BOOLEAN_ATTR={};forEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','),function(value){BOOLEAN_ATTR[lowercase(value)]=value;});var BOOLEAN_ELEMENTS={};forEach('input,select,option,textarea,button,form,details'.split(','),function(value){BOOLEAN_ELEMENTS[value]=true;});var ALIASED_ATTR={'ngMinlength':'minlength','ngMaxlength':'maxlength','ngMin':'min','ngMax':'max','ngPattern':'pattern'};function getBooleanAttrName(element,name){var booleanAttr=BOOLEAN_ATTR[name.toLowerCase()];return booleanAttr&&BOOLEAN_ELEMENTS[nodeName_(element)]&&booleanAttr;}function getAliasedAttrName(element,name){var nodeName=element.nodeName;return(nodeName==='INPUT'||nodeName==='TEXTAREA')&&ALIASED_ATTR[name];}forEach({data:jqLiteData,removeData:jqLiteRemoveData},function(fn,name){JQLite[name]=fn;});forEach({data:jqLiteData,inheritedData:jqLiteInheritedData,scope:function(element){return jqLite.data(element,'$scope')||jqLiteInheritedData(element.parentNode||element,['$isolateScope','$scope']);},isolateScope:function(element){return jqLite.data(element,'$isolateScope')||jqLite.data(element,'$isolateScopeNoTemplate');},controller:jqLiteController,injector:function(element){return jqLiteInheritedData(element,'$injector');},removeAttr:function(element,name){element.removeAttribute(name);},hasClass:jqLiteHasClass,css:function(element,name,value){name=camelCase(name);if(isDefined(value)){element.style[name]=value;}else{return element.style[name];}},attr:function(element,name,value){var lowercasedName=lowercase(name);if(BOOLEAN_ATTR[lowercasedName]){if(isDefined(value)){if(!!value){element[name]=true;element.setAttribute(name,lowercasedName);}else{element[name]=false;element.removeAttribute(lowercasedName);}}else{return(element[name]||(element.attributes.getNamedItem(name)||noop).specified)?lowercasedName:undefined;}}else if(isDefined(value)){element.setAttribute(name,value);}else if(element.getAttribute){var ret=element.getAttribute(name,2);return ret===null?undefined:ret;}},prop:function(element,name,value){if(isDefined(value)){element[name]=value;}else{return element[name];}},text:(function(){getText.$dv='';return getText;function getText(element,value){if(isUndefined(value)){var nodeType=element.nodeType;return(nodeType===NODE_TYPE_ELEMENT||nodeType===NODE_TYPE_TEXT)?element.textContent:'';}element.textContent=value;}})(),val:function(element,value){if(isUndefined(value)){if(element.multiple&&nodeName_(element)==='select'){var result=[];forEach(element.options,function(option){if(option.selected){result.push(option.value||option.text);}});return result.length===0?null:result;}return element.value;}element.value=value;},html:function(element,value){if(isUndefined(value)){return element.innerHTML;}jqLiteDealoc(element,true);element.innerHTML=value;},empty:jqLiteEmpty},function(fn,name){JQLite.prototype[name]=function(arg1,arg2){var i,key;var nodeCount=this.length;if(fn!==jqLiteEmpty&&(((fn.length==2&&(fn!==jqLiteHasClass&&fn!==jqLiteController))?arg1:arg2)===undefined)){if(isObject(arg1)){for(i=0;i<nodeCount;i++){if(fn===jqLiteData){fn(this[i],arg1);}else{for(key in arg1){fn(this[i],key,arg1[key]);}}}return this;}else{var value=fn.$dv;var jj=(value===undefined)?Math.min(nodeCount,1):nodeCount;for(var j=0;j<jj;j++){var nodeValue=fn(this[j],arg1,arg2);value=value?value+nodeValue:nodeValue;}return value;}}else{for(i=0;i<nodeCount;i++){fn(this[i],arg1,arg2);}return this;}};});function createEventHandler(element,events){var eventHandler=function(event,type){event.isDefaultPrevented=function(){return event.defaultPrevented;};var eventFns=events[type||event.type];var eventFnsLength=eventFns?eventFns.length:0;if(!eventFnsLength)return;if(isUndefined(event.immediatePropagationStopped)){var originalStopImmediatePropagation=event.stopImmediatePropagation;event.stopImmediatePropagation=function(){event.immediatePropagationStopped=true;if(event.stopPropagation){event.stopPropagation();}if(originalStopImmediatePropagation){originalStopImmediatePropagation.call(event);}};}event.isImmediatePropagationStopped=function(){return event.immediatePropagationStopped===true;};if((eventFnsLength>1)){eventFns=shallowCopy(eventFns);}for(var i=0;i<eventFnsLength;i++){if(!event.isImmediatePropagationStopped()){eventFns[i].call(element,event);}}};eventHandler.elem=element;return eventHandler;}forEach({removeData:jqLiteRemoveData,on:function jqLiteOn(element,type,fn,unsupported){if(isDefined(unsupported))throw jqLiteMinErr('onargs','jqLite#on() does not support the `selector` or `eventData` parameters');if(!jqLiteAcceptsData(element)){return;}var expandoStore=jqLiteExpandoStore(element,true);var events=expandoStore.events;var handle=expandoStore.handle;if(!handle){handle=expandoStore.handle=createEventHandler(element,events);}var types=type.indexOf(' ')>=0?type.split(' '):[type];var i=types.length;while(i--){type=types[i];var eventFns=events[type];if(!eventFns){events[type]=[];if(type==='mouseenter'||type==='mouseleave'){jqLiteOn(element,MOUSE_EVENT_MAP[type],function(event){var target=this,related=event.relatedTarget;if(!related||(related!==target&&!target.contains(related))){handle(event,type);}});}else{if(type!=='$destroy'){addEventListenerFn(element,type,handle);}}eventFns=events[type];}eventFns.push(fn);}},off:jqLiteOff,one:function(element,type,fn){element=jqLite(element);element.on(type,function onFn(){element.off(type,fn);element.off(type,onFn);});element.on(type,fn);},replaceWith:function(element,replaceNode){var index,parent=element.parentNode;jqLiteDealoc(element);forEach(new JQLite(replaceNode),function(node){if(index){parent.insertBefore(node,index.nextSibling);}else{parent.replaceChild(node,element);}index=node;});},children:function(element){var children=[];forEach(element.childNodes,function(element){if(element.nodeType===NODE_TYPE_ELEMENT)children.push(element);});return children;},contents:function(element){return element.contentDocument||element.childNodes||[];},append:function(element,node){var nodeType=element.nodeType;if(nodeType!==NODE_TYPE_ELEMENT&&nodeType!==NODE_TYPE_DOCUMENT_FRAGMENT)return;node=new JQLite(node);for(var i=0,ii=node.length;i<ii;i++){var child=node[i];element.appendChild(child);}},prepend:function(element,node){if(element.nodeType===NODE_TYPE_ELEMENT){var index=element.firstChild;forEach(new JQLite(node),function(child){element.insertBefore(child,index);});}},wrap:function(element,wrapNode){wrapNode=jqLite(wrapNode).eq(0).clone()[0];var parent=element.parentNode;if(parent){parent.replaceChild(wrapNode,element);}wrapNode.appendChild(element);},remove:jqLiteRemove,detach:function(element){jqLiteRemove(element,true);},after:function(element,newElement){var index=element,parent=element.parentNode;newElement=new JQLite(newElement);for(var i=0,ii=newElement.length;i<ii;i++){var node=newElement[i];parent.insertBefore(node,index.nextSibling);index=node;}},addClass:jqLiteAddClass,removeClass:jqLiteRemoveClass,toggleClass:function(element,selector,condition){if(selector){forEach(selector.split(' '),function(className){var classCondition=condition;if(isUndefined(classCondition)){classCondition=!jqLiteHasClass(element,className);}(classCondition?jqLiteAddClass:jqLiteRemoveClass)(element,className);});}},parent:function(element){var parent=element.parentNode;return parent&&parent.nodeType!==NODE_TYPE_DOCUMENT_FRAGMENT?parent:null;},next:function(element){return element.nextElementSibling;},find:function(element,selector){if(element.getElementsByTagName){return element.getElementsByTagName(selector);}else{return[];}},clone:jqLiteClone,triggerHandler:function(element,event,extraParameters){var dummyEvent,eventFnsCopy,handlerArgs;var eventName=event.type||event;var expandoStore=jqLiteExpandoStore(element);var events=expandoStore&&expandoStore.events;var eventFns=events&&events[eventName];if(eventFns){dummyEvent={preventDefault:function(){this.defaultPrevented=true;},isDefaultPrevented:function(){return this.defaultPrevented===true;},stopImmediatePropagation:function(){this.immediatePropagationStopped=true;},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===true;},stopPropagation:noop,type:eventName,target:element};if(event.type){dummyEvent=extend(dummyEvent,event);}eventFnsCopy=shallowCopy(eventFns);handlerArgs=extraParameters?[dummyEvent].concat(extraParameters):[dummyEvent];forEach(eventFnsCopy,function(fn){if(!dummyEvent.isImmediatePropagationStopped()){fn.apply(element,handlerArgs);}});}}},function(fn,name){JQLite.prototype[name]=function(arg1,arg2,arg3){var value;for(var i=0,ii=this.length;i<ii;i++){if(isUndefined(value)){value=fn(this[i],arg1,arg2,arg3);if(isDefined(value)){value=jqLite(value);}}else{jqLiteAddNodes(value,fn(this[i],arg1,arg2,arg3));}}return isDefined(value)?value:this;};JQLite.prototype.bind=JQLite.prototype.on;JQLite.prototype.unbind=JQLite.prototype.off;});function $$jqLiteProvider(){this.$get=function $$jqLite(){return extend(JQLite,{hasClass:function(node,classes){if(node.attr)node=node[0];return jqLiteHasClass(node,classes);},addClass:function(node,classes){if(node.attr)node=node[0];return jqLiteAddClass(node,classes);},removeClass:function(node,classes){if(node.attr)node=node[0];return jqLiteRemoveClass(node,classes);}});};}function hashKey(obj,nextUidFn){var key=obj&&obj.$$hashKey;if(key){if(typeof key==='function'){key=obj.$$hashKey();}return key;}var objType=typeof obj;if(objType=='function'||(objType=='object'&&obj!==null)){key=obj.$$hashKey=objType+':'+(nextUidFn||nextUid)();}else{key=objType+':'+obj;}return key;}function HashMap(array,isolatedUid){if(isolatedUid){var uid=0;this.nextUid=function(){return++uid;};}forEach(array,this.put,this);}HashMap.prototype={put:function(key,value){this[hashKey(key,this.nextUid)]=value;},get:function(key){return this[hashKey(key,this.nextUid)];},remove:function(key){var value=this[key=hashKey(key,this.nextUid)];delete this[key];return value;}};var FN_ARGS=/^function\s*[^\(]*\(\s*([^\)]*)\)/m;var FN_ARG_SPLIT=/,/;var FN_ARG=/^\s*(_?)(\S+?)\1\s*$/;var STRIP_COMMENTS=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;var $injectorMinErr=minErr('$injector');function anonFn(fn){var fnText=fn.toString().replace(STRIP_COMMENTS,''),args=fnText.match(FN_ARGS);if(args){return'function('+(args[1]||'').replace(/[\s\r\n]+/,' ')+')';}return'fn';}function annotate(fn,strictDi,name){var $inject,fnText,argDecl,last;if(typeof fn==='function'){if(!($inject=fn.$inject)){$inject=[];if(fn.length){if(strictDi){if(!isString(name)||!name){name=fn.name||anonFn(fn);}throw $injectorMinErr('strictdi','{0} is not using explicit annotation and cannot be invoked in strict mode',name);}fnText=fn.toString().replace(STRIP_COMMENTS,'');argDecl=fnText.match(FN_ARGS);forEach(argDecl[1].split(FN_ARG_SPLIT),function(arg){arg.replace(FN_ARG,function(all,underscore,name){$inject.push(name);});});}fn.$inject=$inject;}}else if(isArray(fn)){last=fn.length-1;assertArgFn(fn[last],'fn');$inject=fn.slice(0,last);}else{assertArgFn(fn,'fn',true);}return $inject;}function createInjector(modulesToLoad,strictDi){strictDi=(strictDi===true);var INSTANTIATING={},providerSuffix='Provider',path=[],loadedModules=new HashMap([],true),providerCache={$provide:{provider:supportObject(provider),factory:supportObject(factory),service:supportObject(service),value:supportObject(value),constant:supportObject(constant),decorator:decorator}},providerInjector=(providerCache.$injector=createInternalInjector(providerCache,function(serviceName,caller){if(angular.isString(caller)){path.push(caller);}throw $injectorMinErr('unpr',"Unknown provider: {0}",path.join(' <- '));})),instanceCache={},instanceInjector=(instanceCache.$injector=createInternalInjector(instanceCache,function(serviceName,caller){var provider=providerInjector.get(serviceName+providerSuffix,caller);return instanceInjector.invoke(provider.$get,provider,undefined,serviceName);}));forEach(loadModules(modulesToLoad),function(fn){instanceInjector.invoke(fn||noop);});return instanceInjector;function supportObject(delegate){return function(key,value){if(isObject(key)){forEach(key,reverseParams(delegate));}else{return delegate(key,value);}};}function provider(name,provider_){assertNotHasOwnProperty(name,'service');if(isFunction(provider_)||isArray(provider_)){provider_=providerInjector.instantiate(provider_);}if(!provider_.$get){throw $injectorMinErr('pget',"Provider '{0}' must define $get factory method.",name);}return providerCache[name+providerSuffix]=provider_;}function enforceReturnValue(name,factory){return function enforcedReturnValue(){var result=instanceInjector.invoke(factory,this);if(isUndefined(result)){throw $injectorMinErr('undef',"Provider '{0}' must return a value from $get factory method.",name);}return result;};}function factory(name,factoryFn,enforce){return provider(name,{$get:enforce!==false?enforceReturnValue(name,factoryFn):factoryFn});}function service(name,constructor){return factory(name,['$injector',function($injector){return $injector.instantiate(constructor);}]);}function value(name,val){return factory(name,valueFn(val),false);}function constant(name,value){assertNotHasOwnProperty(name,'constant');providerCache[name]=value;instanceCache[name]=value;}function decorator(serviceName,decorFn){var origProvider=providerInjector.get(serviceName+providerSuffix),orig$get=origProvider.$get;origProvider.$get=function(){var origInstance=instanceInjector.invoke(orig$get,origProvider);return instanceInjector.invoke(decorFn,null,{$delegate:origInstance});};}function loadModules(modulesToLoad){var runBlocks=[],moduleFn;forEach(modulesToLoad,function(module){if(loadedModules.get(module))return;loadedModules.put(module,true);function runInvokeQueue(queue){var i,ii;for(i=0,ii=queue.length;i<ii;i++){var invokeArgs=queue[i],provider=providerInjector.get(invokeArgs[0]);provider[invokeArgs[1]].apply(provider,invokeArgs[2]);}}try{if(isString(module)){moduleFn=angularModule(module);runBlocks=runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);runInvokeQueue(moduleFn._invokeQueue);runInvokeQueue(moduleFn._configBlocks);}else if(isFunction(module)){runBlocks.push(providerInjector.invoke(module));}else if(isArray(module)){runBlocks.push(providerInjector.invoke(module));}else{assertArgFn(module,'module');}}catch(e){if(isArray(module)){module=module[module.length-1];}if(e.message&&e.stack&&e.stack.indexOf(e.message)==-1){e=e.message+'\n'+e.stack;}throw $injectorMinErr('modulerr',"Failed to instantiate module {0} due to:\n{1}",module,e.stack||e.message||e);}});return runBlocks;}function createInternalInjector(cache,factory){function getService(serviceName,caller){if(cache.hasOwnProperty(serviceName)){if(cache[serviceName]===INSTANTIATING){throw $injectorMinErr('cdep','Circular dependency found: {0}',serviceName+' <- '+path.join(' <- '));}return cache[serviceName];}else{try{path.unshift(serviceName);cache[serviceName]=INSTANTIATING;return cache[serviceName]=factory(serviceName,caller);}catch(err){if(cache[serviceName]===INSTANTIATING){delete cache[serviceName];}throw err;}finally{path.shift();}}}function invoke(fn,self,locals,serviceName){if(typeof locals==='string'){serviceName=locals;locals=null;}var args=[],$inject=createInjector.$$annotate(fn,strictDi,serviceName),length,i,key;for(i=0,length=$inject.length;i<length;i++){key=$inject[i];if(typeof key!=='string'){throw $injectorMinErr('itkn','Incorrect injection token! Expected service name as string, got {0}',key);}args.push(locals&&locals.hasOwnProperty(key)?locals[key]:getService(key,serviceName));}if(isArray(fn)){fn=fn[length];}return fn.apply(self,args);}function instantiate(Type,locals,serviceName){var instance=Object.create((isArray(Type)?Type[Type.length-1]:Type).prototype||null);var returnedValue=invoke(Type,instance,locals,serviceName);return isObject(returnedValue)||isFunction(returnedValue)?returnedValue:instance;}return{invoke:invoke,instantiate:instantiate,get:getService,annotate:createInjector.$$annotate,has:function(name){return providerCache.hasOwnProperty(name+providerSuffix)||cache.hasOwnProperty(name);}};}}createInjector.$$annotate=annotate;function $AnchorScrollProvider(){var autoScrollingEnabled=true;this.disableAutoScrolling=function(){autoScrollingEnabled=false;};this.$get=['$window','$location','$rootScope',function($window,$location,$rootScope){var document=$window.document;function getFirstAnchor(list){var result=null;Array.prototype.some.call(list,function(element){if(nodeName_(element)==='a'){result=element;return true;}});return result;}function getYOffset(){var offset=scroll.yOffset;if(isFunction(offset)){offset=offset();}else if(isElement(offset)){var elem=offset[0];var style=$window.getComputedStyle(elem);if(style.position!=='fixed'){offset=0;}else{offset=elem.getBoundingClientRect().bottom;}}else if(!isNumber(offset)){offset=0;}return offset;}function scrollTo(elem){if(elem){elem.scrollIntoView();var offset=getYOffset();if(offset){var elemTop=elem.getBoundingClientRect().top;$window.scrollBy(0,elemTop-offset);}}else{$window.scrollTo(0,0);}}function scroll(){var hash=$location.hash(),elm;if(!hash)scrollTo(null);else if((elm=document.getElementById(hash)))scrollTo(elm);else if((elm=getFirstAnchor(document.getElementsByName(hash))))scrollTo(elm);else if(hash==='top')scrollTo(null);}if(autoScrollingEnabled){$rootScope.$watch(function autoScrollWatch(){return $location.hash();},function autoScrollWatchAction(newVal,oldVal){if(newVal===oldVal&&newVal==='')return;jqLiteDocumentLoaded(function(){$rootScope.$evalAsync(scroll);});});}return scroll;}];}var $animateMinErr=minErr('$animate');var $AnimateProvider=['$provide',function($provide){this.$$selectors={};this.register=function(name,factory){var key=name+'-animation';if(name&&name.charAt(0)!='.')throw $animateMinErr('notcsel',"Expecting class selector starting with '.' got '{0}'.",name);this.$$selectors[name.substr(1)]=key;$provide.factory(key,factory);};this.classNameFilter=function(expression){if(arguments.length===1){this.$$classNameFilter=(expression instanceof RegExp)?expression:null;}return this.$$classNameFilter;};this.$get=['$$q','$$asyncCallback','$rootScope',function($$q,$$asyncCallback,$rootScope){var currentDefer;function runAnimationPostDigest(fn){var cancelFn,defer=$$q.defer();defer.promise.$$cancelFn=function ngAnimateMaybeCancel(){cancelFn&&cancelFn();};$rootScope.$$postDigest(function ngAnimatePostDigest(){cancelFn=fn(function ngAnimateNotifyComplete(){defer.resolve();});});return defer.promise;}function resolveElementClasses(element,classes){var toAdd=[],toRemove=[];var hasClasses=createMap();forEach((element.attr('class')||'').split(/\s+/),function(className){hasClasses[className]=true;});forEach(classes,function(status,className){var hasClass=hasClasses[className];if(status===false&&hasClass){toRemove.push(className);}else if(status===true&&!hasClass){toAdd.push(className);}});return(toAdd.length+toRemove.length)>0&&[toAdd.length?toAdd:null,toRemove.length?toRemove:null];}function cachedClassManipulation(cache,classes,op){for(var i=0,ii=classes.length;i<ii;++i){var className=classes[i];cache[className]=op;}}function asyncPromise(){if(!currentDefer){currentDefer=$$q.defer();$$asyncCallback(function(){currentDefer.resolve();currentDefer=null;});}return currentDefer.promise;}function applyStyles(element,options){if(angular.isObject(options)){var styles=extend(options.from||{},options.to||{});element.css(styles);}}return{animate:function(element,from,to){applyStyles(element,{from:from,to:to});return asyncPromise();},enter:function(element,parent,after,options){applyStyles(element,options);after?after.after(element):parent.prepend(element);return asyncPromise();},leave:function(element,options){element.remove();return asyncPromise();},move:function(element,parent,after,options){return this.enter(element,parent,after,options);},addClass:function(element,className,options){return this.setClass(element,className,[],options);},$$addClassImmediately:function(element,className,options){element=jqLite(element);className=!isString(className)?(isArray(className)?className.join(' '):''):className;forEach(element,function(element){jqLiteAddClass(element,className);});applyStyles(element,options);return asyncPromise();},removeClass:function(element,className,options){return this.setClass(element,[],className,options);},$$removeClassImmediately:function(element,className,options){element=jqLite(element);className=!isString(className)?(isArray(className)?className.join(' '):''):className;forEach(element,function(element){jqLiteRemoveClass(element,className);});applyStyles(element,options);return asyncPromise();},setClass:function(element,add,remove,options){var self=this;var STORAGE_KEY='$$animateClasses';var createdCache=false;element=jqLite(element);var cache=element.data(STORAGE_KEY);if(!cache){cache={classes:{},options:options};createdCache=true;}else if(options&&cache.options){cache.options=angular.extend(cache.options||{},options);}var classes=cache.classes;add=isArray(add)?add:add.split(' ');remove=isArray(remove)?remove:remove.split(' ');cachedClassManipulation(classes,add,true);cachedClassManipulation(classes,remove,false);if(createdCache){cache.promise=runAnimationPostDigest(function(done){var cache=element.data(STORAGE_KEY);element.removeData(STORAGE_KEY);if(cache){var classes=resolveElementClasses(element,cache.classes);if(classes){self.$$setClassImmediately(element,classes[0],classes[1],cache.options);}}done();});element.data(STORAGE_KEY,cache);}return cache.promise;},$$setClassImmediately:function(element,add,remove,options){add&&this.$$addClassImmediately(element,add);remove&&this.$$removeClassImmediately(element,remove);applyStyles(element,options);return asyncPromise();},enabled:noop,cancel:noop};}];}];function $$AsyncCallbackProvider(){this.$get=['$$rAF','$timeout',function($$rAF,$timeout){return $$rAF.supported?function(fn){return $$rAF(fn);}:function(fn){return $timeout(fn,0,false);};}];}function Browser(window,document,$log,$sniffer){var self=this,rawDocument=document[0],location=window.location,history=window.history,setTimeout=window.setTimeout,clearTimeout=window.clearTimeout,pendingDeferIds={};self.isMock=false;var outstandingRequestCount=0;var outstandingRequestCallbacks=[];self.$$completeOutstandingRequest=completeOutstandingRequest;self.$$incOutstandingRequestCount=function(){outstandingRequestCount++;};function completeOutstandingRequest(fn){try{fn.apply(null,sliceArgs(arguments,1));}finally{outstandingRequestCount--;if(outstandingRequestCount===0){while(outstandingRequestCallbacks.length){try{outstandingRequestCallbacks.pop()();}catch(e){$log.error(e);}}}}}function getHash(url){var index=url.indexOf('#');return index===-1?'':url.substr(index+1);}self.notifyWhenNoOutstandingRequests=function(callback){forEach(pollFns,function(pollFn){pollFn();});if(outstandingRequestCount===0){callback();}else{outstandingRequestCallbacks.push(callback);}};var pollFns=[],pollTimeout;self.addPollFn=function(fn){if(isUndefined(pollTimeout))startPoller(100,setTimeout);pollFns.push(fn);return fn;};function startPoller(interval,setTimeout){(function check(){forEach(pollFns,function(pollFn){pollFn();});pollTimeout=setTimeout(check,interval);})();}var cachedState,lastHistoryState,lastBrowserUrl=location.href,baseElement=document.find('base'),reloadLocation=null;cacheState();lastHistoryState=cachedState;self.url=function(url,replace,state){if(isUndefined(state)){state=null;}if(location!==window.location)location=window.location;if(history!==window.history)history=window.history;if(url){var sameState=lastHistoryState===state;if(lastBrowserUrl===url&&(!$sniffer.history||sameState)){return self;}var sameBase=lastBrowserUrl&&stripHash(lastBrowserUrl)===stripHash(url);lastBrowserUrl=url;lastHistoryState=state;if($sniffer.history&&(!sameBase||!sameState)){history[replace?'replaceState':'pushState'](state,'',url);cacheState();lastHistoryState=cachedState;}else{if(!sameBase){reloadLocation=url;}if(replace){location.replace(url);}else if(!sameBase){location.href=url;}else{location.hash=getHash(url);}}return self;}else{return reloadLocation||location.href.replace(/%27/g,"'");}};self.state=function(){return cachedState;};var urlChangeListeners=[],urlChangeInit=false;function cacheStateAndFireUrlChange(){cacheState();fireUrlChange();}var lastCachedState=null;function cacheState(){cachedState=window.history.state;cachedState=isUndefined(cachedState)?null:cachedState;if(equals(cachedState,lastCachedState)){cachedState=lastCachedState;}lastCachedState=cachedState;}function fireUrlChange(){if(lastBrowserUrl===self.url()&&lastHistoryState===cachedState){return;}lastBrowserUrl=self.url();lastHistoryState=cachedState;forEach(urlChangeListeners,function(listener){listener(self.url(),cachedState);});}self.onUrlChange=function(callback){if(!urlChangeInit){if($sniffer.history)jqLite(window).on('popstate',cacheStateAndFireUrlChange);jqLite(window).on('hashchange',cacheStateAndFireUrlChange);urlChangeInit=true;}urlChangeListeners.push(callback);return callback;};self.$$checkUrlChange=fireUrlChange;self.baseHref=function(){var href=baseElement.attr('href');return href?href.replace(/^(https?\:)?\/\/[^\/]*/,''):'';};var lastCookies={};var lastCookieString='';var cookiePath=self.baseHref();function safeDecodeURIComponent(str){try{return decodeURIComponent(str);}catch(e){return str;}}self.cookies=function(name,value){var cookieLength,cookieArray,cookie,i,index;if(name){if(value===undefined){rawDocument.cookie=encodeURIComponent(name)+"=;path="+cookiePath+";expires=Thu, 01 Jan 1970 00:00:00 GMT";}else{if(isString(value)){cookieLength=(rawDocument.cookie=encodeURIComponent(name)+'='+encodeURIComponent(value)+';path='+cookiePath).length+1;if(cookieLength>4096){$log.warn("Cookie '"+name+"' possibly not set or overflowed because it was too large ("+cookieLength+" > 4096 bytes)!");}}}}else{if(rawDocument.cookie!==lastCookieString){lastCookieString=rawDocument.cookie;cookieArray=lastCookieString.split("; ");lastCookies={};for(i=0;i<cookieArray.length;i++){cookie=cookieArray[i];index=cookie.indexOf('=');if(index>0){name=safeDecodeURIComponent(cookie.substring(0,index));if(lastCookies[name]===undefined){lastCookies[name]=safeDecodeURIComponent(cookie.substring(index+1));}}}}return lastCookies;}};self.defer=function(fn,delay){var timeoutId;outstandingRequestCount++;timeoutId=setTimeout(function(){delete pendingDeferIds[timeoutId];completeOutstandingRequest(fn);},delay||0);pendingDeferIds[timeoutId]=true;return timeoutId;};self.defer.cancel=function(deferId){if(pendingDeferIds[deferId]){delete pendingDeferIds[deferId];clearTimeout(deferId);completeOutstandingRequest(noop);return true;}return false;};}function $BrowserProvider(){this.$get=['$window','$log','$sniffer','$document',function($window,$log,$sniffer,$document){return new Browser($window,$document,$log,$sniffer);}];}function $CacheFactoryProvider(){this.$get=function(){var caches={};function cacheFactory(cacheId,options){if(cacheId in caches){throw minErr('$cacheFactory')('iid',"CacheId '{0}' is already taken!",cacheId);}var size=0,stats=extend({},options,{id:cacheId}),data={},capacity=(options&&options.capacity)||Number.MAX_VALUE,lruHash={},freshEnd=null,staleEnd=null;return caches[cacheId]={put:function(key,value){if(capacity<Number.MAX_VALUE){var lruEntry=lruHash[key]||(lruHash[key]={key:key});refresh(lruEntry);}if(isUndefined(value))return;if(!(key in data))size++;data[key]=value;if(size>capacity){this.remove(staleEnd.key);}return value;},get:function(key){if(capacity<Number.MAX_VALUE){var lruEntry=lruHash[key];if(!lruEntry)return;refresh(lruEntry);}return data[key];},remove:function(key){if(capacity<Number.MAX_VALUE){var lruEntry=lruHash[key];if(!lruEntry)return;if(lruEntry==freshEnd)freshEnd=lruEntry.p;if(lruEntry==staleEnd)staleEnd=lruEntry.n;link(lruEntry.n,lruEntry.p);delete lruHash[key];}delete data[key];size--;},removeAll:function(){data={};size=0;lruHash={};freshEnd=staleEnd=null;},destroy:function(){data=null;stats=null;lruHash=null;delete caches[cacheId];},info:function(){return extend({},stats,{size:size});}};function refresh(entry){if(entry!=freshEnd){if(!staleEnd){staleEnd=entry;}else if(staleEnd==entry){staleEnd=entry.n;}link(entry.n,entry.p);link(entry,freshEnd);freshEnd=entry;freshEnd.n=null;}}function link(nextEntry,prevEntry){if(nextEntry!=prevEntry){if(nextEntry)nextEntry.p=prevEntry;if(prevEntry)prevEntry.n=nextEntry;}}}cacheFactory.info=function(){var info={};forEach(caches,function(cache,cacheId){info[cacheId]=cache.info();});return info;};cacheFactory.get=function(cacheId){return caches[cacheId];};return cacheFactory;};}function $TemplateCacheProvider(){this.$get=['$cacheFactory',function($cacheFactory){return $cacheFactory('templates');}];}var $compileMinErr=minErr('$compile');$CompileProvider.$inject=['$provide','$$sanitizeUriProvider'];function $CompileProvider($provide,$$sanitizeUriProvider){var hasDirectives={},Suffix='Directive',COMMENT_DIRECTIVE_REGEXP=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,CLASS_DIRECTIVE_REGEXP=/(([\w\-]+)(?:\:([^;]+))?;?)/,ALL_OR_NOTHING_ATTRS=makeMap('ngSrc,ngSrcset,src,srcset'),REQUIRE_PREFIX_REGEXP=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/;var EVENT_HANDLER_ATTR_REGEXP=/^(on[a-z]+|formaction)$/;function parseIsolateBindings(scope,directiveName){var LOCAL_REGEXP=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/;var bindings={};forEach(scope,function(definition,scopeName){var match=definition.match(LOCAL_REGEXP);if(!match){throw $compileMinErr('iscp',"Invalid isolate scope definition for directive '{0}'."+" Definition: {... {1}: '{2}' ...}",directiveName,scopeName,definition);}bindings[scopeName]={mode:match[1][0],collection:match[2]==='*',optional:match[3]==='?',attrName:match[4]||scopeName};});return bindings;}this.directive=function registerDirective(name,directiveFactory){assertNotHasOwnProperty(name,'directive');if(isString(name)){assertArg(directiveFactory,'directiveFactory');if(!hasDirectives.hasOwnProperty(name)){hasDirectives[name]=[];$provide.factory(name+Suffix,['$injector','$exceptionHandler',function($injector,$exceptionHandler){var directives=[];forEach(hasDirectives[name],function(directiveFactory,index){try{var directive=$injector.invoke(directiveFactory);if(isFunction(directive)){directive={compile:valueFn(directive)};}else if(!directive.compile&&directive.link){directive.compile=valueFn(directive.link);}directive.priority=directive.priority||0;directive.index=index;directive.name=directive.name||name;directive.require=directive.require||(directive.controller&&directive.name);directive.restrict=directive.restrict||'EA';if(isObject(directive.scope)){directive.$$isolateBindings=parseIsolateBindings(directive.scope,directive.name);}directives.push(directive);}catch(e){$exceptionHandler(e);}});return directives;}]);}hasDirectives[name].push(directiveFactory);}else{forEach(name,reverseParams(registerDirective));}return this;};this.aHrefSanitizationWhitelist=function(regexp){if(isDefined(regexp)){$$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp);return this;}else{return $$sanitizeUriProvider.aHrefSanitizationWhitelist();}};this.imgSrcSanitizationWhitelist=function(regexp){if(isDefined(regexp)){$$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp);return this;}else{return $$sanitizeUriProvider.imgSrcSanitizationWhitelist();}};var debugInfoEnabled=true;this.debugInfoEnabled=function(enabled){if(isDefined(enabled)){debugInfoEnabled=enabled;return this;}return debugInfoEnabled;};this.$get=['$injector','$interpolate','$exceptionHandler','$templateRequest','$parse','$controller','$rootScope','$document','$sce','$animate','$$sanitizeUri',function($injector,$interpolate,$exceptionHandler,$templateRequest,$parse,$controller,$rootScope,$document,$sce,$animate,$$sanitizeUri){var Attributes=function(element,attributesToCopy){if(attributesToCopy){var keys=Object.keys(attributesToCopy);var i,l,key;for(i=0,l=keys.length;i<l;i++){key=keys[i];this[key]=attributesToCopy[key];}}else{this.$attr={};}this.$$element=element;};Attributes.prototype={$normalize:directiveNormalize,$addClass:function(classVal){if(classVal&&classVal.length>0){$animate.addClass(this.$$element,classVal);}},$removeClass:function(classVal){if(classVal&&classVal.length>0){$animate.removeClass(this.$$element,classVal);}},$updateClass:function(newClasses,oldClasses){var toAdd=tokenDifference(newClasses,oldClasses);if(toAdd&&toAdd.length){$animate.addClass(this.$$element,toAdd);}var toRemove=tokenDifference(oldClasses,newClasses);if(toRemove&&toRemove.length){$animate.removeClass(this.$$element,toRemove);}},$set:function(key,value,writeAttr,attrName){var node=this.$$element[0],booleanKey=getBooleanAttrName(node,key),aliasedKey=getAliasedAttrName(node,key),observer=key,nodeName;if(booleanKey){this.$$element.prop(key,value);attrName=booleanKey;}else if(aliasedKey){this[aliasedKey]=value;observer=aliasedKey;}this[key]=value;if(attrName){this.$attr[key]=attrName;}else{attrName=this.$attr[key];if(!attrName){this.$attr[key]=attrName=snake_case(key,'-');}}nodeName=nodeName_(this.$$element);if((nodeName==='a'&&key==='href')||(nodeName==='img'&&key==='src')){this[key]=value=$$sanitizeUri(value,key==='src');}else if(nodeName==='img'&&key==='srcset'){var result="";var trimmedSrcset=trim(value);var srcPattern=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/;var pattern=/\s/.test(trimmedSrcset)?srcPattern:/(,)/;var rawUris=trimmedSrcset.split(pattern);var nbrUrisWith2parts=Math.floor(rawUris.length/2);for(var i=0;i<nbrUrisWith2parts;i++){var innerIdx=i*2;result+=$$sanitizeUri(trim(rawUris[innerIdx]),true);result+=(" "+trim(rawUris[innerIdx+1]));}var lastTuple=trim(rawUris[i*2]).split(/\s/);result+=$$sanitizeUri(trim(lastTuple[0]),true);if(lastTuple.length===2){result+=(" "+trim(lastTuple[1]));}this[key]=value=result;}if(writeAttr!==false){if(value===null||value===undefined){this.$$element.removeAttr(attrName);}else{this.$$element.attr(attrName,value);}}var $$observers=this.$$observers;$$observers&&forEach($$observers[observer],function(fn){try{fn(value);}catch(e){$exceptionHandler(e);}});},$observe:function(key,fn){var attrs=this,$$observers=(attrs.$$observers||(attrs.$$observers=createMap())),listeners=($$observers[key]||($$observers[key]=[]));listeners.push(fn);$rootScope.$evalAsync(function(){if(!listeners.$$inter&&attrs.hasOwnProperty(key)){fn(attrs[key]);}});return function(){arrayRemove(listeners,fn);};}};function safeAddClass($element,className){try{$element.addClass(className);}catch(e){}}var startSymbol=$interpolate.startSymbol(),endSymbol=$interpolate.endSymbol(),denormalizeTemplate=(startSymbol=='{{'||endSymbol=='}}')?identity:function denormalizeTemplate(template){return template.replace(/\{\{/g,startSymbol).replace(/}}/g,endSymbol);},NG_ATTR_BINDING=/^ngAttr[A-Z]/;compile.$$addBindingInfo=debugInfoEnabled?function $$addBindingInfo($element,binding){var bindings=$element.data('$binding')||[];if(isArray(binding)){bindings=bindings.concat(binding);}else{bindings.push(binding);}$element.data('$binding',bindings);}:noop;compile.$$addBindingClass=debugInfoEnabled?function $$addBindingClass($element){safeAddClass($element,'ng-binding');}:noop;compile.$$addScopeInfo=debugInfoEnabled?function $$addScopeInfo($element,scope,isolated,noTemplate){var dataName=isolated?(noTemplate?'$isolateScopeNoTemplate':'$isolateScope'):'$scope';$element.data(dataName,scope);}:noop;compile.$$addScopeClass=debugInfoEnabled?function $$addScopeClass($element,isolated){safeAddClass($element,isolated?'ng-isolate-scope':'ng-scope');}:noop;return compile;function compile($compileNodes,transcludeFn,maxPriority,ignoreDirective,previousCompileContext){if(!($compileNodes instanceof jqLite)){$compileNodes=jqLite($compileNodes);}forEach($compileNodes,function(node,index){if(node.nodeType==NODE_TYPE_TEXT&&node.nodeValue.match(/\S+/)){$compileNodes[index]=jqLite(node).wrap('<span></span>').parent()[0];}});var compositeLinkFn=compileNodes($compileNodes,transcludeFn,$compileNodes,maxPriority,ignoreDirective,previousCompileContext);compile.$$addScopeClass($compileNodes);var namespace=null;return function publicLinkFn(scope,cloneConnectFn,options){assertArg(scope,'scope');options=options||{};var parentBoundTranscludeFn=options.parentBoundTranscludeFn,transcludeControllers=options.transcludeControllers,futureParentElement=options.futureParentElement;if(parentBoundTranscludeFn&&parentBoundTranscludeFn.$$boundTransclude){parentBoundTranscludeFn=parentBoundTranscludeFn.$$boundTransclude;}if(!namespace){namespace=detectNamespaceForChildElements(futureParentElement);}var $linkNode;if(namespace!=='html'){$linkNode=jqLite(wrapTemplate(namespace,jqLite('<div>').append($compileNodes).html()));}else if(cloneConnectFn){$linkNode=JQLitePrototype.clone.call($compileNodes);}else{$linkNode=$compileNodes;}if(transcludeControllers){for(var controllerName in transcludeControllers){$linkNode.data('$'+controllerName+'Controller',transcludeControllers[controllerName].instance);}}compile.$$addScopeInfo($linkNode,scope);if(cloneConnectFn)cloneConnectFn($linkNode,scope);if(compositeLinkFn)compositeLinkFn(scope,$linkNode,$linkNode,parentBoundTranscludeFn);return $linkNode;};}function detectNamespaceForChildElements(parentElement){var node=parentElement&&parentElement[0];if(!node){return'html';}else{return nodeName_(node)!=='foreignobject'&&node.toString().match(/SVG/)?'svg':'html';}}function compileNodes(nodeList,transcludeFn,$rootElement,maxPriority,ignoreDirective,previousCompileContext){var linkFns=[],attrs,directives,nodeLinkFn,childNodes,childLinkFn,linkFnFound,nodeLinkFnFound;for(var i=0;i<nodeList.length;i++){attrs=new Attributes();directives=collectDirectives(nodeList[i],[],attrs,i===0?maxPriority:undefined,ignoreDirective);nodeLinkFn=(directives.length)?applyDirectivesToNode(directives,nodeList[i],attrs,transcludeFn,$rootElement,null,[],[],previousCompileContext):null;if(nodeLinkFn&&nodeLinkFn.scope){compile.$$addScopeClass(attrs.$$element);}childLinkFn=(nodeLinkFn&&nodeLinkFn.terminal||!(childNodes=nodeList[i].childNodes)||!childNodes.length)?null:compileNodes(childNodes,nodeLinkFn?((nodeLinkFn.transcludeOnThisElement||!nodeLinkFn.templateOnThisElement)&&nodeLinkFn.transclude):transcludeFn);if(nodeLinkFn||childLinkFn){linkFns.push(i,nodeLinkFn,childLinkFn);linkFnFound=true;nodeLinkFnFound=nodeLinkFnFound||nodeLinkFn;}previousCompileContext=null;}return linkFnFound?compositeLinkFn:null;function compositeLinkFn(scope,nodeList,$rootElement,parentBoundTranscludeFn){var nodeLinkFn,childLinkFn,node,childScope,i,ii,idx,childBoundTranscludeFn;var stableNodeList;if(nodeLinkFnFound){var nodeListLength=nodeList.length;stableNodeList=new Array(nodeListLength);for(i=0;i<linkFns.length;i+=3){idx=linkFns[i];stableNodeList[idx]=nodeList[idx];}}else{stableNodeList=nodeList;}for(i=0,ii=linkFns.length;i<ii;){node=stableNodeList[linkFns[i++]];nodeLinkFn=linkFns[i++];childLinkFn=linkFns[i++];if(nodeLinkFn){if(nodeLinkFn.scope){childScope=scope.$new();compile.$$addScopeInfo(jqLite(node),childScope);}else{childScope=scope;}if(nodeLinkFn.transcludeOnThisElement){childBoundTranscludeFn=createBoundTranscludeFn(scope,nodeLinkFn.transclude,parentBoundTranscludeFn,nodeLinkFn.elementTranscludeOnThisElement);}else if(!nodeLinkFn.templateOnThisElement&&parentBoundTranscludeFn){childBoundTranscludeFn=parentBoundTranscludeFn;}else if(!parentBoundTranscludeFn&&transcludeFn){childBoundTranscludeFn=createBoundTranscludeFn(scope,transcludeFn);}else{childBoundTranscludeFn=null;}nodeLinkFn(childLinkFn,childScope,node,$rootElement,childBoundTranscludeFn);}else if(childLinkFn){childLinkFn(scope,node.childNodes,undefined,parentBoundTranscludeFn);}}}}function createBoundTranscludeFn(scope,transcludeFn,previousBoundTranscludeFn,elementTransclusion){var boundTranscludeFn=function(transcludedScope,cloneFn,controllers,futureParentElement,containingScope){if(!transcludedScope){transcludedScope=scope.$new(false,containingScope);transcludedScope.$$transcluded=true;}return transcludeFn(transcludedScope,cloneFn,{parentBoundTranscludeFn:previousBoundTranscludeFn,transcludeControllers:controllers,futureParentElement:futureParentElement});};return boundTranscludeFn;}function collectDirectives(node,directives,attrs,maxPriority,ignoreDirective){var nodeType=node.nodeType,attrsMap=attrs.$attr,match,className;switch(nodeType){case NODE_TYPE_ELEMENT:addDirective(directives,directiveNormalize(nodeName_(node)),'E',maxPriority,ignoreDirective);for(var attr,name,nName,ngAttrName,value,isNgAttr,nAttrs=node.attributes,j=0,jj=nAttrs&&nAttrs.length;j<jj;j++){var attrStartName=false;var attrEndName=false;attr=nAttrs[j];name=attr.name;value=trim(attr.value);ngAttrName=directiveNormalize(name);if(isNgAttr=NG_ATTR_BINDING.test(ngAttrName)){name=name.replace(PREFIX_REGEXP,'').substr(8).replace(/_(.)/g,function(match,letter){return letter.toUpperCase();});}var directiveNName=ngAttrName.replace(/(Start|End)$/,'');if(directiveIsMultiElement(directiveNName)){if(ngAttrName===directiveNName+'Start'){attrStartName=name;attrEndName=name.substr(0,name.length-5)+'end';name=name.substr(0,name.length-6);}}nName=directiveNormalize(name.toLowerCase());attrsMap[nName]=name;if(isNgAttr||!attrs.hasOwnProperty(nName)){attrs[nName]=value;if(getBooleanAttrName(node,nName)){attrs[nName]=true;}}addAttrInterpolateDirective(node,directives,value,nName,isNgAttr);addDirective(directives,nName,'A',maxPriority,ignoreDirective,attrStartName,attrEndName);}className=node.className;if(isObject(className)){className=className.animVal;}if(isString(className)&&className!==''){while(match=CLASS_DIRECTIVE_REGEXP.exec(className)){nName=directiveNormalize(match[2]);if(addDirective(directives,nName,'C',maxPriority,ignoreDirective)){attrs[nName]=trim(match[3]);}className=className.substr(match.index+match[0].length);}}break;case NODE_TYPE_TEXT:addTextInterpolateDirective(directives,node.nodeValue);break;case NODE_TYPE_COMMENT:try{match=COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);if(match){nName=directiveNormalize(match[1]);if(addDirective(directives,nName,'M',maxPriority,ignoreDirective)){attrs[nName]=trim(match[2]);}}}catch(e){}break;}directives.sort(byPriority);return directives;}function groupScan(node,attrStart,attrEnd){var nodes=[];var depth=0;if(attrStart&&node.hasAttribute&&node.hasAttribute(attrStart)){do{if(!node){throw $compileMinErr('uterdir',"Unterminated attribute, found '{0}' but no matching '{1}' found.",attrStart,attrEnd);}if(node.nodeType==NODE_TYPE_ELEMENT){if(node.hasAttribute(attrStart))depth++;if(node.hasAttribute(attrEnd))depth--;}nodes.push(node);node=node.nextSibling;}while(depth>0);}else{nodes.push(node);}return jqLite(nodes);}function groupElementsLinkFnWrapper(linkFn,attrStart,attrEnd){return function(scope,element,attrs,controllers,transcludeFn){element=groupScan(element[0],attrStart,attrEnd);return linkFn(scope,element,attrs,controllers,transcludeFn);};}function applyDirectivesToNode(directives,compileNode,templateAttrs,transcludeFn,jqCollection,originalReplaceDirective,preLinkFns,postLinkFns,previousCompileContext){previousCompileContext=previousCompileContext||{};var terminalPriority=-Number.MAX_VALUE,newScopeDirective,controllerDirectives=previousCompileContext.controllerDirectives,controllers,newIsolateScopeDirective=previousCompileContext.newIsolateScopeDirective,templateDirective=previousCompileContext.templateDirective,nonTlbTranscludeDirective=previousCompileContext.nonTlbTranscludeDirective,hasTranscludeDirective=false,hasTemplate=false,hasElementTranscludeDirective=previousCompileContext.hasElementTranscludeDirective,$compileNode=templateAttrs.$$element=jqLite(compileNode),directive,directiveName,$template,replaceDirective=originalReplaceDirective,childTranscludeFn=transcludeFn,linkFn,directiveValue;for(var i=0,ii=directives.length;i<ii;i++){directive=directives[i];var attrStart=directive.$$start;var attrEnd=directive.$$end;if(attrStart){$compileNode=groupScan(compileNode,attrStart,attrEnd);}$template=undefined;if(terminalPriority>directive.priority){break;}if(directiveValue=directive.scope){if(!directive.templateUrl){if(isObject(directiveValue)){assertNoDuplicate('new/isolated scope',newIsolateScopeDirective||newScopeDirective,directive,$compileNode);newIsolateScopeDirective=directive;}else{assertNoDuplicate('new/isolated scope',newIsolateScopeDirective,directive,$compileNode);}}newScopeDirective=newScopeDirective||directive;}directiveName=directive.name;if(!directive.templateUrl&&directive.controller){directiveValue=directive.controller;controllerDirectives=controllerDirectives||{};assertNoDuplicate("'"+directiveName+"' controller",controllerDirectives[directiveName],directive,$compileNode);controllerDirectives[directiveName]=directive;}if(directiveValue=directive.transclude){hasTranscludeDirective=true;if(!directive.$$tlb){assertNoDuplicate('transclusion',nonTlbTranscludeDirective,directive,$compileNode);nonTlbTranscludeDirective=directive;}if(directiveValue=='element'){hasElementTranscludeDirective=true;terminalPriority=directive.priority;$template=$compileNode;$compileNode=templateAttrs.$$element=jqLite(document.createComment(' '+directiveName+': '+templateAttrs[directiveName]+' '));compileNode=$compileNode[0];replaceWith(jqCollection,sliceArgs($template),compileNode);childTranscludeFn=compile($template,transcludeFn,terminalPriority,replaceDirective&&replaceDirective.name,{nonTlbTranscludeDirective:nonTlbTranscludeDirective});}else{$template=jqLite(jqLiteClone(compileNode)).contents();$compileNode.empty();childTranscludeFn=compile($template,transcludeFn);}}if(directive.template){hasTemplate=true;assertNoDuplicate('template',templateDirective,directive,$compileNode);templateDirective=directive;directiveValue=(isFunction(directive.template))?directive.template($compileNode,templateAttrs):directive.template;directiveValue=denormalizeTemplate(directiveValue);if(directive.replace){replaceDirective=directive;if(jqLiteIsTextNode(directiveValue)){$template=[];}else{$template=removeComments(wrapTemplate(directive.templateNamespace,trim(directiveValue)));}compileNode=$template[0];if($template.length!=1||compileNode.nodeType!==NODE_TYPE_ELEMENT){throw $compileMinErr('tplrt',"Template for directive '{0}' must have exactly one root element. {1}",directiveName,'');}replaceWith(jqCollection,$compileNode,compileNode);var newTemplateAttrs={$attr:{}};var templateDirectives=collectDirectives(compileNode,[],newTemplateAttrs);var unprocessedDirectives=directives.splice(i+1,directives.length-(i+1));if(newIsolateScopeDirective){markDirectivesAsIsolate(templateDirectives);}directives=directives.concat(templateDirectives).concat(unprocessedDirectives);mergeTemplateAttributes(templateAttrs,newTemplateAttrs);ii=directives.length;}else{$compileNode.html(directiveValue);}}if(directive.templateUrl){hasTemplate=true;assertNoDuplicate('template',templateDirective,directive,$compileNode);templateDirective=directive;if(directive.replace){replaceDirective=directive;}nodeLinkFn=compileTemplateUrl(directives.splice(i,directives.length-i),$compileNode,templateAttrs,jqCollection,hasTranscludeDirective&&childTranscludeFn,preLinkFns,postLinkFns,{controllerDirectives:controllerDirectives,newIsolateScopeDirective:newIsolateScopeDirective,templateDirective:templateDirective,nonTlbTranscludeDirective:nonTlbTranscludeDirective});ii=directives.length;}else if(directive.compile){try{linkFn=directive.compile($compileNode,templateAttrs,childTranscludeFn);if(isFunction(linkFn)){addLinkFns(null,linkFn,attrStart,attrEnd);}else if(linkFn){addLinkFns(linkFn.pre,linkFn.post,attrStart,attrEnd);}}catch(e){$exceptionHandler(e,startingTag($compileNode));}}if(directive.terminal){nodeLinkFn.terminal=true;terminalPriority=Math.max(terminalPriority,directive.priority);}}nodeLinkFn.scope=newScopeDirective&&newScopeDirective.scope===true;nodeLinkFn.transcludeOnThisElement=hasTranscludeDirective;nodeLinkFn.elementTranscludeOnThisElement=hasElementTranscludeDirective;nodeLinkFn.templateOnThisElement=hasTemplate;nodeLinkFn.transclude=childTranscludeFn;previousCompileContext.hasElementTranscludeDirective=hasElementTranscludeDirective;return nodeLinkFn;function addLinkFns(pre,post,attrStart,attrEnd){if(pre){if(attrStart)pre=groupElementsLinkFnWrapper(pre,attrStart,attrEnd);pre.require=directive.require;pre.directiveName=directiveName;if(newIsolateScopeDirective===directive||directive.$$isolateScope){pre=cloneAndAnnotateFn(pre,{isolateScope:true});}preLinkFns.push(pre);}if(post){if(attrStart)post=groupElementsLinkFnWrapper(post,attrStart,attrEnd);post.require=directive.require;post.directiveName=directiveName;if(newIsolateScopeDirective===directive||directive.$$isolateScope){post=cloneAndAnnotateFn(post,{isolateScope:true});}postLinkFns.push(post);}}function getControllers(directiveName,require,$element,elementControllers){var value,retrievalMethod='data',optional=false;var $searchElement=$element;var match;if(isString(require)){match=require.match(REQUIRE_PREFIX_REGEXP);require=require.substring(match[0].length);if(match[3]){if(match[1])match[3]=null;else match[1]=match[3];}if(match[1]==='^'){retrievalMethod='inheritedData';}else if(match[1]==='^^'){retrievalMethod='inheritedData';$searchElement=$element.parent();}if(match[2]==='?'){optional=true;}value=null;if(elementControllers&&retrievalMethod==='data'){if(value=elementControllers[require]){value=value.instance;}}value=value||$searchElement[retrievalMethod]('$'+require+'Controller');if(!value&&!optional){throw $compileMinErr('ctreq',"Controller '{0}', required by directive '{1}', can't be found!",require,directiveName);}return value||null;}else if(isArray(require)){value=[];forEach(require,function(require){value.push(getControllers(directiveName,require,$element,elementControllers));});}return value;}function nodeLinkFn(childLinkFn,scope,linkNode,$rootElement,boundTranscludeFn){var i,ii,linkFn,controller,isolateScope,elementControllers,transcludeFn,$element,attrs;if(compileNode===linkNode){attrs=templateAttrs;$element=templateAttrs.$$element;}else{$element=jqLite(linkNode);attrs=new Attributes($element,templateAttrs);}if(newIsolateScopeDirective){isolateScope=scope.$new(true);}if(boundTranscludeFn){transcludeFn=controllersBoundTransclude;transcludeFn.$$boundTransclude=boundTranscludeFn;}if(controllerDirectives){controllers={};elementControllers={};forEach(controllerDirectives,function(directive){var locals={$scope:directive===newIsolateScopeDirective||directive.$$isolateScope?isolateScope:scope,$element:$element,$attrs:attrs,$transclude:transcludeFn},controllerInstance;controller=directive.controller;if(controller=='@'){controller=attrs[directive.name];}controllerInstance=$controller(controller,locals,true,directive.controllerAs);elementControllers[directive.name]=controllerInstance;if(!hasElementTranscludeDirective){$element.data('$'+directive.name+'Controller',controllerInstance.instance);}controllers[directive.name]=controllerInstance;});}if(newIsolateScopeDirective){compile.$$addScopeInfo($element,isolateScope,true,!(templateDirective&&(templateDirective===newIsolateScopeDirective||templateDirective===newIsolateScopeDirective.$$originalDirective)));compile.$$addScopeClass($element,true);var isolateScopeController=controllers&&controllers[newIsolateScopeDirective.name];var isolateBindingContext=isolateScope;if(isolateScopeController&&isolateScopeController.identifier&&newIsolateScopeDirective.bindToController===true){isolateBindingContext=isolateScopeController.instance;}forEach(isolateScope.$$isolateBindings=newIsolateScopeDirective.$$isolateBindings,function(definition,scopeName){var attrName=definition.attrName,optional=definition.optional,mode=definition.mode,lastValue,parentGet,parentSet,compare;switch(mode){case'@':attrs.$observe(attrName,function(value){isolateBindingContext[scopeName]=value;});attrs.$$observers[attrName].$$scope=scope;if(attrs[attrName]){isolateBindingContext[scopeName]=$interpolate(attrs[attrName])(scope);}break;case'=':if(optional&&!attrs[attrName]){return;}parentGet=$parse(attrs[attrName]);if(parentGet.literal){compare=equals;}else{compare=function(a,b){return a===b||(a!==a&&b!==b);};}parentSet=parentGet.assign||function(){lastValue=isolateBindingContext[scopeName]=parentGet(scope);throw $compileMinErr('nonassign',"Expression '{0}' used with directive '{1}' is non-assignable!",attrs[attrName],newIsolateScopeDirective.name);};lastValue=isolateBindingContext[scopeName]=parentGet(scope);var parentValueWatch=function parentValueWatch(parentValue){if(!compare(parentValue,isolateBindingContext[scopeName])){if(!compare(parentValue,lastValue)){isolateBindingContext[scopeName]=parentValue;}else{parentSet(scope,parentValue=isolateBindingContext[scopeName]);}}return lastValue=parentValue;};parentValueWatch.$stateful=true;var unwatch;if(definition.collection){unwatch=scope.$watchCollection(attrs[attrName],parentValueWatch);}else{unwatch=scope.$watch($parse(attrs[attrName],parentValueWatch),null,parentGet.literal);}isolateScope.$on('$destroy',unwatch);break;case'&':parentGet=$parse(attrs[attrName]);isolateBindingContext[scopeName]=function(locals){return parentGet(scope,locals);};break;}});}if(controllers){forEach(controllers,function(controller){controller();});controllers=null;}for(i=0,ii=preLinkFns.length;i<ii;i++){linkFn=preLinkFns[i];invokeLinkFn(linkFn,linkFn.isolateScope?isolateScope:scope,$element,attrs,linkFn.require&&getControllers(linkFn.directiveName,linkFn.require,$element,elementControllers),transcludeFn);}var scopeToChild=scope;if(newIsolateScopeDirective&&(newIsolateScopeDirective.template||newIsolateScopeDirective.templateUrl===null)){scopeToChild=isolateScope;}childLinkFn&&childLinkFn(scopeToChild,linkNode.childNodes,undefined,boundTranscludeFn);for(i=postLinkFns.length-1;i>=0;i--){linkFn=postLinkFns[i];invokeLinkFn(linkFn,linkFn.isolateScope?isolateScope:scope,$element,attrs,linkFn.require&&getControllers(linkFn.directiveName,linkFn.require,$element,elementControllers),transcludeFn);}function controllersBoundTransclude(scope,cloneAttachFn,futureParentElement){var transcludeControllers;if(!isScope(scope)){futureParentElement=cloneAttachFn;cloneAttachFn=scope;scope=undefined;}if(hasElementTranscludeDirective){transcludeControllers=elementControllers;}if(!futureParentElement){futureParentElement=hasElementTranscludeDirective?$element.parent():$element;}return boundTranscludeFn(scope,cloneAttachFn,transcludeControllers,futureParentElement,scopeToChild);}}}function markDirectivesAsIsolate(directives){for(var j=0,jj=directives.length;j<jj;j++){directives[j]=inherit(directives[j],{$$isolateScope:true});}}function addDirective(tDirectives,name,location,maxPriority,ignoreDirective,startAttrName,endAttrName){if(name===ignoreDirective)return null;var match=null;if(hasDirectives.hasOwnProperty(name)){for(var directive,directives=$injector.get(name+Suffix),i=0,ii=directives.length;i<ii;i++){try{directive=directives[i];if((maxPriority===undefined||maxPriority>directive.priority)&&directive.restrict.indexOf(location)!=-1){if(startAttrName){directive=inherit(directive,{$$start:startAttrName,$$end:endAttrName});}tDirectives.push(directive);match=directive;}}catch(e){$exceptionHandler(e);}}}return match;}function directiveIsMultiElement(name){if(hasDirectives.hasOwnProperty(name)){for(var directive,directives=$injector.get(name+Suffix),i=0,ii=directives.length;i<ii;i++){directive=directives[i];if(directive.multiElement){return true;}}}return false;}function mergeTemplateAttributes(dst,src){var srcAttr=src.$attr,dstAttr=dst.$attr,$element=dst.$$element;forEach(dst,function(value,key){if(key.charAt(0)!='$'){if(src[key]&&src[key]!==value){value+=(key==='style'?';':' ')+src[key];}dst.$set(key,value,true,srcAttr[key]);}});forEach(src,function(value,key){if(key=='class'){safeAddClass($element,value);dst['class']=(dst['class']?dst['class']+' ':'')+value;}else if(key=='style'){$element.attr('style',$element.attr('style')+';'+value);dst['style']=(dst['style']?dst['style']+';':'')+value;}else if(key.charAt(0)!='$'&&!dst.hasOwnProperty(key)){dst[key]=value;dstAttr[key]=srcAttr[key];}});}function compileTemplateUrl(directives,$compileNode,tAttrs,$rootElement,childTranscludeFn,preLinkFns,postLinkFns,previousCompileContext){var linkQueue=[],afterTemplateNodeLinkFn,afterTemplateChildLinkFn,beforeTemplateCompileNode=$compileNode[0],origAsyncDirective=directives.shift(),derivedSyncDirective=inherit(origAsyncDirective,{templateUrl:null,transclude:null,replace:null,$$originalDirective:origAsyncDirective}),templateUrl=(isFunction(origAsyncDirective.templateUrl))?origAsyncDirective.templateUrl($compileNode,tAttrs):origAsyncDirective.templateUrl,templateNamespace=origAsyncDirective.templateNamespace;$compileNode.empty();$templateRequest($sce.getTrustedResourceUrl(templateUrl)).then(function(content){var compileNode,tempTemplateAttrs,$template,childBoundTranscludeFn;content=denormalizeTemplate(content);if(origAsyncDirective.replace){if(jqLiteIsTextNode(content)){$template=[];}else{$template=removeComments(wrapTemplate(templateNamespace,trim(content)));}compileNode=$template[0];if($template.length!=1||compileNode.nodeType!==NODE_TYPE_ELEMENT){throw $compileMinErr('tplrt',"Template for directive '{0}' must have exactly one root element. {1}",origAsyncDirective.name,templateUrl);}tempTemplateAttrs={$attr:{}};replaceWith($rootElement,$compileNode,compileNode);var templateDirectives=collectDirectives(compileNode,[],tempTemplateAttrs);if(isObject(origAsyncDirective.scope)){markDirectivesAsIsolate(templateDirectives);}directives=templateDirectives.concat(directives);mergeTemplateAttributes(tAttrs,tempTemplateAttrs);}else{compileNode=beforeTemplateCompileNode;$compileNode.html(content);}directives.unshift(derivedSyncDirective);afterTemplateNodeLinkFn=applyDirectivesToNode(directives,compileNode,tAttrs,childTranscludeFn,$compileNode,origAsyncDirective,preLinkFns,postLinkFns,previousCompileContext);forEach($rootElement,function(node,i){if(node==compileNode){$rootElement[i]=$compileNode[0];}});afterTemplateChildLinkFn=compileNodes($compileNode[0].childNodes,childTranscludeFn);while(linkQueue.length){var scope=linkQueue.shift(),beforeTemplateLinkNode=linkQueue.shift(),linkRootElement=linkQueue.shift(),boundTranscludeFn=linkQueue.shift(),linkNode=$compileNode[0];if(scope.$$destroyed)continue;if(beforeTemplateLinkNode!==beforeTemplateCompileNode){var oldClasses=beforeTemplateLinkNode.className;if(!(previousCompileContext.hasElementTranscludeDirective&&origAsyncDirective.replace)){linkNode=jqLiteClone(compileNode);}replaceWith(linkRootElement,jqLite(beforeTemplateLinkNode),linkNode);safeAddClass(jqLite(linkNode),oldClasses);}if(afterTemplateNodeLinkFn.transcludeOnThisElement){childBoundTranscludeFn=createBoundTranscludeFn(scope,afterTemplateNodeLinkFn.transclude,boundTranscludeFn);}else{childBoundTranscludeFn=boundTranscludeFn;}afterTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,linkNode,$rootElement,childBoundTranscludeFn);}linkQueue=null;});return function delayedNodeLinkFn(ignoreChildLinkFn,scope,node,rootElement,boundTranscludeFn){var childBoundTranscludeFn=boundTranscludeFn;if(scope.$$destroyed)return;if(linkQueue){linkQueue.push(scope,node,rootElement,childBoundTranscludeFn);}else{if(afterTemplateNodeLinkFn.transcludeOnThisElement){childBoundTranscludeFn=createBoundTranscludeFn(scope,afterTemplateNodeLinkFn.transclude,boundTranscludeFn);}afterTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,node,rootElement,childBoundTranscludeFn);}};}function byPriority(a,b){var diff=b.priority-a.priority;if(diff!==0)return diff;if(a.name!==b.name)return(a.name<b.name)?-1:1;return a.index-b.index;}function assertNoDuplicate(what,previousDirective,directive,element){if(previousDirective){throw $compileMinErr('multidir','Multiple directives [{0}, {1}] asking for {2} on: {3}',previousDirective.name,directive.name,what,startingTag(element));}}function addTextInterpolateDirective(directives,text){var interpolateFn=$interpolate(text,true);if(interpolateFn){directives.push({priority:0,compile:function textInterpolateCompileFn(templateNode){var templateNodeParent=templateNode.parent(),hasCompileParent=!!templateNodeParent.length;if(hasCompileParent)compile.$$addBindingClass(templateNodeParent);return function textInterpolateLinkFn(scope,node){var parent=node.parent();if(!hasCompileParent)compile.$$addBindingClass(parent);compile.$$addBindingInfo(parent,interpolateFn.expressions);scope.$watch(interpolateFn,function interpolateFnWatchAction(value){node[0].nodeValue=value;});};}});}}function wrapTemplate(type,template){type=lowercase(type||'html');switch(type){case'svg':case'math':var wrapper=document.createElement('div');wrapper.innerHTML='<'+type+'>'+template+'</'+type+'>';return wrapper.childNodes[0].childNodes;default:return template;}}function getTrustedContext(node,attrNormalizedName){if(attrNormalizedName=="srcdoc"){return $sce.HTML;}var tag=nodeName_(node);if(attrNormalizedName=="xlinkHref"||(tag=="form"&&attrNormalizedName=="action")||(tag!="img"&&(attrNormalizedName=="src"||attrNormalizedName=="ngSrc"))){return $sce.RESOURCE_URL;}}function addAttrInterpolateDirective(node,directives,value,name,allOrNothing){var trustedContext=getTrustedContext(node,name);allOrNothing=ALL_OR_NOTHING_ATTRS[name]||allOrNothing;var interpolateFn=$interpolate(value,true,trustedContext,allOrNothing);if(!interpolateFn)return;if(name==="multiple"&&nodeName_(node)==="select"){throw $compileMinErr("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",startingTag(node));}directives.push({priority:100,compile:function(){return{pre:function attrInterpolatePreLinkFn(scope,element,attr){var $$observers=(attr.$$observers||(attr.$$observers={}));if(EVENT_HANDLER_ATTR_REGEXP.test(name)){throw $compileMinErr('nodomevents',"Interpolations for HTML DOM event attributes are disallowed. Please use the "+"ng- versions (such as ng-click instead of onclick) instead.");}var newValue=attr[name];if(newValue!==value){interpolateFn=newValue&&$interpolate(newValue,true,trustedContext,allOrNothing);value=newValue;}if(!interpolateFn)return;attr[name]=interpolateFn(scope);($$observers[name]||($$observers[name]=[])).$$inter=true;(attr.$$observers&&attr.$$observers[name].$$scope||scope).$watch(interpolateFn,function interpolateFnWatchAction(newValue,oldValue){if(name==='class'&&newValue!=oldValue){attr.$updateClass(newValue,oldValue);}else{attr.$set(name,newValue);}});}};}});}function replaceWith($rootElement,elementsToRemove,newNode){var firstElementToRemove=elementsToRemove[0],removeCount=elementsToRemove.length,parent=firstElementToRemove.parentNode,i,ii;if($rootElement){for(i=0,ii=$rootElement.length;i<ii;i++){if($rootElement[i]==firstElementToRemove){$rootElement[i++]=newNode;for(var j=i,j2=j+removeCount-1,jj=$rootElement.length;j<jj;j++,j2++){if(j2<jj){$rootElement[j]=$rootElement[j2];}else{delete $rootElement[j];}}$rootElement.length-=removeCount-1;if($rootElement.context===firstElementToRemove){$rootElement.context=newNode;}break;}}}if(parent){parent.replaceChild(newNode,firstElementToRemove);}var fragment=document.createDocumentFragment();fragment.appendChild(firstElementToRemove);jqLite(newNode).data(jqLite(firstElementToRemove).data());if(!jQuery){delete jqLite.cache[firstElementToRemove[jqLite.expando]];}else{skipDestroyOnNextJQueryCleanData=true;jQuery.cleanData([firstElementToRemove]);}for(var k=1,kk=elementsToRemove.length;k<kk;k++){var element=elementsToRemove[k];jqLite(element).remove();fragment.appendChild(element);delete elementsToRemove[k];}elementsToRemove[0]=newNode;elementsToRemove.length=1;}function cloneAndAnnotateFn(fn,annotation){return extend(function(){return fn.apply(null,arguments);},fn,annotation);}function invokeLinkFn(linkFn,scope,$element,attrs,controllers,transcludeFn){try{linkFn(scope,$element,attrs,controllers,transcludeFn);}catch(e){$exceptionHandler(e,startingTag($element));}}}];}var PREFIX_REGEXP=/^((?:x|data)[\:\-_])/i;function directiveNormalize(name){return camelCase(name.replace(PREFIX_REGEXP,''));}function nodesetLinkingFn(scope,nodeList,rootElement,boundTranscludeFn){}function directiveLinkingFn(nodesetLinkingFn,scope,node,rootElement,boundTranscludeFn){}function tokenDifference(str1,str2){var values='',tokens1=str1.split(/\s+/),tokens2=str2.split(/\s+/);outer:for(var i=0;i<tokens1.length;i++){var token=tokens1[i];for(var j=0;j<tokens2.length;j++){if(token==tokens2[j])continue outer;}values+=(values.length>0?' ':'')+token;}return values;}function removeComments(jqNodes){jqNodes=jqLite(jqNodes);var i=jqNodes.length;if(i<=1){return jqNodes;}while(i--){var node=jqNodes[i];if(node.nodeType===NODE_TYPE_COMMENT){splice.call(jqNodes,i,1);}}return jqNodes;}var $controllerMinErr=minErr('$controller');function $ControllerProvider(){var controllers={},globals=false,CNTRL_REG=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(name,constructor){assertNotHasOwnProperty(name,'controller');if(isObject(name)){extend(controllers,name);}else{controllers[name]=constructor;}};this.allowGlobals=function(){globals=true;};this.$get=['$injector','$window',function($injector,$window){return function(expression,locals,later,ident){var instance,match,constructor,identifier;later=later===true;if(ident&&isString(ident)){identifier=ident;}if(isString(expression)){match=expression.match(CNTRL_REG);if(!match){throw $controllerMinErr('ctrlfmt',"Badly formed controller string '{0}'. "+"Must match `__name__ as __id__` or `__name__`.",expression);}constructor=match[1],identifier=identifier||match[3];expression=controllers.hasOwnProperty(constructor)?controllers[constructor]:getter(locals.$scope,constructor,true)||(globals?getter($window,constructor,true):undefined);assertArgFn(expression,constructor,true);}if(later){var controllerPrototype=(isArray(expression)?expression[expression.length-1]:expression).prototype;instance=Object.create(controllerPrototype||null);if(identifier){addIdentifier(locals,identifier,instance,constructor||expression.name);}return extend(function(){$injector.invoke(expression,instance,locals,constructor);return instance;},{instance:instance,identifier:identifier});}instance=$injector.instantiate(expression,locals,constructor);if(identifier){addIdentifier(locals,identifier,instance,constructor||expression.name);}return instance;};function addIdentifier(locals,identifier,instance,name){if(!(locals&&isObject(locals.$scope))){throw minErr('$controller')('noscp',"Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",name,identifier);}locals.$scope[identifier]=instance;}}];}function $DocumentProvider(){this.$get=['$window',function(window){return jqLite(window.document);}];}function $ExceptionHandlerProvider(){this.$get=['$log',function($log){return function(exception,cause){$log.error.apply($log,arguments);};}];}var APPLICATION_JSON='application/json';var CONTENT_TYPE_APPLICATION_JSON={'Content-Type':APPLICATION_JSON+';charset=utf-8'};var JSON_START=/^\[|^\{(?!\{)/;var JSON_ENDS={'[':/]$/,'{':/}$/};var JSON_PROTECTION_PREFIX=/^\)\]\}',?\n/;function defaultHttpResponseTransform(data,headers){if(isString(data)){var tempData=data.replace(JSON_PROTECTION_PREFIX,'').trim();if(tempData){var contentType=headers('Content-Type');if((contentType&&(contentType.indexOf(APPLICATION_JSON)===0))||isJsonLike(tempData)){data=fromJson(tempData);}}}return data;}function isJsonLike(str){var jsonStart=str.match(JSON_START);return jsonStart&&JSON_ENDS[jsonStart[0]].test(str);}function parseHeaders(headers){var parsed=createMap(),key,val,i;if(!headers)return parsed;forEach(headers.split('\n'),function(line){i=line.indexOf(':');key=lowercase(trim(line.substr(0,i)));val=trim(line.substr(i+1));if(key){parsed[key]=parsed[key]?parsed[key]+', '+val:val;}});return parsed;}function headersGetter(headers){var headersObj=isObject(headers)?headers:undefined;return function(name){if(!headersObj)headersObj=parseHeaders(headers);if(name){var value=headersObj[lowercase(name)];if(value===void 0){value=null;}return value;}return headersObj;};}function transformData(data,headers,status,fns){if(isFunction(fns))return fns(data,headers,status);forEach(fns,function(fn){data=fn(data,headers,status);});return data;}function isSuccess(status){return 200<=status&&status<300;}function $HttpProvider(){var defaults=this.defaults={transformResponse:[defaultHttpResponseTransform],transformRequest:[function(d){return isObject(d)&&!isFile(d)&&!isBlob(d)&&!isFormData(d)?toJson(d):d;}],headers:{common:{'Accept':'application/json, text/plain, */*'},post:shallowCopy(CONTENT_TYPE_APPLICATION_JSON),put:shallowCopy(CONTENT_TYPE_APPLICATION_JSON),patch:shallowCopy(CONTENT_TYPE_APPLICATION_JSON)},xsrfCookieName:'XSRF-TOKEN',xsrfHeaderName:'X-XSRF-TOKEN'};var useApplyAsync=false;this.useApplyAsync=function(value){if(isDefined(value)){useApplyAsync=!!value;return this;}return useApplyAsync;};var interceptorFactories=this.interceptors=[];this.$get=['$httpBackend','$browser','$cacheFactory','$rootScope','$q','$injector',function($httpBackend,$browser,$cacheFactory,$rootScope,$q,$injector){var defaultCache=$cacheFactory('$http');var reversedInterceptors=[];forEach(interceptorFactories,function(interceptorFactory){reversedInterceptors.unshift(isString(interceptorFactory)?$injector.get(interceptorFactory):$injector.invoke(interceptorFactory));});function $http(requestConfig){if(!angular.isObject(requestConfig)){throw minErr('$http')('badreq','Http request configuration must be an object. Received: {0}',requestConfig);}var config=extend({method:'get',transformRequest:defaults.transformRequest,transformResponse:defaults.transformResponse},requestConfig);config.headers=mergeHeaders(requestConfig);config.method=uppercase(config.method);var serverRequest=function(config){var headers=config.headers;var reqData=transformData(config.data,headersGetter(headers),undefined,config.transformRequest);if(isUndefined(reqData)){forEach(headers,function(value,header){if(lowercase(header)==='content-type'){delete headers[header];}});}if(isUndefined(config.withCredentials)&&!isUndefined(defaults.withCredentials)){config.withCredentials=defaults.withCredentials;}return sendReq(config,reqData).then(transformResponse,transformResponse);};var chain=[serverRequest,undefined];var promise=$q.when(config);forEach(reversedInterceptors,function(interceptor){if(interceptor.request||interceptor.requestError){chain.unshift(interceptor.request,interceptor.requestError);}if(interceptor.response||interceptor.responseError){chain.push(interceptor.response,interceptor.responseError);}});while(chain.length){var thenFn=chain.shift();var rejectFn=chain.shift();promise=promise.then(thenFn,rejectFn);}promise.success=function(fn){promise.then(function(response){fn(response.data,response.status,response.headers,config);});return promise;};promise.error=function(fn){promise.then(null,function(response){fn(response.data,response.status,response.headers,config);});return promise;};return promise;function transformResponse(response){var resp=extend({},response);if(!response.data){resp.data=response.data;}else{resp.data=transformData(response.data,response.headers,response.status,config.transformResponse);}return(isSuccess(response.status))?resp:$q.reject(resp);}function executeHeaderFns(headers){var headerContent,processedHeaders={};forEach(headers,function(headerFn,header){if(isFunction(headerFn)){headerContent=headerFn();if(headerContent!=null){processedHeaders[header]=headerContent;}}else{processedHeaders[header]=headerFn;}});return processedHeaders;}function mergeHeaders(config){var defHeaders=defaults.headers,reqHeaders=extend({},config.headers),defHeaderName,lowercaseDefHeaderName,reqHeaderName;defHeaders=extend({},defHeaders.common,defHeaders[lowercase(config.method)]);defaultHeadersIteration:for(defHeaderName in defHeaders){lowercaseDefHeaderName=lowercase(defHeaderName);for(reqHeaderName in reqHeaders){if(lowercase(reqHeaderName)===lowercaseDefHeaderName){continue defaultHeadersIteration;}}reqHeaders[defHeaderName]=defHeaders[defHeaderName];}return executeHeaderFns(reqHeaders);}}$http.pendingRequests=[];createShortMethods('get','delete','head','jsonp');createShortMethodsWithData('post','put','patch');$http.defaults=defaults;return $http;function createShortMethods(names){forEach(arguments,function(name){$http[name]=function(url,config){return $http(extend(config||{},{method:name,url:url}));};});}function createShortMethodsWithData(name){forEach(arguments,function(name){$http[name]=function(url,data,config){return $http(extend(config||{},{method:name,url:url,data:data}));};});}function sendReq(config,reqData){var deferred=$q.defer(),promise=deferred.promise,cache,cachedResp,reqHeaders=config.headers,url=buildUrl(config.url,config.params);$http.pendingRequests.push(config);promise.then(removePendingReq,removePendingReq);if((config.cache||defaults.cache)&&config.cache!==false&&(config.method==='GET'||config.method==='JSONP')){cache=isObject(config.cache)?config.cache:isObject(defaults.cache)?defaults.cache:defaultCache;}if(cache){cachedResp=cache.get(url);if(isDefined(cachedResp)){if(isPromiseLike(cachedResp)){cachedResp.then(resolvePromiseWithResult,resolvePromiseWithResult);}else{if(isArray(cachedResp)){resolvePromise(cachedResp[1],cachedResp[0],shallowCopy(cachedResp[2]),cachedResp[3]);}else{resolvePromise(cachedResp,200,{},'OK');}}}else{cache.put(url,promise);}}if(isUndefined(cachedResp)){var xsrfValue=urlIsSameOrigin(config.url)?$browser.cookies()[config.xsrfCookieName||defaults.xsrfCookieName]:undefined;if(xsrfValue){reqHeaders[(config.xsrfHeaderName||defaults.xsrfHeaderName)]=xsrfValue;}$httpBackend(config.method,url,reqData,done,reqHeaders,config.timeout,config.withCredentials,config.responseType);}return promise;function done(status,response,headersString,statusText){if(cache){if(isSuccess(status)){cache.put(url,[status,response,parseHeaders(headersString),statusText]);}else{cache.remove(url);}}function resolveHttpPromise(){resolvePromise(response,status,headersString,statusText);}if(useApplyAsync){$rootScope.$applyAsync(resolveHttpPromise);}else{resolveHttpPromise();if(!$rootScope.$$phase)$rootScope.$apply();}}function resolvePromise(response,status,headers,statusText){status=Math.max(status,0);(isSuccess(status)?deferred.resolve:deferred.reject)({data:response,status:status,headers:headersGetter(headers),config:config,statusText:statusText});}function resolvePromiseWithResult(result){resolvePromise(result.data,result.status,shallowCopy(result.headers()),result.statusText);}function removePendingReq(){var idx=$http.pendingRequests.indexOf(config);if(idx!==-1)$http.pendingRequests.splice(idx,1);}}function buildUrl(url,params){if(!params)return url;var parts=[];forEachSorted(params,function(value,key){if(value===null||isUndefined(value))return;if(!isArray(value))value=[value];forEach(value,function(v){if(isObject(v)){if(isDate(v)){v=v.toISOString();}else{v=toJson(v);}}parts.push(encodeUriQuery(key)+'='+encodeUriQuery(v));});});if(parts.length>0){url+=((url.indexOf('?')==-1)?'?':'&')+parts.join('&');}return url;}}];}function createXhr(){return new window.XMLHttpRequest();}function $HttpBackendProvider(){this.$get=['$browser','$window','$document',function($browser,$window,$document){return createHttpBackend($browser,createXhr,$browser.defer,$window.angular.callbacks,$document[0]);}];}function createHttpBackend($browser,createXhr,$browserDefer,callbacks,rawDocument){return function(method,url,post,callback,headers,timeout,withCredentials,responseType){$browser.$$incOutstandingRequestCount();url=url||$browser.url();if(lowercase(method)=='jsonp'){var callbackId='_'+(callbacks.counter++).toString(36);callbacks[callbackId]=function(data){callbacks[callbackId].data=data;callbacks[callbackId].called=true;};var jsonpDone=jsonpReq(url.replace('JSON_CALLBACK','angular.callbacks.'+callbackId),callbackId,function(status,text){completeRequest(callback,status,callbacks[callbackId].data,"",text);callbacks[callbackId]=noop;});}else{var xhr=createXhr();xhr.open(method,url,true);forEach(headers,function(value,key){if(isDefined(value)){xhr.setRequestHeader(key,value);}});xhr.onload=function requestLoaded(){var statusText=xhr.statusText||'';var response=('response'in xhr)?xhr.response:xhr.responseText;var status=xhr.status===1223?204:xhr.status;if(status===0){status=response?200:urlResolve(url).protocol=='file'?404:0;}completeRequest(callback,status,response,xhr.getAllResponseHeaders(),statusText);};var requestError=function(){completeRequest(callback,-1,null,null,'');};xhr.onerror=requestError;xhr.onabort=requestError;if(withCredentials){xhr.withCredentials=true;}if(responseType){try{xhr.responseType=responseType;}catch(e){if(responseType!=='json'){throw e;}}}xhr.send(post||null);}if(timeout>0){var timeoutId=$browserDefer(timeoutRequest,timeout);}else if(isPromiseLike(timeout)){timeout.then(timeoutRequest);}function timeoutRequest(){jsonpDone&&jsonpDone();xhr&&xhr.abort();}function completeRequest(callback,status,response,headersString,statusText){if(timeoutId!==undefined){$browserDefer.cancel(timeoutId);}jsonpDone=xhr=null;callback(status,response,headersString,statusText);$browser.$$completeOutstandingRequest(noop);}};function jsonpReq(url,callbackId,done){var script=rawDocument.createElement('script'),callback=null;script.type="text/javascript";script.src=url;script.async=true;callback=function(event){removeEventListenerFn(script,"load",callback);removeEventListenerFn(script,"error",callback);rawDocument.body.removeChild(script);script=null;var status=-1;var text="unknown";if(event){if(event.type==="load"&&!callbacks[callbackId].called){event={type:"error"};}text=event.type;status=event.type==="error"?404:200;}if(done){done(status,text);}};addEventListenerFn(script,"load",callback);addEventListenerFn(script,"error",callback);rawDocument.body.appendChild(script);return callback;}}var $interpolateMinErr=minErr('$interpolate');function $InterpolateProvider(){var startSymbol='{{';var endSymbol='}}';this.startSymbol=function(value){if(value){startSymbol=value;return this;}else{return startSymbol;}};this.endSymbol=function(value){if(value){endSymbol=value;return this;}else{return endSymbol;}};this.$get=['$parse','$exceptionHandler','$sce',function($parse,$exceptionHandler,$sce){var startSymbolLength=startSymbol.length,endSymbolLength=endSymbol.length,escapedStartRegexp=new RegExp(startSymbol.replace(/./g,escape),'g'),escapedEndRegexp=new RegExp(endSymbol.replace(/./g,escape),'g');function escape(ch){return'\\\\\\'+ch;}function $interpolate(text,mustHaveExpression,trustedContext,allOrNothing){allOrNothing=!!allOrNothing;var startIndex,endIndex,index=0,expressions=[],parseFns=[],textLength=text.length,exp,concat=[],expressionPositions=[];while(index<textLength){if(((startIndex=text.indexOf(startSymbol,index))!=-1)&&((endIndex=text.indexOf(endSymbol,startIndex+startSymbolLength))!=-1)){if(index!==startIndex){concat.push(unescapeText(text.substring(index,startIndex)));}exp=text.substring(startIndex+startSymbolLength,endIndex);expressions.push(exp);parseFns.push($parse(exp,parseStringifyInterceptor));index=endIndex+endSymbolLength;expressionPositions.push(concat.length);concat.push('');}else{if(index!==textLength){concat.push(unescapeText(text.substring(index)));}break;}}if(trustedContext&&concat.length>1){throw $interpolateMinErr('noconcat',"Error while interpolating: {0}\nStrict Contextual Escaping disallows "+"interpolations that concatenate multiple expressions when a trusted value is "+"required. See http://docs.angularjs.org/api/ng.$sce",text);}if(!mustHaveExpression||expressions.length){var compute=function(values){for(var i=0,ii=expressions.length;i<ii;i++){if(allOrNothing&&isUndefined(values[i]))return;concat[expressionPositions[i]]=values[i];}return concat.join('');};var getValue=function(value){return trustedContext?$sce.getTrusted(trustedContext,value):$sce.valueOf(value);};var stringify=function(value){if(value==null){return'';}switch(typeof value){case'string':break;case'number':value=''+value;break;default:value=toJson(value);}return value;};return extend(function interpolationFn(context){var i=0;var ii=expressions.length;var values=new Array(ii);try{for(;i<ii;i++){values[i]=parseFns[i](context);}return compute(values);}catch(err){var newErr=$interpolateMinErr('interr',"Can't interpolate: {0}\n{1}",text,err.toString());$exceptionHandler(newErr);}},{exp:text,expressions:expressions,$$watchDelegate:function(scope,listener,objectEquality){var lastValue;return scope.$watchGroup(parseFns,function interpolateFnWatcher(values,oldValues){var currValue=compute(values);if(isFunction(listener)){listener.call(this,currValue,values!==oldValues?lastValue:currValue,scope);}lastValue=currValue;},objectEquality);}});}function unescapeText(text){return text.replace(escapedStartRegexp,startSymbol).replace(escapedEndRegexp,endSymbol);}function parseStringifyInterceptor(value){try{value=getValue(value);return allOrNothing&&!isDefined(value)?value:stringify(value);}catch(err){var newErr=$interpolateMinErr('interr',"Can't interpolate: {0}\n{1}",text,err.toString());$exceptionHandler(newErr);}}}$interpolate.startSymbol=function(){return startSymbol;};$interpolate.endSymbol=function(){return endSymbol;};return $interpolate;}];}function $IntervalProvider(){this.$get=['$rootScope','$window','$q','$$q',function($rootScope,$window,$q,$$q){var intervals={};function interval(fn,delay,count,invokeApply){var setInterval=$window.setInterval,clearInterval=$window.clearInterval,iteration=0,skipApply=(isDefined(invokeApply)&&!invokeApply),deferred=(skipApply?$$q:$q).defer(),promise=deferred.promise;count=isDefined(count)?count:0;promise.then(null,null,fn);promise.$$intervalId=setInterval(function tick(){deferred.notify(iteration++);if(count>0&&iteration>=count){deferred.resolve(iteration);clearInterval(promise.$$intervalId);delete intervals[promise.$$intervalId];}if(!skipApply)$rootScope.$apply();},delay);intervals[promise.$$intervalId]=deferred;return promise;}interval.cancel=function(promise){if(promise&&promise.$$intervalId in intervals){intervals[promise.$$intervalId].reject('canceled');$window.clearInterval(promise.$$intervalId);delete intervals[promise.$$intervalId];return true;}return false;};return interval;}];}function $LocaleProvider(){this.$get=function(){return{id:'en-us',NUMBER_FORMATS:{DECIMAL_SEP:'.',GROUP_SEP:',',PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:'',posSuf:'',negPre:'-',negSuf:'',gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:'\u00A4',posSuf:'',negPre:'(\u00A4',negSuf:')',gSize:3,lgSize:3}],CURRENCY_SYM:'$'},DATETIME_FORMATS:{MONTH:'January,February,March,April,May,June,July,August,September,October,November,December'.split(','),SHORTMONTH:'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),DAY:'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),SHORTDAY:'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(','),AMPMS:['AM','PM'],medium:'MMM d, y h:mm:ss a','short':'M/d/yy h:mm a',fullDate:'EEEE, MMMM d, y',longDate:'MMMM d, y',mediumDate:'MMM d, y',shortDate:'M/d/yy',mediumTime:'h:mm:ss a',shortTime:'h:mm a'},pluralCat:function(num){if(num===1){return'one';}return'other';}};};}var PATH_MATCH=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,DEFAULT_PORTS={'http':80,'https':443,'ftp':21};var $locationMinErr=minErr('$location');function encodePath(path){var segments=path.split('/'),i=segments.length;while(i--){segments[i]=encodeUriSegment(segments[i]);}return segments.join('/');}function parseAbsoluteUrl(absoluteUrl,locationObj){var parsedUrl=urlResolve(absoluteUrl);locationObj.$$protocol=parsedUrl.protocol;locationObj.$$host=parsedUrl.hostname;locationObj.$$port=int(parsedUrl.port)||DEFAULT_PORTS[parsedUrl.protocol]||null;}function parseAppUrl(relativeUrl,locationObj){var prefixed=(relativeUrl.charAt(0)!=='/');if(prefixed){relativeUrl='/'+relativeUrl;}var match=urlResolve(relativeUrl);locationObj.$$path=decodeURIComponent(prefixed&&match.pathname.charAt(0)==='/'?match.pathname.substring(1):match.pathname);locationObj.$$search=parseKeyValue(match.search);locationObj.$$hash=decodeURIComponent(match.hash);if(locationObj.$$path&&locationObj.$$path.charAt(0)!='/'){locationObj.$$path='/'+locationObj.$$path;}}function beginsWith(begin,whole){if(whole.indexOf(begin)===0){return whole.substr(begin.length);}}function stripHash(url){var index=url.indexOf('#');return index==-1?url:url.substr(0,index);}function trimEmptyHash(url){return url.replace(/(#.+)|#$/,'$1');}function stripFile(url){return url.substr(0,stripHash(url).lastIndexOf('/')+1);}function serverBase(url){return url.substring(0,url.indexOf('/',url.indexOf('//')+2));}function LocationHtml5Url(appBase,basePrefix){this.$$html5=true;basePrefix=basePrefix||'';var appBaseNoFile=stripFile(appBase);parseAbsoluteUrl(appBase,this);this.$$parse=function(url){var pathUrl=beginsWith(appBaseNoFile,url);if(!isString(pathUrl)){throw $locationMinErr('ipthprfx','Invalid url "{0}", missing path prefix "{1}".',url,appBaseNoFile);}parseAppUrl(pathUrl,this);if(!this.$$path){this.$$path='/';}this.$$compose();};this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?'#'+encodeUriSegment(this.$$hash):'';this.$$url=encodePath(this.$$path)+(search?'?'+search:'')+hash;this.$$absUrl=appBaseNoFile+this.$$url.substr(1);};this.$$parseLinkUrl=function(url,relHref){if(relHref&&relHref[0]==='#'){this.hash(relHref.slice(1));return true;}var appUrl,prevAppUrl;var rewrittenUrl;if((appUrl=beginsWith(appBase,url))!==undefined){prevAppUrl=appUrl;if((appUrl=beginsWith(basePrefix,appUrl))!==undefined){rewrittenUrl=appBaseNoFile+(beginsWith('/',appUrl)||appUrl);}else{rewrittenUrl=appBase+prevAppUrl;}}else if((appUrl=beginsWith(appBaseNoFile,url))!==undefined){rewrittenUrl=appBaseNoFile+appUrl;}else if(appBaseNoFile==url+'/'){rewrittenUrl=appBaseNoFile;}if(rewrittenUrl){this.$$parse(rewrittenUrl);}return!!rewrittenUrl;};}function LocationHashbangUrl(appBase,hashPrefix){var appBaseNoFile=stripFile(appBase);parseAbsoluteUrl(appBase,this);this.$$parse=function(url){var withoutBaseUrl=beginsWith(appBase,url)||beginsWith(appBaseNoFile,url);var withoutHashUrl;if(withoutBaseUrl.charAt(0)==='#'){withoutHashUrl=beginsWith(hashPrefix,withoutBaseUrl);if(isUndefined(withoutHashUrl)){withoutHashUrl=withoutBaseUrl;}}else{withoutHashUrl=this.$$html5?withoutBaseUrl:'';}parseAppUrl(withoutHashUrl,this);this.$$path=removeWindowsDriveName(this.$$path,withoutHashUrl,appBase);this.$$compose();function removeWindowsDriveName(path,url,base){var windowsFilePathExp=/^\/[A-Z]:(\/.*)/;var firstPathSegmentMatch;if(url.indexOf(base)===0){url=url.replace(base,'');}if(windowsFilePathExp.exec(url)){return path;}firstPathSegmentMatch=windowsFilePathExp.exec(path);return firstPathSegmentMatch?firstPathSegmentMatch[1]:path;}};this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?'#'+encodeUriSegment(this.$$hash):'';this.$$url=encodePath(this.$$path)+(search?'?'+search:'')+hash;this.$$absUrl=appBase+(this.$$url?hashPrefix+this.$$url:'');};this.$$parseLinkUrl=function(url,relHref){if(stripHash(appBase)==stripHash(url)){this.$$parse(url);return true;}return false;};}function LocationHashbangInHtml5Url(appBase,hashPrefix){this.$$html5=true;LocationHashbangUrl.apply(this,arguments);var appBaseNoFile=stripFile(appBase);this.$$parseLinkUrl=function(url,relHref){if(relHref&&relHref[0]==='#'){this.hash(relHref.slice(1));return true;}var rewrittenUrl;var appUrl;if(appBase==stripHash(url)){rewrittenUrl=url;}else if((appUrl=beginsWith(appBaseNoFile,url))){rewrittenUrl=appBase+hashPrefix+appUrl;}else if(appBaseNoFile===url+'/'){rewrittenUrl=appBaseNoFile;}if(rewrittenUrl){this.$$parse(rewrittenUrl);}return!!rewrittenUrl;};this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?'#'+encodeUriSegment(this.$$hash):'';this.$$url=encodePath(this.$$path)+(search?'?'+search:'')+hash;this.$$absUrl=appBase+hashPrefix+this.$$url;};}var locationPrototype={$$html5:false,$$replace:false,absUrl:locationGetter('$$absUrl'),url:function(url){if(isUndefined(url))return this.$$url;var match=PATH_MATCH.exec(url);if(match[1]||url==='')this.path(decodeURIComponent(match[1]));if(match[2]||match[1]||url==='')this.search(match[3]||'');this.hash(match[5]||'');return this;},protocol:locationGetter('$$protocol'),host:locationGetter('$$host'),port:locationGetter('$$port'),path:locationGetterSetter('$$path',function(path){path=path!==null?path.toString():'';return path.charAt(0)=='/'?path:'/'+path;}),search:function(search,paramValue){switch(arguments.length){case 0:return this.$$search;case 1:if(isString(search)||isNumber(search)){search=search.toString();this.$$search=parseKeyValue(search);}else if(isObject(search)){search=copy(search,{});forEach(search,function(value,key){if(value==null)delete search[key];});this.$$search=search;}else{throw $locationMinErr('isrcharg','The first argument of the `$location#search()` call must be a string or an object.');}break;default:if(isUndefined(paramValue)||paramValue===null){delete this.$$search[search];}else{this.$$search[search]=paramValue;}}this.$$compose();return this;},hash:locationGetterSetter('$$hash',function(hash){return hash!==null?hash.toString():'';}),replace:function(){this.$$replace=true;return this;}};forEach([LocationHashbangInHtml5Url,LocationHashbangUrl,LocationHtml5Url],function(Location){Location.prototype=Object.create(locationPrototype);Location.prototype.state=function(state){if(!arguments.length)return this.$$state;if(Location!==LocationHtml5Url||!this.$$html5){throw $locationMinErr('nostate','History API state support is available only '+'in HTML5 mode and only in browsers supporting HTML5 History API');}this.$$state=isUndefined(state)?null:state;return this;};});function locationGetter(property){return function(){return this[property];};}function locationGetterSetter(property,preprocess){return function(value){if(isUndefined(value))return this[property];this[property]=preprocess(value);this.$$compose();return this;};}function $LocationProvider(){var hashPrefix='',html5Mode={enabled:false,requireBase:true,rewriteLinks:true};this.hashPrefix=function(prefix){if(isDefined(prefix)){hashPrefix=prefix;return this;}else{return hashPrefix;}};this.html5Mode=function(mode){if(isBoolean(mode)){html5Mode.enabled=mode;return this;}else if(isObject(mode)){if(isBoolean(mode.enabled)){html5Mode.enabled=mode.enabled;}if(isBoolean(mode.requireBase)){html5Mode.requireBase=mode.requireBase;}if(isBoolean(mode.rewriteLinks)){html5Mode.rewriteLinks=mode.rewriteLinks;}return this;}else{return html5Mode;}};this.$get=['$rootScope','$browser','$sniffer','$rootElement','$window',function($rootScope,$browser,$sniffer,$rootElement,$window){var $location,LocationMode,baseHref=$browser.baseHref(),initialUrl=$browser.url(),appBase;if(html5Mode.enabled){if(!baseHref&&html5Mode.requireBase){throw $locationMinErr('nobase',"$location in HTML5 mode requires a <base> tag to be present!");}appBase=serverBase(initialUrl)+(baseHref||'/');LocationMode=$sniffer.history?LocationHtml5Url:LocationHashbangInHtml5Url;}else{appBase=stripHash(initialUrl);LocationMode=LocationHashbangUrl;}$location=new LocationMode(appBase,'#'+hashPrefix);$location.$$parseLinkUrl(initialUrl,initialUrl);$location.$$state=$browser.state();var IGNORE_URI_REGEXP=/^\s*(javascript|mailto):/i;function setBrowserUrlWithFallback(url,replace,state){var oldUrl=$location.url();var oldState=$location.$$state;try{$browser.url(url,replace,state);$location.$$state=$browser.state();}catch(e){$location.url(oldUrl);$location.$$state=oldState;throw e;}}$rootElement.on('click',function(event){if(!html5Mode.rewriteLinks||event.ctrlKey||event.metaKey||event.shiftKey||event.which==2||event.button==2)return;var elm=jqLite(event.target);while(nodeName_(elm[0])!=='a'){if(elm[0]===$rootElement[0]||!(elm=elm.parent())[0])return;}var absHref=elm.prop('href');var relHref=elm.attr('href')||elm.attr('xlink:href');if(isObject(absHref)&&absHref.toString()==='[object SVGAnimatedString]'){absHref=urlResolve(absHref.animVal).href;}if(IGNORE_URI_REGEXP.test(absHref))return;if(absHref&&!elm.attr('target')&&!event.isDefaultPrevented()){if($location.$$parseLinkUrl(absHref,relHref)){event.preventDefault();if($location.absUrl()!=$browser.url()){$rootScope.$apply();$window.angular['ff-684208-preventDefault']=true;}}}});if(trimEmptyHash($location.absUrl())!=trimEmptyHash(initialUrl)){$browser.url($location.absUrl(),true);}var initializing=true;$browser.onUrlChange(function(newUrl,newState){$rootScope.$evalAsync(function(){var oldUrl=$location.absUrl();var oldState=$location.$$state;var defaultPrevented;$location.$$parse(newUrl);$location.$$state=newState;defaultPrevented=$rootScope.$broadcast('$locationChangeStart',newUrl,oldUrl,newState,oldState).defaultPrevented;if($location.absUrl()!==newUrl)return;if(defaultPrevented){$location.$$parse(oldUrl);$location.$$state=oldState;setBrowserUrlWithFallback(oldUrl,false,oldState);}else{initializing=false;afterLocationChange(oldUrl,oldState);}});if(!$rootScope.$$phase)$rootScope.$digest();});$rootScope.$watch(function $locationWatch(){var oldUrl=trimEmptyHash($browser.url());var newUrl=trimEmptyHash($location.absUrl());var oldState=$browser.state();var currentReplace=$location.$$replace;var urlOrStateChanged=oldUrl!==newUrl||($location.$$html5&&$sniffer.history&&oldState!==$location.$$state);if(initializing||urlOrStateChanged){initializing=false;$rootScope.$evalAsync(function(){var newUrl=$location.absUrl();var defaultPrevented=$rootScope.$broadcast('$locationChangeStart',newUrl,oldUrl,$location.$$state,oldState).defaultPrevented;if($location.absUrl()!==newUrl)return;if(defaultPrevented){$location.$$parse(oldUrl);$location.$$state=oldState;}else{if(urlOrStateChanged){setBrowserUrlWithFallback(newUrl,currentReplace,oldState===$location.$$state?null:$location.$$state);}afterLocationChange(oldUrl,oldState);}});}$location.$$replace=false;});return $location;function afterLocationChange(oldUrl,oldState){$rootScope.$broadcast('$locationChangeSuccess',$location.absUrl(),oldUrl,$location.$$state,oldState);}}];}function $LogProvider(){var debug=true,self=this;this.debugEnabled=function(flag){if(isDefined(flag)){debug=flag;return this;}else{return debug;}};this.$get=['$window',function($window){return{log:consoleLog('log'),info:consoleLog('info'),warn:consoleLog('warn'),error:consoleLog('error'),debug:(function(){var fn=consoleLog('debug');return function(){if(debug){fn.apply(self,arguments);}};}())};function formatError(arg){if(arg instanceof Error){if(arg.stack){arg=(arg.message&&arg.stack.indexOf(arg.message)===-1)?'Error: '+arg.message+'\n'+arg.stack:arg.stack;}else if(arg.sourceURL){arg=arg.message+'\n'+arg.sourceURL+':'+arg.line;}}return arg;}function consoleLog(type){var console=$window.console||{},logFn=console[type]||console.log||noop,hasApply=false;try{hasApply=!!logFn.apply;}catch(e){}if(hasApply){return function(){var args=[];forEach(arguments,function(arg){args.push(formatError(arg));});return logFn.apply(console,args);};}return function(arg1,arg2){logFn(arg1,arg2==null?'':arg2);};}}];}var $parseMinErr=minErr('$parse');function ensureSafeMemberName(name,fullExpression){if(name==="__defineGetter__"||name==="__defineSetter__"||name==="__lookupGetter__"||name==="__lookupSetter__"||name==="__proto__"){throw $parseMinErr('isecfld','Attempting to access a disallowed field in Angular expressions! '+'Expression: {0}',fullExpression);}return name;}function ensureSafeObject(obj,fullExpression){if(obj){if(obj.constructor===obj){throw $parseMinErr('isecfn','Referencing Function in Angular expressions is disallowed! Expression: {0}',fullExpression);}else if(obj.window===obj){throw $parseMinErr('isecwindow','Referencing the Window in Angular expressions is disallowed! Expression: {0}',fullExpression);}else if(obj.children&&(obj.nodeName||(obj.prop&&obj.attr&&obj.find))){throw $parseMinErr('isecdom','Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',fullExpression);}else if(obj===Object){throw $parseMinErr('isecobj','Referencing Object in Angular expressions is disallowed! Expression: {0}',fullExpression);}}return obj;}var CALL=Function.prototype.call;var APPLY=Function.prototype.apply;var BIND=Function.prototype.bind;function ensureSafeFunction(obj,fullExpression){if(obj){if(obj.constructor===obj){throw $parseMinErr('isecfn','Referencing Function in Angular expressions is disallowed! Expression: {0}',fullExpression);}else if(obj===CALL||obj===APPLY||obj===BIND){throw $parseMinErr('isecff','Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}',fullExpression);}}}var CONSTANTS=createMap();forEach({'null':function(){return null;},'true':function(){return true;},'false':function(){return false;},'undefined':function(){}},function(constantGetter,name){constantGetter.constant=constantGetter.literal=constantGetter.sharedGetter=true;CONSTANTS[name]=constantGetter;});CONSTANTS['this']=function(self){return self;};CONSTANTS['this'].sharedGetter=true;var OPERATORS=extend(createMap(),{'+':function(self,locals,a,b){a=a(self,locals);b=b(self,locals);if(isDefined(a)){if(isDefined(b)){return a+b;}return a;}return isDefined(b)?b:undefined;},'-':function(self,locals,a,b){a=a(self,locals);b=b(self,locals);return(isDefined(a)?a:0)-(isDefined(b)?b:0);},'*':function(self,locals,a,b){return a(self,locals)*b(self,locals);},'/':function(self,locals,a,b){return a(self,locals)/b(self,locals);},'%':function(self,locals,a,b){return a(self,locals)%b(self,locals);},'===':function(self,locals,a,b){return a(self,locals)===b(self,locals);},'!==':function(self,locals,a,b){return a(self,locals)!==b(self,locals);},'==':function(self,locals,a,b){return a(self,locals)==b(self,locals);},'!=':function(self,locals,a,b){return a(self,locals)!=b(self,locals);},'<':function(self,locals,a,b){return a(self,locals)<b(self,locals);},'>':function(self,locals,a,b){return a(self,locals)>b(self,locals);},'<=':function(self,locals,a,b){return a(self,locals)<=b(self,locals);},'>=':function(self,locals,a,b){return a(self,locals)>=b(self,locals);},'&&':function(self,locals,a,b){return a(self,locals)&&b(self,locals);},'||':function(self,locals,a,b){return a(self,locals)||b(self,locals);},'!':function(self,locals,a){return!a(self,locals);},'=':true,'|':true});var ESCAPE={"n":"\n","f":"\f","r":"\r","t":"\t","v":"\v","'":"'",'"':'"'};var Lexer=function(options){this.options=options;};Lexer.prototype={constructor:Lexer,lex:function(text){this.text=text;this.index=0;this.tokens=[];while(this.index<this.text.length){var ch=this.text.charAt(this.index);if(ch==='"'||ch==="'"){this.readString(ch);}else if(this.isNumber(ch)||ch==='.'&&this.isNumber(this.peek())){this.readNumber();}else if(this.isIdent(ch)){this.readIdent();}else if(this.is(ch,'(){}[].,;:?')){this.tokens.push({index:this.index,text:ch});this.index++;}else if(this.isWhitespace(ch)){this.index++;}else{var ch2=ch+this.peek();var ch3=ch2+this.peek(2);var op1=OPERATORS[ch];var op2=OPERATORS[ch2];var op3=OPERATORS[ch3];if(op1||op2||op3){var token=op3?ch3:(op2?ch2:ch);this.tokens.push({index:this.index,text:token,operator:true});this.index+=token.length;}else{this.throwError('Unexpected next character ',this.index,this.index+1);}}}return this.tokens;},is:function(ch,chars){return chars.indexOf(ch)!==-1;},peek:function(i){var num=i||1;return(this.index+num<this.text.length)?this.text.charAt(this.index+num):false;},isNumber:function(ch){return('0'<=ch&&ch<='9')&&typeof ch==="string";},isWhitespace:function(ch){return(ch===' '||ch==='\r'||ch==='\t'||ch==='\n'||ch==='\v'||ch==='\u00A0');},isIdent:function(ch){return('a'<=ch&&ch<='z'||'A'<=ch&&ch<='Z'||'_'===ch||ch==='$');},isExpOperator:function(ch){return(ch==='-'||ch==='+'||this.isNumber(ch));},throwError:function(error,start,end){end=end||this.index;var colStr=(isDefined(start)?'s '+start+'-'+this.index+' ['+this.text.substring(start,end)+']':' '+end);throw $parseMinErr('lexerr','Lexer Error: {0} at column{1} in expression [{2}].',error,colStr,this.text);},readNumber:function(){var number='';var start=this.index;while(this.index<this.text.length){var ch=lowercase(this.text.charAt(this.index));if(ch=='.'||this.isNumber(ch)){number+=ch;}else{var peekCh=this.peek();if(ch=='e'&&this.isExpOperator(peekCh)){number+=ch;}else if(this.isExpOperator(ch)&&peekCh&&this.isNumber(peekCh)&&number.charAt(number.length-1)=='e'){number+=ch;}else if(this.isExpOperator(ch)&&(!peekCh||!this.isNumber(peekCh))&&number.charAt(number.length-1)=='e'){this.throwError('Invalid exponent');}else{break;}}this.index++;}this.tokens.push({index:start,text:number,constant:true,value:Number(number)});},readIdent:function(){var start=this.index;while(this.index<this.text.length){var ch=this.text.charAt(this.index);if(!(this.isIdent(ch)||this.isNumber(ch))){break;}this.index++;}this.tokens.push({index:start,text:this.text.slice(start,this.index),identifier:true});},readString:function(quote){var start=this.index;this.index++;var string='';var rawString=quote;var escape=false;while(this.index<this.text.length){var ch=this.text.charAt(this.index);rawString+=ch;if(escape){if(ch==='u'){var hex=this.text.substring(this.index+1,this.index+5);if(!hex.match(/[\da-f]{4}/i))this.throwError('Invalid unicode escape [\\u'+hex+']');this.index+=4;string+=String.fromCharCode(parseInt(hex,16));}else{var rep=ESCAPE[ch];string=string+(rep||ch);}escape=false;}else if(ch==='\\'){escape=true;}else if(ch===quote){this.index++;this.tokens.push({index:start,text:rawString,constant:true,value:string});return;}else{string+=ch;}this.index++;}this.throwError('Unterminated quote',start);}};function isConstant(exp){return exp.constant;}var Parser=function(lexer,$filter,options){this.lexer=lexer;this.$filter=$filter;this.options=options;};Parser.ZERO=extend(function(){return 0;},{sharedGetter:true,constant:true});Parser.prototype={constructor:Parser,parse:function(text){this.text=text;this.tokens=this.lexer.lex(text);var value=this.statements();if(this.tokens.length!==0){this.throwError('is an unexpected token',this.tokens[0]);}value.literal=!!value.literal;value.constant=!!value.constant;return value;},primary:function(){var primary;if(this.expect('(')){primary=this.filterChain();this.consume(')');}else if(this.expect('[')){primary=this.arrayDeclaration();}else if(this.expect('{')){primary=this.object();}else if(this.peek().identifier&&this.peek().text in CONSTANTS){primary=CONSTANTS[this.consume().text];}else if(this.peek().identifier){primary=this.identifier();}else if(this.peek().constant){primary=this.constant();}else{this.throwError('not a primary expression',this.peek());}var next,context;while((next=this.expect('(','[','.'))){if(next.text==='('){primary=this.functionCall(primary,context);context=null;}else if(next.text==='['){context=primary;primary=this.objectIndex(primary);}else if(next.text==='.'){context=primary;primary=this.fieldAccess(primary);}else{this.throwError('IMPOSSIBLE');}}return primary;},throwError:function(msg,token){throw $parseMinErr('syntax','Syntax Error: Token \'{0}\' {1} at column {2} of the expression [{3}] starting at [{4}].',token.text,msg,(token.index+1),this.text,this.text.substring(token.index));},peekToken:function(){if(this.tokens.length===0)throw $parseMinErr('ueoe','Unexpected end of expression: {0}',this.text);return this.tokens[0];},peek:function(e1,e2,e3,e4){return this.peekAhead(0,e1,e2,e3,e4);},peekAhead:function(i,e1,e2,e3,e4){if(this.tokens.length>i){var token=this.tokens[i];var t=token.text;if(t===e1||t===e2||t===e3||t===e4||(!e1&&!e2&&!e3&&!e4)){return token;}}return false;},expect:function(e1,e2,e3,e4){var token=this.peek(e1,e2,e3,e4);if(token){this.tokens.shift();return token;}return false;},consume:function(e1){if(this.tokens.length===0){throw $parseMinErr('ueoe','Unexpected end of expression: {0}',this.text);}var token=this.expect(e1);if(!token){this.throwError('is unexpected, expecting ['+e1+']',this.peek());}return token;},unaryFn:function(op,right){var fn=OPERATORS[op];return extend(function $parseUnaryFn(self,locals){return fn(self,locals,right);},{constant:right.constant,inputs:[right]});},binaryFn:function(left,op,right,isBranching){var fn=OPERATORS[op];return extend(function $parseBinaryFn(self,locals){return fn(self,locals,left,right);},{constant:left.constant&&right.constant,inputs:!isBranching&&[left,right]});},identifier:function(){var id=this.consume().text;while(this.peek('.')&&this.peekAhead(1).identifier&&!this.peekAhead(2,'(')){id+=this.consume().text+this.consume().text;}return getterFn(id,this.options,this.text);},constant:function(){var value=this.consume().value;return extend(function $parseConstant(){return value;},{constant:true,literal:true});},statements:function(){var statements=[];while(true){if(this.tokens.length>0&&!this.peek('}',')',';',']'))statements.push(this.filterChain());if(!this.expect(';')){return(statements.length===1)?statements[0]:function $parseStatements(self,locals){var value;for(var i=0,ii=statements.length;i<ii;i++){value=statements[i](self,locals);}return value;};}}},filterChain:function(){var left=this.expression();var token;while((token=this.expect('|'))){left=this.filter(left);}return left;},filter:function(inputFn){var fn=this.$filter(this.consume().text);var argsFn;var args;if(this.peek(':')){argsFn=[];args=[];while(this.expect(':')){argsFn.push(this.expression());}}var inputs=[inputFn].concat(argsFn||[]);return extend(function $parseFilter(self,locals){var input=inputFn(self,locals);if(args){args[0]=input;var i=argsFn.length;while(i--){args[i+1]=argsFn[i](self,locals);}return fn.apply(undefined,args);}return fn(input);},{constant:!fn.$stateful&&inputs.every(isConstant),inputs:!fn.$stateful&&inputs});},expression:function(){return this.assignment();},assignment:function(){var left=this.ternary();var right;var token;if((token=this.expect('='))){if(!left.assign){this.throwError('implies assignment but ['+this.text.substring(0,token.index)+'] can not be assigned to',token);}right=this.ternary();return extend(function $parseAssignment(scope,locals){return left.assign(scope,right(scope,locals),locals);},{inputs:[left,right]});}return left;},ternary:function(){var left=this.logicalOR();var middle;var token;if((token=this.expect('?'))){middle=this.assignment();if(this.consume(':')){var right=this.assignment();return extend(function $parseTernary(self,locals){return left(self,locals)?middle(self,locals):right(self,locals);},{constant:left.constant&&middle.constant&&right.constant});}}return left;},logicalOR:function(){var left=this.logicalAND();var token;while((token=this.expect('||'))){left=this.binaryFn(left,token.text,this.logicalAND(),true);}return left;},logicalAND:function(){var left=this.equality();var token;while((token=this.expect('&&'))){left=this.binaryFn(left,token.text,this.equality(),true);}return left;},equality:function(){var left=this.relational();var token;while((token=this.expect('==','!=','===','!=='))){left=this.binaryFn(left,token.text,this.relational());}return left;},relational:function(){var left=this.additive();var token;while((token=this.expect('<','>','<=','>='))){left=this.binaryFn(left,token.text,this.additive());}return left;},additive:function(){var left=this.multiplicative();var token;while((token=this.expect('+','-'))){left=this.binaryFn(left,token.text,this.multiplicative());}return left;},multiplicative:function(){var left=this.unary();var token;while((token=this.expect('*','/','%'))){left=this.binaryFn(left,token.text,this.unary());}return left;},unary:function(){var token;if(this.expect('+')){return this.primary();}else if((token=this.expect('-'))){return this.binaryFn(Parser.ZERO,token.text,this.unary());}else if((token=this.expect('!'))){return this.unaryFn(token.text,this.unary());}else{return this.primary();}},fieldAccess:function(object){var getter=this.identifier();return extend(function $parseFieldAccess(scope,locals,self){var o=self||object(scope,locals);return(o==null)?undefined:getter(o);},{assign:function(scope,value,locals){var o=object(scope,locals);if(!o)object.assign(scope,o={},locals);return getter.assign(o,value);}});},objectIndex:function(obj){var expression=this.text;var indexFn=this.expression();this.consume(']');return extend(function $parseObjectIndex(self,locals){var o=obj(self,locals),i=indexFn(self,locals),v;ensureSafeMemberName(i,expression);if(!o)return undefined;v=ensureSafeObject(o[i],expression);return v;},{assign:function(self,value,locals){var key=ensureSafeMemberName(indexFn(self,locals),expression);var o=ensureSafeObject(obj(self,locals),expression);if(!o)obj.assign(self,o={},locals);return o[key]=value;}});},functionCall:function(fnGetter,contextGetter){var argsFn=[];if(this.peekToken().text!==')'){do{argsFn.push(this.expression());}while(this.expect(','));}this.consume(')');var expressionText=this.text;var args=argsFn.length?[]:null;return function $parseFunctionCall(scope,locals){var context=contextGetter?contextGetter(scope,locals):isDefined(contextGetter)?undefined:scope;var fn=fnGetter(scope,locals,context)||noop;if(args){var i=argsFn.length;while(i--){args[i]=ensureSafeObject(argsFn[i](scope,locals),expressionText);}}ensureSafeObject(context,expressionText);ensureSafeFunction(fn,expressionText);var v=fn.apply?fn.apply(context,args):fn(args[0],args[1],args[2],args[3],args[4]);if(args){args.length=0;}return ensureSafeObject(v,expressionText);};},arrayDeclaration:function(){var elementFns=[];if(this.peekToken().text!==']'){do{if(this.peek(']')){break;}elementFns.push(this.expression());}while(this.expect(','));}this.consume(']');return extend(function $parseArrayLiteral(self,locals){var array=[];for(var i=0,ii=elementFns.length;i<ii;i++){array.push(elementFns[i](self,locals));}return array;},{literal:true,constant:elementFns.every(isConstant),inputs:elementFns});},object:function(){var keys=[],valueFns=[];if(this.peekToken().text!=='}'){do{if(this.peek('}')){break;}var token=this.consume();if(token.constant){keys.push(token.value);}else if(token.identifier){keys.push(token.text);}else{this.throwError("invalid key",token);}this.consume(':');valueFns.push(this.expression());}while(this.expect(','));}this.consume('}');return extend(function $parseObjectLiteral(self,locals){var object={};for(var i=0,ii=valueFns.length;i<ii;i++){object[keys[i]]=valueFns[i](self,locals);}return object;},{literal:true,constant:valueFns.every(isConstant),inputs:valueFns});}};function setter(obj,locals,path,setValue,fullExp){ensureSafeObject(obj,fullExp);ensureSafeObject(locals,fullExp);var element=path.split('.'),key;for(var i=0;element.length>1;i++){key=ensureSafeMemberName(element.shift(),fullExp);var propertyObj=(i===0&&locals&&locals[key])||obj[key];if(!propertyObj){propertyObj={};obj[key]=propertyObj;}obj=ensureSafeObject(propertyObj,fullExp);}key=ensureSafeMemberName(element.shift(),fullExp);ensureSafeObject(obj[key],fullExp);obj[key]=setValue;return setValue;}var getterFnCacheDefault=createMap();var getterFnCacheExpensive=createMap();function isPossiblyDangerousMemberName(name){return name=='constructor';}function cspSafeGetterFn(key0,key1,key2,key3,key4,fullExp,expensiveChecks){ensureSafeMemberName(key0,fullExp);ensureSafeMemberName(key1,fullExp);ensureSafeMemberName(key2,fullExp);ensureSafeMemberName(key3,fullExp);ensureSafeMemberName(key4,fullExp);var eso=function(o){return ensureSafeObject(o,fullExp);};var eso0=(expensiveChecks||isPossiblyDangerousMemberName(key0))?eso:identity;var eso1=(expensiveChecks||isPossiblyDangerousMemberName(key1))?eso:identity;var eso2=(expensiveChecks||isPossiblyDangerousMemberName(key2))?eso:identity;var eso3=(expensiveChecks||isPossiblyDangerousMemberName(key3))?eso:identity;var eso4=(expensiveChecks||isPossiblyDangerousMemberName(key4))?eso:identity;return function cspSafeGetter(scope,locals){var pathVal=(locals&&locals.hasOwnProperty(key0))?locals:scope;if(pathVal==null)return pathVal;pathVal=eso0(pathVal[key0]);if(!key1)return pathVal;if(pathVal==null)return undefined;pathVal=eso1(pathVal[key1]);if(!key2)return pathVal;if(pathVal==null)return undefined;pathVal=eso2(pathVal[key2]);if(!key3)return pathVal;if(pathVal==null)return undefined;pathVal=eso3(pathVal[key3]);if(!key4)return pathVal;if(pathVal==null)return undefined;pathVal=eso4(pathVal[key4]);return pathVal;};}function getterFnWithEnsureSafeObject(fn,fullExpression){return function(s,l){return fn(s,l,ensureSafeObject,fullExpression);};}function getterFn(path,options,fullExp){var expensiveChecks=options.expensiveChecks;var getterFnCache=(expensiveChecks?getterFnCacheExpensive:getterFnCacheDefault);var fn=getterFnCache[path];if(fn)return fn;var pathKeys=path.split('.'),pathKeysLength=pathKeys.length;if(options.csp){if(pathKeysLength<6){fn=cspSafeGetterFn(pathKeys[0],pathKeys[1],pathKeys[2],pathKeys[3],pathKeys[4],fullExp,expensiveChecks);}else{fn=function cspSafeGetter(scope,locals){var i=0,val;do{val=cspSafeGetterFn(pathKeys[i++],pathKeys[i++],pathKeys[i++],pathKeys[i++],pathKeys[i++],fullExp,expensiveChecks)(scope,locals);locals=undefined;scope=val;}while(i<pathKeysLength);return val;};}}else{var code='';if(expensiveChecks){code+='s = eso(s, fe);\nl = eso(l, fe);\n';}var needsEnsureSafeObject=expensiveChecks;forEach(pathKeys,function(key,index){ensureSafeMemberName(key,fullExp);var lookupJs=(index?'s':'((l&&l.hasOwnProperty("'+key+'"))?l:s)')+'.'+key;if(expensiveChecks||isPossiblyDangerousMemberName(key)){lookupJs='eso('+lookupJs+', fe)';needsEnsureSafeObject=true;}code+='if(s == null) return undefined;\n'+'s='+lookupJs+';\n';});code+='return s;';var evaledFnGetter=new Function('s','l','eso','fe',code);evaledFnGetter.toString=valueFn(code);if(needsEnsureSafeObject){evaledFnGetter=getterFnWithEnsureSafeObject(evaledFnGetter,fullExp);}fn=evaledFnGetter;}fn.sharedGetter=true;fn.assign=function(self,value,locals){return setter(self,locals,path,value,path);};getterFnCache[path]=fn;return fn;}var objectValueOf=Object.prototype.valueOf;function getValueOf(value){return isFunction(value.valueOf)?value.valueOf():objectValueOf.call(value);}function $ParseProvider(){var cacheDefault=createMap();var cacheExpensive=createMap();this.$get=['$filter','$sniffer',function($filter,$sniffer){var $parseOptions={csp:$sniffer.csp,expensiveChecks:false},$parseOptionsExpensive={csp:$sniffer.csp,expensiveChecks:true};function wrapSharedExpression(exp){var wrapped=exp;if(exp.sharedGetter){wrapped=function $parseWrapper(self,locals){return exp(self,locals);};wrapped.literal=exp.literal;wrapped.constant=exp.constant;wrapped.assign=exp.assign;}return wrapped;}return function $parse(exp,interceptorFn,expensiveChecks){var parsedExpression,oneTime,cacheKey;switch(typeof exp){case'string':cacheKey=exp=exp.trim();var cache=(expensiveChecks?cacheExpensive:cacheDefault);parsedExpression=cache[cacheKey];if(!parsedExpression){if(exp.charAt(0)===':'&&exp.charAt(1)===':'){oneTime=true;exp=exp.substring(2);}var parseOptions=expensiveChecks?$parseOptionsExpensive:$parseOptions;var lexer=new Lexer(parseOptions);var parser=new Parser(lexer,$filter,parseOptions);parsedExpression=parser.parse(exp);if(parsedExpression.constant){parsedExpression.$$watchDelegate=constantWatchDelegate;}else if(oneTime){parsedExpression=wrapSharedExpression(parsedExpression);parsedExpression.$$watchDelegate=parsedExpression.literal?oneTimeLiteralWatchDelegate:oneTimeWatchDelegate;}else if(parsedExpression.inputs){parsedExpression.$$watchDelegate=inputsWatchDelegate;}cache[cacheKey]=parsedExpression;}return addInterceptor(parsedExpression,interceptorFn);case'function':return addInterceptor(exp,interceptorFn);default:return addInterceptor(noop,interceptorFn);}};function collectExpressionInputs(inputs,list){for(var i=0,ii=inputs.length;i<ii;i++){var input=inputs[i];if(!input.constant){if(input.inputs){collectExpressionInputs(input.inputs,list);}else if(list.indexOf(input)===-1){list.push(input);}}}return list;}function expressionInputDirtyCheck(newValue,oldValueOfValue){if(newValue==null||oldValueOfValue==null){return newValue===oldValueOfValue;}if(typeof newValue==='object'){newValue=getValueOf(newValue);if(typeof newValue==='object'){return false;}}return newValue===oldValueOfValue||(newValue!==newValue&&oldValueOfValue!==oldValueOfValue);}function inputsWatchDelegate(scope,listener,objectEquality,parsedExpression){var inputExpressions=parsedExpression.$$inputs||(parsedExpression.$$inputs=collectExpressionInputs(parsedExpression.inputs,[]));var lastResult;if(inputExpressions.length===1){var oldInputValue=expressionInputDirtyCheck;inputExpressions=inputExpressions[0];return scope.$watch(function expressionInputWatch(scope){var newInputValue=inputExpressions(scope);if(!expressionInputDirtyCheck(newInputValue,oldInputValue)){lastResult=parsedExpression(scope);oldInputValue=newInputValue&&getValueOf(newInputValue);}return lastResult;},listener,objectEquality);}var oldInputValueOfValues=[];for(var i=0,ii=inputExpressions.length;i<ii;i++){oldInputValueOfValues[i]=expressionInputDirtyCheck;}return scope.$watch(function expressionInputsWatch(scope){var changed=false;for(var i=0,ii=inputExpressions.length;i<ii;i++){var newInputValue=inputExpressions[i](scope);if(changed||(changed=!expressionInputDirtyCheck(newInputValue,oldInputValueOfValues[i]))){oldInputValueOfValues[i]=newInputValue&&getValueOf(newInputValue);}}if(changed){lastResult=parsedExpression(scope);}return lastResult;},listener,objectEquality);}function oneTimeWatchDelegate(scope,listener,objectEquality,parsedExpression){var unwatch,lastValue;return unwatch=scope.$watch(function oneTimeWatch(scope){return parsedExpression(scope);},function oneTimeListener(value,old,scope){lastValue=value;if(isFunction(listener)){listener.apply(this,arguments);}if(isDefined(value)){scope.$$postDigest(function(){if(isDefined(lastValue)){unwatch();}});}},objectEquality);}function oneTimeLiteralWatchDelegate(scope,listener,objectEquality,parsedExpression){var unwatch,lastValue;return unwatch=scope.$watch(function oneTimeWatch(scope){return parsedExpression(scope);},function oneTimeListener(value,old,scope){lastValue=value;if(isFunction(listener)){listener.call(this,value,old,scope);}if(isAllDefined(value)){scope.$$postDigest(function(){if(isAllDefined(lastValue))unwatch();});}},objectEquality);function isAllDefined(value){var allDefined=true;forEach(value,function(val){if(!isDefined(val))allDefined=false;});return allDefined;}}function constantWatchDelegate(scope,listener,objectEquality,parsedExpression){var unwatch;return unwatch=scope.$watch(function constantWatch(scope){return parsedExpression(scope);},function constantListener(value,old,scope){if(isFunction(listener)){listener.apply(this,arguments);}unwatch();},objectEquality);}function addInterceptor(parsedExpression,interceptorFn){if(!interceptorFn)return parsedExpression;var watchDelegate=parsedExpression.$$watchDelegate;var regularWatch=watchDelegate!==oneTimeLiteralWatchDelegate&&watchDelegate!==oneTimeWatchDelegate;var fn=regularWatch?function regularInterceptedExpression(scope,locals){var value=parsedExpression(scope,locals);return interceptorFn(value,scope,locals);}:function oneTimeInterceptedExpression(scope,locals){var value=parsedExpression(scope,locals);var result=interceptorFn(value,scope,locals);return isDefined(value)?result:value;};if(parsedExpression.$$watchDelegate&&parsedExpression.$$watchDelegate!==inputsWatchDelegate){fn.$$watchDelegate=parsedExpression.$$watchDelegate;}else if(!interceptorFn.$stateful){fn.$$watchDelegate=inputsWatchDelegate;fn.inputs=[parsedExpression];}return fn;}}];}function $QProvider(){this.$get=['$rootScope','$exceptionHandler',function($rootScope,$exceptionHandler){return qFactory(function(callback){$rootScope.$evalAsync(callback);},$exceptionHandler);}];}function $$QProvider(){this.$get=['$browser','$exceptionHandler',function($browser,$exceptionHandler){return qFactory(function(callback){$browser.defer(callback);},$exceptionHandler);}];}function qFactory(nextTick,exceptionHandler){var $qMinErr=minErr('$q',TypeError);function callOnce(self,resolveFn,rejectFn){var called=false;function wrap(fn){return function(value){if(called)return;called=true;fn.call(self,value);};}return[wrap(resolveFn),wrap(rejectFn)];}var defer=function(){return new Deferred();};function Promise(){this.$$state={status:0};}Promise.prototype={then:function(onFulfilled,onRejected,progressBack){var result=new Deferred();this.$$state.pending=this.$$state.pending||[];this.$$state.pending.push([result,onFulfilled,onRejected,progressBack]);if(this.$$state.status>0)scheduleProcessQueue(this.$$state);return result.promise;},"catch":function(callback){return this.then(null,callback);},"finally":function(callback,progressBack){return this.then(function(value){return handleCallback(value,true,callback);},function(error){return handleCallback(error,false,callback);},progressBack);}};function simpleBind(context,fn){return function(value){fn.call(context,value);};}function processQueue(state){var fn,promise,pending;pending=state.pending;state.processScheduled=false;state.pending=undefined;for(var i=0,ii=pending.length;i<ii;++i){promise=pending[i][0];fn=pending[i][state.status];try{if(isFunction(fn)){promise.resolve(fn(state.value));}else if(state.status===1){promise.resolve(state.value);}else{promise.reject(state.value);}}catch(e){promise.reject(e);exceptionHandler(e);}}}function scheduleProcessQueue(state){if(state.processScheduled||!state.pending)return;state.processScheduled=true;nextTick(function(){processQueue(state);});}function Deferred(){this.promise=new Promise();this.resolve=simpleBind(this,this.resolve);this.reject=simpleBind(this,this.reject);this.notify=simpleBind(this,this.notify);}Deferred.prototype={resolve:function(val){if(this.promise.$$state.status)return;if(val===this.promise){this.$$reject($qMinErr('qcycle',"Expected promise to be resolved with value other than itself '{0}'",val));}else{this.$$resolve(val);}},$$resolve:function(val){var then,fns;fns=callOnce(this,this.$$resolve,this.$$reject);try{if((isObject(val)||isFunction(val)))then=val&&val.then;if(isFunction(then)){this.promise.$$state.status=-1;then.call(val,fns[0],fns[1],this.notify);}else{this.promise.$$state.value=val;this.promise.$$state.status=1;scheduleProcessQueue(this.promise.$$state);}}catch(e){fns[1](e);exceptionHandler(e);}},reject:function(reason){if(this.promise.$$state.status)return;this.$$reject(reason);},$$reject:function(reason){this.promise.$$state.value=reason;this.promise.$$state.status=2;scheduleProcessQueue(this.promise.$$state);},notify:function(progress){var callbacks=this.promise.$$state.pending;if((this.promise.$$state.status<=0)&&callbacks&&callbacks.length){nextTick(function(){var callback,result;for(var i=0,ii=callbacks.length;i<ii;i++){result=callbacks[i][0];callback=callbacks[i][3];try{result.notify(isFunction(callback)?callback(progress):progress);}catch(e){exceptionHandler(e);}}});}}};var reject=function(reason){var result=new Deferred();result.reject(reason);return result.promise;};var makePromise=function makePromise(value,resolved){var result=new Deferred();if(resolved){result.resolve(value);}else{result.reject(value);}return result.promise;};var handleCallback=function handleCallback(value,isResolved,callback){var callbackOutput=null;try{if(isFunction(callback))callbackOutput=callback();}catch(e){return makePromise(e,false);}if(isPromiseLike(callbackOutput)){return callbackOutput.then(function(){return makePromise(value,isResolved);},function(error){return makePromise(error,false);});}else{return makePromise(value,isResolved);}};var when=function(value,callback,errback,progressBack){var result=new Deferred();result.resolve(value);return result.promise.then(callback,errback,progressBack);};function all(promises){var deferred=new Deferred(),counter=0,results=isArray(promises)?[]:{};forEach(promises,function(promise,key){counter++;when(promise).then(function(value){if(results.hasOwnProperty(key))return;results[key]=value;if(!(--counter))deferred.resolve(results);},function(reason){if(results.hasOwnProperty(key))return;deferred.reject(reason);});});if(counter===0){deferred.resolve(results);}return deferred.promise;}var $Q=function Q(resolver){if(!isFunction(resolver)){throw $qMinErr('norslvr',"Expected resolverFn, got '{0}'",resolver);}if(!(this instanceof Q)){return new Q(resolver);}var deferred=new Deferred();function resolveFn(value){deferred.resolve(value);}function rejectFn(reason){deferred.reject(reason);}resolver(resolveFn,rejectFn);return deferred.promise;};$Q.defer=defer;$Q.reject=reject;$Q.when=when;$Q.all=all;return $Q;}function $$RAFProvider(){this.$get=['$window','$timeout',function($window,$timeout){var requestAnimationFrame=$window.requestAnimationFrame||$window.webkitRequestAnimationFrame;var cancelAnimationFrame=$window.cancelAnimationFrame||$window.webkitCancelAnimationFrame||$window.webkitCancelRequestAnimationFrame;var rafSupported=!!requestAnimationFrame;var raf=rafSupported?function(fn){var id=requestAnimationFrame(fn);return function(){cancelAnimationFrame(id);};}:function(fn){var timer=$timeout(fn,16.66,false);return function(){$timeout.cancel(timer);};};raf.supported=rafSupported;return raf;}];}function $RootScopeProvider(){var TTL=10;var $rootScopeMinErr=minErr('$rootScope');var lastDirtyWatch=null;var applyAsyncId=null;this.digestTtl=function(value){if(arguments.length){TTL=value;}return TTL;};this.$get=['$injector','$exceptionHandler','$parse','$browser',function($injector,$exceptionHandler,$parse,$browser){function Scope(){this.$id=nextUid();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$destroyed=false;this.$$listeners={};this.$$listenerCount={};this.$$isolateBindings=null;}Scope.prototype={constructor:Scope,$new:function(isolate,parent){var child;parent=parent||this;if(isolate){child=new Scope();child.$root=this.$root;}else{if(!this.$$ChildScope){this.$$ChildScope=function ChildScope(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$id=nextUid();this.$$ChildScope=null;};this.$$ChildScope.prototype=this;}child=new this.$$ChildScope();}child.$parent=parent;child.$$prevSibling=parent.$$childTail;if(parent.$$childHead){parent.$$childTail.$$nextSibling=child;parent.$$childTail=child;}else{parent.$$childHead=parent.$$childTail=child;}if(isolate||parent!=this)child.$on('$destroy',destroyChild);return child;function destroyChild(){child.$$destroyed=true;}},$watch:function(watchExp,listener,objectEquality){var get=$parse(watchExp);if(get.$$watchDelegate){return get.$$watchDelegate(this,listener,objectEquality,get);}var scope=this,array=scope.$$watchers,watcher={fn:listener,last:initWatchVal,get:get,exp:watchExp,eq:!!objectEquality};lastDirtyWatch=null;if(!isFunction(listener)){watcher.fn=noop;}if(!array){array=scope.$$watchers=[];}array.unshift(watcher);return function deregisterWatch(){arrayRemove(array,watcher);lastDirtyWatch=null;};},$watchGroup:function(watchExpressions,listener){var oldValues=new Array(watchExpressions.length);var newValues=new Array(watchExpressions.length);var deregisterFns=[];var self=this;var changeReactionScheduled=false;var firstRun=true;if(!watchExpressions.length){var shouldCall=true;self.$evalAsync(function(){if(shouldCall)listener(newValues,newValues,self);});return function deregisterWatchGroup(){shouldCall=false;};}if(watchExpressions.length===1){return this.$watch(watchExpressions[0],function watchGroupAction(value,oldValue,scope){newValues[0]=value;oldValues[0]=oldValue;listener(newValues,(value===oldValue)?newValues:oldValues,scope);});}forEach(watchExpressions,function(expr,i){var unwatchFn=self.$watch(expr,function watchGroupSubAction(value,oldValue){newValues[i]=value;oldValues[i]=oldValue;if(!changeReactionScheduled){changeReactionScheduled=true;self.$evalAsync(watchGroupAction);}});deregisterFns.push(unwatchFn);});function watchGroupAction(){changeReactionScheduled=false;if(firstRun){firstRun=false;listener(newValues,newValues,self);}else{listener(newValues,oldValues,self);}}return function deregisterWatchGroup(){while(deregisterFns.length){deregisterFns.shift()();}};},$watchCollection:function(obj,listener){$watchCollectionInterceptor.$stateful=true;var self=this;var newValue;var oldValue;var veryOldValue;var trackVeryOldValue=(listener.length>1);var changeDetected=0;var changeDetector=$parse(obj,$watchCollectionInterceptor);var internalArray=[];var internalObject={};var initRun=true;var oldLength=0;function $watchCollectionInterceptor(_value){newValue=_value;var newLength,key,bothNaN,newItem,oldItem;if(isUndefined(newValue))return;if(!isObject(newValue)){if(oldValue!==newValue){oldValue=newValue;changeDetected++;}}else if(isArrayLike(newValue)){if(oldValue!==internalArray){oldValue=internalArray;oldLength=oldValue.length=0;changeDetected++;}newLength=newValue.length;if(oldLength!==newLength){changeDetected++;oldValue.length=oldLength=newLength;}for(var i=0;i<newLength;i++){oldItem=oldValue[i];newItem=newValue[i];bothNaN=(oldItem!==oldItem)&&(newItem!==newItem);if(!bothNaN&&(oldItem!==newItem)){changeDetected++;oldValue[i]=newItem;}}}else{if(oldValue!==internalObject){oldValue=internalObject={};oldLength=0;changeDetected++;}newLength=0;for(key in newValue){if(newValue.hasOwnProperty(key)){newLength++;newItem=newValue[key];oldItem=oldValue[key];if(key in oldValue){bothNaN=(oldItem!==oldItem)&&(newItem!==newItem);if(!bothNaN&&(oldItem!==newItem)){changeDetected++;oldValue[key]=newItem;}}else{oldLength++;oldValue[key]=newItem;changeDetected++;}}}if(oldLength>newLength){changeDetected++;for(key in oldValue){if(!newValue.hasOwnProperty(key)){oldLength--;delete oldValue[key];}}}}return changeDetected;}function $watchCollectionAction(){if(initRun){initRun=false;listener(newValue,newValue,self);}else{listener(newValue,veryOldValue,self);}if(trackVeryOldValue){if(!isObject(newValue)){veryOldValue=newValue;}else if(isArrayLike(newValue)){veryOldValue=new Array(newValue.length);for(var i=0;i<newValue.length;i++){veryOldValue[i]=newValue[i];}}else{veryOldValue={};for(var key in newValue){if(hasOwnProperty.call(newValue,key)){veryOldValue[key]=newValue[key];}}}}}return this.$watch(changeDetector,$watchCollectionAction);},$digest:function(){var watch,value,last,watchers,length,dirty,ttl=TTL,next,current,target=this,watchLog=[],logIdx,logMsg,asyncTask;beginPhase('$digest');$browser.$$checkUrlChange();if(this===$rootScope&&applyAsyncId!==null){$browser.defer.cancel(applyAsyncId);flushApplyAsync();}lastDirtyWatch=null;do{dirty=false;current=target;while(asyncQueue.length){try{asyncTask=asyncQueue.shift();asyncTask.scope.$eval(asyncTask.expression,asyncTask.locals);}catch(e){$exceptionHandler(e);}lastDirtyWatch=null;}traverseScopesLoop:do{if((watchers=current.$$watchers)){length=watchers.length;while(length--){try{watch=watchers[length];if(watch){if((value=watch.get(current))!==(last=watch.last)&&!(watch.eq?equals(value,last):(typeof value==='number'&&typeof last==='number'&&isNaN(value)&&isNaN(last)))){dirty=true;lastDirtyWatch=watch;watch.last=watch.eq?copy(value,null):value;watch.fn(value,((last===initWatchVal)?value:last),current);if(ttl<5){logIdx=4-ttl;if(!watchLog[logIdx])watchLog[logIdx]=[];watchLog[logIdx].push({msg:isFunction(watch.exp)?'fn: '+(watch.exp.name||watch.exp.toString()):watch.exp,newVal:value,oldVal:last});}}else if(watch===lastDirtyWatch){dirty=false;break traverseScopesLoop;}}}catch(e){$exceptionHandler(e);}}}if(!(next=(current.$$childHead||(current!==target&&current.$$nextSibling)))){while(current!==target&&!(next=current.$$nextSibling)){current=current.$parent;}}}while((current=next));if((dirty||asyncQueue.length)&&!(ttl--)){clearPhase();throw $rootScopeMinErr('infdig','{0} $digest() iterations reached. Aborting!\n'+'Watchers fired in the last 5 iterations: {1}',TTL,watchLog);}}while(dirty||asyncQueue.length);clearPhase();while(postDigestQueue.length){try{postDigestQueue.shift()();}catch(e){$exceptionHandler(e);}}},$destroy:function(){if(this.$$destroyed)return;var parent=this.$parent;this.$broadcast('$destroy');this.$$destroyed=true;if(this===$rootScope)return;for(var eventName in this.$$listenerCount){decrementListenerCount(this,this.$$listenerCount[eventName],eventName);}if(parent.$$childHead==this)parent.$$childHead=this.$$nextSibling;if(parent.$$childTail==this)parent.$$childTail=this.$$prevSibling;if(this.$$prevSibling)this.$$prevSibling.$$nextSibling=this.$$nextSibling;if(this.$$nextSibling)this.$$nextSibling.$$prevSibling=this.$$prevSibling;this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=noop;this.$on=this.$watch=this.$watchGroup=function(){return noop;};this.$$listeners={};this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null;},$eval:function(expr,locals){return $parse(expr)(this,locals);},$evalAsync:function(expr,locals){if(!$rootScope.$$phase&&!asyncQueue.length){$browser.defer(function(){if(asyncQueue.length){$rootScope.$digest();}});}asyncQueue.push({scope:this,expression:expr,locals:locals});},$$postDigest:function(fn){postDigestQueue.push(fn);},$apply:function(expr){try{beginPhase('$apply');return this.$eval(expr);}catch(e){$exceptionHandler(e);}finally{clearPhase();try{$rootScope.$digest();}catch(e){$exceptionHandler(e);throw e;}}},$applyAsync:function(expr){var scope=this;expr&&applyAsyncQueue.push($applyAsyncExpression);scheduleApplyAsync();function $applyAsyncExpression(){scope.$eval(expr);}},$on:function(name,listener){var namedListeners=this.$$listeners[name];if(!namedListeners){this.$$listeners[name]=namedListeners=[];}namedListeners.push(listener);var current=this;do{if(!current.$$listenerCount[name]){current.$$listenerCount[name]=0;}current.$$listenerCount[name]++;}while((current=current.$parent));var self=this;return function(){var indexOfListener=namedListeners.indexOf(listener);if(indexOfListener!==-1){namedListeners[indexOfListener]=null;decrementListenerCount(self,1,name);}};},$emit:function(name,args){var empty=[],namedListeners,scope=this,stopPropagation=false,event={name:name,targetScope:scope,stopPropagation:function(){stopPropagation=true;},preventDefault:function(){event.defaultPrevented=true;},defaultPrevented:false},listenerArgs=concat([event],arguments,1),i,length;do{namedListeners=scope.$$listeners[name]||empty;event.currentScope=scope;for(i=0,length=namedListeners.length;i<length;i++){if(!namedListeners[i]){namedListeners.splice(i,1);i--;length--;continue;}try{namedListeners[i].apply(null,listenerArgs);}catch(e){$exceptionHandler(e);}}if(stopPropagation){event.currentScope=null;return event;}scope=scope.$parent;}while(scope);event.currentScope=null;return event;},$broadcast:function(name,args){var target=this,current=target,next=target,event={name:name,targetScope:target,preventDefault:function(){event.defaultPrevented=true;},defaultPrevented:false};if(!target.$$listenerCount[name])return event;var listenerArgs=concat([event],arguments,1),listeners,i,length;while((current=next)){event.currentScope=current;listeners=current.$$listeners[name]||[];for(i=0,length=listeners.length;i<length;i++){if(!listeners[i]){listeners.splice(i,1);i--;length--;continue;}try{listeners[i].apply(null,listenerArgs);}catch(e){$exceptionHandler(e);}}if(!(next=((current.$$listenerCount[name]&&current.$$childHead)||(current!==target&&current.$$nextSibling)))){while(current!==target&&!(next=current.$$nextSibling)){current=current.$parent;}}}event.currentScope=null;return event;}};var $rootScope=new Scope();var asyncQueue=$rootScope.$$asyncQueue=[];var postDigestQueue=$rootScope.$$postDigestQueue=[];var applyAsyncQueue=$rootScope.$$applyAsyncQueue=[];return $rootScope;function beginPhase(phase){if($rootScope.$$phase){throw $rootScopeMinErr('inprog','{0} already in progress',$rootScope.$$phase);}$rootScope.$$phase=phase;}function clearPhase(){$rootScope.$$phase=null;}function decrementListenerCount(current,count,name){do{current.$$listenerCount[name]-=count;if(current.$$listenerCount[name]===0){delete current.$$listenerCount[name];}}while((current=current.$parent));}function initWatchVal(){}function flushApplyAsync(){while(applyAsyncQueue.length){try{applyAsyncQueue.shift()();}catch(e){$exceptionHandler(e);}}applyAsyncId=null;}function scheduleApplyAsync(){if(applyAsyncId===null){applyAsyncId=$browser.defer(function(){$rootScope.$apply(flushApplyAsync);});}}}];}function $$SanitizeUriProvider(){var aHrefSanitizationWhitelist=/^\s*(https?|ftp|mailto|tel|file):/,imgSrcSanitizationWhitelist=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(regexp){if(isDefined(regexp)){aHrefSanitizationWhitelist=regexp;return this;}return aHrefSanitizationWhitelist;};this.imgSrcSanitizationWhitelist=function(regexp){if(isDefined(regexp)){imgSrcSanitizationWhitelist=regexp;return this;}return imgSrcSanitizationWhitelist;};this.$get=function(){return function sanitizeUri(uri,isImage){var regex=isImage?imgSrcSanitizationWhitelist:aHrefSanitizationWhitelist;var normalizedVal;normalizedVal=urlResolve(uri).href;if(normalizedVal!==''&&!normalizedVal.match(regex)){return'unsafe:'+normalizedVal;}return uri;};};}var $sceMinErr=minErr('$sce');var SCE_CONTEXTS={HTML:'html',CSS:'css',URL:'url',RESOURCE_URL:'resourceUrl',JS:'js'};function adjustMatcher(matcher){if(matcher==='self'){return matcher;}else if(isString(matcher)){if(matcher.indexOf('***')>-1){throw $sceMinErr('iwcard','Illegal sequence *** in string matcher. String: {0}',matcher);}matcher=escapeForRegexp(matcher).replace('\\*\\*','.*').replace('\\*','[^:/.?&;]*');return new RegExp('^'+matcher+'$');}else if(isRegExp(matcher)){return new RegExp('^'+matcher.source+'$');}else{throw $sceMinErr('imatcher','Matchers may only be "self", string patterns or RegExp objects');}}function adjustMatchers(matchers){var adjustedMatchers=[];if(isDefined(matchers)){forEach(matchers,function(matcher){adjustedMatchers.push(adjustMatcher(matcher));});}return adjustedMatchers;}function $SceDelegateProvider(){this.SCE_CONTEXTS=SCE_CONTEXTS;var resourceUrlWhitelist=['self'],resourceUrlBlacklist=[];this.resourceUrlWhitelist=function(value){if(arguments.length){resourceUrlWhitelist=adjustMatchers(value);}return resourceUrlWhitelist;};this.resourceUrlBlacklist=function(value){if(arguments.length){resourceUrlBlacklist=adjustMatchers(value);}return resourceUrlBlacklist;};this.$get=['$injector',function($injector){var htmlSanitizer=function htmlSanitizer(html){throw $sceMinErr('unsafe','Attempting to use an unsafe value in a safe context.');};if($injector.has('$sanitize')){htmlSanitizer=$injector.get('$sanitize');}function matchUrl(matcher,parsedUrl){if(matcher==='self'){return urlIsSameOrigin(parsedUrl);}else{return!!matcher.exec(parsedUrl.href);}}function isResourceUrlAllowedByPolicy(url){var parsedUrl=urlResolve(url.toString());var i,n,allowed=false;for(i=0,n=resourceUrlWhitelist.length;i<n;i++){if(matchUrl(resourceUrlWhitelist[i],parsedUrl)){allowed=true;break;}}if(allowed){for(i=0,n=resourceUrlBlacklist.length;i<n;i++){if(matchUrl(resourceUrlBlacklist[i],parsedUrl)){allowed=false;break;}}}return allowed;}function generateHolderType(Base){var holderType=function TrustedValueHolderType(trustedValue){this.$$unwrapTrustedValue=function(){return trustedValue;};};if(Base){holderType.prototype=new Base();}holderType.prototype.valueOf=function sceValueOf(){return this.$$unwrapTrustedValue();};holderType.prototype.toString=function sceToString(){return this.$$unwrapTrustedValue().toString();};return holderType;}var trustedValueHolderBase=generateHolderType(),byType={};byType[SCE_CONTEXTS.HTML]=generateHolderType(trustedValueHolderBase);byType[SCE_CONTEXTS.CSS]=generateHolderType(trustedValueHolderBase);byType[SCE_CONTEXTS.URL]=generateHolderType(trustedValueHolderBase);byType[SCE_CONTEXTS.JS]=generateHolderType(trustedValueHolderBase);byType[SCE_CONTEXTS.RESOURCE_URL]=generateHolderType(byType[SCE_CONTEXTS.URL]);function trustAs(type,trustedValue){var Constructor=(byType.hasOwnProperty(type)?byType[type]:null);if(!Constructor){throw $sceMinErr('icontext','Attempted to trust a value in invalid context. Context: {0}; Value: {1}',type,trustedValue);}if(trustedValue===null||trustedValue===undefined||trustedValue===''){return trustedValue;}if(typeof trustedValue!=='string'){throw $sceMinErr('itype','Attempted to trust a non-string value in a content requiring a string: Context: {0}',type);}return new Constructor(trustedValue);}function valueOf(maybeTrusted){if(maybeTrusted instanceof trustedValueHolderBase){return maybeTrusted.$$unwrapTrustedValue();}else{return maybeTrusted;}}function getTrusted(type,maybeTrusted){if(maybeTrusted===null||maybeTrusted===undefined||maybeTrusted===''){return maybeTrusted;}var constructor=(byType.hasOwnProperty(type)?byType[type]:null);if(constructor&&maybeTrusted instanceof constructor){return maybeTrusted.$$unwrapTrustedValue();}if(type===SCE_CONTEXTS.RESOURCE_URL){if(isResourceUrlAllowedByPolicy(maybeTrusted)){return maybeTrusted;}else{throw $sceMinErr('insecurl','Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}',maybeTrusted.toString());}}else if(type===SCE_CONTEXTS.HTML){return htmlSanitizer(maybeTrusted);}throw $sceMinErr('unsafe','Attempting to use an unsafe value in a safe context.');}return{trustAs:trustAs,getTrusted:getTrusted,valueOf:valueOf};}];}function $SceProvider(){var enabled=true;this.enabled=function(value){if(arguments.length){enabled=!!value;}return enabled;};this.$get=['$parse','$sceDelegate',function($parse,$sceDelegate){if(enabled&&msie<8){throw $sceMinErr('iequirks','Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks '+'mode. You can fix this by adding the text <!doctype html> to the top of your HTML '+'document. See http://docs.angularjs.org/api/ng.$sce for more information.');}var sce=shallowCopy(SCE_CONTEXTS);sce.isEnabled=function(){return enabled;};sce.trustAs=$sceDelegate.trustAs;sce.getTrusted=$sceDelegate.getTrusted;sce.valueOf=$sceDelegate.valueOf;if(!enabled){sce.trustAs=sce.getTrusted=function(type,value){return value;};sce.valueOf=identity;}sce.parseAs=function sceParseAs(type,expr){var parsed=$parse(expr);if(parsed.literal&&parsed.constant){return parsed;}else{return $parse(expr,function(value){return sce.getTrusted(type,value);});}};var parse=sce.parseAs,getTrusted=sce.getTrusted,trustAs=sce.trustAs;forEach(SCE_CONTEXTS,function(enumValue,name){var lName=lowercase(name);sce[camelCase("parse_as_"+lName)]=function(expr){return parse(enumValue,expr);};sce[camelCase("get_trusted_"+lName)]=function(value){return getTrusted(enumValue,value);};sce[camelCase("trust_as_"+lName)]=function(value){return trustAs(enumValue,value);};});return sce;}];}function $SnifferProvider(){this.$get=['$window','$document',function($window,$document){var eventSupport={},android=int((/android (\d+)/.exec(lowercase(($window.navigator||{}).userAgent))||[])[1]),boxee=/Boxee/i.test(($window.navigator||{}).userAgent),document=$document[0]||{},vendorPrefix,vendorRegex=/^(Moz|webkit|ms)(?=[A-Z])/,bodyStyle=document.body&&document.body.style,transitions=false,animations=false,match;if(bodyStyle){for(var prop in bodyStyle){if(match=vendorRegex.exec(prop)){vendorPrefix=match[0];vendorPrefix=vendorPrefix.substr(0,1).toUpperCase()+vendorPrefix.substr(1);break;}}if(!vendorPrefix){vendorPrefix=('WebkitOpacity'in bodyStyle)&&'webkit';}transitions=!!(('transition'in bodyStyle)||(vendorPrefix+'Transition'in bodyStyle));animations=!!(('animation'in bodyStyle)||(vendorPrefix+'Animation'in bodyStyle));if(android&&(!transitions||!animations)){transitions=isString(document.body.style.webkitTransition);animations=isString(document.body.style.webkitAnimation);}}return{history:!!($window.history&&$window.history.pushState&&!(android<4)&&!boxee),hasEvent:function(event){if(event==='input'&&msie<=11)return false;if(isUndefined(eventSupport[event])){var divElm=document.createElement('div');eventSupport[event]='on'+event in divElm;}return eventSupport[event];},csp:csp(),vendorPrefix:vendorPrefix,transitions:transitions,animations:animations,android:android};}];}var $compileMinErr=minErr('$compile');function $TemplateRequestProvider(){this.$get=['$templateCache','$http','$q',function($templateCache,$http,$q){function handleRequestFn(tpl,ignoreRequestError){handleRequestFn.totalPendingRequests++;var transformResponse=$http.defaults&&$http.defaults.transformResponse;if(isArray(transformResponse)){transformResponse=transformResponse.filter(function(transformer){return transformer!==defaultHttpResponseTransform;});}else if(transformResponse===defaultHttpResponseTransform){transformResponse=null;}var httpOptions={cache:$templateCache,transformResponse:transformResponse};return $http.get(tpl,httpOptions).finally(function(){handleRequestFn.totalPendingRequests--;}).then(function(response){return response.data;},handleError);function handleError(resp){if(!ignoreRequestError){throw $compileMinErr('tpload','Failed to load template: {0}',tpl);}return $q.reject(resp);}}handleRequestFn.totalPendingRequests=0;return handleRequestFn;}];}function $$TestabilityProvider(){this.$get=['$rootScope','$browser','$location',function($rootScope,$browser,$location){var testability={};testability.findBindings=function(element,expression,opt_exactMatch){var bindings=element.getElementsByClassName('ng-binding');var matches=[];forEach(bindings,function(binding){var dataBinding=angular.element(binding).data('$binding');if(dataBinding){forEach(dataBinding,function(bindingName){if(opt_exactMatch){var matcher=new RegExp('(^|\\s)'+escapeForRegexp(expression)+'(\\s|\\||$)');if(matcher.test(bindingName)){matches.push(binding);}}else{if(bindingName.indexOf(expression)!=-1){matches.push(binding);}}});}});return matches;};testability.findModels=function(element,expression,opt_exactMatch){var prefixes=['ng-','data-ng-','ng\\:'];for(var p=0;p<prefixes.length;++p){var attributeEquals=opt_exactMatch?'=':'*=';var selector='['+prefixes[p]+'model'+attributeEquals+'"'+expression+'"]';var elements=element.querySelectorAll(selector);if(elements.length){return elements;}}};testability.getLocation=function(){return $location.url();};testability.setLocation=function(url){if(url!==$location.url()){$location.url(url);$rootScope.$digest();}};testability.whenStable=function(callback){$browser.notifyWhenNoOutstandingRequests(callback);};return testability;}];}function $TimeoutProvider(){this.$get=['$rootScope','$browser','$q','$$q','$exceptionHandler',function($rootScope,$browser,$q,$$q,$exceptionHandler){var deferreds={};function timeout(fn,delay,invokeApply){var skipApply=(isDefined(invokeApply)&&!invokeApply),deferred=(skipApply?$$q:$q).defer(),promise=deferred.promise,timeoutId;timeoutId=$browser.defer(function(){try{deferred.resolve(fn());}catch(e){deferred.reject(e);$exceptionHandler(e);}finally{delete deferreds[promise.$$timeoutId];}if(!skipApply)$rootScope.$apply();},delay);promise.$$timeoutId=timeoutId;deferreds[timeoutId]=deferred;return promise;}timeout.cancel=function(promise){if(promise&&promise.$$timeoutId in deferreds){deferreds[promise.$$timeoutId].reject('canceled');delete deferreds[promise.$$timeoutId];return $browser.defer.cancel(promise.$$timeoutId);}return false;};return timeout;}];}var urlParsingNode=document.createElement("a");var originUrl=urlResolve(window.location.href);function urlResolve(url){var href=url;if(msie){urlParsingNode.setAttribute("href",href);href=urlParsingNode.href;}urlParsingNode.setAttribute('href',href);return{href:urlParsingNode.href,protocol:urlParsingNode.protocol?urlParsingNode.protocol.replace(/:$/,''):'',host:urlParsingNode.host,search:urlParsingNode.search?urlParsingNode.search.replace(/^\?/,''):'',hash:urlParsingNode.hash?urlParsingNode.hash.replace(/^#/,''):'',hostname:urlParsingNode.hostname,port:urlParsingNode.port,pathname:(urlParsingNode.pathname.charAt(0)==='/')?urlParsingNode.pathname:'/'+urlParsingNode.pathname};}function urlIsSameOrigin(requestUrl){var parsed=(isString(requestUrl))?urlResolve(requestUrl):requestUrl;return(parsed.protocol===originUrl.protocol&&parsed.host===originUrl.host);}function $WindowProvider(){this.$get=valueFn(window);}$FilterProvider.$inject=['$provide'];function $FilterProvider($provide){var suffix='Filter';function register(name,factory){if(isObject(name)){var filters={};forEach(name,function(filter,key){filters[key]=register(key,filter);});return filters;}else{return $provide.factory(name+suffix,factory);}}this.register=register;this.$get=['$injector',function($injector){return function(name){return $injector.get(name+suffix);};}];register('currency',currencyFilter);register('date',dateFilter);register('filter',filterFilter);register('json',jsonFilter);register('limitTo',limitToFilter);register('lowercase',lowercaseFilter);register('number',numberFilter);register('orderBy',orderByFilter);register('uppercase',uppercaseFilter);}function filterFilter(){return function(array,expression,comparator){if(!isArray(array))return array;var predicateFn;var matchAgainstAnyProp;switch(typeof expression){case'function':predicateFn=expression;break;case'boolean':case'number':case'string':matchAgainstAnyProp=true;case'object':predicateFn=createPredicateFn(expression,comparator,matchAgainstAnyProp);break;default:return array;}return array.filter(predicateFn);};}function createPredicateFn(expression,comparator,matchAgainstAnyProp){var shouldMatchPrimitives=isObject(expression)&&('$'in expression);var predicateFn;if(comparator===true){comparator=equals;}else if(!isFunction(comparator)){comparator=function(actual,expected){if(isObject(actual)||isObject(expected)){return false;}actual=lowercase(''+actual);expected=lowercase(''+expected);return actual.indexOf(expected)!==-1;};}predicateFn=function(item){if(shouldMatchPrimitives&&!isObject(item)){return deepCompare(item,expression.$,comparator,false);}return deepCompare(item,expression,comparator,matchAgainstAnyProp);};return predicateFn;}function deepCompare(actual,expected,comparator,matchAgainstAnyProp,dontMatchWholeObject){var actualType=typeof actual;var expectedType=typeof expected;if((expectedType==='string')&&(expected.charAt(0)==='!')){return!deepCompare(actual,expected.substring(1),comparator,matchAgainstAnyProp);}else if(isArray(actual)){return actual.some(function(item){return deepCompare(item,expected,comparator,matchAgainstAnyProp);});}switch(actualType){case'object':var key;if(matchAgainstAnyProp){for(key in actual){if((key.charAt(0)!=='$')&&deepCompare(actual[key],expected,comparator,true)){return true;}}return dontMatchWholeObject?false:deepCompare(actual,expected,comparator,false);}else if(expectedType==='object'){for(key in expected){var expectedVal=expected[key];if(isFunction(expectedVal)){continue;}var matchAnyProperty=key==='$';var actualVal=matchAnyProperty?actual:actual[key];if(!deepCompare(actualVal,expectedVal,comparator,matchAnyProperty,matchAnyProperty)){return false;}}return true;}else{return comparator(actual,expected);}break;case'function':return false;default:return comparator(actual,expected);}}currencyFilter.$inject=['$locale'];function currencyFilter($locale){var formats=$locale.NUMBER_FORMATS;return function(amount,currencySymbol,fractionSize){if(isUndefined(currencySymbol)){currencySymbol=formats.CURRENCY_SYM;}if(isUndefined(fractionSize)){fractionSize=formats.PATTERNS[1].maxFrac;}return(amount==null)?amount:formatNumber(amount,formats.PATTERNS[1],formats.GROUP_SEP,formats.DECIMAL_SEP,fractionSize).replace(/\u00A4/g,currencySymbol);};}numberFilter.$inject=['$locale'];function numberFilter($locale){var formats=$locale.NUMBER_FORMATS;return function(number,fractionSize){return(number==null)?number:formatNumber(number,formats.PATTERNS[0],formats.GROUP_SEP,formats.DECIMAL_SEP,fractionSize);};}var DECIMAL_SEP='.';function formatNumber(number,pattern,groupSep,decimalSep,fractionSize){if(!isFinite(number)||isObject(number))return'';var isNegative=number<0;number=Math.abs(number);var numStr=number+'',formatedText='',parts=[];var hasExponent=false;if(numStr.indexOf('e')!==-1){var match=numStr.match(/([\d\.]+)e(-?)(\d+)/);if(match&&match[2]=='-'&&match[3]>fractionSize+1){number=0;}else{formatedText=numStr;hasExponent=true;}}if(!hasExponent){var fractionLen=(numStr.split(DECIMAL_SEP)[1]||'').length;if(isUndefined(fractionSize)){fractionSize=Math.min(Math.max(pattern.minFrac,fractionLen),pattern.maxFrac);}number=+(Math.round(+(number.toString()+'e'+fractionSize)).toString()+'e'+-fractionSize);var fraction=(''+number).split(DECIMAL_SEP);var whole=fraction[0];fraction=fraction[1]||'';var i,pos=0,lgroup=pattern.lgSize,group=pattern.gSize;if(whole.length>=(lgroup+group)){pos=whole.length-lgroup;for(i=0;i<pos;i++){if((pos-i)%group===0&&i!==0){formatedText+=groupSep;}formatedText+=whole.charAt(i);}}for(i=pos;i<whole.length;i++){if((whole.length-i)%lgroup===0&&i!==0){formatedText+=groupSep;}formatedText+=whole.charAt(i);}while(fraction.length<fractionSize){fraction+='0';}if(fractionSize&&fractionSize!=="0")formatedText+=decimalSep+fraction.substr(0,fractionSize);}else{if(fractionSize>0&&number<1){formatedText=number.toFixed(fractionSize);number=parseFloat(formatedText);}}if(number===0){isNegative=false;}parts.push(isNegative?pattern.negPre:pattern.posPre,formatedText,isNegative?pattern.negSuf:pattern.posSuf);return parts.join('');}function padNumber(num,digits,trim){var neg='';if(num<0){neg='-';num=-num;}num=''+num;while(num.length<digits)num='0'+num;if(trim)num=num.substr(num.length-digits);return neg+num;}function dateGetter(name,size,offset,trim){offset=offset||0;return function(date){var value=date['get'+name]();if(offset>0||value>-offset)value+=offset;if(value===0&&offset==-12)value=12;return padNumber(value,size,trim);};}function dateStrGetter(name,shortForm){return function(date,formats){var value=date['get'+name]();var get=uppercase(shortForm?('SHORT'+name):name);return formats[get][value];};}function timeZoneGetter(date){var zone=-1*date.getTimezoneOffset();var paddedZone=(zone>=0)?"+":"";paddedZone+=padNumber(Math[zone>0?'floor':'ceil'](zone/60),2)+padNumber(Math.abs(zone%60),2);return paddedZone;}function getFirstThursdayOfYear(year){var dayOfWeekOnFirst=(new Date(year,0,1)).getDay();return new Date(year,0,((dayOfWeekOnFirst<=4)?5:12)-dayOfWeekOnFirst);}function getThursdayThisWeek(datetime){return new Date(datetime.getFullYear(),datetime.getMonth(),datetime.getDate()+(4-datetime.getDay()));}function weekGetter(size){return function(date){var firstThurs=getFirstThursdayOfYear(date.getFullYear()),thisThurs=getThursdayThisWeek(date);var diff=+thisThurs-+firstThurs,result=1+Math.round(diff/6.048e8);return padNumber(result,size);};}function ampmGetter(date,formats){return date.getHours()<12?formats.AMPMS[0]:formats.AMPMS[1];}var DATE_FORMATS={yyyy:dateGetter('FullYear',4),yy:dateGetter('FullYear',2,0,true),y:dateGetter('FullYear',1),MMMM:dateStrGetter('Month'),MMM:dateStrGetter('Month',true),MM:dateGetter('Month',2,1),M:dateGetter('Month',1,1),dd:dateGetter('Date',2),d:dateGetter('Date',1),HH:dateGetter('Hours',2),H:dateGetter('Hours',1),hh:dateGetter('Hours',2,-12),h:dateGetter('Hours',1,-12),mm:dateGetter('Minutes',2),m:dateGetter('Minutes',1),ss:dateGetter('Seconds',2),s:dateGetter('Seconds',1),sss:dateGetter('Milliseconds',3),EEEE:dateStrGetter('Day'),EEE:dateStrGetter('Day',true),a:ampmGetter,Z:timeZoneGetter,ww:weekGetter(2),w:weekGetter(1)};var DATE_FORMATS_SPLIT=/((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,NUMBER_STRING=/^\-?\d+$/;dateFilter.$inject=['$locale'];function dateFilter($locale){var R_ISO8601_STR=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;function jsonStringToDate(string){var match;if(match=string.match(R_ISO8601_STR)){var date=new Date(0),tzHour=0,tzMin=0,dateSetter=match[8]?date.setUTCFullYear:date.setFullYear,timeSetter=match[8]?date.setUTCHours:date.setHours;if(match[9]){tzHour=int(match[9]+match[10]);tzMin=int(match[9]+match[11]);}dateSetter.call(date,int(match[1]),int(match[2])-1,int(match[3]));var h=int(match[4]||0)-tzHour;var m=int(match[5]||0)-tzMin;var s=int(match[6]||0);var ms=Math.round(parseFloat('0.'+(match[7]||0))*1000);timeSetter.call(date,h,m,s,ms);return date;}return string;}return function(date,format,timezone){var text='',parts=[],fn,match;format=format||'mediumDate';format=$locale.DATETIME_FORMATS[format]||format;if(isString(date)){date=NUMBER_STRING.test(date)?int(date):jsonStringToDate(date);}if(isNumber(date)){date=new Date(date);}if(!isDate(date)){return date;}while(format){match=DATE_FORMATS_SPLIT.exec(format);if(match){parts=concat(parts,match,1);format=parts.pop();}else{parts.push(format);format=null;}}if(timezone&&timezone==='UTC'){date=new Date(date.getTime());date.setMinutes(date.getMinutes()+date.getTimezoneOffset());}forEach(parts,function(value){fn=DATE_FORMATS[value];text+=fn?fn(date,$locale.DATETIME_FORMATS):value.replace(/(^'|'$)/g,'').replace(/''/g,"'");});return text;};}function jsonFilter(){return function(object,spacing){if(isUndefined(spacing)){spacing=2;}return toJson(object,spacing);};}var lowercaseFilter=valueFn(lowercase);var uppercaseFilter=valueFn(uppercase);function limitToFilter(){return function(input,limit){if(isNumber(input))input=input.toString();if(!isArray(input)&&!isString(input))return input;if(Math.abs(Number(limit))===Infinity){limit=Number(limit);}else{limit=int(limit);}if(limit){return limit>0?input.slice(0,limit):input.slice(limit);}else{return isString(input)?"":[];}};}orderByFilter.$inject=['$parse'];function orderByFilter($parse){return function(array,sortPredicate,reverseOrder){if(!(isArrayLike(array)))return array;sortPredicate=isArray(sortPredicate)?sortPredicate:[sortPredicate];if(sortPredicate.length===0){sortPredicate=['+'];}sortPredicate=sortPredicate.map(function(predicate){var descending=false,get=predicate||identity;if(isString(predicate)){if((predicate.charAt(0)=='+'||predicate.charAt(0)=='-')){descending=predicate.charAt(0)=='-';predicate=predicate.substring(1);}if(predicate===''){return reverseComparator(compare,descending);}get=$parse(predicate);if(get.constant){var key=get();return reverseComparator(function(a,b){return compare(a[key],b[key]);},descending);}}return reverseComparator(function(a,b){return compare(get(a),get(b));},descending);});return slice.call(array).sort(reverseComparator(comparator,reverseOrder));function comparator(o1,o2){for(var i=0;i<sortPredicate.length;i++){var comp=sortPredicate[i](o1,o2);if(comp!==0)return comp;}return 0;}function reverseComparator(comp,descending){return descending?function(a,b){return comp(b,a);}:comp;}function isPrimitive(value){switch(typeof value){case'number':case'boolean':case'string':return true;default:return false;}}function objectToString(value){if(value===null)return'null';if(typeof value.valueOf==='function'){value=value.valueOf();if(isPrimitive(value))return value;}if(typeof value.toString==='function'){value=value.toString();if(isPrimitive(value))return value;}return'';}function compare(v1,v2){var t1=typeof v1;var t2=typeof v2;if(t1===t2&&t1==="object"){v1=objectToString(v1);v2=objectToString(v2);}if(t1===t2){if(t1==="string"){v1=v1.toLowerCase();v2=v2.toLowerCase();}if(v1===v2)return 0;return v1<v2?-1:1;}else{return t1<t2?-1:1;}}};}function ngDirective(directive){if(isFunction(directive)){directive={link:directive};}directive.restrict=directive.restrict||'AC';return valueFn(directive);}var htmlAnchorDirective=valueFn({restrict:'E',compile:function(element,attr){if(!attr.href&&!attr.xlinkHref&&!attr.name){return function(scope,element){if(element[0].nodeName.toLowerCase()!=='a')return;var href=toString.call(element.prop('href'))==='[object SVGAnimatedString]'?'xlink:href':'href';element.on('click',function(event){if(!element.attr(href)){event.preventDefault();}});};}}});var ngAttributeAliasDirectives={};forEach(BOOLEAN_ATTR,function(propName,attrName){if(propName=="multiple")return;var normalized=directiveNormalize('ng-'+attrName);ngAttributeAliasDirectives[normalized]=function(){return{restrict:'A',priority:100,link:function(scope,element,attr){scope.$watch(attr[normalized],function ngBooleanAttrWatchAction(value){attr.$set(attrName,!!value);});}};};});forEach(ALIASED_ATTR,function(htmlAttr,ngAttr){ngAttributeAliasDirectives[ngAttr]=function(){return{priority:100,link:function(scope,element,attr){if(ngAttr==="ngPattern"&&attr.ngPattern.charAt(0)=="/"){var match=attr.ngPattern.match(REGEX_STRING_REGEXP);if(match){attr.$set("ngPattern",new RegExp(match[1],match[2]));return;}}scope.$watch(attr[ngAttr],function ngAttrAliasWatchAction(value){attr.$set(ngAttr,value);});}};};});forEach(['src','srcset','href'],function(attrName){var normalized=directiveNormalize('ng-'+attrName);ngAttributeAliasDirectives[normalized]=function(){return{priority:99,link:function(scope,element,attr){var propName=attrName,name=attrName;if(attrName==='href'&&toString.call(element.prop('href'))==='[object SVGAnimatedString]'){name='xlinkHref';attr.$attr[name]='xlink:href';propName=null;}attr.$observe(normalized,function(value){if(!value){if(attrName==='href'){attr.$set(name,null);}return;}attr.$set(name,value);if(msie&&propName)element.prop(propName,attr[name]);});}};};});var nullFormCtrl={$addControl:noop,$$renameControl:nullFormRenameControl,$removeControl:noop,$setValidity:noop,$setDirty:noop,$setPristine:noop,$setSubmitted:noop},SUBMITTED_CLASS='ng-submitted';function nullFormRenameControl(control,name){control.$name=name;}FormController.$inject=['$element','$attrs','$scope','$animate','$interpolate'];function FormController(element,attrs,$scope,$animate,$interpolate){var form=this,controls=[];var parentForm=form.$$parentForm=element.parent().controller('form')||nullFormCtrl;form.$error={};form.$$success={};form.$pending=undefined;form.$name=$interpolate(attrs.name||attrs.ngForm||'')($scope);form.$dirty=false;form.$pristine=true;form.$valid=true;form.$invalid=false;form.$submitted=false;parentForm.$addControl(form);form.$rollbackViewValue=function(){forEach(controls,function(control){control.$rollbackViewValue();});};form.$commitViewValue=function(){forEach(controls,function(control){control.$commitViewValue();});};form.$addControl=function(control){assertNotHasOwnProperty(control.$name,'input');controls.push(control);if(control.$name){form[control.$name]=control;}};form.$$renameControl=function(control,newName){var oldName=control.$name;if(form[oldName]===control){delete form[oldName];}form[newName]=control;control.$name=newName;};form.$removeControl=function(control){if(control.$name&&form[control.$name]===control){delete form[control.$name];}forEach(form.$pending,function(value,name){form.$setValidity(name,null,control);});forEach(form.$error,function(value,name){form.$setValidity(name,null,control);});forEach(form.$$success,function(value,name){form.$setValidity(name,null,control);});arrayRemove(controls,control);};addSetValidityMethod({ctrl:this,$element:element,set:function(object,property,controller){var list=object[property];if(!list){object[property]=[controller];}else{var index=list.indexOf(controller);if(index===-1){list.push(controller);}}},unset:function(object,property,controller){var list=object[property];if(!list){return;}arrayRemove(list,controller);if(list.length===0){delete object[property];}},parentForm:parentForm,$animate:$animate});form.$setDirty=function(){$animate.removeClass(element,PRISTINE_CLASS);$animate.addClass(element,DIRTY_CLASS);form.$dirty=true;form.$pristine=false;parentForm.$setDirty();};form.$setPristine=function(){$animate.setClass(element,PRISTINE_CLASS,DIRTY_CLASS+' '+SUBMITTED_CLASS);form.$dirty=false;form.$pristine=true;form.$submitted=false;forEach(controls,function(control){control.$setPristine();});};form.$setUntouched=function(){forEach(controls,function(control){control.$setUntouched();});};form.$setSubmitted=function(){$animate.addClass(element,SUBMITTED_CLASS);form.$submitted=true;parentForm.$setSubmitted();};}var formDirectiveFactory=function(isNgForm){return['$timeout',function($timeout){var formDirective={name:'form',restrict:isNgForm?'EAC':'E',controller:FormController,compile:function ngFormCompile(formElement){formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS);return{pre:function ngFormPreLink(scope,formElement,attr,controller){if(!('action'in attr)){var handleFormSubmission=function(event){scope.$apply(function(){controller.$commitViewValue();controller.$setSubmitted();});event.preventDefault();};addEventListenerFn(formElement[0],'submit',handleFormSubmission);formElement.on('$destroy',function(){$timeout(function(){removeEventListenerFn(formElement[0],'submit',handleFormSubmission);},0,false);});}var parentFormCtrl=controller.$$parentForm,alias=controller.$name;if(alias){setter(scope,null,alias,controller,alias);attr.$observe(attr.name?'name':'ngForm',function(newValue){if(alias===newValue)return;setter(scope,null,alias,undefined,alias);alias=newValue;setter(scope,null,alias,controller,alias);parentFormCtrl.$$renameControl(controller,alias);});}formElement.on('$destroy',function(){parentFormCtrl.$removeControl(controller);if(alias){setter(scope,null,alias,undefined,alias);}extend(controller,nullFormCtrl);});}};}};return formDirective;}];};var formDirective=formDirectiveFactory();var ngFormDirective=formDirectiveFactory(true);var ISO_DATE_REGEXP=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/;var URL_REGEXP=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/;var EMAIL_REGEXP=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;var NUMBER_REGEXP=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/;var DATE_REGEXP=/^(\d{4})-(\d{2})-(\d{2})$/;var DATETIMELOCAL_REGEXP=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/;var WEEK_REGEXP=/^(\d{4})-W(\d\d)$/;var MONTH_REGEXP=/^(\d{4})-(\d\d)$/;var TIME_REGEXP=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/;var inputType={'text':textInputType,'date':createDateInputType('date',DATE_REGEXP,createDateParser(DATE_REGEXP,['yyyy','MM','dd']),'yyyy-MM-dd'),'datetime-local':createDateInputType('datetimelocal',DATETIMELOCAL_REGEXP,createDateParser(DATETIMELOCAL_REGEXP,['yyyy','MM','dd','HH','mm','ss','sss']),'yyyy-MM-ddTHH:mm:ss.sss'),'time':createDateInputType('time',TIME_REGEXP,createDateParser(TIME_REGEXP,['HH','mm','ss','sss']),'HH:mm:ss.sss'),'week':createDateInputType('week',WEEK_REGEXP,weekParser,'yyyy-Www'),'month':createDateInputType('month',MONTH_REGEXP,createDateParser(MONTH_REGEXP,['yyyy','MM']),'yyyy-MM'),'number':numberInputType,'url':urlInputType,'email':emailInputType,'radio':radioInputType,'checkbox':checkboxInputType,'hidden':noop,'button':noop,'submit':noop,'reset':noop,'file':noop};function stringBasedInputType(ctrl){ctrl.$formatters.push(function(value){return ctrl.$isEmpty(value)?value:value.toString();});}function textInputType(scope,element,attr,ctrl,$sniffer,$browser){baseInputType(scope,element,attr,ctrl,$sniffer,$browser);stringBasedInputType(ctrl);}function baseInputType(scope,element,attr,ctrl,$sniffer,$browser){var type=lowercase(element[0].type);if(!$sniffer.android){var composing=false;element.on('compositionstart',function(data){composing=true;});element.on('compositionend',function(){composing=false;listener();});}var listener=function(ev){if(timeout){$browser.defer.cancel(timeout);timeout=null;}if(composing)return;var value=element.val(),event=ev&&ev.type;if(type!=='password'&&(!attr.ngTrim||attr.ngTrim!=='false')){value=trim(value);}if(ctrl.$viewValue!==value||(value===''&&ctrl.$$hasNativeValidators)){ctrl.$setViewValue(value,event);}};if($sniffer.hasEvent('input')){element.on('input',listener);}else{var timeout;var deferListener=function(ev,input,origValue){if(!timeout){timeout=$browser.defer(function(){timeout=null;if(!input||input.value!==origValue){listener(ev);}});}};element.on('keydown',function(event){var key=event.keyCode;if(key===91||(15<key&&key<19)||(37<=key&&key<=40))return;deferListener(event,this,this.value);});if($sniffer.hasEvent('paste')){element.on('paste cut',deferListener);}}element.on('change',listener);ctrl.$render=function(){element.val(ctrl.$isEmpty(ctrl.$viewValue)?'':ctrl.$viewValue);};}function weekParser(isoWeek,existingDate){if(isDate(isoWeek)){return isoWeek;}if(isString(isoWeek)){WEEK_REGEXP.lastIndex=0;var parts=WEEK_REGEXP.exec(isoWeek);if(parts){var year=+parts[1],week=+parts[2],hours=0,minutes=0,seconds=0,milliseconds=0,firstThurs=getFirstThursdayOfYear(year),addDays=(week-1)*7;if(existingDate){hours=existingDate.getHours();minutes=existingDate.getMinutes();seconds=existingDate.getSeconds();milliseconds=existingDate.getMilliseconds();}return new Date(year,0,firstThurs.getDate()+addDays,hours,minutes,seconds,milliseconds);}}return NaN;}function createDateParser(regexp,mapping){return function(iso,date){var parts,map;if(isDate(iso)){return iso;}if(isString(iso)){if(iso.charAt(0)=='"'&&iso.charAt(iso.length-1)=='"'){iso=iso.substring(1,iso.length-1);}if(ISO_DATE_REGEXP.test(iso)){return new Date(iso);}regexp.lastIndex=0;parts=regexp.exec(iso);if(parts){parts.shift();if(date){map={yyyy:date.getFullYear(),MM:date.getMonth()+1,dd:date.getDate(),HH:date.getHours(),mm:date.getMinutes(),ss:date.getSeconds(),sss:date.getMilliseconds()/1000};}else{map={yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0};}forEach(parts,function(part,index){if(index<mapping.length){map[mapping[index]]=+part;}});return new Date(map.yyyy,map.MM-1,map.dd,map.HH,map.mm,map.ss||0,map.sss*1000||0);}}return NaN;};}function createDateInputType(type,regexp,parseDate,format){return function dynamicDateInputType(scope,element,attr,ctrl,$sniffer,$browser,$filter){badInputChecker(scope,element,attr,ctrl);baseInputType(scope,element,attr,ctrl,$sniffer,$browser);var timezone=ctrl&&ctrl.$options&&ctrl.$options.timezone;var previousDate;ctrl.$$parserName=type;ctrl.$parsers.push(function(value){if(ctrl.$isEmpty(value))return null;if(regexp.test(value)){var parsedDate=parseDate(value,previousDate);if(timezone==='UTC'){parsedDate.setMinutes(parsedDate.getMinutes()-parsedDate.getTimezoneOffset());}return parsedDate;}return undefined;});ctrl.$formatters.push(function(value){if(value&&!isDate(value)){throw $ngModelMinErr('datefmt','Expected `{0}` to be a date',value);}if(isValidDate(value)){previousDate=value;if(previousDate&&timezone==='UTC'){var timezoneOffset=60000*previousDate.getTimezoneOffset();previousDate=new Date(previousDate.getTime()+timezoneOffset);}return $filter('date')(value,format,timezone);}else{previousDate=null;return'';}});if(isDefined(attr.min)||attr.ngMin){var minVal;ctrl.$validators.min=function(value){return!isValidDate(value)||isUndefined(minVal)||parseDate(value)>=minVal;};attr.$observe('min',function(val){minVal=parseObservedDateValue(val);ctrl.$validate();});}if(isDefined(attr.max)||attr.ngMax){var maxVal;ctrl.$validators.max=function(value){return!isValidDate(value)||isUndefined(maxVal)||parseDate(value)<=maxVal;};attr.$observe('max',function(val){maxVal=parseObservedDateValue(val);ctrl.$validate();});}function isValidDate(value){return value&&!(value.getTime&&value.getTime()!==value.getTime());}function parseObservedDateValue(val){return isDefined(val)?(isDate(val)?val:parseDate(val)):undefined;}};}function badInputChecker(scope,element,attr,ctrl){var node=element[0];var nativeValidation=ctrl.$$hasNativeValidators=isObject(node.validity);if(nativeValidation){ctrl.$parsers.push(function(value){var validity=element.prop(VALIDITY_STATE_PROPERTY)||{};return validity.badInput&&!validity.typeMismatch?undefined:value;});}}function numberInputType(scope,element,attr,ctrl,$sniffer,$browser){badInputChecker(scope,element,attr,ctrl);baseInputType(scope,element,attr,ctrl,$sniffer,$browser);ctrl.$$parserName='number';ctrl.$parsers.push(function(value){if(ctrl.$isEmpty(value))return null;if(NUMBER_REGEXP.test(value))return parseFloat(value);return undefined;});ctrl.$formatters.push(function(value){if(!ctrl.$isEmpty(value)){if(!isNumber(value)){throw $ngModelMinErr('numfmt','Expected `{0}` to be a number',value);}value=value.toString();}return value;});if(isDefined(attr.min)||attr.ngMin){var minVal;ctrl.$validators.min=function(value){return ctrl.$isEmpty(value)||isUndefined(minVal)||value>=minVal;};attr.$observe('min',function(val){if(isDefined(val)&&!isNumber(val)){val=parseFloat(val,10);}minVal=isNumber(val)&&!isNaN(val)?val:undefined;ctrl.$validate();});}if(isDefined(attr.max)||attr.ngMax){var maxVal;ctrl.$validators.max=function(value){return ctrl.$isEmpty(value)||isUndefined(maxVal)||value<=maxVal;};attr.$observe('max',function(val){if(isDefined(val)&&!isNumber(val)){val=parseFloat(val,10);}maxVal=isNumber(val)&&!isNaN(val)?val:undefined;ctrl.$validate();});}}function urlInputType(scope,element,attr,ctrl,$sniffer,$browser){baseInputType(scope,element,attr,ctrl,$sniffer,$browser);stringBasedInputType(ctrl);ctrl.$$parserName='url';ctrl.$validators.url=function(modelValue,viewValue){var value=modelValue||viewValue;return ctrl.$isEmpty(value)||URL_REGEXP.test(value);};}function emailInputType(scope,element,attr,ctrl,$sniffer,$browser){baseInputType(scope,element,attr,ctrl,$sniffer,$browser);stringBasedInputType(ctrl);ctrl.$$parserName='email';ctrl.$validators.email=function(modelValue,viewValue){var value=modelValue||viewValue;return ctrl.$isEmpty(value)||EMAIL_REGEXP.test(value);};}function radioInputType(scope,element,attr,ctrl){if(isUndefined(attr.name)){element.attr('name',nextUid());}var listener=function(ev){if(element[0].checked){ctrl.$setViewValue(attr.value,ev&&ev.type);}};element.on('click',listener);ctrl.$render=function(){var value=attr.value;element[0].checked=(value==ctrl.$viewValue);};attr.$observe('value',ctrl.$render);}function parseConstantExpr($parse,context,name,expression,fallback){var parseFn;if(isDefined(expression)){parseFn=$parse(expression);if(!parseFn.constant){throw minErr('ngModel')('constexpr','Expected constant expression for `{0}`, but saw '+'`{1}`.',name,expression);}return parseFn(context);}return fallback;}function checkboxInputType(scope,element,attr,ctrl,$sniffer,$browser,$filter,$parse){var trueValue=parseConstantExpr($parse,scope,'ngTrueValue',attr.ngTrueValue,true);var falseValue=parseConstantExpr($parse,scope,'ngFalseValue',attr.ngFalseValue,false);var listener=function(ev){ctrl.$setViewValue(element[0].checked,ev&&ev.type);};element.on('click',listener);ctrl.$render=function(){element[0].checked=ctrl.$viewValue;};ctrl.$isEmpty=function(value){return value===false;};ctrl.$formatters.push(function(value){return equals(value,trueValue);});ctrl.$parsers.push(function(value){return value?trueValue:falseValue;});}var inputDirective=['$browser','$sniffer','$filter','$parse',function($browser,$sniffer,$filter,$parse){return{restrict:'E',require:['?ngModel'],link:{pre:function(scope,element,attr,ctrls){if(ctrls[0]){(inputType[lowercase(attr.type)]||inputType.text)(scope,element,attr,ctrls[0],$sniffer,$browser,$filter,$parse);}}}};}];var CONSTANT_VALUE_REGEXP=/^(true|false|\d+)$/;var ngValueDirective=function(){return{restrict:'A',priority:100,compile:function(tpl,tplAttr){if(CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)){return function ngValueConstantLink(scope,elm,attr){attr.$set('value',scope.$eval(attr.ngValue));};}else{return function ngValueLink(scope,elm,attr){scope.$watch(attr.ngValue,function valueWatchAction(value){attr.$set('value',value);});};}}};};var ngBindDirective=['$compile',function($compile){return{restrict:'AC',compile:function ngBindCompile(templateElement){$compile.$$addBindingClass(templateElement);return function ngBindLink(scope,element,attr){$compile.$$addBindingInfo(element,attr.ngBind);element=element[0];scope.$watch(attr.ngBind,function ngBindWatchAction(value){element.textContent=value===undefined?'':value;});};}};}];var ngBindTemplateDirective=['$interpolate','$compile',function($interpolate,$compile){return{compile:function ngBindTemplateCompile(templateElement){$compile.$$addBindingClass(templateElement);return function ngBindTemplateLink(scope,element,attr){var interpolateFn=$interpolate(element.attr(attr.$attr.ngBindTemplate));$compile.$$addBindingInfo(element,interpolateFn.expressions);element=element[0];attr.$observe('ngBindTemplate',function(value){element.textContent=value===undefined?'':value;});};}};}];var ngBindHtmlDirective=['$sce','$parse','$compile',function($sce,$parse,$compile){return{restrict:'A',compile:function ngBindHtmlCompile(tElement,tAttrs){var ngBindHtmlGetter=$parse(tAttrs.ngBindHtml);var ngBindHtmlWatch=$parse(tAttrs.ngBindHtml,function getStringValue(value){return(value||'').toString();});$compile.$$addBindingClass(tElement);return function ngBindHtmlLink(scope,element,attr){$compile.$$addBindingInfo(element,attr.ngBindHtml);scope.$watch(ngBindHtmlWatch,function ngBindHtmlWatchAction(){element.html($sce.getTrustedHtml(ngBindHtmlGetter(scope))||'');});};}};}];var ngChangeDirective=valueFn({restrict:'A',require:'ngModel',link:function(scope,element,attr,ctrl){ctrl.$viewChangeListeners.push(function(){scope.$eval(attr.ngChange);});}});function classDirective(name,selector){name='ngClass'+name;return['$animate',function($animate){return{restrict:'AC',link:function(scope,element,attr){var oldVal;scope.$watch(attr[name],ngClassWatchAction,true);attr.$observe('class',function(value){ngClassWatchAction(scope.$eval(attr[name]));});if(name!=='ngClass'){scope.$watch('$index',function($index,old$index){var mod=$index&1;if(mod!==(old$index&1)){var classes=arrayClasses(scope.$eval(attr[name]));mod===selector?addClasses(classes):removeClasses(classes);}});}function addClasses(classes){var newClasses=digestClassCounts(classes,1);attr.$addClass(newClasses);}function removeClasses(classes){var newClasses=digestClassCounts(classes,-1);attr.$removeClass(newClasses);}function digestClassCounts(classes,count){var classCounts=element.data('$classCounts')||{};var classesToUpdate=[];forEach(classes,function(className){if(count>0||classCounts[className]){classCounts[className]=(classCounts[className]||0)+count;if(classCounts[className]===+(count>0)){classesToUpdate.push(className);}}});element.data('$classCounts',classCounts);return classesToUpdate.join(' ');}function updateClasses(oldClasses,newClasses){var toAdd=arrayDifference(newClasses,oldClasses);var toRemove=arrayDifference(oldClasses,newClasses);toAdd=digestClassCounts(toAdd,1);toRemove=digestClassCounts(toRemove,-1);if(toAdd&&toAdd.length){$animate.addClass(element,toAdd);}if(toRemove&&toRemove.length){$animate.removeClass(element,toRemove);}}function ngClassWatchAction(newVal){if(selector===true||scope.$index%2===selector){var newClasses=arrayClasses(newVal||[]);if(!oldVal){addClasses(newClasses);}else if(!equals(newVal,oldVal)){var oldClasses=arrayClasses(oldVal);updateClasses(oldClasses,newClasses);}}oldVal=shallowCopy(newVal);}}};function arrayDifference(tokens1,tokens2){var values=[];outer:for(var i=0;i<tokens1.length;i++){var token=tokens1[i];for(var j=0;j<tokens2.length;j++){if(token==tokens2[j])continue outer;}values.push(token);}return values;}function arrayClasses(classVal){if(isArray(classVal)){return classVal;}else if(isString(classVal)){return classVal.split(' ');}else if(isObject(classVal)){var classes=[];forEach(classVal,function(v,k){if(v){classes=classes.concat(k.split(' '));}});return classes;}return classVal;}}];}var ngClassDirective=classDirective('',true);var ngClassOddDirective=classDirective('Odd',0);var ngClassEvenDirective=classDirective('Even',1);var ngCloakDirective=ngDirective({compile:function(element,attr){attr.$set('ngCloak',undefined);element.removeClass('ng-cloak');}});var ngControllerDirective=[function(){return{restrict:'A',scope:true,controller:'@',priority:500};}];var ngEventDirectives={};var forceAsyncEvents={'blur':true,'focus':true};forEach('click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),function(eventName){var directiveName=directiveNormalize('ng-'+eventName);ngEventDirectives[directiveName]=['$parse','$rootScope',function($parse,$rootScope){return{restrict:'A',compile:function($element,attr){var fn=$parse(attr[directiveName],null,true);return function ngEventHandler(scope,element){element.on(eventName,function(event){var callback=function(){fn(scope,{$event:event});};if(forceAsyncEvents[eventName]&&$rootScope.$$phase){scope.$evalAsync(callback);}else{scope.$apply(callback);}});};}};}];});var ngIfDirective=['$animate',function($animate){return{multiElement:true,transclude:'element',priority:600,terminal:true,restrict:'A',$$tlb:true,link:function($scope,$element,$attr,ctrl,$transclude){var block,childScope,previousElements;$scope.$watch($attr.ngIf,function ngIfWatchAction(value){if(value){if(!childScope){$transclude(function(clone,newScope){childScope=newScope;clone[clone.length++]=document.createComment(' end ngIf: '+$attr.ngIf+' ');block={clone:clone};$animate.enter(clone,$element.parent(),$element);});}}else{if(previousElements){previousElements.remove();previousElements=null;}if(childScope){childScope.$destroy();childScope=null;}if(block){previousElements=getBlockNodes(block.clone);$animate.leave(previousElements).then(function(){previousElements=null;});block=null;}}});}};}];var ngIncludeDirective=['$templateRequest','$anchorScroll','$animate','$sce',function($templateRequest,$anchorScroll,$animate,$sce){return{restrict:'ECA',priority:400,terminal:true,transclude:'element',controller:angular.noop,compile:function(element,attr){var srcExp=attr.ngInclude||attr.src,onloadExp=attr.onload||'',autoScrollExp=attr.autoscroll;return function(scope,$element,$attr,ctrl,$transclude){var changeCounter=0,currentScope,previousElement,currentElement;var cleanupLastIncludeContent=function(){if(previousElement){previousElement.remove();previousElement=null;}if(currentScope){currentScope.$destroy();currentScope=null;}if(currentElement){$animate.leave(currentElement).then(function(){previousElement=null;});previousElement=currentElement;currentElement=null;}};scope.$watch($sce.parseAsResourceUrl(srcExp),function ngIncludeWatchAction(src){var afterAnimation=function(){if(isDefined(autoScrollExp)&&(!autoScrollExp||scope.$eval(autoScrollExp))){$anchorScroll();}};var thisChangeId=++changeCounter;if(src){$templateRequest(src,true).then(function(response){if(thisChangeId!==changeCounter)return;var newScope=scope.$new();ctrl.template=response;var clone=$transclude(newScope,function(clone){cleanupLastIncludeContent();$animate.enter(clone,null,$element).then(afterAnimation);});currentScope=newScope;currentElement=clone;currentScope.$emit('$includeContentLoaded',src);scope.$eval(onloadExp);},function(){if(thisChangeId===changeCounter){cleanupLastIncludeContent();scope.$emit('$includeContentError',src);}});scope.$emit('$includeContentRequested',src);}else{cleanupLastIncludeContent();ctrl.template=null;}});};}};}];var ngIncludeFillContentDirective=['$compile',function($compile){return{restrict:'ECA',priority:-400,require:'ngInclude',link:function(scope,$element,$attr,ctrl){if(/SVG/.test($element[0].toString())){$element.empty();$compile(jqLiteBuildFragment(ctrl.template,document).childNodes)(scope,function namespaceAdaptedClone(clone){$element.append(clone);},{futureParentElement:$element});return;}$element.html(ctrl.template);$compile($element.contents())(scope);}};}];var ngInitDirective=ngDirective({priority:450,compile:function(){return{pre:function(scope,element,attrs){scope.$eval(attrs.ngInit);}};}});var ngListDirective=function(){return{restrict:'A',priority:100,require:'ngModel',link:function(scope,element,attr,ctrl){var ngList=element.attr(attr.$attr.ngList)||', ';var trimValues=attr.ngTrim!=='false';var separator=trimValues?trim(ngList):ngList;var parse=function(viewValue){if(isUndefined(viewValue))return;var list=[];if(viewValue){forEach(viewValue.split(separator),function(value){if(value)list.push(trimValues?trim(value):value);});}return list;};ctrl.$parsers.push(parse);ctrl.$formatters.push(function(value){if(isArray(value)){return value.join(ngList);}return undefined;});ctrl.$isEmpty=function(value){return!value||!value.length;};}};};var VALID_CLASS='ng-valid',INVALID_CLASS='ng-invalid',PRISTINE_CLASS='ng-pristine',DIRTY_CLASS='ng-dirty',UNTOUCHED_CLASS='ng-untouched',TOUCHED_CLASS='ng-touched',PENDING_CLASS='ng-pending';var $ngModelMinErr=new minErr('ngModel');var NgModelController=['$scope','$exceptionHandler','$attrs','$element','$parse','$animate','$timeout','$rootScope','$q','$interpolate',function($scope,$exceptionHandler,$attr,$element,$parse,$animate,$timeout,$rootScope,$q,$interpolate){this.$viewValue=Number.NaN;this.$modelValue=Number.NaN;this.$$rawModelValue=undefined;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=true;this.$touched=false;this.$pristine=true;this.$dirty=false;this.$valid=true;this.$invalid=false;this.$error={};this.$$success={};this.$pending=undefined;this.$name=$interpolate($attr.name||'',false)($scope);var parsedNgModel=$parse($attr.ngModel),parsedNgModelAssign=parsedNgModel.assign,ngModelGet=parsedNgModel,ngModelSet=parsedNgModelAssign,pendingDebounce=null,parserValid,ctrl=this;this.$$setOptions=function(options){ctrl.$options=options;if(options&&options.getterSetter){var invokeModelGetter=$parse($attr.ngModel+'()'),invokeModelSetter=$parse($attr.ngModel+'($$$p)');ngModelGet=function($scope){var modelValue=parsedNgModel($scope);if(isFunction(modelValue)){modelValue=invokeModelGetter($scope);}return modelValue;};ngModelSet=function($scope,newValue){if(isFunction(parsedNgModel($scope))){invokeModelSetter($scope,{$$$p:ctrl.$modelValue});}else{parsedNgModelAssign($scope,ctrl.$modelValue);}};}else if(!parsedNgModel.assign){throw $ngModelMinErr('nonassign',"Expression '{0}' is non-assignable. Element: {1}",$attr.ngModel,startingTag($element));}};this.$render=noop;this.$isEmpty=function(value){return isUndefined(value)||value===''||value===null||value!==value;};var parentForm=$element.inheritedData('$formController')||nullFormCtrl,currentValidationRunId=0;addSetValidityMethod({ctrl:this,$element:$element,set:function(object,property){object[property]=true;},unset:function(object,property){delete object[property];},parentForm:parentForm,$animate:$animate});this.$setPristine=function(){ctrl.$dirty=false;ctrl.$pristine=true;$animate.removeClass($element,DIRTY_CLASS);$animate.addClass($element,PRISTINE_CLASS);};this.$setDirty=function(){ctrl.$dirty=true;ctrl.$pristine=false;$animate.removeClass($element,PRISTINE_CLASS);$animate.addClass($element,DIRTY_CLASS);parentForm.$setDirty();};this.$setUntouched=function(){ctrl.$touched=false;ctrl.$untouched=true;$animate.setClass($element,UNTOUCHED_CLASS,TOUCHED_CLASS);};this.$setTouched=function(){ctrl.$touched=true;ctrl.$untouched=false;$animate.setClass($element,TOUCHED_CLASS,UNTOUCHED_CLASS);};this.$rollbackViewValue=function(){$timeout.cancel(pendingDebounce);ctrl.$viewValue=ctrl.$$lastCommittedViewValue;ctrl.$render();};this.$validate=function(){if(isNumber(ctrl.$modelValue)&&isNaN(ctrl.$modelValue)){return;}var viewValue=ctrl.$$lastCommittedViewValue;var modelValue=ctrl.$$rawModelValue;var prevValid=ctrl.$valid;var prevModelValue=ctrl.$modelValue;var allowInvalid=ctrl.$options&&ctrl.$options.allowInvalid;ctrl.$$runValidators(modelValue,viewValue,function(allValid){if(!allowInvalid&&prevValid!==allValid){ctrl.$modelValue=allValid?modelValue:undefined;if(ctrl.$modelValue!==prevModelValue){ctrl.$$writeModelToScope();}}});};this.$$runValidators=function(modelValue,viewValue,doneCallback){currentValidationRunId++;var localValidationRunId=currentValidationRunId;if(!processParseErrors()){validationDone(false);return;}if(!processSyncValidators()){validationDone(false);return;}processAsyncValidators();function processParseErrors(){var errorKey=ctrl.$$parserName||'parse';if(parserValid===undefined){setValidity(errorKey,null);}else{if(!parserValid){forEach(ctrl.$validators,function(v,name){setValidity(name,null);});forEach(ctrl.$asyncValidators,function(v,name){setValidity(name,null);});}setValidity(errorKey,parserValid);return parserValid;}return true;}function processSyncValidators(){var syncValidatorsValid=true;forEach(ctrl.$validators,function(validator,name){var result=validator(modelValue,viewValue);syncValidatorsValid=syncValidatorsValid&&result;setValidity(name,result);});if(!syncValidatorsValid){forEach(ctrl.$asyncValidators,function(v,name){setValidity(name,null);});return false;}return true;}function processAsyncValidators(){var validatorPromises=[];var allValid=true;forEach(ctrl.$asyncValidators,function(validator,name){var promise=validator(modelValue,viewValue);if(!isPromiseLike(promise)){throw $ngModelMinErr("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",promise);}setValidity(name,undefined);validatorPromises.push(promise.then(function(){setValidity(name,true);},function(error){allValid=false;setValidity(name,false);}));});if(!validatorPromises.length){validationDone(true);}else{$q.all(validatorPromises).then(function(){validationDone(allValid);},noop);}}function setValidity(name,isValid){if(localValidationRunId===currentValidationRunId){ctrl.$setValidity(name,isValid);}}function validationDone(allValid){if(localValidationRunId===currentValidationRunId){doneCallback(allValid);}}};this.$commitViewValue=function(){var viewValue=ctrl.$viewValue;$timeout.cancel(pendingDebounce);if(ctrl.$$lastCommittedViewValue===viewValue&&(viewValue!==''||!ctrl.$$hasNativeValidators)){return;}ctrl.$$lastCommittedViewValue=viewValue;if(ctrl.$pristine){this.$setDirty();}this.$$parseAndValidate();};this.$$parseAndValidate=function(){var viewValue=ctrl.$$lastCommittedViewValue;var modelValue=viewValue;parserValid=isUndefined(modelValue)?undefined:true;if(parserValid){for(var i=0;i<ctrl.$parsers.length;i++){modelValue=ctrl.$parsers[i](modelValue);if(isUndefined(modelValue)){parserValid=false;break;}}}if(isNumber(ctrl.$modelValue)&&isNaN(ctrl.$modelValue)){ctrl.$modelValue=ngModelGet($scope);}var prevModelValue=ctrl.$modelValue;var allowInvalid=ctrl.$options&&ctrl.$options.allowInvalid;ctrl.$$rawModelValue=modelValue;if(allowInvalid){ctrl.$modelValue=modelValue;writeToModelIfNeeded();}ctrl.$$runValidators(modelValue,ctrl.$$lastCommittedViewValue,function(allValid){if(!allowInvalid){ctrl.$modelValue=allValid?modelValue:undefined;writeToModelIfNeeded();}});function writeToModelIfNeeded(){if(ctrl.$modelValue!==prevModelValue){ctrl.$$writeModelToScope();}}};this.$$writeModelToScope=function(){ngModelSet($scope,ctrl.$modelValue);forEach(ctrl.$viewChangeListeners,function(listener){try{listener();}catch(e){$exceptionHandler(e);}});};this.$setViewValue=function(value,trigger){ctrl.$viewValue=value;if(!ctrl.$options||ctrl.$options.updateOnDefault){ctrl.$$debounceViewValueCommit(trigger);}};this.$$debounceViewValueCommit=function(trigger){var debounceDelay=0,options=ctrl.$options,debounce;if(options&&isDefined(options.debounce)){debounce=options.debounce;if(isNumber(debounce)){debounceDelay=debounce;}else if(isNumber(debounce[trigger])){debounceDelay=debounce[trigger];}else if(isNumber(debounce['default'])){debounceDelay=debounce['default'];}}$timeout.cancel(pendingDebounce);if(debounceDelay){pendingDebounce=$timeout(function(){ctrl.$commitViewValue();},debounceDelay);}else if($rootScope.$$phase){ctrl.$commitViewValue();}else{$scope.$apply(function(){ctrl.$commitViewValue();});}};$scope.$watch(function ngModelWatch(){var modelValue=ngModelGet($scope);if(modelValue!==ctrl.$modelValue){ctrl.$modelValue=ctrl.$$rawModelValue=modelValue;parserValid=undefined;var formatters=ctrl.$formatters,idx=formatters.length;var viewValue=modelValue;while(idx--){viewValue=formatters[idx](viewValue);}if(ctrl.$viewValue!==viewValue){ctrl.$viewValue=ctrl.$$lastCommittedViewValue=viewValue;ctrl.$render();ctrl.$$runValidators(modelValue,viewValue,noop);}}return modelValue;});}];var ngModelDirective=['$rootScope',function($rootScope){return{restrict:'A',require:['ngModel','^?form','^?ngModelOptions'],controller:NgModelController,priority:1,compile:function ngModelCompile(element){element.addClass(PRISTINE_CLASS).addClass(UNTOUCHED_CLASS).addClass(VALID_CLASS);return{pre:function ngModelPreLink(scope,element,attr,ctrls){var modelCtrl=ctrls[0],formCtrl=ctrls[1]||nullFormCtrl;modelCtrl.$$setOptions(ctrls[2]&&ctrls[2].$options);formCtrl.$addControl(modelCtrl);attr.$observe('name',function(newValue){if(modelCtrl.$name!==newValue){formCtrl.$$renameControl(modelCtrl,newValue);}});scope.$on('$destroy',function(){formCtrl.$removeControl(modelCtrl);});},post:function ngModelPostLink(scope,element,attr,ctrls){var modelCtrl=ctrls[0];if(modelCtrl.$options&&modelCtrl.$options.updateOn){element.on(modelCtrl.$options.updateOn,function(ev){modelCtrl.$$debounceViewValueCommit(ev&&ev.type);});}element.on('blur',function(ev){if(modelCtrl.$touched)return;if($rootScope.$$phase){scope.$evalAsync(modelCtrl.$setTouched);}else{scope.$apply(modelCtrl.$setTouched);}});}};}};}];var DEFAULT_REGEXP=/(\s+|^)default(\s+|$)/;var ngModelOptionsDirective=function(){return{restrict:'A',controller:['$scope','$attrs',function($scope,$attrs){var that=this;this.$options=$scope.$eval($attrs.ngModelOptions);if(this.$options.updateOn!==undefined){this.$options.updateOnDefault=false;this.$options.updateOn=trim(this.$options.updateOn.replace(DEFAULT_REGEXP,function(){that.$options.updateOnDefault=true;return' ';}));}else{this.$options.updateOnDefault=true;}}]};};function addSetValidityMethod(context){var ctrl=context.ctrl,$element=context.$element,classCache={},set=context.set,unset=context.unset,parentForm=context.parentForm,$animate=context.$animate;classCache[INVALID_CLASS]=!(classCache[VALID_CLASS]=$element.hasClass(VALID_CLASS));ctrl.$setValidity=setValidity;function setValidity(validationErrorKey,state,controller){if(state===undefined){createAndSet('$pending',validationErrorKey,controller);}else{unsetAndCleanup('$pending',validationErrorKey,controller);}if(!isBoolean(state)){unset(ctrl.$error,validationErrorKey,controller);unset(ctrl.$$success,validationErrorKey,controller);}else{if(state){unset(ctrl.$error,validationErrorKey,controller);set(ctrl.$$success,validationErrorKey,controller);}else{set(ctrl.$error,validationErrorKey,controller);unset(ctrl.$$success,validationErrorKey,controller);}}if(ctrl.$pending){cachedToggleClass(PENDING_CLASS,true);ctrl.$valid=ctrl.$invalid=undefined;toggleValidationCss('',null);}else{cachedToggleClass(PENDING_CLASS,false);ctrl.$valid=isObjectEmpty(ctrl.$error);ctrl.$invalid=!ctrl.$valid;toggleValidationCss('',ctrl.$valid);}var combinedState;if(ctrl.$pending&&ctrl.$pending[validationErrorKey]){combinedState=undefined;}else if(ctrl.$error[validationErrorKey]){combinedState=false;}else if(ctrl.$$success[validationErrorKey]){combinedState=true;}else{combinedState=null;}toggleValidationCss(validationErrorKey,combinedState);parentForm.$setValidity(validationErrorKey,combinedState,ctrl);}function createAndSet(name,value,controller){if(!ctrl[name]){ctrl[name]={};}set(ctrl[name],value,controller);}function unsetAndCleanup(name,value,controller){if(ctrl[name]){unset(ctrl[name],value,controller);}if(isObjectEmpty(ctrl[name])){ctrl[name]=undefined;}}function cachedToggleClass(className,switchValue){if(switchValue&&!classCache[className]){$animate.addClass($element,className);classCache[className]=true;}else if(!switchValue&&classCache[className]){$animate.removeClass($element,className);classCache[className]=false;}}function toggleValidationCss(validationErrorKey,isValid){validationErrorKey=validationErrorKey?'-'+snake_case(validationErrorKey,'-'):'';cachedToggleClass(VALID_CLASS+validationErrorKey,isValid===true);cachedToggleClass(INVALID_CLASS+validationErrorKey,isValid===false);}}function isObjectEmpty(obj){if(obj){for(var prop in obj){return false;}}return true;}var ngNonBindableDirective=ngDirective({terminal:true,priority:1000});var ngPluralizeDirective=['$locale','$interpolate',function($locale,$interpolate){var BRACE=/{}/g,IS_WHEN=/^when(Minus)?(.+)$/;return{restrict:'EA',link:function(scope,element,attr){var numberExp=attr.count,whenExp=attr.$attr.when&&element.attr(attr.$attr.when),offset=attr.offset||0,whens=scope.$eval(whenExp)||{},whensExpFns={},startSymbol=$interpolate.startSymbol(),endSymbol=$interpolate.endSymbol(),braceReplacement=startSymbol+numberExp+'-'+offset+endSymbol,watchRemover=angular.noop,lastCount;forEach(attr,function(expression,attributeName){var tmpMatch=IS_WHEN.exec(attributeName);if(tmpMatch){var whenKey=(tmpMatch[1]?'-':'')+lowercase(tmpMatch[2]);whens[whenKey]=element.attr(attr.$attr[attributeName]);}});forEach(whens,function(expression,key){whensExpFns[key]=$interpolate(expression.replace(BRACE,braceReplacement));});scope.$watch(numberExp,function ngPluralizeWatchAction(newVal){var count=parseFloat(newVal);var countIsNaN=isNaN(count);if(!countIsNaN&&!(count in whens)){count=$locale.pluralCat(count-offset);}if((count!==lastCount)&&!(countIsNaN&&isNaN(lastCount))){watchRemover();watchRemover=scope.$watch(whensExpFns[count],updateElementText);lastCount=count;}});function updateElementText(newText){element.text(newText||'');}}};}];var ngRepeatDirective=['$parse','$animate',function($parse,$animate){var NG_REMOVED='$$NG_REMOVED';var ngRepeatMinErr=minErr('ngRepeat');var updateScope=function(scope,index,valueIdentifier,value,keyIdentifier,key,arrayLength){scope[valueIdentifier]=value;if(keyIdentifier)scope[keyIdentifier]=key;scope.$index=index;scope.$first=(index===0);scope.$last=(index===(arrayLength-1));scope.$middle=!(scope.$first||scope.$last);scope.$odd=!(scope.$even=(index&1)===0);};var getBlockStart=function(block){return block.clone[0];};var getBlockEnd=function(block){return block.clone[block.clone.length-1];};return{restrict:'A',multiElement:true,transclude:'element',priority:1000,terminal:true,$$tlb:true,compile:function ngRepeatCompile($element,$attr){var expression=$attr.ngRepeat;var ngRepeatEndComment=document.createComment(' end ngRepeat: '+expression+' ');var match=expression.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!match){throw ngRepeatMinErr('iexp',"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",expression);}var lhs=match[1];var rhs=match[2];var aliasAs=match[3];var trackByExp=match[4];match=lhs.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);if(!match){throw ngRepeatMinErr('iidexp',"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",lhs);}var valueIdentifier=match[3]||match[1];var keyIdentifier=match[2];if(aliasAs&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(aliasAs))){throw ngRepeatMinErr('badident',"alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",aliasAs);}var trackByExpGetter,trackByIdExpFn,trackByIdArrayFn,trackByIdObjFn;var hashFnLocals={$id:hashKey};if(trackByExp){trackByExpGetter=$parse(trackByExp);}else{trackByIdArrayFn=function(key,value){return hashKey(value);};trackByIdObjFn=function(key){return key;};}return function ngRepeatLink($scope,$element,$attr,ctrl,$transclude){if(trackByExpGetter){trackByIdExpFn=function(key,value,index){if(keyIdentifier)hashFnLocals[keyIdentifier]=key;hashFnLocals[valueIdentifier]=value;hashFnLocals.$index=index;return trackByExpGetter($scope,hashFnLocals);};}var lastBlockMap=createMap();$scope.$watchCollection(rhs,function ngRepeatAction(collection){var index,length,previousNode=$element[0],nextNode,nextBlockMap=createMap(),collectionLength,key,value,trackById,trackByIdFn,collectionKeys,block,nextBlockOrder,elementsToRemove;if(aliasAs){$scope[aliasAs]=collection;}if(isArrayLike(collection)){collectionKeys=collection;trackByIdFn=trackByIdExpFn||trackByIdArrayFn;}else{trackByIdFn=trackByIdExpFn||trackByIdObjFn;collectionKeys=[];for(var itemKey in collection){if(collection.hasOwnProperty(itemKey)&&itemKey.charAt(0)!='$'){collectionKeys.push(itemKey);}}collectionKeys.sort();}collectionLength=collectionKeys.length;nextBlockOrder=new Array(collectionLength);for(index=0;index<collectionLength;index++){key=(collection===collectionKeys)?index:collectionKeys[index];value=collection[key];trackById=trackByIdFn(key,value,index);if(lastBlockMap[trackById]){block=lastBlockMap[trackById];delete lastBlockMap[trackById];nextBlockMap[trackById]=block;nextBlockOrder[index]=block;}else if(nextBlockMap[trackById]){forEach(nextBlockOrder,function(block){if(block&&block.scope)lastBlockMap[block.id]=block;});throw ngRepeatMinErr('dupes',"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",expression,trackById,value);}else{nextBlockOrder[index]={id:trackById,scope:undefined,clone:undefined};nextBlockMap[trackById]=true;}}for(var blockKey in lastBlockMap){block=lastBlockMap[blockKey];elementsToRemove=getBlockNodes(block.clone);$animate.leave(elementsToRemove);if(elementsToRemove[0].parentNode){for(index=0,length=elementsToRemove.length;index<length;index++){elementsToRemove[index][NG_REMOVED]=true;}}block.scope.$destroy();}for(index=0;index<collectionLength;index++){key=(collection===collectionKeys)?index:collectionKeys[index];value=collection[key];block=nextBlockOrder[index];if(block.scope){nextNode=previousNode;do{nextNode=nextNode.nextSibling;}while(nextNode&&nextNode[NG_REMOVED]);if(getBlockStart(block)!=nextNode){$animate.move(getBlockNodes(block.clone),null,jqLite(previousNode));}previousNode=getBlockEnd(block);updateScope(block.scope,index,valueIdentifier,value,keyIdentifier,key,collectionLength);}else{$transclude(function ngRepeatTransclude(clone,scope){block.scope=scope;var endNode=ngRepeatEndComment.cloneNode(false);clone[clone.length++]=endNode;$animate.enter(clone,null,jqLite(previousNode));previousNode=endNode;block.clone=clone;nextBlockMap[block.id]=block;updateScope(block.scope,index,valueIdentifier,value,keyIdentifier,key,collectionLength);});}}lastBlockMap=nextBlockMap;});};}};}];var NG_HIDE_CLASS='ng-hide';var NG_HIDE_IN_PROGRESS_CLASS='ng-hide-animate';var ngShowDirective=['$animate',function($animate){return{restrict:'A',multiElement:true,link:function(scope,element,attr){scope.$watch(attr.ngShow,function ngShowWatchAction(value){$animate[value?'removeClass':'addClass'](element,NG_HIDE_CLASS,{tempClasses:NG_HIDE_IN_PROGRESS_CLASS});});}};}];var ngHideDirective=['$animate',function($animate){return{restrict:'A',multiElement:true,link:function(scope,element,attr){scope.$watch(attr.ngHide,function ngHideWatchAction(value){$animate[value?'addClass':'removeClass'](element,NG_HIDE_CLASS,{tempClasses:NG_HIDE_IN_PROGRESS_CLASS});});}};}];var ngStyleDirective=ngDirective(function(scope,element,attr){scope.$watchCollection(attr.ngStyle,function ngStyleWatchAction(newStyles,oldStyles){if(oldStyles&&(newStyles!==oldStyles)){forEach(oldStyles,function(val,style){element.css(style,'');});}if(newStyles)element.css(newStyles);});});var ngSwitchDirective=['$animate',function($animate){return{restrict:'EA',require:'ngSwitch',controller:['$scope',function ngSwitchController(){this.cases={};}],link:function(scope,element,attr,ngSwitchController){var watchExpr=attr.ngSwitch||attr.on,selectedTranscludes=[],selectedElements=[],previousLeaveAnimations=[],selectedScopes=[];var spliceFactory=function(array,index){return function(){array.splice(index,1);};};scope.$watch(watchExpr,function ngSwitchWatchAction(value){var i,ii;for(i=0,ii=previousLeaveAnimations.length;i<ii;++i){$animate.cancel(previousLeaveAnimations[i]);}previousLeaveAnimations.length=0;for(i=0,ii=selectedScopes.length;i<ii;++i){var selected=getBlockNodes(selectedElements[i].clone);selectedScopes[i].$destroy();var promise=previousLeaveAnimations[i]=$animate.leave(selected);promise.then(spliceFactory(previousLeaveAnimations,i));}selectedElements.length=0;selectedScopes.length=0;if((selectedTranscludes=ngSwitchController.cases['!'+value]||ngSwitchController.cases['?'])){forEach(selectedTranscludes,function(selectedTransclude){selectedTransclude.transclude(function(caseElement,selectedScope){selectedScopes.push(selectedScope);var anchor=selectedTransclude.element;caseElement[caseElement.length++]=document.createComment(' end ngSwitchWhen: ');var block={clone:caseElement};selectedElements.push(block);$animate.enter(caseElement,anchor.parent(),anchor);});});}});}};}];var ngSwitchWhenDirective=ngDirective({transclude:'element',priority:1200,require:'^ngSwitch',multiElement:true,link:function(scope,element,attrs,ctrl,$transclude){ctrl.cases['!'+attrs.ngSwitchWhen]=(ctrl.cases['!'+attrs.ngSwitchWhen]||[]);ctrl.cases['!'+attrs.ngSwitchWhen].push({transclude:$transclude,element:element});}});var ngSwitchDefaultDirective=ngDirective({transclude:'element',priority:1200,require:'^ngSwitch',multiElement:true,link:function(scope,element,attr,ctrl,$transclude){ctrl.cases['?']=(ctrl.cases['?']||[]);ctrl.cases['?'].push({transclude:$transclude,element:element});}});var ngTranscludeDirective=ngDirective({restrict:'EAC',link:function($scope,$element,$attrs,controller,$transclude){if(!$transclude){throw minErr('ngTransclude')('orphan','Illegal use of ngTransclude directive in the template! '+'No parent directive that requires a transclusion found. '+'Element: {0}',startingTag($element));}$transclude(function(clone){$element.empty();$element.append(clone);});}});var scriptDirective=['$templateCache',function($templateCache){return{restrict:'E',terminal:true,compile:function(element,attr){if(attr.type=='text/ng-template'){var templateUrl=attr.id,text=element[0].text;$templateCache.put(templateUrl,text);}}};}];var ngOptionsMinErr=minErr('ngOptions');var ngOptionsDirective=valueFn({restrict:'A',terminal:true});var selectDirective=['$compile','$parse',function($compile,$parse){var NG_OPTIONS_REGEXP=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,nullModelCtrl={$setViewValue:noop};return{restrict:'E',require:['select','?ngModel'],controller:['$element','$scope','$attrs',function($element,$scope,$attrs){var self=this,optionsMap={},ngModelCtrl=nullModelCtrl,nullOption,unknownOption;self.databound=$attrs.ngModel;self.init=function(ngModelCtrl_,nullOption_,unknownOption_){ngModelCtrl=ngModelCtrl_;nullOption=nullOption_;unknownOption=unknownOption_;};self.addOption=function(value,element){assertNotHasOwnProperty(value,'"option value"');optionsMap[value]=true;if(ngModelCtrl.$viewValue==value){$element.val(value);if(unknownOption.parent())unknownOption.remove();}if(element&&element[0].hasAttribute('selected')){element[0].selected=true;}};self.removeOption=function(value){if(this.hasOption(value)){delete optionsMap[value];if(ngModelCtrl.$viewValue===value){this.renderUnknownOption(value);}}};self.renderUnknownOption=function(val){var unknownVal='? '+hashKey(val)+' ?';unknownOption.val(unknownVal);$element.prepend(unknownOption);$element.val(unknownVal);unknownOption.prop('selected',true);};self.hasOption=function(value){return optionsMap.hasOwnProperty(value);};$scope.$on('$destroy',function(){self.renderUnknownOption=noop;});}],link:function(scope,element,attr,ctrls){if(!ctrls[1])return;var selectCtrl=ctrls[0],ngModelCtrl=ctrls[1],multiple=attr.multiple,optionsExp=attr.ngOptions,nullOption=false,emptyOption,renderScheduled=false,optionTemplate=jqLite(document.createElement('option')),optGroupTemplate=jqLite(document.createElement('optgroup')),unknownOption=optionTemplate.clone();for(var i=0,children=element.children(),ii=children.length;i<ii;i++){if(children[i].value===''){emptyOption=nullOption=children.eq(i);break;}}selectCtrl.init(ngModelCtrl,nullOption,unknownOption);if(multiple){ngModelCtrl.$isEmpty=function(value){return!value||value.length===0;};}if(optionsExp)setupAsOptions(scope,element,ngModelCtrl);else if(multiple)setupAsMultiple(scope,element,ngModelCtrl);else setupAsSingle(scope,element,ngModelCtrl,selectCtrl);function setupAsSingle(scope,selectElement,ngModelCtrl,selectCtrl){ngModelCtrl.$render=function(){var viewValue=ngModelCtrl.$viewValue;if(selectCtrl.hasOption(viewValue)){if(unknownOption.parent())unknownOption.remove();selectElement.val(viewValue);if(viewValue==='')emptyOption.prop('selected',true);}else{if(isUndefined(viewValue)&&emptyOption){selectElement.val('');}else{selectCtrl.renderUnknownOption(viewValue);}}};selectElement.on('change',function(){scope.$apply(function(){if(unknownOption.parent())unknownOption.remove();ngModelCtrl.$setViewValue(selectElement.val());});});}function setupAsMultiple(scope,selectElement,ctrl){var lastView;ctrl.$render=function(){var items=new HashMap(ctrl.$viewValue);forEach(selectElement.find('option'),function(option){option.selected=isDefined(items.get(option.value));});};scope.$watch(function selectMultipleWatch(){if(!equals(lastView,ctrl.$viewValue)){lastView=shallowCopy(ctrl.$viewValue);ctrl.$render();}});selectElement.on('change',function(){scope.$apply(function(){var array=[];forEach(selectElement.find('option'),function(option){if(option.selected){array.push(option.value);}});ctrl.$setViewValue(array);});});}function setupAsOptions(scope,selectElement,ctrl){var match;if(!(match=optionsExp.match(NG_OPTIONS_REGEXP))){throw ngOptionsMinErr('iexp',"Expected expression in form of "+"'_select_ (as _label_)? for (_key_,)?_value_ in _collection_'"+" but got '{0}'. Element: {1}",optionsExp,startingTag(selectElement));}var displayFn=$parse(match[2]||match[1]),valueName=match[4]||match[6],selectAs=/ as /.test(match[0])&&match[1],selectAsFn=selectAs?$parse(selectAs):null,keyName=match[5],groupByFn=$parse(match[3]||''),valueFn=$parse(match[2]?match[1]:valueName),valuesFn=$parse(match[7]),track=match[8],trackFn=track?$parse(match[8]):null,trackKeysCache={},optionGroupsCache=[[{element:selectElement,label:''}]],locals={};if(nullOption){$compile(nullOption)(scope);nullOption.removeClass('ng-scope');nullOption.remove();}selectElement.empty();selectElement.on('change',selectionChanged);ctrl.$render=render;scope.$watchCollection(valuesFn,scheduleRendering);scope.$watchCollection(getLabels,scheduleRendering);if(multiple){scope.$watchCollection(function(){return ctrl.$modelValue;},scheduleRendering);}function callExpression(exprFn,key,value){locals[valueName]=value;if(keyName)locals[keyName]=key;return exprFn(scope,locals);}function selectionChanged(){scope.$apply(function(){var collection=valuesFn(scope)||[];var viewValue;if(multiple){viewValue=[];forEach(selectElement.val(),function(selectedKey){selectedKey=trackFn?trackKeysCache[selectedKey]:selectedKey;viewValue.push(getViewValue(selectedKey,collection[selectedKey]));});}else{var selectedKey=trackFn?trackKeysCache[selectElement.val()]:selectElement.val();viewValue=getViewValue(selectedKey,collection[selectedKey]);}ctrl.$setViewValue(viewValue);render();});}function getViewValue(key,value){if(key==='?'){return undefined;}else if(key===''){return null;}else{var viewValueFn=selectAsFn?selectAsFn:valueFn;return callExpression(viewValueFn,key,value);}}function getLabels(){var values=valuesFn(scope);var toDisplay;if(values&&isArray(values)){toDisplay=new Array(values.length);for(var i=0,ii=values.length;i<ii;i++){toDisplay[i]=callExpression(displayFn,i,values[i]);}return toDisplay;}else if(values){toDisplay={};for(var prop in values){if(values.hasOwnProperty(prop)){toDisplay[prop]=callExpression(displayFn,prop,values[prop]);}}}return toDisplay;}function createIsSelectedFn(viewValue){var selectedSet;if(multiple){if(trackFn&&isArray(viewValue)){selectedSet=new HashMap([]);for(var trackIndex=0;trackIndex<viewValue.length;trackIndex++){selectedSet.put(callExpression(trackFn,null,viewValue[trackIndex]),true);}}else{selectedSet=new HashMap(viewValue);}}else if(trackFn){viewValue=callExpression(trackFn,null,viewValue);}return function isSelected(key,value){var compareValueFn;if(trackFn){compareValueFn=trackFn;}else if(selectAsFn){compareValueFn=selectAsFn;}else{compareValueFn=valueFn;}if(multiple){return isDefined(selectedSet.remove(callExpression(compareValueFn,key,value)));}else{return viewValue===callExpression(compareValueFn,key,value);}};}function scheduleRendering(){if(!renderScheduled){scope.$$postDigest(render);renderScheduled=true;}}function updateLabelMap(labelMap,label,added){labelMap[label]=labelMap[label]||0;labelMap[label]+=(added?1:-1);}function render(){renderScheduled=false;var optionGroups={'':[]},optionGroupNames=[''],optionGroupName,optionGroup,option,existingParent,existingOptions,existingOption,viewValue=ctrl.$viewValue,values=valuesFn(scope)||[],keys=keyName?sortedKeys(values):values,key,value,groupLength,length,groupIndex,index,labelMap={},selected,isSelected=createIsSelectedFn(viewValue),anySelected=false,lastElement,element,label,optionId;trackKeysCache={};for(index=0;length=keys.length,index<length;index++){key=index;if(keyName){key=keys[index];if(key.charAt(0)==='$')continue;}value=values[key];optionGroupName=callExpression(groupByFn,key,value)||'';if(!(optionGroup=optionGroups[optionGroupName])){optionGroup=optionGroups[optionGroupName]=[];optionGroupNames.push(optionGroupName);}selected=isSelected(key,value);anySelected=anySelected||selected;label=callExpression(displayFn,key,value);label=isDefined(label)?label:'';optionId=trackFn?trackFn(scope,locals):(keyName?keys[index]:index);if(trackFn){trackKeysCache[optionId]=key;}optionGroup.push({id:optionId,label:label,selected:selected});}if(!multiple){if(nullOption||viewValue===null){optionGroups[''].unshift({id:'',label:'',selected:!anySelected});}else if(!anySelected){optionGroups[''].unshift({id:'?',label:'',selected:true});}}for(groupIndex=0,groupLength=optionGroupNames.length;groupIndex<groupLength;groupIndex++){optionGroupName=optionGroupNames[groupIndex];optionGroup=optionGroups[optionGroupName];if(optionGroupsCache.length<=groupIndex){existingParent={element:optGroupTemplate.clone().attr('label',optionGroupName),label:optionGroup.label};existingOptions=[existingParent];optionGroupsCache.push(existingOptions);selectElement.append(existingParent.element);}else{existingOptions=optionGroupsCache[groupIndex];existingParent=existingOptions[0];if(existingParent.label!=optionGroupName){existingParent.element.attr('label',existingParent.label=optionGroupName);}}lastElement=null;for(index=0,length=optionGroup.length;index<length;index++){option=optionGroup[index];if((existingOption=existingOptions[index+1])){lastElement=existingOption.element;if(existingOption.label!==option.label){updateLabelMap(labelMap,existingOption.label,false);updateLabelMap(labelMap,option.label,true);lastElement.text(existingOption.label=option.label);lastElement.prop('label',existingOption.label);}if(existingOption.id!==option.id){lastElement.val(existingOption.id=option.id);}if(lastElement[0].selected!==option.selected){lastElement.prop('selected',(existingOption.selected=option.selected));if(msie){lastElement.prop('selected',existingOption.selected);}}}else{if(option.id===''&&nullOption){element=nullOption;}else{(element=optionTemplate.clone()).val(option.id).prop('selected',option.selected).attr('selected',option.selected).prop('label',option.label).text(option.label);}existingOptions.push(existingOption={element:element,label:option.label,id:option.id,selected:option.selected});updateLabelMap(labelMap,option.label,true);if(lastElement){lastElement.after(element);}else{existingParent.element.append(element);}lastElement=element;}}index++;while(existingOptions.length>index){option=existingOptions.pop();updateLabelMap(labelMap,option.label,false);option.element.remove();}}while(optionGroupsCache.length>groupIndex){optionGroup=optionGroupsCache.pop();for(index=1;index<optionGroup.length;++index){updateLabelMap(labelMap,optionGroup[index].label,false);}optionGroup[0].element.remove();}forEach(labelMap,function(count,label){if(count>0){selectCtrl.addOption(label);}else if(count<0){selectCtrl.removeOption(label);}});}}}};}];var optionDirective=['$interpolate',function($interpolate){var nullSelectCtrl={addOption:noop,removeOption:noop};return{restrict:'E',priority:100,compile:function(element,attr){if(isUndefined(attr.value)){var interpolateFn=$interpolate(element.text(),true);if(!interpolateFn){attr.$set('value',element.text());}}return function(scope,element,attr){var selectCtrlName='$selectController',parent=element.parent(),selectCtrl=parent.data(selectCtrlName)||parent.parent().data(selectCtrlName);if(!selectCtrl||!selectCtrl.databound){selectCtrl=nullSelectCtrl;}if(interpolateFn){scope.$watch(interpolateFn,function interpolateWatchAction(newVal,oldVal){attr.$set('value',newVal);if(oldVal!==newVal){selectCtrl.removeOption(oldVal);}selectCtrl.addOption(newVal,element);});}else{selectCtrl.addOption(attr.value,element);}element.on('$destroy',function(){selectCtrl.removeOption(attr.value);});};}};}];var styleDirective=valueFn({restrict:'E',terminal:false});var requiredDirective=function(){return{restrict:'A',require:'?ngModel',link:function(scope,elm,attr,ctrl){if(!ctrl)return;attr.required=true;ctrl.$validators.required=function(modelValue,viewValue){return!attr.required||!ctrl.$isEmpty(viewValue);};attr.$observe('required',function(){ctrl.$validate();});}};};var patternDirective=function(){return{restrict:'A',require:'?ngModel',link:function(scope,elm,attr,ctrl){if(!ctrl)return;var regexp,patternExp=attr.ngPattern||attr.pattern;attr.$observe('pattern',function(regex){if(isString(regex)&&regex.length>0){regex=new RegExp('^'+regex+'$');}if(regex&&!regex.test){throw minErr('ngPattern')('noregexp','Expected {0} to be a RegExp but was {1}. Element: {2}',patternExp,regex,startingTag(elm));}regexp=regex||undefined;ctrl.$validate();});ctrl.$validators.pattern=function(value){return ctrl.$isEmpty(value)||isUndefined(regexp)||regexp.test(value);};}};};var maxlengthDirective=function(){return{restrict:'A',require:'?ngModel',link:function(scope,elm,attr,ctrl){if(!ctrl)return;var maxlength=-1;attr.$observe('maxlength',function(value){var intVal=int(value);maxlength=isNaN(intVal)?-1:intVal;ctrl.$validate();});ctrl.$validators.maxlength=function(modelValue,viewValue){return(maxlength<0)||ctrl.$isEmpty(viewValue)||(viewValue.length<=maxlength);};}};};var minlengthDirective=function(){return{restrict:'A',require:'?ngModel',link:function(scope,elm,attr,ctrl){if(!ctrl)return;var minlength=0;attr.$observe('minlength',function(value){minlength=int(value)||0;ctrl.$validate();});ctrl.$validators.minlength=function(modelValue,viewValue){return ctrl.$isEmpty(viewValue)||viewValue.length>=minlength;};}};};if(window.angular.bootstrap){console.log('WARNING: Tried to load angular more than once.');return;}bindJQuery();publishExternalAPI(angular);jqLite(document).ready(function(){angularInit(document,bootstrap);});})(window,document);!window.angular.$$csp()&&window.angular.element(document).find('head').prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}</style>');(function(window,angular,undefined){'use strict';angular.module('ngAnimate',['ng']).directive('ngAnimateChildren',function(){var NG_ANIMATE_CHILDREN='$$ngAnimateChildren';return function(scope,element,attrs){var val=attrs.ngAnimateChildren;if(angular.isString(val)&&val.length===0){element.data(NG_ANIMATE_CHILDREN,true);}else{scope.$watch(val,function(value){element.data(NG_ANIMATE_CHILDREN,!!value);});}};}).factory('$$animateReflow',['$$rAF','$document',function($$rAF,$document){var bod=$document[0].body;return function(fn){return $$rAF(function(){var a=bod.offsetWidth+1;fn();});};}]).config(['$provide','$animateProvider',function($provide,$animateProvider){var noop=angular.noop;var forEach=angular.forEach;var selectors=$animateProvider.$$selectors;var isArray=angular.isArray;var isString=angular.isString;var isObject=angular.isObject;var ELEMENT_NODE=1;var NG_ANIMATE_STATE='$$ngAnimateState';var NG_ANIMATE_CHILDREN='$$ngAnimateChildren';var NG_ANIMATE_CLASS_NAME='ng-animate';var rootAnimateState={running:true};function extractElementNode(element){for(var i=0;i<element.length;i++){var elm=element[i];if(elm.nodeType==ELEMENT_NODE){return elm;}}}function prepareElement(element){return element&&angular.element(element);}function stripCommentsFromElement(element){return angular.element(extractElementNode(element));}function isMatchingElement(elm1,elm2){return extractElementNode(elm1)==extractElementNode(elm2);}var $$jqLite;$provide.decorator('$animate',['$delegate','$$q','$injector','$sniffer','$rootElement','$$asyncCallback','$rootScope','$document','$templateRequest','$$jqLite',function($delegate,$$q,$injector,$sniffer,$rootElement,$$asyncCallback,$rootScope,$document,$templateRequest,$$$jqLite){$$jqLite=$$$jqLite;$rootElement.data(NG_ANIMATE_STATE,rootAnimateState);var deregisterWatch=$rootScope.$watch(function(){return $templateRequest.totalPendingRequests;},function(val,oldVal){if(val!==0)return;deregisterWatch();$rootScope.$$postDigest(function(){$rootScope.$$postDigest(function(){rootAnimateState.running=false;});});});var globalAnimationCounter=0;var classNameFilter=$animateProvider.classNameFilter();var isAnimatableClassName=!classNameFilter?function(){return true;}:function(className){return classNameFilter.test(className);};function classBasedAnimationsBlocked(element,setter){var data=element.data(NG_ANIMATE_STATE)||{};if(setter){data.running=true;data.structural=true;element.data(NG_ANIMATE_STATE,data);}return data.disabled||(data.running&&data.structural);}function runAnimationPostDigest(fn){var cancelFn,defer=$$q.defer();defer.promise.$$cancelFn=function(){cancelFn&&cancelFn();};$rootScope.$$postDigest(function(){cancelFn=fn(function(){defer.resolve();});});return defer.promise;}function parseAnimateOptions(options){if(isObject(options)){if(options.tempClasses&&isString(options.tempClasses)){options.tempClasses=options.tempClasses.split(/\s+/);}return options;}}function resolveElementClasses(element,cache,runningAnimations){runningAnimations=runningAnimations||{};var lookup={};forEach(runningAnimations,function(data,selector){forEach(selector.split(' '),function(s){lookup[s]=data;});});var hasClasses=Object.create(null);forEach((element.attr('class')||'').split(/\s+/),function(className){hasClasses[className]=true;});var toAdd=[],toRemove=[];forEach((cache&&cache.classes)||[],function(status,className){var hasClass=hasClasses[className];var matchingAnimation=lookup[className]||{};if(status===false){if(hasClass||matchingAnimation.event=='addClass'){toRemove.push(className);}}else if(status===true){if(!hasClass||matchingAnimation.event=='removeClass'){toAdd.push(className);}}});return(toAdd.length+toRemove.length)>0&&[toAdd.join(' '),toRemove.join(' ')];}function lookup(name){if(name){var matches=[],flagMap={},classes=name.substr(1).split('.');if($sniffer.transitions||$sniffer.animations){matches.push($injector.get(selectors['']));}for(var i=0;i<classes.length;i++){var klass=classes[i],selectorFactoryName=selectors[klass];if(selectorFactoryName&&!flagMap[klass]){matches.push($injector.get(selectorFactoryName));flagMap[klass]=true;}}return matches;}}function animationRunner(element,animationEvent,className,options){var node=element[0];if(!node){return;}if(options){options.to=options.to||{};options.from=options.from||{};}var classNameAdd;var classNameRemove;if(isArray(className)){classNameAdd=className[0];classNameRemove=className[1];if(!classNameAdd){className=classNameRemove;animationEvent='removeClass';}else if(!classNameRemove){className=classNameAdd;animationEvent='addClass';}else{className=classNameAdd+' '+classNameRemove;}}var isSetClassOperation=animationEvent=='setClass';var isClassBased=isSetClassOperation||animationEvent=='addClass'||animationEvent=='removeClass'||animationEvent=='animate';var currentClassName=element.attr('class');var classes=currentClassName+' '+className;if(!isAnimatableClassName(classes)){return;}var beforeComplete=noop,beforeCancel=[],before=[],afterComplete=noop,afterCancel=[],after=[];var animationLookup=(' '+classes).replace(/\s+/g,'.');forEach(lookup(animationLookup),function(animationFactory){var created=registerAnimation(animationFactory,animationEvent);if(!created&&isSetClassOperation){registerAnimation(animationFactory,'addClass');registerAnimation(animationFactory,'removeClass');}});function registerAnimation(animationFactory,event){var afterFn=animationFactory[event];var beforeFn=animationFactory['before'+event.charAt(0).toUpperCase()+event.substr(1)];if(afterFn||beforeFn){if(event=='leave'){beforeFn=afterFn;afterFn=null;}after.push({event:event,fn:afterFn});before.push({event:event,fn:beforeFn});return true;}}function run(fns,cancellations,allCompleteFn){var animations=[];forEach(fns,function(animation){animation.fn&&animations.push(animation);});var count=0;function afterAnimationComplete(index){if(cancellations){(cancellations[index]||noop)();if(++count<animations.length)return;cancellations=null;}allCompleteFn();}forEach(animations,function(animation,index){var progress=function(){afterAnimationComplete(index);};switch(animation.event){case'setClass':cancellations.push(animation.fn(element,classNameAdd,classNameRemove,progress,options));break;case'animate':cancellations.push(animation.fn(element,className,options.from,options.to,progress));break;case'addClass':cancellations.push(animation.fn(element,classNameAdd||className,progress,options));break;case'removeClass':cancellations.push(animation.fn(element,classNameRemove||className,progress,options));break;default:cancellations.push(animation.fn(element,progress,options));break;}});if(cancellations&&cancellations.length===0){allCompleteFn();}}return{node:node,event:animationEvent,className:className,isClassBased:isClassBased,isSetClassOperation:isSetClassOperation,applyStyles:function(){if(options){element.css(angular.extend(options.from||{},options.to||{}));}},before:function(allCompleteFn){beforeComplete=allCompleteFn;run(before,beforeCancel,function(){beforeComplete=noop;allCompleteFn();});},after:function(allCompleteFn){afterComplete=allCompleteFn;run(after,afterCancel,function(){afterComplete=noop;allCompleteFn();});},cancel:function(){if(beforeCancel){forEach(beforeCancel,function(cancelFn){(cancelFn||noop)(true);});beforeComplete(true);}if(afterCancel){forEach(afterCancel,function(cancelFn){(cancelFn||noop)(true);});afterComplete(true);}}};}return{animate:function(element,from,to,className,options){className=className||'ng-inline-animate';options=parseAnimateOptions(options)||{};options.from=to?from:null;options.to=to?to:from;return runAnimationPostDigest(function(done){return performAnimation('animate',className,stripCommentsFromElement(element),null,null,noop,options,done);});},enter:function(element,parentElement,afterElement,options){options=parseAnimateOptions(options);element=angular.element(element);parentElement=prepareElement(parentElement);afterElement=prepareElement(afterElement);classBasedAnimationsBlocked(element,true);$delegate.enter(element,parentElement,afterElement);return runAnimationPostDigest(function(done){return performAnimation('enter','ng-enter',stripCommentsFromElement(element),parentElement,afterElement,noop,options,done);});},leave:function(element,options){options=parseAnimateOptions(options);element=angular.element(element);cancelChildAnimations(element);classBasedAnimationsBlocked(element,true);return runAnimationPostDigest(function(done){return performAnimation('leave','ng-leave',stripCommentsFromElement(element),null,null,function(){$delegate.leave(element);},options,done);});},move:function(element,parentElement,afterElement,options){options=parseAnimateOptions(options);element=angular.element(element);parentElement=prepareElement(parentElement);afterElement=prepareElement(afterElement);cancelChildAnimations(element);classBasedAnimationsBlocked(element,true);$delegate.move(element,parentElement,afterElement);return runAnimationPostDigest(function(done){return performAnimation('move','ng-move',stripCommentsFromElement(element),parentElement,afterElement,noop,options,done);});},addClass:function(element,className,options){return this.setClass(element,className,[],options);},removeClass:function(element,className,options){return this.setClass(element,[],className,options);},setClass:function(element,add,remove,options){options=parseAnimateOptions(options);var STORAGE_KEY='$$animateClasses';element=angular.element(element);element=stripCommentsFromElement(element);if(classBasedAnimationsBlocked(element)){return $delegate.$$setClassImmediately(element,add,remove,options);}var classes,cache=element.data(STORAGE_KEY);var hasCache=!!cache;if(!cache){cache={};cache.classes={};}classes=cache.classes;add=isArray(add)?add:add.split(' ');forEach(add,function(c){if(c&&c.length){classes[c]=true;}});remove=isArray(remove)?remove:remove.split(' ');forEach(remove,function(c){if(c&&c.length){classes[c]=false;}});if(hasCache){if(options&&cache.options){cache.options=angular.extend(cache.options||{},options);}return cache.promise;}else{element.data(STORAGE_KEY,cache={classes:classes,options:options});}return cache.promise=runAnimationPostDigest(function(done){var parentElement=element.parent();var elementNode=extractElementNode(element);var parentNode=elementNode.parentNode;if(!parentNode||parentNode['$$NG_REMOVED']||elementNode['$$NG_REMOVED']){done();return;}var cache=element.data(STORAGE_KEY);element.removeData(STORAGE_KEY);var state=element.data(NG_ANIMATE_STATE)||{};var classes=resolveElementClasses(element,cache,state.active);return!classes?done():performAnimation('setClass',classes,element,parentElement,null,function(){if(classes[0])$delegate.$$addClassImmediately(element,classes[0]);if(classes[1])$delegate.$$removeClassImmediately(element,classes[1]);},cache.options,done);});},cancel:function(promise){promise.$$cancelFn();},enabled:function(value,element){switch(arguments.length){case 2:if(value){cleanup(element);}else{var data=element.data(NG_ANIMATE_STATE)||{};data.disabled=true;element.data(NG_ANIMATE_STATE,data);}break;case 1:rootAnimateState.disabled=!value;break;default:value=!rootAnimateState.disabled;break;}return!!value;}};function performAnimation(animationEvent,className,element,parentElement,afterElement,domOperation,options,doneCallback){var noopCancel=noop;var runner=animationRunner(element,animationEvent,className,options);if(!runner){fireDOMOperation();fireBeforeCallbackAsync();fireAfterCallbackAsync();closeAnimation();return noopCancel;}animationEvent=runner.event;className=runner.className;var elementEvents=angular.element._data(runner.node);elementEvents=elementEvents&&elementEvents.events;if(!parentElement){parentElement=afterElement?afterElement.parent():element.parent();}if(animationsDisabled(element,parentElement)){fireDOMOperation();fireBeforeCallbackAsync();fireAfterCallbackAsync();closeAnimation();return noopCancel;}var ngAnimateState=element.data(NG_ANIMATE_STATE)||{};var runningAnimations=ngAnimateState.active||{};var totalActiveAnimations=ngAnimateState.totalActive||0;var lastAnimation=ngAnimateState.last;var skipAnimation=false;if(totalActiveAnimations>0){var animationsToCancel=[];if(!runner.isClassBased){if(animationEvent=='leave'&&runningAnimations['ng-leave']){skipAnimation=true;}else{for(var klass in runningAnimations){animationsToCancel.push(runningAnimations[klass]);}ngAnimateState={};cleanup(element,true);}}else if(lastAnimation.event=='setClass'){animationsToCancel.push(lastAnimation);cleanup(element,className);}else if(runningAnimations[className]){var current=runningAnimations[className];if(current.event==animationEvent){skipAnimation=true;}else{animationsToCancel.push(current);cleanup(element,className);}}if(animationsToCancel.length>0){forEach(animationsToCancel,function(operation){operation.cancel();});}}if(runner.isClassBased&&!runner.isSetClassOperation&&animationEvent!='animate'&&!skipAnimation){skipAnimation=(animationEvent=='addClass')==element.hasClass(className);}if(skipAnimation){fireDOMOperation();fireBeforeCallbackAsync();fireAfterCallbackAsync();fireDoneCallbackAsync();return noopCancel;}runningAnimations=ngAnimateState.active||{};totalActiveAnimations=ngAnimateState.totalActive||0;if(animationEvent=='leave'){element.one('$destroy',function(e){var element=angular.element(this);var state=element.data(NG_ANIMATE_STATE);if(state){var activeLeaveAnimation=state.active['ng-leave'];if(activeLeaveAnimation){activeLeaveAnimation.cancel();cleanup(element,'ng-leave');}}});}$$jqLite.addClass(element,NG_ANIMATE_CLASS_NAME);if(options&&options.tempClasses){forEach(options.tempClasses,function(className){$$jqLite.addClass(element,className);});}var localAnimationCount=globalAnimationCounter++;totalActiveAnimations++;runningAnimations[className]=runner;element.data(NG_ANIMATE_STATE,{last:runner,active:runningAnimations,index:localAnimationCount,totalActive:totalActiveAnimations});fireBeforeCallbackAsync();runner.before(function(cancelled){var data=element.data(NG_ANIMATE_STATE);cancelled=cancelled||!data||!data.active[className]||(runner.isClassBased&&data.active[className].event!=animationEvent);fireDOMOperation();if(cancelled===true){closeAnimation();}else{fireAfterCallbackAsync();runner.after(closeAnimation);}});return runner.cancel;function fireDOMCallback(animationPhase){var eventName='$animate:'+animationPhase;if(elementEvents&&elementEvents[eventName]&&elementEvents[eventName].length>0){$$asyncCallback(function(){element.triggerHandler(eventName,{event:animationEvent,className:className});});}}function fireBeforeCallbackAsync(){fireDOMCallback('before');}function fireAfterCallbackAsync(){fireDOMCallback('after');}function fireDoneCallbackAsync(){fireDOMCallback('close');doneCallback();}function fireDOMOperation(){if(!fireDOMOperation.hasBeenRun){fireDOMOperation.hasBeenRun=true;domOperation();}}function closeAnimation(){if(!closeAnimation.hasBeenRun){if(runner){runner.applyStyles();}closeAnimation.hasBeenRun=true;if(options&&options.tempClasses){forEach(options.tempClasses,function(className){$$jqLite.removeClass(element,className);});}var data=element.data(NG_ANIMATE_STATE);if(data){if(runner&&runner.isClassBased){cleanup(element,className);}else{$$asyncCallback(function(){var data=element.data(NG_ANIMATE_STATE)||{};if(localAnimationCount==data.index){cleanup(element,className,animationEvent);}});element.data(NG_ANIMATE_STATE,data);}}fireDoneCallbackAsync();}}}function cancelChildAnimations(element){var node=extractElementNode(element);if(node){var nodes=angular.isFunction(node.getElementsByClassName)?node.getElementsByClassName(NG_ANIMATE_CLASS_NAME):node.querySelectorAll('.'+NG_ANIMATE_CLASS_NAME);forEach(nodes,function(element){element=angular.element(element);var data=element.data(NG_ANIMATE_STATE);if(data&&data.active){forEach(data.active,function(runner){runner.cancel();});}});}}function cleanup(element,className){if(isMatchingElement(element,$rootElement)){if(!rootAnimateState.disabled){rootAnimateState.running=false;rootAnimateState.structural=false;}}else if(className){var data=element.data(NG_ANIMATE_STATE)||{};var removeAnimations=className===true;if(!removeAnimations&&data.active&&data.active[className]){data.totalActive--;delete data.active[className];}if(removeAnimations||!data.totalActive){$$jqLite.removeClass(element,NG_ANIMATE_CLASS_NAME);element.removeData(NG_ANIMATE_STATE);}}}function animationsDisabled(element,parentElement){if(rootAnimateState.disabled){return true;}if(isMatchingElement(element,$rootElement)){return rootAnimateState.running;}var allowChildAnimations,parentRunningAnimation,hasParent;do{if(parentElement.length===0)break;var isRoot=isMatchingElement(parentElement,$rootElement);var state=isRoot?rootAnimateState:(parentElement.data(NG_ANIMATE_STATE)||{});if(state.disabled){return true;}if(isRoot){hasParent=true;}if(allowChildAnimations!==false){var animateChildrenFlag=parentElement.data(NG_ANIMATE_CHILDREN);if(angular.isDefined(animateChildrenFlag)){allowChildAnimations=animateChildrenFlag;}}parentRunningAnimation=parentRunningAnimation||state.running||(state.last&&!state.last.isClassBased);}while(parentElement=parentElement.parent());return!hasParent||(!allowChildAnimations&&parentRunningAnimation);}}]);$animateProvider.register('',['$window','$sniffer','$timeout','$$animateReflow',function($window,$sniffer,$timeout,$$animateReflow){var CSS_PREFIX='',TRANSITION_PROP,TRANSITIONEND_EVENT,ANIMATION_PROP,ANIMATIONEND_EVENT;if(window.ontransitionend===undefined&&window.onwebkittransitionend!==undefined){CSS_PREFIX='-webkit-';TRANSITION_PROP='WebkitTransition';TRANSITIONEND_EVENT='webkitTransitionEnd transitionend';}else{TRANSITION_PROP='transition';TRANSITIONEND_EVENT='transitionend';}if(window.onanimationend===undefined&&window.onwebkitanimationend!==undefined){CSS_PREFIX='-webkit-';ANIMATION_PROP='WebkitAnimation';ANIMATIONEND_EVENT='webkitAnimationEnd animationend';}else{ANIMATION_PROP='animation';ANIMATIONEND_EVENT='animationend';}var DURATION_KEY='Duration';var PROPERTY_KEY='Property';var DELAY_KEY='Delay';var ANIMATION_ITERATION_COUNT_KEY='IterationCount';var ANIMATION_PLAYSTATE_KEY='PlayState';var NG_ANIMATE_PARENT_KEY='$$ngAnimateKey';var NG_ANIMATE_CSS_DATA_KEY='$$ngAnimateCSS3Data';var ELAPSED_TIME_MAX_DECIMAL_PLACES=3;var CLOSING_TIME_BUFFER=1.5;var ONE_SECOND=1000;var lookupCache={};var parentCounter=0;var animationReflowQueue=[];var cancelAnimationReflow;function clearCacheAfterReflow(){if(!cancelAnimationReflow){cancelAnimationReflow=$$animateReflow(function(){animationReflowQueue=[];cancelAnimationReflow=null;lookupCache={};});}}function afterReflow(element,callback){if(cancelAnimationReflow){cancelAnimationReflow();}animationReflowQueue.push(callback);cancelAnimationReflow=$$animateReflow(function(){forEach(animationReflowQueue,function(fn){fn();});animationReflowQueue=[];cancelAnimationReflow=null;lookupCache={};});}var closingTimer=null;var closingTimestamp=0;var animationElementQueue=[];function animationCloseHandler(element,totalTime){var node=extractElementNode(element);element=angular.element(node);animationElementQueue.push(element);var futureTimestamp=Date.now()+totalTime;if(futureTimestamp<=closingTimestamp){return;}$timeout.cancel(closingTimer);closingTimestamp=futureTimestamp;closingTimer=$timeout(function(){closeAllAnimations(animationElementQueue);animationElementQueue=[];},totalTime,false);}function closeAllAnimations(elements){forEach(elements,function(element){var elementData=element.data(NG_ANIMATE_CSS_DATA_KEY);if(elementData){forEach(elementData.closeAnimationFns,function(fn){fn();});}});}function getElementAnimationDetails(element,cacheKey){var data=cacheKey?lookupCache[cacheKey]:null;if(!data){var transitionDuration=0;var transitionDelay=0;var animationDuration=0;var animationDelay=0;forEach(element,function(element){if(element.nodeType==ELEMENT_NODE){var elementStyles=$window.getComputedStyle(element)||{};var transitionDurationStyle=elementStyles[TRANSITION_PROP+DURATION_KEY];transitionDuration=Math.max(parseMaxTime(transitionDurationStyle),transitionDuration);var transitionDelayStyle=elementStyles[TRANSITION_PROP+DELAY_KEY];transitionDelay=Math.max(parseMaxTime(transitionDelayStyle),transitionDelay);var animationDelayStyle=elementStyles[ANIMATION_PROP+DELAY_KEY];animationDelay=Math.max(parseMaxTime(elementStyles[ANIMATION_PROP+DELAY_KEY]),animationDelay);var aDuration=parseMaxTime(elementStyles[ANIMATION_PROP+DURATION_KEY]);if(aDuration>0){aDuration*=parseInt(elementStyles[ANIMATION_PROP+ANIMATION_ITERATION_COUNT_KEY],10)||1;}animationDuration=Math.max(aDuration,animationDuration);}});data={total:0,transitionDelay:transitionDelay,transitionDuration:transitionDuration,animationDelay:animationDelay,animationDuration:animationDuration};if(cacheKey){lookupCache[cacheKey]=data;}}return data;}function parseMaxTime(str){var maxValue=0;var values=isString(str)?str.split(/\s*,\s*/):[];forEach(values,function(value){maxValue=Math.max(parseFloat(value)||0,maxValue);});return maxValue;}function getCacheKey(element){var parentElement=element.parent();var parentID=parentElement.data(NG_ANIMATE_PARENT_KEY);if(!parentID){parentElement.data(NG_ANIMATE_PARENT_KEY,++parentCounter);parentID=parentCounter;}return parentID+'-'+extractElementNode(element).getAttribute('class');}function animateSetup(animationEvent,element,className,styles){var structural=['ng-enter','ng-leave','ng-move'].indexOf(className)>=0;var cacheKey=getCacheKey(element);var eventCacheKey=cacheKey+' '+className;var itemIndex=lookupCache[eventCacheKey]?++lookupCache[eventCacheKey].total:0;var stagger={};if(itemIndex>0){var staggerClassName=className+'-stagger';var staggerCacheKey=cacheKey+' '+staggerClassName;var applyClasses=!lookupCache[staggerCacheKey];applyClasses&&$$jqLite.addClass(element,staggerClassName);stagger=getElementAnimationDetails(element,staggerCacheKey);applyClasses&&$$jqLite.removeClass(element,staggerClassName);}$$jqLite.addClass(element,className);var formerData=element.data(NG_ANIMATE_CSS_DATA_KEY)||{};var timings=getElementAnimationDetails(element,eventCacheKey);var transitionDuration=timings.transitionDuration;var animationDuration=timings.animationDuration;if(structural&&transitionDuration===0&&animationDuration===0){$$jqLite.removeClass(element,className);return false;}var blockTransition=styles||(structural&&transitionDuration>0);var blockAnimation=animationDuration>0&&stagger.animationDelay>0&&stagger.animationDuration===0;var closeAnimationFns=formerData.closeAnimationFns||[];element.data(NG_ANIMATE_CSS_DATA_KEY,{stagger:stagger,cacheKey:eventCacheKey,running:formerData.running||0,itemIndex:itemIndex,blockTransition:blockTransition,closeAnimationFns:closeAnimationFns});var node=extractElementNode(element);if(blockTransition){blockTransitions(node,true);if(styles){element.css(styles);}}if(blockAnimation){blockAnimations(node,true);}return true;}function animateRun(animationEvent,element,className,activeAnimationComplete,styles){var node=extractElementNode(element);var elementData=element.data(NG_ANIMATE_CSS_DATA_KEY);if(node.getAttribute('class').indexOf(className)==-1||!elementData){activeAnimationComplete();return;}var activeClassName='';var pendingClassName='';forEach(className.split(' '),function(klass,i){var prefix=(i>0?' ':'')+klass;activeClassName+=prefix+'-active';pendingClassName+=prefix+'-pending';});var style='';var appliedStyles=[];var itemIndex=elementData.itemIndex;var stagger=elementData.stagger;var staggerTime=0;if(itemIndex>0){var transitionStaggerDelay=0;if(stagger.transitionDelay>0&&stagger.transitionDuration===0){transitionStaggerDelay=stagger.transitionDelay*itemIndex;}var animationStaggerDelay=0;if(stagger.animationDelay>0&&stagger.animationDuration===0){animationStaggerDelay=stagger.animationDelay*itemIndex;appliedStyles.push(CSS_PREFIX+'animation-play-state');}staggerTime=Math.round(Math.max(transitionStaggerDelay,animationStaggerDelay)*100)/100;}if(!staggerTime){$$jqLite.addClass(element,activeClassName);if(elementData.blockTransition){blockTransitions(node,false);}}var eventCacheKey=elementData.cacheKey+' '+activeClassName;var timings=getElementAnimationDetails(element,eventCacheKey);var maxDuration=Math.max(timings.transitionDuration,timings.animationDuration);if(maxDuration===0){$$jqLite.removeClass(element,activeClassName);animateClose(element,className);activeAnimationComplete();return;}if(!staggerTime&&styles&&Object.keys(styles).length>0){if(!timings.transitionDuration){element.css('transition',timings.animationDuration+'s linear all');appliedStyles.push('transition');}element.css(styles);}var maxDelay=Math.max(timings.transitionDelay,timings.animationDelay);var maxDelayTime=maxDelay*ONE_SECOND;if(appliedStyles.length>0){var oldStyle=node.getAttribute('style')||'';if(oldStyle.charAt(oldStyle.length-1)!==';'){oldStyle+=';';}node.setAttribute('style',oldStyle+' '+style);}var startTime=Date.now();var css3AnimationEvents=ANIMATIONEND_EVENT+' '+TRANSITIONEND_EVENT;var animationTime=(maxDelay+maxDuration)*CLOSING_TIME_BUFFER;var totalTime=(staggerTime+animationTime)*ONE_SECOND;var staggerTimeout;if(staggerTime>0){$$jqLite.addClass(element,pendingClassName);staggerTimeout=$timeout(function(){staggerTimeout=null;if(timings.transitionDuration>0){blockTransitions(node,false);}if(timings.animationDuration>0){blockAnimations(node,false);}$$jqLite.addClass(element,activeClassName);$$jqLite.removeClass(element,pendingClassName);if(styles){if(timings.transitionDuration===0){element.css('transition',timings.animationDuration+'s linear all');}element.css(styles);appliedStyles.push('transition');}},staggerTime*ONE_SECOND,false);}element.on(css3AnimationEvents,onAnimationProgress);elementData.closeAnimationFns.push(function(){onEnd();activeAnimationComplete();});elementData.running++;animationCloseHandler(element,totalTime);return onEnd;function onEnd(){element.off(css3AnimationEvents,onAnimationProgress);$$jqLite.removeClass(element,activeClassName);$$jqLite.removeClass(element,pendingClassName);if(staggerTimeout){$timeout.cancel(staggerTimeout);}animateClose(element,className);var node=extractElementNode(element);for(var i in appliedStyles){node.style.removeProperty(appliedStyles[i]);}}function onAnimationProgress(event){event.stopPropagation();var ev=event.originalEvent||event;var timeStamp=ev.$manualTimeStamp||ev.timeStamp||Date.now();var elapsedTime=parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES));if(Math.max(timeStamp-startTime,0)>=maxDelayTime&&elapsedTime>=maxDuration){activeAnimationComplete();}}}function blockTransitions(node,bool){node.style[TRANSITION_PROP+PROPERTY_KEY]=bool?'none':'';}function blockAnimations(node,bool){node.style[ANIMATION_PROP+ANIMATION_PLAYSTATE_KEY]=bool?'paused':'';}function animateBefore(animationEvent,element,className,styles){if(animateSetup(animationEvent,element,className,styles)){return function(cancelled){cancelled&&animateClose(element,className);};}}function animateAfter(animationEvent,element,className,afterAnimationComplete,styles){if(element.data(NG_ANIMATE_CSS_DATA_KEY)){return animateRun(animationEvent,element,className,afterAnimationComplete,styles);}else{animateClose(element,className);afterAnimationComplete();}}function animate(animationEvent,element,className,animationComplete,options){var preReflowCancellation=animateBefore(animationEvent,element,className,options.from);if(!preReflowCancellation){clearCacheAfterReflow();animationComplete();return;}var cancel=preReflowCancellation;afterReflow(element,function(){cancel=animateAfter(animationEvent,element,className,animationComplete,options.to);});return function(cancelled){(cancel||noop)(cancelled);};}function animateClose(element,className){$$jqLite.removeClass(element,className);var data=element.data(NG_ANIMATE_CSS_DATA_KEY);if(data){if(data.running){data.running--;}if(!data.running||data.running===0){element.removeData(NG_ANIMATE_CSS_DATA_KEY);}}}return{animate:function(element,className,from,to,animationCompleted,options){options=options||{};options.from=from;options.to=to;return animate('animate',element,className,animationCompleted,options);},enter:function(element,animationCompleted,options){options=options||{};return animate('enter',element,'ng-enter',animationCompleted,options);},leave:function(element,animationCompleted,options){options=options||{};return animate('leave',element,'ng-leave',animationCompleted,options);},move:function(element,animationCompleted,options){options=options||{};return animate('move',element,'ng-move',animationCompleted,options);},beforeSetClass:function(element,add,remove,animationCompleted,options){options=options||{};var className=suffixClasses(remove,'-remove')+' '+suffixClasses(add,'-add');var cancellationMethod=animateBefore('setClass',element,className,options.from);if(cancellationMethod){afterReflow(element,animationCompleted);return cancellationMethod;}clearCacheAfterReflow();animationCompleted();},beforeAddClass:function(element,className,animationCompleted,options){options=options||{};var cancellationMethod=animateBefore('addClass',element,suffixClasses(className,'-add'),options.from);if(cancellationMethod){afterReflow(element,animationCompleted);return cancellationMethod;}clearCacheAfterReflow();animationCompleted();},beforeRemoveClass:function(element,className,animationCompleted,options){options=options||{};var cancellationMethod=animateBefore('removeClass',element,suffixClasses(className,'-remove'),options.from);if(cancellationMethod){afterReflow(element,animationCompleted);return cancellationMethod;}clearCacheAfterReflow();animationCompleted();},setClass:function(element,add,remove,animationCompleted,options){options=options||{};remove=suffixClasses(remove,'-remove');add=suffixClasses(add,'-add');var className=remove+' '+add;return animateAfter('setClass',element,className,animationCompleted,options.to);},addClass:function(element,className,animationCompleted,options){options=options||{};return animateAfter('addClass',element,suffixClasses(className,'-add'),animationCompleted,options.to);},removeClass:function(element,className,animationCompleted,options){options=options||{};return animateAfter('removeClass',element,suffixClasses(className,'-remove'),animationCompleted,options.to);}};function suffixClasses(classes,suffix){var className='';classes=isArray(classes)?classes:classes.split(/\s+/);forEach(classes,function(klass,i){if(klass&&klass.length>0){className+=(i>0?' ':'')+klass+suffix;}});return className;}}]);}]);})(window,window.angular);(function(window,angular,undefined){'use strict';var ngRouteModule=angular.module('ngRoute',['ng']).provider('$route',$RouteProvider),$routeMinErr=angular.$$minErr('ngRoute');function $RouteProvider(){function inherit(parent,extra){return angular.extend(Object.create(parent),extra);}var routes={};this.when=function(path,route){var routeCopy=angular.copy(route);if(angular.isUndefined(routeCopy.reloadOnSearch)){routeCopy.reloadOnSearch=true;}if(angular.isUndefined(routeCopy.caseInsensitiveMatch)){routeCopy.caseInsensitiveMatch=this.caseInsensitiveMatch;}routes[path]=angular.extend(routeCopy,path&&pathRegExp(path,routeCopy));if(path){var redirectPath=(path[path.length-1]=='/')?path.substr(0,path.length-1):path+'/';routes[redirectPath]=angular.extend({redirectTo:path},pathRegExp(redirectPath,routeCopy));}return this;};this.caseInsensitiveMatch=false;function pathRegExp(path,opts){var insensitive=opts.caseInsensitiveMatch,ret={originalPath:path,regexp:path},keys=ret.keys=[];path=path.replace(/([().])/g,'\\$1').replace(/(\/)?:(\w+)([\?\*])?/g,function(_,slash,key,option){var optional=option==='?'?option:null;var star=option==='*'?option:null;keys.push({name:key,optional:!!optional});slash=slash||'';return''+(optional?'':slash)+'(?:'+(optional?slash:'')+(star&&'(.+?)'||'([^/]+)')+(optional||'')+')'+(optional||'');}).replace(/([\/$\*])/g,'\\$1');ret.regexp=new RegExp('^'+path+'$',insensitive?'i':'');return ret;}this.otherwise=function(params){if(typeof params==='string'){params={redirectTo:params};}this.when(null,params);return this;};this.$get=['$rootScope','$location','$routeParams','$q','$injector','$templateRequest','$sce',function($rootScope,$location,$routeParams,$q,$injector,$templateRequest,$sce){var forceReload=false,preparedRoute,preparedRouteIsUpdateOnly,$route={routes:routes,reload:function(){forceReload=true;$rootScope.$evalAsync(function(){prepareRoute();commitRoute();});},updateParams:function(newParams){if(this.current&&this.current.$$route){newParams=angular.extend({},this.current.params,newParams);$location.path(interpolate(this.current.$$route.originalPath,newParams));$location.search(newParams);}else{throw $routeMinErr('norout','Tried updating route when with no current route');}}};$rootScope.$on('$locationChangeStart',prepareRoute);$rootScope.$on('$locationChangeSuccess',commitRoute);return $route;function switchRouteMatcher(on,route){var keys=route.keys,params={};if(!route.regexp)return null;var m=route.regexp.exec(on);if(!m)return null;for(var i=1,len=m.length;i<len;++i){var key=keys[i-1];var val=m[i];if(key&&val){params[key.name]=val;}}return params;}function prepareRoute($locationEvent){var lastRoute=$route.current;preparedRoute=parseRoute();preparedRouteIsUpdateOnly=preparedRoute&&lastRoute&&preparedRoute.$$route===lastRoute.$$route&&angular.equals(preparedRoute.pathParams,lastRoute.pathParams)&&!preparedRoute.reloadOnSearch&&!forceReload;if(!preparedRouteIsUpdateOnly&&(lastRoute||preparedRoute)){if($rootScope.$broadcast('$routeChangeStart',preparedRoute,lastRoute).defaultPrevented){if($locationEvent){$locationEvent.preventDefault();}}}}function commitRoute(){var lastRoute=$route.current;var nextRoute=preparedRoute;if(preparedRouteIsUpdateOnly){lastRoute.params=nextRoute.params;angular.copy(lastRoute.params,$routeParams);$rootScope.$broadcast('$routeUpdate',lastRoute);}else if(nextRoute||lastRoute){forceReload=false;$route.current=nextRoute;if(nextRoute){if(nextRoute.redirectTo){if(angular.isString(nextRoute.redirectTo)){$location.path(interpolate(nextRoute.redirectTo,nextRoute.params)).search(nextRoute.params).replace();}else{$location.url(nextRoute.redirectTo(nextRoute.pathParams,$location.path(),$location.search())).replace();}}}$q.when(nextRoute).then(function(){if(nextRoute){var locals=angular.extend({},nextRoute.resolve),template,templateUrl;angular.forEach(locals,function(value,key){locals[key]=angular.isString(value)?$injector.get(value):$injector.invoke(value,null,null,key);});if(angular.isDefined(template=nextRoute.template)){if(angular.isFunction(template)){template=template(nextRoute.params);}}else if(angular.isDefined(templateUrl=nextRoute.templateUrl)){if(angular.isFunction(templateUrl)){templateUrl=templateUrl(nextRoute.params);}templateUrl=$sce.getTrustedResourceUrl(templateUrl);if(angular.isDefined(templateUrl)){nextRoute.loadedTemplateUrl=templateUrl;template=$templateRequest(templateUrl);}}if(angular.isDefined(template)){locals['$template']=template;}return $q.all(locals);}}).then(function(locals){if(nextRoute==$route.current){if(nextRoute){nextRoute.locals=locals;angular.copy(nextRoute.params,$routeParams);}$rootScope.$broadcast('$routeChangeSuccess',nextRoute,lastRoute);}},function(error){if(nextRoute==$route.current){$rootScope.$broadcast('$routeChangeError',nextRoute,lastRoute,error);}});}}function parseRoute(){var params,match;angular.forEach(routes,function(route,path){if(!match&&(params=switchRouteMatcher($location.path(),route))){match=inherit(route,{params:angular.extend({},$location.search(),params),pathParams:params});match.$$route=route;}});return match||routes[null]&&inherit(routes[null],{params:{},pathParams:{}});}function interpolate(string,params){var result=[];angular.forEach((string||'').split(':'),function(segment,i){if(i===0){result.push(segment);}else{var segmentMatch=segment.match(/(\w+)(?:[?*])?(.*)/);var key=segmentMatch[1];result.push(params[key]);result.push(segmentMatch[2]||'');delete params[key];}});return result.join('');}}];}ngRouteModule.provider('$routeParams',$RouteParamsProvider);function $RouteParamsProvider(){this.$get=function(){return{};};}ngRouteModule.directive('ngView',ngViewFactory);ngRouteModule.directive('ngView',ngViewFillContentFactory);ngViewFactory.$inject=['$route','$anchorScroll','$animate'];function ngViewFactory($route,$anchorScroll,$animate){return{restrict:'ECA',terminal:true,priority:400,transclude:'element',link:function(scope,$element,attr,ctrl,$transclude){var currentScope,currentElement,previousLeaveAnimation,autoScrollExp=attr.autoscroll,onloadExp=attr.onload||'';scope.$on('$routeChangeSuccess',update);update();function cleanupLastView(){if(previousLeaveAnimation){$animate.cancel(previousLeaveAnimation);previousLeaveAnimation=null;}if(currentScope){currentScope.$destroy();currentScope=null;}if(currentElement){previousLeaveAnimation=$animate.leave(currentElement);previousLeaveAnimation.then(function(){previousLeaveAnimation=null;});currentElement=null;}}function update(){var locals=$route.current&&$route.current.locals,template=locals&&locals.$template;if(angular.isDefined(template)){var newScope=scope.$new();var current=$route.current;var clone=$transclude(newScope,function(clone){$animate.enter(clone,null,currentElement||$element).then(function onNgViewEnter(){if(angular.isDefined(autoScrollExp)&&(!autoScrollExp||scope.$eval(autoScrollExp))){$anchorScroll();}});cleanupLastView();});currentElement=clone;currentScope=current.scope=newScope;currentScope.$emit('$viewContentLoaded');currentScope.$eval(onloadExp);}else{cleanupLastView();}}}};}ngViewFillContentFactory.$inject=['$compile','$controller','$route'];function ngViewFillContentFactory($compile,$controller,$route){return{restrict:'ECA',priority:-400,link:function(scope,$element){var current=$route.current,locals=current.locals;$element.html(locals.$template);var link=$compile($element.contents());if(current.controller){locals.$scope=scope;var controller=$controller(current.controller,locals);if(current.controllerAs){scope[current.controllerAs]=controller;}$element.data('$ngControllerController',controller);$element.children().data('$ngControllerController',controller);}link(scope);}};}})(window,window.angular);(function(window,angular,undefined){'use strict';var $sanitizeMinErr=angular.$$minErr('$sanitize');function $SanitizeProvider(){this.$get=['$$sanitizeUri',function($$sanitizeUri){return function(html){var buf=[];htmlParser(html,htmlSanitizeWriter(buf,function(uri,isImage){return!/^unsafe/.test($$sanitizeUri(uri,isImage));}));return buf.join('');};}];}function sanitizeText(chars){var buf=[];var writer=htmlSanitizeWriter(buf,angular.noop);writer.chars(chars);return buf.join('');}var START_TAG_REGEXP=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,END_TAG_REGEXP=/^<\/\s*([\w:-]+)[^>]*>/,ATTR_REGEXP=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,BEGIN_TAG_REGEXP=/^</,BEGING_END_TAGE_REGEXP=/^<\//,COMMENT_REGEXP=/<!--(.*?)-->/g,DOCTYPE_REGEXP=/<!DOCTYPE([^>]*?)>/i,CDATA_REGEXP=/<!\[CDATA\[(.*?)]]>/g,SURROGATE_PAIR_REGEXP=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,NON_ALPHANUMERIC_REGEXP=/([^\#-~| |!])/g;var voidElements=makeMap("area,br,col,hr,img,wbr");var optionalEndTagBlockElements=makeMap("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),optionalEndTagInlineElements=makeMap("rp,rt"),optionalEndTagElements=angular.extend({},optionalEndTagInlineElements,optionalEndTagBlockElements);var blockElements=angular.extend({},optionalEndTagBlockElements,makeMap("address,article,"+"aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,"+"h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul"));var inlineElements=angular.extend({},optionalEndTagInlineElements,makeMap("a,abbr,acronym,b,"+"bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,"+"samp,small,span,strike,strong,sub,sup,time,tt,u,var"));var svgElements=makeMap("animate,animateColor,animateMotion,animateTransform,circle,defs,"+"desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,"+"line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,set,"+"stop,svg,switch,text,title,tspan,use");var specialElements=makeMap("script,style");var validElements=angular.extend({},voidElements,blockElements,inlineElements,optionalEndTagElements,svgElements);var uriAttrs=makeMap("background,cite,href,longdesc,src,usemap,xlink:href");var htmlAttrs=makeMap('abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,'+'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,'+'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,'+'scope,scrolling,shape,size,span,start,summary,target,title,type,'+'valign,value,vspace,width');var svgAttrs=makeMap('accent-height,accumulate,additive,alphabetic,arabic-form,ascent,'+'attributeName,attributeType,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,'+'color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,'+'font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,'+'gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,'+'keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,'+'markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,'+'overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,'+'repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,'+'stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,'+'stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,'+'stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,'+'underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,'+'viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,'+'xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,'+'zoomAndPan');var validAttrs=angular.extend({},uriAttrs,svgAttrs,htmlAttrs);function makeMap(str){var obj={},items=str.split(','),i;for(i=0;i<items.length;i++)obj[items[i]]=true;return obj;}function htmlParser(html,handler){if(typeof html!=='string'){if(html===null||typeof html==='undefined'){html='';}else{html=''+html;}}var index,chars,match,stack=[],last=html,text;stack.last=function(){return stack[stack.length-1];};while(html){text='';chars=true;if(!stack.last()||!specialElements[stack.last()]){if(html.indexOf("<!--")===0){index=html.indexOf("--",4);if(index>=0&&html.lastIndexOf("-->",index)===index){if(handler.comment)handler.comment(html.substring(4,index));html=html.substring(index+3);chars=false;}}else if(DOCTYPE_REGEXP.test(html)){match=html.match(DOCTYPE_REGEXP);if(match){html=html.replace(match[0],'');chars=false;}}else if(BEGING_END_TAGE_REGEXP.test(html)){match=html.match(END_TAG_REGEXP);if(match){html=html.substring(match[0].length);match[0].replace(END_TAG_REGEXP,parseEndTag);chars=false;}}else if(BEGIN_TAG_REGEXP.test(html)){match=html.match(START_TAG_REGEXP);if(match){if(match[4]){html=html.substring(match[0].length);match[0].replace(START_TAG_REGEXP,parseStartTag);}chars=false;}else{text+='<';html=html.substring(1);}}if(chars){index=html.indexOf("<");text+=index<0?html:html.substring(0,index);html=index<0?"":html.substring(index);if(handler.chars)handler.chars(decodeEntities(text));}}else{html=html.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+stack.last()+"[^>]*>",'i'),function(all,text){text=text.replace(COMMENT_REGEXP,"$1").replace(CDATA_REGEXP,"$1");if(handler.chars)handler.chars(decodeEntities(text));return"";});parseEndTag("",stack.last());}if(html==last){throw $sanitizeMinErr('badparse',"The sanitizer was unable to parse the following block "+"of html: {0}",html);}last=html;}parseEndTag();function parseStartTag(tag,tagName,rest,unary){tagName=angular.lowercase(tagName);if(blockElements[tagName]){while(stack.last()&&inlineElements[stack.last()]){parseEndTag("",stack.last());}}if(optionalEndTagElements[tagName]&&stack.last()==tagName){parseEndTag("",tagName);}unary=voidElements[tagName]||!!unary;if(!unary)stack.push(tagName);var attrs={};rest.replace(ATTR_REGEXP,function(match,name,doubleQuotedValue,singleQuotedValue,unquotedValue){var value=doubleQuotedValue||singleQuotedValue||unquotedValue||'';attrs[name]=decodeEntities(value);});if(handler.start)handler.start(tagName,attrs,unary);}function parseEndTag(tag,tagName){var pos=0,i;tagName=angular.lowercase(tagName);if(tagName)for(pos=stack.length-1;pos>=0;pos--)if(stack[pos]==tagName)break;if(pos>=0){for(i=stack.length-1;i>=pos;i--)if(handler.end)handler.end(stack[i]);stack.length=pos;}}}var hiddenPre=document.createElement("pre");function decodeEntities(value){if(!value){return'';}hiddenPre.innerHTML=value.replace(/</g,"&lt;");return hiddenPre.textContent;}function encodeEntities(value){return value.replace(/&/g,'&amp;').replace(SURROGATE_PAIR_REGEXP,function(value){var hi=value.charCodeAt(0);var low=value.charCodeAt(1);return'&#'+(((hi-0xD800)*0x400)+(low-0xDC00)+0x10000)+';';}).replace(NON_ALPHANUMERIC_REGEXP,function(value){return'&#'+value.charCodeAt(0)+';';}).replace(/</g,'&lt;').replace(/>/g,'&gt;');}function htmlSanitizeWriter(buf,uriValidator){var ignore=false;var out=angular.bind(buf,buf.push);return{start:function(tag,attrs,unary){tag=angular.lowercase(tag);if(!ignore&&specialElements[tag]){ignore=tag;}if(!ignore&&validElements[tag]===true){out('<');out(tag);angular.forEach(attrs,function(value,key){var lkey=angular.lowercase(key);var isImage=(tag==='img'&&lkey==='src')||(lkey==='background');if(validAttrs[lkey]===true&&(uriAttrs[lkey]!==true||uriValidator(value,isImage))){out(' ');out(key);out('="');out(encodeEntities(value));out('"');}});out(unary?'/>':'>');}},end:function(tag){tag=angular.lowercase(tag);if(!ignore&&validElements[tag]===true){out('</');out(tag);out('>');}if(tag==ignore){ignore=false;}},chars:function(chars){if(!ignore){out(encodeEntities(chars));}}};}angular.module('ngSanitize',[]).provider('$sanitize',$SanitizeProvider);angular.module('ngSanitize').filter('linky',['$sanitize',function($sanitize){var LINKY_URL_REGEXP=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"<22><>]/,MAILTO_REGEXP=/^mailto:/;return function(text,target){if(!text)return text;var match;var raw=text;var html=[];var url;var i;while((match=raw.match(LINKY_URL_REGEXP))){url=match[0];if(!match[2]&&!match[4]){url=(match[3]?'http://':'mailto:')+url;}i=match.index;addText(raw.substr(0,i));addLink(url,match[0].replace(MAILTO_REGEXP,''));raw=raw.substring(i+match[0].length);}addText(raw);return $sanitize(html.join(''));function addText(text){if(!text){return;}html.push(sanitizeText(text));}function addLink(url,text){html.push('<a ');if(angular.isDefined(target)){html.push('target="',target,'" ');}html.push('href="',url.replace(/"/g,'&quot;'),'">');addText(text);html.push('</a>');}};}]);})(window,window.angular);(function(window,angular,undefined){'use strict';var ngTouch=angular.module('ngTouch',[]);ngTouch.factory('$swipe',[function(){var MOVE_BUFFER_RADIUS=10;var POINTER_EVENTS={'mouse':{start:'mousedown',move:'mousemove',end:'mouseup'},'touch':{start:'touchstart',move:'touchmove',end:'touchend',cancel:'touchcancel'}};function getCoordinates(event){var touches=event.touches&&event.touches.length?event.touches:[event];var e=(event.changedTouches&&event.changedTouches[0])||(event.originalEvent&&event.originalEvent.changedTouches&&event.originalEvent.changedTouches[0])||touches[0].originalEvent||touches[0];return{x:e.clientX,y:e.clientY};}function getEvents(pointerTypes,eventType){var res=[];angular.forEach(pointerTypes,function(pointerType){var eventName=POINTER_EVENTS[pointerType][eventType];if(eventName){res.push(eventName);}});return res.join(' ');}return{bind:function(element,eventHandlers,pointerTypes){var totalX,totalY;var startCoords;var lastPos;var active=false;pointerTypes=pointerTypes||['mouse','touch'];element.on(getEvents(pointerTypes,'start'),function(event){startCoords=getCoordinates(event);active=true;totalX=0;totalY=0;lastPos=startCoords;eventHandlers['start']&&eventHandlers['start'](startCoords,event);});var events=getEvents(pointerTypes,'cancel');if(events){element.on(events,function(event){active=false;eventHandlers['cancel']&&eventHandlers['cancel'](event);});}element.on(getEvents(pointerTypes,'move'),function(event){if(!active)return;if(!startCoords)return;var coords=getCoordinates(event);totalX+=Math.abs(coords.x-lastPos.x);totalY+=Math.abs(coords.y-lastPos.y);lastPos=coords;if(totalX<MOVE_BUFFER_RADIUS&&totalY<MOVE_BUFFER_RADIUS){return;}if(totalY>totalX){active=false;eventHandlers['cancel']&&eventHandlers['cancel'](event);return;}else{event.preventDefault();eventHandlers['move']&&eventHandlers['move'](coords,event);}});element.on(getEvents(pointerTypes,'end'),function(event){if(!active)return;active=false;eventHandlers['end']&&eventHandlers['end'](getCoordinates(event),event);});}};}]);ngTouch.config(['$provide',function($provide){$provide.decorator('ngClickDirective',['$delegate',function($delegate){$delegate.shift();return $delegate;}]);}]);ngTouch.directive('ngClick',['$parse','$timeout','$rootElement',function($parse,$timeout,$rootElement){var TAP_DURATION=750;var MOVE_TOLERANCE=12;var PREVENT_DURATION=2500;var CLICKBUSTER_THRESHOLD=25;var ACTIVE_CLASS_NAME='ng-click-active';var lastPreventedTime;var touchCoordinates;var lastLabelClickCoordinates;function hit(x1,y1,x2,y2){return Math.abs(x1-x2)<CLICKBUSTER_THRESHOLD&&Math.abs(y1-y2)<CLICKBUSTER_THRESHOLD;}function checkAllowableRegions(touchCoordinates,x,y){for(var i=0;i<touchCoordinates.length;i+=2){if(hit(touchCoordinates[i],touchCoordinates[i+1],x,y)){touchCoordinates.splice(i,i+2);return true;}}return false;}function onClick(event){if(Date.now()-lastPreventedTime>PREVENT_DURATION){return;}var touches=event.touches&&event.touches.length?event.touches:[event];var x=touches[0].clientX;var y=touches[0].clientY;if(x<1&&y<1){return;}if(lastLabelClickCoordinates&&lastLabelClickCoordinates[0]===x&&lastLabelClickCoordinates[1]===y){return;}if(lastLabelClickCoordinates){lastLabelClickCoordinates=null;}if(event.target.tagName.toLowerCase()==='label'){lastLabelClickCoordinates=[x,y];}if(checkAllowableRegions(touchCoordinates,x,y)){return;}event.stopPropagation();event.preventDefault();event.target&&event.target.blur();}function onTouchStart(event){var touches=event.touches&&event.touches.length?event.touches:[event];var x=touches[0].clientX;var y=touches[0].clientY;touchCoordinates.push(x,y);$timeout(function(){for(var i=0;i<touchCoordinates.length;i+=2){if(touchCoordinates[i]==x&&touchCoordinates[i+1]==y){touchCoordinates.splice(i,i+2);return;}}},PREVENT_DURATION,false);}function preventGhostClick(x,y){if(!touchCoordinates){$rootElement[0].addEventListener('click',onClick,true);$rootElement[0].addEventListener('touchstart',onTouchStart,true);touchCoordinates=[];}lastPreventedTime=Date.now();checkAllowableRegions(touchCoordinates,x,y);}return function(scope,element,attr){var clickHandler=$parse(attr.ngClick),tapping=false,tapElement,startTime,touchStartX,touchStartY;function resetState(){tapping=false;element.removeClass(ACTIVE_CLASS_NAME);}element.on('touchstart',function(event){tapping=true;tapElement=event.target?event.target:event.srcElement;if(tapElement.nodeType==3){tapElement=tapElement.parentNode;}element.addClass(ACTIVE_CLASS_NAME);startTime=Date.now();var touches=event.touches&&event.touches.length?event.touches:[event];var e=touches[0].originalEvent||touches[0];touchStartX=e.clientX;touchStartY=e.clientY;});element.on('touchmove',function(event){resetState();});element.on('touchcancel',function(event){resetState();});element.on('touchend',function(event){var diff=Date.now()-startTime;var touches=(event.changedTouches&&event.changedTouches.length)?event.changedTouches:((event.touches&&event.touches.length)?event.touches:[event]);var e=touches[0].originalEvent||touches[0];var x=e.clientX;var y=e.clientY;var dist=Math.sqrt(Math.pow(x-touchStartX,2)+Math.pow(y-touchStartY,2));if(tapping&&diff<TAP_DURATION&&dist<MOVE_TOLERANCE){preventGhostClick(x,y);if(tapElement){tapElement.blur();}if(!angular.isDefined(attr.disabled)||attr.disabled===false){element.triggerHandler('click',[event]);}}resetState();});element.onclick=function(event){};element.on('click',function(event,touchend){scope.$apply(function(){clickHandler(scope,{$event:(touchend||event)});});});element.on('mousedown',function(event){element.addClass(ACTIVE_CLASS_NAME);});element.on('mousemove mouseup',function(event){element.removeClass(ACTIVE_CLASS_NAME);});};}]);function makeSwipeDirective(directiveName,direction,eventName){ngTouch.directive(directiveName,['$parse','$swipe',function($parse,$swipe){var MAX_VERTICAL_DISTANCE=75;var MAX_VERTICAL_RATIO=0.3;var MIN_HORIZONTAL_DISTANCE=30;return function(scope,element,attr){var swipeHandler=$parse(attr[directiveName]);var startCoords,valid;function validSwipe(coords){if(!startCoords)return false;var deltaY=Math.abs(coords.y-startCoords.y);var deltaX=(coords.x-startCoords.x)*direction;return valid&&deltaY<MAX_VERTICAL_DISTANCE&&deltaX>0&&deltaX>MIN_HORIZONTAL_DISTANCE&&deltaY/deltaX<MAX_VERTICAL_RATIO;}var pointerTypes=['touch'];if(!angular.isDefined(attr['ngSwipeDisableMouse'])){pointerTypes.push('mouse');}$swipe.bind(element,{'start':function(coords,event){startCoords=coords;valid=true;},'cancel':function(event){valid=false;},'end':function(coords,event){if(validSwipe(coords)){scope.$apply(function(){element.triggerHandler(eventName);swipeHandler(scope,{$event:event});});}}},pointerTypes);};}]);}makeSwipeDirective('ngSwipeLeft',-1,'swipeleft');makeSwipeDirective('ngSwipeRight',1,'swiperight');})(window,window.angular);(function(window){var slice=Array.prototype.slice;function noop(){}function defineBridget($){if(!$){return;}function addOptionMethod(PluginClass){if(PluginClass.prototype.option){return;}PluginClass.prototype.option=function(opts){if(!$.isPlainObject(opts)){return;}this.options=$.extend(true,this.options,opts);};}var logError=typeof console==='undefined'?noop:function(message){console.error(message);};function bridge(namespace,PluginClass){$.fn[namespace]=function(options){if(typeof options==='string'){var args=slice.call(arguments,1);for(var i=0,len=this.length;i<len;i++){var elem=this[i];var instance=$.data(elem,namespace);if(!instance){logError("cannot call methods on "+namespace+" prior to initialization; "+"attempted to call '"+options+"'");continue;}if(!$.isFunction(instance[options])||options.charAt(0)==='_'){logError("no such method '"+options+"' for "+namespace+" instance");continue;}var returnValue=instance[options].apply(instance,args);if(returnValue!==undefined){return returnValue;}}return this;}else{return this.each(function(){var instance=$.data(this,namespace);if(instance){instance.option(options);instance._init();}else{instance=new PluginClass(this,options);$.data(this,namespace,instance);}});}};}$.bridget=function(namespace,PluginClass){addOptionMethod(PluginClass);bridge(namespace,PluginClass);};return $.bridget;}if(typeof define==='function'&&define.amd){define('jquery-bridget/jquery.bridget',['jquery'],defineBridget);}else if(typeof exports==='object'){defineBridget(require('jquery'));}else{defineBridget(window.jQuery);}})(window);(function(window){var docElem=document.documentElement;var bind=function(){};function getIEEvent(obj){var event=window.event;event.target=event.target||event.srcElement||obj;return event;}if(docElem.addEventListener){bind=function(obj,type,fn){obj.addEventListener(type,fn,false);};}else if(docElem.attachEvent){bind=function(obj,type,fn){obj[type+fn]=fn.handleEvent?function(){var event=getIEEvent(obj);fn.handleEvent.call(fn,event);}:function(){var event=getIEEvent(obj);fn.call(obj,event);};obj.attachEvent("on"+type,obj[type+fn]);};}var unbind=function(){};if(docElem.removeEventListener){unbind=function(obj,type,fn){obj.removeEventListener(type,fn,false);};}else if(docElem.detachEvent){unbind=function(obj,type,fn){obj.detachEvent("on"+type,obj[type+fn]);try{delete obj[type+fn];}catch(err){obj[type+fn]=undefined;}};}var eventie={bind:bind,unbind:unbind};if(typeof define==='function'&&define.amd){define('eventie/eventie',eventie);}else if(typeof exports==='object'){module.exports=eventie;}else{window.eventie=eventie;}})(window);;(function(){function EventEmitter(){}var proto=EventEmitter.prototype;var exports=this;var originalGlobalValue=exports.EventEmitter;function indexOfListener(listeners,listener){var i=listeners.length;while(i--){if(listeners[i].listener===listener){return i;}}return-1;}function alias(name){return function aliasClosure(){return this[name].apply(this,arguments);};}proto.getListeners=function getListeners(evt){var events=this._getEvents();var response;var key;if(evt instanceof RegExp){response={};for(key in events){if(events.hasOwnProperty(key)&&evt.test(key)){response[key]=events[key];}}}else{response=events[evt]||(events[evt]=[]);}return response;};proto.flattenListeners=function flattenListeners(listeners){var flatListeners=[];var i;for(i=0;i<listeners.length;i+=1){flatListeners.push(listeners[i].listener);}return flatListeners;};proto.getListenersAsObject=function getListenersAsObject(evt){var listeners=this.getListeners(evt);var response;if(listeners instanceof Array){response={};response[evt]=listeners;}return response||listeners;};proto.addListener=function addListener(evt,listener){var listeners=this.getListenersAsObject(evt);var listenerIsWrapped=typeof listener==='object';var key;for(key in listeners){if(listeners.hasOwnProperty(key)&&indexOfListener(listeners[key],listener)===-1){listeners[key].push(listenerIsWrapped?listener:{listener:listener,once:false});}}return this;};proto.on=alias('addListener');proto.addOnceListener=function addOnceListener(evt,listener){return this.addListener(evt,{listener:listener,once:true});};proto.once=alias('addOnceListener');proto.defineEvent=function defineEvent(evt){this.getListeners(evt);return this;};proto.defineEvents=function defineEvents(evts){for(var i=0;i<evts.length;i+=1){this.defineEvent(evts[i]);}return this;};proto.removeListener=function removeListener(evt,listener){var listeners=this.getListenersAsObject(evt);var index;var key;for(key in listeners){if(listeners.hasOwnProperty(key)){index=indexOfListener(listeners[key],listener);if(index!==-1){listeners[key].splice(index,1);}}}return this;};proto.off=alias('removeListener');proto.addListeners=function addListeners(evt,listeners){return this.manipulateListeners(false,evt,listeners);};proto.removeListeners=function removeListeners(evt,listeners){return this.manipulateListeners(true,evt,listeners);};proto.manipulateListeners=function manipulateListeners(remove,evt,listeners){var i;var value;var single=remove?this.removeListener:this.addListener;var multiple=remove?this.removeListeners:this.addListeners;if(typeof evt==='object'&&!(evt instanceof RegExp)){for(i in evt){if(evt.hasOwnProperty(i)&&(value=evt[i])){if(typeof value==='function'){single.call(this,i,value);}else{multiple.call(this,i,value);}}}}else{i=listeners.length;while(i--){single.call(this,evt,listeners[i]);}}return this;};proto.removeEvent=function removeEvent(evt){var type=typeof evt;var events=this._getEvents();var key;if(type==='string'){delete events[evt];}else if(evt instanceof RegExp){for(key in events){if(events.hasOwnProperty(key)&&evt.test(key)){delete events[key];}}}else{delete this._events;}return this;};proto.removeAllListeners=alias('removeEvent');proto.emitEvent=function emitEvent(evt,args){var listeners=this.getListenersAsObject(evt);var listener;var i;var key;var response;for(key in listeners){if(listeners.hasOwnProperty(key)){i=listeners[key].length;while(i--){listener=listeners[key][i];if(listener.once===true){this.removeListener(evt,listener.listener);}response=listener.listener.apply(this,args||[]);if(response===this._getOnceReturnValue()){this.removeListener(evt,listener.listener);}}}}return this;};proto.trigger=alias('emitEvent');proto.emit=function emit(evt){var args=Array.prototype.slice.call(arguments,1);return this.emitEvent(evt,args);};proto.setOnceReturnValue=function setOnceReturnValue(value){this._onceReturnValue=value;return this;};proto._getOnceReturnValue=function _getOnceReturnValue(){if(this.hasOwnProperty('_onceReturnValue')){return this._onceReturnValue;}else{return true;}};proto._getEvents=function _getEvents(){return this._events||(this._events={});};EventEmitter.noConflict=function noConflict(){exports.EventEmitter=originalGlobalValue;return EventEmitter;};if(typeof define==='function'&&define.amd){define('eventEmitter/EventEmitter',[],function(){return EventEmitter;});}else if(typeof module==='object'&&module.exports){module.exports=EventEmitter;}else{exports.EventEmitter=EventEmitter;}}.call(this));(function(window){var prefixes='Webkit Moz ms Ms O'.split(' ');var docElemStyle=document.documentElement.style;function getStyleProperty(propName){if(!propName){return;}if(typeof docElemStyle[propName]==='string'){return propName;}propName=propName.charAt(0).toUpperCase()+propName.slice(1);var prefixed;for(var i=0,len=prefixes.length;i<len;i++){prefixed=prefixes[i]+propName;if(typeof docElemStyle[prefixed]==='string'){return prefixed;}}}if(typeof define==='function'&&define.amd){define('get-style-property/get-style-property',[],function(){return getStyleProperty;});}else if(typeof exports==='object'){module.exports=getStyleProperty;}else{window.getStyleProperty=getStyleProperty;}})(window);(function(window,undefined){function getStyleSize(value){var num=parseFloat(value);var isValid=value.indexOf('%')===-1&&!isNaN(num);return isValid&&num;}function noop(){}var logError=typeof console==='undefined'?noop:function(message){console.error(message);};var measurements=['paddingLeft','paddingRight','paddingTop','paddingBottom','marginLeft','marginRight','marginTop','marginBottom','borderLeftWidth','borderRightWidth','borderTopWidth','borderBottomWidth'];function getZeroSize(){var size={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(var i=0,len=measurements.length;i<len;i++){var measurement=measurements[i];size[measurement]=0;}return size;}function defineGetSize(getStyleProperty){var isSetup=false;var getStyle,boxSizingProp,isBoxSizeOuter;function setup(){if(isSetup){return;}isSetup=true;var getComputedStyle=window.getComputedStyle;getStyle=(function(){var getStyleFn=getComputedStyle?function(elem){return getComputedStyle(elem,null);}:function(elem){return elem.currentStyle;};return function getStyle(elem){var style=getStyleFn(elem);if(!style){logError('Style returned '+style+'. Are you running this code in a hidden iframe on Firefox? '+'See http://bit.ly/getsizebug1');}return style;};})();boxSizingProp=getStyleProperty('boxSizing');if(boxSizingProp){var div=document.createElement('div');div.style.width='200px';div.style.padding='1px 2px 3px 4px';div.style.borderStyle='solid';div.style.borderWidth='1px 2px 3px 4px';div.style[boxSizingProp]='border-box';var body=document.body||document.documentElement;body.appendChild(div);var style=getStyle(div);isBoxSizeOuter=getStyleSize(style.width)===200;body.removeChild(div);}}function getSize(elem){setup();if(typeof elem==='string'){elem=document.querySelector(elem);}if(!elem||typeof elem!=='object'||!elem.nodeType){return;}var style=getStyle(elem);if(style.display==='none'){return getZeroSize();}var size={};size.width=elem.offsetWidth;size.height=elem.offsetHeight;var isBorderBox=size.isBorderBox=!!(boxSizingProp&&style[boxSizingProp]&&style[boxSizingProp]==='border-box');for(var i=0,len=measurements.length;i<len;i++){var measurement=measurements[i];var value=style[measurement];value=mungeNonPixel(elem,value);var num=parseFloat(value);size[measurement]=!isNaN(num)?num:0;}var paddingWidth=size.paddingLeft+size.paddingRight;var paddingHeight=size.paddingTop+size.paddingBottom;var marginWidth=size.marginLeft+size.marginRight;var marginHeight=size.marginTop+size.marginBottom;var borderWidth=size.borderLeftWidth+size.borderRightWidth;var borderHeight=size.borderTopWidth+size.borderBottomWidth;var isBorderBoxSizeOuter=isBorderBox&&isBoxSizeOuter;var styleWidth=getStyleSize(style.width);if(styleWidth!==false){size.width=styleWidth+(isBorderBoxSizeOuter?0:paddingWidth+borderWidth);}var styleHeight=getStyleSize(style.height);if(styleHeight!==false){size.height=styleHeight+(isBorderBoxSizeOuter?0:paddingHeight+borderHeight);}size.innerWidth=size.width-(paddingWidth+borderWidth);size.innerHeight=size.height-(paddingHeight+borderHeight);size.outerWidth=size.width+marginWidth;size.outerHeight=size.height+marginHeight;return size;}function mungeNonPixel(elem,value){if(window.getComputedStyle||value.indexOf('%')===-1){return value;}var style=elem.style;var left=style.left;var rs=elem.runtimeStyle;var rsLeft=rs&&rs.left;if(rsLeft){rs.left=elem.currentStyle.left;}style.left=value;value=style.pixelLeft;style.left=left;if(rsLeft){rs.left=rsLeft;}return value;}return getSize;}if(typeof define==='function'&&define.amd){define('get-size/get-size',['get-style-property/get-style-property'],defineGetSize);}else if(typeof exports==='object'){module.exports=defineGetSize(require('desandro-get-style-property'));}else{window.getSize=defineGetSize(window.getStyleProperty);}})(window);(function(window){var document=window.document;var queue=[];function docReady(fn){if(typeof fn!=='function'){return;}if(docReady.isReady){fn();}else{queue.push(fn);}}docReady.isReady=false;function onReady(event){var isIE8NotReady=event.type==='readystatechange'&&document.readyState!=='complete';if(docReady.isReady||isIE8NotReady){return;}trigger();}function trigger(){docReady.isReady=true;for(var i=0,len=queue.length;i<len;i++){var fn=queue[i];fn();}}function defineDocReady(eventie){if(document.readyState==='complete'){trigger();}else{eventie.bind(document,'DOMContentLoaded',onReady);eventie.bind(document,'readystatechange',onReady);eventie.bind(window,'load',onReady);}return docReady;}if(typeof define==='function'&&define.amd){define('doc-ready/doc-ready',['eventie/eventie'],defineDocReady);}else if(typeof exports==='object'){module.exports=defineDocReady(require('eventie'));}else{window.docReady=defineDocReady(window.eventie);}})(window);(function(ElemProto){var matchesMethod=(function(){if(ElemProto.matches){return'matches';}if(ElemProto.matchesSelector){return'matchesSelector';}var prefixes=['webkit','moz','ms','o'];for(var i=0,len=prefixes.length;i<len;i++){var prefix=prefixes[i];var method=prefix+'MatchesSelector';if(ElemProto[method]){return method;}}})();function match(elem,selector){return elem[matchesMethod](selector);}function checkParent(elem){if(elem.parentNode){return;}var fragment=document.createDocumentFragment();fragment.appendChild(elem);}function query(elem,selector){checkParent(elem);var elems=elem.parentNode.querySelectorAll(selector);for(var i=0,len=elems.length;i<len;i++){if(elems[i]===elem){return true;}}return false;}function matchChild(elem,selector){checkParent(elem);return match(elem,selector);}var matchesSelector;if(matchesMethod){var div=document.createElement('div');var supportsOrphans=match(div,'div');matchesSelector=supportsOrphans?match:matchChild;}else{matchesSelector=query;}if(typeof define==='function'&&define.amd){define('matches-selector/matches-selector',[],function(){return matchesSelector;});}else if(typeof exports==='object'){module.exports=matchesSelector;}else{window.matchesSelector=matchesSelector;}})(Element.prototype);(function(window,factory){if(typeof define=='function'&&define.amd){define('fizzy-ui-utils/utils',['doc-ready/doc-ready','matches-selector/matches-selector'],function(docReady,matchesSelector){return factory(window,docReady,matchesSelector);});}else if(typeof exports=='object'){module.exports=factory(window,require('doc-ready'),require('desandro-matches-selector'));}else{window.fizzyUIUtils=factory(window,window.docReady,window.matchesSelector);}}(window,function factory(window,docReady,matchesSelector){var utils={};utils.extend=function(a,b){for(var prop in b){a[prop]=b[prop];}return a;};utils.modulo=function(num,div){return((num%div)+div)%div;};var objToString=Object.prototype.toString;utils.isArray=function(obj){return objToString.call(obj)=='[object Array]';};utils.makeArray=function(obj){var ary=[];if(utils.isArray(obj)){ary=obj;}else if(obj&&typeof obj.length=='number'){for(var i=0,len=obj.length;i<len;i++){ary.push(obj[i]);}}else{ary.push(obj);}return ary;};utils.indexOf=Array.prototype.indexOf?function(ary,obj){return ary.indexOf(obj);}:function(ary,obj){for(var i=0,len=ary.length;i<len;i++){if(ary[i]===obj){return i;}}return-1;};utils.removeFrom=function(ary,obj){var index=utils.indexOf(ary,obj);if(index!=-1){ary.splice(index,1);}};utils.isElement=(typeof HTMLElement=='function'||typeof HTMLElement=='object')?function isElementDOM2(obj){return obj instanceof HTMLElement;}:function isElementQuirky(obj){return obj&&typeof obj=='object'&&obj.nodeType==1&&typeof obj.nodeName=='string';};utils.setText=(function(){var setTextProperty;function setText(elem,text){setTextProperty=setTextProperty||(document.documentElement.textContent!==undefined?'textContent':'innerText');elem[setTextProperty]=text;}return setText;})();utils.getParent=function(elem,selector){while(elem!=document.body){elem=elem.parentNode;if(matchesSelector(elem,selector)){return elem;}}};utils.getQueryElement=function(elem){if(typeof elem=='string'){return document.querySelector(elem);}return elem;};utils.handleEvent=function(event){var method='on'+event.type;if(this[method]){this[method](event);}};utils.filterFindElements=function(elems,selector){elems=utils.makeArray(elems);var ffElems=[];for(var i=0,len=elems.length;i<len;i++){var elem=elems[i];if(!utils.isElement(elem)){continue;}if(selector){if(matchesSelector(elem,selector)){ffElems.push(elem);}var childElems=elem.querySelectorAll(selector);for(var j=0,jLen=childElems.length;j<jLen;j++){ffElems.push(childElems[j]);}}else{ffElems.push(elem);}}return ffElems;};utils.debounceMethod=function(_class,methodName,threshold){var method=_class.prototype[methodName];var timeoutName=methodName+'Timeout';_class.prototype[methodName]=function(){var timeout=this[timeoutName];if(timeout){clearTimeout(timeout);}var args=arguments;var _this=this;this[timeoutName]=setTimeout(function(){method.apply(_this,args);delete _this[timeoutName];},threshold||100);};};utils.toDashed=function(str){return str.replace(/(.)([A-Z])/g,function(match,$1,$2){return $1+'-'+$2;}).toLowerCase();};var console=window.console;utils.htmlInit=function(WidgetClass,namespace){docReady(function(){var dashedNamespace=utils.toDashed(namespace);var elems=document.querySelectorAll('.js-'+dashedNamespace);var dataAttr='data-'+dashedNamespace+'-options';for(var i=0,len=elems.length;i<len;i++){var elem=elems[i];var attr=elem.getAttribute(dataAttr);var options;try{options=attr&&JSON.parse(attr);}catch(error){if(console){console.error('Error parsing '+dataAttr+' on '+elem.nodeName.toLowerCase()+(elem.id?'#'+elem.id:'')+': '+error);}continue;}var instance=new WidgetClass(elem,options);var jQuery=window.jQuery;if(jQuery){jQuery.data(elem,namespace,instance);}}});};return utils;}));(function(window,factory){if(typeof define==='function'&&define.amd){define('outlayer/item',['eventEmitter/EventEmitter','get-size/get-size','get-style-property/get-style-property','fizzy-ui-utils/utils'],function(EventEmitter,getSize,getStyleProperty,utils){return factory(window,EventEmitter,getSize,getStyleProperty,utils);});}else if(typeof exports==='object'){module.exports=factory(window,require('wolfy87-eventemitter'),require('get-size'),require('desandro-get-style-property'),require('fizzy-ui-utils'));}else{window.Outlayer={};window.Outlayer.Item=factory(window,window.EventEmitter,window.getSize,window.getStyleProperty,window.fizzyUIUtils);}}(window,function factory(window,EventEmitter,getSize,getStyleProperty,utils){var getComputedStyle=window.getComputedStyle;var getStyle=getComputedStyle?function(elem){return getComputedStyle(elem,null);}:function(elem){return elem.currentStyle;};function isEmptyObj(obj){for(var prop in obj){return false;}prop=null;return true;}var transitionProperty=getStyleProperty('transition');var transformProperty=getStyleProperty('transform');var supportsCSS3=transitionProperty&&transformProperty;var is3d=!!getStyleProperty('perspective');var transitionEndEvent={WebkitTransition:'webkitTransitionEnd',MozTransition:'transitionend',OTransition:'otransitionend',transition:'transitionend'}[transitionProperty];var prefixableProperties=['transform','transition','transitionDuration','transitionProperty'];var vendorProperties=(function(){var cache={};for(var i=0,len=prefixableProperties.length;i<len;i++){var prop=prefixableProperties[i];var supportedProp=getStyleProperty(prop);if(supportedProp&&supportedProp!==prop){cache[prop]=supportedProp;}}return cache;})();function Item(element,layout){if(!element){return;}this.element=element;this.layout=layout;this.position={x:0,y:0};this._create();}utils.extend(Item.prototype,EventEmitter.prototype);Item.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}};this.css({position:'absolute'});};Item.prototype.handleEvent=function(event){var method='on'+event.type;if(this[method]){this[method](event);}};Item.prototype.getSize=function(){this.size=getSize(this.element);};Item.prototype.css=function(style){var elemStyle=this.element.style;for(var prop in style){var supportedProp=vendorProperties[prop]||prop;elemStyle[supportedProp]=style[prop];}};Item.prototype.getPosition=function(){var style=getStyle(this.element);var layoutOptions=this.layout.options;var isOriginLeft=layoutOptions.isOriginLeft;var isOriginTop=layoutOptions.isOriginTop;var xValue=style[isOriginLeft?'left':'right'];var yValue=style[isOriginTop?'top':'bottom'];var x=parseInt(xValue,10);var y=parseInt(yValue,10);var layoutSize=this.layout.size;x=xValue.indexOf('%')!=-1?(x/100)*layoutSize.width:x;y=yValue.indexOf('%')!=-1?(y/100)*layoutSize.height:y;x=isNaN(x)?0:x;y=isNaN(y)?0:y;x-=isOriginLeft?layoutSize.paddingLeft:layoutSize.paddingRight;y-=isOriginTop?layoutSize.paddingTop:layoutSize.paddingBottom;this.position.x=x;this.position.y=y;};Item.prototype.layoutPosition=function(){var layoutSize=this.layout.size;var layoutOptions=this.layout.options;var style={};var xPadding=layoutOptions.isOriginLeft?'paddingLeft':'paddingRight';var xProperty=layoutOptions.isOriginLeft?'left':'right';var xResetProperty=layoutOptions.isOriginLeft?'right':'left';var x=this.position.x+layoutSize[xPadding];style[xProperty]=this.getXValue(x);style[xResetProperty]='';var yPadding=layoutOptions.isOriginTop?'paddingTop':'paddingBottom';var yProperty=layoutOptions.isOriginTop?'top':'bottom';var yResetProperty=layoutOptions.isOriginTop?'bottom':'top';var y=this.position.y+layoutSize[yPadding];style[yProperty]=this.getYValue(y);style[yResetProperty]='';this.css(style);this.emitEvent('layout',[this]);};Item.prototype.getXValue=function(x){var layoutOptions=this.layout.options;return layoutOptions.percentPosition&&!layoutOptions.isHorizontal?((x/this.layout.size.width)*100)+'%':x+'px';};Item.prototype.getYValue=function(y){var layoutOptions=this.layout.options;return layoutOptions.percentPosition&&layoutOptions.isHorizontal?((y/this.layout.size.height)*100)+'%':y+'px';};Item.prototype._transitionTo=function(x,y){this.getPosition();var curX=this.position.x;var curY=this.position.y;var compareX=parseInt(x,10);var compareY=parseInt(y,10);var didNotMove=compareX===this.position.x&&compareY===this.position.y;this.setPosition(x,y);if(didNotMove&&!this.isTransitioning){this.layoutPosition();return;}var transX=x-curX;var transY=y-curY;var transitionStyle={};transitionStyle.transform=this.getTranslate(transX,transY);this.transition({to:transitionStyle,onTransitionEnd:{transform:this.layoutPosition},isCleaning:true});};Item.prototype.getTranslate=function(x,y){var layoutOptions=this.layout.options;x=layoutOptions.isOriginLeft?x:-x;y=layoutOptions.isOriginTop?y:-y;x=this.getXValue(x);y=this.getYValue(y);if(is3d){return'translate3d('+x+', '+y+', 0)';}return'translate('+x+', '+y+')';};Item.prototype.goTo=function(x,y){this.setPosition(x,y);this.layoutPosition();};Item.prototype.moveTo=supportsCSS3?Item.prototype._transitionTo:Item.prototype.goTo;Item.prototype.setPosition=function(x,y){this.position.x=parseInt(x,10);this.position.y=parseInt(y,10);};Item.prototype._nonTransition=function(args){this.css(args.to);if(args.isCleaning){this._removeStyles(args.to);}for(var prop in args.onTransitionEnd){args.onTransitionEnd[prop].call(this);}};Item.prototype._transition=function(args){if(!parseFloat(this.layout.options.transitionDuration)){this._nonTransition(args);return;}var _transition=this._transn;for(var prop in args.onTransitionEnd){_transition.onEnd[prop]=args.onTransitionEnd[prop];}for(prop in args.to){_transition.ingProperties[prop]=true;if(args.isCleaning){_transition.clean[prop]=true;}}if(args.from){this.css(args.from);var h=this.element.offsetHeight;h=null;}this.enableTransition(args.to);this.css(args.to);this.isTransitioning=true;};function toDashedAll(str){return str.replace(/([A-Z])/g,function($1){return'-'+$1.toLowerCase();});}var transitionProps='opacity,'+toDashedAll(vendorProperties.transform||'transform');Item.prototype.enableTransition=function(){if(this.isTransitioning){return;}this.css({transitionProperty:transitionProps,transitionDuration:this.layout.options.transitionDuration});this.element.addEventListener(transitionEndEvent,this,false);};Item.prototype.transition=Item.prototype[transitionProperty?'_transition':'_nonTransition'];Item.prototype.onwebkitTransitionEnd=function(event){this.ontransitionend(event);};Item.prototype.onotransitionend=function(event){this.ontransitionend(event);};var dashedVendorProperties={'-webkit-transform':'transform','-moz-transform':'transform','-o-transform':'transform'};Item.prototype.ontransitionend=function(event){if(event.target!==this.element){return;}var _transition=this._transn;var propertyName=dashedVendorProperties[event.propertyName]||event.propertyName;delete _transition.ingProperties[propertyName];if(isEmptyObj(_transition.ingProperties)){this.disableTransition();}if(propertyName in _transition.clean){this.element.style[event.propertyName]='';delete _transition.clean[propertyName];}if(propertyName in _transition.onEnd){var onTransitionEnd=_transition.onEnd[propertyName];onTransitionEnd.call(this);delete _transition.onEnd[propertyName];}this.emitEvent('transitionEnd',[this]);};Item.prototype.disableTransition=function(){this.removeTransitionStyles();this.element.removeEventListener(transitionEndEvent,this,false);this.isTransitioning=false;};Item.prototype._removeStyles=function(style){var cleanStyle={};for(var prop in style){cleanStyle[prop]='';}this.css(cleanStyle);};var cleanTransitionStyle={transitionProperty:'',transitionDuration:''};Item.prototype.removeTransitionStyles=function(){this.css(cleanTransitionStyle);};Item.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element);this.css({display:''});this.emitEvent('remove',[this]);};Item.prototype.remove=function(){if(!transitionProperty||!parseFloat(this.layout.options.transitionDuration)){this.removeElem();return;}var _this=this;this.once('transitionEnd',function(){_this.removeElem();});this.hide();};Item.prototype.reveal=function(){delete this.isHidden;this.css({display:''});var options=this.layout.options;var onTransitionEnd={};var transitionEndProperty=this.getHideRevealTransitionEndProperty('visibleStyle');onTransitionEnd[transitionEndProperty]=this.onRevealTransitionEnd;this.transition({from:options.hiddenStyle,to:options.visibleStyle,isCleaning:true,onTransitionEnd:onTransitionEnd});};Item.prototype.onRevealTransitionEnd=function(){if(!this.isHidden){this.emitEvent('reveal');}};Item.prototype.getHideRevealTransitionEndProperty=function(styleProperty){var optionStyle=this.layout.options[styleProperty];if(optionStyle.opacity){return'opacity';}for(var prop in optionStyle){return prop;}};Item.prototype.hide=function(){this.isHidden=true;this.css({display:''});var options=this.layout.options;var onTransitionEnd={};var transitionEndProperty=this.getHideRevealTransitionEndProperty('hiddenStyle');onTransitionEnd[transitionEndProperty]=this.onHideTransitionEnd;this.transition({from:options.visibleStyle,to:options.hiddenStyle,isCleaning:true,onTransitionEnd:onTransitionEnd});};Item.prototype.onHideTransitionEnd=function(){if(this.isHidden){this.css({display:'none'});this.emitEvent('hide');}};Item.prototype.destroy=function(){this.css({position:'',left:'',right:'',top:'',bottom:'',transition:'',transform:''});};return Item;}));(function(window,factory){if(typeof define=='function'&&define.amd){define('outlayer/outlayer',['eventie/eventie','eventEmitter/EventEmitter','get-size/get-size','fizzy-ui-utils/utils','./item'],function(eventie,EventEmitter,getSize,utils,Item){return factory(window,eventie,EventEmitter,getSize,utils,Item);});}else if(typeof exports=='object'){module.exports=factory(window,require('eventie'),require('wolfy87-eventemitter'),require('get-size'),require('fizzy-ui-utils'),require('./item'));}else{window.Outlayer=factory(window,window.eventie,window.EventEmitter,window.getSize,window.fizzyUIUtils,window.Outlayer.Item);}}(window,function factory(window,eventie,EventEmitter,getSize,utils,Item){var console=window.console;var jQuery=window.jQuery;var noop=function(){};var GUID=0;var instances={};function Outlayer(element,options){var queryElement=utils.getQueryElement(element);if(!queryElement){if(console){console.error('Bad element for '+this.constructor.namespace+': '+(queryElement||element));}return;}this.element=queryElement;if(jQuery){this.$element=jQuery(this.element);}this.options=utils.extend({},this.constructor.defaults);this.option(options);var id=++GUID;this.element.outlayerGUID=id;instances[id]=this;this._create();if(this.options.isInitLayout){this.layout();}}Outlayer.namespace='outlayer';Outlayer.Item=Item;Outlayer.defaults={containerStyle:{position:'relative'},isInitLayout:true,isOriginLeft:true,isOriginTop:true,isResizeBound:true,isResizingContainer:true,transitionDuration:'0.4s',hiddenStyle:{opacity:0,transform:'scale(0.001)'},visibleStyle:{opacity:1,transform:'scale(1)'}};utils.extend(Outlayer.prototype,EventEmitter.prototype);Outlayer.prototype.option=function(opts){utils.extend(this.options,opts);};Outlayer.prototype._create=function(){this.reloadItems();this.stamps=[];this.stamp(this.options.stamp);utils.extend(this.element.style,this.options.containerStyle);if(this.options.isResizeBound){this.bindResize();}};Outlayer.prototype.reloadItems=function(){this.items=this._itemize(this.element.children);};Outlayer.prototype._itemize=function(elems){var itemElems=this._filterFindItemElements(elems);var Item=this.constructor.Item;var items=[];for(var i=0,len=itemElems.length;i<len;i++){var elem=itemElems[i];var item=new Item(elem,this);items.push(item);}return items;};Outlayer.prototype._filterFindItemElements=function(elems){return utils.filterFindElements(elems,this.options.itemSelector);};Outlayer.prototype.getItemElements=function(){var elems=[];for(var i=0,len=this.items.length;i<len;i++){elems.push(this.items[i].element);}return elems;};Outlayer.prototype.layout=function(){this._resetLayout();this._manageStamps();var isInstant=this.options.isLayoutInstant!==undefined?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,isInstant);this._isLayoutInited=true;};Outlayer.prototype._init=Outlayer.prototype.layout;Outlayer.prototype._resetLayout=function(){this.getSize();};Outlayer.prototype.getSize=function(){this.size=getSize(this.element);};Outlayer.prototype._getMeasurement=function(measurement,size){var option=this.options[measurement];var elem;if(!option){this[measurement]=0;}else{if(typeof option==='string'){elem=this.element.querySelector(option);}else if(utils.isElement(option)){elem=option;}this[measurement]=elem?getSize(elem)[size]:option;}};Outlayer.prototype.layoutItems=function(items,isInstant){items=this._getItemsForLayout(items);this._layoutItems(items,isInstant);this._postLayout();};Outlayer.prototype._getItemsForLayout=function(items){var layoutItems=[];for(var i=0,len=items.length;i<len;i++){var item=items[i];if(!item.isIgnored){layoutItems.push(item);}}return layoutItems;};Outlayer.prototype._layoutItems=function(items,isInstant){this._emitCompleteOnItems('layout',items);if(!items||!items.length){return;}var queue=[];for(var i=0,len=items.length;i<len;i++){var item=items[i];var position=this._getItemLayoutPosition(item);position.item=item;position.isInstant=isInstant||item.isLayoutInstant;queue.push(position);}this._processLayoutQueue(queue);};Outlayer.prototype._getItemLayoutPosition=function(){return{x:0,y:0};};Outlayer.prototype._processLayoutQueue=function(queue){for(var i=0,len=queue.length;i<len;i++){var obj=queue[i];this._positionItem(obj.item,obj.x,obj.y,obj.isInstant);}};Outlayer.prototype._positionItem=function(item,x,y,isInstant){if(isInstant){item.goTo(x,y);}else{item.moveTo(x,y);}};Outlayer.prototype._postLayout=function(){this.resizeContainer();};Outlayer.prototype.resizeContainer=function(){if(!this.options.isResizingContainer){return;}var size=this._getContainerSize();if(size){this._setContainerMeasure(size.width,true);this._setContainerMeasure(size.height,false);}};Outlayer.prototype._getContainerSize=noop;Outlayer.prototype._setContainerMeasure=function(measure,isWidth){if(measure===undefined){return;}var elemSize=this.size;if(elemSize.isBorderBox){measure+=isWidth?elemSize.paddingLeft+elemSize.paddingRight+elemSize.borderLeftWidth+elemSize.borderRightWidth:elemSize.paddingBottom+elemSize.paddingTop+elemSize.borderTopWidth+elemSize.borderBottomWidth;}measure=Math.max(measure,0);this.element.style[isWidth?'width':'height']=measure+'px';};Outlayer.prototype._emitCompleteOnItems=function(eventName,items){var _this=this;function onComplete(){_this.dispatchEvent(eventName+'Complete',null,[items]);}var count=items.length;if(!items||!count){onComplete();return;}var doneCount=0;function tick(){doneCount++;if(doneCount===count){onComplete();}}for(var i=0,len=items.length;i<len;i++){var item=items[i];item.once(eventName,tick);}};Outlayer.prototype.dispatchEvent=function(type,event,args){var emitArgs=event?[event].concat(args):args;this.emitEvent(type,emitArgs);if(jQuery){this.$element=this.$element||jQuery(this.element);if(event){var $event=jQuery.Event(event);$event.type=type;this.$element.trigger($event,args);}else{this.$element.trigger(type,args);}}};Outlayer.prototype.ignore=function(elem){var item=this.getItem(elem);if(item){item.isIgnored=true;}};Outlayer.prototype.unignore=function(elem){var item=this.getItem(elem);if(item){delete item.isIgnored;}};Outlayer.prototype.stamp=function(elems){elems=this._find(elems);if(!elems){return;}this.stamps=this.stamps.concat(elems);for(var i=0,len=elems.length;i<len;i++){var elem=elems[i];this.ignore(elem);}};Outlayer.prototype.unstamp=function(elems){elems=this._find(elems);if(!elems){return;}for(var i=0,len=elems.length;i<len;i++){var elem=elems[i];utils.removeFrom(this.stamps,elem);this.unignore(elem);}};Outlayer.prototype._find=function(elems){if(!elems){return;}if(typeof elems==='string'){elems=this.element.querySelectorAll(elems);}elems=utils.makeArray(elems);return elems;};Outlayer.prototype._manageStamps=function(){if(!this.stamps||!this.stamps.length){return;}this._getBoundingRect();for(var i=0,len=this.stamps.length;i<len;i++){var stamp=this.stamps[i];this._manageStamp(stamp);}};Outlayer.prototype._getBoundingRect=function(){var boundingRect=this.element.getBoundingClientRect();var size=this.size;this._boundingRect={left:boundingRect.left+size.paddingLeft+size.borderLeftWidth,top:boundingRect.top+size.paddingTop+size.borderTopWidth,right:boundingRect.right-(size.paddingRight+size.borderRightWidth),bottom:boundingRect.bottom-(size.paddingBottom+size.borderBottomWidth)};};Outlayer.prototype._manageStamp=noop;Outlayer.prototype._getElementOffset=function(elem){var boundingRect=elem.getBoundingClientRect();var thisRect=this._boundingRect;var size=getSize(elem);var offset={left:boundingRect.left-thisRect.left-size.marginLeft,top:boundingRect.top-thisRect.top-size.marginTop,right:thisRect.right-boundingRect.right-size.marginRight,bottom:thisRect.bottom-boundingRect.bottom-size.marginBottom};return offset;};Outlayer.prototype.handleEvent=function(event){var method='on'+event.type;if(this[method]){this[method](event);}};Outlayer.prototype.bindResize=function(){if(this.isResizeBound){return;}eventie.bind(window,'resize',this);this.isResizeBound=true;};Outlayer.prototype.unbindResize=function(){if(this.isResizeBound){eventie.unbind(window,'resize',this);}this.isResizeBound=false;};Outlayer.prototype.onresize=function(){if(this.resizeTimeout){clearTimeout(this.resizeTimeout);}var _this=this;function delayed(){_this.resize();delete _this.resizeTimeout;}this.resizeTimeout=setTimeout(delayed,100);};Outlayer.prototype.resize=function(){if(!this.isResizeBound||!this.needsResizeLayout()){return;}this.layout();};Outlayer.prototype.needsResizeLayout=function(){var size=getSize(this.element);var hasSizes=this.size&&size;return hasSizes&&size.innerWidth!==this.size.innerWidth;};Outlayer.prototype.addItems=function(elems){var items=this._itemize(elems);if(items.length){this.items=this.items.concat(items);}return items;};Outlayer.prototype.appended=function(elems){var items=this.addItems(elems);if(!items.length){return;}this.layoutItems(items,true);this.reveal(items);};Outlayer.prototype.prepended=function(elems){var items=this._itemize(elems);if(!items.length){return;}var previousItems=this.items.slice(0);this.items=items.concat(previousItems);this._resetLayout();this._manageStamps();this.layoutItems(items,true);this.reveal(items);this.layoutItems(previousItems);};Outlayer.prototype.reveal=function(items){this._emitCompleteOnItems('reveal',items);var len=items&&items.length;for(var i=0;len&&i<len;i++){var item=items[i];item.reveal();}};Outlayer.prototype.hide=function(items){this._emitCompleteOnItems('hide',items);var len=items&&items.length;for(var i=0;len&&i<len;i++){var item=items[i];item.hide();}};Outlayer.prototype.revealItemElements=function(elems){var items=this.getItems(elems);this.reveal(items);};Outlayer.prototype.hideItemElements=function(elems){var items=this.getItems(elems);this.hide(items);};Outlayer.prototype.getItem=function(elem){for(var i=0,len=this.items.length;i<len;i++){var item=this.items[i];if(item.element===elem){return item;}}};Outlayer.prototype.getItems=function(elems){elems=utils.makeArray(elems);var items=[];for(var i=0,len=elems.length;i<len;i++){var elem=elems[i];var item=this.getItem(elem);if(item){items.push(item);}}return items;};Outlayer.prototype.remove=function(elems){var removeItems=this.getItems(elems);this._emitCompleteOnItems('remove',removeItems);if(!removeItems||!removeItems.length){return;}for(var i=0,len=removeItems.length;i<len;i++){var item=removeItems[i];item.remove();utils.removeFrom(this.items,item);}};Outlayer.prototype.destroy=function(){var style=this.element.style;style.height='';style.position='';style.width='';for(var i=0,len=this.items.length;i<len;i++){var item=this.items[i];item.destroy();}this.unbindResize();var id=this.element.outlayerGUID;delete instances[id];delete this.element.outlayerGUID;if(jQuery){jQuery.removeData(this.element,this.constructor.namespace);}};Outlayer.data=function(elem){elem=utils.getQueryElement(elem);var id=elem&&elem.outlayerGUID;return id&&instances[id];};Outlayer.create=function(namespace,options){function Layout(){Outlayer.apply(this,arguments);}if(Object.create){Layout.prototype=Object.create(Outlayer.prototype);}else{utils.extend(Layout.prototype,Outlayer.prototype);}Layout.prototype.constructor=Layout;Layout.defaults=utils.extend({},Outlayer.defaults);utils.extend(Layout.defaults,options);Layout.prototype.settings={};Layout.namespace=namespace;Layout.data=Outlayer.data;Layout.Item=function LayoutItem(){Item.apply(this,arguments);};Layout.Item.prototype=new Item();utils.htmlInit(Layout,namespace);if(jQuery&&jQuery.bridget){jQuery.bridget(namespace,Layout);}return Layout;};Outlayer.Item=Item;return Outlayer;}));(function(window,factory){if(typeof define==='function'&&define.amd){define(['outlayer/outlayer','get-size/get-size','fizzy-ui-utils/utils'],factory);}else if(typeof exports==='object'){module.exports=factory(require('outlayer'),require('get-size'),require('fizzy-ui-utils'));}else{window.Masonry=factory(window.Outlayer,window.getSize,window.fizzyUIUtils);}}(window,function factory(Outlayer,getSize,utils){var Masonry=Outlayer.create('masonry');Masonry.prototype._resetLayout=function(){this.getSize();this._getMeasurement('columnWidth','outerWidth');this._getMeasurement('gutter','outerWidth');this.measureColumns();var i=this.cols;this.colYs=[];while(i--){this.colYs.push(0);}this.maxY=0;};Masonry.prototype.measureColumns=function(){this.getContainerWidth();if(!this.columnWidth){var firstItem=this.items[0];var firstItemElem=firstItem&&firstItem.element;this.columnWidth=firstItemElem&&getSize(firstItemElem).outerWidth||this.containerWidth;}var columnWidth=this.columnWidth+=this.gutter;var containerWidth=this.containerWidth+this.gutter;var cols=containerWidth/columnWidth;var excess=columnWidth-containerWidth%columnWidth;var mathMethod=excess&&excess<1?'round':'floor';cols=Math[mathMethod](cols);this.cols=Math.max(cols,1);};Masonry.prototype.getContainerWidth=function(){var container=this.options.isFitWidth?this.element.parentNode:this.element;var size=getSize(container);this.containerWidth=size&&size.innerWidth;};Masonry.prototype._getItemLayoutPosition=function(item){item.getSize();var remainder=item.size.outerWidth%this.columnWidth;var mathMethod=remainder&&remainder<1?'round':'ceil';var colSpan=Math[mathMethod](item.size.outerWidth/this.columnWidth);colSpan=Math.min(colSpan,this.cols);var colGroup=this._getColGroup(colSpan);var minimumY=Math.min.apply(Math,colGroup);var shortColIndex=utils.indexOf(colGroup,minimumY);var position={x:this.columnWidth*shortColIndex,y:minimumY};var setHeight=minimumY+item.size.outerHeight;var setSpan=this.cols+1-colGroup.length;for(var i=0;i<setSpan;i++){this.colYs[shortColIndex+i]=setHeight;}return position;};Masonry.prototype._getColGroup=function(colSpan){if(colSpan<2){return this.colYs;}var colGroup=[];var groupCount=this.cols+1-colSpan;for(var i=0;i<groupCount;i++){var groupColYs=this.colYs.slice(i,i+colSpan);colGroup[i]=Math.max.apply(Math,groupColYs);}return colGroup;};Masonry.prototype._manageStamp=function(stamp){var stampSize=getSize(stamp);var offset=this._getElementOffset(stamp);var firstX=this.options.isOriginLeft?offset.left:offset.right;var lastX=firstX+stampSize.outerWidth;var firstCol=Math.floor(firstX/this.columnWidth);firstCol=Math.max(0,firstCol);var lastCol=Math.floor(lastX/this.columnWidth);lastCol-=lastX%this.columnWidth?0:1;lastCol=Math.min(this.cols-1,lastCol);var stampMaxY=(this.options.isOriginTop?offset.top:offset.bottom)+stampSize.outerHeight;for(var i=firstCol;i<=lastCol;i++){this.colYs[i]=Math.max(stampMaxY,this.colYs[i]);}};Masonry.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var size={height:this.maxY};if(this.options.isFitWidth){size.width=this._getContainerFitWidth();}return size;};Masonry.prototype._getContainerFitWidth=function(){var unusedCols=0;var i=this.cols;while(--i){if(this.colYs[i]!==0){break;}unusedCols++;}return(this.cols-unusedCols)*this.columnWidth-this.gutter;};Masonry.prototype.needsResizeLayout=function(){var previousWidth=this.containerWidth;this.getContainerWidth();return previousWidth!==this.containerWidth;};return Masonry;}));;(function(){'use strict';var objectTypes={'function':true,'object':true};var root=(objectTypes[typeof window]&&window)||this;var oldRoot=root;var freeExports=objectTypes[typeof exports]&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var freeGlobal=freeExports&&freeModule&&typeof global=='object'&&global;if(freeGlobal&&(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal)){root=freeGlobal;}var maxSafeInteger=Math.pow(2,53)-1;var reOpera=/\bOpera/;var thisBinding=this;var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var toString=objectProto.toString;function capitalize(string){string=String(string);return string.charAt(0).toUpperCase()+string.slice(1);}function cleanupOS(os,pattern,label){var data={'6.4':'10','6.3':'8.1','6.2':'8','6.1':'Server 2008 R2 / 7','6.0':'Server 2008 / Vista','5.2':'Server 2003 / XP 64-bit','5.1':'XP','5.01':'2000 SP1','5.0':'2000','4.0':'NT','4.90':'ME'};if(pattern&&label&&/^Win/i.test(os)&&(data=data[0,/[\d.]+$/.exec(os)])){os='Windows '+data;}os=String(os);if(pattern&&label){os=os.replace(RegExp(pattern,'i'),label);}os=format(os.replace(/ ce$/i,' CE').replace(/\bhpw/i,'web').replace(/\bMacintosh\b/,'Mac OS').replace(/_PowerPC\b/i,' OS').replace(/\b(OS X) [^ \d]+/i,'$1').replace(/\bMac (OS X)\b/,'$1').replace(/\/(\d)/,' $1').replace(/_/g,'.').replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,'').replace(/\bx86\.64\b/gi,'x86_64').replace(/\b(Windows Phone) OS\b/,'$1').split(' on ')[0]);return os;}function each(object,callback){var index=-1,length=object?object.length:0;if(typeof length=='number'&&length>-1&&length<=maxSafeInteger){while(++index<length){callback(object[index],index,object);}}else{forOwn(object,callback);}}function format(string){string=trim(string);return/^(?:webOS|i(?:OS|P))/.test(string)?string:capitalize(string);}function forOwn(object,callback){for(var key in object){if(hasOwnProperty.call(object,key)){callback(object[key],key,object);}}}function getClassOf(value){return value==null?capitalize(value):toString.call(value).slice(8,-1);}function isHostType(object,property){var type=object!=null?typeof object[property]:'number';return!/^(?:boolean|number|string|undefined)$/.test(type)&&(type=='object'?!!object[property]:true);}function qualify(string){return String(string).replace(/([ -])(?!$)/g,'$1?');}function reduce(array,callback){var accumulator=null;each(array,function(value,index){accumulator=callback(accumulator,value,index,array);});return accumulator;}function trim(string){return String(string).replace(/^ +| +$/g,'');}function parse(ua){var context=root;var isCustomContext=ua&&typeof ua=='object'&&getClassOf(ua)!='String';if(isCustomContext){context=ua;ua=null;}var nav=context.navigator||{};var userAgent=nav.userAgent||'';ua||(ua=userAgent);var isModuleScope=isCustomContext||thisBinding==oldRoot;var likeChrome=isCustomContext?!!nav.likeChrome:/\bChrome\b/.test(ua)&&!/internal|\n/i.test(toString.toString());var objectClass='Object',airRuntimeClass=isCustomContext?objectClass:'ScriptBridgingProxyObject',enviroClass=isCustomContext?objectClass:'Environment',javaClass=(isCustomContext&&context.java)?'JavaPackage':getClassOf(context.java),phantomClass=isCustomContext?objectClass:'RuntimeObject';var java=/\bJava/.test(javaClass)&&context.java;var rhino=java&&getClassOf(context.environment)==enviroClass;var alpha=java?'a':'\u03b1';var beta=java?'b':'\u03b2';var doc=context.document||{};var opera=context.operamini||context.opera;var operaClass=reOpera.test(operaClass=(isCustomContext&&opera)?opera['[[Class]]']:getClassOf(opera))?operaClass:(opera=null);var data;var arch=ua;var description=[];var prerelease=null;var useFeatures=ua==userAgent;var version=useFeatures&&opera&&typeof opera.version=='function'&&opera.version();var isSpecialCasedOS;var layout=getLayout(['Trident',{'label':'WebKit','pattern':'AppleWebKit'},'iCab','Presto','NetFront','Tasman','KHTML','Gecko']);var name=getName(['Adobe AIR','Arora','Avant Browser','Breach','Camino','Epiphany','Fennec','Flock','Galeon','GreenBrowser','iCab','Iceweasel',{'label':'SRWare Iron','pattern':'Iron'},'K-Meleon','Konqueror','Lunascape','Maxthon','Midori','Nook Browser','PhantomJS','Raven','Rekonq','RockMelt','SeaMonkey',{'label':'Silk','pattern':'(?:Cloud9|Silk-Accelerated)'},'Sleipnir','SlimBrowser','Sunrise','Swiftfox','WebPositive','Opera Mini',{'label':'Opera Mini','pattern':'OPiOS'},'Opera',{'label':'Opera','pattern':'OPR'},'Chrome',{'label':'Chrome Mobile','pattern':'(?:CriOS|CrMo)'},{'label':'Firefox','pattern':'(?:Firefox|Minefield)'},{'label':'IE','pattern':'IEMobile'},{'label':'IE','pattern':'MSIE'},'Safari']);var product=getProduct([{'label':'BlackBerry','pattern':'BB10'},'BlackBerry',{'label':'Galaxy S','pattern':'GT-I9000'},{'label':'Galaxy S2','pattern':'GT-I9100'},{'label':'Galaxy S3','pattern':'GT-I9300'},{'label':'Galaxy S4','pattern':'GT-I9500'},'Google TV','Lumia','iPad','iPod','iPhone','Kindle',{'label':'Kindle Fire','pattern':'(?:Cloud9|Silk-Accelerated)'},'Nook','PlayBook','PlayStation 4','PlayStation 3','PlayStation Vita','TouchPad','Transformer',{'label':'Wii U','pattern':'WiiU'},'Wii','Xbox One',{'label':'Xbox 360','pattern':'Xbox'},'Xoom']);var manufacturer=getManufacturer({'Apple':{'iPad':1,'iPhone':1,'iPod':1},'Amazon':{'Kindle':1,'Kindle Fire':1},'Asus':{'Transformer':1},'Barnes & Noble':{'Nook':1},'BlackBerry':{'PlayBook':1},'Google':{'Google TV':1},'HP':{'TouchPad':1},'HTC':{},'LG':{},'Microsoft':{'Xbox':1,'Xbox One':1},'Motorola':{'Xoom':1},'Nintendo':{'Wii U':1,'Wii':1},'Nokia':{'Lumia':1},'Samsung':{'Galaxy S':1,'Galaxy S2':1,'Galaxy S3':1,'Galaxy S4':1},'Sony':{'PlayStation 4':1,'PlayStation 3':1,'PlayStation Vita':1}});var os=getOS(['Windows Phone ','Android','CentOS','Debian','Fedora','FreeBSD','Gentoo','Haiku','Kubuntu','Linux Mint','Red Hat','SuSE','Ubuntu','Xubuntu','Cygwin','Symbian OS','hpwOS','webOS ','webOS','Tablet OS','Linux','Mac OS X','Macintosh','Mac','Windows 98;','Windows ']);function getLayout(guesses){return reduce(guesses,function(result,guess){return result||RegExp('\\b'+(guess.pattern||qualify(guess))+'\\b','i').exec(ua)&&(guess.label||guess);});}function getManufacturer(guesses){return reduce(guesses,function(result,value,key){return result||(value[product]||value[0,/^[a-z]+(?: +[a-z]+\b)*/i.exec(product)]||RegExp('\\b'+qualify(key)+'(?:\\b|\\w*\\d)','i').exec(ua))&&key;});}function getName(guesses){return reduce(guesses,function(result,guess){return result||RegExp('\\b'+(guess.pattern||qualify(guess))+'\\b','i').exec(ua)&&(guess.label||guess);});}function getOS(guesses){return reduce(guesses,function(result,guess){var pattern=guess.pattern||qualify(guess);if(!result&&(result=RegExp('\\b'+pattern+'(?:/[\\d.]+|[ \\w.]*)','i').exec(ua))){result=cleanupOS(result,pattern,guess.label||guess);}return result;});}function getProduct(guesses){return reduce(guesses,function(result,guess){var pattern=guess.pattern||qualify(guess);if(!result&&(result=RegExp('\\b'+pattern+' *\\d+[.\\w_]*','i').exec(ua)||RegExp('\\b'+pattern+'(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)','i').exec(ua))){if((result=String((guess.label&&!RegExp(pattern,'i').test(guess.label))?guess.label:result).split('/'))[1]&&!/[\d.]+/.test(result[0])){result[0]+=' '+result[1];}guess=guess.label||guess;result=format(result[0].replace(RegExp(pattern,'i'),guess).replace(RegExp('; *(?:'+guess+'[_-])?','i'),' ').replace(RegExp('('+guess+')[-_.]?(\\w)','i'),'$1 $2'));}return result;});}function getVersion(patterns){return reduce(patterns,function(result,pattern){return result||(RegExp(pattern+'(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)','i').exec(ua)||0)[1]||null;});}function toStringPlatform(){return this.description||'';}layout&&(layout=[layout]);if(manufacturer&&!product){product=getProduct([manufacturer]);}if((data=/\bGoogle TV\b/.exec(product))){product=data[0];}if(/\bSimulator\b/i.test(ua)){product=(product?product+' ':'')+'Simulator';}if(name=='Opera Mini'&&/\bOPiOS\b/.test(ua)){description.push('running in Turbo/Uncompressed mode');}if(/^iP/.test(product)){name||(name='Safari');os='iOS'+((data=/ OS ([\d_]+)/i.exec(ua))?' '+data[1].replace(/_/g,'.'):'');}else if(name=='Konqueror'&&!/buntu/i.test(os)){os='Kubuntu';}else if(manufacturer&&manufacturer!='Google'&&((/Chrome/.test(name)&&!/\bMobile Safari\b/i.test(ua))||/\bVita\b/.test(product))){name='Android Browser';os=/\bAndroid\b/.test(os)?os:'Android';}else if(!name||(data=!/\bMinefield\b|\(Android;/i.test(ua)&&/\b(?:Firefox|Safari)\b/.exec(name))){if(name&&!product&&/[\/,]|^[^(]+?\)/.test(ua.slice(ua.indexOf(data+'/')+8))){name=null;}if((data=product||manufacturer||os)&&(product||manufacturer||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(os))){name=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(os)?os:data)+' Browser';}}if((data=/\((Mobile|Tablet).*?Firefox\b/i.exec(ua))&&data[1]){os='Firefox OS';if(!product){product=data[1];}}if(!version){version=getVersion(['(?:Cloud9|CriOS|CrMo|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|Silk(?!/[\\d.]+$))','Version',qualify(name),'(?:Firefox|Minefield|NetFront)']);}if(layout=='iCab'&&parseFloat(version)>3){layout=['WebKit'];}else if(layout!='Trident'&&(data=/\bOpera\b/.test(name)&&(/\bOPR\b/.test(ua)?'Blink':'Presto')||/\b(?:Midori|Nook|Safari)\b/i.test(ua)&&'WebKit'||!layout&&/\bMSIE\b/i.test(ua)&&(os=='Mac OS'?'Tasman':'Trident'))){layout=[data];}else if(/\bPlayStation\b(?! Vita\b)/i.test(name)&&layout=='WebKit'){layout=['NetFront'];}if(name=='IE'&&(data=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(ua)||0)[1])){name+=' Mobile';os='Windows Phone '+(/\+$/.test(data)?data:data+'.x');description.unshift('desktop mode');}else if(/\bWPDesktop\b/i.test(ua)){name='IE Mobile';os='Windows Phone 8+';description.unshift('desktop mode');version||(version=(/\brv:([\d.]+)/.exec(ua)||0)[1]);}else if(name!='IE'&&layout=='Trident'&&(data=/\brv:([\d.]+)/.exec(ua))){if(!/\bWPDesktop\b/i.test(ua)){if(name){description.push('identifying as '+name+(version?' '+version:''));}name='IE';}version=data[1];}else if((name=='Chrome'||name!='IE')&&(data=/\bEdge\/([\d.]+)/.exec(ua))){name='IE';version=data[1];layout=['Trident'];description.unshift('platform preview');}if(useFeatures){if(isHostType(context,'global')){if(java){data=java.lang.System;arch=data.getProperty('os.arch');os=os||data.getProperty('os.name')+' '+data.getProperty('os.version');}if(isModuleScope&&isHostType(context,'system')&&(data=[context.system])[0]){os||(os=data[0].os||null);try{data[1]=context.require('ringo/engine').version;version=data[1].join('.');name='RingoJS';}catch(e){if(data[0].global.system==context.system){name='Narwhal';}}}else if(typeof context.process=='object'&&(data=context.process)){name='Node.js';arch=data.arch;os=data.platform;version=/[\d.]+/.exec(data.version)[0];}else if(rhino){name='Rhino';}}else if(getClassOf((data=context.runtime))==airRuntimeClass){name='Adobe AIR';os=data.flash.system.Capabilities.os;}else if(getClassOf((data=context.phantom))==phantomClass){name='PhantomJS';version=(data=data.version||null)&&(data.major+'.'+data.minor+'.'+data.patch);}else if(typeof doc.documentMode=='number'&&(data=/\bTrident\/(\d+)/i.exec(ua))){version=[version,doc.documentMode];if((data=+data[1]+4)!=version[1]){description.push('IE '+version[1]+' mode');layout&&(layout[1]='');version[1]=data;}version=name=='IE'?String(version[1].toFixed(1)):version[0];}os=os&&format(os);}if(version&&(data=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(version)||/(?:alpha|beta)(?: ?\d)?/i.exec(ua+';'+(useFeatures&&nav.appMinorVersion))||/\bMinefield\b/i.test(ua)&&'a')){prerelease=/b/i.test(data)?'beta':'alpha';version=version.replace(RegExp(data+'\\+?$'),'')+(prerelease=='beta'?beta:alpha)+(/\d+\+?/.exec(data)||'');}if(name=='Fennec'||name=='Firefox'&&/\b(?:Android|Firefox OS)\b/.test(os)){name='Firefox Mobile';}else if(name=='Maxthon'&&version){version=version.replace(/\.[\d.]+/,'.x');}else if(name=='Silk'){if(!/\bMobi/i.test(ua)){os='Android';description.unshift('desktop mode');}if(/Accelerated *= *true/i.test(ua)){description.unshift('accelerated');}}else if(/\bXbox\b/i.test(product)){os=null;if(product=='Xbox 360'&&/\bIEMobile\b/.test(ua)){description.unshift('mobile mode');}}else if((/^(?:Chrome|IE|Opera)$/.test(name)||name&&!product&&!/Browser|Mobi/.test(name))&&(os=='Windows CE'||/Mobi/i.test(ua))){name+=' Mobile';}else if(name=='IE'&&useFeatures&&context.external===null){description.unshift('platform preview');}else if((/\bBlackBerry\b/.test(product)||/\bBB10\b/.test(ua))&&(data=(RegExp(product.replace(/ +/g,' *')+'/([.\\d]+)','i').exec(ua)||0)[1]||version)){data=[data,/BB10/.test(ua)];os=(data[1]?(product=null,manufacturer='BlackBerry'):'Device Software')+' '+data[0];version=null;}else if(this!=forOwn&&(product!='Wii'&&((useFeatures&&opera)||(/Opera/.test(name)&&/\b(?:MSIE|Firefox)\b/i.test(ua))||(name=='Firefox'&&/\bOS X (?:\d+\.){2,}/.test(os))||(name=='IE'&&((os&&!/^Win/.test(os)&&version>5.5)||/\bWindows XP\b/.test(os)&&version>8||version==8&&!/\bTrident\b/.test(ua)))))&&!reOpera.test((data=parse.call(forOwn,ua.replace(reOpera,'')+';')))&&data.name){data='ing as '+data.name+((data=data.version)?' '+data:'');if(reOpera.test(name)){if(/\bIE\b/.test(data)&&os=='Mac OS'){os=null;}data='identify'+data;}else{data='mask'+data;if(operaClass){name=format(operaClass.replace(/([a-z])([A-Z])/g,'$1 $2'));}else{name='Opera';}if(/\bIE\b/.test(data)){os=null;}if(!useFeatures){version=null;}}layout=['Presto'];description.push(data);}if((data=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(ua)||0)[1])){data=[parseFloat(data.replace(/\.(\d)$/,'.0$1')),data];if(name=='Safari'&&data[1].slice(-1)=='+'){name='WebKit Nightly';prerelease='alpha';version=data[1].slice(0,-1);}else if(version==data[1]||version==(data[2]=(/\bSafari\/([\d.]+\+?)/i.exec(ua)||0)[1])){version=null;}data[1]=(/\bChrome\/([\d.]+)/i.exec(ua)||0)[1];if(data[0]==537.36&&data[2]==537.36&&parseFloat(data[1])>=28&&name!='IE'){layout=['Blink'];}if(!useFeatures||(!likeChrome&&!data[1])){layout&&(layout[1]='like Safari');data=(data=data[0],data<400?1:data<500?2:data<526?3:data<533?4:data<534?'4+':data<535?5:data<537?6:data<538?7:data<601?8:'8');}else{layout&&(layout[1]='like Chrome');data=data[1]||(data=data[0],data<530?1:data<532?2:data<532.05?3:data<533?4:data<534.03?5:data<534.07?6:data<534.10?7:data<534.13?8:data<534.16?9:data<534.24?10:data<534.30?11:data<535.01?12:data<535.02?'13+':data<535.07?15:data<535.11?16:data<535.19?17:data<536.05?18:data<536.10?19:data<537.01?20:data<537.11?'21+':data<537.13?23:data<537.18?24:data<537.24?25:data<537.36?26:layout!='Blink'?'27':'28');}layout&&(layout[1]+=' '+(data+=typeof data=='number'?'.x':/[.+]/.test(data)?'':'+'));if(name=='Safari'&&(!version||parseInt(version)>45)){version=data;}}if(name=='Opera'&&(data=/\bzbov|zvav$/.exec(os))){name+=' ';description.unshift('desktop mode');if(data=='zvav'){name+='Mini';version=null;}else{name+='Mobile';}os=os.replace(RegExp(' *'+data+'$'),'');}else if(name=='Safari'&&/\bChrome\b/.exec(layout&&layout[1])){description.unshift('desktop mode');name='Chrome Mobile';version=null;if(/\bOS X\b/.test(os)){manufacturer='Apple';os='iOS 4.3+';}else{os=null;}}if(version&&version.indexOf((data=/[\d.]+$/.exec(os)))==0&&ua.indexOf('/'+data+'-')>-1){os=trim(os.replace(data,''));}if(layout&&!/\b(?:Avant|Nook)\b/.test(name)&&(/Browser|Lunascape|Maxthon/.test(name)||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Sleipnir|Web)/.test(name)&&layout[1])){(data=layout[layout.length-1])&&description.push(data);}if(description.length){description=['('+description.join('; ')+')'];}if(manufacturer&&product&&product.indexOf(manufacturer)<0){description.push('on '+manufacturer);}if(product){description.push((/^on /.test(description[description.length-1])?'':'on ')+product);}if(os){data=/ ([\d.+]+)$/.exec(os);isSpecialCasedOS=data&&os.charAt(os.length-data[0].length-1)=='/';os={'architecture':32,'family':(data&&!isSpecialCasedOS)?os.replace(data[0],''):os,'version':data?data[1]:null,'toString':function(){var version=this.version;return this.family+((version&&!isSpecialCasedOS)?' '+version:'')+(this.architecture==64?' 64-bit':'');}};}if((data=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(arch))&&!/\bi686\b/i.test(arch)){if(os){os.architecture=64;os.family=os.family.replace(RegExp(' *'+data),'');}if(name&&(/\bWOW64\b/i.test(ua)||(useFeatures&&/\w(?:86|32)$/.test(nav.cpuClass||nav.platform)&&!/\bWin64; x64\b/i.test(ua)))){description.unshift('32-bit');}}ua||(ua=null);var platform={};platform.description=ua;platform.layout=layout&&layout[0];platform.manufacturer=manufacturer;platform.name=name;platform.prerelease=prerelease;platform.product=product;platform.ua=ua;platform.version=name&&version;platform.os=os||{'architecture':null,'family':null,'version':null,'toString':function(){return'null';}};platform.parse=parse;platform.toString=toStringPlatform;if(platform.version){description.unshift(version);}if(platform.name){description.unshift(name);}if(os&&name&&!(os==String(os).split(' ')[0]&&(os==name.split(' ')[0]||product))){description.push(product?'('+os+')':'on '+os);}if(description.length){platform.description=description.join(' ');}return platform;}if(typeof define=='function'&&typeof define.amd=='object'&&define.amd){define(function(){return parse();});}else if(freeExports&&freeModule){forOwn(parse(),function(value,key){freeExports[key]=value;});}else{root.platform=parse();}}.call(this));
(function($,window,document,undefined){'use strict';var header_helpers=function(class_array){var i=class_array.length;var head=$('head');while(i--){if(head.has('.'+class_array[i]).length===0){head.append('<meta class="'+class_array[i]+'" />');}}};header_helpers(['foundation-mq-small','foundation-mq-small-only','foundation-mq-medium','foundation-mq-medium-only','foundation-mq-large','foundation-mq-large-only','foundation-mq-xlarge','foundation-mq-xlarge-only','foundation-mq-xxlarge','foundation-data-attribute-namespace']);$(function(){if(typeof FastClick!=='undefined'){if(typeof document.body!=='undefined'){FastClick.attach(document.body);}}});var S=function(selector,context){if(typeof selector==='string'){if(context){var cont;if(context.jquery){cont=context[0];if(!cont){return context;}}else{cont=context;}return $(cont.querySelectorAll(selector));}return $(document.querySelectorAll(selector));}return $(selector,context);};var attr_name=function(init){var arr=[];if(!init){arr.push('data');}if(this.namespace.length>0){arr.push(this.namespace);}arr.push(this.name);return arr.join('-');};var add_namespace=function(str){var parts=str.split('-'),i=parts.length,arr=[];while(i--){if(i!==0){arr.push(parts[i]);}else{if(this.namespace.length>0){arr.push(this.namespace,parts[i]);}else{arr.push(parts[i]);}}}return arr.reverse().join('-');};var bindings=function(method,options){var self=this,bind=function(){var $this=S(this),should_bind_events=!$this.data(self.attr_name(true)+'-init');$this.data(self.attr_name(true)+'-init',$.extend({},self.settings,(options||method),self.data_options($this)));if(should_bind_events){self.events(this);}};if(S(this.scope).is('['+this.attr_name()+']')){bind.call(this.scope);}else{S('['+this.attr_name()+']',this.scope).each(bind);}if(typeof method==='string'){return this[method].call(this,options);}};var single_image_loaded=function(image,callback){function loaded(){callback(image[0]);}function bindLoad(){this.one('load',loaded);if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var src=this.attr('src'),param=src.match(/\?/)?'&':'?';param+='random='+(new Date()).getTime();this.attr('src',src+param);}}if(!image.attr('src')){loaded();return;}if(image[0].complete||image[0].readyState===4){loaded();}else{bindLoad.call(image);}};window.matchMedia||(window.matchMedia=function(){"use strict";var styleMedia=(window.styleMedia||window.media);if(!styleMedia){var style=document.createElement('style'),script=document.getElementsByTagName('script')[0],info=null;style.type='text/css';style.id='matchmediajs-test';script.parentNode.insertBefore(style,script);info=('getComputedStyle'in window)&&window.getComputedStyle(style,null)||style.currentStyle;styleMedia={matchMedium:function(media){var text='@media '+media+'{ #matchmediajs-test { width: 1px; } }';if(style.styleSheet){style.styleSheet.cssText=text;}else{style.textContent=text;}return info.width==='1px';}};}return function(media){return{matches:styleMedia.matchMedium(media||'all'),media:media||'all'};};}());(function(jQuery){var animating,lastTime=0,vendors=['webkit','moz'],requestAnimationFrame=window.requestAnimationFrame,cancelAnimationFrame=window.cancelAnimationFrame,jqueryFxAvailable='undefined'!==typeof jQuery.fx;for(;lastTime<vendors.length&&!requestAnimationFrame;lastTime++){requestAnimationFrame=window[vendors[lastTime]+'RequestAnimationFrame'];cancelAnimationFrame=cancelAnimationFrame||window[vendors[lastTime]+'CancelAnimationFrame']||window[vendors[lastTime]+'CancelRequestAnimationFrame'];}function raf(){if(animating){requestAnimationFrame(raf);if(jqueryFxAvailable){jQuery.fx.tick();}}}if(requestAnimationFrame){window.requestAnimationFrame=requestAnimationFrame;window.cancelAnimationFrame=cancelAnimationFrame;if(jqueryFxAvailable){jQuery.fx.timer=function(timer){if(timer()&&jQuery.timers.push(timer)&&!animating){animating=true;raf();}};jQuery.fx.stop=function(){animating=false;};}}else{window.requestAnimationFrame=function(callback){var currTime=new Date().getTime(),timeToCall=Math.max(0,16-(currTime-lastTime)),id=window.setTimeout(function(){callback(currTime+timeToCall);},timeToCall);lastTime=currTime+timeToCall;return id;};window.cancelAnimationFrame=function(id){clearTimeout(id);};}}($));function removeQuotes(string){if(typeof string==='string'||string instanceof String){string=string.replace(/^['\\/"]+|(;\s?})+|['\\/"]+$/g,'');}return string;}window.Foundation={name:'Foundation',version:'5.5.2',media_queries:{'small':S('.foundation-mq-small').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,''),'small-only':S('.foundation-mq-small-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,''),'medium':S('.foundation-mq-medium').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,''),'medium-only':S('.foundation-mq-medium-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,''),'large':S('.foundation-mq-large').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,''),'large-only':S('.foundation-mq-large-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,''),'xlarge':S('.foundation-mq-xlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,''),'xlarge-only':S('.foundation-mq-xlarge-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,''),'xxlarge':S('.foundation-mq-xxlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,'')},stylesheet:$('<style></style>').appendTo('head')[0].sheet,global:{namespace:undefined},init:function(scope,libraries,method,options,response){var args=[scope,method,options,response],responses=[];this.rtl=/rtl/i.test(S('html').attr('dir'));this.scope=scope||this.scope;this.set_namespace();if(libraries&&typeof libraries==='string'&&!/reflow/i.test(libraries)){if(this.libs.hasOwnProperty(libraries)){responses.push(this.init_lib(libraries,args));}}else{for(var lib in this.libs){responses.push(this.init_lib(lib,libraries));}}S(window).load(function(){S(window).trigger('resize.fndtn.clearing').trigger('resize.fndtn.dropdown').trigger('resize.fndtn.equalizer').trigger('resize.fndtn.interchange').trigger('resize.fndtn.joyride').trigger('resize.fndtn.magellan').trigger('resize.fndtn.topbar').trigger('resize.fndtn.slider');});return scope;},init_lib:function(lib,args){if(this.libs.hasOwnProperty(lib)){this.patch(this.libs[lib]);if(args&&args.hasOwnProperty(lib)){if(typeof this.libs[lib].settings!=='undefined'){$.extend(true,this.libs[lib].settings,args[lib]);}else if(typeof this.libs[lib].defaults!=='undefined'){$.extend(true,this.libs[lib].defaults,args[lib]);}return this.libs[lib].init.apply(this.libs[lib],[this.scope,args[lib]]);}args=args instanceof Array?args:new Array(args);return this.libs[lib].init.apply(this.libs[lib],args);}return function(){};},patch:function(lib){lib.scope=this.scope;lib.namespace=this.global.namespace;lib.rtl=this.rtl;lib['data_options']=this.utils.data_options;lib['attr_name']=attr_name;lib['add_namespace']=add_namespace;lib['bindings']=bindings;lib['S']=this.utils.S;},inherit:function(scope,methods){var methods_arr=methods.split(' '),i=methods_arr.length;while(i--){if(this.utils.hasOwnProperty(methods_arr[i])){scope[methods_arr[i]]=this.utils[methods_arr[i]];}}},set_namespace:function(){var namespace=(this.global.namespace===undefined)?$('.foundation-data-attribute-namespace').css('font-family'):this.global.namespace;this.global.namespace=(namespace===undefined||/false/i.test(namespace))?'':namespace;},libs:{},utils:{S:S,throttle:function(func,delay){var timer=null;return function(){var context=this,args=arguments;if(timer==null){timer=setTimeout(function(){func.apply(context,args);timer=null;},delay);}};},debounce:function(func,delay,immediate){var timeout,result;return function(){var context=this,args=arguments;var later=function(){timeout=null;if(!immediate){result=func.apply(context,args);}};var callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,delay);if(callNow){result=func.apply(context,args);}return result;};},data_options:function(el,data_attr_name){data_attr_name=data_attr_name||'options';var opts={},ii,p,opts_arr,data_options=function(el){var namespace=Foundation.global.namespace;if(namespace.length>0){return el.data(namespace+'-'+data_attr_name);}return el.data(data_attr_name);};var cached_options=data_options(el);if(typeof cached_options==='object'){return cached_options;}opts_arr=(cached_options||':').split(';');ii=opts_arr.length;function isNumber(o){return!isNaN(o-0)&&o!==null&&o!==''&&o!==false&&o!==true;}function trim(str){if(typeof str==='string'){return $.trim(str);}return str;}while(ii--){p=opts_arr[ii].split(':');p=[p[0],p.slice(1).join(':')];if(/true/i.test(p[1])){p[1]=true;}if(/false/i.test(p[1])){p[1]=false;}if(isNumber(p[1])){if(p[1].indexOf('.')===-1){p[1]=parseInt(p[1],10);}else{p[1]=parseFloat(p[1]);}}if(p.length===2&&p[0].length>0){opts[trim(p[0])]=trim(p[1]);}}return opts;},register_media:function(media,media_class){if(Foundation.media_queries[media]===undefined){$('head').append('<meta class="'+media_class+'"/>');Foundation.media_queries[media]=removeQuotes($('.'+media_class).css('font-family'));}},add_custom_rule:function(rule,media){if(media===undefined&&Foundation.stylesheet){Foundation.stylesheet.insertRule(rule,Foundation.stylesheet.cssRules.length);}else{var query=Foundation.media_queries[media];if(query!==undefined){Foundation.stylesheet.insertRule('@media '+Foundation.media_queries[media]+'{ '+rule+' }',Foundation.stylesheet.cssRules.length);}}},image_loaded:function(images,callback){var self=this,unloaded=images.length;function pictures_has_height(images){var pictures_number=images.length;for(var i=pictures_number-1;i>=0;i--){if(images.attr('height')===undefined){return false;};};return true;}if(unloaded===0||pictures_has_height(images)){callback(images);}images.each(function(){single_image_loaded(self.S(this),function(){unloaded-=1;if(unloaded===0){callback(images);}});});},random_str:function(){if(!this.fidx){this.fidx=0;}this.prefix=this.prefix||[(this.name||'F'),(+new Date).toString(36)].join('-');return this.prefix+(this.fidx++).toString(36);},match:function(mq){return window.matchMedia(mq).matches;},is_small_up:function(){return this.match(Foundation.media_queries.small);},is_medium_up:function(){return this.match(Foundation.media_queries.medium);},is_large_up:function(){return this.match(Foundation.media_queries.large);},is_xlarge_up:function(){return this.match(Foundation.media_queries.xlarge);},is_xxlarge_up:function(){return this.match(Foundation.media_queries.xxlarge);},is_small_only:function(){return!this.is_medium_up()&&!this.is_large_up()&&!this.is_xlarge_up()&&!this.is_xxlarge_up();},is_medium_only:function(){return this.is_medium_up()&&!this.is_large_up()&&!this.is_xlarge_up()&&!this.is_xxlarge_up();},is_large_only:function(){return this.is_medium_up()&&this.is_large_up()&&!this.is_xlarge_up()&&!this.is_xxlarge_up();},is_xlarge_only:function(){return this.is_medium_up()&&this.is_large_up()&&this.is_xlarge_up()&&!this.is_xxlarge_up();},is_xxlarge_only:function(){return this.is_medium_up()&&this.is_large_up()&&this.is_xlarge_up()&&this.is_xxlarge_up();}}};$.fn.foundation=function(){var args=Array.prototype.slice.call(arguments,0);return this.each(function(){Foundation.init.apply(Foundation,[this].concat(args));return this;});};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.abide={name:'abide',version:'5.5.2',settings:{live_validate:true,validate_on_blur:true,focus_on_invalid:true,error_labels:true,error_class:'error',timeout:1000,patterns:{alpha:/^[a-zA-Z]+$/,alpha_numeric:/^[a-zA-Z0-9]+$/,integer:/^[-+]?\d+$/,number:/^[-+]?\d*(?:[\.\,]\d+)?$/,card:/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,cvv:/^([0-9]){3,4}$/,email:/^[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])?)+$/,url:/^(https?|ftp|file|ssh):\/\/([-;:&=\+\$,\w]+@{1})?([-A-Za-z0-9\.]+)+:?(\d+)?((\/[-\+~%\/\.\w]+)?\??([-\+=&;%@\.\w]+)?#?([\w]+)?)?/,domain:/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,datetime:/^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,date:/(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,time:/^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,dateISO:/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,month_day_year:/^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,day_month_year:/^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,color:/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/},validators:{equalTo:function(el,required,parent){var from=document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,to=el.value,valid=(from===to);return valid;}}},timer:null,init:function(scope,method,options){this.bindings(method,options);},events:function(scope){var self=this,form=self.S(scope).attr('novalidate','novalidate'),settings=form.data(this.attr_name(true)+'-init')||{};this.invalid_attr=this.add_namespace('data-invalid');function validate(originalSelf,e){clearTimeout(self.timer);self.timer=setTimeout(function(){self.validate([originalSelf],e);}.bind(originalSelf),settings.timeout);}form.off('.abide').on('submit.fndtn.abide',function(e){var is_ajax=/ajax/i.test(self.S(this).attr(self.attr_name()));return self.validate(self.S(this).find('input, textarea, select').not(":hidden, [data-abide-ignore]").get(),e,is_ajax);}).on('validate.fndtn.abide',function(e){if(settings.validate_on==='manual'){self.validate([e.target],e);}}).on('reset',function(e){return self.reset($(this),e);}).find('input, textarea, select').not(":hidden, [data-abide-ignore]").off('.abide').on('blur.fndtn.abide change.fndtn.abide',function(e){if(settings.validate_on_blur&&settings.validate_on_blur===true){validate(this,e);}if(settings.validate_on==='change'){validate(this,e);}}).on('keydown.fndtn.abide',function(e){if(settings.live_validate&&settings.live_validate===true&&e.which!=9){validate(this,e);}if(settings.validate_on==='tab'&&e.which===9){validate(this,e);}else if(settings.validate_on==='change'){validate(this,e);}}).on('focus',function(e){if(navigator.userAgent.match(/iPad|iPhone|Android|BlackBerry|Windows Phone|webOS/i)){$('html, body').animate({scrollTop:$(e.target).offset().top},100);}});},reset:function(form,e){var self=this;form.removeAttr(self.invalid_attr);$('['+self.invalid_attr+']',form).removeAttr(self.invalid_attr);$('.'+self.settings.error_class,form).not('small').removeClass(self.settings.error_class);$(':input',form).not(':button, :submit, :reset, :hidden, [data-abide-ignore]').val('').removeAttr(self.invalid_attr);},validate:function(els,e,is_ajax){var validations=this.parse_patterns(els),validation_count=validations.length,form=this.S(els[0]).closest('form'),submit_event=/submit/.test(e.type);for(var i=0;i<validation_count;i++){if(!validations[i]&&(submit_event||is_ajax)){if(this.settings.focus_on_invalid){els[i].focus();}form.trigger('invalid.fndtn.abide');this.S(els[i]).closest('form').attr(this.invalid_attr,'');return false;}}if(submit_event||is_ajax){form.trigger('valid.fndtn.abide');}form.removeAttr(this.invalid_attr);if(is_ajax){return false;}return true;},parse_patterns:function(els){var i=els.length,el_patterns=[];while(i--){el_patterns.push(this.pattern(els[i]));}return this.check_validation_and_apply_styles(el_patterns);},pattern:function(el){var type=el.getAttribute('type'),required=typeof el.getAttribute('required')==='string';var pattern=el.getAttribute('pattern')||'';if(this.settings.patterns.hasOwnProperty(pattern)&&pattern.length>0){return[el,this.settings.patterns[pattern],required];}else if(pattern.length>0){return[el,new RegExp(pattern),required];}if(this.settings.patterns.hasOwnProperty(type)){return[el,this.settings.patterns[type],required];}pattern=/.*/;return[el,pattern,required];},check_validation_and_apply_styles:function(el_patterns){var i=el_patterns.length,validations=[],form=this.S(el_patterns[0][0]).closest('[data-'+this.attr_name(true)+']'),settings=form.data(this.attr_name(true)+'-init')||{};while(i--){var el=el_patterns[i][0],required=el_patterns[i][2],value=el.value.trim(),direct_parent=this.S(el).parent(),validator=el.getAttribute(this.add_namespace('data-abide-validator')),is_radio=el.type==='radio',is_checkbox=el.type==='checkbox',label=this.S('label[for="'+el.getAttribute('id')+'"]'),valid_length=(required)?(el.value.length>0):true,el_validations=[];var parent,valid;if(el.getAttribute(this.add_namespace('data-equalto'))){validator='equalTo'}if(!direct_parent.is('label')){parent=direct_parent;}else{parent=direct_parent.parent();}if(is_radio&&required){el_validations.push(this.valid_radio(el,required));}else if(is_checkbox&&required){el_validations.push(this.valid_checkbox(el,required));}else if(validator){var validators=validator.split(' ');var last_valid=true,all_valid=true;for(var iv=0;iv<validators.length;iv++){valid=this.settings.validators[validators[iv]].apply(this,[el,required,parent])
el_validations.push(valid);all_valid=valid&&last_valid;last_valid=valid;}if(all_valid){this.S(el).removeAttr(this.invalid_attr);parent.removeClass('error');if(label.length>0&&this.settings.error_labels){label.removeClass(this.settings.error_class).removeAttr('role');}$(el).triggerHandler('valid');}else{this.S(el).attr(this.invalid_attr,'');parent.addClass('error');if(label.length>0&&this.settings.error_labels){label.addClass(this.settings.error_class).attr('role','alert');}$(el).triggerHandler('invalid');}}else{if(el_patterns[i][1].test(value)&&valid_length||!required&&el.value.length<1||$(el).attr('disabled')){el_validations.push(true);}else{el_validations.push(false);}el_validations=[el_validations.every(function(valid){return valid;})];if(el_validations[0]){this.S(el).removeAttr(this.invalid_attr);el.setAttribute('aria-invalid','false');el.removeAttribute('aria-describedby');parent.removeClass(this.settings.error_class);if(label.length>0&&this.settings.error_labels){label.removeClass(this.settings.error_class).removeAttr('role');}$(el).triggerHandler('valid');}else{this.S(el).attr(this.invalid_attr,'');el.setAttribute('aria-invalid','true');var errorElem=parent.find('small.'+this.settings.error_class,'span.'+this.settings.error_class);var errorID=errorElem.length>0?errorElem[0].id:'';if(errorID.length>0){el.setAttribute('aria-describedby',errorID);}parent.addClass(this.settings.error_class);if(label.length>0&&this.settings.error_labels){label.addClass(this.settings.error_class).attr('role','alert');}$(el).triggerHandler('invalid');}}validations=validations.concat(el_validations);}return validations;},valid_checkbox:function(el,required){var el=this.S(el),valid=(el.is(':checked')||!required||el.get(0).getAttribute('disabled'));if(valid){el.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);$(el).triggerHandler('valid');}else{el.attr(this.invalid_attr,'').parent().addClass(this.settings.error_class);$(el).triggerHandler('invalid');}return valid;},valid_radio:function(el,required){var name=el.getAttribute('name'),group=this.S(el).closest('[data-'+this.attr_name(true)+']').find("[name='"+name+"']"),count=group.length,valid=false,disabled=false;for(var i=0;i<count;i++){if(group[i].getAttribute('disabled')){disabled=true;valid=true;}else{if(group[i].checked){valid=true;}else{if(disabled){valid=false;}}}}for(var i=0;i<count;i++){if(valid){this.S(group[i]).removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);$(group[i]).triggerHandler('valid');}else{this.S(group[i]).attr(this.invalid_attr,'').parent().addClass(this.settings.error_class);$(group[i]).triggerHandler('invalid');}}return valid;},valid_equal:function(el,required,parent){var from=document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,to=el.value,valid=(from===to);if(valid){this.S(el).removeAttr(this.invalid_attr);parent.removeClass(this.settings.error_class);if(label.length>0&&settings.error_labels){label.removeClass(this.settings.error_class);}}else{this.S(el).attr(this.invalid_attr,'');parent.addClass(this.settings.error_class);if(label.length>0&&settings.error_labels){label.addClass(this.settings.error_class);}}return valid;},valid_oneof:function(el,required,parent,doNotValidateOthers){var el=this.S(el),others=this.S('['+this.add_namespace('data-oneof')+']'),valid=others.filter(':checked').length>0;if(valid){el.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);}else{el.attr(this.invalid_attr,'').parent().addClass(this.settings.error_class);}if(!doNotValidateOthers){var _this=this;others.each(function(){_this.valid_oneof.call(_this,this,null,null,true);});}return valid;},reflow:function(scope,options){var self=this,form=self.S('['+this.attr_name()+']').attr('novalidate','novalidate');self.S(form).each(function(idx,el){self.events(el);});}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.accordion={name:'accordion',version:'5.5.2',settings:{content_class:'content',active_class:'active',multi_expand:false,toggleable:true,callback:function(){}},init:function(scope,method,options){this.bindings(method,options);},events:function(instance){var self=this;var S=this.S;self.create(this.S(instance));S(this.scope).off('.fndtn.accordion').on('click.fndtn.accordion','['+this.attr_name()+'] > dd > a, ['+this.attr_name()+'] > li > a',function(e){var accordion=S(this).closest('['+self.attr_name()+']'),groupSelector=self.attr_name()+'='+accordion.attr(self.attr_name()),settings=accordion.data(self.attr_name(true)+'-init')||self.settings,target=S('#'+this.href.split('#')[1]),aunts=$('> dd, > li',accordion),siblings=aunts.children('.'+settings.content_class),active_content=siblings.filter('.'+settings.active_class);e.preventDefault();if(accordion.attr(self.attr_name())){siblings=siblings.add('['+groupSelector+'] dd > '+'.'+settings.content_class+', ['+groupSelector+'] li > '+'.'+settings.content_class);aunts=aunts.add('['+groupSelector+'] dd, ['+groupSelector+'] li');}if(settings.toggleable&&target.is(active_content)){target.parent('dd, li').toggleClass(settings.active_class,false);target.toggleClass(settings.active_class,false);S(this).attr('aria-expanded',function(i,attr){return attr==='true'?'false':'true';});settings.callback(target);target.triggerHandler('toggled',[accordion]);accordion.triggerHandler('toggled',[target]);return;}if(!settings.multi_expand){siblings.removeClass(settings.active_class);aunts.removeClass(settings.active_class);aunts.children('a').attr('aria-expanded','false');}target.addClass(settings.active_class).parent().addClass(settings.active_class);settings.callback(target);target.triggerHandler('toggled',[accordion]);accordion.triggerHandler('toggled',[target]);S(this).attr('aria-expanded','true');});},create:function($instance){var self=this,accordion=$instance,aunts=$('> .accordion-navigation',accordion),settings=accordion.data(self.attr_name(true)+'-init')||self.settings;aunts.children('a').attr('aria-expanded','false');aunts.has('.'+settings.content_class+'.'+settings.active_class).children('a').attr('aria-expanded','true');if(settings.multi_expand){$instance.attr('aria-multiselectable','true');}},off:function(){},reflow:function(){}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.alert={name:'alert',version:'5.5.2',settings:{callback:function(){}},init:function(scope,method,options){this.bindings(method,options);},events:function(){var self=this,S=this.S;$(this.scope).off('.alert').on('click.fndtn.alert','['+this.attr_name()+'] .close',function(e){var alertBox=S(this).closest('['+self.attr_name()+']'),settings=alertBox.data(self.attr_name(true)+'-init')||self.settings;e.preventDefault();if(Modernizr.csstransitions){alertBox.addClass('alert-close');alertBox.on('transitionend webkitTransitionEnd oTransitionEnd',function(e){S(this).trigger('close.fndtn.alert').remove();settings.callback();});}else{alertBox.fadeOut(300,function(){S(this).trigger('close.fndtn.alert').remove();settings.callback();});}});},reflow:function(){}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.clearing={name:'clearing',version:'5.5.2',settings:{templates:{viewing:'<a href="#" class="clearing-close">&times;</a>'+'<div class="visible-img" style="display: none"><div class="clearing-touch-label"></div><img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />'+'<p class="clearing-caption"></p><a href="#" class="clearing-main-prev"><span></span></a>'+'<a href="#" class="clearing-main-next"><span></span></a></div>'+'<img class="clearing-preload-next" style="display: none" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />'+'<img class="clearing-preload-prev" style="display: none" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />'},close_selectors:'.clearing-close, div.clearing-blackout',open_selectors:'',skip_selector:'',touch_label:'',init:false,locked:false},init:function(scope,method,options){var self=this;Foundation.inherit(this,'throttle image_loaded');this.bindings(method,options);if(self.S(this.scope).is('['+this.attr_name()+']')){this.assemble(self.S('li',this.scope));}else{self.S('['+this.attr_name()+']',this.scope).each(function(){self.assemble(self.S('li',this));});}},events:function(scope){var self=this,S=self.S,$scroll_container=$('.scroll-container');if($scroll_container.length>0){this.scope=$scroll_container;}S(this.scope).off('.clearing').on('click.fndtn.clearing','ul['+this.attr_name()+'] li '+this.settings.open_selectors,function(e,current,target){var current=current||S(this),target=target||current,next=current.next('li'),settings=current.closest('['+self.attr_name()+']').data(self.attr_name(true)+'-init'),image=S(e.target);e.preventDefault();if(!settings){self.init();settings=current.closest('['+self.attr_name()+']').data(self.attr_name(true)+'-init');}if(target.hasClass('visible')&&current[0]===target[0]&&next.length>0&&self.is_open(current)){target=next;image=S('img',target);}self.open(image,current,target);self.update_paddles(target);}).on('click.fndtn.clearing','.clearing-main-next',function(e){self.nav(e,'next')}).on('click.fndtn.clearing','.clearing-main-prev',function(e){self.nav(e,'prev')}).on('click.fndtn.clearing',this.settings.close_selectors,function(e){Foundation.libs.clearing.close(e,this)});$(document).on('keydown.fndtn.clearing',function(e){self.keydown(e)});S(window).off('.clearing').on('resize.fndtn.clearing',function(){self.resize()});this.swipe_events(scope);},swipe_events:function(scope){var self=this,S=self.S;S(this.scope).on('touchstart.fndtn.clearing','.visible-img',function(e){if(!e.touches){e=e.originalEvent;}var data={start_page_x:e.touches[0].pageX,start_page_y:e.touches[0].pageY,start_time:(new Date()).getTime(),delta_x:0,is_scrolling:undefined};S(this).data('swipe-transition',data);e.stopPropagation();}).on('touchmove.fndtn.clearing','.visible-img',function(e){if(!e.touches){e=e.originalEvent;}if(e.touches.length>1||e.scale&&e.scale!==1){return;}var data=S(this).data('swipe-transition');if(typeof data==='undefined'){data={};}data.delta_x=e.touches[0].pageX-data.start_page_x;if(Foundation.rtl){data.delta_x=-data.delta_x;}if(typeof data.is_scrolling==='undefined'){data.is_scrolling=!!(data.is_scrolling||Math.abs(data.delta_x)<Math.abs(e.touches[0].pageY-data.start_page_y));}if(!data.is_scrolling&&!data.active){e.preventDefault();var direction=(data.delta_x<0)?'next':'prev';data.active=true;self.nav(e,direction);}}).on('touchend.fndtn.clearing','.visible-img',function(e){S(this).data('swipe-transition',{});e.stopPropagation();});},assemble:function($li){var $el=$li.parent();if($el.parent().hasClass('carousel')){return;}$el.after('<div id="foundationClearingHolder"></div>');var grid=$el.detach(),grid_outerHTML='';if(grid[0]==null){return;}else{grid_outerHTML=grid[0].outerHTML;}var holder=this.S('#foundationClearingHolder'),settings=$el.data(this.attr_name(true)+'-init'),data={grid:'<div class="carousel">'+grid_outerHTML+'</div>',viewing:settings.templates.viewing},wrapper='<div class="clearing-assembled"><div>'+data.viewing+data.grid+'</div></div>',touch_label=this.settings.touch_label;if(Modernizr.touch){wrapper=$(wrapper).find('.clearing-touch-label').html(touch_label).end();}holder.after(wrapper).remove();},open:function($image,current,target){var self=this,body=$(document.body),root=target.closest('.clearing-assembled'),container=self.S('div',root).first(),visible_image=self.S('.visible-img',container),image=self.S('img',visible_image).not($image),label=self.S('.clearing-touch-label',container),error=false,loaded={};$('body').on('touchmove',function(e){e.preventDefault();});image.error(function(){error=true;});function startLoad(){setTimeout(function(){this.image_loaded(image,function(){if(image.outerWidth()===1&&!error){startLoad.call(this);}else{cb.call(this,image);}}.bind(this));}.bind(this),100);}function cb(image){var $image=$(image);$image.css('visibility','visible');$image.trigger('imageVisible');body.css('overflow','hidden');root.addClass('clearing-blackout');container.addClass('clearing-container');visible_image.show();this.fix_height(target).caption(self.S('.clearing-caption',visible_image),self.S('img',target)).center_and_label(image,label).shift(current,target,function(){target.closest('li').siblings().removeClass('visible');target.closest('li').addClass('visible');});visible_image.trigger('opened.fndtn.clearing')}if(!this.locked()){visible_image.trigger('open.fndtn.clearing');loaded=this.load($image);if(loaded.interchange){image.attr('data-interchange',loaded.interchange).foundation('interchange','reflow');}else{image.attr('src',loaded.src).attr('data-interchange','');}image.css('visibility','hidden');startLoad.call(this);}},close:function(e,el){e.preventDefault();var root=(function(target){if(/blackout/.test(target.selector)){return target;}else{return target.closest('.clearing-blackout');}}($(el))),body=$(document.body),container,visible_image;if(el===e.target&&root){body.css('overflow','');container=$('div',root).first();visible_image=$('.visible-img',container);visible_image.trigger('close.fndtn.clearing');this.settings.prev_index=0;$('ul['+this.attr_name()+']',root).attr('style','').closest('.clearing-blackout').removeClass('clearing-blackout');container.removeClass('clearing-container');visible_image.hide();visible_image.trigger('closed.fndtn.clearing');}$('body').off('touchmove');return false;},is_open:function(current){return current.parent().prop('style').length>0;},keydown:function(e){var clearing=$('.clearing-blackout ul['+this.attr_name()+']'),NEXT_KEY=this.rtl?37:39,PREV_KEY=this.rtl?39:37,ESC_KEY=27;if(e.which===NEXT_KEY){this.go(clearing,'next');}if(e.which===PREV_KEY){this.go(clearing,'prev');}if(e.which===ESC_KEY){this.S('a.clearing-close').trigger('click.fndtn.clearing');}},nav:function(e,direction){var clearing=$('ul['+this.attr_name()+']','.clearing-blackout');e.preventDefault();this.go(clearing,direction);},resize:function(){var image=$('img','.clearing-blackout .visible-img'),label=$('.clearing-touch-label','.clearing-blackout');if(image.length){this.center_and_label(image,label);image.trigger('resized.fndtn.clearing')}},fix_height:function(target){var lis=target.parent().children(),self=this;lis.each(function(){var li=self.S(this),image=li.find('img');if(li.height()>image.outerHeight()){li.addClass('fix-height');}}).closest('ul').width(lis.length*100+'%');return this;},update_paddles:function(target){target=target.closest('li');var visible_image=target.closest('.carousel').siblings('.visible-img');if(target.next().length>0){this.S('.clearing-main-next',visible_image).removeClass('disabled');}else{this.S('.clearing-main-next',visible_image).addClass('disabled');}if(target.prev().length>0){this.S('.clearing-main-prev',visible_image).removeClass('disabled');}else{this.S('.clearing-main-prev',visible_image).addClass('disabled');}},center_and_label:function(target,label){if(!this.rtl&&label.length>0){label.css({marginLeft:-(label.outerWidth()/2),marginTop:-(target.outerHeight()/2)-label.outerHeight()-10});}else{label.css({marginRight:-(label.outerWidth()/2),marginTop:-(target.outerHeight()/2)-label.outerHeight()-10,left:'auto',right:'50%'});}return this;},load:function($image){var href,interchange,closest_a;if($image[0].nodeName==='A'){href=$image.attr('href');interchange=$image.data('clearing-interchange');}else{closest_a=$image.closest('a');href=closest_a.attr('href');interchange=closest_a.data('clearing-interchange');}this.preload($image);return{'src':href?href:$image.attr('src'),'interchange':href?interchange:$image.data('clearing-interchange')}},preload:function($image){this.img($image.closest('li').next(),'next').img($image.closest('li').prev(),'prev');},img:function(img,sibling_type){if(img.length){var preload_img=$('.clearing-preload-'+sibling_type),new_a=this.S('a',img),src,interchange,image;if(new_a.length){src=new_a.attr('href');interchange=new_a.data('clearing-interchange');}else{image=this.S('img',img);src=image.attr('src');interchange=image.data('clearing-interchange');}if(interchange){preload_img.attr('data-interchange',interchange);}else{preload_img.attr('src',src);preload_img.attr('data-interchange','');}}return this;},caption:function(container,$image){var caption=$image.attr('data-caption');if(caption){container.html(caption).show();}else{container.text('').hide();}return this;},go:function($ul,direction){var current=this.S('.visible',$ul),target=current[direction]();if(this.settings.skip_selector&&target.find(this.settings.skip_selector).length!=0){target=target[direction]();}if(target.length){this.S('img',target).trigger('click.fndtn.clearing',[current,target]).trigger('change.fndtn.clearing');}},shift:function(current,target,callback){var clearing=target.parent(),old_index=this.settings.prev_index||target.index(),direction=this.direction(clearing,current,target),dir=this.rtl?'right':'left',left=parseInt(clearing.css('left'),10),width=target.outerWidth(),skip_shift;var dir_obj={};if(target.index()!==old_index&&!/skip/.test(direction)){if(/left/.test(direction)){this.lock();dir_obj[dir]=left+width;clearing.animate(dir_obj,300,this.unlock());}else if(/right/.test(direction)){this.lock();dir_obj[dir]=left-width;clearing.animate(dir_obj,300,this.unlock());}}else if(/skip/.test(direction)){skip_shift=target.index()-this.settings.up_count;this.lock();if(skip_shift>0){dir_obj[dir]=-(skip_shift*width);clearing.animate(dir_obj,300,this.unlock());}else{dir_obj[dir]=0;clearing.animate(dir_obj,300,this.unlock());}}callback();},direction:function($el,current,target){var lis=this.S('li',$el),li_width=lis.outerWidth()+(lis.outerWidth()/4),up_count=Math.floor(this.S('.clearing-container').outerWidth()/li_width)-1,target_index=lis.index(target),response;this.settings.up_count=up_count;if(this.adjacent(this.settings.prev_index,target_index)){if((target_index>up_count)&&target_index>this.settings.prev_index){response='right';}else if((target_index>up_count-1)&&target_index<=this.settings.prev_index){response='left';}else{response=false;}}else{response='skip';}this.settings.prev_index=target_index;return response;},adjacent:function(current_index,target_index){for(var i=target_index+1;i>=target_index-1;i--){if(i===current_index){return true;}}return false;},lock:function(){this.settings.locked=true;},unlock:function(){this.settings.locked=false;},locked:function(){return this.settings.locked;},off:function(){this.S(this.scope).off('.fndtn.clearing');this.S(window).off('.fndtn.clearing');},reflow:function(){this.init();}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.dropdown={name:'dropdown',version:'5.5.2',settings:{active_class:'open',disabled_class:'disabled',mega_class:'mega',align:'bottom',is_hover:false,hover_timeout:150,opened:function(){},closed:function(){}},init:function(scope,method,options){Foundation.inherit(this,'throttle');$.extend(true,this.settings,method,options);this.bindings(method,options);},events:function(scope){var self=this,S=self.S;S(this.scope).off('.dropdown').on('click.fndtn.dropdown','['+this.attr_name()+']',function(e){var settings=S(this).data(self.attr_name(true)+'-init')||self.settings;if(!settings.is_hover||Modernizr.touch){e.preventDefault();if(S(this).parent('[data-reveal-id]').length){e.stopPropagation();}self.toggle($(this));}}).on('mouseenter.fndtn.dropdown','['+this.attr_name()+'], ['+this.attr_name()+'-content]',function(e){var $this=S(this),dropdown,target;clearTimeout(self.timeout);if($this.data(self.data_attr())){dropdown=S('#'+$this.data(self.data_attr()));target=$this;}else{dropdown=$this;target=S('['+self.attr_name()+'="'+dropdown.attr('id')+'"]');}var settings=target.data(self.attr_name(true)+'-init')||self.settings;if(S(e.currentTarget).data(self.data_attr())&&settings.is_hover){self.closeall.call(self);}if(settings.is_hover){self.open.apply(self,[dropdown,target]);}}).on('mouseleave.fndtn.dropdown','['+this.attr_name()+'], ['+this.attr_name()+'-content]',function(e){var $this=S(this);var settings;if($this.data(self.data_attr())){settings=$this.data(self.data_attr(true)+'-init')||self.settings;}else{var target=S('['+self.attr_name()+'="'+S(this).attr('id')+'"]'),settings=target.data(self.attr_name(true)+'-init')||self.settings;}self.timeout=setTimeout(function(){if($this.data(self.data_attr())){if(settings.is_hover){self.close.call(self,S('#'+$this.data(self.data_attr())));}}else{if(settings.is_hover){self.close.call(self,$this);}}}.bind(this),settings.hover_timeout);}).on('click.fndtn.dropdown',function(e){var parent=S(e.target).closest('['+self.attr_name()+'-content]');var links=parent.find('a');if(links.length>0&&parent.attr('aria-autoclose')!=='false'){self.close.call(self,S('['+self.attr_name()+'-content]'));}if(e.target!==document&&!$.contains(document.documentElement,e.target)){return;}if(S(e.target).closest('['+self.attr_name()+']').length>0){return;}if(!(S(e.target).data('revealId'))&&(parent.length>0&&(S(e.target).is('['+self.attr_name()+'-content]')||$.contains(parent.first()[0],e.target)))){e.stopPropagation();return;}self.close.call(self,S('['+self.attr_name()+'-content]'));}).on('opened.fndtn.dropdown','['+self.attr_name()+'-content]',function(){self.settings.opened.call(this);}).on('closed.fndtn.dropdown','['+self.attr_name()+'-content]',function(){self.settings.closed.call(this);});S(window).off('.dropdown').on('resize.fndtn.dropdown',self.throttle(function(){self.resize.call(self);},50));this.resize();},close:function(dropdown){var self=this;dropdown.each(function(idx){var original_target=$('['+self.attr_name()+'='+dropdown[idx].id+']')||$('aria-controls='+dropdown[idx].id+']');original_target.attr('aria-expanded','false');if(self.S(this).hasClass(self.settings.active_class)){self.S(this).css(Foundation.rtl?'right':'left','-99999px').attr('aria-hidden','true').removeClass(self.settings.active_class).prev('['+self.attr_name()+']').removeClass(self.settings.active_class).removeData('target');self.S(this).trigger('closed.fndtn.dropdown',[dropdown]);}});dropdown.removeClass('f-open-'+this.attr_name(true));},closeall:function(){var self=this;$.each(self.S('.f-open-'+this.attr_name(true)),function(){self.close.call(self,self.S(this));});},open:function(dropdown,target){this.css(dropdown.addClass(this.settings.active_class),target);dropdown.prev('['+this.attr_name()+']').addClass(this.settings.active_class);dropdown.data('target',target.get(0)).trigger('opened.fndtn.dropdown',[dropdown,target]);dropdown.attr('aria-hidden','false');target.attr('aria-expanded','true');dropdown.focus();dropdown.addClass('f-open-'+this.attr_name(true));},data_attr:function(){if(this.namespace.length>0){return this.namespace+'-'+this.name;}return this.name;},toggle:function(target){if(target.hasClass(this.settings.disabled_class)){return;}var dropdown=this.S('#'+target.data(this.data_attr()));if(dropdown.length===0){return;}this.close.call(this,this.S('['+this.attr_name()+'-content]').not(dropdown));if(dropdown.hasClass(this.settings.active_class)){this.close.call(this,dropdown);if(dropdown.data('target')!==target.get(0)){this.open.call(this,dropdown,target);}}else{this.open.call(this,dropdown,target);}},resize:function(){var dropdown=this.S('['+this.attr_name()+'-content].open');var target=$(dropdown.data("target"));if(dropdown.length&&target.length){this.css(dropdown,target);}},css:function(dropdown,target){var left_offset=Math.max((target.width()-dropdown.width())/2,8),settings=target.data(this.attr_name(true)+'-init')||this.settings,parentOverflow=dropdown.parent().css('overflow-y')||dropdown.parent().css('overflow');this.clear_idx();if(this.small()){var p=this.dirs.bottom.call(dropdown,target,settings);dropdown.attr('style','').removeClass('drop-left drop-right drop-top').css({position:'absolute',width:'95%','max-width':'none',top:p.top});dropdown.css(Foundation.rtl?'right':'left',left_offset);}else if(parentOverflow!=='visible'){var offset=target[0].offsetTop+target[0].offsetHeight;dropdown.attr('style','').css({position:'absolute',top:offset});dropdown.css(Foundation.rtl?'right':'left',left_offset);}else{this.style(dropdown,target,settings);}return dropdown;},style:function(dropdown,target,settings){var css=$.extend({position:'absolute'},this.dirs[settings.align].call(dropdown,target,settings));dropdown.attr('style','').css(css);},dirs:{_base:function(t){var o_p=this.offsetParent(),o=o_p.offset(),p=t.offset();p.top-=o.top;p.left-=o.left;p.missRight=false;p.missTop=false;p.missLeft=false;p.leftRightFlag=false;var actualBodyWidth;if(document.getElementsByClassName('row')[0]){actualBodyWidth=document.getElementsByClassName('row')[0].clientWidth;}else{actualBodyWidth=window.innerWidth;}var actualMarginWidth=(window.innerWidth-actualBodyWidth)/2;var actualBoundary=actualBodyWidth;if(!this.hasClass('mega')){if(t.offset().top<=this.outerHeight()){p.missTop=true;actualBoundary=window.innerWidth-actualMarginWidth;p.leftRightFlag=true;}if(t.offset().left+this.outerWidth()>t.offset().left+actualMarginWidth&&t.offset().left-actualMarginWidth>this.outerWidth()){p.missRight=true;p.missLeft=false;}if(t.offset().left-this.outerWidth()<=0){p.missLeft=true;p.missRight=false;}}return p;},top:function(t,s){var self=Foundation.libs.dropdown,p=self.dirs._base.call(this,t);this.addClass('drop-top');if(p.missTop==true){p.top=p.top+t.outerHeight()+this.outerHeight();this.removeClass('drop-top');}if(p.missRight==true){p.left=p.left-this.outerWidth()+t.outerWidth();}if(t.outerWidth()<this.outerWidth()||self.small()||this.hasClass(s.mega_menu)){self.adjust_pip(this,t,s,p);}if(Foundation.rtl){return{left:p.left-this.outerWidth()+t.outerWidth(),top:p.top-this.outerHeight()};}return{left:p.left,top:p.top-this.outerHeight()};},bottom:function(t,s){var self=Foundation.libs.dropdown,p=self.dirs._base.call(this,t);if(p.missRight==true){p.left=p.left-this.outerWidth()+t.outerWidth();}if(t.outerWidth()<this.outerWidth()||self.small()||this.hasClass(s.mega_menu)){self.adjust_pip(this,t,s,p);}if(self.rtl){return{left:p.left-this.outerWidth()+t.outerWidth(),top:p.top+t.outerHeight()};}return{left:p.left,top:p.top+t.outerHeight()};},left:function(t,s){var p=Foundation.libs.dropdown.dirs._base.call(this,t);this.addClass('drop-left');if(p.missLeft==true){p.left=p.left+this.outerWidth();p.top=p.top+t.outerHeight();this.removeClass('drop-left');}return{left:p.left-this.outerWidth(),top:p.top};},right:function(t,s){var p=Foundation.libs.dropdown.dirs._base.call(this,t);this.addClass('drop-right');if(p.missRight==true){p.left=p.left-this.outerWidth();p.top=p.top+t.outerHeight();this.removeClass('drop-right');}else{p.triggeredRight=true;}var self=Foundation.libs.dropdown;if(t.outerWidth()<this.outerWidth()||self.small()||this.hasClass(s.mega_menu)){self.adjust_pip(this,t,s,p);}return{left:p.left+t.outerWidth(),top:p.top};}},adjust_pip:function(dropdown,target,settings,position){var sheet=Foundation.stylesheet,pip_offset_base=8;if(dropdown.hasClass(settings.mega_class)){pip_offset_base=position.left+(target.outerWidth()/2)-8;}else if(this.small()){pip_offset_base+=position.left-8;}this.rule_idx=sheet.cssRules.length;var sel_before='.f-dropdown.open:before',sel_after='.f-dropdown.open:after',css_before='left: '+pip_offset_base+'px;',css_after='left: '+(pip_offset_base-1)+'px;';if(position.missRight==true){pip_offset_base=dropdown.outerWidth()-23;sel_before='.f-dropdown.open:before',sel_after='.f-dropdown.open:after',css_before='left: '+pip_offset_base+'px;',css_after='left: '+(pip_offset_base-1)+'px;';}if(position.triggeredRight==true){sel_before='.f-dropdown.open:before',sel_after='.f-dropdown.open:after',css_before='left:-12px;',css_after='left:-14px;';}if(sheet.insertRule){sheet.insertRule([sel_before,'{',css_before,'}'].join(' '),this.rule_idx);sheet.insertRule([sel_after,'{',css_after,'}'].join(' '),this.rule_idx+1);}else{sheet.addRule(sel_before,css_before,this.rule_idx);sheet.addRule(sel_after,css_after,this.rule_idx+1);}},clear_idx:function(){var sheet=Foundation.stylesheet;if(typeof this.rule_idx!=='undefined'){sheet.deleteRule(this.rule_idx);sheet.deleteRule(this.rule_idx);delete this.rule_idx;}},small:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches;},off:function(){this.S(this.scope).off('.fndtn.dropdown');this.S('html, body').off('.fndtn.dropdown');this.S(window).off('.fndtn.dropdown');this.S('[data-dropdown-content]').off('.fndtn.dropdown');},reflow:function(){}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.equalizer={name:'equalizer',version:'5.5.2',settings:{use_tallest:true,before_height_change:$.noop,after_height_change:$.noop,equalize_on_stack:false,act_on_hidden_el:false},init:function(scope,method,options){Foundation.inherit(this,'image_loaded');this.bindings(method,options);this.reflow();},events:function(){this.S(window).off('.equalizer').on('resize.fndtn.equalizer',function(e){this.reflow();}.bind(this));},equalize:function(equalizer){var isStacked=false,group=equalizer.data('equalizer'),settings=equalizer.data(this.attr_name(true)+'-init')||this.settings,vals,firstTopOffset;if(settings.act_on_hidden_el){vals=group?equalizer.find('['+this.attr_name()+'-watch="'+group+'"]'):equalizer.find('['+this.attr_name()+'-watch]');}else{vals=group?equalizer.find('['+this.attr_name()+'-watch="'+group+'"]:visible'):equalizer.find('['+this.attr_name()+'-watch]:visible');}if(vals.length===0){return;}settings.before_height_change();equalizer.trigger('before-height-change.fndth.equalizer');vals.height('inherit');if(settings.equalize_on_stack===false){firstTopOffset=vals.first().offset().top;vals.each(function(){if($(this).offset().top!==firstTopOffset){isStacked=true;return false;}});if(isStacked){return;}}var heights=vals.map(function(){return $(this).outerHeight(false)}).get();if(settings.use_tallest){var max=Math.max.apply(null,heights);vals.css('height',max);}else{var min=Math.min.apply(null,heights);vals.css('height',min);}settings.after_height_change();equalizer.trigger('after-height-change.fndtn.equalizer');},reflow:function(){var self=this;this.S('['+this.attr_name()+']',this.scope).each(function(){var $eq_target=$(this),media_query=$eq_target.data('equalizer-mq'),ignore_media_query=true;if(media_query){media_query='is_'+media_query.replace(/-/g,'_');if(Foundation.utils.hasOwnProperty(media_query)){ignore_media_query=false;}}self.image_loaded(self.S('img',this),function(){if(ignore_media_query||Foundation.utils[media_query]()){self.equalize($eq_target)}else{var vals=$eq_target.find('['+self.attr_name()+'-watch]:visible');vals.css('height','auto');}});});}};})(jQuery,window,window.document);;(function($,window,document,undefined){'use strict';Foundation.libs.interchange={name:'interchange',version:'5.5.2',cache:{},images_loaded:false,nodes_loaded:false,settings:{load_attr:'interchange',named_queries:{'default':'only screen','small':Foundation.media_queries['small'],'small-only':Foundation.media_queries['small-only'],'medium':Foundation.media_queries['medium'],'medium-only':Foundation.media_queries['medium-only'],'large':Foundation.media_queries['large'],'large-only':Foundation.media_queries['large-only'],'xlarge':Foundation.media_queries['xlarge'],'xlarge-only':Foundation.media_queries['xlarge-only'],'xxlarge':Foundation.media_queries['xxlarge'],'landscape':'only screen and (orientation: landscape)','portrait':'only screen and (orientation: portrait)','retina':'only screen and (-webkit-min-device-pixel-ratio: 2),'+'only screen and (min--moz-device-pixel-ratio: 2),'+'only screen and (-o-min-device-pixel-ratio: 2/1),'+'only screen and (min-device-pixel-ratio: 2),'+'only screen and (min-resolution: 192dpi),'+'only screen and (min-resolution: 2dppx)'},directives:{replace:function(el,path,trigger){if(el!==null&&/IMG/.test(el[0].nodeName)){var orig_path=el[0].src;if(new RegExp(path,'i').test(orig_path)){return;}el.attr("src",path);return trigger(el[0].src);}var last_path=el.data(this.data_attr+'-last-path'),self=this;if(last_path==path){return;}if(/\.(gif|jpg|jpeg|tiff|png)([?#].*)?/i.test(path)){$(el).css('background-image','url('+path+')');el.data('interchange-last-path',path);return trigger(path);}return $.get(path,function(response){el.html(response);el.data(self.data_attr+'-last-path',path);trigger();});}}},init:function(scope,method,options){Foundation.inherit(this,'throttle random_str');this.data_attr=this.set_data_attr();$.extend(true,this.settings,method,options);this.bindings(method,options);this.reflow();},get_media_hash:function(){var mediaHash='';for(var queryName in this.settings.named_queries){mediaHash+=matchMedia(this.settings.named_queries[queryName]).matches.toString();}return mediaHash;},events:function(){var self=this,prevMediaHash;$(window).off('.interchange').on('resize.fndtn.interchange',self.throttle(function(){var currMediaHash=self.get_media_hash();if(currMediaHash!==prevMediaHash){self.resize();}prevMediaHash=currMediaHash;},50));return this;},resize:function(){var cache=this.cache;if(!this.images_loaded||!this.nodes_loaded){setTimeout($.proxy(this.resize,this),50);return;}for(var uuid in cache){if(cache.hasOwnProperty(uuid)){var passed=this.results(uuid,cache[uuid]);if(passed){this.settings.directives[passed.scenario[1]].call(this,passed.el,passed.scenario[0],(function(passed){if(arguments[0]instanceof Array){var args=arguments[0];}else{var args=Array.prototype.slice.call(arguments,0);}return function(){passed.el.trigger(passed.scenario[1],args);}}(passed)));}}}},results:function(uuid,scenarios){var count=scenarios.length;if(count>0){var el=this.S('['+this.add_namespace('data-uuid')+'="'+uuid+'"]');while(count--){var mq,rule=scenarios[count][2];if(this.settings.named_queries.hasOwnProperty(rule)){mq=matchMedia(this.settings.named_queries[rule]);}else{mq=matchMedia(rule);}if(mq.matches){return{el:el,scenario:scenarios[count]};}}}return false;},load:function(type,force_update){if(typeof this['cached_'+type]==='undefined'||force_update){this['update_'+type]();}return this['cached_'+type];},update_images:function(){var images=this.S('img['+this.data_attr+']'),count=images.length,i=count,loaded_count=0,data_attr=this.data_attr;this.cache={};this.cached_images=[];this.images_loaded=(count===0);while(i--){loaded_count++;if(images[i]){var str=images[i].getAttribute(data_attr)||'';if(str.length>0){this.cached_images.push(images[i]);}}if(loaded_count===count){this.images_loaded=true;this.enhance('images');}}return this;},update_nodes:function(){var nodes=this.S('['+this.data_attr+']').not('img'),count=nodes.length,i=count,loaded_count=0,data_attr=this.data_attr;this.cached_nodes=[];this.nodes_loaded=(count===0);while(i--){loaded_count++;var str=nodes[i].getAttribute(data_attr)||'';if(str.length>0){this.cached_nodes.push(nodes[i]);}if(loaded_count===count){this.nodes_loaded=true;this.enhance('nodes');}}return this;},enhance:function(type){var i=this['cached_'+type].length;while(i--){this.object($(this['cached_'+type][i]));}return $(window).trigger('resize.fndtn.interchange');},convert_directive:function(directive){var trimmed=this.trim(directive);if(trimmed.length>0){return trimmed;}return'replace';},parse_scenario:function(scenario){var directive_match=scenario[0].match(/(.+),\s*(\w+)\s*$/),media_query=scenario[1].match(/(.*)\)/);if(directive_match){var path=directive_match[1],directive=directive_match[2];}else{var cached_split=scenario[0].split(/,\s*$/),path=cached_split[0],directive='';}return[this.trim(path),this.convert_directive(directive),this.trim(media_query[1])];},object:function(el){var raw_arr=this.parse_data_attr(el),scenarios=[],i=raw_arr.length;if(i>0){while(i--){var scenario=raw_arr[i].split(/,\s?\(/);if(scenario.length>1){var params=this.parse_scenario(scenario);scenarios.push(params);}}}return this.store(el,scenarios);},store:function(el,scenarios){var uuid=this.random_str(),current_uuid=el.data(this.add_namespace('uuid',true));if(this.cache[current_uuid]){return this.cache[current_uuid];}el.attr(this.add_namespace('data-uuid'),uuid);return this.cache[uuid]=scenarios;},trim:function(str){if(typeof str==='string'){return $.trim(str);}return str;},set_data_attr:function(init){if(init){if(this.namespace.length>0){return this.namespace+'-'+this.settings.load_attr;}return this.settings.load_attr;}if(this.namespace.length>0){return'data-'+this.namespace+'-'+this.settings.load_attr;}return'data-'+this.settings.load_attr;},parse_data_attr:function(el){var raw=el.attr(this.attr_name()).split(/\[(.*?)\]/),i=raw.length,output=[];while(i--){if(raw[i].replace(/[\W\d]+/,'').length>4){output.push(raw[i]);}}return output;},reflow:function(){this.load('images',true);this.load('nodes',true);}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';var Modernizr=Modernizr||false;Foundation.libs.joyride={name:'joyride',version:'5.5.2',defaults:{expose:false,modal:true,keyboard:true,tip_location:'bottom',nub_position:'auto',scroll_speed:1500,scroll_animation:'linear',timer:0,start_timer_on_click:true,start_offset:0,next_button:true,prev_button:true,tip_animation:'fade',pause_after:[],exposed:[],tip_animation_fade_speed:300,cookie_monster:false,cookie_name:'joyride',cookie_domain:false,cookie_expires:365,tip_container:'body',abort_on_close:true,tip_location_patterns:{top:['bottom'],bottom:[],left:['right','top','bottom'],right:['left','top','bottom']},post_ride_callback:function(){},post_step_callback:function(){},pre_step_callback:function(){},pre_ride_callback:function(){},post_expose_callback:function(){},template:{link:'<a href="#close" class="joyride-close-tip">&times;</a>',timer:'<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',tip:'<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',wrapper:'<div class="joyride-content-wrapper"></div>',button:'<a href="#" class="small button joyride-next-tip"></a>',prev_button:'<a href="#" class="small button joyride-prev-tip"></a>',modal:'<div class="joyride-modal-bg"></div>',expose:'<div class="joyride-expose-wrapper"></div>',expose_cover:'<div class="joyride-expose-cover"></div>'},expose_add_class:''},init:function(scope,method,options){Foundation.inherit(this,'throttle random_str');this.settings=this.settings||$.extend({},this.defaults,(options||method));this.bindings(method,options)},go_next:function(){if(this.settings.$li.next().length<1){this.end();}else if(this.settings.timer>0){clearTimeout(this.settings.automate);this.hide();this.show();this.startTimer();}else{this.hide();this.show();}},go_prev:function(){if(this.settings.$li.prev().length<1){}else if(this.settings.timer>0){clearTimeout(this.settings.automate);this.hide();this.show(null,true);this.startTimer();}else{this.hide();this.show(null,true);}},events:function(){var self=this;$(this.scope).off('.joyride').on('click.fndtn.joyride','.joyride-next-tip, .joyride-modal-bg',function(e){e.preventDefault();this.go_next()}.bind(this)).on('click.fndtn.joyride','.joyride-prev-tip',function(e){e.preventDefault();this.go_prev();}.bind(this)).on('click.fndtn.joyride','.joyride-close-tip',function(e){e.preventDefault();this.end(this.settings.abort_on_close);}.bind(this)).on('keyup.fndtn.joyride',function(e){if(!this.settings.keyboard||!this.settings.riding){return;}switch(e.which){case 39:e.preventDefault();this.go_next();break;case 37:e.preventDefault();this.go_prev();break;case 27:e.preventDefault();this.end(this.settings.abort_on_close);}}.bind(this));$(window).off('.joyride').on('resize.fndtn.joyride',self.throttle(function(){if($('['+self.attr_name()+']').length>0&&self.settings.$next_tip&&self.settings.riding){if(self.settings.exposed.length>0){var $els=$(self.settings.exposed);$els.each(function(){var $this=$(this);self.un_expose($this);self.expose($this);});}if(self.is_phone()){self.pos_phone();}else{self.pos_default(false);}}},100));},start:function(){var self=this,$this=$('['+this.attr_name()+']',this.scope),integer_settings=['timer','scrollSpeed','startOffset','tipAnimationFadeSpeed','cookieExpires'],int_settings_count=integer_settings.length;if(!$this.length>0){return;}if(!this.settings.init){this.events();}this.settings=$this.data(this.attr_name(true)+'-init');this.settings.$content_el=$this;this.settings.$body=$(this.settings.tip_container);this.settings.body_offset=$(this.settings.tip_container).position();this.settings.$tip_content=this.settings.$content_el.find('> li');this.settings.paused=false;this.settings.attempts=0;this.settings.riding=true;if(typeof $.cookie!=='function'){this.settings.cookie_monster=false;}if(!this.settings.cookie_monster||this.settings.cookie_monster&&!$.cookie(this.settings.cookie_name)){this.settings.$tip_content.each(function(index){var $this=$(this);this.settings=$.extend({},self.defaults,self.data_options($this));var i=int_settings_count;while(i--){self.settings[integer_settings[i]]=parseInt(self.settings[integer_settings[i]],10);}self.create({$li:$this,index:index});});if(!this.settings.start_timer_on_click&&this.settings.timer>0){this.show('init');this.startTimer();}else{this.show('init');}}},resume:function(){this.set_li();this.show();},tip_template:function(opts){var $blank,content;opts.tip_class=opts.tip_class||'';$blank=$(this.settings.template.tip).addClass(opts.tip_class);content=$.trim($(opts.li).html())+this.prev_button_text(opts.prev_button_text,opts.index)+this.button_text(opts.button_text)+this.settings.template.link+this.timer_instance(opts.index);$blank.append($(this.settings.template.wrapper));$blank.first().attr(this.add_namespace('data-index'),opts.index);$('.joyride-content-wrapper',$blank).append(content);return $blank[0];},timer_instance:function(index){var txt;if((index===0&&this.settings.start_timer_on_click&&this.settings.timer>0)||this.settings.timer===0){txt='';}else{txt=$(this.settings.template.timer)[0].outerHTML;}return txt;},button_text:function(txt){if(this.settings.tip_settings.next_button){txt=$.trim(txt)||'Next';txt=$(this.settings.template.button).append(txt)[0].outerHTML;}else{txt='';}return txt;},prev_button_text:function(txt,idx){if(this.settings.tip_settings.prev_button){txt=$.trim(txt)||'Previous';if(idx==0){txt=$(this.settings.template.prev_button).append(txt).addClass('disabled')[0].outerHTML;}else{txt=$(this.settings.template.prev_button).append(txt)[0].outerHTML;}}else{txt='';}return txt;},create:function(opts){this.settings.tip_settings=$.extend({},this.settings,this.data_options(opts.$li));var buttonText=opts.$li.attr(this.add_namespace('data-button'))||opts.$li.attr(this.add_namespace('data-text')),prevButtonText=opts.$li.attr(this.add_namespace('data-button-prev'))||opts.$li.attr(this.add_namespace('data-prev-text')),tipClass=opts.$li.attr('class'),$tip_content=$(this.tip_template({tip_class:tipClass,index:opts.index,button_text:buttonText,prev_button_text:prevButtonText,li:opts.$li}));$(this.settings.tip_container).append($tip_content);},show:function(init,is_prev){var $timer=null;if(this.settings.$li===undefined||($.inArray(this.settings.$li.index(),this.settings.pause_after)===-1)){if(this.settings.paused){this.settings.paused=false;}else{this.set_li(init,is_prev);}this.settings.attempts=0;if(this.settings.$li.length&&this.settings.$target.length>0){if(init){this.settings.pre_ride_callback(this.settings.$li.index(),this.settings.$next_tip);if(this.settings.modal){this.show_modal();}}this.settings.pre_step_callback(this.settings.$li.index(),this.settings.$next_tip);if(this.settings.modal&&this.settings.expose){this.expose();}this.settings.tip_settings=$.extend({},this.settings,this.data_options(this.settings.$li));this.settings.timer=parseInt(this.settings.timer,10);this.settings.tip_settings.tip_location_pattern=this.settings.tip_location_patterns[this.settings.tip_settings.tip_location];if(!/body/i.test(this.settings.$target.selector)){var joyridemodalbg=$('.joyride-modal-bg');if(/pop/i.test(this.settings.tipAnimation)){joyridemodalbg.hide();}else{joyridemodalbg.fadeOut(this.settings.tipAnimationFadeSpeed);}this.scroll_to();}if(this.is_phone()){this.pos_phone(true);}else{this.pos_default(true);}$timer=this.settings.$next_tip.find('.joyride-timer-indicator');if(/pop/i.test(this.settings.tip_animation)){$timer.width(0);if(this.settings.timer>0){this.settings.$next_tip.show();setTimeout(function(){$timer.animate({width:$timer.parent().width()},this.settings.timer,'linear');}.bind(this),this.settings.tip_animation_fade_speed);}else{this.settings.$next_tip.show();}}else if(/fade/i.test(this.settings.tip_animation)){$timer.width(0);if(this.settings.timer>0){this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed).show();setTimeout(function(){$timer.animate({width:$timer.parent().width()},this.settings.timer,'linear');}.bind(this),this.settings.tip_animation_fade_speed);}else{this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed);}}this.settings.$current_tip=this.settings.$next_tip;}else if(this.settings.$li&&this.settings.$target.length<1){this.show(init,is_prev);}else{this.end();}}else{this.settings.paused=true;}},is_phone:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches;},hide:function(){if(this.settings.modal&&this.settings.expose){this.un_expose();}if(!this.settings.modal){$('.joyride-modal-bg').hide();}this.settings.$current_tip.css('visibility','hidden');setTimeout($.proxy(function(){this.hide();this.css('visibility','visible');},this.settings.$current_tip),0);this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip);},set_li:function(init,is_prev){if(init){this.settings.$li=this.settings.$tip_content.eq(this.settings.start_offset);this.set_next_tip();this.settings.$current_tip=this.settings.$next_tip;}else{if(is_prev){this.settings.$li=this.settings.$li.prev();}else{this.settings.$li=this.settings.$li.next();}this.set_next_tip();}this.set_target();},set_next_tip:function(){this.settings.$next_tip=$('.joyride-tip-guide').eq(this.settings.$li.index());this.settings.$next_tip.data('closed','');},set_target:function(){var cl=this.settings.$li.attr(this.add_namespace('data-class')),id=this.settings.$li.attr(this.add_namespace('data-id')),$sel=function(){if(id){return $(document.getElementById(id));}else if(cl){return $('.'+cl).first();}else{return $('body');}};this.settings.$target=$sel();},scroll_to:function(){var window_half,tipOffset;window_half=$(window).height()/2;tipOffset=Math.ceil(this.settings.$target.offset().top-window_half+this.settings.$next_tip.outerHeight());if(tipOffset!=0){$('html, body').stop().animate({scrollTop:tipOffset},this.settings.scroll_speed,'swing');}},paused:function(){return($.inArray((this.settings.$li.index()+1),this.settings.pause_after)===-1);},restart:function(){this.hide();this.settings.$li=undefined;this.show('init');},pos_default:function(init){var $nub=this.settings.$next_tip.find('.joyride-nub'),nub_width=Math.ceil($nub.outerWidth()/2),nub_height=Math.ceil($nub.outerHeight()/2),toggle=init||false;if(toggle){this.settings.$next_tip.css('visibility','hidden');this.settings.$next_tip.show();}if(!/body/i.test(this.settings.$target.selector)){var topAdjustment=this.settings.tip_settings.tipAdjustmentY?parseInt(this.settings.tip_settings.tipAdjustmentY):0,leftAdjustment=this.settings.tip_settings.tipAdjustmentX?parseInt(this.settings.tip_settings.tipAdjustmentX):0;if(this.bottom()){if(this.rtl){this.settings.$next_tip.css({top:(this.settings.$target.offset().top+nub_height+this.settings.$target.outerHeight()+topAdjustment),left:this.settings.$target.offset().left+this.settings.$target.outerWidth()-this.settings.$next_tip.outerWidth()+leftAdjustment});}else{this.settings.$next_tip.css({top:(this.settings.$target.offset().top+nub_height+this.settings.$target.outerHeight()+topAdjustment),left:this.settings.$target.offset().left+leftAdjustment});}this.nub_position($nub,this.settings.tip_settings.nub_position,'top');}else if(this.top()){if(this.rtl){this.settings.$next_tip.css({top:(this.settings.$target.offset().top-this.settings.$next_tip.outerHeight()-nub_height+topAdjustment),left:this.settings.$target.offset().left+this.settings.$target.outerWidth()-this.settings.$next_tip.outerWidth()});}else{this.settings.$next_tip.css({top:(this.settings.$target.offset().top-this.settings.$next_tip.outerHeight()-nub_height+topAdjustment),left:this.settings.$target.offset().left+leftAdjustment});}this.nub_position($nub,this.settings.tip_settings.nub_position,'bottom');}else if(this.right()){this.settings.$next_tip.css({top:this.settings.$target.offset().top+topAdjustment,left:(this.settings.$target.outerWidth()+this.settings.$target.offset().left+nub_width+leftAdjustment)});this.nub_position($nub,this.settings.tip_settings.nub_position,'left');}else if(this.left()){this.settings.$next_tip.css({top:this.settings.$target.offset().top+topAdjustment,left:(this.settings.$target.offset().left-this.settings.$next_tip.outerWidth()-nub_width+leftAdjustment)});this.nub_position($nub,this.settings.tip_settings.nub_position,'right');}if(!this.visible(this.corners(this.settings.$next_tip))&&this.settings.attempts<this.settings.tip_settings.tip_location_pattern.length){$nub.removeClass('bottom').removeClass('top').removeClass('right').removeClass('left');this.settings.tip_settings.tip_location=this.settings.tip_settings.tip_location_pattern[this.settings.attempts];this.settings.attempts++;this.pos_default();}}else if(this.settings.$li.length){this.pos_modal($nub);}if(toggle){this.settings.$next_tip.hide();this.settings.$next_tip.css('visibility','visible');}},pos_phone:function(init){var tip_height=this.settings.$next_tip.outerHeight(),tip_offset=this.settings.$next_tip.offset(),target_height=this.settings.$target.outerHeight(),$nub=$('.joyride-nub',this.settings.$next_tip),nub_height=Math.ceil($nub.outerHeight()/2),toggle=init||false;$nub.removeClass('bottom').removeClass('top').removeClass('right').removeClass('left');if(toggle){this.settings.$next_tip.css('visibility','hidden');this.settings.$next_tip.show();}if(!/body/i.test(this.settings.$target.selector)){if(this.top()){this.settings.$next_tip.offset({top:this.settings.$target.offset().top-tip_height-nub_height});$nub.addClass('bottom');}else{this.settings.$next_tip.offset({top:this.settings.$target.offset().top+target_height+nub_height});$nub.addClass('top');}}else if(this.settings.$li.length){this.pos_modal($nub);}if(toggle){this.settings.$next_tip.hide();this.settings.$next_tip.css('visibility','visible');}},pos_modal:function($nub){this.center();$nub.hide();this.show_modal();},show_modal:function(){if(!this.settings.$next_tip.data('closed')){var joyridemodalbg=$('.joyride-modal-bg');if(joyridemodalbg.length<1){var joyridemodalbg=$(this.settings.template.modal);joyridemodalbg.appendTo('body');}if(/pop/i.test(this.settings.tip_animation)){joyridemodalbg.show();}else{joyridemodalbg.fadeIn(this.settings.tip_animation_fade_speed);}}},expose:function(){var expose,exposeCover,el,origCSS,origClasses,randId='expose-'+this.random_str(6);if(arguments.length>0&&arguments[0]instanceof $){el=arguments[0];}else if(this.settings.$target&&!/body/i.test(this.settings.$target.selector)){el=this.settings.$target;}else{return false;}if(el.length<1){if(window.console){console.error('element not valid',el);}return false;}expose=$(this.settings.template.expose);this.settings.$body.append(expose);expose.css({top:el.offset().top,left:el.offset().left,width:el.outerWidth(true),height:el.outerHeight(true)});exposeCover=$(this.settings.template.expose_cover);origCSS={zIndex:el.css('z-index'),position:el.css('position')};origClasses=el.attr('class')==null?'':el.attr('class');el.css('z-index',parseInt(expose.css('z-index'))+1);if(origCSS.position=='static'){el.css('position','relative');}el.data('expose-css',origCSS);el.data('orig-class',origClasses);el.attr('class',origClasses+' '+this.settings.expose_add_class);exposeCover.css({top:el.offset().top,left:el.offset().left,width:el.outerWidth(true),height:el.outerHeight(true)});if(this.settings.modal){this.show_modal();}this.settings.$body.append(exposeCover);expose.addClass(randId);exposeCover.addClass(randId);el.data('expose',randId);this.settings.post_expose_callback(this.settings.$li.index(),this.settings.$next_tip,el);this.add_exposed(el);},un_expose:function(){var exposeId,el,expose,origCSS,origClasses,clearAll=false;if(arguments.length>0&&arguments[0]instanceof $){el=arguments[0];}else if(this.settings.$target&&!/body/i.test(this.settings.$target.selector)){el=this.settings.$target;}else{return false;}if(el.length<1){if(window.console){console.error('element not valid',el);}return false;}exposeId=el.data('expose');expose=$('.'+exposeId);if(arguments.length>1){clearAll=arguments[1];}if(clearAll===true){$('.joyride-expose-wrapper,.joyride-expose-cover').remove();}else{expose.remove();}origCSS=el.data('expose-css');if(origCSS.zIndex=='auto'){el.css('z-index','');}else{el.css('z-index',origCSS.zIndex);}if(origCSS.position!=el.css('position')){if(origCSS.position=='static'){el.css('position','');}else{el.css('position',origCSS.position);}}origClasses=el.data('orig-class');el.attr('class',origClasses);el.removeData('orig-classes');el.removeData('expose');el.removeData('expose-z-index');this.remove_exposed(el);},add_exposed:function(el){this.settings.exposed=this.settings.exposed||[];if(el instanceof $||typeof el==='object'){this.settings.exposed.push(el[0]);}else if(typeof el=='string'){this.settings.exposed.push(el);}},remove_exposed:function(el){var search,i;if(el instanceof $){search=el[0]}else if(typeof el=='string'){search=el;}this.settings.exposed=this.settings.exposed||[];i=this.settings.exposed.length;while(i--){if(this.settings.exposed[i]==search){this.settings.exposed.splice(i,1);return;}}},center:function(){var $w=$(window);this.settings.$next_tip.css({top:((($w.height()-this.settings.$next_tip.outerHeight())/2)+$w.scrollTop()),left:((($w.width()-this.settings.$next_tip.outerWidth())/2)+$w.scrollLeft())});return true;},bottom:function(){return/bottom/i.test(this.settings.tip_settings.tip_location);},top:function(){return/top/i.test(this.settings.tip_settings.tip_location);},right:function(){return/right/i.test(this.settings.tip_settings.tip_location);},left:function(){return/left/i.test(this.settings.tip_settings.tip_location);},corners:function(el){var w=$(window),window_half=w.height()/2,tipOffset=Math.ceil(this.settings.$target.offset().top-window_half+this.settings.$next_tip.outerHeight()),right=w.width()+w.scrollLeft(),offsetBottom=w.height()+tipOffset,bottom=w.height()+w.scrollTop(),top=w.scrollTop();if(tipOffset<top){if(tipOffset<0){top=0;}else{top=tipOffset;}}if(offsetBottom>bottom){bottom=offsetBottom;}return[el.offset().top<top,right<el.offset().left+el.outerWidth(),bottom<el.offset().top+el.outerHeight(),w.scrollLeft()>el.offset().left];},visible:function(hidden_corners){var i=hidden_corners.length;while(i--){if(hidden_corners[i]){return false;}}return true;},nub_position:function(nub,pos,def){if(pos==='auto'){nub.addClass(def);}else{nub.addClass(pos);}},startTimer:function(){if(this.settings.$li.length){this.settings.automate=setTimeout(function(){this.hide();this.show();this.startTimer();}.bind(this),this.settings.timer);}else{clearTimeout(this.settings.automate);}},end:function(abort){if(this.settings.cookie_monster){$.cookie(this.settings.cookie_name,'ridden',{expires:this.settings.cookie_expires,domain:this.settings.cookie_domain});}if(this.settings.timer>0){clearTimeout(this.settings.automate);}if(this.settings.modal&&this.settings.expose){this.un_expose();}$(this.scope).off('keyup.joyride')
this.settings.$next_tip.data('closed',true);this.settings.riding=false;$('.joyride-modal-bg').hide();this.settings.$current_tip.hide();if(typeof abort==='undefined'||abort===false){this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip);this.settings.post_ride_callback(this.settings.$li.index(),this.settings.$current_tip);}$('.joyride-tip-guide').remove();},off:function(){$(this.scope).off('.joyride');$(window).off('.joyride');$('.joyride-close-tip, .joyride-next-tip, .joyride-modal-bg').off('.joyride');$('.joyride-tip-guide, .joyride-modal-bg').remove();clearTimeout(this.settings.automate);this.settings={};},reflow:function(){}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs['magellan-expedition']={name:'magellan-expedition',version:'5.5.2',settings:{active_class:'active',threshold:0,destination_threshold:20,throttle_delay:30,fixed_top:0,offset_by_height:true,duration:700,easing:'swing'},init:function(scope,method,options){Foundation.inherit(this,'throttle');this.bindings(method,options);},events:function(){var self=this,S=self.S,settings=self.settings;self.set_expedition_position();S(self.scope).off('.magellan').on('click.fndtn.magellan','['+self.add_namespace('data-magellan-arrival')+'] a[href*=#]',function(e){var sameHost=((this.hostname===location.hostname)||!this.hostname),samePath=self.filterPathname(location.pathname)===self.filterPathname(this.pathname),testHash=this.hash.replace(/(:|\.|\/)/g,'\\$1'),anchor=this;if(sameHost&&samePath&&testHash){e.preventDefault();var expedition=$(this).closest('['+self.attr_name()+']'),settings=expedition.data('magellan-expedition-init'),hash=this.hash.split('#').join(''),target=$('a[name="'+hash+'"]');if(target.length===0){target=$('#'+hash);}var scroll_top=target.offset().top-settings.destination_threshold+1;if(settings.offset_by_height){scroll_top=scroll_top-expedition.outerHeight();}$('html, body').stop().animate({'scrollTop':scroll_top},settings.duration,settings.easing,function(){if(history.pushState){history.pushState(null,null,anchor.pathname+'#'+hash);}else{location.hash=anchor.pathname+'#'+hash;}});}}).on('scroll.fndtn.magellan',self.throttle(this.check_for_arrivals.bind(this),settings.throttle_delay));},check_for_arrivals:function(){var self=this;self.update_arrivals();self.update_expedition_positions();},set_expedition_position:function(){var self=this;$('['+this.attr_name()+'=fixed]',self.scope).each(function(idx,el){var expedition=$(this),settings=expedition.data('magellan-expedition-init'),styles=expedition.attr('styles'),top_offset,fixed_top;expedition.attr('style','');top_offset=expedition.offset().top+settings.threshold;fixed_top=parseInt(expedition.data('magellan-fixed-top'));if(!isNaN(fixed_top)){self.settings.fixed_top=fixed_top;}expedition.data(self.data_attr('magellan-top-offset'),top_offset);expedition.attr('style',styles);});},update_expedition_positions:function(){var self=this,window_top_offset=$(window).scrollTop();$('['+this.attr_name()+'=fixed]',self.scope).each(function(){var expedition=$(this),settings=expedition.data('magellan-expedition-init'),styles=expedition.attr('style'),top_offset=expedition.data('magellan-top-offset');if(window_top_offset+self.settings.fixed_top>=top_offset){var placeholder=expedition.prev('['+self.add_namespace('data-magellan-expedition-clone')+']');if(placeholder.length===0){placeholder=expedition.clone();placeholder.removeAttr(self.attr_name());placeholder.attr(self.add_namespace('data-magellan-expedition-clone'),'');expedition.before(placeholder);}expedition.css({position:'fixed',top:settings.fixed_top}).addClass('fixed');}else{expedition.prev('['+self.add_namespace('data-magellan-expedition-clone')+']').remove();expedition.attr('style',styles).css('position','').css('top','').removeClass('fixed');}});},update_arrivals:function(){var self=this,window_top_offset=$(window).scrollTop();$('['+this.attr_name()+']',self.scope).each(function(){var expedition=$(this),settings=expedition.data(self.attr_name(true)+'-init'),offsets=self.offsets(expedition,window_top_offset),arrivals=expedition.find('['+self.add_namespace('data-magellan-arrival')+']'),active_item=false;offsets.each(function(idx,item){if(item.viewport_offset>=item.top_offset){var arrivals=expedition.find('['+self.add_namespace('data-magellan-arrival')+']');arrivals.not(item.arrival).removeClass(settings.active_class);item.arrival.addClass(settings.active_class);active_item=true;return true;}});if(!active_item){arrivals.removeClass(settings.active_class);}});},offsets:function(expedition,window_offset){var self=this,settings=expedition.data(self.attr_name(true)+'-init'),viewport_offset=window_offset;return expedition.find('['+self.add_namespace('data-magellan-arrival')+']').map(function(idx,el){var name=$(this).data(self.data_attr('magellan-arrival')),dest=$('['+self.add_namespace('data-magellan-destination')+'='+name+']');if(dest.length>0){var top_offset=dest.offset().top-settings.destination_threshold;if(settings.offset_by_height){top_offset=top_offset-expedition.outerHeight();}top_offset=Math.floor(top_offset);return{destination:dest,arrival:$(this),top_offset:top_offset,viewport_offset:viewport_offset}}}).sort(function(a,b){if(a.top_offset<b.top_offset){return-1;}if(a.top_offset>b.top_offset){return 1;}return 0;});},data_attr:function(str){if(this.namespace.length>0){return this.namespace+'-'+str;}return str;},off:function(){this.S(this.scope).off('.magellan');this.S(window).off('.magellan');},filterPathname:function(pathname){pathname=pathname||'';return pathname.replace(/^\//,'').replace(/(?:index|default).[a-zA-Z]{3,4}$/,'').replace(/\/$/,'');},reflow:function(){var self=this;$('['+self.add_namespace('data-magellan-expedition-clone')+']',self.scope).remove();}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.offcanvas={name:'offcanvas',version:'5.5.2',settings:{open_method:'move',close_on_click:false},init:function(scope,method,options){this.bindings(method,options);},events:function(){var self=this,S=self.S,move_class='',right_postfix='',left_postfix='';if(this.settings.open_method==='move'){move_class='move-';right_postfix='right';left_postfix='left';}else if(this.settings.open_method==='overlap_single'){move_class='offcanvas-overlap-';right_postfix='right';left_postfix='left';}else if(this.settings.open_method==='overlap'){move_class='offcanvas-overlap';}S(this.scope).off('.offcanvas').on('click.fndtn.offcanvas','.left-off-canvas-toggle',function(e){self.click_toggle_class(e,move_class+right_postfix);if(self.settings.open_method!=='overlap'){S('.left-submenu').removeClass(move_class+right_postfix);}$('.left-off-canvas-toggle').attr('aria-expanded','true');}).on('click.fndtn.offcanvas','.left-off-canvas-menu span.asd , .left-off-canvas-menu .back a',function(e){var settings=self.get_settings(e);var parent=S(this).parent();if(settings.close_on_click&&!parent.hasClass('has-submenu')&&!parent.hasClass('back')){self.hide.call(self,move_class+right_postfix,self.get_wrapper(e));parent.parent().removeClass(move_class+right_postfix);}else if(S(this).parent().hasClass('has-submenu')){e.preventDefault();S(this).siblings('.left-submenu').toggleClass(move_class+right_postfix);}else if(parent.hasClass('back')){e.preventDefault();parent.parent().removeClass(move_class+right_postfix);}$('.left-off-canvas-toggle').attr('aria-expanded','true');}).on('click.fndtn.offcanvas','.right-off-canvas-toggle',function(e){self.click_toggle_class(e,move_class+left_postfix);if(self.settings.open_method!=='overlap'){S('.right-submenu').removeClass(move_class+left_postfix);}$('.right-off-canvas-toggle').attr('aria-expanded','true');}).on('click.fndtn.offcanvas','.right-off-canvas-menu span.asd , .left-off-canvas-menu .back a',function(e){var settings=self.get_settings(e);var parent=S(this).parent();if(settings.close_on_click&&!parent.hasClass('has-submenu')&&!parent.hasClass('back')){self.hide.call(self,move_class+left_postfix,self.get_wrapper(e));parent.parent().removeClass(move_class+left_postfix);}else if(S(this).parent().hasClass('has-submenu')){e.preventDefault();S(this).siblings('.right-submenu').toggleClass(move_class+left_postfix);}else if(parent.hasClass('back')){e.preventDefault();parent.parent().removeClass(move_class+left_postfix);}$('.right-off-canvas-toggle').attr('aria-expanded','true');}).on('click.fndtn.offcanvas','.exit-off-canvas',function(e){self.click_remove_class(e,move_class+left_postfix);S('.right-submenu').removeClass(move_class+left_postfix);if(right_postfix){self.click_remove_class(e,move_class+right_postfix);S('.left-submenu').removeClass(move_class+left_postfix);}$('.right-off-canvas-toggle').attr('aria-expanded','true');}).on('click.fndtn.offcanvas','.exit-off-canvas',function(e){self.click_remove_class(e,move_class+left_postfix);$('.left-off-canvas-toggle').attr('aria-expanded','false');if(right_postfix){self.click_remove_class(e,move_class+right_postfix);$('.right-off-canvas-toggle').attr('aria-expanded','false');}});},toggle:function(class_name,$off_canvas){$off_canvas=$off_canvas||this.get_wrapper();if($off_canvas.is('.'+class_name)){this.hide(class_name,$off_canvas);}else{this.show(class_name,$off_canvas);}},show:function(class_name,$off_canvas){$off_canvas=$off_canvas||this.get_wrapper();$off_canvas.trigger('open.fndtn.offcanvas');$off_canvas.addClass(class_name);},hide:function(class_name,$off_canvas){$off_canvas=$off_canvas||this.get_wrapper();$off_canvas.trigger('close.fndtn.offcanvas');$off_canvas.removeClass(class_name);},click_toggle_class:function(e,class_name){e.preventDefault();var $off_canvas=this.get_wrapper(e);this.toggle(class_name,$off_canvas);},click_remove_class:function(e,class_name){e.preventDefault();var $off_canvas=this.get_wrapper(e);this.hide(class_name,$off_canvas);},get_settings:function(e){var offcanvas=this.S(e.target).closest('['+this.attr_name()+']');return offcanvas.data(this.attr_name(true)+'-init')||this.settings;},get_wrapper:function(e){var $off_canvas=this.S(e?e.target:this.scope).closest('.off-canvas-wrap');if($off_canvas.length===0){$off_canvas=this.S('.off-canvas-wrap');}return $off_canvas;},reflow:function(){}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';var noop=function(){};var Orbit=function(el,settings){if(el.hasClass(settings.slides_container_class)){return this;}var self=this,container,slides_container=el,number_container,bullets_container,timer_container,idx=0,animate,timer,locked=false,adjust_height_after=false;self.slides=function(){return slides_container.children(settings.slide_selector);};self.slides().first().addClass(settings.active_slide_class);self.update_slide_number=function(index){if(settings.slide_number){number_container.find('span:first').text(parseInt(index)+1);number_container.find('span:last').text(self.slides().length);}if(settings.bullets){bullets_container.children().removeClass(settings.bullets_active_class);$(bullets_container.children().get(index)).addClass(settings.bullets_active_class);}};self.update_active_link=function(index){var link=$('[data-orbit-link="'+self.slides().eq(index).attr('data-orbit-slide')+'"]');link.siblings().removeClass(settings.bullets_active_class);link.addClass(settings.bullets_active_class);};self.build_markup=function(){slides_container.wrap('<div class="'+settings.container_class+'"></div>');container=slides_container.parent();slides_container.addClass(settings.slides_container_class);if(settings.stack_on_small){container.addClass(settings.stack_on_small_class);}if(settings.navigation_arrows){container.append($('<a href="#"><span></span></a>').addClass(settings.prev_class));container.append($('<a href="#"><span></span></a>').addClass(settings.next_class));}if(settings.timer){timer_container=$('<div>').addClass(settings.timer_container_class);timer_container.append('<span>');timer_container.append($('<div>').addClass(settings.timer_progress_class));timer_container.addClass(settings.timer_paused_class);container.append(timer_container);}if(settings.slide_number){number_container=$('<div>').addClass(settings.slide_number_class);number_container.append('<span></span> '+settings.slide_number_text+' <span></span>');container.append(number_container);}if(settings.bullets){bullets_container=$('<ol>').addClass(settings.bullets_container_class);container.append(bullets_container);bullets_container.wrap('<div class="orbit-bullets-container"></div>');self.slides().each(function(idx,el){var bullet=$('<li>').attr('data-orbit-slide',idx).on('click',self.link_bullet);;bullets_container.append(bullet);});}};self._goto=function(next_idx,start_timer){if(next_idx===idx){return false;}if(typeof timer==='object'){timer.restart();}var slides=self.slides();var dir='next';locked=true;if(next_idx<idx){dir='prev';}if(next_idx>=slides.length){if(!settings.circular){return false;}next_idx=0;}else if(next_idx<0){if(!settings.circular){return false;}next_idx=slides.length-1;}var current=$(slides.get(idx));var next=$(slides.get(next_idx));current.css('zIndex',2);current.removeClass(settings.active_slide_class);next.css('zIndex',4).addClass(settings.active_slide_class);slides_container.trigger('before-slide-change.fndtn.orbit');settings.before_slide_change();self.update_active_link(next_idx);var callback=function(){var unlock=function(){idx=next_idx;locked=false;if(start_timer===true){timer=self.create_timer();timer.start();}self.update_slide_number(idx);slides_container.trigger('after-slide-change.fndtn.orbit',[{slide_number:idx,total_slides:slides.length}]);settings.after_slide_change(idx,slides.length);};if(slides_container.outerHeight()!=next.outerHeight()&&settings.variable_height){slides_container.animate({'height':next.outerHeight()},250,'linear',unlock);}else{unlock();}};if(slides.length===1){callback();return false;}var start_animation=function(){if(dir==='next'){animate.next(current,next,callback);}if(dir==='prev'){animate.prev(current,next,callback);}};if(next.outerHeight()>slides_container.outerHeight()&&settings.variable_height){slides_container.animate({'height':next.outerHeight()},250,'linear',start_animation);}else{start_animation();}};self.next=function(e){e.stopImmediatePropagation();e.preventDefault();self._goto(idx+1);};self.prev=function(e){e.stopImmediatePropagation();e.preventDefault();self._goto(idx-1);};self.link_custom=function(e){e.preventDefault();var link=$(this).attr('data-orbit-link');if((typeof link==='string')&&(link=$.trim(link))!=''){var slide=container.find('[data-orbit-slide='+link+']');if(slide.index()!=-1){self._goto(slide.index());}}};self.link_bullet=function(e){var index=$(this).attr('data-orbit-slide');if((typeof index==='string')&&(index=$.trim(index))!=''){if(isNaN(parseInt(index))){var slide=container.find('[data-orbit-slide='+index+']');if(slide.index()!=-1){self._goto(slide.index()+1);}}else{self._goto(parseInt(index));}}}
self.timer_callback=function(){self._goto(idx+1,true);}
self.compute_dimensions=function(){var current=$(self.slides().get(idx));var h=current.outerHeight();if(!settings.variable_height){self.slides().each(function(){if($(this).outerHeight()>h){h=$(this).outerHeight();}});}slides_container.height(h);};self.create_timer=function(){var t=new Timer(container.find('.'+settings.timer_container_class),settings,self.timer_callback);return t;};self.stop_timer=function(){if(typeof timer==='object'){timer.stop();}};self.toggle_timer=function(){var t=container.find('.'+settings.timer_container_class);if(t.hasClass(settings.timer_paused_class)){if(typeof timer==='undefined'){timer=self.create_timer();}timer.start();}else{if(typeof timer==='object'){timer.stop();}}};self.init=function(){self.build_markup();if(settings.timer){timer=self.create_timer();Foundation.utils.image_loaded(this.slides().children('img'),timer.start);}animate=new FadeAnimation(settings,slides_container);if(settings.animation==='slide'){animate=new SlideAnimation(settings,slides_container);}container.on('click','.'+settings.next_class,self.next);container.on('click','.'+settings.prev_class,self.prev);if(settings.next_on_click){container.on('click','.'+settings.slides_container_class+' [data-orbit-slide]',self.link_bullet);}container.on('click',self.toggle_timer);if(settings.swipe){container.on('touchstart.fndtn.orbit',function(e){if(!e.touches){e=e.originalEvent;}var data={start_page_x:e.touches[0].pageX,start_page_y:e.touches[0].pageY,start_time:(new Date()).getTime(),delta_x:0,is_scrolling:undefined};container.data('swipe-transition',data);e.stopPropagation();}).on('touchmove.fndtn.orbit',function(e){if(!e.touches){e=e.originalEvent;}if(e.touches.length>1||e.scale&&e.scale!==1){return;}var data=container.data('swipe-transition');if(typeof data==='undefined'){data={};}data.delta_x=e.touches[0].pageX-data.start_page_x;if(typeof data.is_scrolling==='undefined'){data.is_scrolling=!!(data.is_scrolling||Math.abs(data.delta_x)<Math.abs(e.touches[0].pageY-data.start_page_y));}if(!data.is_scrolling&&!data.active){e.preventDefault();var direction=(data.delta_x<0)?(idx+1):(idx-1);data.active=true;self._goto(direction);}}).on('touchend.fndtn.orbit',function(e){container.data('swipe-transition',{});e.stopPropagation();})}container.on('mouseenter.fndtn.orbit',function(e){if(settings.timer&&settings.pause_on_hover){self.stop_timer();}}).on('mouseleave.fndtn.orbit',function(e){if(settings.timer&&settings.resume_on_mouseout){timer.start();}});$(document).on('click','[data-orbit-link]',self.link_custom);$(window).on('load resize',self.compute_dimensions);Foundation.utils.image_loaded(this.slides().children('img'),self.compute_dimensions);Foundation.utils.image_loaded(this.slides().children('img'),function(){container.prev('.'+settings.preloader_class).css('display','none');self.update_slide_number(0);self.update_active_link(0);slides_container.trigger('ready.fndtn.orbit');});};self.init();};var Timer=function(el,settings,callback){var self=this,duration=settings.timer_speed,progress=el.find('.'+settings.timer_progress_class),start,timeout,left=-1;this.update_progress=function(w){var new_progress=progress.clone();new_progress.attr('style','');new_progress.css('width',w+'%');progress.replaceWith(new_progress);progress=new_progress;};this.restart=function(){clearTimeout(timeout);el.addClass(settings.timer_paused_class);left=-1;self.update_progress(0);};this.start=function(){if(!el.hasClass(settings.timer_paused_class)){return true;}left=(left===-1)?duration:left;el.removeClass(settings.timer_paused_class);start=new Date().getTime();progress.animate({'width':'100%'},left,'linear');timeout=setTimeout(function(){self.restart();callback();},left);el.trigger('timer-started.fndtn.orbit')};this.stop=function(){if(el.hasClass(settings.timer_paused_class)){return true;}clearTimeout(timeout);el.addClass(settings.timer_paused_class);var end=new Date().getTime();left=left-(end-start);var w=100-((left/duration)*100);self.update_progress(w);el.trigger('timer-stopped.fndtn.orbit');};};var SlideAnimation=function(settings,container){var duration=settings.animation_speed;var is_rtl=($('html[dir=rtl]').length===1);var margin=is_rtl?'marginRight':'marginLeft';var animMargin={};animMargin[margin]='0%';this.next=function(current,next,callback){current.animate({marginLeft:'-100%'},duration);next.animate(animMargin,duration,function(){current.css(margin,'100%');callback();});};this.prev=function(current,prev,callback){current.animate({marginLeft:'100%'},duration);prev.css(margin,'-100%');prev.animate(animMargin,duration,function(){current.css(margin,'100%');callback();});};};var FadeAnimation=function(settings,container){var duration=settings.animation_speed;var is_rtl=($('html[dir=rtl]').length===1);var margin=is_rtl?'marginRight':'marginLeft';this.next=function(current,next,callback){next.css({'margin':'0%','opacity':'0.01'});next.animate({'opacity':'1'},duration,'linear',function(){current.css('margin','100%');callback();});};this.prev=function(current,prev,callback){prev.css({'margin':'0%','opacity':'0.01'});prev.animate({'opacity':'1'},duration,'linear',function(){current.css('margin','100%');callback();});};};Foundation.libs=Foundation.libs||{};Foundation.libs.orbit={name:'orbit',version:'5.5.2',settings:{animation:'slide',timer_speed:10000,pause_on_hover:true,resume_on_mouseout:false,next_on_click:true,animation_speed:500,stack_on_small:false,navigation_arrows:true,slide_number:true,slide_number_text:'of',container_class:'orbit-container',stack_on_small_class:'orbit-stack-on-small',next_class:'orbit-next',prev_class:'orbit-prev',timer_container_class:'orbit-timer',timer_paused_class:'paused',timer_progress_class:'orbit-progress',slides_container_class:'orbit-slides-container',preloader_class:'preloader',slide_selector:'*',bullets_container_class:'orbit-bullets',bullets_active_class:'active',slide_number_class:'orbit-slide-number',caption_class:'orbit-caption',active_slide_class:'active',orbit_transition_class:'orbit-transitioning',bullets:true,circular:true,timer:true,variable_height:false,swipe:true,before_slide_change:noop,after_slide_change:noop},init:function(scope,method,options){var self=this;this.bindings(method,options);},events:function(instance){var orbit_instance=new Orbit(this.S(instance),this.S(instance).data('orbit-init'));this.S(instance).data(this.name+'-instance',orbit_instance);},reflow:function(){var self=this;if(self.S(self.scope).is('[data-orbit]')){var $el=self.S(self.scope);var instance=$el.data(self.name+'-instance');instance.compute_dimensions();}else{self.S('[data-orbit]',self.scope).each(function(idx,el){var $el=self.S(el);var opts=self.data_options($el);var instance=$el.data(self.name+'-instance');instance.compute_dimensions();});}}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.reveal={name:'reveal',version:'5.5.2',locked:false,settings:{animation:'fadeAndPop',animation_speed:250,close_on_background_click:true,close_on_esc:true,dismiss_modal_class:'close-reveal-modal',multiple_opened:false,bg_class:'reveal-modal-bg',root_element:'body',open:function(){},opened:function(){},close:function(){},closed:function(){},on_ajax_error:$.noop,bg:$('.reveal-modal-bg'),css:{open:{'opacity':0,'visibility':'visible','display':'block'},close:{'opacity':1,'visibility':'hidden','display':'none'}}},init:function(scope,method,options){$.extend(true,this.settings,method,options);this.bindings(method,options);},events:function(scope){var self=this,S=self.S;S(this.scope).off('.reveal').on('click.fndtn.reveal','['+this.add_namespace('data-reveal-id')+']:not([disabled])',function(e){e.preventDefault();if(!self.locked){var element=S(this),ajax=element.data(self.data_attr('reveal-ajax')),replaceContentSel=element.data(self.data_attr('reveal-replace-content'));self.locked=true;if(typeof ajax==='undefined'){self.open.call(self,element);}else{var url=ajax===true?element.attr('href'):ajax;self.open.call(self,element,{url:url},{replaceContentSel:replaceContentSel});}}});S(document).on('click.fndtn.reveal',this.close_targets(),function(e){e.preventDefault();if(!self.locked){var settings=S('['+self.attr_name()+'].open').data(self.attr_name(true)+'-init')||self.settings,bg_clicked=S(e.target)[0]===S('.'+settings.bg_class)[0];if(bg_clicked){if(settings.close_on_background_click){e.stopPropagation();}else{return;}}self.locked=true;self.close.call(self,bg_clicked?S('['+self.attr_name()+'].open:not(.toback)'):S(this).closest('['+self.attr_name()+']'));}});if(S('['+self.attr_name()+']',this.scope).length>0){S(this.scope).on('open.fndtn.reveal',this.settings.open).on('opened.fndtn.reveal',this.settings.opened).on('opened.fndtn.reveal',this.open_video).on('close.fndtn.reveal',this.settings.close).on('closed.fndtn.reveal',this.settings.closed).on('closed.fndtn.reveal',this.close_video);}else{S(this.scope).on('open.fndtn.reveal','['+self.attr_name()+']',this.settings.open).on('opened.fndtn.reveal','['+self.attr_name()+']',this.settings.opened).on('opened.fndtn.reveal','['+self.attr_name()+']',this.open_video).on('close.fndtn.reveal','['+self.attr_name()+']',this.settings.close).on('closed.fndtn.reveal','['+self.attr_name()+']',this.settings.closed).on('closed.fndtn.reveal','['+self.attr_name()+']',this.close_video);}return true;},key_up_on:function(scope){var self=this;self.S('body').off('keyup.fndtn.reveal').on('keyup.fndtn.reveal',function(event){var open_modal=self.S('['+self.attr_name()+'].open'),settings=open_modal.data(self.attr_name(true)+'-init')||self.settings;if(settings&&event.which===27&&settings.close_on_esc&&!self.locked){self.close.call(self,open_modal);}});return true;},key_up_off:function(scope){this.S('body').off('keyup.fndtn.reveal');return true;},open:function(target,ajax_settings){var self=this,modal;if(target){if(typeof target.selector!=='undefined'){modal=self.S('#'+target.data(self.data_attr('reveal-id'))).first();}else{modal=self.S(this.scope);ajax_settings=target;}}else{modal=self.S(this.scope);}var settings=modal.data(self.attr_name(true)+'-init');settings=settings||this.settings;if(modal.hasClass('open')&&target.attr('data-reveal-id')==modal.attr('id')){return self.close(modal);}if(!modal.hasClass('open')){var open_modal=self.S('['+self.attr_name()+'].open');if(typeof modal.data('css-top')==='undefined'){modal.data('css-top',parseInt(modal.css('top'),10)).data('offset',this.cache_offset(modal));}modal.attr('tabindex','0').attr('aria-hidden','false');this.key_up_on(modal);modal.on('open.fndtn.reveal',function(e){if(e.namespace!=='fndtn.reveal')return;});modal.on('open.fndtn.reveal').trigger('open.fndtn.reveal');if(open_modal.length<1){this.toggle_bg(modal,true);}if(typeof ajax_settings==='string'){ajax_settings={url:ajax_settings};}if(typeof ajax_settings==='undefined'||!ajax_settings.url){if(open_modal.length>0){if(settings.multiple_opened){self.to_back(open_modal);}else{self.hide(open_modal,settings.css.close);}}this.show(modal,settings.css.open);}else{var old_success=typeof ajax_settings.success!=='undefined'?ajax_settings.success:null;$.extend(ajax_settings,{success:function(data,textStatus,jqXHR){if($.isFunction(old_success)){var result=old_success(data,textStatus,jqXHR);if(typeof result=='string'){data=result;}}if(typeof options!=='undefined'&&typeof options.replaceContentSel!=='undefined'){modal.find(options.replaceContentSel).html(data);}else{modal.html(data);}self.S(modal).foundation('section','reflow');self.S(modal).children().foundation();if(open_modal.length>0){if(settings.multiple_opened){self.to_back(open_modal);}else{self.hide(open_modal,settings.css.close);}}self.show(modal,settings.css.open);}});if(settings.on_ajax_error!==$.noop){$.extend(ajax_settings,{error:settings.on_ajax_error});}$.ajax(ajax_settings);}}self.S(window).trigger('resize');},close:function(modal){var modal=modal&&modal.length?modal:this.S(this.scope),open_modals=this.S('['+this.attr_name()+'].open'),settings=modal.data(this.attr_name(true)+'-init')||this.settings,self=this;if(open_modals.length>0){modal.removeAttr('tabindex','0').attr('aria-hidden','true');this.locked=true;this.key_up_off(modal);modal.trigger('close.fndtn.reveal');if((settings.multiple_opened&&open_modals.length===1)||!settings.multiple_opened||modal.length>1){self.toggle_bg(modal,false);self.to_front(modal);}if(settings.multiple_opened){self.hide(modal,settings.css.close,settings);self.to_front($($.makeArray(open_modals).reverse()[1]));}else{self.hide(open_modals,settings.css.close,settings);}}},close_targets:function(){var base='.'+this.settings.dismiss_modal_class;if(this.settings.close_on_background_click){return base+', .'+this.settings.bg_class;}return base;},toggle_bg:function(modal,state){if(this.S('.'+this.settings.bg_class).length===0){this.settings.bg=$('<div />',{'class':this.settings.bg_class}).appendTo('body').hide();}var visible=this.settings.bg.filter(':visible').length>0;if(state!=visible){if(state==undefined?visible:!state){this.hide(this.settings.bg);}else{this.show(this.settings.bg);}}},show:function(el,css){if(css){var settings=el.data(this.attr_name(true)+'-init')||this.settings,root_element=settings.root_element,context=this;if(el.parent(root_element).length===0){var placeholder=el.wrap('<div style="display: none;" />').parent();el.on('closed.fndtn.reveal.wrapped',function(){el.detach().appendTo(placeholder);el.unwrap().unbind('closed.fndtn.reveal.wrapped');});el.detach().appendTo(root_element);}var animData=getAnimationData(settings.animation);if(!animData.animate){this.locked=false;}if(animData.pop){css.top=$(window).scrollTop()-el.data('offset')+'px';var end_css={top:$(window).scrollTop()+el.data('css-top')+'px',opacity:1};return setTimeout(function(){return el.css(css).animate(end_css,settings.animation_speed,'linear',function(){context.locked=false;el.trigger('opened.fndtn.reveal');}).addClass('open');},settings.animation_speed/2);}if(animData.fade){css.top=$(window).scrollTop()+el.data('css-top')+'px';var end_css={opacity:1};return setTimeout(function(){return el.css(css).animate(end_css,settings.animation_speed,'linear',function(){context.locked=false;el.trigger('opened.fndtn.reveal');}).addClass('open');},settings.animation_speed/2);}return el.css(css).show().css({opacity:1}).addClass('open').trigger('opened.fndtn.reveal');}var settings=this.settings;if(getAnimationData(settings.animation).fade){return el.fadeIn(settings.animation_speed/2);}this.locked=false;return el.show();},to_back:function(el){el.addClass('toback');},to_front:function(el){el.removeClass('toback');},hide:function(el,css){if(css){var settings=el.data(this.attr_name(true)+'-init'),context=this;settings=settings||this.settings;var animData=getAnimationData(settings.animation);if(!animData.animate){this.locked=false;}if(animData.pop){var end_css={top:-$(window).scrollTop()-el.data('offset')+'px',opacity:0};return setTimeout(function(){return el.animate(end_css,settings.animation_speed,'linear',function(){context.locked=false;el.css(css).trigger('closed.fndtn.reveal');}).removeClass('open');},settings.animation_speed/2);}if(animData.fade){var end_css={opacity:0};return setTimeout(function(){return el.animate(end_css,settings.animation_speed,'linear',function(){context.locked=false;el.css(css).trigger('closed.fndtn.reveal');}).removeClass('open');},settings.animation_speed/2);}return el.hide().css(css).removeClass('open').trigger('closed.fndtn.reveal');}var settings=this.settings;if(getAnimationData(settings.animation).fade){return el.fadeOut(settings.animation_speed/2);}return el.hide();},close_video:function(e){var video=$('.flex-video',e.target),iframe=$('iframe',video);if(iframe.length>0){iframe.attr('data-src',iframe[0].src);iframe.attr('src',iframe.attr('src'));video.hide();}},open_video:function(e){var video=$('.flex-video',e.target),iframe=video.find('iframe');if(iframe.length>0){var data_src=iframe.attr('data-src');if(typeof data_src==='string'){iframe[0].src=iframe.attr('data-src');}else{var src=iframe[0].src;iframe[0].src=undefined;iframe[0].src=src;}video.show();}},data_attr:function(str){if(this.namespace.length>0){return this.namespace+'-'+str;}return str;},cache_offset:function(modal){var offset=modal.show().height()+parseInt(modal.css('top'),10)+modal.scrollY;modal.hide();return offset;},off:function(){$(this.scope).off('.fndtn.reveal');},reflow:function(){}};function getAnimationData(str){var fade=/fade/i.test(str);var pop=/pop/i.test(str);return{animate:fade||pop,pop:pop,fade:fade};}}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.slider={name:'slider',version:'5.5.2',settings:{start:0,end:100,step:1,precision:null,initial:null,display_selector:'',vertical:false,trigger_input_change:false,on_change:function(){}},cache:{},init:function(scope,method,options){Foundation.inherit(this,'throttle');this.bindings(method,options);this.reflow();},events:function(){var self=this;$(this.scope).off('.slider').on('mousedown.fndtn.slider touchstart.fndtn.slider pointerdown.fndtn.slider','['+self.attr_name()+']:not(.disabled, [disabled]) .range-slider-handle',function(e){if(!self.cache.active){e.preventDefault();self.set_active_slider($(e.target));}}).on('mousemove.fndtn.slider touchmove.fndtn.slider pointermove.fndtn.slider',function(e){if(!!self.cache.active){e.preventDefault();if($.data(self.cache.active[0],'settings').vertical){var scroll_offset=0;if(!e.pageY){scroll_offset=window.scrollY;}self.calculate_position(self.cache.active,self.get_cursor_position(e,'y')+scroll_offset);}else{self.calculate_position(self.cache.active,self.get_cursor_position(e,'x'));}}}).on('mouseup.fndtn.slider touchend.fndtn.slider pointerup.fndtn.slider',function(e){self.remove_active_slider();}).on('change.fndtn.slider',function(e){self.settings.on_change();});self.S(window).on('resize.fndtn.slider',self.throttle(function(e){self.reflow();},300));this.S('['+this.attr_name()+']').each(function(){var slider=$(this),handle=slider.children('.range-slider-handle')[0],settings=self.initialize_settings(handle);if(settings.display_selector!=''){$(settings.display_selector).each(function(){if(this.hasOwnProperty('value')){$(this).change(function(){slider.foundation("slider","set_value",$(this).val());});}});}});},get_cursor_position:function(e,xy){var pageXY='page'+xy.toUpperCase(),clientXY='client'+xy.toUpperCase(),position;if(typeof e[pageXY]!=='undefined'){position=e[pageXY];}else if(typeof e.originalEvent[clientXY]!=='undefined'){position=e.originalEvent[clientXY];}else if(e.originalEvent.touches&&e.originalEvent.touches[0]&&typeof e.originalEvent.touches[0][clientXY]!=='undefined'){position=e.originalEvent.touches[0][clientXY];}else if(e.currentPoint&&typeof e.currentPoint[xy]!=='undefined'){position=e.currentPoint[xy];}return position;},set_active_slider:function($handle){this.cache.active=$handle;},remove_active_slider:function(){this.cache.active=null;},calculate_position:function($handle,cursor_x){var self=this,settings=$.data($handle[0],'settings'),handle_l=$.data($handle[0],'handle_l'),handle_o=$.data($handle[0],'handle_o'),bar_l=$.data($handle[0],'bar_l'),bar_o=$.data($handle[0],'bar_o');requestAnimationFrame(function(){var pct;if(Foundation.rtl&&!settings.vertical){pct=self.limit_to(((bar_o+bar_l-cursor_x)/bar_l),0,1);}else{pct=self.limit_to(((cursor_x-bar_o)/bar_l),0,1);}pct=settings.vertical?1-pct:pct;var norm=self.normalized_value(pct,settings.start,settings.end,settings.step,settings.precision);self.set_ui($handle,norm);});},set_ui:function($handle,value){var settings=$.data($handle[0],'settings'),handle_l=$.data($handle[0],'handle_l'),bar_l=$.data($handle[0],'bar_l'),norm_pct=this.normalized_percentage(value,settings.start,settings.end),handle_offset=norm_pct*(bar_l-handle_l)-1,progress_bar_length=norm_pct*100,$handle_parent=$handle.parent(),$hidden_inputs=$handle.parent().children('input[type=hidden]');if(Foundation.rtl&&!settings.vertical){handle_offset=-handle_offset;}handle_offset=settings.vertical?-handle_offset+bar_l-handle_l+1:handle_offset;this.set_translate($handle,handle_offset,settings.vertical);if(settings.vertical){$handle.siblings('.range-slider-active-segment').css('height',progress_bar_length+'%');}else{$handle.siblings('.range-slider-active-segment').css('width',progress_bar_length+'%');}$handle_parent.attr(this.attr_name(),value).trigger('change.fndtn.slider');$hidden_inputs.val(value);if(settings.trigger_input_change){$hidden_inputs.trigger('change.fndtn.slider');}if(!$handle[0].hasAttribute('aria-valuemin')){$handle.attr({'aria-valuemin':settings.start,'aria-valuemax':settings.end});}$handle.attr('aria-valuenow',value);if(settings.display_selector!=''){$(settings.display_selector).each(function(){if(this.hasAttribute('value')){$(this).val(value);}else{$(this).text(value);}});}},normalized_percentage:function(val,start,end){return Math.min(1,(val-start)/(end-start));},normalized_value:function(val,start,end,step,precision){var range=end-start,point=val*range,mod=(point-(point%step))/step,rem=point%step,round=(rem>=step*0.5?step:0);return((mod*step+round)+start).toFixed(precision);},set_translate:function(ele,offset,vertical){if(vertical){$(ele).css('-webkit-transform','translateY('+offset+'px)').css('-moz-transform','translateY('+offset+'px)').css('-ms-transform','translateY('+offset+'px)').css('-o-transform','translateY('+offset+'px)').css('transform','translateY('+offset+'px)');}else{$(ele).css('-webkit-transform','translateX('+offset+'px)').css('-moz-transform','translateX('+offset+'px)').css('-ms-transform','translateX('+offset+'px)').css('-o-transform','translateX('+offset+'px)').css('transform','translateX('+offset+'px)');}},limit_to:function(val,min,max){return Math.min(Math.max(val,min),max);},initialize_settings:function(handle){var settings=$.extend({},this.settings,this.data_options($(handle).parent())),decimal_places_match_result;if(settings.precision===null){decimal_places_match_result=(''+settings.step).match(/\.([\d]*)/);settings.precision=decimal_places_match_result&&decimal_places_match_result[1]?decimal_places_match_result[1].length:0;}if(settings.vertical){$.data(handle,'bar_o',$(handle).parent().offset().top);$.data(handle,'bar_l',$(handle).parent().outerHeight());$.data(handle,'handle_o',$(handle).offset().top);$.data(handle,'handle_l',$(handle).outerHeight());}else{$.data(handle,'bar_o',$(handle).parent().offset().left);$.data(handle,'bar_l',$(handle).parent().outerWidth());$.data(handle,'handle_o',$(handle).offset().left);$.data(handle,'handle_l',$(handle).outerWidth());}$.data(handle,'bar',$(handle).parent());return $.data(handle,'settings',settings);},set_initial_position:function($ele){var settings=$.data($ele.children('.range-slider-handle')[0],'settings'),initial=((typeof settings.initial=='number'&&!isNaN(settings.initial))?settings.initial:Math.floor((settings.end-settings.start)*0.5/settings.step)*settings.step+settings.start),$handle=$ele.children('.range-slider-handle');this.set_ui($handle,initial);},set_value:function(value){var self=this;$('['+self.attr_name()+']',this.scope).each(function(){$(this).attr(self.attr_name(),value);});if(!!$(this.scope).attr(self.attr_name())){$(this.scope).attr(self.attr_name(),value);}self.reflow();},reflow:function(){var self=this;self.S('['+this.attr_name()+']').each(function(){var handle=$(this).children('.range-slider-handle')[0],val=$(this).attr(self.attr_name());self.initialize_settings(handle);if(val){self.set_ui($(handle),parseFloat(val));}else{self.set_initial_position($(this));}});}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.tab={name:'tab',version:'5.5.2',settings:{active_class:'active',callback:function(){},deep_linking:false,scroll_to_content:true,is_hover:false},default_tab_hashes:[],init:function(scope,method,options){var self=this,S=this.S;S('['+this.attr_name()+'] > .active > a',this.scope).each(function(){self.default_tab_hashes.push(this.hash);});self.entry_location=window.location.href;this.bindings(method,options);this.handle_location_hash_change();},events:function(){var self=this,S=this.S;var usual_tab_behavior=function(e,target){var settings=S(target).closest('['+self.attr_name()+']').data(self.attr_name(true)+'-init');if(!settings.is_hover||Modernizr.touch){e.preventDefault();e.stopPropagation();self.toggle_active_tab(S(target).parent());}};S(this.scope).off('.tab').on('keydown.fndtn.tab','['+this.attr_name()+'] > * > a',function(e){var el=this;var keyCode=e.keyCode||e.which;if(keyCode==9){e.preventDefault();usual_tab_behavior(e,el);}}).on('click.fndtn.tab','['+this.attr_name()+'] > * > a',function(e){var el=this;usual_tab_behavior(e,el);}).on('mouseenter.fndtn.tab','['+this.attr_name()+'] > * > a',function(e){var settings=S(this).closest('['+self.attr_name()+']').data(self.attr_name(true)+'-init');if(settings.is_hover){self.toggle_active_tab(S(this).parent());}});S(window).on('hashchange.fndtn.tab',function(e){e.preventDefault();self.handle_location_hash_change();});},handle_location_hash_change:function(){var self=this,S=this.S;S('['+this.attr_name()+']',this.scope).each(function(){var settings=S(this).data(self.attr_name(true)+'-init');if(settings.deep_linking){var hash;if(settings.scroll_to_content){hash=self.scope.location.hash;}else{hash=self.scope.location.hash.replace('fndtn-','');}if(hash!=''){var hash_element=S(hash);if(hash_element.hasClass('content')&&hash_element.parent().hasClass('tabs-content')){self.toggle_active_tab($('['+self.attr_name()+'] > * > a[href='+hash+']').parent());}else{var hash_tab_container_id=hash_element.closest('.content').attr('id');if(hash_tab_container_id!=undefined){self.toggle_active_tab($('['+self.attr_name()+'] > * > a[href=#'+hash_tab_container_id+']').parent(),hash);}}}else{for(var ind=0;ind<self.default_tab_hashes.length;ind++){self.toggle_active_tab($('['+self.attr_name()+'] > * > a[href='+self.default_tab_hashes[ind]+']').parent());}}}});},toggle_active_tab:function(tab,location_hash){var self=this,S=self.S,tabs=tab.closest('['+this.attr_name()+']'),tab_link=tab.find('a'),anchor=tab.children('a').first(),target_hash='#'+anchor.attr('href').split('#')[1],target=S(target_hash),siblings=tab.siblings(),settings=tabs.data(this.attr_name(true)+'-init'),interpret_keyup_action=function(e){var $original=$(this);var $prev=$(this).parents('li').prev().children('[role="tab"]');var $next=$(this).parents('li').next().children('[role="tab"]');var $target;switch(e.keyCode){case 37:$target=$prev;break;case 39:$target=$next;break;default:$target=false
break;}if($target.length){$original.attr({'tabindex':'-1','aria-selected':null});$target.attr({'tabindex':'0','aria-selected':true}).focus();}$('[role="tabpanel"]').attr('aria-hidden','true');$('#'+$(document.activeElement).attr('href').substring(1)).attr('aria-hidden',null);},go_to_hash=function(hash){var is_entry_location=window.location.href===self.entry_location,default_hash=settings.scroll_to_content?self.default_tab_hashes[0]:is_entry_location?window.location.hash:'fndtn-'+self.default_tab_hashes[0].replace('#','')
if(!(is_entry_location&&hash===default_hash)){window.location.hash=hash;}};if(anchor.data('tab-content')){target_hash='#'+anchor.data('tab-content').split('#')[1];target=S(target_hash);}if(settings.deep_linking){if(settings.scroll_to_content){go_to_hash(location_hash||target_hash);if(location_hash==undefined||location_hash==target_hash){tab.parent()[0].scrollIntoView();}else{S(target_hash)[0].scrollIntoView();}}else{if(location_hash!=undefined){go_to_hash('fndtn-'+location_hash.replace('#',''));}else{go_to_hash('fndtn-'+target_hash.replace('#',''));}}}tab.addClass(settings.active_class).triggerHandler('opened');tab_link.attr({'aria-selected':'true',tabindex:0});siblings.removeClass(settings.active_class)
siblings.find('a').attr({'aria-selected':'false',tabindex:-1});target.siblings().removeClass(settings.active_class).attr({'aria-hidden':'true',tabindex:-1});target.addClass(settings.active_class).attr('aria-hidden','false').removeAttr('tabindex');settings.callback(tab);target.triggerHandler('toggled',[target]);tabs.triggerHandler('toggled',[tab]);tab_link.off('keydown').on('keydown',interpret_keyup_action);},data_attr:function(str){if(this.namespace.length>0){return this.namespace+'-'+str;}return str;},off:function(){},reflow:function(){}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.tooltip={name:'tooltip',version:'5.5.2',settings:{additional_inheritable_classes:[],tooltip_class:'.tooltip',append_to:'body',touch_close_text:'Tap To Close',disable_for_touch:false,hover_delay:200,show_on:'all',tip_template:function(selector,content){return'<span data-selector="'+selector+'" id="'+selector+'" class="'+Foundation.libs.tooltip.settings.tooltip_class.substring(1)+'" role="tooltip">'+content+'<span class="nub"></span></span>';}},cache:{},init:function(scope,method,options){Foundation.inherit(this,'random_str');this.bindings(method,options);},should_show:function(target,tip){var settings=$.extend({},this.settings,this.data_options(target));if(settings.show_on==='all'){return true;}else if(this.small()&&settings.show_on==='small'){return true;}else if(this.medium()&&settings.show_on==='medium'){return true;}else if(this.large()&&settings.show_on==='large'){return true;}return false;},medium:function(){return matchMedia(Foundation.media_queries['medium']).matches;},large:function(){return matchMedia(Foundation.media_queries['large']).matches;},events:function(instance){var self=this,S=self.S;self.create(this.S(instance));function _startShow(elt,$this,immediate){if(elt.timer){return;}if(immediate){elt.timer=null;self.showTip($this);}else{elt.timer=setTimeout(function(){elt.timer=null;self.showTip($this);}.bind(elt),self.settings.hover_delay);}}function _startHide(elt,$this){if(elt.timer){clearTimeout(elt.timer);elt.timer=null;}self.hide($this);}$(this.scope).off('.tooltip').on('mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip','['+this.attr_name()+']',function(e){var $this=S(this),settings=$.extend({},self.settings,self.data_options($this)),is_touch=false;if(Modernizr.touch&&/touchstart|MSPointerDown/i.test(e.type)&&S(e.target).is('a')){return false;}if(/mouse/i.test(e.type)&&self.ie_touch(e)){return false;}if($this.hasClass('open')){if(Modernizr.touch&&/touchstart|MSPointerDown/i.test(e.type)){e.preventDefault();}self.hide($this);}else{if(settings.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(e.type)){return;}else if(!settings.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(e.type)){e.preventDefault();S(settings.tooltip_class+'.open').hide();is_touch=true;if($('.open['+self.attr_name()+']').length>0){var prevOpen=S($('.open['+self.attr_name()+']')[0]);self.hide(prevOpen);}}if(/enter|over/i.test(e.type)){_startShow(this,$this);}else if(e.type==='mouseout'||e.type==='mouseleave'){_startHide(this,$this);}else{_startShow(this,$this,true);}}}).on('mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip','['+this.attr_name()+'].open',function(e){if(/mouse/i.test(e.type)&&self.ie_touch(e)){return false;}if($(this).data('tooltip-open-event-type')=='touch'&&e.type=='mouseleave'){return;}else if($(this).data('tooltip-open-event-type')=='mouse'&&/MSPointerDown|touchstart/i.test(e.type)){self.convert_to_touch($(this));}else{_startHide(this,$(this));}}).on('DOMNodeRemoved DOMAttrModified','['+this.attr_name()+']:not(a)',function(e){_startHide(this,S(this));});},ie_touch:function(e){return false;},showTip:function($target){var $tip=this.getTip($target);if(this.should_show($target,$tip)){return this.show($target);}return;},getTip:function($target){var selector=this.selector($target),settings=$.extend({},this.settings,this.data_options($target)),tip=null;if(selector){tip=this.S('span[data-selector="'+selector+'"]'+settings.tooltip_class);}return(typeof tip==='object')?tip:false;},selector:function($target){var dataSelector=$target.attr(this.attr_name())||$target.attr('data-selector');if(typeof dataSelector!='string'){dataSelector=this.random_str(6);$target.attr('data-selector',dataSelector).attr('aria-describedby',dataSelector);}return dataSelector;},create:function($target){var self=this,settings=$.extend({},this.settings,this.data_options($target)),tip_template=this.settings.tip_template;if(typeof settings.tip_template==='string'&&window.hasOwnProperty(settings.tip_template)){tip_template=window[settings.tip_template];}var $tip=$(tip_template(this.selector($target),$('<div></div>').html($target.attr('title')).html())),classes=this.inheritable_classes($target);$tip.addClass(classes).appendTo(settings.append_to);if(Modernizr.touch){$tip.append('<span class="tap-to-close">'+settings.touch_close_text+'</span>');$tip.on('touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip',function(e){self.hide($target);});}$target.removeAttr('title').attr('title','');},reposition:function(target,tip,classes){var width,nub,nubHeight,nubWidth,column,objPos;tip.css('visibility','hidden').show();width=target.data('width');nub=tip.children('.nub');nubHeight=nub.outerHeight();nubWidth=nub.outerHeight();if(this.small()){tip.css({'width':'100%'});}else{tip.css({'width':(width)?width:'auto'});}objPos=function(obj,top,right,bottom,left,width){return obj.css({'top':(top)?top:'auto','bottom':(bottom)?bottom:'auto','left':(left)?left:'auto','right':(right)?right:'auto'}).end();};objPos(tip,(target.offset().top+target.outerHeight()+10),'auto','auto',target.offset().left);if(this.small()){objPos(tip,(target.offset().top+target.outerHeight()+10),'auto','auto',12.5,$(this.scope).width());tip.addClass('tip-override');objPos(nub,-nubHeight,'auto','auto',target.offset().left);}else{var left=target.offset().left;if(Foundation.rtl){nub.addClass('rtl');left=target.offset().left+target.outerWidth()-tip.outerWidth();}objPos(tip,(target.offset().top+target.outerHeight()+10),'auto','auto',left);if(nub.attr('style')){nub.removeAttr('style');}tip.removeClass('tip-override');if(classes&&classes.indexOf('tip-top')>-1){if(Foundation.rtl){nub.addClass('rtl');}objPos(tip,(target.offset().top-tip.outerHeight()),'auto','auto',left).removeClass('tip-override');}else if(classes&&classes.indexOf('tip-left')>-1){objPos(tip,(target.offset().top+(target.outerHeight()/2)-(tip.outerHeight()/2)),'auto','auto',(target.offset().left-tip.outerWidth()-nubHeight)).removeClass('tip-override');nub.removeClass('rtl');}else if(classes&&classes.indexOf('tip-right')>-1){objPos(tip,(target.offset().top+(target.outerHeight()/2)-(tip.outerHeight()/2)),'auto','auto',(target.offset().left+target.outerWidth()+nubHeight)).removeClass('tip-override');nub.removeClass('rtl');}}tip.css('visibility','visible').hide();},small:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches;},inheritable_classes:function($target){var settings=$.extend({},this.settings,this.data_options($target)),inheritables=['tip-top','tip-left','tip-bottom','tip-right','radius','round'].concat(settings.additional_inheritable_classes),classes=$target.attr('class'),filtered=classes?$.map(classes.split(' '),function(el,i){if($.inArray(el,inheritables)!==-1){return el;}}).join(' '):'';return $.trim(filtered);},convert_to_touch:function($target){var self=this,$tip=self.getTip($target),settings=$.extend({},self.settings,self.data_options($target));if($tip.find('.tap-to-close').length===0){$tip.append('<span class="tap-to-close">'+settings.touch_close_text+'</span>');$tip.on('click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose',function(e){self.hide($target);});}$target.data('tooltip-open-event-type','touch');},show:function($target){var $tip=this.getTip($target);if($target.data('tooltip-open-event-type')=='touch'){this.convert_to_touch($target);}this.reposition($target,$tip,$target.attr('class'));$target.addClass('open');$tip.fadeIn(150);},hide:function($target){var $tip=this.getTip($target);$tip.fadeOut(150,function(){$tip.find('.tap-to-close').remove();$tip.off('click.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose');$target.removeClass('open');});},off:function(){var self=this;this.S(this.scope).off('.fndtn.tooltip');this.S(this.settings.tooltip_class).each(function(i){$('['+self.attr_name()+']').eq(i).attr('title',$(this).text());}).remove();},reflow:function(){}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.topbar={name:'topbar',version:'5.5.2',settings:{index:0,start_offset:0,sticky_class:'sticky',custom_back_text:true,back_text:'Back',mobile_show_parent_link:true,is_hover:true,scrolltop:true,sticky_on:'all',dropdown_autoclose:true},init:function(section,method,options){Foundation.inherit(this,'add_custom_rule register_media throttle');var self=this;self.register_media('topbar','foundation-mq-topbar');this.bindings(method,options);self.S('['+this.attr_name()+']',this.scope).each(function(){var topbar=$(this),settings=topbar.data(self.attr_name(true)+'-init'),section=self.S('section, .top-bar-section',this);topbar.data('index',0);var topbarContainer=topbar.parent();if(topbarContainer.hasClass('fixed')||self.is_sticky(topbar,topbarContainer,settings)){self.settings.sticky_class=settings.sticky_class;self.settings.sticky_topbar=topbar;topbar.data('height',topbarContainer.outerHeight());topbar.data('stickyoffset',topbarContainer.offset().top);}else{topbar.data('height',topbar.outerHeight());}if(!settings.assembled){self.assemble(topbar);}if(settings.is_hover){self.S('.has-dropdown',topbar).addClass('not-click');}else{self.S('.has-dropdown',topbar).removeClass('not-click');}self.add_custom_rule('.f-topbar-fixed { padding-top: '+topbar.data('height')+'px }');if(topbarContainer.hasClass('fixed')){self.S('body').addClass('f-topbar-fixed');}});},is_sticky:function(topbar,topbarContainer,settings){var sticky=topbarContainer.hasClass(settings.sticky_class);var smallMatch=matchMedia(Foundation.media_queries.small).matches;var medMatch=matchMedia(Foundation.media_queries.medium).matches;var lrgMatch=matchMedia(Foundation.media_queries.large).matches;if(sticky&&settings.sticky_on==='all'){return true;}if(sticky&&this.small()&&settings.sticky_on.indexOf('small')!==-1){if(smallMatch&&!medMatch&&!lrgMatch){return true;}}if(sticky&&this.medium()&&settings.sticky_on.indexOf('medium')!==-1){if(smallMatch&&medMatch&&!lrgMatch){return true;}}if(sticky&&this.large()&&settings.sticky_on.indexOf('large')!==-1){if(smallMatch&&medMatch&&lrgMatch){return true;}}return false;},toggle:function(toggleEl){var self=this,topbar;if(toggleEl){topbar=self.S(toggleEl).closest('['+this.attr_name()+']');}else{topbar=self.S('['+this.attr_name()+']');}var settings=topbar.data(this.attr_name(true)+'-init');var section=self.S('section, .top-bar-section',topbar);if(self.breakpoint()){if(!self.rtl){section.css({left:'0%'});$('>.name',section).css({left:'100%'});}else{section.css({right:'0%'});$('>.name',section).css({right:'100%'});}self.S('li.moved',section).removeClass('moved');topbar.data('index',0);topbar.toggleClass('expanded').css('height','');}if(settings.scrolltop){if(!topbar.hasClass('expanded')){if(topbar.hasClass('fixed')){topbar.parent().addClass('fixed');topbar.removeClass('fixed');self.S('body').addClass('f-topbar-fixed');}}else if(topbar.parent().hasClass('fixed')){if(settings.scrolltop){topbar.parent().removeClass('fixed');topbar.addClass('fixed');self.S('body').removeClass('f-topbar-fixed');window.scrollTo(0,0);}else{topbar.parent().removeClass('expanded');}}}else{if(self.is_sticky(topbar,topbar.parent(),settings)){topbar.parent().addClass('fixed');}if(topbar.parent().hasClass('fixed')){if(!topbar.hasClass('expanded')){topbar.removeClass('fixed');topbar.parent().removeClass('expanded');self.update_sticky_positioning();}else{topbar.addClass('fixed');topbar.parent().addClass('expanded');self.S('body').addClass('f-topbar-fixed');}}}},timer:null,events:function(bar){var self=this,S=this.S;S(this.scope).off('.topbar').on('click.fndtn.topbar','['+this.attr_name()+'] .toggle-topbar',function(e){e.preventDefault();self.toggle(this);}).on('click.fndtn.topbar contextmenu.fndtn.topbar','.top-bar .top-bar-section li a[href^="#"],['+this.attr_name()+'] .top-bar-section li a[href^="#"]',function(e){var li=$(this).closest('li'),topbar=li.closest('['+self.attr_name()+']'),settings=topbar.data(self.attr_name(true)+'-init');if(settings.dropdown_autoclose&&settings.is_hover){var hoverLi=$(this).closest('.hover');hoverLi.removeClass('hover');}if(self.breakpoint()&&!li.hasClass('back')&&!li.hasClass('has-dropdown')){self.toggle();}}).on('click.fndtn.topbar','['+this.attr_name()+'] li.has-dropdown',function(e){var li=S(this),target=S(e.target),topbar=li.closest('['+self.attr_name()+']'),settings=topbar.data(self.attr_name(true)+'-init');if(target.data('revealId')){self.toggle();return;}if(self.breakpoint()){return;}if(settings.is_hover&&!Modernizr.touch){return;}e.stopImmediatePropagation();if(li.hasClass('hover')){li.removeClass('hover').find('li').removeClass('hover');li.parents('li.hover').removeClass('hover');}else{li.addClass('hover');$(li).siblings().removeClass('hover');if(target[0].nodeName==='A'&&target.parent().hasClass('has-dropdown')){e.preventDefault();}}}).on('click.fndtn.topbar','['+this.attr_name()+'] .has-dropdown>a',function(e){if(self.breakpoint()){e.preventDefault();var $this=S(this),topbar=$this.closest('['+self.attr_name()+']'),section=topbar.find('section, .top-bar-section'),dropdownHeight=$this.next('.dropdown').outerHeight(),$selectedLi=$this.closest('li');topbar.data('index',topbar.data('index')+1);$selectedLi.addClass('moved');if(!self.rtl){section.css({left:-(100*topbar.data('index'))+'%'});section.find('>.name').css({left:100*topbar.data('index')+'%'});}else{section.css({right:-(100*topbar.data('index'))+'%'});section.find('>.name').css({right:100*topbar.data('index')+'%'});}topbar.css('height',$this.siblings('ul').outerHeight(true)+topbar.data('height'));}});S(window).off('.topbar').on('resize.fndtn.topbar',self.throttle(function(){self.resize.call(self);},50)).trigger('resize.fndtn.topbar').load(function(){S(this).trigger('resize.fndtn.topbar');});S('body').off('.topbar').on('click.fndtn.topbar',function(e){var parent=S(e.target).closest('li').closest('li.hover');if(parent.length>0){return;}S('['+self.attr_name()+'] li.hover').removeClass('hover');});S(this.scope).on('click.fndtn.topbar','['+this.attr_name()+'] .has-dropdown .back',function(e){e.preventDefault();var $this=S(this),topbar=$this.closest('['+self.attr_name()+']'),section=topbar.find('section, .top-bar-section'),settings=topbar.data(self.attr_name(true)+'-init'),$movedLi=$this.closest('li.moved'),$previousLevelUl=$movedLi.parent();topbar.data('index',topbar.data('index')-1);if(!self.rtl){section.css({left:-(100*topbar.data('index'))+'%'});section.find('>.name').css({left:100*topbar.data('index')+'%'});}else{section.css({right:-(100*topbar.data('index'))+'%'});section.find('>.name').css({right:100*topbar.data('index')+'%'});}if(topbar.data('index')===0){topbar.css('height','');}else{topbar.css('height',$previousLevelUl.outerHeight(true)+topbar.data('height'));}setTimeout(function(){$movedLi.removeClass('moved');},300);});S(this.scope).find('.dropdown a').focus(function(){$(this).parents('.has-dropdown').addClass('hover');}).blur(function(){$(this).parents('.has-dropdown').removeClass('hover');});},resize:function(){var self=this;self.S('['+this.attr_name()+']').each(function(){var topbar=self.S(this),settings=topbar.data(self.attr_name(true)+'-init');var stickyContainer=topbar.parent('.'+self.settings.sticky_class);var stickyOffset;if(!self.breakpoint()){var doToggle=topbar.hasClass('expanded');topbar.css('height','').removeClass('expanded').find('li').removeClass('hover');if(doToggle){self.toggle(topbar);}}if(self.is_sticky(topbar,stickyContainer,settings)){if(stickyContainer.hasClass('fixed')){stickyContainer.removeClass('fixed');stickyOffset=stickyContainer.offset().top;if(self.S(document.body).hasClass('f-topbar-fixed')){stickyOffset-=topbar.data('height');}topbar.data('stickyoffset',stickyOffset);stickyContainer.addClass('fixed');}else{stickyOffset=stickyContainer.offset().top;topbar.data('stickyoffset',stickyOffset);}}});},breakpoint:function(){return!matchMedia(Foundation.media_queries['topbar']).matches;},small:function(){return matchMedia(Foundation.media_queries['small']).matches;},medium:function(){return matchMedia(Foundation.media_queries['medium']).matches;},large:function(){return matchMedia(Foundation.media_queries['large']).matches;},assemble:function(topbar){var self=this,settings=topbar.data(this.attr_name(true)+'-init'),section=self.S('section, .top-bar-section',topbar);section.detach();self.S('.has-dropdown>a',section).each(function(){var $link=self.S(this),$dropdown=$link.siblings('.dropdown'),url=$link.attr('href'),$titleLi;if(!$dropdown.find('.title.back').length){if(settings.mobile_show_parent_link==true&&url){$titleLi=$('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li class="parent-link hide-for-medium-up"><a class="parent-link js-generated" href="'+url+'">'+$link.html()+'</a></li>');}else{$titleLi=$('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5>');}if(settings.custom_back_text==true){$('h5>a',$titleLi).html(settings.back_text);}else{$('h5>a',$titleLi).html('&laquo; '+$link.html());}$dropdown.prepend($titleLi);}});section.appendTo(topbar);this.sticky();this.assembled(topbar);},assembled:function(topbar){topbar.data(this.attr_name(true),$.extend({},topbar.data(this.attr_name(true)),{assembled:true}));},height:function(ul){var total=0,self=this;$('> li',ul).each(function(){total+=self.S(this).outerHeight(true);});return total;},sticky:function(){var self=this;this.S(window).on('scroll',function(){self.update_sticky_positioning();});},update_sticky_positioning:function(){var klass='.'+this.settings.sticky_class,$window=this.S(window),self=this;if(self.settings.sticky_topbar&&self.is_sticky(this.settings.sticky_topbar,this.settings.sticky_topbar.parent(),this.settings)){var distance=this.settings.sticky_topbar.data('stickyoffset')+this.settings.start_offset;if(!self.S(klass).hasClass('expanded')){if($window.scrollTop()>(distance)){if(!self.S(klass).hasClass('fixed')){self.S(klass).addClass('fixed');self.S('body').addClass('f-topbar-fixed');}}else if($window.scrollTop()<=distance){if(self.S(klass).hasClass('fixed')){self.S(klass).removeClass('fixed');self.S('body').removeClass('f-topbar-fixed');}}}}},off:function(){this.S(this.scope).off('.fndtn.topbar');this.S(window).off('.fndtn.topbar');},reflow:function(){}};}(jQuery,window,window.document));
/*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){var r=t.console;i[n]||(i[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(t,a,i,o){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(o),i},set:function(e){r(o),i=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=i}var i={};e.migrateWarnings=[],!e.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){i={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var o=e("<input/>",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",o||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,i,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(o?a in o:e.isFunction(e.fn[a])))?e(t)[a](i):("type"===a&&i!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,i=e.prop(t,r);return i===!0||"boolean"!=typeof i&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,i))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;e.fn.init=function(t,n,a){var i;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(i=y.exec(e.trim(t)))&&i[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),i[3]&&r("$(html) HTML text after last tag is ignored"),"#"===i[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(i[2],n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,i,o=this[0];return!o||"events"!==t||1!==arguments.length||(a=e.data(o,t),i=e._data(o,t),a!==n&&a!==i||i===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),i)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,i,o){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),i)for(c=function(e){return!e.type||j.test(e.type)?o?o.push(e.parentNode?e.parentNode.removeChild(e):e):i.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(i.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,T=e.fn.live,M=e.fn.die,S="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",C=RegExp("\\b(?:"+S+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,i){e!==document&&C.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,i)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,i=t.guid||e.guid++,o=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%o;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=i;a.length>o;)a[o++].guid=i;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),T?T.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),M?M.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||C.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(S.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window);
/*! jQuery UI - v1.11.4 - 2015-03-11
* http://jqueryui.com
* Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js, menu.js, progressbar.js, resizable.js, selectable.js, selectmenu.js, slider.js, sortable.js, spinner.js, tabs.js, tooltip.js
* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function t(t,s){var n,a,o,r=t.nodeName.toLowerCase();return"area"===r?(n=t.parentNode,a=n.name,t.href&&a&&"map"===n.nodeName.toLowerCase()?(o=e("img[usemap='#"+a+"']")[0],!!o&&i(o)):!1):(/^(input|select|textarea|button|object)$/.test(r)?!t.disabled:"a"===r?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function s(e){for(var t,i;e.length&&e[0]!==document;){if(t=e.css("position"),("absolute"===t||"relative"===t||"fixed"===t)&&(i=parseInt(e.css("zIndex"),10),!isNaN(i)&&0!==i))return i;e=e.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=a(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function a(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",o)}function o(){e.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent()[0]:v.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function r(t,i){e.extend(t,i);for(var s in i)null==i[s]&&(t[s]=i[s]);return t}function h(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),s="absolute"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return s&&"static"===t.css("position")?!1:n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&a.length?a:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?o["inner"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof t?o["outer"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,s,n=e(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var n,a=e.ui[t].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&&a[n][1].apply(e.element,i)}};var l=0,u=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,n,a;for(a=0;null!=(n=i[a]);a++)try{s=e._data(n,"events"),s&&s.remove&&e(n).triggerHandler("remove")}catch(o){}t(i)}}(e.cleanData),e.widget=function(t,i,s){var n,a,o,r,h={},l=t.split(".")[0];return t=t.split(".")[1],n=l+"-"+t,s||(s=i,i=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[l]=e[l]||{},a=e[l][t],o=e[l][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new o(e,t)},e.extend(o,a,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(s,function(t,s){return e.isFunction(s)?(h[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},n=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,a=this._superApply;return this._super=e,this._superApply=n,t=s.apply(this,arguments),this._super=i,this._superApply=a,t}}(),void 0):(h[t]=s,void 0)}),o.prototype=e.widget.extend(r,{widgetEventPrefix:a?r.widgetEventPrefix||t:t},h,{constructor:o,namespace:l,widgetName:t,widgetFullName:n}),a?(e.each(a._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete a._childConstructors):i._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,s,n=u.call(arguments,1),a=0,o=n.length;o>a;a++)for(i in n[a])s=n[a][i],n[a].hasOwnProperty(i)&&void 0!==s&&(t[i]=e.isPlainObject(s)?e.isPlainObject(t[i])?e.widget.extend({},t[i],s):e.widget.extend({},s):s);return t},e.widget.bridge=function(t,i){var s=i.prototype.widgetFullName||t;e.fn[t]=function(n){var a="string"==typeof n,o=u.call(arguments,1),r=this;return a?this.each(function(){var i,a=e.data(this,s);return"instance"===n?(r=a,!1):a?e.isFunction(a[n])&&"_"!==n.charAt(0)?(i=a[n].apply(a,o),i!==a&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+n+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; "+"attempted to call method '"+n+"'")}):(o.length&&(n=e.widget.extend.apply(null,[n].concat(o))),this.each(function(){var t=e.data(this,s);t?(t.option(n||{}),t._init&&t._init()):e.data(this,s,new i(n,this))})),r}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=l++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s,n,a,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},s=t.split("."),t=s.shift(),s.length){for(n=o[t]=e.widget.extend({},this.options[t]),a=0;s.length-1>a;a++)n[s[a]]=n[s[a]]||{},n=n[s[a]];if(t=s.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=i}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,s){var n,a=this;"boolean"!=typeof t&&(s=i,i=t,t=!1),s?(i=n=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),e.each(s,function(s,o){function r(){return t||a.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?a[o]:o).apply(a,arguments):void 0}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||e.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+a.eventNamespace,u=h[2];u?n.delegate(u,l,r):i.bind(l,r)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(i).undelegate(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,o=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var o,r=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),o=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&e.effects&&e.effects.effect[r]?s[t](n):r!==t&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}}),e.widget;var d=!1;e(document).mouseup(function(){d=!1}),e.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!d){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,s=1===t.which,n="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),d=!0,!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button)return this._mouseUp(t);if(!t.which)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),d=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),function(){function t(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function i(t,i){return parseInt(e.css(t,i),10)||0}function s(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var n,a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,u=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,i,s=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=s.children()[0];return e("body").append(s),t=a.offsetWidth,s.css("overflow","scroll"),i=a.offsetWidth,t===i&&(i=s[0].clientWidth),s.remove(),n=t-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),s=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,a="scroll"===s||"auto"===s&&t.height<t.element[0].scrollHeight;return{width:a?e.position.scrollbarWidth():0,height:n?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),s=e.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s||n?i.width():i.outerWidth(),height:s||n?i.height():i.outerHeight()}}},e.fn.position=function(n){if(!n||!n.of)return f.apply(this,arguments);n=e.extend({},n);var p,m,g,v,y,b,_=e(n.of),x=e.position.getWithinInfo(n.within),w=e.position.getScrollInfo(x),k=(n.collision||"flip").split(" "),T={};return b=s(_),_[0].preventDefault&&(n.at="left top"),m=b.width,g=b.height,v=b.offset,y=e.extend({},v),e.each(["my","at"],function(){var e,t,i=(n[this]||"").split(" ");1===i.length&&(i=l.test(i[0])?i.concat(["center"]):u.test(i[0])?["center"].concat(i):["center","center"]),i[0]=l.test(i[0])?i[0]:"center",i[1]=u.test(i[1])?i[1]:"center",e=d.exec(i[0]),t=d.exec(i[1]),T[this]=[e?e[0]:0,t?t[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===n.at[0]?y.left+=m:"center"===n.at[0]&&(y.left+=m/2),"bottom"===n.at[1]?y.top+=g:"center"===n.at[1]&&(y.top+=g/2),p=t(T.at,m,g),y.left+=p[0],y.top+=p[1],this.each(function(){var s,l,u=e(this),d=u.outerWidth(),c=u.outerHeight(),f=i(this,"marginLeft"),b=i(this,"marginTop"),D=d+f+i(this,"marginRight")+w.width,S=c+b+i(this,"marginBottom")+w.height,M=e.extend({},y),C=t(T.my,u.outerWidth(),u.outerHeight());"right"===n.my[0]?M.left-=d:"center"===n.my[0]&&(M.left-=d/2),"bottom"===n.my[1]?M.top-=c:"center"===n.my[1]&&(M.top-=c/2),M.left+=C[0],M.top+=C[1],a||(M.left=h(M.left),M.top=h(M.top)),s={marginLeft:f,marginTop:b},e.each(["left","top"],function(t,i){e.ui.position[k[t]]&&e.ui.position[k[t]][i](M,{targetWidth:m,targetHeight:g,elemWidth:d,elemHeight:c,collisionPosition:s,collisionWidth:D,collisionHeight:S,offset:[p[0]+C[0],p[1]+C[1]],my:n.my,at:n.at,within:x,elem:u})}),n.using&&(l=function(e){var t=v.left-M.left,i=t+m-d,s=v.top-M.top,a=s+g-c,h={target:{element:_,left:v.left,top:v.top,width:m,height:g},element:{element:u,left:M.left,top:M.top,width:d,height:c},horizontal:0>i?"left":t>0?"right":"center",vertical:0>a?"top":s>0?"bottom":"middle"};d>m&&m>r(t+i)&&(h.horizontal="center"),c>g&&g>r(s+a)&&(h.vertical="middle"),h.important=o(r(t),r(i))>o(r(s),r(a))?"horizontal":"vertical",n.using.call(this,e,h)}),u.offset(e.extend(M,{using:l}))})},e.ui.position={fit:{left:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=e.left-t.collisionPosition.marginLeft,h=n-r,l=r+t.collisionWidth-a-n;t.collisionWidth>a?h>0&&0>=l?(i=e.left+h+t.collisionWidth-a-n,e.left+=h-i):e.left=l>0&&0>=h?n:h>l?n+a-t.collisionWidth:n:h>0?e.left+=h:l>0?e.left-=l:e.left=o(e.left-r,e.left)},top:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollTop:s.offset.top,a=t.within.height,r=e.top-t.collisionPosition.marginTop,h=n-r,l=r+t.collisionHeight-a-n;t.collisionHeight>a?h>0&&0>=l?(i=e.top+h+t.collisionHeight-a-n,e.top+=h-i):e.top=l>0&&0>=h?n:h>l?n+a-t.collisionHeight:n:h>0?e.top+=h:l>0?e.top-=l:e.top=o(e.top-r,e.top)}},flip:{left:function(e,t){var i,s,n=t.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=e.left-t.collisionPosition.marginLeft,u=l-h,d=l+t.collisionWidth-o-h,c="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>u?(i=e.left+c+p+f+t.collisionWidth-o-a,(0>i||r(u)>i)&&(e.left+=c+p+f)):d>0&&(s=e.left-t.collisionPosition.marginLeft+c+p+f-h,(s>0||d>r(s))&&(e.left+=c+p+f))},top:function(e,t){var i,s,n=t.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=e.top-t.collisionPosition.marginTop,u=l-h,d=l+t.collisionHeight-o-h,c="top"===t.my[1],p=c?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(s=e.top+p+f+m+t.collisionHeight-o-a,(0>s||r(u)>s)&&(e.top+=p+f+m)):d>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-h,(i>0||d>r(i))&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,s,n,o,r=document.getElementsByTagName("body")[0],h=document.createElement("div");t=document.createElement(r?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&e.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)t.style[o]=s[o];t.appendChild(h),i=r||document.documentElement,i.insertBefore(t,i.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",n=e(h).offset().left,a=n>10&&11>n,t.innerHTML="",i.removeChild(t)}()}(),e.ui.position,e.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)),void 0)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,s=this.headers.length,n=this.headers.index(t.target),a=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(e(t.target).attr("tabIndex",-1),e(a).attr("tabIndex",0),a.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var t,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var t=e(this),i=t.uniqueId().attr("id"),s=t.next(),n=s.uniqueId().attr("id");t.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(t=n.height(),this.element.siblings(":visible").each(function(){var i=e(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(t-=i.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?e():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:o?e():n,newPanel:r};t.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",t,l)===!1||(i.active=o?!1:this.headers.index(n),this.active=a?e():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,s=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,t):(s.hide(),i.show(),this._toggleComplete(t)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(e(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,i){var s,n,a,o=this,r=0,h=e.css("box-sizing"),l=e.length&&(!t.length||e.index()<t.index()),u=this.options.animate||{},d=l&&u.down||u,c=function(){o._toggleComplete(i)};return"number"==typeof d&&(a=d),"string"==typeof d&&(n=d),n=n||d.easing||u.easing,a=a||d.duration||u.duration,t.length?e.length?(s=e.show().outerHeight(),t.animate(this.hideProps,{duration:a,easing:n,step:function(e,t){t.now=Math.round(e)}}),e.hide().animate(this.showProps,{duration:a,easing:n,complete:c,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?"content-box"===h&&(r+=i.now):"content"!==o.options.heightStyle&&(i.now=Math.round(s-t.outerHeight()-r),r=0)}}),void 0):t.animate(this.hideProps,a,n,c):e.animate(this.showProps,a,n,c)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),e.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var i=e(t.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var i=e(t.currentTarget);
i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){var i,s,n,a,o=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:o=!1,s=this.previousFilter||"",n=String.fromCharCode(t.keyCode),a=!1,clearTimeout(this.filterTimer),n===s?a=!0:n=s+n,i=this._filterMenuItems(n),i=a&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(t.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(t,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}o&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var t,i,s=this,n=this.options.icons.submenu,a=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),a.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),i=t.parent(),s=e("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(s),t.attr("aria-labelledby",i.attr("id"))}),t=a.add(this.element),i=t.find(this.options.items),i.not(".ui-menu-item").each(function(){var t=e(this);s._isDivider(t)&&t.addClass("ui-widget-content ui-menu-divider")}),i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var i,s;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),s=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=t.outerHeight(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(t),this.activeMenu=s},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;this.active&&(s="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[t]()),this.focus(i,s)},nextPage:function(t){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),0>i.offset().top-s-n}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(t),void 0)},previousPage:function(t){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-s+n>0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items).first())),void 0):(this.next(t),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)},_filterMenuItems:function(t){var i=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(e.trim(e(this).text()))})}}),e.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,void 0;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),void 0):(this._searchTimeout(e),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(e),this._change(e),void 0)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:n})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&e.trim(s).length&&(this.liveRegion.children().hide(),e("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),i=this.menu.element.is(":visible"),s=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;(!t||t&&!i&&!s)&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var s=this;e.each(i,function(e,i){s._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").text(i.label).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[e](t),void 0):(this.search(null,t),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),e("<div>").text(i).appendTo(this.liveRegion))}}),e.ui.autocomplete;var c,p="ui-button ui-widget ui-state-default ui-corner-all",f="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",m=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},g=function(t){var i=t.name,s=t.form,n=e([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?e(s).find("[name='"+i+"'][type=radio]"):e("[name='"+i+"'][type=radio]",t.ownerDocument).filter(function(){return!this.form})),n};e.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,m),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var t=this,i=this.options,s="checkbox"===this.type||"radio"===this.type,n=s?"":"ui-state-active";null===i.label&&(i.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(p).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){i.disabled||this===c&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){i.disabled||e(this).removeClass(n)}).bind("click"+this.eventNamespace,function(e){i.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),s&&this.element.bind("change"+this.eventNamespace,function(){t.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return i.disabled?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(i.disabled)return!1;e(this).addClass("ui-state-active"),t.buttonElement.attr("aria-pressed","true");var s=t.element[0];g(s).not(s).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return i.disabled?!1:(e(this).addClass("ui-state-active"),c=this,t.document.one("mouseup",function(){c=null}),void 0)}).bind("mouseup"+this.eventNamespace,function(){return i.disabled?!1:(e(this).removeClass("ui-state-active"),void 0)}).bind("keydown"+this.eventNamespace,function(t){return i.disabled?!1:((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"),void 0)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",i.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(p+" ui-state-active "+f).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),t&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")),void 0):(this._resetButton(),void 0)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?g(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),void 0;var t=this.buttonElement.removeClass(f),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,a=[];s.primary||s.secondary?(this.options.text&&a.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(a.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(i)))):a.push("ui-button-text-only"),t.addClass(a.join(" "))}}),e.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction"),i=this.element.find(this.options.items),s=i.filter(":ui-button");i.not(":ui-button").button(),s.button("refresh"),this.buttons=i.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),e.ui.button,e.extend(e.ui,{datepicker:{version:"1.11.4"}});var v;e.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return r(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var s,n,a;s=t.nodeName.toLowerCase(),n="div"===s||"span"===s,t.id||(this.uuid+=1,t.id="dp"+this.uuid),a=this._newInst(e(t),n),a.settings=e.extend({},i||{}),"input"===s?this._connectDatepicker(t,a):n&&this._inlineDatepicker(t,a)},_newInst:function(t,i){var s=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?a(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var s=e(t);i.append=e([]),i.trigger=e([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,"datepicker",i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var s,n,a,o=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),o&&(i.append=e("<span class='"+this._appendClass+"'>"+o+"</span>"),t[r?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&t.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),a=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:a,alt:n,title:n}):e("<button type='button'></button>").addClass(this._triggerClass).html(a?e("<img/>").attr({src:a,alt:n,title:n}):n)),t[r?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,s,n,a=new Date(2009,11,20),o=this._get(e,"dateFormat");o.match(/[DM]/)&&(t=function(e){for(i=0,s=0,n=0;e.length>n;n++)e[n].length>i&&(i=e[n].length,s=n);return s},a.setMonth(t(this._get(e,o.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(t(this._get(e,o.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),e.input.attr("size",this._formatDate(e,a).length)}},_inlineDatepicker:function(t,i){var s=e(t);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),e.data(t,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,s,n,a){var o,h,l,u,d,c=this._dialogInst;return c||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),c=this._dialogInst=this._newInst(this._dialogInput,!1),c.settings={},e.data(this._dialogInput[0],"datepicker",c)),r(c.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(c,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+u,l/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),c.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",c),this},_destroyDatepicker:function(t){var i,s=e(t),n=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),v===n&&(v=null))},_enableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,i,s){var n,a,o,h,l=this._getInst(t);return 2===arguments.length&&"string"==typeof i?"defaults"===i?e.extend({},e.datepicker._defaults):l?"all"===i?e.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),a=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),r(l.settings,n),null!==o&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,o)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),l),this._autoSize(l),this._setDate(l,a),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,s,n,a=e.datepicker._getInst(t.target),o=!0,r=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),o=!1;break;case 13:return n=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",a.dpDiv),n[0]&&e.datepicker._selectDay(t.target,a.selectedMonth,a.selectedYear,n[0]),i=e.datepicker._get(a,"onSelect"),i?(s=e.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,a])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),o=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),o=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?1:-1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),o=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?-1:1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),o=t.ctrlKey||t.metaKey;break;default:o=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):o=!1;o&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,s,n=e.datepicker._getInst(t.target);
return e.datepicker._get(n,"constrainInput")?(i=e.datepicker._possibleChars(e.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(t){var i,s=e.datepicker._getInst(t.target);if(s.input.val()!==s.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,e.datepicker._getFormatConfig(s)),i&&(e.datepicker._setDateFromField(s),e.datepicker._updateAlternate(s),e.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,n,a,o,h,l,u;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),n=e.datepicker._get(i,"beforeShow"),a=n?n.apply(t,[t,i]):{},a!==!1&&(r(i.settings,a),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),o=!1,e(t).parents().each(function(){return o|="fixed"===e(this).css("position"),!o}),h={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),h=e.datepicker._checkOffset(i,h,o),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":o?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),i.inline||(l=e.datepicker._get(i,"showAnim"),u=e.datepicker._get(i,"duration"),i.dpDiv.css("z-index",s(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?i.dpDiv.show(l,e.datepicker._get(i,"showOptions"),u):i.dpDiv[l||"show"](l?u:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,v=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var i,s=this._getNumberOfMonths(t),n=s[1],a=17,r=t.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&t.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),t.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,s){var n=t.dpDiv.outerWidth(),a=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,r=t.input?t.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:e(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?n-o:0,i.left-=s&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=s&&i.top===t.input.offset().top+r?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+a>l&&l>a?Math.abs(a+r):0),i},_findPos:function(t){for(var i,s=this._getInst(t),n=this._get(s,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[n?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,s,n,a,o=this._curInst;!o||t&&o!==e.data(t,"datepicker")||this._datepickerShowing&&(i=this._get(o,"showAnim"),s=this._get(o,"duration"),n=function(){e.datepicker._tidyDialog(o)},e.effects&&(e.effects.effect[i]||e.effects[i])?o.dpDiv.hide(i,e.datepicker._get(o,"showOptions"),s,n):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,a=this._get(o,"onClose"),a&&a.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),s=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==s)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,s){var n=e(t),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+("M"===s?this._get(a,"showCurrentAtPos"):0),s),this._updateDatepicker(a))},_gotoToday:function(t){var i,s=e(t),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(t,i,s){var n=e(t),a=this._getInst(n[0]);a["selected"+("M"===s?"Month":"Year")]=a["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(t,i,s,n){var a,o=e(t);e(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(o[0])||(a=this._getInst(o[0]),a.selectedDay=a.currentDay=e("a",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,this._selectDate(t,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var s,n=e(t),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),s=this._get(a,"onSelect"),s?s.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,s,n,a=this._get(t,"altField");a&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),s=this._getDate(t),n=this.formatDate(i,s,this._getFormatConfig(t)),e(a).each(function(){e(this).val(n)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,s){if(null==t||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,a,o,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),d=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,c=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,y=-1,b=!1,_=function(e){var i=t.length>n+1&&t.charAt(n+1)===e;return i&&n++,i},x=function(e){var t=_(e),s="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,n="y"===e?s:1,a=RegExp("^\\d{"+n+","+s+"}"),o=i.substring(h).match(a);if(!o)throw"Missing number at position "+h;return h+=o[0].length,parseInt(o[0],10)},w=function(t,s,n){var a=-1,o=e.map(_(t)?n:s,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(o,function(e,t){var s=t[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(a=t[0],h+=s.length,!1):void 0}),-1!==a)return a+1;throw"Unknown name at position "+h},k=function(){if(i.charAt(h)!==t.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;t.length>n;n++)if(b)"'"!==t.charAt(n)||_("'")?k():b=!1;else switch(t.charAt(n)){case"d":v=x("d");break;case"D":w("D",d,c);break;case"o":y=x("o");break;case"m":g=x("m");break;case"M":g=w("M",p,f);break;case"y":m=x("y");break;case"@":r=new Date(x("@")),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"!":r=new Date((x("!")-this._ticksTo1970)/1e4),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"'":_("'")?k():b=!0;break;default:k()}if(i.length>h&&(o=i.substr(h),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),y>-1)for(g=1,v=y;;){if(a=this._getDaysInMonth(m,g-1),a>=v)break;g++,v-=a}if(r=this._daylightSavingAdjust(new Date(m,g-1,v)),r.getFullYear()!==m||r.getMonth()+1!==g||r.getDate()!==v)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,o=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(t){var i=e.length>s+1&&e.charAt(s+1)===t;return i&&s++,i},l=function(e,t,i){var s=""+t;if(h(e))for(;i>s.length;)s="0"+s;return s},u=function(e,t,i,s){return h(e)?s[t]:i[t]},d="",c=!1;if(t)for(s=0;e.length>s;s++)if(c)"'"!==e.charAt(s)||h("'")?d+=e.charAt(s):c=!1;else switch(e.charAt(s)){case"d":d+=l("d",t.getDate(),2);break;case"D":d+=u("D",t.getDay(),n,a);break;case"o":d+=l("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":d+=l("m",t.getMonth()+1,2);break;case"M":d+=u("M",t.getMonth(),o,r);break;case"y":d+=h("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":d+=t.getTime();break;case"!":d+=1e4*t.getTime()+this._ticksTo1970;break;case"'":h("'")?d+="'":c=!0;break;default:d+=e.charAt(s)}return d},_possibleChars:function(e){var t,i="",s=!1,n=function(i){var s=e.length>t+1&&e.charAt(t+1)===i;return s&&t++,s};for(t=0;e.length>t;t++)if(s)"'"!==e.charAt(t)||n("'")?i+=e.charAt(t):s=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),s=e.lastVal=e.input?e.input.val():null,n=this._getDefaultDate(e),a=n,o=this._getFormatConfig(e);try{a=this.parseDate(i,s,o)||n}catch(r){s=t?"":s}e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),e.currentDay=s?a.getDate():0,e.currentMonth=s?a.getMonth():0,e.currentYear=s?a.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,s){var n=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},a=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,a=n.getFullYear(),o=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":o+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o));break;case"y":case"Y":a+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o))}l=h.exec(i)}return new Date(a,o,r)},o=null==i||""===i?s:"string"==typeof i?a(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return o=o&&"Invalid Date"==""+o?s:o,o&&(o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)),this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var s=!t,n=e.selectedMonth,a=e.selectedYear,o=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=o.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=o.getMonth(),e.drawYear=e.selectedYear=e.currentYear=o.getFullYear(),n===e.selectedMonth&&a===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(s?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),s="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(s,-i,"M")},next:function(){e.datepicker._adjustDate(s,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(s)},selectDay:function(){return e.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(s,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,s,n,a,o,r,h,l,u,d,c,p,f,m,g,v,y,b,_,x,w,k,T,D,S,M,C,N,A,P,I,H,z,F,E,O,j,W,L=new Date,R=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),Y=this._get(e,"isRTL"),B=this._get(e,"showButtonPanel"),J=this._get(e,"hideIfNoPrevNext"),q=this._get(e,"navigationAsDateFormat"),K=this._getNumberOfMonths(e),V=this._get(e,"showCurrentAtPos"),U=this._get(e,"stepMonths"),Q=1!==K[0]||1!==K[1],G=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),X=this._getMinMaxDate(e,"min"),$=this._getMinMaxDate(e,"max"),Z=e.drawMonth-V,et=e.drawYear;if(0>Z&&(Z+=12,et--),$)for(t=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-K[0]*K[1]+1,$.getDate())),t=X&&X>t?X:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=q?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-U,1)),this._getFormatConfig(e)):i,s=this._canAdjustMonth(e,-1,et,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":J?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(e,"nextText"),n=q?this.formatDate(n,this._daylightSavingAdjust(new Date(et,Z+U,1)),this._getFormatConfig(e)):n,a=this._canAdjustMonth(e,1,et,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":J?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",o=this._get(e,"currentText"),r=this._get(e,"gotoCurrent")&&e.currentDay?G:R,o=q?this.formatDate(o,r,this._getFormatConfig(e)):o,h=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(e,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+o+"</button>":"")+(Y?"":h)+"</div>":"",u=parseInt(this._get(e,"firstDay"),10),u=isNaN(u)?0:u,d=this._get(e,"showWeek"),c=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),g=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),y=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),_="",w=0;K[0]>w;w++){for(k="",this.maxRows=4,T=0;K[1]>T;T++){if(D=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),S=" ui-corner-all",M="",Q){if(M+="<div class='ui-datepicker-group",K[1]>1)switch(T){case 0:M+=" ui-datepicker-group-first",S=" ui-corner-"+(Y?"right":"left");break;case K[1]-1:M+=" ui-datepicker-group-last",S=" ui-corner-"+(Y?"left":"right");break;default:M+=" ui-datepicker-group-middle",S=""}M+="'>"}for(M+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+S+"'>"+(/all|left/.test(S)&&0===w?Y?a:s:"")+(/all|right/.test(S)&&0===w?Y?s:a:"")+this._generateMonthYearHeader(e,Z,et,X,$,w>0||T>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",C=d?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",x=0;7>x;x++)N=(x+u)%7,C+="<th scope='col'"+((x+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+c[N]+"'>"+p[N]+"</span></th>";for(M+=C+"</tr></thead><tbody>",A=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),P=(this._getFirstDayOfMonth(et,Z)-u+7)%7,I=Math.ceil((P+A)/7),H=Q?this.maxRows>I?this.maxRows:I:I,this.maxRows=H,z=this._daylightSavingAdjust(new Date(et,Z,1-P)),F=0;H>F;F++){for(M+="<tr>",E=d?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(z)+"</td>":"",x=0;7>x;x++)O=g?g.apply(e.input?e.input[0]:null,[z]):[!0,""],j=z.getMonth()!==Z,W=j&&!y||!O[0]||X&&X>z||$&&z>$,E+="<td class='"+((x+u+6)%7>=5?" ui-datepicker-week-end":"")+(j?" ui-datepicker-other-month":"")+(z.getTime()===D.getTime()&&Z===e.selectedMonth&&e._keyEvent||b.getTime()===z.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(W?" "+this._unselectableClass+" ui-state-disabled":"")+(j&&!v?"":" "+O[1]+(z.getTime()===G.getTime()?" "+this._currentClass:"")+(z.getTime()===R.getTime()?" ui-datepicker-today":""))+"'"+(j&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"&#39;")+"'")+(W?"":" data-handler='selectDay' data-event='click' data-month='"+z.getMonth()+"' data-year='"+z.getFullYear()+"'")+">"+(j&&!v?"&#xa0;":W?"<span class='ui-state-default'>"+z.getDate()+"</span>":"<a class='ui-state-default"+(z.getTime()===R.getTime()?" ui-state-highlight":"")+(z.getTime()===G.getTime()?" ui-state-active":"")+(j?" ui-priority-secondary":"")+"' href='#'>"+z.getDate()+"</a>")+"</td>",z.setDate(z.getDate()+1),z=this._daylightSavingAdjust(z);M+=E+"</tr>"}Z++,Z>11&&(Z=0,et++),M+="</tbody></table>"+(Q?"</div>"+(K[0]>0&&T===K[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),k+=M}_+=k}return _+=l,e._keyEvent=!1,_},_generateMonthYearHeader:function(e,t,i,s,n,a,o,r){var h,l,u,d,c,p,f,m,g=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",_="";if(a||!g)_+="<span class='ui-datepicker-month'>"+o[t]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,_+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;12>u;u++)(!h||u>=s.getMonth())&&(!l||n.getMonth()>=u)&&(_+="<option value='"+u+"'"+(u===t?" selected='selected'":"")+">"+r[u]+"</option>");_+="</select>"}if(y||(b+=_+(!a&&g&&v?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",a||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(d=this._get(e,"yearRange").split(":"),c=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?c+parseInt(e,10):parseInt(e,10);return isNaN(t)?c:t},f=p(d[0]),m=Math.max(f,p(d[1]||"")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=f;f++)e.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";e.yearshtml+="</select>",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),y&&(b+=(!a&&g&&v?"":"&#xa0;")+_),b+="</div>"},_adjustInstDate:function(e,t,i){var s=e.drawYear+("Y"===i?t:0),n=e.drawMonth+("M"===i?t:0),a=Math.min(e.selectedDay,this._getDaysInMonth(s,n))+("D"===i?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(s,n,a)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),n=i&&i>t?i:t;return s&&n>s?s:n},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,s){var n=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(i,s+(0>t?t:n[0]*n[1]),1));return 0>t&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var i,s,n=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),o=null,r=null,h=this._get(e,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),o=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(o+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||t.getTime()>=n.getTime())&&(!a||t.getTime()<=a.getTime())&&(!o||t.getFullYear()>=o)&&(!r||r>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,s){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var n=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(s,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),n,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new n,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.11.4",e.datepicker,e.widget("ui.draggable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(t){var i=this.options;return this._blurActiveElement(t),this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var i=this.document[0];if(this.handleElement.is(t.target))try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&e(i.activeElement).blur()}catch(s){}},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===e(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._normalizeRightBottom(),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.focus(),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper),n=s?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options,a=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,e(a).width()-this.helperProportions.width-this.margins.left,(e(a).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=e(n.containment),s=i[0],s&&(t=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)
},_convertPositionTo:function(e,t){t||(t=this.position);var i="absolute"===e?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(e,t){var i,s,n,a,o=this.options,r=this._isRootNode(this.scrollParent[0]),h=e.pageX,l=e.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a),"y"===o.axis&&(h=this.originalPageX),"x"===o.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i,s){var n=e.extend({},i,{item:s.element});s.sortables=[],e(s.options.connectToSortable).each(function(){var i=e(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",t,n))})},stop:function(t,i,s){var n=e.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,e.each(s.sortables,function(){var e=this;e.isOver?(e.isOver=0,s.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,n))})},drag:function(t,i,s){e.each(s.sortables,function(){var n=!1,a=this;a.positionAbs=s.positionAbs,a.helperProportions=s.helperProportions,a.offset.click=s.offset.click,a._intersectsWith(a.containerCache)&&(n=!0,e.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==a&&this._intersectsWith(this.containerCache)&&e.contains(a.element[0],this.element[0])&&(n=!1),n})),n?(a.isOver||(a.isOver=1,s._parent=i.helper.parent(),a.currentItem=i.helper.appendTo(a.element).data("ui-sortable-item",!0),a.options._helper=a.options.helper,a.options.helper=function(){return i.helper[0]},t.target=a.currentItem[0],a._mouseCapture(t,!0),a._mouseStart(t,!0,!0),a.offset.click.top=s.offset.click.top,a.offset.click.left=s.offset.click.left,a.offset.parent.left-=s.offset.parent.left-a.offset.parent.left,a.offset.parent.top-=s.offset.parent.top-a.offset.parent.top,s._trigger("toSortable",t),s.dropped=a.element,e.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,a.fromOutside=s),a.currentItem&&(a._mouseDrag(t),i.position=a.position)):a.isOver&&(a.isOver=0,a.cancelHelperRemoval=!0,a.options._revert=a.options.revert,a.options.revert=!1,a._trigger("out",t,a._uiHash(a)),a._mouseStop(t,!0),a.options.revert=a.options._revert,a.options.helper=a.options._helper,a.placeholder&&a.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(t),i.position=s._generatePosition(t,!0),s._trigger("fromSortable",t),s.dropped=!1,e.each(s.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,i,s){var n=e("body"),a=s.options;n.css("cursor")&&(a._cursor=n.css("cursor")),n.css("cursor",a.cursor)},stop:function(t,i,s){var n=s.options;n._cursor&&e("body").css("cursor",n._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("opacity")&&(a._opacity=n.css("opacity")),n.css("opacity",a.opacity)},stop:function(t,i,s){var n=s.options;n._opacity&&e(i.helper).css("opacity",n._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,s){var n=s.options,a=!1,o=s.scrollParentNotHidden[0],r=s.document[0];o!==r&&"HTML"!==o.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+o.offsetHeight-t.pageY<n.scrollSensitivity?o.scrollTop=a=o.scrollTop+n.scrollSpeed:t.pageY-s.overflowOffset.top<n.scrollSensitivity&&(o.scrollTop=a=o.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+o.offsetWidth-t.pageX<n.scrollSensitivity?o.scrollLeft=a=o.scrollLeft+n.scrollSpeed:t.pageX-s.overflowOffset.left<n.scrollSensitivity&&(o.scrollLeft=a=o.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(t.pageY-e(r).scrollTop()<n.scrollSensitivity?a=e(r).scrollTop(e(r).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(r).scrollTop())<n.scrollSensitivity&&(a=e(r).scrollTop(e(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(t.pageX-e(r).scrollLeft()<n.scrollSensitivity?a=e(r).scrollLeft(e(r).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(r).scrollLeft())<n.scrollSensitivity&&(a=e(r).scrollLeft(e(r).scrollLeft()+n.scrollSpeed)))),a!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(s,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,i,s){var n=s.options;s.snapElements=[],e(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var t=e(this),i=t.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:i.top,left:i.left})})},drag:function(t,i,s){var n,a,o,r,h,l,u,d,c,p,f=s.options,m=f.snapTolerance,g=i.offset.left,v=g+s.helperProportions.width,y=i.offset.top,b=y+s.helperProportions.height;for(c=s.snapElements.length-1;c>=0;c--)h=s.snapElements[c].left-s.margins.left,l=h+s.snapElements[c].width,u=s.snapElements[c].top-s.margins.top,d=u+s.snapElements[c].height,h-m>v||g>l+m||u-m>b||y>d+m||!e.contains(s.snapElements[c].item.ownerDocument,s.snapElements[c].item)?(s.snapElements[c].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=!1):("inner"!==f.snapMode&&(n=m>=Math.abs(u-b),a=m>=Math.abs(d-y),o=m>=Math.abs(h-v),r=m>=Math.abs(l-g),n&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:d,left:0}).top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||a||o||r,"outer"!==f.snapMode&&(n=m>=Math.abs(u-y),a=m>=Math.abs(d-b),o=m>=Math.abs(h-g),r=m>=Math.abs(l-v),n&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:d-s.helperProportions.height,left:0}).top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[c].snapping&&(n||a||o||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=n||a||o||r||p)}}),e.ui.plugin.add("draggable","stack",{start:function(t,i,s){var n,a=s.options,o=e.makeArray(e(a.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});o.length&&(n=parseInt(e(o[0]).css("zIndex"),10)||0,e(o).each(function(t){e(this).css("zIndex",n+t)}),this.css("zIndex",n+o.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("zIndex")&&(a._zIndex=n.css("zIndex")),n.css("zIndex",a.zIndex)},stop:function(t,i,s){var n=s.options;n._zIndex&&e(i.helper).css("zIndex",n._zIndex)}}),e.ui.draggable,e.widget("ui.resizable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseInt(e,10)||0},_isNumber:function(e){return!isNaN(parseInt(e,10))},_hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return t[s]>0?!0:(t[s]=1,n=t[s]>0,t[s]=0,n)},_create:function(){var t,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=e(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a="ui-resizable-"+s,n=e("<div class='ui-resizable-handle "+a+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=e(this.handles[i]),this._on(this.handles[i],{mousedown:o._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(n,a),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(e(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(e(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var i,s,n,a=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),a.containment&&(i+=e(a.containment).scrollLeft()||0,s+=e(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===n?this.axis+"-resize":n),o.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i,s,n=this.originalMousePosition,a=this.axis,o=t.pageX-n.left||0,r=t.pageY-n.top||0,h=this._change[a];return this._updatePrevProperties(),h?(i=h.apply(this,[t,o,r]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,i,s,n,a,o=this.options;a={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||e)&&(t=a.minHeight*this.aspectRatio,s=a.minWidth/this.aspectRatio,i=a.maxHeight*this.aspectRatio,n=a.maxWidth/this.aspectRatio,t>a.minWidth&&(a.minWidth=t),s>a.minHeight&&(a.minHeight=s),a.maxWidth>i&&(a.maxWidth=i),a.maxHeight>n&&(a.maxHeight=n)),this._vBoundaries=a},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,i=this.size,s=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===s&&(e.left=t.left+(i.width-e.width),e.top=null),"nw"===s&&(e.top=t.top+(i.height-e.height),e.left=t.left+(i.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,i=this.axis,s=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,n=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,a=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,o=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,r=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,l=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return a&&(e.width=t.minWidth),o&&(e.height=t.minHeight),s&&(e.width=t.maxWidth),n&&(e.height=t.maxHeight),a&&l&&(e.left=r-t.minWidth),s&&l&&(e.left=r-t.maxWidth),o&&u&&(e.top=h-t.minHeight),n&&u&&(e.top=h-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,i=[],s=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],n=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];4>t;t++)i[t]=parseInt(s[t],10)||0,i[t]+=parseInt(n[t],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,i=this.helper||this.element;this._proportionallyResizeElements.length>t;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,i,s,n,a,o,r,h=e(this).resizable("instance"),l=h.options,u=h.element,d=l.containment,c=d instanceof e?d.get(0):/parent/.test(d)?u.parent().get(0):d;c&&(h.containerElement=e(c),/document/.test(d)||d===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(c),i=[],e(["Top","Right","Left","Bottom"]).each(function(e,s){i[e]=h._num(t.css("padding"+s))}),h.containerOffset=t.offset(),h.containerPosition=t.position(),h.containerSize={height:t.innerHeight()-i[3],width:t.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,a=h.containerSize.width,o=h._hasScroll(c,"left")?c.scrollWidth:a,r=h._hasScroll(c)?c.scrollHeight:n,h.parentData={element:c,left:s.left,top:s.top,width:o,height:r}))},resize:function(t){var i,s,n,a,o=e(this).resizable("instance"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,d={top:0,left:0},c=o.containerElement,p=!0;c[0]!==document&&/static/.test(c.css("position"))&&(d=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-d.left),u&&(o.size.height=o.size.width/o.aspectRatio,p=!1),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio,p=!1),o.position.top=o._helper?h.top:0),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a?(o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.offset.top=o.element.offset().top),i=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-d.left:o.offset.left-h.left)),s=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-d.top:o.offset.top-h.top)),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio,p=!1)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio,p=!1)),p||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var t=e(this).resizable("instance"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,o=e(t.helper),r=o.offset(),h=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance"),i=t.options;e(i.alsoResize).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})},resize:function(t,i){var s=e(this).resizable("instance"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0};e(n.alsoResize).each(function(){var t=e(this),s=e(this).data("ui-resizable-alsoresize"),n={},a=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(a,function(e,t){var i=(s[t]||0)+(r[t]||0);i&&i>=0&&(n[t]=i||null)}),t.css(n)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,i=e(this).resizable("instance"),s=i.options,n=i.size,a=i.originalSize,o=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,u=h[1]||1,d=Math.round((n.width-a.width)/l)*l,c=Math.round((n.height-a.height)/u)*u,p=a.width+d,f=a.height+c,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,v=s.minWidth&&s.minWidth>p,y=s.minHeight&&s.minHeight>f;s.grid=h,v&&(p+=l),y&&(f+=u),m&&(p-=l),g&&(f-=u),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=o.top-c):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=o.left-d):((0>=f-u||0>=p-l)&&(t=i._getPaddingPlusBorderDimensions(this)),f-u>0?(i.size.height=f,i.position.top=o.top-c):(f=u-t.height,i.size.height=f,i.position.top=o.top+a.height-f),p-l>0?(i.size.width=p,i.position.left=o.left-d):(p=l-t.width,i.size.width=p,i.position.left=o.left+a.width-p))}}),e.ui.resizable,e.widget("ui.dialog",{version:"1.11.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"Close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,s=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&e(i).blur()}catch(n){}this._hide(this.uiDialog,this.options.hide,function(){s._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+e(this).css("z-index")}).get(),a=Math.max.apply(null,n);return a>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",a+1),s=!0),s&&!i&&this._trigger("focus",t),s},open:function(){var t=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),void 0;
if(t.keyCode===e.ui.keyCode.TAB&&!t.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");t.target!==n[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==s[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){n.focus()}),t.preventDefault()):(this._delay(function(){s.focus()}),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html("&#160;"),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),void 0):(e.each(i,function(i,s){var n,a;s=e.isFunction(s)?{click:s,text:i}:s,s=e.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(t.element[0],arguments)},a={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,e("<button></button>",s).button(a).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,t(n))},drag:function(e,s){i._trigger("drag",e,t(s))},stop:function(n,a){var o=a.offset.left-i.document.scrollLeft(),r=a.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(o>=0?"+":"")+o+" "+"top"+(r>=0?"+":"")+r,of:i.window},e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,t(a))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,s=this.options,n=s.resizable,a=this.uiDialog.css("position"),o="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:o,start:function(s,n){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,t(n))},resize:function(e,s){i._trigger("resize",e,t(s))},stop:function(n,a){var o=i.uiDialog.offset(),r=o.left-i.document.scrollLeft(),h=o.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(h>=0?"+":"")+h,of:i.window},e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,t(a))}}).css("position",a)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),i=e.inArray(this,t);-1!==i&&t.splice(i,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};e.each(t,function(e,t){i._setOption(e,t),e in i.sizeRelatedOptions&&(s=!0),e in i.resizableRelatedOptions&&(n[e]=t)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,t){var i,s,n=this.uiDialog;"dialogClass"===e&&n.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=n.is(":data(ui-draggable)"),i&&!t&&n.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(s=n.is(":data(ui-resizable)"),s&&!t&&n.resizable("destroy"),s&&"string"==typeof t&&n.resizable("option","handles",t),s||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),e=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),t=Math.max(0,s.minHeight-e),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-e):"none","auto"===s.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(e){t||this._allowInteraction(e)||(e.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}}),e.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(s)?s:function(e){return e.is(s)},this.proportions=function(){return arguments.length?(t=arguments[0],void 0):t?t:t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;e.length>t;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){if("accept"===t)this.accept=e.isFunction(i)?i:function(e){return e.is(i)};else if("scope"===t){var s=e.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=e(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(i,{offset:i.element.offset()}),i.options.tolerance,t)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(s)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(){function e(e,t,i){return e>=t&&t+i>e}return function(t,i,s,n){if(!i.offset)return!1;var a=(t.positionAbs||t.position.absolute).left+t.margins.left,o=(t.positionAbs||t.position.absolute).top+t.margins.top,r=a+t.helperProportions.width,h=o+t.helperProportions.height,l=i.offset.left,u=i.offset.top,d=l+i.proportions().width,c=u+i.proportions().height;switch(s){case"fit":return a>=l&&d>=r&&o>=u&&c>=h;case"intersect":return a+t.helperProportions.width/2>l&&d>r-t.helperProportions.width/2&&o+t.helperProportions.height/2>u&&c>h-t.helperProportions.height/2;case"pointer":return e(n.pageY,u,i.proportions().height)&&e(n.pageX,l,i.proportions().width);case"touch":return(o>=u&&c>=o||h>=u&&c>=h||u>o&&h>c)&&(a>=l&&d>=a||r>=l&&d>=r||l>a&&r>d);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var s,n,a=e.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||t&&!a[s].accept.call(a[s].element[0],t.currentItem||t.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue e}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=e.ui.intersect(t,this,this.options.tolerance,i),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return e(this).droppable("instance").options.scope===n}),a.length&&(s=e(a[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}},e.ui.droppable;var y="ui-effects-",b=e;e.effects={effect:{}},function(e,t){function i(e,t,i){var s=d[t.type]||{};return null==e?i||!t.def?null:t.def:(e=s.floor?~~e:parseFloat(e),isNaN(e)?t.def:s.mod?(e+s.mod)%s.mod:0>e?0:e>s.max?s.max:e)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(e,a){var o,r=a.re.exec(i),h=r&&a.parse(r),l=a.space||"rgba";return h?(o=s[l](h),s[u[l].cache]=o[u[l].cache],n=s._rgba=o._rgba,!1):t}),n.length?("0,0,0,0"===n.join()&&e.extend(n,a.transparent),s):a[i]}function n(e,t,i){return i=(i+1)%1,1>6*i?e+6*(t-e)*i:1>2*i?t:2>3*i?e+6*(t-e)*(2/3-i):e}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],l=e.Color=function(t,i,s,n){return new e.Color.fn.parse(t,i,s,n)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},d={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},c=l.support={},p=e("<p>")[0],f=e.each;p.style.cssText="background-color:rgba(1,1,1,.5)",c.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),l.fn=e.extend(l.prototype,{parse:function(n,o,r,h){if(n===t)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=e(n).css(o),o=t);var d=this,c=e.type(n),p=this._rgba=[];return o!==t&&(n=[n,o,r,h],c="array"),"string"===c?this.parse(s(n)||a._default):"array"===c?(f(u.rgba.props,function(e,t){p[t.idx]=i(n[t.idx],t)}),this):"object"===c?(n instanceof l?f(u,function(e,t){n[t.cache]&&(d[t.cache]=n[t.cache].slice())}):f(u,function(t,s){var a=s.cache;f(s.props,function(e,t){if(!d[a]&&s.to){if("alpha"===e||null==n[e])return;d[a]=s.to(d._rgba)}d[a][t.idx]=i(n[e],t,!0)}),d[a]&&0>e.inArray(null,d[a].slice(0,3))&&(d[a][3]=1,s.from&&(d._rgba=s.from(d[a])))}),this):t},is:function(e){var i=l(e),s=!0,n=this;return f(u,function(e,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(e,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:t})),s}),s},_space:function(){var e=[],t=this;return f(u,function(i,s){t[s.cache]&&e.push(i)}),e.pop()},transition:function(e,t){var s=l(e),n=s._space(),a=u[n],o=0===this.alpha()?l("transparent"):this,r=o[a.cache]||a.to(o._rgba),h=r.slice();return s=s[a.cache],f(a.props,function(e,n){var a=n.idx,o=r[a],l=s[a],u=d[n.type]||{};null!==l&&(null===o?h[a]=l:(u.mod&&(l-o>u.mod/2?o+=u.mod:o-l>u.mod/2&&(o-=u.mod)),h[a]=i((l-o)*t+o,n)))}),this[n](h)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(t)._rgba;return l(e.map(i,function(e,t){return(1-s)*n[t]+s*e}))},toRgbaString:function(){var t="rgba(",i=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===i[3]&&(i.pop(),t="rgb("),t+i.join()+")"},toHslaString:function(){var t="hsla(",i=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+"%"),e});return 1===i[3]&&(i.pop(),t="hsl("),t+i.join()+")"},toHexString:function(t){var i=this._rgba.slice(),s=i.pop();return t&&i.push(~~(255*s)),"#"+e.map(i,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,u.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,i,s=e[0]/255,n=e[1]/255,a=e[2]/255,o=e[3],r=Math.max(s,n,a),h=Math.min(s,n,a),l=r-h,u=r+h,d=.5*u;return t=h===r?0:s===r?60*(n-a)/l+360:n===r?60*(a-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=d?l/u:l/(2-u),[Math.round(t)%360,i,d,null==o?1:o]},u.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],s=e[2],a=e[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,t+1/3)),Math.round(255*n(r,o,t)),Math.round(255*n(r,o,t-1/3)),a]},f(u,function(s,n){var a=n.props,o=n.cache,h=n.to,u=n.from;l.fn[s]=function(s){if(h&&!this[o]&&(this[o]=h(this._rgba)),s===t)return this[o].slice();var n,r=e.type(s),d="array"===r||"object"===r?s:arguments,c=this[o].slice();return f(a,function(e,t){var s=d["object"===r?e:t.idx];null==s&&(s=c[t.idx]),c[t.idx]=i(s,t)}),u?(n=l(u(c)),n[o]=c,n):l(c)},f(a,function(t,i){l.fn[t]||(l.fn[t]=function(n){var a,o=e.type(n),h="alpha"===t?this._hsla?"hsla":"rgba":s,l=this[h](),u=l[i.idx];return"undefined"===o?u:("function"===o&&(n=n.call(this,u),o=e.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=u+parseFloat(a[2])*("+"===a[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(t){var i=t.split(" ");f(i,function(t,i){e.cssHooks[i]={set:function(t,n){var a,o,r="";if("transparent"!==n&&("string"!==e.type(n)||(a=s(n)))){if(n=l(a||n),!c.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?t.parentNode:t;(""===r||"transparent"===r)&&o&&o.style;)try{r=e.css(o,"backgroundColor"),o=o.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{t.style[i]=n}catch(h){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=l(t.elem,i),t.end=l(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}})},l.hook(o),e.cssHooks.borderColor={expand:function(e){var t={};return f(["Top","Right","Bottom","Left"],function(i,s){t["border"+s+"Color"]=e}),t}},a=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(b),function(){function t(t){var i,s,n=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[e.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function i(t,i){var s,a,o={};for(s in i)a=i[s],t[s]!==a&&(n[s]||(e.fx.step[s]||!isNaN(parseFloat(a)))&&(o[s]=a));return o}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(b.style(e.elem,i,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(n,a,o,r){var h=e.speed(a,o,r);return this.queue(function(){var a,o=e(this),r=o.attr("class")||"",l=h.children?o.find("*").addBack():o;l=l.map(function(){var i=e(this);return{el:i,start:t(this)}}),a=function(){e.each(s,function(e,t){n[t]&&o[t+"Class"](n[t])})},a(),l=l.map(function(){return this.end=t(this.el[0]),this.diff=i(this.start,this.end),this}),o.attr("class",r),l=l.map(function(){var t=this,i=e.Deferred(),s=e.extend({},h,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,s),i.promise()}),e.when.apply(e,l.get()).done(function(){a(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),h.complete.call(o[0])})})},e.fn.extend({addClass:function(t){return function(i,s,n,a){return s?e.effects.animateClass.call(this,{add:i},s,n,a):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(i,s,n,a){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},s,n,a):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,s,n,a,o){return"boolean"==typeof s||void 0===s?n?e.effects.animateClass.call(this,s?{add:i}:{remove:i},n,a,o):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},s,n,a)}}(e.fn.toggleClass),switchClass:function(t,i,s,n,a){return e.effects.animateClass.call(this,{add:i,remove:t},s,n,a)}})}(),function(){function t(t,i,s,n){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),e.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(n=s,s=i,i={}),e.isFunction(s)&&(n=s,s=null),i&&e.extend(t,i),s=s||i.duration,t.duration=e.fx.off?0:"number"==typeof s?s:s in e.fx.speeds?e.fx.speeds[s]:e.fx.speeds._default,t.complete=n||i.complete,t}function i(t){return!t||"number"==typeof t||e.fx.speeds[t]?!0:"string"!=typeof t||e.effects.effect[t]?e.isFunction(t)?!0:"object"!=typeof t||t.effect?!1:!0:!0}e.extend(e.effects,{version:"1.11.4",save:function(e,t){for(var i=0;t.length>i;i++)null!==t[i]&&e.data(y+t[i],e[0].style[t[i]])},restore:function(e,t){var i,s;for(s=0;t.length>s;s++)null!==t[s]&&(i=e.data(y+t[s]),void 0===i&&(i=""),e.css(t[s],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var i,s;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=e[1]/t.width}return{x:s,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},s=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:t.width(),height:t.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return t.wrap(s),(t[0]===a||e.contains(t[0],a))&&e(a).focus(),s=t.parent(),"static"===t.css("position")?(s.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,s){i[s]=t.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(n),s.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).focus()),t},setTransition:function(t,i,s,n){return n=n||{},e.each(i,function(e,i){var a=t.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),e.fn.extend({effect:function(){function i(t){function i(){e.isFunction(a)&&a.call(n[0]),e.isFunction(t)&&t()}var n=e(this),a=s.complete,r=s.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),i()):o.call(n[0],s,i)}var s=t.apply(this,arguments),n=s.mode,a=s.queue,o=e.effects.effect[s.effect];return e.fx.off||!o?n?this[n](s.duration,s.complete):this.each(function(){s.complete&&s.complete.call(this)}):a===!1?this.each(i):this.queue(a||"fx",i)},show:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(e.fn.show),hide:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(e.fn.hide),toggle:function(e){return function(s){if(i(s)||"boolean"==typeof s)return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),s=[];return e.each(["em","px","%","pt"],function(e,t){i.indexOf(t)>0&&(s=[parseFloat(i),t])}),s}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,i){t[i]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;((t=Math.pow(2,--i))-1)/11>e;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?i(2*e)/2:1-i(-2*e+2)/2}})}(),e.effects,e.effects.effect.blind=function(t,i){var s,n,a,o=e(this),r=/up|down|vertical/,h=/up|left|vertical|horizontal/,l=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(o,t.mode||"hide"),d=t.direction||"up",c=r.test(d),p=c?"height":"width",f=c?"top":"left",m=h.test(d),g={},v="show"===u;o.parent().is(".ui-effects-wrapper")?e.effects.save(o.parent(),l):e.effects.save(o,l),o.show(),s=e.effects.createWrapper(o).css({overflow:"hidden"}),n=s[p](),a=parseFloat(s.css(f))||0,g[p]=v?n:0,m||(o.css(c?"bottom":"right",0).css(c?"top":"left","auto").css({position:"absolute"}),g[f]=v?a:n+a),v&&(s.css(p,0),m||s.css(f,a+n)),s.animate(g,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){"hide"===u&&o.hide(),e.effects.restore(o,l),e.effects.removeWrapper(o),i()}})},e.effects.effect.bounce=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(o,t.mode||"effect"),l="hide"===h,u="show"===h,d=t.direction||"up",c=t.distance,p=t.times||5,f=2*p+(u||l?1:0),m=t.duration/f,g=t.easing,v="up"===d||"down"===d?"top":"left",y="up"===d||"left"===d,b=o.queue(),_=b.length;for((u||l)&&r.push("opacity"),e.effects.save(o,r),o.show(),e.effects.createWrapper(o),c||(c=o["top"===v?"outerHeight":"outerWidth"]()/3),u&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,y?2*-c:2*c).animate(a,m,g)),l&&(c/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(y?"-=":"+=")+c,o.animate(n,m,g).animate(a,m,g),c=l?2*c:c/2;l&&(n={opacity:0},n[v]=(y?"-=":"+=")+c,o.animate(n,m,g)),o.queue(function(){l&&o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}),_>1&&b.splice.apply(b,[1,0].concat(b.splice(_,f+1))),o.dequeue()},e.effects.effect.clip=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(o,t.mode||"hide"),l="show"===h,u=t.direction||"vertical",d="vertical"===u,c=d?"height":"width",p=d?"top":"left",f={};e.effects.save(o,r),o.show(),s=e.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[c](),l&&(n.css(c,0),n.css(p,a/2)),f[c]=l?a:0,f[p]=l?0:a/2,n.animate(f,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){l||o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}})},e.effects.effect.drop=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","opacity","height","width"],o=e.effects.setMode(n,t.mode||"hide"),r="show"===o,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h?"pos":"neg",d={opacity:r?1:0};e.effects.save(n,a),n.show(),e.effects.createWrapper(n),s=t.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===u?-s:s),d[l]=(r?"pos"===u?"+=":"-=":"pos"===u?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.explode=function(t,i){function s(){b.push(this),b.length===d*c&&n()}function n(){p.css({visibility:"visible"}),e(b).remove(),m||p.hide(),i()}var a,o,r,h,l,u,d=t.pieces?Math.round(Math.sqrt(t.pieces)):3,c=d,p=e(this),f=e.effects.setMode(p,t.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/c),y=Math.ceil(p.outerHeight()/d),b=[];for(a=0;d>a;a++)for(h=g.top+a*y,u=a-(d-1)/2,o=0;c>o;o++)r=g.left+o*v,l=o-(c-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:r+(m?l*v:0),top:h+(m?u*y:0),opacity:m?0:1}).animate({left:r+(m?0:l*v),top:h+(m?0:u*y),opacity:m?1:0},t.duration||500,t.easing,s)},e.effects.effect.fade=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:t.duration,easing:t.easing,complete:i})},e.effects.effect.fold=function(t,i){var s,n,a=e(this),o=["position","top","bottom","left","right","height","width"],r=e.effects.setMode(a,t.mode||"hide"),h="show"===r,l="hide"===r,u=t.size||15,d=/([0-9]+)%/.exec(u),c=!!t.horizFirst,p=h!==c,f=p?["width","height"]:["height","width"],m=t.duration/2,g={},v={};e.effects.save(a,o),a.show(),s=e.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],d&&(u=parseInt(d[1],10)/100*n[l?0:1]),h&&s.css(c?{height:0,width:u}:{height:u,width:0}),g[f[0]]=h?n[0]:u,v[f[1]]=h?n[1]:0,s.animate(g,m,t.easing).animate(v,m,t.easing,function(){l&&a.hide(),e.effects.restore(a,o),e.effects.removeWrapper(a),i()})},e.effects.effect.highlight=function(t,i){var s=e(this),n=["backgroundImage","backgroundColor","opacity"],a=e.effects.setMode(s,t.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),e.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===a&&s.hide(),e.effects.restore(s,n),i()}})},e.effects.effect.size=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],u=["fontSize"],d=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],c=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(o,t.mode||"effect"),f=t.restore||"effect"!==p,m=t.scale||"both",g=t.origin||["middle","center"],v=o.css("position"),y=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===t.mode&&"show"===p?(o.from=t.to||b,o.to=t.from||s):(o.from=t.from||("show"===p?b:s),o.to=t.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===m||"both"===m)&&(a.from.y!==a.to.y&&(y=y.concat(d),o.from=e.effects.setTransition(o,d,a.from.y,o.from),o.to=e.effects.setTransition(o,d,a.to.y,o.to)),a.from.x!==a.to.x&&(y=y.concat(c),o.from=e.effects.setTransition(o,c,a.from.x,o.from),o.to=e.effects.setTransition(o,c,a.to.x,o.to))),("content"===m||"both"===m)&&a.from.y!==a.to.y&&(y=y.concat(u).concat(l),o.from=e.effects.setTransition(o,u,a.from.y,o.from),o.to=e.effects.setTransition(o,u,a.to.y,o.to)),e.effects.save(o,y),o.show(),e.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),g&&(n=e.effects.getBaseline(g,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===m||"both"===m)&&(d=d.concat(["marginTop","marginBottom"]).concat(u),c=c.concat(["marginLeft","marginRight"]),l=r.concat(d).concat(c),o.find("*[width]").each(function(){var i=e(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};
f&&e.effects.save(i,l),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=e.effects.setTransition(i,d,a.from.y,i.from),i.to=e.effects.setTransition(i,d,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=e.effects.setTransition(i,c,a.from.x,i.from),i.to=e.effects.setTransition(i,c,a.to.x,i.to)),i.css(i.from),i.animate(i.to,t.duration,t.easing,function(){f&&e.effects.restore(i,l)})})),o.animate(o.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),e.effects.restore(o,y),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):e.each(["top","left"],function(e,t){o.css(t,function(t,i){var s=parseInt(i,10),n=e?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),e.effects.removeWrapper(o),i()}})},e.effects.effect.scale=function(t,i){var s=e(this),n=e.extend(!0,{},t),a=e.effects.setMode(s,t.mode||"effect"),o=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"hide"===a?0:100),r=t.direction||"both",h=t.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},u={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=h||["middle","center"],n.restore=!0),n.from=t.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*u.y,width:l.width*u.x,outerHeight:l.outerHeight*u.y,outerWidth:l.outerWidth*u.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},e.effects.effect.puff=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"hide"),a="hide"===n,o=parseInt(t.percent,10)||150,r=o/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(t)},e.effects.effect.pulsate=function(t,i){var s,n=e(this),a=e.effects.setMode(n,t.mode||"show"),o="show"===a,r="hide"===a,h=o||"hide"===a,l=2*(t.times||5)+(h?1:0),u=t.duration/l,d=0,c=n.queue(),p=c.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),d=1),s=1;l>s;s++)n.animate({opacity:d},u,t.easing),d=1-d;n.animate({opacity:d},u,t.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&c.splice.apply(c,[1,0].concat(c.splice(p,l+1))),n.dequeue()},e.effects.effect.shake=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","height","width"],o=e.effects.setMode(n,t.mode||"effect"),r=t.direction||"left",h=t.distance||20,l=t.times||3,u=2*l+1,d=Math.round(t.duration/u),c="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},m={},g={},v=n.queue(),y=v.length;for(e.effects.save(n,a),n.show(),e.effects.createWrapper(n),f[c]=(p?"-=":"+=")+h,m[c]=(p?"+=":"-=")+2*h,g[c]=(p?"-=":"+=")+2*h,n.animate(f,d,t.easing),s=1;l>s;s++)n.animate(m,d,t.easing).animate(g,d,t.easing);n.animate(m,d,t.easing).animate(f,d/2,t.easing).queue(function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}),y>1&&v.splice.apply(v,[1,0].concat(v.splice(y,u+1))),n.dequeue()},e.effects.effect.slide=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","width","height"],o=e.effects.setMode(n,t.mode||"show"),r="show"===o,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h,d={};e.effects.save(n,a),n.show(),s=t.distance||n["top"===l?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,u?isNaN(s)?"-"+s:-s:s),d[l]=(r?u?"+=":"-=":u?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.transfer=function(t,i){var s=e(this),n=e(t.to),a="fixed"===n.css("position"),o=e("body"),r=a?o.scrollTop():0,h=a?o.scrollLeft():0,l=n.offset(),u={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},d=s.offset(),c=e("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(t.className).css({top:d.top-r,left:d.left-h,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(u,t.duration,t.easing,function(){c.remove(),i()})},e.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return void 0===e?this.options.value:(this.options.value=this._constrainedValue(e),this._refreshValue(),void 0)},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=e===!1,"number"!=typeof e&&(e=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),e.widget("ui.selectable",e.ui.mouse,{version:"1.11.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this,s=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(s.filter,this.element[0]),this._trigger("start",t),e(s.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=e.data(this,"selectable-item");s.startselected=!0,t.metaKey||t.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",t,{unselecting:s.element}))}),e(t.target).parents().addBack().each(function(){var s,n=e.data(this,"selectable-item");return n?(s=!t.metaKey&&!t.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",t,{selecting:n.element}):i._trigger("unselecting",t,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=t.pageX,h=t.pageY;return a>r&&(i=r,r=a,a=i),o>h&&(i=h,h=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:h-o}),this.selectees.each(function(){var i=e.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||a>i.right||i.top>h||o>i.bottom):"fit"===n.tolerance&&(l=i.left>a&&r>i.right&&i.top>o&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",t,{unselected:s.element})}),e(".ui-selecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),e.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var t=this;this.label=e("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(e){this.button.focus(),e.preventDefault()}}),this.element.hide(),this.button=e("<span>",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element),e("<span>",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=e("<span>",{"class":"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){t.menuItems||t._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var t=this;this.menu=e("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=e("<div>",{"class":"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(e,i){e.preventDefault(),t._setSelection(),t._select(i.item.data("ui-selectmenu-item"),e)},focus:function(e,i){var s=i.item.data("ui-selectmenu-item");null!=t.focusIndex&&s.index!==t.focusIndex&&(t._trigger("focus",e,{item:s}),t.isOpen||t._select(s,e)),t.focusIndex=s.index,t.button.attr("aria-activedescendant",t.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var e,t=this.element.find("option");t.length&&(this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(e){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",e))},_position:function(){this.menuWrap.position(e.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(t,i){var s=this,n="";e.each(i,function(i,a){a.optgroup!==n&&(e("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(a.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:a.optgroup}).appendTo(t),n=a.optgroup),s._renderItemData(t,a)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-selectmenu-item",t)},_renderItem:function(t,i){var s=e("<li>");return i.disabled&&s.addClass("ui-state-disabled"),this._setText(s,i.label),s.appendTo(t)},_setText:function(e,t){t?e.text(t):e.html("&#160;")},_move:function(e,t){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex):(i=this.menuItems.eq(this.element[0].selectedIndex),n+=":not(.ui-state-disabled)"),s="first"===e||"last"===e?i["first"===e?"prevAll":"nextAll"](n).eq(-1):i[e+"All"](n).eq(0),s.length&&this.menuInstance.focus(t,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(e){this[this.isOpen?"close":"open"](e)},_setSelection:function(){var e;this.range&&(window.getSelection?(e=window.getSelection(),e.removeAllRanges(),e.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(t){this.isOpen&&(e(t.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(t))}},_buttonEvents:{mousedown:function(){var e;window.getSelection?(e=window.getSelection(),e.rangeCount&&(this.range=e.getRangeAt(0))):this.range=document.selection.createRange()},click:function(e){this._setSelection(),this._toggle(e)},keydown:function(t){var i=!0;switch(t.keyCode){case e.ui.keyCode.TAB:case e.ui.keyCode.ESCAPE:this.close(t),i=!1;break;case e.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case e.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case e.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case e.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case e.ui.keyCode.LEFT:this._move("prev",t);break;case e.ui.keyCode.RIGHT:this._move("next",t);break;case e.ui.keyCode.HOME:case e.ui.keyCode.PAGE_UP:this._move("first",t);break;case e.ui.keyCode.END:case e.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),i=!1}i&&t.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex);t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),e)},_select:function(e,t){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this._setText(this.buttonText,e.label),this._setAria(e),this._trigger("select",t,{item:e}),e.index!==i&&this._trigger("change",t,{item:e}),this.close(t)},_setAria:function(e){var t=this.menuItems.eq(e.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(e,t){"icons"===e&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(t.button),this._super(e,t),"appendTo"===e&&this.menuWrap.appendTo(this._appendTo()),"disabled"===e&&(this.menuInstance.option("disabled",t),this.button.toggleClass("ui-state-disabled",t).attr("aria-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===e&&this._resizeButton()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var e=this.options.width;e||(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(t){var i=[];t.each(function(t,s){var n=e(s),a=n.parent("optgroup");i.push({element:n,index:t,value:n.val(),label:n.text(),optgroup:a.attr("label")||"",disabled:a.prop("disabled")||n.prop("disabled")})}),this.items=i},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}}),e.widget("ui.slider",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),t=n.length;i>t;t++)o.push(a);this.handles=n.add(e(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,i="";t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=e("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var i,s,n,a,o,r,h,l,u=this,d=this.options;return d.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(s-u.values(t));(n>i||n===i&&(t===u._lastChangedValue||u.values(t)===d.min))&&(n=i,a=e(this),o=t)}),r=this._start(t,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),h=a.offset(),l=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:t.pageX-h.left-a.width()/2,top:t.pageY-h.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,s,n,a;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/t,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>s||1===t&&s>i)&&(i=s),i!==this.values(t)&&(n=this.values(),n[t]=i,a=this._trigger("slide",e,{handle:this.handles[t],value:i,values:n}),s=this.values(t?0:1),a!==!1&&this.values(t,i))):i!==this.value()&&(a=this._trigger("slide",e,{handle:this.handles[t],value:i}),a!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._lastChangedValue=t,this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(t,i){var s,n,a;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),this._change(null,t),void 0;if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(t,i){var s,n=0;switch("range"===t&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(n=this.options.values.length),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!i),this._super(t,i),t){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,s;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(e){if(this._valueMin()>=e)return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,s=e-i;return 2*Math.abs(i)>=t&&(s+=i>0?t:-t),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),i=this.options.step,s=Math.floor(+(e-t).toFixed(this._precision())/i)*i;e=s+t,this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,i=t.indexOf(".");return-1===i?0:t.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var t,i,s,n,a,o=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[l?"animate":"css"](u,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:r.animate}))),t=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(t){var i,s,n,a,o=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(t.target).addClass("ui-state-active"),i=this._start(t,o),i===!1))return}switch(a=this.options.step,s=n=this.options.values&&this.options.values.length?this.values(o):this.value(),t.keyCode){case e.ui.keyCode.HOME:n=this._valueMin();break;case e.ui.keyCode.END:n=this._valueMax();break;case e.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+a);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-a)}this._slide(t,o,n)},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass("ui-state-active"))}}}),e.widget("ui.sortable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,i){return e>=t&&t+i>e},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(t),e(t.target).parents().each(function(){return e.data(this,a.widgetName+"-item")===a?(s=e(this),!1):void 0}),e.data(t.target,a.widgetName+"-item")===a&&(s=e(t.target)),s?!this.options.handle||i||(e(this.options.handle,s).find("*").addBack().each(function(){this===t.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(t,i,s){var n,a,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(a=this.document.find("body"),this.storedCursor=a.css("cursor"),a.css("cursor",o.cursor),this.storedStylesheet=e("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(a)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",t,this._uiHash(this));
return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,s,n,a,o=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+o.scrollSpeed:t.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+o.scrollSpeed:t.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(t.pageY-this.document.scrollTop()<o.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<o.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed)),t.pageX-this.document.scrollLeft()<o.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-o.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<o.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+o.scrollSpeed))),r!==!1&&e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectsWithPointer(s),a&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===a?"next":"prev"]()[0]!==n&&!e.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],n):!0)){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,o={};a&&"x"!==a||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(o.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){s._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&s.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))}),!s.length&&t.key&&s.push(t.key+"="),s.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},i.each(function(){s.push(e(t.item||this).attr(t.attribute||"id")||"")}),s},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=e.left,o=a+e.width,r=e.top,h=r+e.height,l=this.offset.click.top,u=this.offset.click.left,d="x"===this.options.axis||s+l>r&&h>s+l,c="y"===this.options.axis||t+u>a&&o>t+u,p=d&&c;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:t+this.helperProportions.width/2>a&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(e){var t="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),s=t&&i,n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return s?this.floating?a&&"right"===a||"down"===n?2:1:n&&("down"===n?2:1):!1},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&t||"up"===s&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function i(){r.push(this)}var s,n,a,o,r=[],h=[],l=this._connectWith();if(l&&t)for(s=l.length-1;s>=0;s--)for(a=e(l[s],this.document[0]),n=a.length-1;n>=0;n--)o=e.data(a[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&h.push([e.isFunction(o.options.items)?o.options.items.call(o.element):e(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(h.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return e(r)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var i=0;t.length>i;i++)if(t[i]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var i,s,n,a,o,r,h,l,u=this.items,d=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],c=this._connectWith();if(c&&this.ready)for(i=c.length-1;i>=0;i--)for(n=e(c[i],this.document[0]),s=n.length-1;s>=0;s--)a=e.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&(d.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a));for(i=d.length-1;i>=0;i--)for(o=d[i][1],r=d[i][0],s=0,l=r.length;l>s;s++)h=e(r[s]),h.data(this.widgetName+"-item",o),u.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?e(this.options.toleranceElement,s.item):s.item,t||(s.width=n.outerWidth(),s.height=n.outerHeight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var i,s=t.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=t.currentItem[0].nodeName.toLowerCase(),n=e("<"+s+">",t.document[0]).addClass(i||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===s?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("<tr>",t.document[0]).appendTo(n)):"tr"===s?t._createTrPlaceholder(t.currentItem,n):"img"===s&&n.attr("src",t.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(e,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(s.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),s.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,i){var s=this;t.children().each(function(){e("<td>&#160;</td>",s.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(t){var i,s,n,a,o,r,h,l,u,d,c=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(c&&e.contains(this.containers[i].element[0],c.element[0]))continue;c=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,a=null,u=c.floating||this._isFloating(this.currentItem),o=u?"left":"top",r=u?"width":"height",d=u?"clientX":"clientY",s=this.items.length-1;s>=0;s--)e.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[o],l=!1,t[d]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(t[d]-h)&&(n=Math.abs(t[d]-h),a=this.items[s],this.direction=l?"up":"down"));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;a?this._rearrange(t,a,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||e("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(t=e(n.containment)[0],i=e(n.containment).offset(),s="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(t){var i,s,n=this.options,a=t.pageX,o=t.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(a=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(a=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(e,t,i,s){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(e,t){function i(e,t,i){return function(s){i._trigger(e,s,t._uiHash(t))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&n.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||n.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(n.push(function(e){this._trigger("remove",e,this._uiHash())}),n.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)t||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(s=0;n.length>s;s++)n[s].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}}),e.widget("ui.spinner",{version:"1.11.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},i=this.element;return e.each(["min","max","step"],function(e,s){var n=i.attr(s);void 0!==n&&n.length&&(t[s]=n)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e),void 0)},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function i(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){return e(t.currentTarget).hasClass("ui-state-active")?this._start(t)===!1?!1:(this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var i=this.options,s=e.ui.keyCode;switch(t.keyCode){case s.UP:return this._repeat(null,1,t),!0;case s.DOWN:return this._repeat(null,-1,t),!0;case s.PAGE_UP:return this._repeat(null,i.page,t),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(e){return this.spinning||this._trigger("start",e)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,i)},e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&this._trigger("spin",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?e.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,i=t.indexOf(".");return-1===i?0:t.length-i-1},_adjustValue:function(e){var t,i,s=this.options;return t=null!==s.min?s.min:0,i=e-t,i=Math.round(i/s.step)*s.step,e=t+i,e=parseFloat(e.toFixed(this._precision())),null!==s.max&&e>s.max?s.max:null!==s.min&&s.min>e?s.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){if("culture"===e||"numberFormat"===e){var i=this._parse(this.element.val());return this.options[e]=t,this.element.val(this._format(i)),void 0}("max"===e||"min"===e||"step"===e)&&"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down)),this._super(e,t),"disabled"===e&&(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable"))},_setOptions:h(function(e){this._super(e)}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var e=this.value();return null===e?!1:e===this._adjustValue(e)},_value:function(e,t){var i;""!==e&&(i=this._parse(e),null!==i&&(t||(i=this._adjustValue(i)),e=this._format(i))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:h(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:h(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:h(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:h(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?(h(this._value).call(this,e),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),e.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var e=/#.*$/;return function(t){var i,s;t=t.cloneNode(!1),i=t.href.replace(e,""),s=location.href.replace(e,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return t.hash.length>1&&i===s}}(),_create:function(){var t=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible),this._processTabs(),i.active=this._initialActive(),e.isArray(i.disabled)&&(i.disabled=e.unique(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===t&&(s&&this.tabs.each(function(i,n){return e(n).attr("aria-controls")===s?(t=i,!1):void 0}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(this.document[0].activeElement).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:s++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:n=!1,s--;break;case e.ui.keyCode.END:s=this.anchors.length-1;break;case e.ui.keyCode.HOME:s=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}t.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),t.ctrlKey||t.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){function s(){return t>n&&(t=0),0>t&&(t=n),t}for(var n=this.tabs.length-1;-1!==e.inArray(s(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):"disabled"===e?(this._setupDisabled(t),void 0):(this._super(e,t),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",t),t||this.options.active!==!1||this._activate(0)),"event"===e&&this._setupEvents(t),"heightStyle"===e&&this._setupHeightStyle(t),void 0)},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=e.map(i.filter(".ui-state-disabled"),function(e){return i.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,i=this.tabs,s=this.anchors,n=this.panels;
this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(i,s){var n,a,o,r=e(s).uniqueId().attr("id"),h=e(s).closest("li"),l=h.attr("aria-controls");t._isLocal(s)?(n=s.hash,o=n.substring(1),a=t.element.find(t._sanitizeSelector(n))):(o=h.attr("aria-controls")||e({}).uniqueId()[0].id,n="#"+o,a=t.element.find(n),a.length||(a=t._createPanel(o),a.insertAfter(t.panels[i-1]||t.tablist)),a.attr("aria-live","polite")),a.length&&(t.panels=t.panels.add(a)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":o,"aria-labelledby":r}),a.attr("aria-labelledby",r)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i,s=0;i=this.tabs[s];s++)t===!0||-1!==e.inArray(s,t)?e(i).addClass("ui-state-disabled").attr("aria-disabled","true"):e(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,s=this.element.parent();"fill"===t?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),s=t.css("position");"absolute"!==s&&"fixed"!==s&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,e(this).height("").height())}).height(i))},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?e():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):e(),u={oldTab:s,oldPanel:l,newTab:r?e():a,newPanel:h};t.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",t,u)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?e():a,this.xhr&&this.xhr.abort(),l.length||h.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),t),this._toggle(t,u))},_toggle:function(t,i){function s(){a.running=!1,a._trigger("activate",t,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var i,s=this._findActive(t);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var i=this.options.disabled;i!==!1&&(void 0===t?i=!1:(t=this._getIndex(t),i=e.isArray(i)?e.map(i,function(e){return e!==t?e:null}):e.map(this.tabs,function(e,i){return i!==t?i:null})),this._setupDisabled(i))},disable:function(t){var i=this.options.disabled;if(i!==!0){if(void 0===t)i=!0;else{if(t=this._getIndex(t),-1!==e.inArray(t,i))return;i=e.isArray(i)?e.merge([t],i).sort():[t]}this._setupDisabled(i)}},load:function(t,i){t=this._getIndex(t);var s=this,n=this.tabs.eq(t),a=n.find(".ui-tabs-anchor"),o=this._getPanelForTab(n),r={tab:n,panel:o},h=function(e,t){"abort"===t&&s.panels.stop(!1,!0),n.removeClass("ui-tabs-loading"),o.removeAttr("aria-busy"),e===s.xhr&&delete s.xhr};this._isLocal(a[0])||(this.xhr=e.ajax(this._ajaxSettings(a,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(n.addClass("ui-tabs-loading"),o.attr("aria-busy","true"),this.xhr.done(function(e,t,n){setTimeout(function(){o.html(e),s._trigger("load",i,r),h(n,t)},1)}).fail(function(e,t){setTimeout(function(){h(e,t)},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href"),beforeSend:function(t,a){return n._trigger("beforeLoad",i,e.extend({jqXHR:t,ajaxSettings:a},s))}}},_getPanelForTab:function(t){var i=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),e.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var t=e(this).attr("title")||"";return e("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(t,i){var s=(t.attr("aria-describedby")||"").split(/\s+/);s.push(i),t.data("ui-tooltip-id",i).attr("aria-describedby",e.trim(s.join(" ")))},_removeDescribedBy:function(t){var i=t.data("ui-tooltip-id"),s=(t.attr("aria-describedby")||"").split(/\s+/),n=e.inArray(i,s);-1!==n&&s.splice(n,1),t.removeData("ui-tooltip-id"),s=e.trim(s.join(" ")),s?t.attr("aria-describedby",s):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=e("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(t,i){var s=this;return"disabled"===t?(this[i?"_disable":"_enable"](),this.options[t]=i,void 0):(this._super(t,i),"content"===t&&e.each(this.tooltips,function(e,t){s._updateContent(t.element)}),void 0)},_disable:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event("blur");n.target=n.currentTarget=s.element[0],t.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var i=this,s=e(t?t.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&s.parents().each(function(){var t,s=e(this);s.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,i.close(t,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(t,s),this._updateContent(s,t))},_updateContent:function(e,t){var i,s=this.options.content,n=this,a=t?t.type:null;return"string"==typeof s?this._open(t,e,s):(i=s.call(e[0],function(i){n._delay(function(){e.data("ui-tooltip-open")&&(t&&(t.type=a),this._open(t,e,i))})}),i&&this._open(t,e,i),void 0)},_open:function(t,i,s){function n(e){l.of=e,o.is(":hidden")||o.position(l)}var a,o,r,h,l=e.extend({},this.options.position);if(s){if(a=this._find(i))return a.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(t&&"mouseover"===t.type?i.attr("title",""):i.removeAttr("title")),a=this._tooltip(i),o=a.tooltip,this._addDescribedBy(i,o.attr("id")),o.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),s.clone?(h=s.clone(),h.removeAttr("id").find("[id]").removeAttr("id")):h=s,e("<div>").html(h).appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:n}),n(t)):o.position(e.extend({of:i},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){o.is(":visible")&&(n(l.of),clearInterval(r))},e.fx.interval)),this._trigger("open",t,{tooltip:o})}},_registerCloseHandlers:function(t,i){var s={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var s=e.Event(t);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),t&&"mouseover"!==t.type||(s.mouseleave="close"),t&&"focusin"!==t.type||(s.focusout="close"),this._on(!0,i,s)},close:function(t){var i,s=this,n=e(t?t.currentTarget:this.element),a=this._find(n);return a?(i=a.tooltip,a.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),a.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(e(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,i){e(i.element).attr("title",i.title),delete s.parents[t]}),a.closing=!0,this._trigger("close",t,{tooltip:i}),a.hiding||(a.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(t){var i=e("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),s=i.uniqueId().attr("id");return e("<div>").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[s]={element:t,tooltip:i}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event("blur"),a=s.element;n.target=n.currentTarget=a[0],t.close(n,!0),e("#"+i).remove(),a.data("ui-tooltip-title")&&(a.attr("title")||a.attr("title",a.data("ui-tooltip-title")),a.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})});
!function(a){"use strict";var b={pips:function(b){function c(b){var c,d,e,f,g,h=[],i=0;if(q&&q.length){for(e=l.element.slider("values"),f=a.map(e,function(a){return Math.abs(a-b)}),g=Math.min.apply(Math,f),c=0;c<f.length;c++)f[c]===g&&h.push(c);for(i=h[0],d=0;d<h.length;d++)l._lastChangedValue===h[d]&&(i=h[d]);l.options.range&&2===h.length&&(b>e[1]?i=h[1]:b<e[0]&&(i=h[0]))}return i}function d(){l.element.off(".selectPip").on("mousedown.slider",l.element.data("mousedown-original")).removeClass("ui-slider-pips").find(".ui-slider-pip").remove()}function e(b){if(!l.option("disabled")){var d=a(b).data("value"),e=c(d);q&&q.length?l.element.slider("values",e,d):l.element.slider("value",d),l._lastChangedValue=e}}function f(b){var c,d,e=b,f="ui-slider-pip",h="";"first"===b?e=0:"last"===b&&(e=r);var i=n+l.options.step*e,j=i.toString().replace(".","-");if(c="array"===a.type(t.labels)?t.labels[e]||"":"object"===a.type(t.labels)?"first"===b?t.labels.first||"":"last"===b?t.labels.last||"":"array"===a.type(t.labels.rest)?t.labels.rest[e-1]||"":i:i,"first"===b?(d="0%",f+=" ui-slider-pip-first",f+="label"===t.first?" ui-slider-pip-label":"",f+=!1===t.first?" ui-slider-pip-hide":""):"last"===b?(d="100%",f+=" ui-slider-pip-last",f+="label"===t.last?" ui-slider-pip-label":"",f+=!1===t.last?" ui-slider-pip-hide":""):(d=(100/r*b).toFixed(4)+"%",f+="label"===t.rest?" ui-slider-pip-label":"",f+=!1===t.rest?" ui-slider-pip-hide":""),f+=" ui-slider-pip-"+j,q&&q.length){for(g=0;g<q.length;g++)i===q[g]&&(f+=" ui-slider-pip-initial-"+(g+1),f+=" ui-slider-pip-selected-"+(g+1));l.options.range&&i>q[0]&&i<q[1]&&(f+=" ui-slider-pip-inrange")}else i===p&&(f+=" ui-slider-pip-initial",f+=" ui-slider-pip-selected"),l.options.range&&("min"===l.options.range&&p>i||"max"===l.options.range&&i>p)&&(f+=" ui-slider-pip-inrange");return h="horizontal"===l.options.orientation?"left: "+d:"bottom: "+d,'<span class="'+f+'" style="'+h+'"><span class="ui-slider-line"></span><span class="ui-slider-label" data-value="'+i+'">'+t.formatLabel(c)+"</span></span>"}var g,h,i,j,k,l=this,m="",n=l._valueMin(),o=l._valueMax(),p=l._value(),q=l._values(),r=(o-n)/l.options.step,s=l.element.find(".ui-slider-handle"),t={first:"label",last:"label",rest:"pip",labels:!1,prefix:"",suffix:"",step:r>100?Math.floor(.05*r):1,formatLabel:function(a){return this.prefix+a+this.suffix}};if("object"!==a.type(b)&&"undefined"!==a.type(b))return void("destroy"===b&&d());a.extend(t,b),l.options.pipStep=Math.round(t.step),l.element.off(".selectPip").addClass("ui-slider-pips").find(".ui-slider-pip").remove();var u={single:function(b){this.resetClasses(),k.filter(".ui-slider-pip-"+this.classLabel(b)).addClass("ui-slider-pip-selected"),l.options.range&&k.each(function(c,d){var e=a(d).children(".ui-slider-label").data("value");("min"===l.options.range&&b>e||"max"===l.options.range&&e>b)&&a(d).addClass("ui-slider-pip-inrange")})},range:function(b){for(this.resetClasses(),g=0;g<b.length;g++)k.filter(".ui-slider-pip-"+this.classLabel(b[g])).addClass("ui-slider-pip-selected-"+(g+1));l.options.range&&k.each(function(c,d){var e=a(d).children(".ui-slider-label").data("value");e>b[0]&&e<b[1]&&a(d).addClass("ui-slider-pip-inrange")})},classLabel:function(a){return a.toString().replace(".","-")},resetClasses:function(){var a=/(^|\s*)(ui-slider-pip-selected|ui-slider-pip-inrange)(-{1,2}\d+|\s|$)/gi;k.removeClass(function(b,c){return(c.match(a)||[]).join(" ")})}};for(m+=f("first"),i=1;r>i;i++)i%l.options.pipStep===0&&(m+=f(i));for(m+=f("last"),l.element.append(m),k=l.element.find(".ui-slider-pip"),j=a._data(l.element.get(0),"events").mousedown&&a._data(l.element.get(0),"events").mousedown.length?a._data(l.element.get(0),"events").mousedown:l.element.data("mousedown-handlers"),l.element.data("mousedown-handlers",j.slice()),h=0;h<j.length;h++)"slider"===j[h].namespace&&l.element.data("mousedown-original",j[h].handler);l.element.off("mousedown.slider").on("mousedown.selectPip",function(b){var d=a(b.target),f=c(d.data("value")),g=s.eq(f);if(g.addClass("ui-state-active"),d.is(".ui-slider-label"))e(d),l.element.one("mouseup.selectPip",function(){g.removeClass("ui-state-active").focus()});else{var h=l.element.data("mousedown-original");h(b)}}),l.element.on("slide.selectPip slidechange.selectPip",function(b,c){var d=a(this),e=d.slider("value"),f=d.slider("values");c&&(e=c.value,f=c.values),f&&f.length?u.range(f):u.single(e)})},"float":function(b){function c(){f.element.off(".sliderFloat").removeClass("ui-slider-float").find(".ui-slider-tip, .ui-slider-tip-label").remove()}function d(b){var c=[],d=a.map(b,function(a){return Math.ceil((a-g)/f.options.step)});if("array"===a.type(m.labels))for(e=0;e<b.length;e++)c[e]=m.labels[d[e]]||b[e];else if("object"===a.type(m.labels))for(e=0;e<b.length;e++)c[e]=b[e]===g?m.labels.first||g:b[e]===h?m.labels.last||h:"array"===a.type(m.labels.rest)?m.labels.rest[d[e]-1]||b[e]:b[e];else for(e=0;e<b.length;e++)c[e]=b[e];return c}var e,f=this,g=f._valueMin(),h=f._valueMax(),i=f._value(),j=f._values(),k=[],l=f.element.find(".ui-slider-handle"),m={handle:!0,pips:!1,labels:!1,prefix:"",suffix:"",event:"slidechange slide",formatLabel:function(a){return this.prefix+a+this.suffix}};if("object"!==a.type(b)&&"undefined"!==a.type(b))return void("destroy"===b&&c());if(a.extend(m,b),g>i&&(i=g),i>h&&(i=h),j&&j.length)for(e=0;e<j.length;e++)j[e]<g&&(j[e]=g),j[e]>h&&(j[e]=h);if(f.element.addClass("ui-slider-float").find(".ui-slider-tip, .ui-slider-tip-label").remove(),m.handle)for(k=d(j&&j.length?j:[i]),e=0;e<k.length;e++)l.eq(e).append(a('<span class="ui-slider-tip">'+m.formatLabel(k[e])+"</span>"));m.pips&&f.element.find(".ui-slider-label").each(function(b,c){var e,f,g=a(c),h=[g.data("value")];e=m.formatLabel(d(h)[0]),f=a('<span class="ui-slider-tip-label">'+e+"</span>").insertAfter(g)}),"slide"!==m.event&&"slidechange"!==m.event&&"slide slidechange"!==m.event&&"slidechange slide"!==m.event&&(m.event="slidechange slide"),f.element.off(".sliderFloat").on(m.event+".sliderFloat",function(b,c){var e="array"===a.type(c.value)?c.value:[c.value],f=m.formatLabel(d(e)[0]);a(c.handle).find(".ui-slider-tip").html(f)})}};a.extend(!0,a.ui.slider.prototype,b)}(jQuery);
+function($){'use strict';var Affix=function(element,options){this.options=$.extend({},Affix.DEFAULTS,options)
this.$target=$(this.options.target).on('scroll.bs.affix.data-api',$.proxy(this.checkPosition,this)).on('click.bs.affix.data-api',$.proxy(this.checkPositionWithEventLoop,this))
this.$element=$(element)
this.affixed=null
this.unpin=null
this.pinnedOffset=null
this.checkPosition()}
Affix.VERSION='3.3.6'
Affix.RESET='affix affix-top affix-bottom'
Affix.DEFAULTS={offset:0,target:window}
Affix.prototype.getState=function(scrollHeight,height,offsetTop,offsetBottom){var scrollTop=this.$target.scrollTop()
var position=this.$element.offset()
var targetHeight=this.$target.height()
if(offsetTop!=null&&this.affixed=='top')return scrollTop<offsetTop?'top':false
if(this.affixed=='bottom'){if(offsetTop!=null)return(scrollTop+this.unpin<=position.top)?false:'bottom'
return(scrollTop+targetHeight<=scrollHeight-offsetBottom)?false:'bottom'}var initializing=this.affixed==null
var colliderTop=initializing?scrollTop:position.top
var colliderHeight=initializing?targetHeight:height
if(offsetTop!=null&&scrollTop<=offsetTop)return'top'
if(offsetBottom!=null&&(colliderTop+colliderHeight>=scrollHeight-offsetBottom))return'bottom'
return false}
Affix.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset
this.$element.removeClass(Affix.RESET).addClass('affix')
var scrollTop=this.$target.scrollTop()
var position=this.$element.offset()
return(this.pinnedOffset=position.top-scrollTop)}
Affix.prototype.checkPositionWithEventLoop=function(){setTimeout($.proxy(this.checkPosition,this),1)}
Affix.prototype.checkPosition=function(){if(!this.$element.is(':visible'))return
var height=this.$element.height()
var offset=this.options.offset
var offsetTop=offset.top
var offsetBottom=offset.bottom
var scrollHeight=Math.max($(document).height(),$(document.body).height())
if(typeof offset!='object')offsetBottom=offsetTop=offset
if(typeof offsetTop=='function')offsetTop=offset.top(this.$element)
if(typeof offsetBottom=='function')offsetBottom=offset.bottom(this.$element)
var affix=this.getState(scrollHeight,height,offsetTop,offsetBottom)
if(this.affixed!=affix){if(this.unpin!=null)this.$element.css('top','')
var affixType='affix'+(affix?'-'+affix:'')
var e=$.Event(affixType+'.bs.affix')
this.$element.trigger(e)
if(e.isDefaultPrevented())return
this.affixed=affix
this.unpin=affix=='bottom'?this.getPinnedOffset():null
this.$element.removeClass(Affix.RESET).addClass(affixType).trigger(affixType.replace('affix','affixed')+'.bs.affix')}if(affix=='bottom'){this.$element.offset({top:scrollHeight-height-offsetBottom})}}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.affix')
var options=typeof option=='object'&&option
if(!data)$this.data('bs.affix',(data=new Affix(this,options)))
if(typeof option=='string')data[option]()})}var old=$.fn.affix
$.fn.affix=Plugin
$.fn.affix.Constructor=Affix
$.fn.affix.noConflict=function(){$.fn.affix=old
return this}
$(window).on('load',function(){$('[data-spy="affix"]').each(function(){var $spy=$(this)
var data=$spy.data()
data.offset=data.offset||{}
if(data.offsetBottom!=null)data.offset.bottom=data.offsetBottom
if(data.offsetTop!=null)data.offset.top=data.offsetTop
Plugin.call($spy,data)})})}(jQuery);
!function(t,e){t.fn.extend({scrollspy:function(n){var a={namespace:"scrollspy",activeClass:"active",animate:!1,offset:0,container:e};n=t.extend({},a,n);var o=function(t,e){return parseInt(t,10)+parseInt(e,10)},r=function(e){for(var n=[],a=0;a<e.length;a++){var o=e[a],r=t(o).attr("href"),f=t(r);if(f.length>0){var s=Math.floor(f.offset().top),i=s+Math.floor(f.outerHeight());n.push({element:f,hash:r,top:s,bottom:i})}}return n},f=function(e,n){for(var a=0;a<e.length;a++){var o=t(e[a]);if(o.attr("href")===n)return o}},s=function(e){for(var a=0;a<e.length;a++){var o=t(e[a]);o.parent().removeClass(n.activeClass)}};return this.each(function(){for(var a=this,i=t(n.container),l=t(a).find("a"),c=0;c<l.length;c++){var h=l[c];t(h).on("click",function(a){var r=t(this).attr("href"),f=t(r);if(f.length>0){var s=o(f.offset().top,n.offset);n.animate?t("html, body").animate({scrollTop:s},1e3):e.scrollTo(0,s),a.preventDefault()}})}var v=r(l);i.bind("scroll."+n.namespace,function(){for(var e,r={top:o(t(this).scrollTop(),Math.abs(n.offset)),left:t(this).scrollLeft()},i=0;i<v.length;i++){var c=v[i];if(r.top>=c.top&&r.top<c.bottom){var h=c.hash;if(e=f(l,h)){n.onChange&&n.onChange(c.element,t(a),r),s(l),e.parent().addClass(n.activeClass);break}}}!e&&n.onExit&&n.onExit(t(a),r)})})}})}(jQuery,window,document,void 0);
;(function($){$.flexslider=function(el,options){var slider=$(el);slider.vars=$.extend({},$.flexslider.defaults,options);var namespace=slider.vars.namespace,msGesture=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,touch=(("ontouchstart"in window)||msGesture||window.DocumentTouch&&document instanceof DocumentTouch)&&slider.vars.touch,eventType="click touchend MSPointerUp keyup",watchedEvent="",watchedEventClearTimer,vertical=slider.vars.direction==="vertical",reverse=slider.vars.reverse,carousel=(slider.vars.itemWidth>0),fade=slider.vars.animation==="fade",asNav=slider.vars.asNavFor!=="",methods={},focused=true;$.data(el,"flexslider",slider);methods={init:function(){slider.animating=false;slider.currentSlide=parseInt((slider.vars.startAt?slider.vars.startAt:0),10);if(isNaN(slider.currentSlide)){slider.currentSlide=0;}slider.animatingTo=slider.currentSlide;slider.atEnd=(slider.currentSlide===0||slider.currentSlide===slider.last);slider.containerSelector=slider.vars.selector.substr(0,slider.vars.selector.search(' '));slider.slides=$(slider.vars.selector,slider);slider.container=$(slider.containerSelector,slider);slider.count=slider.slides.length;slider.syncExists=$(slider.vars.sync).length>0;if(slider.vars.animation==="slide"){slider.vars.animation="swing";}slider.prop=(vertical)?"top":"marginLeft";slider.args={};slider.manualPause=false;slider.stopped=false;slider.started=false;slider.startTimeout=null;slider.transitions=!slider.vars.video&&!fade&&slider.vars.useCSS&&(function(){var obj=document.createElement('div'),props=['perspectiveProperty','WebkitPerspective','MozPerspective','OPerspective','msPerspective'];for(var i in props){if(obj.style[props[i]]!==undefined){slider.pfx=props[i].replace('Perspective','').toLowerCase();slider.prop="-"+slider.pfx+"-transform";return true;}}return false;}());slider.ensureAnimationEnd='';if(slider.vars.controlsContainer!=="")slider.controlsContainer=$(slider.vars.controlsContainer).length>0&&$(slider.vars.controlsContainer);if(slider.vars.manualControls!=="")slider.manualControls=$(slider.vars.manualControls).length>0&&$(slider.vars.manualControls);if(slider.vars.customDirectionNav!=="")slider.customDirectionNav=$(slider.vars.customDirectionNav).length===2&&$(slider.vars.customDirectionNav);if(slider.vars.randomize){slider.slides.sort(function(){return(Math.round(Math.random())-0.5);});slider.container.empty().append(slider.slides);}slider.doMath();slider.setup("init");if(slider.vars.controlNav){methods.controlNav.setup();}if(slider.vars.directionNav){methods.directionNav.setup();}if(slider.vars.keyboard&&($(slider.containerSelector).length===1||slider.vars.multipleKeyboard)){$(document).bind('keyup',function(event){var keycode=event.keyCode;if(!slider.animating&&(keycode===39||keycode===37)){var target=(keycode===39)?slider.getTarget('next'):(keycode===37)?slider.getTarget('prev'):false;slider.flexAnimate(target,slider.vars.pauseOnAction);}});}if(slider.vars.mousewheel){slider.bind('mousewheel',function(event,delta,deltaX,deltaY){event.preventDefault();var target=(delta<0)?slider.getTarget('next'):slider.getTarget('prev');slider.flexAnimate(target,slider.vars.pauseOnAction);});}if(slider.vars.pausePlay){methods.pausePlay.setup();}if(slider.vars.slideshow&&slider.vars.pauseInvisible){methods.pauseInvisible.init();}if(slider.vars.slideshow){if(slider.vars.pauseOnHover){slider.hover(function(){if(!slider.manualPlay&&!slider.manualPause){slider.pause();}},function(){if(!slider.manualPause&&!slider.manualPlay&&!slider.stopped){slider.play();}});}if(!slider.vars.pauseInvisible||!methods.pauseInvisible.isHidden()){(slider.vars.initDelay>0)?slider.startTimeout=setTimeout(slider.play,slider.vars.initDelay):slider.play();}}if(asNav){methods.asNav.setup();}if(touch&&slider.vars.touch){methods.touch();}if(!fade||(fade&&slider.vars.smoothHeight)){$(window).bind("resize orientationchange focus",methods.resize);}slider.find("img").attr("draggable","false");setTimeout(function(){slider.vars.start(slider);},200);},asNav:{setup:function(){slider.asNav=true;slider.animatingTo=Math.floor(slider.currentSlide/slider.move);slider.currentItem=slider.currentSlide;slider.slides.removeClass(namespace+"active-slide").eq(slider.currentItem).addClass(namespace+"active-slide");if(!msGesture){slider.slides.on(eventType,function(e){e.preventDefault();var $slide=$(this),target=$slide.index();var posFromLeft=$slide.offset().left-$(slider).scrollLeft();if(posFromLeft<=0&&$slide.hasClass(namespace+'active-slide')){slider.flexAnimate(slider.getTarget("prev"),true);}else if(!$(slider.vars.asNavFor).data('flexslider').animating&&!$slide.hasClass(namespace+"active-slide")){slider.direction=(slider.currentItem<target)?"next":"prev";slider.flexAnimate(target,slider.vars.pauseOnAction,false,true,true);}});}else{el._slider=slider;slider.slides.each(function(){var that=this;that._gesture=new MSGesture();that._gesture.target=that;that.addEventListener("MSPointerDown",function(e){e.preventDefault();if(e.currentTarget._gesture){e.currentTarget._gesture.addPointer(e.pointerId);}},false);that.addEventListener("MSGestureTap",function(e){e.preventDefault();var $slide=$(this),target=$slide.index();if(!$(slider.vars.asNavFor).data('flexslider').animating&&!$slide.hasClass('active')){slider.direction=(slider.currentItem<target)?"next":"prev";slider.flexAnimate(target,slider.vars.pauseOnAction,false,true,true);}});});}}},controlNav:{setup:function(){if(!slider.manualControls){methods.controlNav.setupPaging();}else{methods.controlNav.setupManual();}},setupPaging:function(){var type=(slider.vars.controlNav==="thumbnails")?'control-thumbs':'control-paging',j=1,item,slide;slider.controlNavScaffold=$('<ol class="'+namespace+'control-nav '+namespace+type+'"></ol>');if(slider.pagingCount>1){for(var i=0;i<slider.pagingCount;i++){slide=slider.slides.eq(i);item=(slider.vars.controlNav==="thumbnails")?'<img src="'+slide.attr('data-thumb')+'"/>':'<a>'+j+'</a>';if('thumbnails'===slider.vars.controlNav&&true===slider.vars.thumbCaptions){var captn=slide.attr('data-thumbcaption');if(''!==captn&&undefined!==captn){item+='<span class="'+namespace+'caption">'+captn+'</span>';}}slider.controlNavScaffold.append('<li>'+item+'</li>');j++;}}(slider.controlsContainer)?$(slider.controlsContainer).append(slider.controlNavScaffold):slider.append(slider.controlNavScaffold);methods.controlNav.set();methods.controlNav.active();slider.controlNavScaffold.delegate('a, img',eventType,function(event){event.preventDefault();if(watchedEvent===""||watchedEvent===event.type){var $this=$(this),target=slider.controlNav.index($this);if(!$this.hasClass(namespace+'active')){slider.direction=(target>slider.currentSlide)?"next":"prev";slider.flexAnimate(target,slider.vars.pauseOnAction);}}if(watchedEvent===""){watchedEvent=event.type;}methods.setToClearWatchedEvent();});},setupManual:function(){slider.controlNav=slider.manualControls;methods.controlNav.active();slider.controlNav.bind(eventType,function(event){event.preventDefault();if(watchedEvent===""||watchedEvent===event.type){var $this=$(this),target=slider.controlNav.index($this);if(!$this.hasClass(namespace+'active')){(target>slider.currentSlide)?slider.direction="next":slider.direction="prev";slider.flexAnimate(target,slider.vars.pauseOnAction);}}if(watchedEvent===""){watchedEvent=event.type;}methods.setToClearWatchedEvent();});},set:function(){var selector=(slider.vars.controlNav==="thumbnails")?'img':'a';slider.controlNav=$('.'+namespace+'control-nav li '+selector,(slider.controlsContainer)?slider.controlsContainer:slider);},active:function(){slider.controlNav.removeClass(namespace+"active").eq(slider.animatingTo).addClass(namespace+"active");},update:function(action,pos){if(slider.pagingCount>1&&action==="add"){slider.controlNavScaffold.append($('<li><a>'+slider.count+'</a></li>'));}else if(slider.pagingCount===1){slider.controlNavScaffold.find('li').remove();}else{slider.controlNav.eq(pos).closest('li').remove();}methods.controlNav.set();(slider.pagingCount>1&&slider.pagingCount!==slider.controlNav.length)?slider.update(pos,action):methods.controlNav.active();}},directionNav:{setup:function(){var directionNavScaffold=$('<ul class="'+namespace+'direction-nav"><li class="'+namespace+'nav-prev"><a class="'+namespace+'prev" href="#">'+slider.vars.prevText+'</a></li><li class="'+namespace+'nav-next"><a class="'+namespace+'next" href="#">'+slider.vars.nextText+'</a></li></ul>');if(slider.customDirectionNav){slider.directionNav=slider.customDirectionNav;}else if(slider.controlsContainer){$(slider.controlsContainer).append(directionNavScaffold);slider.directionNav=$('.'+namespace+'direction-nav li a',slider.controlsContainer);}else{slider.append(directionNavScaffold);slider.directionNav=$('.'+namespace+'direction-nav li a',slider);}methods.directionNav.update();slider.directionNav.bind(eventType,function(event){event.preventDefault();var target;if(watchedEvent===""||watchedEvent===event.type){target=($(this).hasClass(namespace+'next'))?slider.getTarget('next'):slider.getTarget('prev');slider.flexAnimate(target,slider.vars.pauseOnAction);}if(watchedEvent===""){watchedEvent=event.type;}methods.setToClearWatchedEvent();});},update:function(){var disabledClass=namespace+'disabled';if(slider.pagingCount===1){slider.directionNav.addClass(disabledClass).attr('tabindex','-1');}else if(!slider.vars.animationLoop){if(slider.animatingTo===0){slider.directionNav.removeClass(disabledClass).filter('.'+namespace+"prev").addClass(disabledClass).attr('tabindex','-1');}else if(slider.animatingTo===slider.last){slider.directionNav.removeClass(disabledClass).filter('.'+namespace+"next").addClass(disabledClass).attr('tabindex','-1');}else{slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');}}else{slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');}}},pausePlay:{setup:function(){var pausePlayScaffold=$('<div class="'+namespace+'pauseplay"><a></a></div>');if(slider.controlsContainer){slider.controlsContainer.append(pausePlayScaffold);slider.pausePlay=$('.'+namespace+'pauseplay a',slider.controlsContainer);}else{slider.append(pausePlayScaffold);slider.pausePlay=$('.'+namespace+'pauseplay a',slider);}methods.pausePlay.update((slider.vars.slideshow)?namespace+'pause':namespace+'play');slider.pausePlay.bind(eventType,function(event){event.preventDefault();if(watchedEvent===""||watchedEvent===event.type){if($(this).hasClass(namespace+'pause')){slider.manualPause=true;slider.manualPlay=false;slider.pause();}else{slider.manualPause=false;slider.manualPlay=true;slider.play();}}if(watchedEvent===""){watchedEvent=event.type;}methods.setToClearWatchedEvent();});},update:function(state){(state==="play")?slider.pausePlay.removeClass(namespace+'pause').addClass(namespace+'play').html(slider.vars.playText):slider.pausePlay.removeClass(namespace+'play').addClass(namespace+'pause').html(slider.vars.pauseText);}},touch:function(){var startX,startY,offset,cwidth,dx,startT,onTouchStart,onTouchMove,onTouchEnd,scrolling=false,localX=0,localY=0,accDx=0;if(!msGesture){onTouchStart=function(e){if(slider.animating){e.preventDefault();}else if((window.navigator.msPointerEnabled)||e.touches.length===1){slider.pause();cwidth=(vertical)?slider.h:slider.w;startT=Number(new Date());localX=e.touches[0].pageX;localY=e.touches[0].pageY;offset=(carousel&&reverse&&slider.animatingTo===slider.last)?0:(carousel&&reverse)?slider.limit-(((slider.itemW+slider.vars.itemMargin)*slider.move)*slider.animatingTo):(carousel&&slider.currentSlide===slider.last)?slider.limit:(carousel)?((slider.itemW+slider.vars.itemMargin)*slider.move)*slider.currentSlide:(reverse)?(slider.last-slider.currentSlide+slider.cloneOffset)*cwidth:(slider.currentSlide+slider.cloneOffset)*cwidth;startX=(vertical)?localY:localX;startY=(vertical)?localX:localY;el.addEventListener('touchmove',onTouchMove,false);el.addEventListener('touchend',onTouchEnd,false);}};onTouchMove=function(e){localX=e.touches[0].pageX;localY=e.touches[0].pageY;dx=(vertical)?startX-localY:startX-localX;scrolling=(vertical)?(Math.abs(dx)<Math.abs(localX-startY)):(Math.abs(dx)<Math.abs(localY-startY));var fxms=500;if(!scrolling||Number(new Date())-startT>fxms){e.preventDefault();if(!fade&&slider.transitions){if(!slider.vars.animationLoop){dx=dx/((slider.currentSlide===0&&dx<0||slider.currentSlide===slider.last&&dx>0)?(Math.abs(dx)/cwidth+2):1);}slider.setProps(offset+dx,"setTouch");}}};onTouchEnd=function(e){el.removeEventListener('touchmove',onTouchMove,false);if(slider.animatingTo===slider.currentSlide&&!scrolling&&!(dx===null)){var updateDx=(reverse)?-dx:dx,target=(updateDx>0)?slider.getTarget('next'):slider.getTarget('prev');if(slider.canAdvance(target)&&(Number(new Date())-startT<550&&Math.abs(updateDx)>50||Math.abs(updateDx)>cwidth/2)){slider.flexAnimate(target,slider.vars.pauseOnAction);}else{if(!fade){slider.flexAnimate(slider.currentSlide,slider.vars.pauseOnAction,true);}}}el.removeEventListener('touchend',onTouchEnd,false);startX=null;startY=null;dx=null;offset=null;};el.addEventListener('touchstart',onTouchStart,false);}else{el.style.msTouchAction="none";el._gesture=new MSGesture();el._gesture.target=el;el.addEventListener("MSPointerDown",onMSPointerDown,false);el._slider=slider;el.addEventListener("MSGestureChange",onMSGestureChange,false);el.addEventListener("MSGestureEnd",onMSGestureEnd,false);function onMSPointerDown(e){e.stopPropagation();if(slider.animating){e.preventDefault();}else{slider.pause();el._gesture.addPointer(e.pointerId);accDx=0;cwidth=(vertical)?slider.h:slider.w;startT=Number(new Date());offset=(carousel&&reverse&&slider.animatingTo===slider.last)?0:(carousel&&reverse)?slider.limit-(((slider.itemW+slider.vars.itemMargin)*slider.move)*slider.animatingTo):(carousel&&slider.currentSlide===slider.last)?slider.limit:(carousel)?((slider.itemW+slider.vars.itemMargin)*slider.move)*slider.currentSlide:(reverse)?(slider.last-slider.currentSlide+slider.cloneOffset)*cwidth:(slider.currentSlide+slider.cloneOffset)*cwidth;}}function onMSGestureChange(e){e.stopPropagation();var slider=e.target._slider;if(!slider){return;}var transX=-e.translationX,transY=-e.translationY;accDx=accDx+((vertical)?transY:transX);dx=accDx;scrolling=(vertical)?(Math.abs(accDx)<Math.abs(-transX)):(Math.abs(accDx)<Math.abs(-transY));if(e.detail===e.MSGESTURE_FLAG_INERTIA){setImmediate(function(){el._gesture.stop();});return;}if(!scrolling||Number(new Date())-startT>500){e.preventDefault();if(!fade&&slider.transitions){if(!slider.vars.animationLoop){dx=accDx/((slider.currentSlide===0&&accDx<0||slider.currentSlide===slider.last&&accDx>0)?(Math.abs(accDx)/cwidth+2):1);}slider.setProps(offset+dx,"setTouch");}}}function onMSGestureEnd(e){e.stopPropagation();var slider=e.target._slider;if(!slider){return;}if(slider.animatingTo===slider.currentSlide&&!scrolling&&!(dx===null)){var updateDx=(reverse)?-dx:dx,target=(updateDx>0)?slider.getTarget('next'):slider.getTarget('prev');if(slider.canAdvance(target)&&(Number(new Date())-startT<550&&Math.abs(updateDx)>50||Math.abs(updateDx)>cwidth/2)){slider.flexAnimate(target,slider.vars.pauseOnAction);}else{if(!fade){slider.flexAnimate(slider.currentSlide,slider.vars.pauseOnAction,true);}}}startX=null;startY=null;dx=null;offset=null;accDx=0;}}},resize:function(){if(!slider.animating&&slider.is(':visible')){if(!carousel){slider.doMath();}if(fade){methods.smoothHeight();}else if(carousel){slider.slides.width(slider.computedW);slider.update(slider.pagingCount);slider.setProps();}else if(vertical){slider.viewport.height(slider.h);slider.setProps(slider.h,"setTotal");}else{if(slider.vars.smoothHeight){methods.smoothHeight();}slider.newSlides.width(slider.computedW);slider.setProps(slider.computedW,"setTotal");}}},smoothHeight:function(dur){if(!vertical||fade){var $obj=(fade)?slider:slider.viewport;(dur)?$obj.animate({"height":slider.slides.eq(slider.animatingTo).height()},dur):$obj.height(slider.slides.eq(slider.animatingTo).height());}},sync:function(action){var $obj=$(slider.vars.sync).data("flexslider"),target=slider.animatingTo;switch(action){case"animate":$obj.flexAnimate(target,slider.vars.pauseOnAction,false,true);break;case"play":if(!$obj.playing&&!$obj.asNav){$obj.play();}break;case"pause":$obj.pause();break;}},uniqueID:function($clone){$clone.filter('[id]').add($clone.find('[id]')).each(function(){var $this=$(this);$this.attr('id',$this.attr('id')+'_clone');});return $clone;},pauseInvisible:{visProp:null,init:function(){var visProp=methods.pauseInvisible.getHiddenProp();if(visProp){var evtname=visProp.replace(/[H|h]idden/,'')+'visibilitychange';document.addEventListener(evtname,function(){if(methods.pauseInvisible.isHidden()){if(slider.startTimeout){clearTimeout(slider.startTimeout);}else{slider.pause();}}else{if(slider.started){slider.play();}else{if(slider.vars.initDelay>0){setTimeout(slider.play,slider.vars.initDelay);}else{slider.play();}}}});}},isHidden:function(){var prop=methods.pauseInvisible.getHiddenProp();if(!prop){return false;}return document[prop];},getHiddenProp:function(){var prefixes=['webkit','moz','ms','o'];if('hidden'in document){return'hidden';}for(var i=0;i<prefixes.length;i++){if((prefixes[i]+'Hidden')in document){return prefixes[i]+'Hidden';}}return null;}},setToClearWatchedEvent:function(){clearTimeout(watchedEventClearTimer);watchedEventClearTimer=setTimeout(function(){watchedEvent="";},3000);}};slider.flexAnimate=function(target,pause,override,withSync,fromNav){if(!slider.vars.animationLoop&&target!==slider.currentSlide){slider.direction=(target>slider.currentSlide)?"next":"prev";}if(asNav&&slider.pagingCount===1)slider.direction=(slider.currentItem<target)?"next":"prev";if(!slider.animating&&(slider.canAdvance(target,fromNav)||override)&&slider.is(":visible")){if(asNav&&withSync){var master=$(slider.vars.asNavFor).data('flexslider');slider.atEnd=target===0||target===slider.count-1;master.flexAnimate(target,true,false,true,fromNav);slider.direction=(slider.currentItem<target)?"next":"prev";master.direction=slider.direction;if(Math.ceil((target+1)/slider.visible)-1!==slider.currentSlide&&target!==0){slider.currentItem=target;slider.slides.removeClass(namespace+"active-slide").eq(target).addClass(namespace+"active-slide");target=Math.floor(target/slider.visible);}else{slider.currentItem=target;slider.slides.removeClass(namespace+"active-slide").eq(target).addClass(namespace+"active-slide");return false;}}slider.animating=true;slider.animatingTo=target;if(pause){slider.pause();}slider.vars.before(slider);if(slider.syncExists&&!fromNav){methods.sync("animate");}if(slider.vars.controlNav){methods.controlNav.active();}if(!carousel){slider.slides.removeClass(namespace+'active-slide').eq(target).addClass(namespace+'active-slide');}slider.atEnd=target===0||target===slider.last;if(slider.vars.directionNav){methods.directionNav.update();}if(target===slider.last){slider.vars.end(slider);if(!slider.vars.animationLoop){slider.pause();}}if(!fade){var dimension=(vertical)?slider.slides.filter(':first').height():slider.computedW,margin,slideString,calcNext;if(carousel){margin=slider.vars.itemMargin;calcNext=((slider.itemW+margin)*slider.move)*slider.animatingTo;slideString=(calcNext>slider.limit&&slider.visible!==1)?slider.limit:calcNext;}else if(slider.currentSlide===0&&target===slider.count-1&&slider.vars.animationLoop&&slider.direction!=="next"){slideString=(reverse)?(slider.count+slider.cloneOffset)*dimension:0;}else if(slider.currentSlide===slider.last&&target===0&&slider.vars.animationLoop&&slider.direction!=="prev"){slideString=(reverse)?0:(slider.count+1)*dimension;}else{slideString=(reverse)?((slider.count-1)-target+slider.cloneOffset)*dimension:(target+slider.cloneOffset)*dimension;}slider.setProps(slideString,"",slider.vars.animationSpeed);if(slider.transitions){if(!slider.vars.animationLoop||!slider.atEnd){slider.animating=false;slider.currentSlide=slider.animatingTo;}slider.container.unbind("webkitTransitionEnd transitionend");slider.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(slider.ensureAnimationEnd);slider.wrapup(dimension);});clearTimeout(slider.ensureAnimationEnd);slider.ensureAnimationEnd=setTimeout(function(){slider.wrapup(dimension);},slider.vars.animationSpeed+100);}else{slider.container.animate(slider.args,slider.vars.animationSpeed,slider.vars.easing,function(){slider.wrapup(dimension);});}}else{if(!touch){slider.slides.eq(slider.currentSlide).css({"zIndex":1}).animate({"opacity":0},slider.vars.animationSpeed,slider.vars.easing);slider.slides.eq(target).css({"zIndex":2}).animate({"opacity":1},slider.vars.animationSpeed,slider.vars.easing,slider.wrapup);}else{slider.slides.eq(slider.currentSlide).css({"opacity":0,"zIndex":1});slider.slides.eq(target).css({"opacity":1,"zIndex":2});slider.wrapup(dimension);}}if(slider.vars.smoothHeight){methods.smoothHeight(slider.vars.animationSpeed);}}};slider.wrapup=function(dimension){if(!fade&&!carousel){if(slider.currentSlide===0&&slider.animatingTo===slider.last&&slider.vars.animationLoop){slider.setProps(dimension,"jumpEnd");}else if(slider.currentSlide===slider.last&&slider.animatingTo===0&&slider.vars.animationLoop){slider.setProps(dimension,"jumpStart");}}slider.animating=false;slider.currentSlide=slider.animatingTo;slider.vars.after(slider);};slider.animateSlides=function(){if(!slider.animating&&focused){slider.flexAnimate(slider.getTarget("next"));}};slider.pause=function(){clearInterval(slider.animatedSlides);slider.animatedSlides=null;slider.playing=false;if(slider.vars.pausePlay){methods.pausePlay.update("play");}if(slider.syncExists){methods.sync("pause");}};slider.play=function(){if(slider.playing){clearInterval(slider.animatedSlides);}slider.animatedSlides=slider.animatedSlides||setInterval(slider.animateSlides,slider.vars.slideshowSpeed);slider.started=slider.playing=true;if(slider.vars.pausePlay){methods.pausePlay.update("pause");}if(slider.syncExists){methods.sync("play");}};slider.stop=function(){slider.pause();slider.stopped=true;};slider.canAdvance=function(target,fromNav){var last=(asNav)?slider.pagingCount-1:slider.last;return(fromNav)?true:(asNav&&slider.currentItem===slider.count-1&&target===0&&slider.direction==="prev")?true:(asNav&&slider.currentItem===0&&target===slider.pagingCount-1&&slider.direction!=="next")?false:(target===slider.currentSlide&&!asNav)?false:(slider.vars.animationLoop)?true:(slider.atEnd&&slider.currentSlide===0&&target===last&&slider.direction!=="next")?false:(slider.atEnd&&slider.currentSlide===last&&target===0&&slider.direction==="next")?false:true;};slider.getTarget=function(dir){slider.direction=dir;if(dir==="next"){return(slider.currentSlide===slider.last)?0:slider.currentSlide+1;}else{return(slider.currentSlide===0)?slider.last:slider.currentSlide-1;}};slider.setProps=function(pos,special,dur){var target=(function(){var posCheck=(pos)?pos:((slider.itemW+slider.vars.itemMargin)*slider.move)*slider.animatingTo,posCalc=(function(){if(carousel){return(special==="setTouch")?pos:(reverse&&slider.animatingTo===slider.last)?0:(reverse)?slider.limit-(((slider.itemW+slider.vars.itemMargin)*slider.move)*slider.animatingTo):(slider.animatingTo===slider.last)?slider.limit:posCheck;}else{switch(special){case"setTotal":return(reverse)?((slider.count-1)-slider.currentSlide+slider.cloneOffset)*pos:(slider.currentSlide+slider.cloneOffset)*pos;case"setTouch":return(reverse)?pos:pos;case"jumpEnd":return(reverse)?pos:slider.count*pos;case"jumpStart":return(reverse)?slider.count*pos:pos;default:return pos;}}}());return(posCalc*-1)+"px";}());if(slider.transitions){target=(vertical)?"translate3d(0,"+target+",0)":"translate3d("+target+",0,0)";dur=(dur!==undefined)?(dur/1000)+"s":"0s";slider.container.css("-"+slider.pfx+"-transition-duration",dur);slider.container.css("transition-duration",dur);}slider.args[slider.prop]=target;if(slider.transitions||dur===undefined){slider.container.css(slider.args);}slider.container.css('transform',target);};slider.setup=function(type){if(!fade){var sliderOffset,arr;if(type==="init"){slider.viewport=$('<div class="'+namespace+'viewport"></div>').css({"overflow":"hidden","position":"relative"}).appendTo(slider).append(slider.container);slider.cloneCount=0;slider.cloneOffset=0;if(reverse){arr=$.makeArray(slider.slides).reverse();slider.slides=$(arr);slider.container.empty().append(slider.slides);}}if(slider.vars.animationLoop&&!carousel){slider.cloneCount=2;slider.cloneOffset=1;if(type!=="init"){slider.container.find('.clone').remove();}slider.container.append(methods.uniqueID(slider.slides.first().clone().addClass('clone')).attr('aria-hidden','true')).prepend(methods.uniqueID(slider.slides.last().clone().addClass('clone')).attr('aria-hidden','true'));}slider.newSlides=$(slider.vars.selector,slider);sliderOffset=(reverse)?slider.count-1-slider.currentSlide+slider.cloneOffset:slider.currentSlide+slider.cloneOffset;if(vertical&&!carousel){slider.container.height((slider.count+slider.cloneCount)*200+"%").css("position","absolute").width("100%");setTimeout(function(){slider.newSlides.css({"display":"block"});slider.doMath();slider.viewport.height(slider.h);slider.setProps(sliderOffset*slider.h,"init");},(type==="init")?100:0);}else{slider.container.width((slider.count+slider.cloneCount)*200+"%");slider.setProps(sliderOffset*slider.computedW,"init");setTimeout(function(){slider.doMath();slider.newSlides.css({"width":slider.computedW,"float":"left","display":"block"});if(slider.vars.smoothHeight){methods.smoothHeight();}},(type==="init")?100:0);}}else{slider.slides.css({"width":"100%","float":"left","marginRight":"-100%","position":"relative"});if(type==="init"){if(!touch){if(slider.vars.fadeFirstSlide==false){slider.slides.css({"opacity":0,"display":"block","zIndex":1}).eq(slider.currentSlide).css({"zIndex":2}).css({"opacity":1});}else{slider.slides.css({"opacity":0,"display":"block","zIndex":1}).eq(slider.currentSlide).css({"zIndex":2}).animate({"opacity":1},slider.vars.animationSpeed,slider.vars.easing);}}else{slider.slides.css({"opacity":0,"display":"block","webkitTransition":"opacity "+slider.vars.animationSpeed/1000+"s ease","zIndex":1}).eq(slider.currentSlide).css({"opacity":1,"zIndex":2});}}if(slider.vars.smoothHeight){methods.smoothHeight();}}if(!carousel){slider.slides.removeClass(namespace+"active-slide").eq(slider.currentSlide).addClass(namespace+"active-slide");}slider.vars.init(slider);};slider.doMath=function(){var slide=slider.slides.first(),slideMargin=slider.vars.itemMargin,minItems=slider.vars.minItems,maxItems=slider.vars.maxItems;slider.w=(slider.viewport===undefined)?slider.width():slider.viewport.width();slider.h=slide.height();slider.boxPadding=slide.outerWidth()-slide.width();if(carousel){slider.itemT=slider.vars.itemWidth+slideMargin;slider.minW=(minItems)?minItems*slider.itemT:slider.w;slider.maxW=(maxItems)?(maxItems*slider.itemT)-slideMargin:slider.w;slider.itemW=(slider.minW>slider.w)?(slider.w-(slideMargin*(minItems-1)))/minItems:(slider.maxW<slider.w)?(slider.w-(slideMargin*(maxItems-1)))/maxItems:(slider.vars.itemWidth>slider.w)?slider.w:slider.vars.itemWidth;slider.visible=Math.floor(slider.w/(slider.itemW));slider.move=(slider.vars.move>0&&slider.vars.move<slider.visible)?slider.vars.move:slider.visible;slider.pagingCount=Math.ceil(((slider.count-slider.visible)/slider.move)+1);slider.last=slider.pagingCount-1;slider.limit=(slider.pagingCount===1)?0:(slider.vars.itemWidth>slider.w)?(slider.itemW*(slider.count-1))+(slideMargin*(slider.count-1)):((slider.itemW+slideMargin)*slider.count)-slider.w-slideMargin;}else{slider.itemW=slider.w;slider.pagingCount=slider.count;slider.last=slider.count-1;}slider.computedW=slider.itemW-slider.boxPadding;};slider.update=function(pos,action){slider.doMath();if(!carousel){if(pos<slider.currentSlide){slider.currentSlide+=1;}else if(pos<=slider.currentSlide&&pos!==0){slider.currentSlide-=1;}slider.animatingTo=slider.currentSlide;}if(slider.vars.controlNav&&!slider.manualControls){if((action==="add"&&!carousel)||slider.pagingCount>slider.controlNav.length){methods.controlNav.update("add");}else if((action==="remove"&&!carousel)||slider.pagingCount<slider.controlNav.length){if(carousel&&slider.currentSlide>slider.last){slider.currentSlide-=1;slider.animatingTo-=1;}methods.controlNav.update("remove",slider.last);}}if(slider.vars.directionNav){methods.directionNav.update();}};slider.addSlide=function(obj,pos){var $obj=$(obj);slider.count+=1;slider.last=slider.count-1;if(vertical&&reverse){(pos!==undefined)?slider.slides.eq(slider.count-pos).after($obj):slider.container.prepend($obj);}else{(pos!==undefined)?slider.slides.eq(pos).before($obj):slider.container.append($obj);}slider.update(pos,"add");slider.slides=$(slider.vars.selector+':not(.clone)',slider);slider.setup();slider.vars.added(slider);};slider.removeSlide=function(obj){var pos=(isNaN(obj))?slider.slides.index($(obj)):obj;slider.count-=1;slider.last=slider.count-1;if(isNaN(obj)){$(obj,slider.slides).remove();}else{(vertical&&reverse)?slider.slides.eq(slider.last).remove():slider.slides.eq(obj).remove();}slider.doMath();slider.update(pos,"remove");slider.slides=$(slider.vars.selector+':not(.clone)',slider);slider.setup();slider.vars.removed(slider);};methods.init();};$(window).blur(function(e){focused=false;}).focus(function(e){focused=true;});$.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:false,animationLoop:true,smoothHeight:false,startAt:0,slideshow:true,slideshowSpeed:7000,animationSpeed:600,initDelay:0,randomize:false,fadeFirstSlide:true,thumbCaptions:false,pauseOnAction:true,pauseOnHover:false,pauseInvisible:true,useCSS:true,touch:true,video:false,controlNav:true,directionNav:true,prevText:"Previous",nextText:"Next",keyboard:true,multipleKeyboard:false,mousewheel:false,pausePlay:false,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:true,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}};$.fn.flexslider=function(options){if(options===undefined){options={};}if(typeof options==="object"){return this.each(function(){var $this=$(this),selector=(options.selector)?options.selector:".slides > li",$slides=$this.find(selector);if(($slides.length===1&&options.allowOneSlide===true)||$slides.length===0){$slides.fadeIn(400);if(options.start){options.start($this);}}else if($this.data('flexslider')===undefined){new $.flexslider(this,options);}});}else{var $slider=$(this).data('flexslider');switch(options){case"play":$slider.play();break;case"pause":$slider.pause();break;case"stop":$slider.stop();break;case"next":$slider.flexAnimate($slider.getTarget("next"),true);break;case"prev":case"previous":$slider.flexAnimate($slider.getTarget("prev"),true);break;default:if(typeof options==="number"){$slider.flexAnimate(options,true);}}}};})(jQuery);
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",b.ev=c.mainEl&&c.mainEl.length?c.mainEl.eq(0):d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.wrap.css(b.fixedContentPos?{overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}:{top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),b.currTemplate[d]=f?a(f):!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||2!==c.which&&!c.ctrlKey&&!c.metaKey){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()});
(function(d){var g=-1,e=-1,n=function(a){var b=null,c=[];d(a).each(function(){var a=d(this),k=a.offset().top-h(a.css("margin-top")),l=0<c.length?c[c.length-1]:null;null===l?c.push(a):1>=Math.floor(Math.abs(b-k))?c[c.length-1]=l.add(a):c.push(a);b=k});return c},h=function(a){return parseFloat(a)||0},b=d.fn.matchHeight=function(a){if("remove"===a){var f=this;this.css("height","");d.each(b._groups,function(a,b){b.elements=b.elements.not(f)});return this}if(1>=this.length)return this;a="undefined"!==
typeof a?a:!0;b._groups.push({elements:this,byRow:a});b._apply(this,a);return this};b._groups=[];b._throttle=80;b._maintainScroll=!1;b._beforeUpdate=null;b._afterUpdate=null;b._apply=function(a,f){var c=d(a),e=[c],k=d(window).scrollTop(),l=d("html").outerHeight(!0),g=c.parents().filter(":hidden");g.css("display","block");f&&(c.each(function(){var a=d(this),b="inline-block"===a.css("display")?"inline-block":"block";a.data("style-cache",a.attr("style"));a.css({display:b,"padding-top":"0","padding-bottom":"0",
"margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px"})}),e=n(c),c.each(function(){var a=d(this);a.attr("style",a.data("style-cache")||"").css("height","")}));d.each(e,function(a,b){var c=d(b),e=0;f&&1>=c.length||(c.each(function(){var a=d(this),b="inline-block"===a.css("display")?"inline-block":"block";a.css({display:b,height:""});a.outerHeight(!1)>e&&(e=a.outerHeight(!1));a.css("display","")}),c.each(function(){var a=d(this),b=0;"border-box"!==a.css("box-sizing")&&
(b+=h(a.css("border-top-width"))+h(a.css("border-bottom-width")),b+=h(a.css("padding-top"))+h(a.css("padding-bottom")));a.css("height",e-b)}))});g.css("display","");b._maintainScroll&&d(window).scrollTop(k/l*d("html").outerHeight(!0));return this};b._applyDataApi=function(){var a={};d("[data-match-height], [data-mh]").each(function(){var b=d(this),c=b.attr("data-match-height")||b.attr("data-mh");a[c]=c in a?a[c].add(b):b});d.each(a,function(){this.matchHeight(!0)})};var m=function(a){b._beforeUpdate&&
b._beforeUpdate(a,b._groups);d.each(b._groups,function(){b._apply(this.elements,this.byRow)});b._afterUpdate&&b._afterUpdate(a,b._groups)};b._update=function(a,f){if(f&&"resize"===f.type){var c=d(window).width();if(c===g)return;g=c}a?-1===e&&(e=setTimeout(function(){m(f);e=-1},b._throttle)):m(f)};d(b._applyDataApi);d(window).bind("load",function(a){b._update(!1,a)});d(window).bind("resize orientationchange",function(a){b._update(!0,a)})})(jQuery);
!function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){"use strict";function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;b<a.length;b+=1)c.push(a[b].listener);return c},d.getListenersAsObject=function(a){var b,c=this.getListeners(a);return c instanceof Array&&(b={},b[a]=c),b||c},d.addListener=function(a,c){var d,e=this.getListenersAsObject(a),f="object"==typeof c;for(d in e)e.hasOwnProperty(d)&&-1===b(e[d],c)&&e[d].push(f?c:{listener:c,once:!1});return this},d.on=c("addListener"),d.addOnceListener=function(a,b){return this.addListener(a,{listener:b,once:!0})},d.once=c("addOnceListener"),d.defineEvent=function(a){return this.getListeners(a),this},d.defineEvents=function(a){for(var b=0;b<a.length;b+=1)this.defineEvent(a[b]);return this},d.removeListener=function(a,c){var d,e,f=this.getListenersAsObject(a);for(e in f)f.hasOwnProperty(e)&&(d=b(f[e],c),-1!==d&&f[e].splice(d,1));return this},d.off=c("removeListener"),d.addListeners=function(a,b){return this.manipulateListeners(!1,a,b)},d.removeListeners=function(a,b){return this.manipulateListeners(!0,a,b)},d.manipulateListeners=function(a,b,c){var d,e,f=a?this.removeListener:this.addListener,g=a?this.removeListeners:this.addListeners;if("object"!=typeof b||b instanceof RegExp)for(d=c.length;d--;)f.call(this,b,c[d]);else for(d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e?f.call(this,d,e):g.call(this,d,e));return this},d.removeEvent=function(a){var b,c=typeof a,d=this._getEvents();if("string"===c)delete d[a];else if(a instanceof RegExp)for(b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b];else delete this._events;return this},d.removeAllListeners=c("removeEvent"),d.emitEvent=function(a,b){var c,d,e,f,g=this.getListenersAsObject(a);for(e in g)if(g.hasOwnProperty(e))for(d=g[e].length;d--;)c=g[e][d],c.once===!0&&this.removeListener(a,c.listener),f=c.listener.apply(this,b||[]),f===this._getOnceReturnValue()&&this.removeListener(a,c.listener);return this},d.trigger=c("emitEvent"),d.emit=function(a){var b=Array.prototype.slice.call(arguments,1);return this.emitEvent(a,b)},d.setOnceReturnValue=function(a){return this._onceReturnValue=a,this},d._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},d._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return e.EventEmitter=f,a},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:e.EventEmitter=a}.call(this),function(a){function b(a){if(a){if("string"==typeof d[a])return a;a=a.charAt(0).toUpperCase()+a.slice(1);for(var b,e=0,f=c.length;f>e;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a,b){function c(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function d(){}function e(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=h.length;c>b;b++){var d=h[b];a[d]=0}return a}function f(b){function d(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||g("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=b("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var f=document.body||document.documentElement;f.appendChild(e);var h=j(e);l=200===c(h.width),f.removeChild(e)}}}function f(a){if(d(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var b=j(a);if("none"===b.display)return e();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var g=f.isBorderBox=!(!k||!b[k]||"border-box"!==b[k]),m=0,n=h.length;n>m;m++){var o=h[m],p=b[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=g&&l,y=c(b.width);y!==!1&&(f.width=y+(x?0:r+v));var z=c(b.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return f}var g="undefined"==typeof console?d:function(a){console.error(a)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],f):"object"==typeof exports?module.exports=f(require("desandro-get-style-property")):a.getSize=f(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){"use strict";function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"use strict";"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c}var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)}return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){"use strict";function f(a){for(var b in a)return!1;return b=null,!0}function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}function h(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var i=a.getComputedStyle,j=i?function(a){return i(a,null)}:function(a){return a.currentStyle},k=d("transition"),l=d("transform"),m=k&&l,n=!!d("perspective"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[k],p=["transform","transition","transitionDuration","transitionProperty"],q=function(){for(var a={},b=0,c=p.length;c>b;b++){var e=p[b],f=d(e);f&&f!==e&&(a[e]=f)}return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=q[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=j(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=a[c?"left":"right"],f=a[d?"top":"bottom"],g=this.layout.size,h=-1!=e.indexOf("%")?parseFloat(e)/100*g.width:parseInt(e,10),i=-1!=f.indexOf("%")?parseFloat(f)/100*g.height:parseInt(f,10);h=isNaN(h)?0:h,i=isNaN(i)?0:i,h-=c?g.paddingLeft:g.paddingRight,i-=d?g.paddingTop:g.paddingBottom,this.position.x=h,this.position.y=i},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];c[e]=this.getXValue(g),c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];c[i]=this.getYValue(k),c[j]="",this.css(c),this.emitEvent("layout",[this])},g.prototype.getXValue=function(a){var b=this.layout.options;return b.percentPosition&&!b.isHorizontal?a/this.layout.size.width*100+"%":a+"px"},g.prototype.getYValue=function(a){var b=this.layout.options;return b.percentPosition&&b.isHorizontal?a/this.layout.size.height*100+"%":a+"px"},g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={};j.transform=this.getTranslate(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.getTranslate=function(a,b){var c=this.layout.options;return a=c.isOriginLeft?a:-a,b=c.isOriginTop?b:-b,n?"translate3d("+a+"px, "+b+"px, 0)":"translate("+a+"px, "+b+"px)"},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=m?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r="opacity,"+h(q.transform||"transform");g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(o,this,!1))},g.prototype.transition=g.prototype[k?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]}this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!k||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){"use strict";function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)}this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.dispatchEvent(a+"Complete",null,[b])}function d(){g++,g===f&&c()}var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.dispatchEvent=function(a,b,c){var d=b?[b].concat(c):c;if(this.emitEvent(a,d),i)if(this.$element=this.$element||i(this.element),b){var e=i.Event(b);e.type=a,this.$element.trigger(e,c)}else this.$element.trigger(a,c)},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)}return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)}return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],b):"object"==typeof exports?module.exports=b(require("outlayer")):(a.Isotope=a.Isotope||{},a.Isotope.Item=b(a.Outlayer))}(window,function(a){"use strict";function b(){a.Item.apply(this,arguments)}b.prototype=new a.Item,b.prototype._create=function(){this.id=this.layout.itemGUID++,a.Item.prototype._create.call(this),this.sortData={}},b.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var a=this.layout.options.getSortData,b=this.layout._sorters;for(var c in a){var d=b[c];this.sortData[c]=d(this.element,this)}}};var c=b.prototype.destroy;return b.prototype.destroy=function(){c.apply(this,arguments),this.css({display:""})},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],b):"object"==typeof exports?module.exports=b(require("get-size"),require("outlayer")):(a.Isotope=a.Isotope||{},a.Isotope.LayoutMode=b(a.getSize,a.Outlayer))}(window,function(a,b){"use strict";function c(a){this.isotope=a,a&&(this.options=a.options[this.namespace],this.element=a.element,this.items=a.filteredItems,this.size=a.size)}return function(){function a(a){return function(){return b.prototype[a].apply(this.isotope,arguments)}}for(var d=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],e=0,f=d.length;f>e;e++){var g=d[e];c.prototype[g]=a(g)}}(),c.prototype.needsVerticalResizeLayout=function(){var b=a(this.isotope.element),c=this.isotope.size&&b;return c&&b.innerHeight!=this.isotope.size.innerHeight},c.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},c.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},c.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},c.prototype.getSegmentSize=function(a,b){var c=a+b,d="outer"+b;if(this._getMeasurement(c,d),!this[c]){var e=this.getFirstItemSize();this[c]=e&&e[d]||this.isotope.size["inner"+b]}},c.prototype.getFirstItemSize=function(){var b=this.isotope.filteredItems[0];return b&&b.element&&a(b.element)},c.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},c.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},c.modes={},c.create=function(a,b){function d(){c.apply(this,arguments)}return d.prototype=new c,b&&(d.options=b),d.prototype.namespace=a,c.modes[a]=d,d},c}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],b):"object"==typeof exports?module.exports=b(require("../layout-mode"),require("masonry-layout")):b(a.Isotope.LayoutMode,a.Masonry)}(window,function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}var d=a.create("masonry"),e=d.prototype._getElementOffset,f=d.prototype.layout,g=d.prototype._getMeasurement;
c(d.prototype,b.prototype),d.prototype._getElementOffset=e,d.prototype.layout=f,d.prototype._getMeasurement=g;var h=d.prototype.measureColumns;d.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,h.call(this)};var i=d.prototype._manageStamp;return d.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,i.apply(this,arguments)},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],b):"object"==typeof exports?module.exports=b(require("../layout-mode")):b(a.Isotope.LayoutMode)}(window,function(a){"use strict";var b=a.create("fitRows");return b.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},b.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth+this.gutter,c=this.isotope.size.innerWidth+this.gutter;0!==this.x&&b+this.x>c&&(this.x=0,this.y=this.maxY);var d={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+a.size.outerHeight),this.x+=b,d},b.prototype._getContainerSize=function(){return{height:this.maxY}},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],b):"object"==typeof exports?module.exports=b(require("../layout-mode")):b(a.Isotope.LayoutMode)}(window,function(a){"use strict";var b=a.create("vertical",{horizontalAlignment:0});return b.prototype._resetLayout=function(){this.y=0},b.prototype._getItemLayoutPosition=function(a){a.getSize();var b=(this.isotope.size.innerWidth-a.size.outerWidth)*this.options.horizontalAlignment,c=this.y;return this.y+=a.size.outerHeight,{x:b,y:c}},b.prototype._getContainerSize=function(){return{height:this.y}},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","fizzy-ui-utils/utils","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],function(c,d,e,f,g,h){return b(a,c,d,e,f,g,h)}):"object"==typeof exports?module.exports=b(a,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("./item"),require("./layout-mode"),require("./layout-modes/masonry"),require("./layout-modes/fit-rows"),require("./layout-modes/vertical")):a.Isotope=b(a,a.Outlayer,a.getSize,a.matchesSelector,a.fizzyUIUtils,a.Isotope.Item,a.Isotope.LayoutMode)}(window,function(a,b,c,d,e,f,g){function h(a,b){return function(c,d){for(var e=0,f=a.length;f>e;e++){var g=a[e],h=c.sortData[g],i=d.sortData[g];if(h>i||i>h){var j=void 0!==b[g]?b[g]:b,k=j?1:-1;return(h>i?1:-1)*k}}return 0}}var i=a.jQuery,j=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s+|\s+$/g,"")},k=document.documentElement,l=k.textContent?function(a){return a.textContent}:function(a){return a.innerText},m=b.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});m.Item=f,m.LayoutMode=g,m.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),b.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var a in g.modes)this._initLayoutMode(a)},m.prototype.reloadItems=function(){this.itemGUID=0,b.prototype.reloadItems.call(this)},m.prototype._itemize=function(){for(var a=b.prototype._itemize.apply(this,arguments),c=0,d=a.length;d>c;c++){var e=a[c];e.id=this.itemGUID++}return this._updateItemsSortData(a),a},m.prototype._initLayoutMode=function(a){var b=g.modes[a],c=this.options[a]||{};this.options[a]=b.options?e.extend(b.options,c):c,this.modes[a]=new b(this)},m.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?void this.arrange():void this._layout()},m.prototype._layout=function(){var a=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,a),this._isLayoutInited=!0},m.prototype.arrange=function(a){function b(){d.reveal(c.needReveal),d.hide(c.needHide)}this.option(a),this._getIsInstant();var c=this._filter(this.items);this.filteredItems=c.matches;var d=this;this._bindArrangeComplete(),this._isInstant?this._noTransition(b):b(),this._sort(),this._layout()},m.prototype._init=m.prototype.arrange,m.prototype._getIsInstant=function(){var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=a,a},m.prototype._bindArrangeComplete=function(){function a(){b&&c&&d&&e.dispatchEvent("arrangeComplete",null,[e.filteredItems])}var b,c,d,e=this;this.once("layoutComplete",function(){b=!0,a()}),this.once("hideComplete",function(){c=!0,a()}),this.once("revealComplete",function(){d=!0,a()})},m.prototype._filter=function(a){var b=this.options.filter;b=b||"*";for(var c=[],d=[],e=[],f=this._getFilterTest(b),g=0,h=a.length;h>g;g++){var i=a[g];if(!i.isIgnored){var j=f(i);j&&c.push(i),j&&i.isHidden?d.push(i):j||i.isHidden||e.push(i)}}return{matches:c,needReveal:d,needHide:e}},m.prototype._getFilterTest=function(a){return i&&this.options.isJQueryFiltering?function(b){return i(b.element).is(a)}:"function"==typeof a?function(b){return a(b.element)}:function(b){return d(b.element,a)}},m.prototype.updateSortData=function(a){var b;a?(a=e.makeArray(a),b=this.getItems(a)):b=this.items,this._getSorters(),this._updateItemsSortData(b)},m.prototype._getSorters=function(){var a=this.options.getSortData;for(var b in a){var c=a[b];this._sorters[b]=n(c)}},m.prototype._updateItemsSortData=function(a){for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.updateSortData()}};var n=function(){function a(a){if("string"!=typeof a)return a;var c=j(a).split(" "),d=c[0],e=d.match(/^\[(.+)\]$/),f=e&&e[1],g=b(f,d),h=m.sortDataParsers[c[1]];return a=h?function(a){return a&&h(g(a))}:function(a){return a&&g(a)}}function b(a,b){var c;return c=a?function(b){return b.getAttribute(a)}:function(a){var c=a.querySelector(b);return c&&l(c)}}return a}();m.sortDataParsers={parseInt:function(a){return parseInt(a,10)},parseFloat:function(a){return parseFloat(a)}},m.prototype._sort=function(){var a=this.options.sortBy;if(a){var b=[].concat.apply(a,this.sortHistory),c=h(b,this.options.sortAscending);this.filteredItems.sort(c),a!=this.sortHistory[0]&&this.sortHistory.unshift(a)}},m.prototype._mode=function(){var a=this.options.layoutMode,b=this.modes[a];if(!b)throw new Error("No layout mode: "+a);return b.options=this.options[a],b},m.prototype._resetLayout=function(){b.prototype._resetLayout.call(this),this._mode()._resetLayout()},m.prototype._getItemLayoutPosition=function(a){return this._mode()._getItemLayoutPosition(a)},m.prototype._manageStamp=function(a){this._mode()._manageStamp(a)},m.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},m.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},m.prototype.appended=function(a){var b=this.addItems(a);if(b.length){var c=this._filterRevealAdded(b);this.filteredItems=this.filteredItems.concat(c)}},m.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){this._resetLayout(),this._manageStamps();var c=this._filterRevealAdded(b);this.layoutItems(this.filteredItems),this.filteredItems=c.concat(this.filteredItems),this.items=b.concat(this.items)}},m.prototype._filterRevealAdded=function(a){var b=this._filter(a);return this.hide(b.needHide),this.reveal(b.matches),this.layoutItems(b.matches,!0),b.matches},m.prototype.insert=function(a){var b=this.addItems(a);if(b.length){var c,d,e=b.length;for(c=0;e>c;c++)d=b[c],this.element.appendChild(d.element);var f=this._filter(b).matches;for(c=0;e>c;c++)b[c].isLayoutInstant=!0;for(this.arrange(),c=0;e>c;c++)delete b[c].isLayoutInstant;this.reveal(f)}};var o=m.prototype.remove;return m.prototype.remove=function(a){a=e.makeArray(a);var b=this.getItems(a);o.call(this,a);var c=b&&b.length;if(c)for(var d=0;c>d;d++){var f=b[d];e.removeFrom(this.filteredItems,f)}},m.prototype.shuffle=function(){for(var a=0,b=this.items.length;b>a;a++){var c=this.items[a];c.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},m.prototype._noTransition=function(a){var b=this.options.transitionDuration;this.options.transitionDuration=0;var c=a.call(this);return this.options.transitionDuration=b,c},m.prototype.getFilteredItemElements=function(){for(var a=[],b=0,c=this.filteredItems.length;c>b;b++)a.push(this.filteredItems[b].element);return a},m});
(function(e,t,n,r){"use strict";var i="cbp",s="."+i;if(typeof Object.create!=="function"){Object.create=function(e){function t(){}t.prototype=e;return new t}}e.expr[":"].uncached=function(t){if(!e(t).is('img[src!=""]')){return false}var n=new Image;n.src=t.src;return!n.complete};var o={init:function(e,t){var n=this,r;n.cubeportfolio=e;n.type=t;n.isOpen=false;n.options=n.cubeportfolio.options;if(t==="singlePageInline"){n.matrice=[-1,-1];n.height=0;n._createMarkupSinglePageInline();return}n._createMarkup();if(n.options.singlePageDeeplinking&&t==="singlePage"){n.url=location.href;if(n.url.slice(-1)=="#"){n.url=n.url.slice(0,-1)}r=n.cubeportfolio.blocksAvailable.find(n.options.singlePageDelegate).filter(function(e){return n.url.split("#cbp=")[1]===this.getAttribute("href")})[0];if(r){n.url=n.url.replace(/#cbp=(.+)/ig,"");n.openSinglePage(n.cubeportfolio.blocksAvailable,r)}}},_createMarkup:function(){var t=this;t.wrap=e("<div/>",{"class":"cbp-popup-wrap cbp-popup-"+t.type,"data-action":t.type==="lightbox"?"close":""}).on("click"+s,function(n){if(t.stopEvents){return}var r=e(n.target).attr("data-action");if(r){t[r]();n.preventDefault()}});t.content=e("<div/>",{"class":"cbp-popup-content"}).appendTo(t.wrap);e("<div/>",{"class":"cbp-popup-loadingBox"}).appendTo(t.wrap);if(t.cubeportfolio.browser==="ie8"){t.bg=e("<div/>",{"class":"cbp-popup-ie8bg","data-action":t.type==="lightbox"?"close":""}).appendTo(t.wrap)}t.navigationWrap=e("<div/>",{"class":"cbp-popup-navigation-wrap"}).appendTo(t.wrap);t.navigation=e("<div/>",{"class":"cbp-popup-navigation"}).appendTo(t.navigationWrap);t.closeButton=e("<button/>",{"class":"cbp-popup-close",title:"Close (Esc arrow key)",type:"button","data-action":"close"}).appendTo(t.navigation);t.nextButton=e("<button/>",{"class":"cbp-popup-next",title:"Next (Right arrow key)",type:"button","data-action":"next"}).appendTo(t.navigation);t.prevButton=e("<button/>",{"class":"cbp-popup-prev",title:"Previous (Left arrow key)",type:"button","data-action":"prev"}).appendTo(t.navigation);if(t.type==="singlePage"){if(t.options.singlePageShowCounter){t.counter=e("<div/>",{"class":"cbp-popup-singlePage-counter"}).appendTo(t.navigation)}if(t.options.singlePageStickyNavigation){t.wrap.on("scroll",function(){if(t.stopScroll)return;t.navigationWrap.width(t.wrap[0].clientWidth);t.wrap.addClass("cbp-popup-singlePage-sticky")})}}e(n).on("keydown"+s,function(e){if(!t.isOpen)return;if(t.stopEvents)return;if(e.keyCode===37){t.prev()}else if(e.keyCode===39){t.next()}else if(e.keyCode===27){t.close()}})},_createMarkupSinglePageInline:function(){var t=this;t.wrap=e("<div/>",{"class":"cbp-popup-singlePageInline"}).on("click"+s,function(n){if(t.stopEvents){return}var r=e(n.target).attr("data-action");if(r){t[r]();n.preventDefault()}});t.content=e("<div/>",{"class":"cbp-popup-content"}).appendTo(t.wrap);e("<div/>",{"class":"cbp-popup-loadingBox"}).appendTo(t.wrap);t.navigation=e("<div/>",{"class":"cbp-popup-navigation"}).appendTo(t.wrap);t.closeButton=e("<button/>",{"class":"cbp-popup-close",title:"Close (Esc arrow key)",type:"button","data-action":"close"}).appendTo(t.navigation)},destroy:function(){var t=this;e(n).off("keydown"+s);t.cubeportfolio.$obj.off("click"+s,t.options.lightboxDelegate);t.cubeportfolio.$obj.off("click"+s,t.options.singlePageDelegate);t.cubeportfolio.$obj.off("click"+s,t.options.singlePageInlineDelegate);t.cubeportfolio.$obj.removeClass("cbp-popup-isOpening");t.cubeportfolio.blocks.removeClass("cbp-singlePageInline-active");t.wrap.remove()},openLightbox:function(r,i){var s=this,o=0,u,a=[],f;if(s.isOpen)return;if(s.cubeportfolio.singlePageInline&&s.cubeportfolio.singlePageInline.isOpen){s.cubeportfolio.singlePageInline.close()}s.isOpen=true;s.stopEvents=false;s.dataArray=[];s.current=null;u=i.getAttribute("href");if(u===null){throw new Error("HEI! Your clicked element doesn't have a href attribute.")}e.each(r.find(s.options.lightboxDelegate),function(t,n){var r=n.getAttribute("href"),i=r,f="isImage";if(e.inArray(r,a)===-1){if(u==r){s.current=o}else if(!s.options.lightboxGallery){return}if(/youtube/i.test(r)){i="//www.youtube.com/embed/"+r.substring(r.lastIndexOf("v=")+2)+"?autoplay=1";f="isYoutube"}else if(/vimeo/i.test(r)){i="//player.vimeo.com/video/"+r.substring(r.lastIndexOf("/")+1)+"?autoplay=1";f="isVimeo"}s.dataArray.push({src:i,title:n.getAttribute(s.options.lightboxTitleSrc),type:f});o++}a.push(r)});s.counterTotal=s.dataArray.length;if(s.counterTotal===1){s.nextButton.hide();s.prevButton.hide();s.dataActionImg=""}else{s.nextButton.show();s.prevButton.show();s.dataActionImg='data-action="next"'}s.wrap.appendTo(n.body);s.wrap.show();f=s.dataArray[s.current];s.scrollTop=e(t).scrollTop();s[f.type](f)},openSinglePage:function(r,i){var s=this,o=0,u,a=[];if(s.isOpen)return;if(s.cubeportfolio.singlePageInline&&s.cubeportfolio.singlePageInline.isOpen){s.cubeportfolio.singlePageInline.close()}s.isOpen=true;s.stopEvents=false;s.dataArray=[];s.current=null;u=i.getAttribute("href");if(u===null){throw new Error("HEI! Your clicked element doesn't have a href attribute.")}e.each(r.find(s.options.singlePageDelegate),function(t,n){var r=n.getAttribute("href");if(e.inArray(r,a)===-1){if(u==r){s.current=o}s.dataArray.push({url:r,element:n});o++}a.push(r)});s.counterTotal=s.dataArray.length;s.wrap.appendTo(n.body);s.scrollTop=e(t).scrollTop();e("html").css({overflow:"hidden","padding-right":17});if(s.options.singlePageStickyNavigation){s.navigation.css("width",s.wrap.width())}s.wrap.scrollTop(0);if(e.isFunction(s.options.singlePageCallback)){s.options.singlePageCallback.call(s,s.dataArray[s.current].url,s.dataArray[s.current].element)}s.wrap.show();setTimeout(function(){s.wrap.addClass("cbp-popup-singlePage-open")},20);if(s.options.singlePageDeeplinking){location.href=s.url+"#cbp="+s.dataArray[s.current].url}},openSinglePageInline:function(t,n,r){var i=this,s=0,o=0,u=0,a,f=[],l,c;r=r||false;if(i.isOpen){if(i.dataArray[i.current].url!=n.getAttribute("href")){i.cubeportfolio.singlePageInline.close("open",{blocks:t,currentBlock:n,fromOpen:true})}else{i.close()}return}i.wrap.addClass("cbp-popup-loading");i.isOpen=true;i.stopEvents=false;i.dataArray=[];i.current=null;a=n.getAttribute("href");if(a===null){throw new Error("HEI! Your clicked element doesn't have a href attribute.")}e.each(t.find(i.options.singlePageInlineDelegate),function(t,n){var r=n.getAttribute("href");if(e.inArray(r,f)===-1){if(a==r){i.current=s}i.dataArray.push({url:r,element:n});s++}f.push(r)});e(i.dataArray[i.current].element).parents(".cbp-item").addClass("cbp-singlePageInline-active");i.counterTotal=i.dataArray.length;if(i.cubeportfolio.blocksClone){if(i.cubeportfolio.ulHidden==="clone"){i.wrap.prependTo(i.cubeportfolio.$ul)}else{i.wrap.prependTo(i.cubeportfolio.$ulClone)}}else{i.wrap.prependTo(i.cubeportfolio.$ul)}if(i.options.singlePageInlinePosition==="top"){o=0;u=i.cubeportfolio.cols-1}else if(i.options.singlePageInlinePosition==="above"){s=Math.floor(i.current/i.cubeportfolio.cols);o=i.cubeportfolio.cols*s;u=i.cubeportfolio.cols*(s+1)-1}else{s=Math.floor(i.current/i.cubeportfolio.cols);o=Math.min(i.cubeportfolio.cols*(s+1),i.counterTotal);u=Math.min(i.cubeportfolio.cols*(s+2)-1,i.counterTotal);l=Math.ceil((i.current+1)/i.cubeportfolio.cols);c=Math.ceil(i.counterTotal/i.cubeportfolio.cols);if(l==c){i.lastColumn=true}else{i.lastColumn=false}if(r){if(i.lastColumn){i.top=i.lastColumnHeight}}else{i.lastColumnHeight=i.cubeportfolio.height;i.top=i.lastColumnHeight}}i.matrice=[o,u];i._resizeSinglePageInline();if(e.isFunction(i.options.singlePageInlineCallback)){i.options.singlePageInlineCallback.call(i,i.dataArray[i.current].url,i.dataArray[i.current].element)}},_resizeSinglePageInline:function(e){var t=this,n;e=e||false;t.height=t.content.outerHeight(true);t.cubeportfolio._layout();t.cubeportfolio._processStyle(t.cubeportfolio.transition);if(e){t.wrap.removeClass("cbp-popup-loading")}t.cubeportfolio.$obj.addClass("cbp-popup-isOpening");t.wrap.css({height:t.height});t.wrap.css({top:t.top});n=t.lastColumn?t.height:0;t.cubeportfolio._resizeMainContainer(t.cubeportfolio.transition,n)},updateSinglePage:function(e){var t=this;t.content.html(e);t.wrap.addClass("cbp-popup-ready");t.wrap.removeClass("cbp-popup-loading");t.stopScroll=false;if(t.options.singlePageShowCounter){t.counter.text(t.current+1+" of "+t.counterTotal)}},updateSinglePageInline:function(e){var t=this;t.content.html(e);t._loadSinglePageInline()},_loadSinglePageInline:function(){var t=this,n=[],r,i,o,u,a=/url\((['"]?)(.*?)\1\)/g;o=t.wrap.children().css("backgroundImage");if(o){var f;while(f=a.exec(o)){n.push({src:f[2]})}}t.wrap.find("*").each(function(){var t=e(this);if(t.is("img:uncached")){n.push({src:t.attr("src"),element:t[0]})}o=t.css("backgroundImage");if(o){var r;while(r=a.exec(o)){n.push({src:r[2],element:t[0]})}}});var l=n.length,c=0;if(l===0){t._resizeSinglePageInline(true)}var h=function(){c++;if(c==l){t._resizeSinglePageInline(true)}};for(r=0;r<l;r++){i=new Image;e(i).on("load"+s+" error"+s,h);i.src=n[r].src}},isImage:function(t){var n=this,r=new Image;n.tooggleLoading(true);if(e('<img src="'+t.src+'">').is("img:uncached")){e(r).on("load"+s+" error"+s,function(){n.updateImagesMarkup(t.src,t.title,n.current+1+" of "+n.counterTotal);n.tooggleLoading(false)});r.src=t.src}else{n.updateImagesMarkup(t.src,t.title,n.current+1+" of "+n.counterTotal);n.tooggleLoading(false)}},isVimeo:function(e){var t=this;t.updateVideoMarkup(e.src,e.title,t.current+1+" of "+t.counterTotal)},isYoutube:function(e){var t=this;t.updateVideoMarkup(e.src,e.title,t.current+1+" of "+t.counterTotal)},updateVideoMarkup:function(e,t,n){var r=this;r.wrap.addClass("cbp-popup-lightbox-isIframe");var i='<div class="cbp-popup-lightbox-iframe">'+'<iframe src="'+e+'" frameborder="0" allowfullscreen></iframe>'+'<div class="cbp-popup-lightbox-bottom">'+(t?'<div class="cbp-popup-lightbox-title">'+t+"</div>":"")+(r.options.lightboxShowCounter?'<div class="cbp-popup-lightbox-counter">'+n+"</div>":"")+"</div>"+"</div>";r.content.html(i);r.wrap.addClass("cbp-popup-ready");r.preloadNearbyImages()},updateImagesMarkup:function(e,t,n){var r=this;r.wrap.removeClass("cbp-popup-lightbox-isIframe");var i='<div class="cbp-popup-lightbox-figure">'+'<img src="'+e+'" class="cbp-popup-lightbox-img" '+r.dataActionImg+" />"+'<div class="cbp-popup-lightbox-bottom">'+(t?'<div class="cbp-popup-lightbox-title">'+t+"</div>":"")+(r.options.lightboxShowCounter?'<div class="cbp-popup-lightbox-counter">'+n+"</div>":"")+"</div>"+"</div>";r.content.html(i);r.wrap.addClass("cbp-popup-ready");r.resizeImage();r.preloadNearbyImages()},next:function(){var e=this;e[e.type+"JumpTo"](1)},prev:function(){var e=this;e[e.type+"JumpTo"](-1)},lightboxJumpTo:function(e){var t=this,n;t.current=t.getIndex(t.current+e);n=t.dataArray[t.current];t[n.type](n)},singlePageJumpTo:function(t){var n=this;n.current=n.getIndex(n.current+t);if(e.isFunction(n.options.singlePageCallback)){n.resetWrap();n.stopScroll=true;n.wrap.scrollTop(0);if(n.options.singlePageStickyNavigation){n.navigationWrap.width("100%");n.wrap.removeClass("cbp-popup-singlePage-sticky")}n.wrap.addClass("cbp-popup-loading");n.options.singlePageCallback.call(n,n.dataArray[n.current].url,n.dataArray[n.current].element);if(n.options.singlePageDeeplinking){location.href=n.url+"#cbp="+n.dataArray[n.current].url}}},resetWrap:function(){var e=this;if(e.type==="singlePage"&&e.options.singlePageDeeplinking){location.href=e.url+"#"}},getIndex:function(e){var t=this;e=e%t.counterTotal;if(e<0){e=t.counterTotal+e}return e},close:function(n,r){var i=this;i.isOpen=false;if(i.type==="singlePageInline"){if(n==="open"){i.wrap.addClass("cbp-popup-loading");e(i.dataArray[i.current].element).parents(".cbp-item").removeClass("cbp-singlePageInline-active");i.openSinglePageInline(r.blocks,r.currentBlock,r.fromOpen)}else{i.matrice=[-1,-1];i.cubeportfolio._layout();i.cubeportfolio._processStyle(i.cubeportfolio.transition);i.cubeportfolio._resizeMainContainer(i.cubeportfolio.transition);i.wrap.css({height:0});e(i.dataArray[i.current].element).parents(".cbp-item").removeClass("cbp-singlePageInline-active");if(i.cubeportfolio.browser==="ie8"||i.cubeportfolio.browser==="ie9"){i.content.html("");i.wrap.detach();i.cubeportfolio.$obj.removeClass("cbp-popup-isOpening");if(n==="promise"){if(e.isFunction(r.callback)){r.callback.call(i.cubeportfolio)}}}else{i.wrap.one(i.cubeportfolio.transitionEnd,function(){i.content.html("");i.wrap.detach();i.cubeportfolio.$obj.removeClass("cbp-popup-isOpening");if(n==="promise"){if(e.isFunction(r.callback)){r.callback.call(i.cubeportfolio)}}})}}}else{i.wrap.removeClass("cbp-popup-singlePage-open cbp-popup-singlePage-sticky");i.resetWrap();e("html").css({overflow:"","padding-right":""});e(t).scrollTop(i.scrollTop);i.content.html("");i.wrap.detach()}},tooggleLoading:function(e){var t=this;t.stopEvents=e;t.wrap[e?"addClass":"removeClass"]("cbp-popup-loading")},resizeImage:function(){if(!this.isOpen)return;var n=e(t).height(),r=e(".cbp-popup-content").find("img"),i=parseInt(r.css("margin-top"),10)+parseInt(r.css("margin-bottom"),10);r.css("max-height",n-i+"px")},preloadNearbyImages:function(){var t=[],n,r=this,i;t.push(r.getIndex(r.current+1));t.push(r.getIndex(r.current+2));t.push(r.getIndex(r.current+3));t.push(r.getIndex(r.current-1));t.push(r.getIndex(r.current-2));t.push(r.getIndex(r.current-3));for(var s=t.length-1;s>=0;s--){if(r.dataArray[t[s]].type==="isImage"){i=r.dataArray[t[s]].src;n=new Image;if(e('<img src="'+i+'">').is("img:uncached")){n.src=i}}}}};var u={_main:function(t,n,r){var i=this;i.styleQueue=[];i.isAnimating=false;i.defaultFilter="*";i.registeredEvents=[];if(e.isFunction(r)){i._registerEvent("initFinish",r,true)}i.options=e.extend({},e.fn.cubeportfolio.options,n);i.obj=t;i.$obj=e(t);i.width=i.$obj.width();i.$obj.addClass("cbp cbp-loading");i.$ul=i.$obj.children();i.$ul.addClass("cbp-wrapper");if(i.options.displayType==="lazyLoading"||i.options.displayType==="fadeIn"){i.$ul.css({opacity:0})}if(i.options.displayType==="fadeInToTop"){i.$ul.css({opacity:0,marginTop:30})}i._browserInfo();i._initCSSandEvents();i._prepareBlocks();if(i.options.displayType==="lazyLoading"||i.options.displayType==="sequentially"||i.options.displayType==="bottomToTop"||i.options.displayType==="fadeInToTop"){i._load()}else{i._display()}},_browserInfo:function(){var e=this,t=navigator.appVersion,n,r;if(t.indexOf("MSIE 8.")!==-1){e.browser="ie8"}else if(t.indexOf("MSIE 9.")!==-1){e.browser="ie9"}else if(t.indexOf("MSIE 10.")!==-1){e.browser="ie10"}else if(/android/gi.test(t)){e.browser="android"}else if(/iphone|ipad|ipod/gi.test(t)){e.browser="ios"}else{e.browser=""}if(e.browser){e.$obj.addClass("cbp-"+e.browser)}n=e._styleSupport("transition");r=e._styleSupport("animation");e.transition=e.transitionByFilter=n?"css":"animate";if(e.transition=="animate")return;e.transitionEnd={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"}[n];e.animationEnd={WebkitAnimation:"webkitAnimationEnd",MozAnimation:"Animationend",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"}[r];e.supportCSSTransform=e._styleSupport("transform");if(e.supportCSSTransform){e._cssHooks()}},_styleSupport:function(e){var t,r,i,s=e.charAt(0).toUpperCase()+e.slice(1),o=["Moz","Webkit","O","ms"],u=n.createElement("div");if(e in u.style){r=e}else{for(i=o.length-1;i>=0;i--){t=o[i]+s;if(t in u.style){r=t;break}}}u=null;return r},_cssHooks:function(){function r(r,i,s){var o=e(r),u=o.data("transformFn")||{},a={},f,l={},c,h,p,d,v;a[s]=i;e.extend(u,a);for(f in u){c=u[f];l[f]=n[f](c)}h=l.translate||"";p=l.scale||"";v=l.skew||"";d=h+p+v;o.data("transformFn",u);r.style[t.supportCSSTransform]=d}var t=this,n;if(t._has3d()){n={translate:function(e){return"translate3d("+e[0]+"px, "+e[1]+"px, 0) "},scale:function(e){return"scale3d("+e+", "+e+", 1) "},skew:function(e){return"skew("+e[0]+"deg, "+e[1]+"deg) "}}}else{n={translate:function(e){return"translate("+e[0]+"px, "+e[1]+"px) "},scale:function(e){return"scale("+e+") "},skew:function(e){return"skew("+e[0]+"deg, "+e[1]+"deg) "}}}e.cssNumber.scale=true;e.cssHooks.scale={set:function(e,t){if(typeof t==="string"){t=parseFloat(t)}r(e,t,"scale")},get:function(t,n){var r=e.data(t,"transformFn");return r&&r.scale?r.scale:1}};e.fx.step.scale=function(t){e.cssHooks.scale.set(t.elem,t.now+t.unit)};e.cssNumber.translate=true;e.cssHooks.translate={set:function(e,t){r(e,t,"translate")},get:function(t,n){var r=e.data(t,"transformFn");return r&&r.translate?r.translate:[0,0]}};e.cssNumber.skew=true;e.cssHooks.skew={set:function(e,t){r(e,t,"skew")},get:function(t,n){var r=e.data(t,"transformFn");return r&&r.skew?r.skew:[0,0]}}},_has3d:function(){var e=n.createElement("p"),i,s={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};n.body.insertBefore(e,null);for(var o in s){if(e.style[o]!==r){e.style[o]="translate3d(1px,1px,1px)";i=t.getComputedStyle(e).getPropertyValue(s[o])}}n.body.removeChild(e);return i!==r&&i.length>0&&i!=="none"},_prepareBlocks:function(){var e=this,t;e.blocks=e.$ul.children(".cbp-item");e.blocksAvailable=e.blocks;e.blocks.wrapInner('<div class="cbp-item-wrapper"></div>');if(e.options.caption){e._captionInit()}},_captionInit:function(){var e=this;e.$obj.addClass("cbp-caption-"+e.options.caption);e["_"+e.options.caption+"Caption"]()},_captionDestroy:function(){var e=this;e.$obj.removeClass("cbp-caption-"+e.options.caption);e["_"+e.options.caption+"CaptionDestroy"]()},_pushTopCaption:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").on("mouseenter"+s,function(){var t=e(this),n=t.find(".cbp-caption-defaultWrap"),r=t.find(".cbp-caption-activeWrap");n.animate({bottom:"100%"},"fast");r.animate({bottom:0},"fast")}).on("mouseleave"+s,function(t){var n=e(this),r=n.find(".cbp-caption-defaultWrap"),i=n.find(".cbp-caption-activeWrap");r.animate({bottom:0},"fast");i.animate({bottom:"-100%"},"fast")})}},_pushTopCaptionDestroy:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").off("mouseenter"+s+" mouseleave"+s);e(".cbp-caption").find(".cbp-caption-defaultWrap").removeAttr("style");e(".cbp-caption").find(".cbp-caption-activeWrap").removeAttr("style")}},_pushDownCaption:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").on("mouseenter"+s,function(){var t=e(this),n=t.find(".cbp-caption-defaultWrap"),r=t.find(".cbp-caption-activeWrap");n.animate({bottom:"-100%"},"fast");r.animate({bottom:0},"fast")}).on("mouseleave"+s,function(t){var n=e(this),r=n.find(".cbp-caption-defaultWrap"),i=n.find(".cbp-caption-activeWrap");r.animate({bottom:0},"fast");i.animate({bottom:"100%"},"fast")})}},_pushDownCaptionDestroy:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").off("mouseenter"+s+" mouseleave"+s);e(".cbp-caption").find(".cbp-caption-defaultWrap").removeAttr("style");e(".cbp-caption").find(".cbp-caption-activeWrap").removeAttr("style")}},_revealBottomCaption:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").on("mouseenter"+s,function(){var t=e(this),n=t.find(".cbp-caption-defaultWrap");n.animate({bottom:"100%"},"fast")}).on("mouseleave"+s,function(t){var n=e(this),r=n.find(".cbp-caption-defaultWrap");r.animate({bottom:0},"fast")})}},_revealBottomCaptionDestroy:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").off("mouseenter"+s+" mouseleave"+s);e(".cbp-caption").find(".cbp-caption-defaultWrap").removeAttr("style")}},_revealTopCaption:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").on("mouseenter"+s,function(){var t=e(this),n=t.find(".cbp-caption-defaultWrap");n.animate({bottom:"-100%"},"fast")}).on("mouseleave"+s,function(t){var n=e(this),r=n.find(".cbp-caption-defaultWrap");r.animate({bottom:0},"fast")})}},_revealTopCaptionDestroy:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").off("mouseenter"+s+" mouseleave"+s);e(".cbp-caption").find(".cbp-caption-defaultWrap").removeAttr("style")}},_overlayBottomRevealCaption:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").on("mouseenter"+s,function(){var t=e(this),n=t.find(".cbp-caption-defaultWrap"),r=t.find(".cbp-caption-activeWrap").height();n.animate({bottom:r},"fast")}).on("mouseleave"+s,function(t){var n=e(this),r=n.find(".cbp-caption-defaultWrap");r.animate({bottom:0},"fast")})}},_overlayBottomRevealCaptionDestroy:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").off("mouseenter"+s+" mouseleave"+s);e(".cbp-caption").find(".cbp-caption-defaultWrap").removeAttr("style")}},_overlayBottomPushCaption:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").on("mouseenter"+s,function(){var t=e(this),n=t.find(".cbp-caption-defaultWrap"),r=t.find(".cbp-caption-activeWrap"),i=r.height();n.animate({bottom:i},"fast");r.animate({bottom:0},"fast")}).on("mouseleave"+s,function(t){var n=e(this),r=n.find(".cbp-caption-defaultWrap"),i=n.find(".cbp-caption-activeWrap"),s=i.height();r.animate({bottom:0},"fast");i.animate({bottom:-s},"fast")})}},_overlayBottomPushCaptionDestroy:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").off("mouseenter"+s+" mouseleave"+s);e(".cbp-caption").find(".cbp-caption-defaultWrap").removeAttr("style");e(".cbp-caption").find(".cbp-caption-activeWrap").removeAttr("style")}},_overlayBottomCaption:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").on("mouseenter"+s,function(){e(this).find(".cbp-caption-activeWrap").animate({bottom:0},"fast")}).on("mouseleave"+s,function(t){var n=e(this).find(".cbp-caption-activeWrap");n.animate({bottom:-n.height()},"fast")})}},_overlayBottomCaptionDestroy:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").off("mouseenter"+s+" mouseleave"+s);e(".cbp-caption").find(".cbp-caption-activeWrap").removeAttr("style")}},_moveRightCaption:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").on("mouseenter"+s,function(){e(this).find(".cbp-caption-activeWrap").animate({left:0},"fast")}).on("mouseleave"+s,function(){var t=e(this).find(".cbp-caption-activeWrap");t.animate({left:-t.width()},"fast")})}},_moveRightCaptionDestroy:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").off("mouseenter"+s+" mouseleave"+s);e(".cbp-caption").find(".cbp-caption-activeWrap").removeAttr("style")}},_revealLeftCaption:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").on("mouseenter"+s,function(){e(this).find(".cbp-caption-activeWrap").animate({left:0},"fast")}).on("mouseleave"+s,function(){var t=e(this).find(".cbp-caption-activeWrap");t.animate({left:t.width()},"fast")})}},_revealLeftCaptionDestroy:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").off("mouseenter"+s+" mouseleave"+s);e(".cbp-caption").find(".cbp-caption-activeWrap").removeAttr("style")}},_minimalCaption:function(){var e=this},_minimalCaptionDestroy:function(){var e=this},_fadeInCaption:function(){var t=this,n;if(t.browser==="ie8"||t.browser==="ie9"){n=t.browser==="ie9"?1:.8;e(".cbp-caption").on("mouseenter"+s,function(){e(this).find(".cbp-caption-activeWrap").animate({opacity:n},"fast")}).on("mouseleave"+s,function(){e(this).find(".cbp-caption-activeWrap").animate({opacity:0},"fast")})}},_fadeInCaptionDestroy:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").off("mouseenter"+s+" mouseleave"+s);e(".cbp-caption").find(".cbp-caption-activeWrap").removeAttr("style")}},_overlayRightAlongCaption:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").on("mouseenter"+s,function(){var t=e(this),n=t.find(".cbp-caption-defaultWrap"),r=t.find(".cbp-caption-activeWrap");n.animate({left:r.width()/2},"fast");r.animate({left:0},"fast")}).on("mouseleave"+s,function(t){var n=e(this),r=n.find(".cbp-caption-defaultWrap"),i=n.find(".cbp-caption-activeWrap");r.animate({left:0},"fast");i.animate({left:-i.width()},"fast")})}},_overlayRightAlongCaptionDestroy:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").off("mouseenter"+s+" mouseleave"+s);e(".cbp-caption").find(".cbp-caption-defaultWrap").removeAttr("style");e(".cbp-caption").find(".cbp-caption-activeWrap").removeAttr("style")}},_overlayBottomAlongCaption:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").on("mouseenter"+s,function(){var t=e(this),n=t.find(".cbp-caption-defaultWrap"),r=t.find(".cbp-caption-activeWrap");n.animate({bottom:r.height()/2},"fast");r.animate({bottom:0},"fast")}).on("mouseleave"+s,function(t){var n=e(this),r=n.find(".cbp-caption-defaultWrap"),i=n.find(".cbp-caption-activeWrap");r.animate({bottom:0},"fast");i.animate({bottom:-i.height()},"fast")})}},_overlayBottomAlongCaptionDestroy:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").off("mouseenter"+s+" mouseleave"+s);e(".cbp-caption").find(".cbp-caption-defaultWrap").removeAttr("style");e(".cbp-caption").find(".cbp-caption-activeWrap").removeAttr("style")}},_zoomCaption:function(){var t=this,n;if(t.browser==="ie8"||t.browser==="ie9"){n=t.browser==="ie9"?1:.8;e(".cbp-caption").on("mouseenter"+s,function(){e(this).find(".cbp-caption-activeWrap").animate({opacity:n},"fast")}).on("mouseleave"+s,function(){e(this).find(".cbp-caption-activeWrap").animate({opacity:0},"fast")})}},_zoomCaptionDestroy:function(){var t=this;if(t.browser==="ie8"||t.browser==="ie9"){e(".cbp-caption").off("mouseenter"+s+" mouseleave"+s);e(".cbp-caption").find(".cbp-caption-activeWrap").removeAttr("style")}},_initCSSandEvents:function(){var n=this,i,o,u,a;e(t).on("resize"+s,function(){if(i){clearTimeout(i)}i=setTimeout(function(){if(n.browser==="ie8"){a=e(t).width();if(u===r||u!=a){u=a}else{return}}n.$obj.removeClass("cbp-no-transition cbp-appendItems-loading");if(n.options.gridAdjustment==="responsive"){n._responsiveLayout()}n._layout();n._processStyle(n.transition);n._resizeMainContainer(n.transition);if(n.lightbox){n.lightbox.resizeImage()}if(n.singlePage){if(n.singlePage.options.singlePageStickyNavigation){o=n.singlePage.wrap[0].clientWidth;if(o>0){n.singlePage.navigationWrap.width(n.singlePage.wrap[0].clientWidth);n.singlePage.navigation.width(n.singlePage.wrap[0].clientWidth)}}}},50)})},_load:function(){var t=this,n=[],r,i,o,u,a=/url\((['"]?)(.*?)\1\)/g;o=t.$obj.children().css("backgroundImage");if(o){var f;while(f=a.exec(o)){n.push({src:f[2]})}}t.$obj.find("*").each(function(){var t=e(this);if(t.is("img:uncached")){n.push({src:t.attr("src"),element:t[0]})}o=t.css("backgroundImage");if(o){var r;while(r=a.exec(o)){n.push({src:r[2],element:t[0]})}}});var l=n.length,c=0;if(l===0){t._display()}var h=function(){c++;if(c==l){t._display();return false}};for(r=0;r<l;r++){i=new Image;e(i).on("load"+s+" error"+s,h);i.src=n[r].src}},_display:function(){var e=this,t,n;if(e.options.animationType){if(e["_"+e.options.animationType+"Init"]){e["_"+e.options.animationType+"Init"]()}e.$obj.addClass("cbp-animation-"+e.options.animationType)}e.localColumnWidth=e.blocks.eq(0).outerWidth()+e.options.gapVertical;if(e.options.gridAdjustment==="responsive"){e._responsiveLayout()}e._layout();e._processStyle("css");e._resizeMainContainer("css");if(e.options.displayType==="lazyLoading"||e.options.displayType==="fadeIn"){e.$ul.animate({opacity:1},e.options.displayTypeSpeed)}if(e.options.displayType==="fadeInToTop"){e.$ul.animate({opacity:1,marginTop:0},e.options.displayTypeSpeed)}if(e.options.displayType==="sequentially"){t=0;e.blocks.css("opacity",0);(function r(){n=e.blocksAvailable.eq(t++);if(n.length){n.animate({opacity:1});setTimeout(r,e.options.displayTypeSpeed)}})()}if(e.options.displayType==="bottomToTop"){t=0;e.blocks.css({opacity:0,marginTop:80});(function i(){n=e.blocksAvailable.eq(t++);if(n.length){n.animate({opacity:1,marginTop:0},400);setTimeout(i,e.options.displayTypeSpeed)}})()}setTimeout(function(){e.$obj.removeClass("cbp-loading");e._triggerEvent("initFinish");e.$obj.trigger("initComplete");e.$obj.addClass("cbp-ready")},0);e.lightbox=null;if(e.$obj.find(e.options.lightboxDelegate)){e.lightbox=Object.create(o);e.lightbox.init(e,"lightbox");e.$obj.on("click"+s,e.options.lightboxDelegate,function(t){e.lightbox.openLightbox(e.blocksAvailable,this);t.preventDefault()})}e.singlePage=null;if(e.$obj.find(e.options.singlePageDelegate)){e.singlePage=Object.create(o);e.singlePage.init(e,"singlePage");e.$obj.on("click"+s,e.options.singlePageDelegate,function(t){e.singlePage.openSinglePage(e.blocksAvailable,this);t.preventDefault()})}e.singlePageInline=null;if(e.$obj.find(e.options.singlePageInlineDelegate)){e.singlePageInline=Object.create(o);e.singlePageInline.init(e,"singlePageInline");e.$obj.on("click"+s,e.options.singlePageInlineDelegate,function(t){e.singlePageInline.openSinglePageInline(e.blocksAvailable,this);t.preventDefault()})}},_layout:function(){var t=this;t._layoutReset();t.blocksAvailable.each(function(n,r){var i=e(r),s=Math.ceil(i.outerWidth()/t.localColumnWidth),o=0;s=Math.min(s,t.cols);if(t.singlePageInline&&n>=t.singlePageInline.matrice[0]&&n<=t.singlePageInline.matrice[1]){o=t.singlePageInline.height}if(s===1){t._placeBlocks(i,t.colVert,o)}else{var u=t.cols+1-s,a=[],f,l;for(l=0;l<u;l++){f=t.colVert.slice(l,l+s);a[l]=Math.max.apply(Math,f)}t._placeBlocks(i,a,o)}})},_layoutReset:function(){var e,t=this,n;if(t.options.gridAdjustment==="alignCenter"){t.$obj.attr("style","");t.width=t.$obj.width();t.cols=Math.max(Math.floor((t.width+t.options.gapVertical)/t.localColumnWidth),1);t.width=t.cols*t.localColumnWidth-t.options.gapVertical;t.$obj.css("max-width",t.width)}else{t.width=t.$obj.width();t.cols=Math.max(Math.floor((t.width+t.options.gapVertical)/t.localColumnWidth),1)}t.colVert=[];e=t.cols;while(e--){t.colVert.push(0)}},_responsiveLayout:function(){var t=this,n,r;if(!t.columnWidthCache){t.columnWidthCache=t.localColumnWidth}else{t.localColumnWidth=t.columnWidthCache}t.width=t.$obj.width()+t.options.gapVertical;t.cols=Math.max(Math.floor(t.width/t.localColumnWidth),1);r=t.width%t.localColumnWidth;if(r/t.localColumnWidth>.5){t.localColumnWidth=t.localColumnWidth-(t.localColumnWidth-r)/(t.cols+1)}else{t.localColumnWidth=t.localColumnWidth+r/t.cols}t.localColumnWidth=parseInt(t.localColumnWidth,10);n=t.localColumnWidth/t.columnWidthCache;t.blocks.each(function(r,i){var s=e(this),o=e.data(this,"cbp-wxh");if(!o){o=e.data(this,"cbp-wxh",{width:s.outerWidth(),height:s.outerHeight()})}s.css("width",t.localColumnWidth-t.options.gapVertical);s.css("height",Math.floor(o.height*n))});if(t.blocksClone){t.blocksClone.each(function(r,i){var s=e(this),o=e.data(this,"cbp-wxh");if(!o){o=e.data(this,"cbp-wxh",{width:s.outerWidth(),height:s.outerHeight()})}s.css("width",t.localColumnWidth-t.options.gapVertical);s.css("height",Math.floor(o.height*n))})}},_resizeMainContainer:function(e,t){var n=this;t=t||0;n.height=Math.max.apply(Math,n.colVert)+t;n.$obj[e]({height:n.height-n.options.gapHorizontal},400)},_processStyle:function(e){var t=this;for(var n=t.styleQueue.length-1;n>=0;n--){t.styleQueue[n].$el[e](t.styleQueue[n].style)}t.styleQueue=[]},_placeBlocks:function(e,t,n){var r=this,i=Math.min.apply(Math,t),s=0,o,u,a,f,l,c;for(l=0,c=t.length;l<c;l++){if(t[l]===i){s=l;break}}if(r.singlePageInline&&n!==0){r.singlePageInline.top=i}i+=n;o=Math.round(r.localColumnWidth*s);u=Math.round(i);r.styleQueue.push({$el:e,style:r.supportCSSTransform?r._withCSS3(o,u):r._withCSS2(o,u)});a=i+e.outerHeight()+r.options.gapHorizontal;f=r.cols+1-c;for(l=0;l<f;l++){r.colVert[s+l]=a}},_withCSS2:function(e,t){return{left:e,top:t}},_withCSS3:function(e,t){return{translate:[e,t]}},_duplicateContent:function(e){var t=this;t.$ulClone=t.$ul.clone();t.blocksClone=t.$ulClone.children();t.$ulClone.css(e);t.ulHidden="clone";t.$obj.append(t.$ulClone)},_fadeOutFilter:function(e,t,n){var r=this;if(n!=="*"){t=t.filter(n);e=r.blocks.not(".cbp-item-hidden").not(n).addClass("cbp-item-hidden")}t.removeClass("cbp-item-hidden");r.blocksAvailable=r.blocks.filter(n);if(e.length){r.styleQueue.push({$el:e,style:{opacity:0}})}if(t.length){r.styleQueue.push({$el:t,style:{opacity:1}})}r._layout();r._processStyle(r.transitionByFilter);r._resizeMainContainer(r.transition);setTimeout(function(){r._filterFinish()},400)},_quicksandFilter:function(e,t,n){var r=this;if(n!=="*"){t=t.filter(n);e=r.blocks.not(".cbp-item-hidden").not(n).addClass("cbp-item-hidden")}t.removeClass("cbp-item-hidden");r.blocksAvailable=r.blocks.filter(n);if(e.length){r.styleQueue.push({$el:e,style:{scale:.01,opacity:0}})}if(t.length){r.styleQueue.push({$el:t,style:{scale:1,opacity:1}})}r._layout();r._processStyle(r.transitionByFilter);r._resizeMainContainer(r.transition);setTimeout(function(){r._filterFinish()},400)},_flipOutFilter:function(e,t,n){var r=this;if(n!=="*"){t=t.filter(n);e=r.blocks.not(".cbp-item-hidden").not(n).addClass("cbp-item-hidden")}t.removeClass("cbp-item-hidden");r.blocksAvailable=r.blocks.filter(n);if(e.length){if(r.browser==="ie8"||r.browser==="ie9"){r.styleQueue.push({$el:e,style:{opacity:0}})}else{e.find(".cbp-item-wrapper").removeClass("cbp-animation-flipOut-in").addClass("cbp-animation-flipOut-out")}}if(t.length){if(r.browser==="ie8"||r.browser==="ie9"){r.styleQueue.push({$el:t,style:{opacity:1}})}else{t.find(".cbp-item-wrapper").removeClass("cbp-animation-flipOut-out").addClass("cbp-animation-flipOut-in")}}r._layout();r._processStyle(r.transitionByFilter);r._resizeMainContainer(r.transition);setTimeout(function(){r._filterFinish()},400)},_flipBottomFilter:function(e,t,n){var r=this;if(n!=="*"){t=t.filter(n);e=r.blocks.not(".cbp-item-hidden").not(n).addClass("cbp-item-hidden")}t.removeClass("cbp-item-hidden");r.blocksAvailable=r.blocks.filter(n);if(e.length){if(r.browser==="ie8"||r.browser==="ie9"){r.styleQueue.push({$el:e,style:{opacity:0}})}else{e.find(".cbp-item-wrapper").removeClass("cbp-animation-flipBottom-in").addClass("cbp-animation-flipBottom-out")}}if(t.length){if(r.browser==="ie8"||r.browser==="ie9"){r.styleQueue.push({$el:t,style:{opacity:1}})}else{t.find(".cbp-item-wrapper").removeClass("cbp-animation-flipBottom-out").addClass("cbp-animation-flipBottom-in")}}r._layout();r._processStyle(r.transitionByFilter);r._resizeMainContainer(r.transition);setTimeout(function(){r._filterFinish()},400)},_scaleSidesFilter:function(e,t,n){var r=this;if(n!=="*"){t=t.filter(n);e=r.blocks.not(".cbp-item-hidden").not(n).addClass("cbp-item-hidden")}t.removeClass("cbp-item-hidden");r.blocksAvailable=r.blocks.filter(n);if(e.length){if(r.browser==="ie8"||r.browser==="ie9"){r.styleQueue.push({$el:e,style:{opacity:0}})}else{e.find(".cbp-item-wrapper").removeClass("cbp-animation-scaleSides-in").addClass("cbp-animation-scaleSides-out")}}if(t.length){if(r.browser==="ie8"||r.browser==="ie9"){r.styleQueue.push({$el:t,style:{opacity:1}})}else{t.find(".cbp-item-wrapper").removeClass("cbp-animation-scaleSides-out").addClass("cbp-animation-scaleSides-in")}}r._layout();r._processStyle(r.transitionByFilter);r._resizeMainContainer(r.transition);setTimeout(function(){r._filterFinish()},400)},_skewFilter:function(e,t,n){var r=this;if(n!=="*"){t=t.filter(n);e=r.blocks.not(".cbp-item-hidden").not(n).addClass("cbp-item-hidden")}t.removeClass("cbp-item-hidden");r.blocksAvailable=r.blocks.filter(n);if(e.length){r.styleQueue.push({$el:e,style:{skew:[50,0],scale:.01,opacity:0}})}if(t.length){r.styleQueue.push({$el:t,style:{skew:[0,0],scale:1,opacity:1}})}r._layout();r._processStyle(r.transitionByFilter);r._resizeMainContainer(r.transition);setTimeout(function(){r._filterFinish()},400)},_sequentiallyInit:function(){this.transitionByFilter="css"},_sequentiallyFilter:function(e,t,n){var r=this,i=r.blocks,s=r.blocksAvailable;r.blocksAvailable=r.blocks.filter(n);r.$obj.addClass("cbp-no-transition");if(r.browser==="ie8"||r.browser==="ie9"){s[r.transition]({top:"-=30",opacity:0},300)}else{s[r.transition]({top:-30,opacity:0})}setTimeout(function(){if(n!=="*"){t=t.filter(n);e=r.blocks.not(".cbp-item-hidden").not(n).addClass("cbp-item-hidden")}t.removeClass("cbp-item-hidden");if(e.length){e.css({display:"none"})}if(t.length){t.css("display","block")}r._layout();r._processStyle(r.transitionByFilter);r._resizeMainContainer(r.transition);if(r.browser==="ie8"||r.browser==="ie9"){r.blocksAvailable.css("top","-=30")}var i=0,s;(function o(){s=r.blocksAvailable.eq(i++);if(s.length){if(r.browser==="ie8"||r.browser==="ie9"){s[r.transition]({top:"+=30",opacity:1})}else{s[r.transition]({top:0,opacity:1})}setTimeout(o,130)}else{setTimeout(function(){r._filterFinish()},600)}})()},600)},_fadeOutTopInit:function(){this.transitionByFilter="css"},_fadeOutTopFilter:function(e,t,n){var r=this;r.blocksAvailable=r.blocks.filter(n);if(r.browser==="ie8"||r.browser==="ie9"){r.$ul[r.transition]({top:-30,opacity:0},350)}else{r.$ul[r.transition]({top:-30,opacity:0})}r.$obj.addClass("cbp-no-transition");setTimeout(function(){if(n!=="*"){t=t.filter(n);e=r.blocks.not(".cbp-item-hidden").not(n).addClass("cbp-item-hidden")}t.removeClass("cbp-item-hidden");if(e.length){e.css("opacity",0)}if(t.length){t.css("opacity",1)}r._layout();r._processStyle(r.transitionByFilter);r._resizeMainContainer(r.transition);if(r.browser==="ie8"||r.browser==="ie9"){r.$ul[r.transition]({top:0,opacity:1},350)}else{r.$ul[r.transition]({top:0,opacity:1})}setTimeout(function(){r._filterFinish()},400)},400)},_boxShadowInit:function(){var e=this;if(e.browser==="ie8"||e.browser==="ie9"){e.options.animationType="fadeOut"}else{e.blocksAvailable.append('<div class="cbp-animation-boxShadowMask"></div>')}},_boxShadowFilter:function(e,t,n){var r=this;if(n!=="*"){t=t.filter(n);e=r.blocks.not(".cbp-item-hidden").not(n).addClass("cbp-item-hidden")}t.removeClass("cbp-item-hidden");var i=r.blocks.find(".cbp-animation-boxShadowMask");i.addClass("cbp-animation-boxShadowShow");i.removeClass("cbp-animation-boxShadowActive cbp-animation-boxShadowInactive");r.blocksAvailable=r.blocks.filter(n);var s={};if(e.length){e.find(".cbp-animation-boxShadowMask").addClass("cbp-animation-boxShadowActive");r.styleQueue.push({$el:e,style:{opacity:0}});s=e.last()}if(t.length){t.find(".cbp-animation-boxShadowMask").addClass("cbp-animation-boxShadowInactive");r.styleQueue.push({$el:t,style:{opacity:1}});s=t.last()}r._layout();if(s.length){s.one(r.transitionEnd,function(){i.removeClass("cbp-animation-boxShadowShow");r._filterFinish()})}else{i.removeClass("cbp-animation-boxShadowShow");r._filterFinish()}r._processStyle(r.transitionByFilter);r._resizeMainContainer(r.transition)},_bounceLeftInit:function(){var e=this;e._duplicateContent({left:"-100%",opacity:0});e.transitionByFilter="css";e.$ul.addClass("cbp-wrapper-front")},_bounceLeftFilter:function(e,t,n){var r=this,i,s,o;r.$obj.addClass("cbp-no-transition");if(r.ulHidden==="clone"){r.ulHidden="first";i=r.$ulClone;o=r.$ul;s=r.blocksClone}else{r.ulHidden="clone";i=r.$ul;o=r.$ulClone;s=r.blocks}t=s.filter(".cbp-item-hidden");if(n!=="*"){t=t.filter(n);s.not(".cbp-item-hidden").not(n).addClass("cbp-item-hidden")}t.removeClass("cbp-item-hidden");r.blocksAvailable=s.filter(n);r._layout();o[r.transition]({left:"-100%",opacity:0}).removeClass("cbp-wrapper-front").addClass("cbp-wrapper-back");i[r.transition]({left:0,opacity:1}).addClass("cbp-wrapper-front").removeClass("cbp-wrapper-back");r._processStyle(r.transitionByFilter);r._resizeMainContainer(r.transition);setTimeout(function(){r._filterFinish()},400)},_bounceTopInit:function(){var e=this;e._duplicateContent({top:"-100%",opacity:0});e.transitionByFilter="css";e.$ul.addClass("cbp-wrapper-front")},_bounceTopFilter:function(e,t,n){var r=this,i,s,o;r.$obj.addClass("cbp-no-transition");if(r.ulHidden==="clone"){r.ulHidden="first";i=r.$ulClone;o=r.$ul;s=r.blocksClone}else{r.ulHidden="clone";i=r.$ul;o=r.$ulClone;s=r.blocks}t=s.filter(".cbp-item-hidden");if(n!=="*"){t=t.filter(n);s.not(".cbp-item-hidden").not(n).addClass("cbp-item-hidden")}t.removeClass("cbp-item-hidden");r.blocksAvailable=s.filter(n);r._layout();o[r.transition]({top:"-100%",opacity:0}).removeClass("cbp-wrapper-front").addClass("cbp-wrapper-back");i[r.transition]({top:0,opacity:1}).addClass("cbp-wrapper-front").removeClass("cbp-wrapper-back");r._processStyle(r.transitionByFilter);r._resizeMainContainer(r.transition);setTimeout(function(){r._filterFinish()},400)},_bounceBottomInit:function(){var e=this;e._duplicateContent({top:"100%",opacity:0});e.transitionByFilter="css"},_bounceBottomFilter:function(e,t,n){var r=this,i,s,o;r.$obj.addClass("cbp-no-transition");if(r.ulHidden==="clone"){r.ulHidden="first";i=r.$ulClone;o=r.$ul;s=r.blocksClone}else{r.ulHidden="clone";i=r.$ul;o=r.$ulClone;s=r.blocks}t=s.filter(".cbp-item-hidden");if(n!=="*"){t=t.filter(n);s.not(".cbp-item-hidden").not(n).addClass("cbp-item-hidden")}t.removeClass("cbp-item-hidden");r.blocksAvailable=s.filter(n);r._layout();o[r.transition]({top:"100%",opacity:0}).removeClass("cbp-wrapper-front").addClass("cbp-wrapper-back");i[r.transition]({top:0,opacity:1}).addClass("cbp-wrapper-front").removeClass("cbp-wrapper-back");r._processStyle(r.transitionByFilter);r._resizeMainContainer(r.transition);setTimeout(function(){r._filterFinish()},400)},_moveLeftInit:function(){var e=this;e._duplicateContent({left:"100%",opacity:0});e.$ulClone.addClass("no-trans");e.transitionByFilter="css"},_moveLeftFilter:function(e,t,n){var r=this,i,s,o;if(n!=="*"){t=t.filter(n);e=r.blocks.not(".cbp-item-hidden").not(n).addClass("cbp-item-hidden")}t.removeClass("cbp-item-hidden");r.$obj.addClass("cbp-no-transition");if(r.ulHidden==="clone"){r.ulHidden="first";i=r.$ulClone;o=r.$ul;s=r.blocksClone}else{r.ulHidden="clone";i=r.$ul;o=r.$ulClone;s=r.blocks}s.css("opacity",0);s.addClass("cbp-item-hidden");r.blocksAvailable=s.filter(n);r.blocksAvailable.css("opacity",1);r.blocksAvailable.removeClass("cbp-item-hidden");r._layout();o[r.transition]({left:"-100%",opacity:0});i.removeClass("no-trans");if(r.transition==="css"){i[r.transition]({left:0,opacity:1});o.one(r.transitionEnd,function(){o.addClass("no-trans").css({left:"100%",opacity:0});r._filterFinish()})}else{i[r.transition]({left:0,opacity:1},function(){o.addClass("no-trans").css({left:"100%",opacity:0});r._filterFinish()})}r._processStyle(r.transitionByFilter);r._resizeMainContainer(r.transition)},_slideLeftInit:function(){var e=this;e._duplicateContent({});e.$ul.addClass("cbp-wrapper-front");e.$ulClone.css("opacity",0);e.transitionByFilter="css"},_slideLeftFilter:function(e,t,n){var r=this,i,s,o,u,a,f;r.blocks.show();r.blocksClone.show();if(n!=="*"){t=t.filter(n);e=r.blocks.not(".cbp-item-hidden").not(n).addClass("cbp-item-hidden")}t.removeClass("cbp-item-hidden");r.$obj.addClass("cbp-no-transition");r.blocks.find(".cbp-item-wrapper").removeClass("cbp-animation-slideLeft-out cbp-animation-slideLeft-in");r.blocksClone.find(".cbp-item-wrapper").removeClass("cbp-animation-slideLeft-out cbp-animation-slideLeft-in");r.$ul.css({opacity:1});r.$ulClone.css({opacity:1});if(r.ulHidden==="clone"){r.ulHidden="first";u=r.blocks;a=r.blocksClone;s=r.blocksClone;r.$ul.removeClass("cbp-wrapper-front");r.$ulClone.addClass("cbp-wrapper-front")}else{r.ulHidden="clone";u=r.blocksClone;a=r.blocks;s=r.blocks;r.$ul.addClass("cbp-wrapper-front");r.$ulClone.removeClass("cbp-wrapper-front")}s.css("opacity",0);s.addClass("cbp-item-hidden");r.blocksAvailable=s.filter(n);r.blocksAvailable.css({opacity:1});r.blocksAvailable.removeClass("cbp-item-hidden");r._layout();if(r.transition==="css"){u.find(".cbp-item-wrapper").addClass("cbp-animation-slideLeft-out");a.find(".cbp-item-wrapper").addClass("cbp-animation-slideLeft-in");f=u.find(".cbp-item-wrapper").last();if(f.length){f.one(r.animationEnd,function(){r._filterFinish()})}else{r._filterFinish()}}else{u.find(".cbp-item-wrapper").animate({left:"-100%"},400,function(){r._filterFinish()});a.find(".cbp-item-wrapper").css("left","100%");a.find(".cbp-item-wrapper").animate({left:0},400)}r._processStyle(r.transitionByFilter);r._resizeMainContainer("animate")},_slideDelayInit:function(){this._wrapperFilterInit()},_slideDelayFilter:function(e,t,n){this._wrapperFilter(e,t,n,"slideDelay",true)},_3dflipInit:function(){this._wrapperFilterInit()},_3dflipFilter:function(e,t,n){this._wrapperFilter(e,t,n,"3dflip",true)},_rotateSidesInit:function(){this._wrapperFilterInit()},_rotateSidesFilter:function(e,t,n){this._wrapperFilter(e,t,n,"rotateSides",true)},_flipOutDelayInit:function(){this._wrapperFilterInit()},_flipOutDelayFilter:function(e,t,n){this._wrapperFilter(e,t,n,"flipOutDelay",false)},_foldLeftInit:function(){this._wrapperFilterInit()},_foldLeftFilter:function(e,t,n){this._wrapperFilter(e,t,n,"foldLeft",true)},_unfoldInit:function(){this._wrapperFilterInit()},_unfoldFilter:function(e,t,n){this._wrapperFilter(e,t,n,"unfold",true)},_scaleDownInit:function(){this._wrapperFilterInit()},_scaleDownFilter:function(e,t,n){this._wrapperFilter(e,t,n,"scaleDown",true)},_frontRowInit:function(){this._wrapperFilterInit()},_frontRowFilter:function(e,t,n){this._wrapperFilter(e,t,n,"frontRow",true)},_rotateRoomInit:function(){this._wrapperFilterInit()},_rotateRoomFilter:function(e,t,n){this._wrapperFilter(e,t,n,"rotateRoom",true)},_wrapperFilterInit:function(){var e=this;e._duplicateContent({});e.$ul.addClass("cbp-wrapper-front");e.$ulClone.css("opacity",0);e.transitionByFilter="css"},_wrapperFilter:function(t,n,r,i,s){var o=this,u,a,f,l,c,h;o.blocks.show();o.blocksClone.show();if(r!=="*"){n=n.filter(r);t=o.blocks.not(".cbp-item-hidden").not(r).addClass("cbp-item-hidden")}n.removeClass("cbp-item-hidden");o.$obj.addClass("cbp-no-transition");o.blocks.find(".cbp-item-wrapper").removeClass("cbp-animation-"+i+"-out cbp-animation-"+i+"-in cbp-animation-"+i+"-fadeOut").css("style","");o.blocksClone.find(".cbp-item-wrapper").removeClass("cbp-animation-"+i+"-out cbp-animation-"+i+"-in cbp-animation-"+i+"-fadeOut").css("style","");o.$ul.css({opacity:1});o.$ulClone.css({opacity:1});if(o.ulHidden==="clone"){o.ulHidden="first";l=o.blocks;c=o.blocksClone;a=o.blocksClone;o.$ul.removeClass("cbp-wrapper-front");o.$ulClone.addClass("cbp-wrapper-front")}else{o.ulHidden="clone";l=o.blocksClone;c=o.blocks;a=o.blocks;o.$ul.addClass("cbp-wrapper-front");o.$ulClone.removeClass("cbp-wrapper-front")}l=o.blocksAvailable;a.css("opacity",0);a.addClass("cbp-item-hidden");o.blocksAvailable=a.filter(r);o.blocksAvailable.css({opacity:1});o.blocksAvailable.removeClass("cbp-item-hidden");c=o.blocksAvailable;o._layout();if(o.transition==="css"){var p=0,d=0;c.each(function(t,n){e(n).find(".cbp-item-wrapper").addClass("cbp-animation-"+i+"-in").css("animation-delay",d/20+"s");d++});l.each(function(t,n){if(d<=p&&s){e(n).find(".cbp-item-wrapper").addClass("cbp-animation-"+i+"-fadeOut")}else{e(n).find(".cbp-item-wrapper").addClass("cbp-animation-"+i+"-out").css("animation-delay",p/20+"s")}p++});h=l.find(".cbp-item-wrapper").first();if(h.length){h.one(o.animationEnd,function(){o._filterFinish()})}else{o._filterFinish()}}else{l.find(".cbp-item-wrapper").animate({left:"-100%"},400,function(){o._filterFinish()});c.find(".cbp-item-wrapper").css("left","100%");c.find(".cbp-item-wrapper").animate({left:0},400)}o._processStyle(o.transitionByFilter);o._resizeMainContainer("animate")},_filterFinish:function(){var e=this;e.isAnimating=false;e._triggerEvent("filterFinish");e.$obj.trigger("filterComplete")},_registerEvent:function(e,t,n){var r=this;if(!r.registeredEvents[e]){r.registeredEvents[e]=[];r.registeredEvents.push(e)}r.registeredEvents[e].push({func:t,oneTime:n||false})},_triggerEvent:function(e){var t=this;if(t.registeredEvents[e]){for(var n=t.registeredEvents[e].length-1;n>=0;n--){t.registeredEvents[e][n].func.call(t);if(t.registeredEvents[e][n].oneTime){t.registeredEvents[e].splice(n,1)}}}},init:function(t,n){var r=e.data(this,"cubeportfolio");if(r){throw new Error("cubeportfolio is already initialized. Please destroy it before initialize again!")}r=e.data(this,"cubeportfolio",Object.create(u));r._main(this,t,n)},destroy:function(n){var r=e.data(this,"cubeportfolio");if(!r){throw new Error("cubeportfolio is not initialized. Please initialize before calling destroy method!")}if(e.isFunction(n)){r._registerEvent("destroyFinish",n,true)}e.removeData(this,"cubeportfolio");e.each(r.blocks,function(t,n){e.removeData(this,"transformFn");e.removeData(this,"cbp-wxh")});r.$obj.removeClass("cbp cbp-loading cbp-ready cbp-no-transition");r.$ul.removeClass("cbp-wrapper-front cbp-wrapper-back cbp-wrapper no-trans").removeAttr("style");r.$obj.removeAttr("style");if(r.$ulClone){r.$ulClone.remove()}if(r.browser){r.$obj.removeClass("cbp-"+r.browser)}e(t).off("resize"+s);if(r.lightbox){r.lightbox.destroy()}if(r.singlePage){r.singlePage.destroy()}if(r.singlePageInline){r.singlePageInline.destroy()}r.blocks.removeClass("cbp-item-hidden").removeAttr("style");r.blocks.find(".cbp-item-wrapper").children().unwrap();if(r.options.caption){r._captionDestroy()}if(r.options.animationType){if(r.options.animationType==="boxShadow"){e(".cbp-animation-boxShadowMask").remove()}r.$obj.removeClass("cbp-animation-"+r.options.animationType)}r._triggerEvent("destroyFinish")},filter:function(t,n){var r=e.data(this,"cubeportfolio"),i,s;if(!r){throw new Error("cubeportfolio is not initialized. Please initialize before calling filter method!")}t=t==="*"||t===""?"*":t;if(r.isAnimating||r.defaultFilter==t){return}if(r.browser==="ie8"||r.browser==="ie9"){r.$obj.removeClass("cbp-no-transition cbp-appendItems-loading")}else{r.obj.classList.remove("cbp-no-transition");r.obj.classList.remove("cbp-appendItems-loading")}r.defaultFilter=t;r.isAnimating=true;if(e.isFunction(n)){r._registerEvent("filterFinish",n,true)}i=r.blocks.filter(".cbp-item-hidden");s=[];if(r.singlePageInline&&r.singlePageInline.isOpen){r.singlePageInline.close("promise",{callback:function(){r["_"+r.options.animationType+"Filter"](s,i,t)}})}else{r["_"+r.options.animationType+"Filter"](s,i,t)}},showCounter:function(t){var n=e.data(this,"cubeportfolio");if(!n){throw new Error("cubeportfolio is not initialized. Please initialize before calling showCounter method!")}n.elems=t;e.each(t,function(t,r){var i=e(this),s=i.data("filter"),o=0;s=s==="*"||s===""?"*":s;o=n.blocks.filter(s).length;i.find(".cbp-filter-counter").text(o)})},appendItems:function(t,n){var r=this,i=e.data(r,"cubeportfolio"),s,o,a,f;if(!i){throw new Error("cubeportfolio is not initialized. Please initialize before calling appendItems method!")}if(i.singlePageInline&&i.singlePageInline.isOpen){i.singlePageInline.close("promise",{callback:function(){u._addItems.call(r,t,n)}})}else{u._addItems.call(r,t,n)}},_addItems:function(t,n){var r=e.data(this,"cubeportfolio"),i,s,o,a;if(e.isFunction(n)){r._registerEvent("appendItemsFinish",n,true)}r.$obj.addClass("cbp-no-transition cbp-appendItems-loading");t=e(t).css("opacity",0);t.filter(".cbp-item").wrapInner('<div class="cbp-item-wrapper"></div>');a=t.filter(r.defaultFilter);if(r.ulHidden){if(r.ulHidden==="first"){t.appendTo(r.$ulClone);r.blocksClone=r.$ulClone.children();s=r.blocksClone;o=t.clone();o.appendTo(r.$ul);r.blocks=r.$ul.children()}else{t.appendTo(r.$ul);r.blocks=r.$ul.children();s=r.blocks;o=t.clone();o.appendTo(r.$ulClone);r.blocksClone=r.$ulClone.children()}}else{t.appendTo(r.$ul);r.blocks=r.$ul.children();s=r.blocks}if(r.options.caption){r._captionDestroy();r._captionInit()}i=r.defaultFilter;r.blocksAvailable=s.filter(i);s.not(".cbp-item-hidden").not(i).addClass("cbp-item-hidden");if(r.options.gridAdjustment==="responsive"){r._responsiveLayout()}r._layout();r._processStyle(r.transitionByFilter);r._resizeMainContainer("animate");a.animate({opacity:1},800,function(){switch(r.options.animationType){case"bounceLeft":case"bounceTop":case"bounceBottom":r.blocks.css("opacity",1);r.blocksClone.css("opacity",1);break}});if(r.elems){u.showCounter.call(this,r.elems)}setTimeout(function(){r._triggerEvent("appendItemsFinish")},900)}};e.fn.cubeportfolio=function(e){var t=arguments;return this.each(function(){if(u[e]){return u[e].apply(this,Array.prototype.slice.call(t,1))}else if(typeof e==="object"||!e){return u.init.apply(this,t)}else{throw new Error("Method "+e+" does not exist on jQuery.cubeportfolio.js")}})};e.fn.cubeportfolio.options={animationType:"fadeOut",gridAdjustment:"default",gapHorizontal:10,gapVertical:10,caption:"pushTop",displayType:"default",displayTypeSpeed:400,lightboxDelegate:".cbp-lightbox",lightboxGallery:true,lightboxTitleSrc:"data-title",lightboxShowCounter:true,singlePageDelegate:".cbp-singlePage",singlePageDeeplinking:true,singlePageStickyNavigation:true,singlePageShowCounter:true,singlePageCallback:function(e,t){},singlePageInlineDelegate:".cbp-singlePageInline",singlePageInlinePosition:"top",singlePageInlineCallback:function(e,t){}}})(jQuery,window,document);
(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.createEvent=function(a,b,c,d){var e;return null==b&&(b=!1),null==c&&(c=!1),null==d&&(d=null),null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e},a.prototype.emitEvent=function(a,b){return null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)?a["on"+b]():void 0},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.resetAnimation=f(this.resetAnimation,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new c,this.wowEvent=this.util().createEvent(this.config.boxClass)}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],c=0,d=b.length;d>c;c++)f=b[c],g.push(function(){var a,b,c,d;for(c=f.addedNodes||[],d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(this.doSync(e));return d}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),this.util().emitEvent(a,this.wowEvent),this.util().addEvent(a,"animationend",this.resetAnimation),this.util().addEvent(a,"oanimationend",this.resetAnimation),this.util().addEvent(a,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(a,"MSAnimationEnd",this.resetAnimation),a},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.resetAnimation=function(a){var b;return a.type.toLowerCase().indexOf("animationend")>=0?(b=a.target||a.srcElement,b.className=b.className.replace(this.config.animateClass,"").trim()):void 0},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;d=[];for(c in b)e=b[c],a[""+c]=e,d.push(function(){var b,d,g,h;for(g=this.vendors,h=[],b=0,d=g.length;d>b;b++)f=g[b],h.push(a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=e);return h}.call(this));return d},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(h=d(a),g=h.getPropertyCSSValue(b),f=this.vendors,c=0,e=f.length;e>c;c++)i=f[c],g=g||h.getPropertyCSSValue("-"+i+"-"+b);return g},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this);
(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){return t.replace(/(:|\.|\/)/g,"\\$1")}var l="1.5.4",o={},n={exclude:[],excludeWithin:[],offset:0,direction:"top",scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},s=function(e){var l=[],o=!1,n=e.dir&&"left"===e.dir?"scrollLeft":"scrollTop";return this.each(function(){if(this!==document&&this!==window){var e=t(this);e[n]()>0?l.push(this):(e[n](1),o=e[n]()>0,o&&l.push(this),e[n](0))}}),l.length||this.each(function(){"BODY"===this.nodeName&&(l=[this])}),"first"===e.el&&l.length>1&&(l=[l[0]]),l};t.fn.extend({scrollable:function(t){var e=s.call(this,{dir:t});return this.pushStack(e)},firstScrollable:function(t){var e=s.call(this,{el:"first",dir:t});return this.pushStack(e)},smoothScroll:function(l,o){if(l=l||{},"options"===l)return o?this.each(function(){var e=t(this),l=t.extend(e.data("ssOpts")||{},o);t(this).data("ssOpts",l)}):this.first().data("ssOpts");var n=t.extend({},t.fn.smoothScroll.defaults,l),s=t.smoothScroll.filterPath(location.pathname);return this.unbind("click.smoothscroll").bind("click.smoothscroll",function(l){var o=this,r=t(this),i=t.extend({},n,r.data("ssOpts")||{}),c=n.exclude,a=i.excludeWithin,f=0,h=0,u=!0,d={},p=location.hostname===o.hostname||!o.hostname,m=i.scrollTarget||t.smoothScroll.filterPath(o.pathname)===s,S=e(o.hash);if(i.scrollTarget||p&&m&&S){for(;u&&c.length>f;)r.is(e(c[f++]))&&(u=!1);for(;u&&a.length>h;)r.closest(a[h++]).length&&(u=!1)}else u=!1;u&&(i.preventDefault&&l.preventDefault(),t.extend(d,i,{scrollTarget:i.scrollTarget||S,link:o}),t.smoothScroll(d))}),this}}),t.smoothScroll=function(e,l){if("options"===e&&"object"==typeof l)return t.extend(o,l);var n,s,r,i,c,a=0,f="offset",h="scrollTop",u={},d={};"number"==typeof e?(n=t.extend({link:null},t.fn.smoothScroll.defaults,o),r=e):(n=t.extend({link:null},t.fn.smoothScroll.defaults,e||{},o),n.scrollElement&&(f="position","static"===n.scrollElement.css("position")&&n.scrollElement.css("position","relative"))),h="left"===n.direction?"scrollLeft":h,n.scrollElement?(s=n.scrollElement,/^(?:HTML|BODY)$/.test(s[0].nodeName)||(a=s[h]())):s=t("html, body").firstScrollable(n.direction),n.beforeScroll.call(s,n),r="number"==typeof e?e:l||t(n.scrollTarget)[f]()&&t(n.scrollTarget)[f]()[n.direction]||0,u[h]=r+a+n.offset,i=n.speed,"auto"===i&&(c=u[h]-s.scrollTop(),0>c&&(c*=-1),i=c/n.autoCoefficient),d={duration:i,easing:n.easing,complete:function(){n.afterScroll.call(n.link,n)}},n.step&&(d.step=n.step),s.length?s.stop().animate(u,d):n.afterScroll.call(n.link,n)},t.smoothScroll.version=l,t.smoothScroll.filterPath=function(t){return t=t||"",t.replace(/^\//,"").replace(/(?:index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")},t.fn.smoothScroll.defaults=n});
!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);
(function($,window){'$:nomunge';var undefined,aps=Array.prototype.slice,decode=decodeURIComponent,jq_param=$.param,jq_param_fragment,jq_deparam,jq_deparam_fragment,jq_bbq=$.bbq=$.bbq||{},jq_bbq_pushState,jq_bbq_getState,jq_elemUrlAttr,jq_event_special=$.event.special,str_hashchange='hashchange',str_querystring='querystring',str_fragment='fragment',str_elemUrlAttr='elemUrlAttr',str_location='location',str_href='href',str_src='src',re_trim_querystring=/^.*\?|#.*$/g,re_trim_fragment=/^.*\#/,re_no_escape,elemUrlAttr_cache={};function is_string(arg){return typeof arg==='string';};function curry(func){var args=aps.call(arguments,1);return function(){return func.apply(this,args.concat(aps.call(arguments)));};};function get_fragment(url){return url.replace(/^[^#]*#?(.*)$/,'$1');};function get_querystring(url){return url.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,'$1');};function jq_param_sub(is_fragment,get_func,url,params,merge_mode){var result,qs,matches,url_params,hash;if(params!==undefined){matches=url.match(is_fragment?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);hash=matches[3]||'';if(merge_mode===2&&is_string(params)){qs=params.replace(is_fragment?re_trim_fragment:re_trim_querystring,'');}else{url_params=jq_deparam(matches[2]);params=is_string(params)?jq_deparam[is_fragment?str_fragment:str_querystring](params):params;qs=merge_mode===2?params:merge_mode===1?$.extend({},params,url_params):$.extend({},url_params,params);qs=jq_param(qs);if(is_fragment){qs=qs.replace(re_no_escape,decode);}}result=matches[1]+(is_fragment?'#':qs||!matches[1]?'?':'')+qs+hash;}else{result=get_func(url!==undefined?url:window[str_location][str_href]);}return result;};jq_param[str_querystring]=curry(jq_param_sub,0,get_querystring);jq_param[str_fragment]=jq_param_fragment=curry(jq_param_sub,1,get_fragment);jq_param_fragment.noEscape=function(chars){chars=chars||'';var arr=$.map(chars.split(''),encodeURIComponent);re_no_escape=new RegExp(arr.join('|'),'g');};jq_param_fragment.noEscape(',/');$.deparam=jq_deparam=function(params,coerce){var obj={},coerce_types={'true':!0,'false':!1,'null':null};$.each(params.replace(/\+/g,' ').split('&'),function(j,v){var param=v.split('='),key=decode(param[0]),val,cur=obj,i=0,keys=key.split(']['),keys_last=keys.length-1;if(/\[/.test(keys[0])&&/\]$/.test(keys[keys_last])){keys[keys_last]=keys[keys_last].replace(/\]$/,'');keys=keys.shift().split('[').concat(keys);keys_last=keys.length-1;}else{keys_last=0;}if(param.length===2){val=decode(param[1]);if(coerce){val=val&&!isNaN(val)?+val:val==='undefined'?undefined:coerce_types[val]!==undefined?coerce_types[val]:val;}if(keys_last){for(;i<=keys_last;i++){key=keys[i]===''?cur.length:keys[i];cur=cur[key]=i<keys_last?cur[key]||(keys[i+1]&&isNaN(keys[i+1])?{}:[]):val;}}else{if($.isArray(obj[key])){obj[key].push(val);}else if(obj[key]!==undefined){obj[key]=[obj[key],val];}else{obj[key]=val;}}}else if(key){obj[key]=coerce?undefined:'';}});return obj;};function jq_deparam_sub(is_fragment,url_or_params,coerce){if(url_or_params===undefined||typeof url_or_params==='boolean'){coerce=url_or_params;url_or_params=jq_param[is_fragment?str_fragment:str_querystring]();}else{url_or_params=is_string(url_or_params)?url_or_params.replace(is_fragment?re_trim_fragment:re_trim_querystring,''):url_or_params;}return jq_deparam(url_or_params,coerce);};jq_deparam[str_querystring]=curry(jq_deparam_sub,0);jq_deparam[str_fragment]=jq_deparam_fragment=curry(jq_deparam_sub,1);$[str_elemUrlAttr]||($[str_elemUrlAttr]=function(obj){return $.extend(elemUrlAttr_cache,obj);})({a:str_href,base:str_href,iframe:str_src,img:str_src,input:str_src,form:'action',link:str_href,script:str_src});jq_elemUrlAttr=$[str_elemUrlAttr];function jq_fn_sub(mode,force_attr,params,merge_mode){if(!is_string(params)&&typeof params!=='object'){merge_mode=params;params=force_attr;force_attr=undefined;}return this.each(function(){var that=$(this),attr=force_attr||jq_elemUrlAttr()[(this.nodeName||'').toLowerCase()]||'',url=attr&&that.attr(attr)||'';that.attr(attr,jq_param[mode](url,params,merge_mode));});};$.fn[str_querystring]=curry(jq_fn_sub,str_querystring);$.fn[str_fragment]=curry(jq_fn_sub,str_fragment);jq_bbq.pushState=jq_bbq_pushState=function(params,merge_mode){if(is_string(params)&&/^#/.test(params)&&merge_mode===undefined){merge_mode=2;}var has_args=params!==undefined,url=jq_param_fragment(window[str_location][str_href],has_args?params:{},has_args?merge_mode:2);window[str_location][str_href]=url+(/#/.test(url)?'':'#');};jq_bbq.getState=jq_bbq_getState=function(key,coerce){return key===undefined||typeof key==='boolean'?jq_deparam_fragment(key):jq_deparam_fragment(coerce)[key];};jq_bbq.removeState=function(arr){var state={};if(arr!==undefined){state=jq_bbq_getState();$.each($.isArray(arr)?arr:arguments,function(i,v){delete state[v];});}jq_bbq_pushState(state,2);};jq_event_special[str_hashchange]=$.extend(jq_event_special[str_hashchange],{add:function(handleObj){var old_handler;function new_handler(e){var hash=e[str_fragment]=jq_param_fragment();e.getState=function(key,coerce){return key===undefined||typeof key==='boolean'?jq_deparam(hash,key):jq_deparam(hash,coerce)[key];};old_handler.apply(this,arguments);};if($.isFunction(handleObj)){old_handler=handleObj;return new_handler;}else{old_handler=handleObj.handler;handleObj.handler=new_handler;}}});})(jQuery,this);(function($,window,undefined){'$:nomunge';var fake_onhashchange,jq_event_special=$.event.special,str_location='location',str_hashchange='hashchange',str_href='href',browser=$.browser,mode=document.documentMode,is_old_ie=browser.msie&&(mode===undefined||mode<8),supports_onhashchange='on'+str_hashchange in window&&!is_old_ie;function get_fragment(url){url=url||window[str_location][str_href];return url.replace(/^[^#]*#?(.*)$/,'$1');};$[str_hashchange+'Delay']=100;jq_event_special[str_hashchange]=$.extend(jq_event_special[str_hashchange],{setup:function(){if(supports_onhashchange){return false;}$(fake_onhashchange.start);},teardown:function(){if(supports_onhashchange){return false;}$(fake_onhashchange.stop);}});fake_onhashchange=(function(){var self={},timeout_id,iframe,set_history,get_history;function init(){set_history=get_history=function(val){return val;};if(is_old_ie){iframe=$('<iframe src="javascript:0"/>').hide().insertAfter('body')[0].contentWindow;get_history=function(){return get_fragment(iframe.document[str_location][str_href]);};set_history=function(hash,history_hash){if(hash!==history_hash){var doc=iframe.document;doc.open().close();doc[str_location].hash='#'+hash;}};set_history(get_fragment());}};self.start=function(){if(timeout_id){return;}var last_hash=get_fragment();set_history||init();(function loopy(){var hash=get_fragment(),history_hash=get_history(last_hash);if(hash!==last_hash){set_history(last_hash=hash,history_hash);$(window).trigger(str_hashchange);}else if(history_hash!==last_hash){window[str_location][str_href]=window[str_location][str_href].replace(/#.*/,'')+'#'+history_hash;}timeout_id=setTimeout(loopy,$[str_hashchange+'Delay']);})();};self.stop=function(){if(!iframe){timeout_id&&clearTimeout(timeout_id);timeout_id=0;}};return self;})();})(jQuery,this);
window.$body=$('body');window.$window=$(window);window.WAITING=0;window.READY=1;window.BEGUN=2;window.BREAK_SMALL=640;window.BREAK_MEDIUM=1024;window.THEME_URL='';window.BASE_URL='/cache.php?request=';window.NO_CACHE_BASE_URL='';var init_root;init_root=function($scope,$rootScope){var _all_finished_triggered,_all_images_loaded,_all_requests_finished,all_finished,all_requests_finished,execute_lazy_load,outstanding_requests,scheduled_to_load,watch_all_finished,watch_request_finished,watch_requests_finished,watch_window_load,watch_window_resize,watch_window_scroll;$rootScope.lazy_load_state=WAITING;$rootScope.theme_url=THEME_URL;scheduled_to_load=[];outstanding_requests=0;watch_request_finished={};watch_requests_finished=[];watch_all_finished=[];_all_requests_finished=true;_all_images_loaded=true;_all_finished_triggered=false;watch_window_resize=[];watch_window_load=[];watch_window_scroll=[];$rootScope.window_properties={};$rootScope.schedule_lazy_load=function(callback){_all_images_loaded=false;scheduled_to_load.push(callback);if($rootScope.lazy_load_state===READY){return execute_lazy_load();}};execute_lazy_load=function(){var callback;callback=scheduled_to_load.shift();if(callback){$rootScope.lazy_load_state=BEGUN;return callback(function(){return execute_lazy_load();});}else{$rootScope.lazy_load_state=READY;_all_images_loaded=true;return all_finished();}};$rootScope.clear_lazy_load=function(){scheduled_to_load=[];return $rootScope.lazy_load_state=READY;};$rootScope.on_window_load=function(callback){if($rootScope.loaded){return callback();}else{return watch_window_load.push(callback);}};$rootScope.on_window_scroll=function(callback,trigger_immediately){watch_window_scroll.push(callback);if(trigger_immediately){return callback();}};$rootScope.on_window_resize=function(callback,trigger_immediately){watch_window_resize.push(callback);if(trigger_immediately){return callback();}};$rootScope.on_request_finished=function(request_path,callback){return watch_request_finished[request_path]=callback;};$rootScope.on_requests_finished=function(callback){_all_requests_finished=false;return watch_requests_finished.push(callback);};$rootScope.on_all_finished=function(callback){return watch_all_finished.push(callback);};all_requests_finished=function(){angular.forEach(watch_requests_finished,function(callback){return callback();});_all_requests_finished=true;return all_finished();};all_finished=function(){if(_all_finished_triggered){return;}if(_all_requests_finished&&_all_images_loaded){_all_finished_triggered=true;return angular.forEach(watch_all_finished,function(callback){return callback();});}};$rootScope.on_window_resize(function(){var mobile;mobile=$rootScope.window_properties.width<BREAK_SMALL?true:false;if($rootScope.mobile!==mobile){$rootScope.mobile_state_change=true;}else{$rootScope.mobile_state_change=false;}return $rootScope.mobile=mobile;});$rootScope.on_all_finished(function(){return $body.addClass('all_loaded');});$rootScope.on_window_load(function(){$rootScope.loaded=true;$rootScope.lazy_load_state=READY;if(!$rootScope.$$phase){$rootScope.$digest();}return execute_lazy_load();});$(window).scroll(function(){return angular.forEach(watch_window_scroll,function(value){return value();});});$(window).load(function(){return angular.forEach(watch_window_load,function(value){return value();});});$(window).resize(function(){$rootScope.window_properties.height=$(this).height();$rootScope.window_properties.width=$(this).width();angular.forEach(watch_window_resize,function(value){return value();});if(!$rootScope.$$phase){return $rootScope.$apply();}}).trigger('resize');$scope.$on('$locationChangeSuccess',function(event){return $rootScope.new_page();});$rootScope.new_page=function(){_all_finished_triggered=false;_all_images_loaded=true;_all_requests_finished=true;return $body.removeClass('all_loaded');};return $rootScope.request=function(base_url,path,menu_path,callback){outstanding_requests+=1;if(!menu_path){menu_path='';}return $.get(base_url+path+menu_path,function(response){outstanding_requests-=1;callback(response);if(watch_request_finished[path]){watch_request_finished[path]();delete watch_request_finished[path];}if(outstanding_requests===0){return all_requests_finished();}});};};var SimpleHelpers,json_action;SimpleHelpers=angular.module('SimpleHelpers',[]);SimpleHelpers.directive("lazyBackground",function($rootScope){return{restrict:"A",link:function(scope,element,attrs){return $rootScope.schedule_lazy_load(function(done){var image,loaded,timeout,url;if($rootScope.window_properties.width<=BREAK_SMALL){url=attrs.smallLazyBackground;}else{url=attrs.lazyBackground;}if(!url){return done();}image=$('<img class="preloader" />');timeout=null;loaded=function(){clearTimeout(timeout);element.css('background-image','url("'+url+'")');setTimeout(function(){element.addClass('loaded');return element.trigger('loaded');},parseInt(attrs.lazyDelay)||0);image.unbind('load');image.remove();return done();};timeout=setTimeout(loaded,1000);image.load(loaded);return image.attr('src',url);});}};});SimpleHelpers.directive("lazyImage",function($rootScope){return{restrict:"A",link:function(scope,element,attrs){return $rootScope.schedule_lazy_load(function(done){var loaded,timeout,url;url=attrs.lazyImage;timeout=null;loaded=function(e){clearTimeout(timeout);element.attr('src',url);element.addClass('loaded');element.unbind('load');element.trigger('loaded');return done();};element.load(loaded);return element.attr('src',url);});}};});SimpleHelpers.directive("matchWindowHeight",function($rootScope){return{restrict:"A",link:function(scope,element,attrs){var match_height,mobile_offset,normal_offset,offsets,only_once,ref;only_once=(ref=attrs.matchOnlyOnce!==void 0)!=null?ref:{"true":false};if(attrs.matchWindowHeight.match(/^-?[0-9|-]+$/)){offsets=attrs.matchWindowHeight.split('|');normal_offset=parseInt(offsets[0]);if(offsets[1]){mobile_offset=parseInt(offsets[1]);}}else{normal_offset=-$(attrs.matchWindowHeight).height();}match_height=function(window_properties){var offset;if($rootScope.mobile&&mobile_offset){offset=mobile_offset;}else{offset=normal_offset;}return element.css('height',window_properties.height+offset);};if(only_once){return match_height($rootScope.window_properties);}else{return $rootScope.$watch('window_properties',function(new_value,old_value){return match_height(new_value);},true);}}};});SimpleHelpers.directive("centerHorizontally",function($rootScope,$timeout){return{restrict:"A",link:function(scope,element,attrs){var set_margin;set_margin=function(){if(!$rootScope.window_properties.width){return;}if(element.width()>$rootScope.window_properties.width){return element.css('margin-left',-(element.width()-$rootScope.window_properties.width)/2);}else{return element.css('margin-left',-element.width()/2);}};$rootScope.on_window_resize(set_margin);return $timeout(set_margin);}};});SimpleHelpers.directive("centerVertically",function($rootScope,$timeout){return{restrict:"A",link:function(scope,element,attrs){var set_margin;set_margin=function(){return element.css('marginTop',-element.height()/2);};element.addClass('center-vertically');$rootScope.on_window_resize(set_margin);return $timeout(set_margin);}};});SimpleHelpers.directive("parallax",function($rootScope){return{restrict:"A",link:function(scope,element,attrs){var base,scroll_element,travel,wh;if(!$rootScope.mobile){travel=parseInt(attrs.parallax);base=parseInt(attrs.parallaxBase);scroll_element=element;if(attrs.parallaxContainer){scroll_element=$(attrs.parallaxContainer);}wh=$rootScope.window_properties.height;return $rootScope.on_window_scroll(function(){var current_travel,option,parallax_end,parallax_percent,parallax_start;parallax_start=Math.max(scroll_element.offset().top-wh,0);parallax_end=parallax_start+wh+scroll_element.height();parallax_percent=Math.max($window.scrollTop()-parallax_start,0)/parallax_end;current_travel=base+(travel*parallax_percent-travel/2);option=current_travel+'px';return element.css('top',option);});}}};});SimpleHelpers.directive("onLoaded",function($rootScope){return{restrict:"A",link:function(scope,element,attrs){return element.on('loaded',function(){return json_action(eval('('+attrs.onLoaded+')'),element);});}};});SimpleHelpers.directive("onOtherLoaded",function($rootScope){return{restrict:"A",link:function(scope,element,attrs){return $(attrs.onOtherLoadedSelector).on('loaded',function(){return json_action(eval('('+attrs.onOtherLoaded+')'),element);});}};});SimpleHelpers.directive("onWindowLoad",function($rootScope){return{restrict:"A",link:function(scope,element,attrs){return $rootScope.on_window_load(function(){return json_action(eval('('+attrs.onWindowLoad+')'),element);});}};});SimpleHelpers.directive("onRequestFinished",function($rootScope){return{restrict:"A",link:function(scope,element,attrs){return $rootScope.on_request_finished(attrs.onRequestFinished,function(){return json_action(eval('('+attrs.onRequestFinishedAction+')'),element);});}};});SimpleHelpers.directive("onRequestsFinished",function($rootScope){return{restrict:"A",link:function(scope,element,attrs){return $rootScope.on_requests_finished(function(){return json_action(eval('('+attrs.onRequestsFinished+')'),element);});}};});SimpleHelpers.directive("onAllFinished",function($rootScope){return{restrict:"A",link:function(scope,element,attrs){return $rootScope.on_all_finished(function(){return json_action(eval('('+attrs.onAllFinished+')'),element);});}};});SimpleHelpers.directive("onVisible",function($rootScope){return{restrict:"A",link:function(scope,element,attrs){return setTimeout(function(){var becomes_visible,offset,on_scroll,wh;if(attrs.onVisibleOffset){if(attrs.onVisibleOffset.indexOf('%')>-1){offset=$window.height()*(parseInt(attrs.onVisibleOffset)/100);}else{offset=parseInt(attrs.onVisibleOffset);}}offset=offset||0;wh=$rootScope.window_properties.height;becomes_visible=element.offset().top-wh+offset;on_scroll=function(){if($window.scrollTop()>becomes_visible){json_action(eval('('+attrs.onVisible+')'),element);return $window.unbind('scroll',on_scroll);}};$window.scroll(on_scroll);return $window.trigger('scroll');},100);}};});SimpleHelpers.directive("loadBlock",function($rootScope,$location){return{restrict:"AE",link:function(scope,element,attrs){var menu_path;menu_path=attrs.menuPath||'';if(!menu_path&&attrs.includePath){menu_path=$location.path();}return $rootScope.request(BASE_URL,'/load/blocks/'+attrs.loadBlock,menu_path,function(response){element.html(response);return element.trigger('loaded');});}};});SimpleHelpers.directive("loadJson",function($rootScope){return{restrict:"AE",link:function(scope,element,attrs){return $rootScope.request(BASE_URL,attrs.loadJson,'',function(response){scope.data=JSON.parse(response);scope.$apply();return element.trigger('loaded');});},template:function(tElement,tAttrs){return tElement.html();}};});SimpleHelpers.directive("loadBlockRegion",function($rootScope,$compile,$location){return{restrict:"AE",link:function(scope,element,attrs){var menu_path;menu_path=attrs.menuPath||'';if(!menu_path&&attrs.includePath){menu_path=$location.path();}return $rootScope.request(BASE_URL,'/load/block_region/'+attrs.loadBlockRegion,menu_path,function(response){var template;template=$(response);element.append(template);$compile(template)(scope);element.trigger('loaded');if(attrs.jsScrollbar!==void 0){if(!$rootScope.mobile){return element.parent().nanoScroller({preventPageScrolling:true});}}});}};});SimpleHelpers.directive("loadHtml",function($rootScope,$compile){return{restrict:"AE",link:function(scope,element,attrs){return $rootScope.request(BASE_URL,attrs.loadHtml,false,function(response){var template;template=$(response);element.append(template);$compile(template)(scope);return element.trigger('loaded');});}};});SimpleHelpers.directive("prependTo",function(){return{restrict:"A",link:function(scope,element,attrs){return element.prependTo(attrs.prependTo);}};});SimpleHelpers.filter('classify',function(){return function(input){if(input){return input.toLowerCase().replace(/[^a-z]+/g,'_');}return'';};});SimpleHelpers.directive("portraitOrLandscape",function($rootScope){return{restrict:"A",link:function(scope,element,attrs){var detect,only_once,ref;only_once=(ref=attrs.setOnlyOnce!==void 0)!=null?ref:{"true":false};detect=function(){if($window.height()>$window.width()){element.addClass('portrait');return element.removeClass('landscape');}else{element.addClass('landscape');return element.removeClass('portrait');}};if(only_once){detect($rootScope.window_properties);}else{$rootScope.on_window_resize=function(){return detect();};}return detect();}};});SimpleHelpers.directive("activeTrail",function($location){return{restrict:"A",link:function(scope,element,attrs){var links,set_active_trail;links=element.find('a');set_active_trail=function(){return angular.forEach(links,function(link){var uri;link=$(link);uri=URI();if(link.attr('href')===uri.path()){return link.addClass('active');}else{return link.removeClass('active');}});};set_active_trail();return scope.$on('$routeChangeSuccess',function(current){return set_active_trail();});}};});SimpleHelpers.directive("cycleChildren",function(){return{restrict:"A",link:function(scope,element,attrs){var autoPlay,children,cycleNav,i,navButtons,showSlide,timeout;autoPlay=parseInt(attrs.autoPlay);children=element.find('> *');timeout=null;i=0;if(children.length>1){cycleNav=$('<ul class="cycle_nav"></ul>');angular.forEach(children,function(){return cycleNav.append('<li></li>');});cycleNav.appendTo(element);cycleNav.on('click','li',function(){return showSlide($(this).index());});navButtons=cycleNav.find('li');}showSlide=function(i){if(i>children.length-1){i=0;}clearTimeout(timeout);if(navButtons){navButtons.removeClass('active').eq(i).addClass('active');}children.removeClass('active').eq(i).addClass('active');if(autoPlay&&children.length>1){return timeout=setTimeout(function(){return showSlide(i+1);},autoPlay);}};return children.eq(0).on('loaded',function(){showSlide(i);return element.addClass('active');});}};});SimpleHelpers.directive("tabbedContent",function(){return{restrict:"A",link:function(scope,element,attrs){var links,panels;links=element.find('a');panels=$(attrs.tabbedContent+' [panel]');links.click(function(){links.removeClass('active');$(this).addClass('active');panels.removeClass('active').filter('[panel='+$(this).attr('panel')+']').addClass('active');$window.trigger('resize');return false;});return links.eq(0).trigger('click');}};});SimpleHelpers.directive("osSpecificLink",function(){return{restrict:"A",link:function(scope,element,attrs){return $window.load(function(){var href,os,re;os=platform.os.family.toLowerCase();re=new RegExp("windows|mac|linux","g");href=element.attr('href');if(os.indexOf('windows')>-1){element.attr('href',href.replace(re,'windows'));}if(os.indexOf('mac')>-1){return element.attr('href',href.replace(re,'mac'));}else if(os.indexOf('linux centos debian fedora gentoo gnewsense kubuntu mandriva mageia mandriva red hat slackware suse turbolinux ubuntu limo')>-1){return element.attr('href',href.replace(re,'linux'));}});}};});json_action=function(actions,element){var delay,speed,transition;transition=actions.animate;delay=actions.delay||0;if(transition){speed=transition.speed||700;delete transition.speed;setTimeout(function(){return element.velocity(transition,speed);},delay);}if(actions["class"]){element.addClass(actions["class"]);}if(actions.play_video){return element.get(0).play();}};var Docker;window.Docker=Docker=angular.module('Docker',['SimpleHelpers','ngSanitize','ngAnimate','ngTouch']);Docker.controller('DockerController',function($rootScope,$scope){var getCookie,userName;init_root($scope,$rootScope);$rootScope.on_window_resize(function(){if($('#content').height()+$('footer').height()+20<$window.height()){return $body.addClass('short');}else{return $body.removeClass('short');}},true);getCookie=function(cname){var c,ca,cookie,i,len,name;name=cname+"=";ca=document.cookie.split(';');for(i=0,len=ca.length;i<len;i++){cookie=ca[i];c=cookie.trim();if(c.indexOf(name)===0){return c.substring(name.length,c.length);}}return"";};userName=getCookie('docker_sso_username');if(userName){$('a[href="/support"]').attr('href','http://support.docker.com');$('ul.nav-global a[href="https://hub.docker.com/account/signup/"]').text('Logout').attr('href','https://hub.docker.com/account/logout/?next=/');return $('ul.nav-global a.button').text('Go to Hub').attr('href','https://hub.docker.com/');}});Docker.controller('EventsController',function($scope,$rootScope,$timeout){$scope.events=$.parseJSON($('#event_data').html());$scope.searchType='upcoming';$scope.searchRegion='any';$scope.searchMeetupType='any';$timeout(function(){$('.event.static').remove();return $('.search-results').addClass('loaded');});$scope.filterEvents=function(){if(!$scope.searchString&&!$scope.searchMeetupType&&!$scope.searchRegion){$scope.filtered=$scope.events.slice(0,50);return;}$scope.filtered=[];angular.forEach($scope.events,function(ev){var include;include=true;if(!ev.field_meetup_type){ev.field_meetup_type='';}if(!ev.upcoming){include=false;}if(!ev.field_region){return;}if($scope.searchString){if(!ev.searchableText.includes($scope.searchString.toLowerCase())){include=false;}}if($scope.searchMeetupType!=='any'&&$scope.searchMeetupType.toLowerCase().trim()!==ev.field_meetup_type.toLowerCase().trim()){include=false;}if($scope.searchRegion!=='any'&&$scope.searchRegion.toLowerCase()!==ev.field_region.toLowerCase()){include=false;}if(include){return $scope.filtered.push(ev);}});return $scope.filtered=$scope.filtered.slice(0,100);};return $scope.filterEvents();});Docker.controller('CustomersController',function($scope,$rootScope,$timeout){$scope.customers=$('.customers .customer');$scope.details=$('.customers .customer-details');return $scope.showDetails=function(i){var details;$scope.details.removeClass('open');$scope.customers.eq(i);details=$scope.details.eq(i);details.insertAfter($scope.customers.eq(i+3-i%4));details.addClass('open');};});Docker.controller('ContributeController',function($scope,$rootScope,$timeout){var connections,fuzzyMatch,i,loadIframe,repos;repos=$('ul.repos li');connections=0;i=0;loadIframe=function(){var iframe;iframe=repos.eq(i).find('iframe');iframe.attr('src',iframe.attr('_src'));connections+=1;i+=1;if(repos.length>i&&connections<=3){loadIframe();}return iframe.load(function(){connections-=1;if(repos.length>i&&connections<=3){return loadIframe();}});};loadIframe();fuzzyMatch=function(str,pattern){pattern=pattern.split("").reduce(function(a,b){return a+".* "+b;});return(new RegExp(pattern)).test(str);};return $scope.filterRepos=function(){repos.each(function(){if($(this).attr('name').score($scope.searchString)>.2||!$scope.searchString){return $(this).show();}else{return $(this).hide();}});};});Docker.controller('SelectContentController',function($scope,$rootScope,$element,$timeout){$scope.$watch('selectData',function(newValue,oldValue){if(newValue){$scope.selectOptions=newValue.split(',');$scope.displayedContent=$scope.selectOptions[0];return $scope.ChangeContent();}});return $scope.ChangeContent=function(){var i;i=$('option[label="'+this.displayedContent+'"]').index();if($('option[label="'+this.displayedContent+'"]').index()==-1){i=0;}$element.find('.select-content').hide().eq(i).show();};});Docker.controller('TeamController',function($scope,$rootScope,$element,$timeout){var links,select;links=$element.find('a[href^="#"]');select=null;$('#grnhse_iframe').load(function(){return select=$('#grnhse_iframe').contents().find('#departments-select');});return links.click(function(){var evt,team,val;$('html, body').animate({scrollTop:$("#grnhse_iframe").offset().top-100},750);if(select){team=$(this).attr('href').replace('#','');val=select.find('option:contains("'+team+'")').attr('value');select.val(val);if(document.createEvent!=null){evt=document.createEvent("HTMLEvents");evt.initEvent("change",false,true);select.get(0).dispatchEvent(evt);}else{select.get(0).fireEvent("onchange");}}return false;});});Docker.controller('ManagementController',function($scope,$rootScope,$element,$timeout){$(window).on('load resize',function(){if(Modernizr.mq('only screen and (min-width: 58.8125em)')){return $scope.columns=4;}else if(Modernizr.mq('only screen and (min-width: 40.0625em)')){return $scope.columns=3;}else{return $scope.columns=2;}});return $('a.more').click(function(){var columns,details,n,parent_li,parent_ul,row;$('.current').remove();$('.selected').removeClass('selected');parent_ul=$(this).parents('ul');parent_li=$(this).parents('li');details=parent_li.find('.bio-details').clone();n=parent_li.index();columns=$scope.columns;row=Math.floor(n/$scope.columns)+1;$(this).parents('li').addClass('selected');if((parent_ul.find('li').eq(row*columns-1)[0])){return details.insertAfter(parent_ul.find('li').eq(row*columns-1)).addClass('current');}else{return details.insertAfter(parent_ul.find('li:last-child')).addClass('current');}});});Docker.controller('PartnersController',function($scope,$rootScope,$element,$timeout){var content;content=$('.page-content > .row').offset().top-30;return $(window).scroll(function(){if(content<$(window).scrollTop()&&Modernizr.mq('only screen and (min-width: 58.8125em)')){return $('.page-content .large-3 ul').addClass('fixed-bar');}else{return $('.page-content .large-3 ul').removeClass('fixed-bar');}});});Docker.controller('NewsController',function($scope,$rootScope,$timeout){var newsPage;$scope.moreNews=true;newsPage=1;$scope.news=[];return $scope.loadMore=function(type){return $.get('/api/news-and-press?type='+type+'&page='+newsPage,function(response){if(response){newsPage+=1;response=$.parseJSON(response);$scope.moreNews=response.more;$scope.news=$scope.news.concat(response.news);return $scope.$apply();}});};});Docker.controller('SocialCountController',function($scope,$rootScope,$timeout){return $(window).load(function(){return $('.social a').click(function(e){window.social=$(this).attr('class');window.project=$(this).parents('.hack_idea').attr('id');return $.ajax({type:"POST",url:'/count/'+window.project+'/'+window.social,async:true,cache:false,success:function(response){return window.project=window.social='';}});});});});