try{(function(e,t){typeof module=="object"&&typeof module.exports=="object"?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)})(typeof window!="undefined"?window:this,function(window,noGlobal){function isArraylike(e){var t=e.length,n=jQuery.type(e);return n==="function"||jQuery.isWindow(e)?!1:e.nodeType===1&&t?!0:n==="array"||t===0||typeof t=="number"&&t>0&&t-1 in e}function winnow(e,t,n){if(jQuery.isFunction(t))return jQuery.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return jQuery.grep(e,function(e){return e===t!==n});if(typeof t=="string"){if(risSimple.test(t))return jQuery.filter(t,e,n);t=jQuery.filter(t,e)}return jQuery.grep(e,function(e){return indexOf.call(t,e)>=0!==n})}function sibling(e,t){while((e=e[t])&&e.nodeType!==1);return e}function createOptions(e){var t=optionsCache[e]={};return jQuery.each(e.match(rnotwhite)||[],function(e,n){t[n]=!0}),t}function completed(){document.removeEventListener("DOMContentLoaded",completed,!1),window.removeEventListener("load",completed,!1),jQuery.ready()}function Data(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=jQuery.expando+Math.random()}function dataAttr(e,t,n){var r;if(n===undefined&&e.nodeType===1){r="data-"+t.replace(rmultiDash,"-$1").toLowerCase(),n=e.getAttribute(r);if(typeof n=="string"){try{n=n==="true"?!0:n==="false"?!1:n==="null"?null:+n+""===n?+n:rbrace.test(n)?jQuery.parseJSON(n):n}catch(i){}data_user.set(e,t,n)}else n=undefined}return n}function returnTrue(){return!0}function returnFalse(){return!1}function safeActiveElement(){try{return document.activeElement}catch(e){}}function manipulationTarget(e,t){return jQuery.nodeName(e,"table")&&jQuery.nodeName(t.nodeType!==11?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function disableScript(e){return e.type=(e.getAttribute("type")!==null)+"/"+e.type,e}function restoreScript(e){var t=rscriptTypeMasked.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function setGlobalEval(e,t){var n=0,r=e.length;for(;n")).appendTo(t.documentElement),t=iframe[0].contentDocument,t.write(),t.close(),n=actualDisplay(e,t),iframe.detach();elemdisplay[e]=n}return n}function curCSS(e,t,n){var r,i,s,o,u=e.style;return n=n||getStyles(e),n&&(o=n.getPropertyValue(t)||n[t]),n&&(o===""&&!jQuery.contains(e.ownerDocument,e)&&(o=jQuery.style(e,t)),rnumnonpx.test(o)&&rmargin.test(t)&&(r=u.width,i=u.minWidth,s=u.maxWidth,u.minWidth=u.maxWidth=u.width=o,o=n.width,u.width=r,u.minWidth=i,u.maxWidth=s)),o!==undefined?o+"":o}function addGetHookIf(e,t){return{get:function(){if(e()){delete this.get;return}return(this.get=t).apply(this,arguments)}}}function vendorPropName(e,t){if(t in e)return t;var n=t[0].toUpperCase()+t.slice(1),r=t,i=cssPrefixes.length;while(i--){t=cssPrefixes[i]+n;if(t in e)return t}return r}function setPositiveNumber(e,t,n){var r=rnumsplit.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function augmentWidthOrHeight(e,t,n,r,i){var s=n===(r?"border":"content")?4:t==="width"?1:0,o=0;for(;s<4;s+=2)n==="margin"&&(o+=jQuery.css(e,n+cssExpand[s],!0,i)),r?(n==="content"&&(o-=jQuery.css(e,"padding"+cssExpand[s],!0,i)),n!=="margin"&&(o-=jQuery.css(e,"border"+cssExpand[s]+"Width",!0,i))):(o+=jQuery.css(e,"padding"+cssExpand[s],!0,i),n!=="padding"&&(o+=jQuery.css(e,"border"+cssExpand[s]+"Width",!0,i)));return o}function getWidthOrHeight(e,t,n){var r=!0,i=t==="width"?e.offsetWidth:e.offsetHeight,s=getStyles(e),o=jQuery.css(e,"boxSizing",!1,s)==="border-box";if(i<=0||i==null){i=curCSS(e,t,s);if(i<0||i==null)i=e.style[t];if(rnumnonpx.test(i))return i;r=o&&(support.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+augmentWidthOrHeight(e,t,n||(o?"border":"content"),r,s)+"px"}function showHide(e,t){var n,r,i,s=[],o=0,u=e.length;for(;o=0&&n=0},isPlainObject:function(e){return jQuery.type(e)!=="object"||e.nodeType||jQuery.isWindow(e)?!1:e.constructor&&!hasOwn.call(e.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return e==null?e+"":typeof e=="object"||typeof e=="function"?class2type[toString.call(e)]||"object":typeof e},globalEval:function(code){var script,indirect=eval;code=jQuery.trim(code),code&&(code.indexOf("use strict")===1?(script=document.createElement("script"),script.text=code,document.head.appendChild(script).parentNode.removeChild(script)):indirect(code))},camelCase:function(e){return e.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,s=e.length,o=isArraylike(e);if(n)if(o)for(;ir.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function ut(e){return e[w]=!0,e}function at(e){var t=p.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ft(e,t){var n=e.split("|"),i=e.length;while(i--)r.attrHandle[n[i]]=t}function lt(e,t){var n=t&&e,r=n&&e.nodeType===1&&t.nodeType===1&&(~t.sourceIndex||A)-(~e.sourceIndex||A);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function ht(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function pt(e){return ut(function(t){return t=+t,ut(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function dt(e){return e&&typeof e.getElementsByTagName!==L&&e}function vt(){}function mt(e){var t=0,n=e.length,r="";for(;t1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function bt(e,t,n){var r=0,i=t.length;for(;r-1&&(s[f]=!(o[f]=c))}}else g=wt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):P.apply(o,g)})}function St(e){var t,n,i,s=e.length,o=r.relative[e[0].type],u=o||r.relative[" "],a=o?1:0,l=gt(function(e){return e===t},u,!0),c=gt(function(e){return B.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==f)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];for(;a1&&yt(h),a>1&&mt(e.slice(0,a-1).concat({value:e[a-2].type===" "?"*":""})).replace(z,"$1"),n,a0,i=e.length>0,s=function(s,o,u,a,l){var c,h,d,v=0,m="0",g=s&&[],y=[],b=f,w=s||i&&r.find.TAG("*",l),E=S+=b==null?1:Math.random()||.1,x=w.length;l&&(f=o!==p&&o);for(;m!==x&&(c=w[m])!=null;m++){if(i&&c){h=0;while(d=e[h++])if(d(c,o,u)){a.push(c);break}l&&(S=E)}n&&((c=!d&&c)&&v--,s&&g.push(c))}v+=m;if(n&&m!==v){h=0;while(d=t[h++])d(g,y,o,u);if(s){if(v>0)while(m--)!g[m]&&!y[m]&&(y[m]=_.call(a));y=wt(y)}P.apply(a,y),l&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(a)}return l&&(S=E,f=b),g};return n?ut(s):s}var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w="sizzle"+ -(new Date),E=e.document,S=0,x=0,T=ot(),N=ot(),C=ot(),k=function(e,t){return e===t&&(c=!0),0},L=typeof undefined,A=1<<31,O={}.hasOwnProperty,M=[],_=M.pop,D=M.push,P=M.push,H=M.slice,B=M.indexOf||function(e){var t=0,n=this.length;for(;t+~]|"+F+")"+F+"*"),V=new RegExp("="+F+"*([^\\]'\"]*?)"+F+"*\\]","g"),$=new RegExp(U),J=new RegExp("^"+q+"$"),K={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I.replace("w","w*")+")"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+U),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+F+"*(even|odd|(([+-]|)(\\d*)n|)"+F+"*(?:([+-]|)"+F+"*(\\d+)|))"+F+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+F+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+F+"*((?:-\\d)?\\d*)"+F+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/[+~]/,tt=/'|\\/g,nt=new RegExp("\\\\([\\da-f]{1,6}"+F+"?|("+F+")|.)","ig"),rt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)};try{P.apply(M=H.call(E.childNodes),E.childNodes),M[E.childNodes.length].nodeType}catch(it){P={apply:M.length?function(e,t){D.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}n=st.support={},s=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},h=st.setDocument=function(e){var t,i=e?e.ownerDocument||e:E,o=i.defaultView;if(i===p||i.nodeType!==9||!i.documentElement)return p;p=i,d=i.documentElement,v=!s(i),o&&o!==o.top&&(o.addEventListener?o.addEventListener("unload",function(){h()},!1):o.attachEvent&&o.attachEvent("onunload",function(){h()})),n.attributes=at(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=at(function(e){return e.appendChild(i.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Y.test(i.getElementsByClassName)&&at(function(e){return e.innerHTML="
",e.firstChild.className="i",e.getElementsByClassName("i").length===2}),n.getById=at(function(e){return d.appendChild(e).id=w,!i.getElementsByName||!i.getElementsByName(w).length}),n.getById?(r.find.ID=function(e,t){if(typeof t.getElementById!==L&&v){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},r.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){return e.getAttribute("id")===t}}):(delete r.find.ID,r.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){var n=typeof e.getAttributeNode!==L&&e.getAttributeNode("id");return n&&n.value===t}}),r.find.TAG=n.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==L)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],i=0,s=t.getElementsByTagName(e);if(e==="*"){while(n=s[i++])n.nodeType===1&&r.push(n);return r}return s},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(typeof t.getElementsByClassName!==L&&v)return t.getElementsByClassName(e)},g=[],m=[];if(n.qsa=Y.test(i.querySelectorAll))at(function(e){e.innerHTML="",e.querySelectorAll("[msallowclip^='']").length&&m.push("[*^$]="+F+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+F+"*(?:value|"+j+")"),e.querySelectorAll(":checked").length||m.push(":checked")}),at(function(e){var t=i.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+F+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")});return(n.matchesSelector=Y.test(y=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&at(function(e){n.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),g.push("!=",U)}),m=m.length&&new RegExp(m.join("|")),g=g.length&&new RegExp(g.join("|")),t=Y.test(d.compareDocumentPosition),b=t||Y.test(d.contains)?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!r&&r.nodeType===1&&!!(n.contains?n.contains(r):e.compareDocumentPosition&&e.compareDocumentPosition(r)&16)}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},k=t?function(e,t){if(e===t)return c=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r?r:(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,r&1||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===i||e.ownerDocument===E&&b(E,e)?-1:t===i||t.ownerDocument===E&&b(E,t)?1:l?B.call(l,e)-B.call(l,t):0:r&4?-1:1)}:function(e,t){if(e===t)return c=!0,0;var n,r=0,s=e.parentNode,o=t.parentNode,u=[e],a=[t];if(!s||!o)return e===i?-1:t===i?1:s?-1:o?1:l?B.call(l,e)-B.call(l,t):0;if(s===o)return lt(e,t);n=e;while(n=n.parentNode)u.unshift(n);n=t;while(n=n.parentNode)a.unshift(n);while(u[r]===a[r])r++;return r?lt(u[r],a[r]):u[r]===E?-1:a[r]===E?1:0},i},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){(e.ownerDocument||e)!==p&&h(e),t=t.replace(V,"='$1']");if(n.matchesSelector&&v&&(!g||!g.test(t))&&(!m||!m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&e.document.nodeType!==11)return r}catch(i){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&h(e),b(e,t)},st.attr=function(e,t){(e.ownerDocument||e)!==p&&h(e);var i=r.attrHandle[t.toLowerCase()],s=i&&O.call(r.attrHandle,t.toLowerCase())?i(e,t,!v):undefined;return s!==undefined?s:n.attributes||!v?e.getAttribute(t):(s=e.getAttributeNode(t))&&s.specified?s.value:null},st.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,r=[],i=0,s=0;c=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(k);if(c){while(t=e[s++])t===e[s]&&(i=r.push(s));while(i--)e.splice(r[i],1)}return l=null,e},i=st.getText=function(e){var t,n="",r=0,s=e.nodeType;if(!s)while(t=e[r++])n+=i(t);else if(s===1||s===9||s===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(s===3||s===4)return e.nodeValue;return n},r=st.selectors={cacheLength:50,createPseudo:ut,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(nt,rt),e[3]=(e[3]||e[4]||e[5]||"").replace(nt,rt),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1].slice(0,3)==="nth"?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd")),e[5]=+(e[7]+e[8]||e[3]==="odd")):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&$.test(n)&&(t=o(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(nt,rt).toLowerCase();return e==="*"?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+F+")"+e+"("+F+"|$)"))&&T(e,function(e){return t.test(typeof e.className=="string"&&e.className||typeof e.getAttribute!==L&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return i==null?t==="!=":t?(i+="",t==="="?i===n:t==="!="?i!==n:t==="^="?n&&i.indexOf(n)===0:t==="*="?n&&i.indexOf(n)>-1:t==="$="?n&&i.slice(-n.length)===n:t==="~="?(" "+i+" ").indexOf(n)>-1:t==="|="?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var s=e.slice(0,3)!=="nth",o=e.slice(-4)!=="last",u=t==="of-type";return r===1&&i===0?function(e){return!!e.parentNode}:function(t,n,a){var f,l,c,h,p,d,v=s!==o?"nextSibling":"previousSibling",m=t.parentNode,g=u&&t.nodeName.toLowerCase(),y=!a&&!u;if(m){if(s){while(v){c=t;while(c=c[v])if(u?c.nodeName.toLowerCase()===g:c.nodeType===1)return!1;d=v=e==="only"&&!d&&"nextSibling"}return!0}d=[o?m.firstChild:m.lastChild];if(o&&y){l=m[w]||(m[w]={}),f=l[e]||[],p=f[0]===S&&f[1],h=f[0]===S&&f[2],c=p&&m.childNodes[p];while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if(c.nodeType===1&&++h&&c===t){l[e]=[S,p,h];break}}else if(y&&(f=(t[w]||(t[w]={}))[e])&&f[0]===S)h=f[1];else while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if((u?c.nodeName.toLowerCase()===g:c.nodeType===1)&&++h){y&&((c[w]||(c[w]={}))[e]=[S,h]);if(c===t)break}return h-=i,h===r||h%r===0&&h/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return i[w]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ut(function(e,n){var r,s=i(e,t),o=s.length;while(o--)r=B.call(e,s[o]),e[r]=!(n[r]=s[o])}):function(e){return i(e,0,n)}):i}},pseudos:{not:ut(function(e){var t=[],n=[],r=u(e.replace(z,"$1"));return r[w]?ut(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:ut(function(e){return function(t){return st(e,t).length>0}}),contains:ut(function(e){return function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:ut(function(e){return J.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(nt,rt).toLowerCase(),function(t){var n;do if(n=v?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||n.indexOf(e+"-")===0;while((t=t.parentNode)&&t.nodeType===1);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return G.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},text:function(e){var t;return e.nodeName.toLowerCase()==="input"&&e.type==="text"&&((t=e.getAttribute("type"))==null||t.toLowerCase()==="text")},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[n<0?n+t:n]}),even:pt(function(e,t){var n=0;for(;n=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=n<0?n+t:n;for(;++r2&&(l=f[0]).type==="ID"&&n.getById&&t.nodeType===9&&v&&r.relative[f[1].type]){t=(r.find.ID(l.matches[0].replace(nt,rt),t)||[])[0];if(!t)return i;p&&(t=t.parentNode),e=e.slice(f.shift().value.length)}a=K.needsContext.test(e)?0:f.length;while(a--){l=f[a];if(r.relative[c=l.type])break;if(h=r.find[c])if(s=h(l.matches[0].replace(nt,rt),et.test(f[0].type)&&dt(t.parentNode)||t)){f.splice(a,1),e=s.length&&mt(f);if(!e)return P.apply(i,s),i;break}}}return(p||u(e,d))(s,t,!v,i,et.test(e)&&dt(t.parentNode)||t),i},n.sortStable= w.split("").sort(k).join("")===w,n.detectDuplicates=!!c,h(),n.sortDetached=at(function(e){return e.compareDocumentPosition(p.createElement("div"))&1}),at(function(e){return e.innerHTML="",e.firstChild.getAttribute("href")==="#"})||ft("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,t.toLowerCase()==="type"?1:2)}),(!n.attributes||!at(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),e.firstChild.getAttribute("value")===""}))&&ft("value",function(e,t,n){if(!n&&e.nodeName.toLowerCase()==="input")return e.defaultValue}),at(function(e){return e.getAttribute("disabled")==null})||ft(j,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),st}(window);jQuery.find=Sizzle,jQuery.expr=Sizzle.selectors,jQuery.expr[":"]=jQuery.expr.pseudos,jQuery.unique=Sizzle.uniqueSort,jQuery.text=Sizzle.getText,jQuery.isXMLDoc=Sizzle.isXML,jQuery.contains=Sizzle.contains;var rneedsContext=jQuery.expr.match.needsContext,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,risSimple=/^.[^:#\[\.,]*$/;jQuery.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),t.length===1&&r.nodeType===1?jQuery.find.matchesSelector(r,e)?[r]:[]:jQuery.find.matches(e,jQuery.grep(t,function(e){return e.nodeType===1}))},jQuery.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if(typeof e!="string")return this.pushStack(jQuery(e).filter(function(){for(t=0;t1?jQuery.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(winnow(this,e||[],!1))},not:function(e){return this.pushStack(winnow(this,e||[],!0))},is:function(e){return!!winnow(this,typeof e=="string"&&rneedsContext.test(e)?jQuery(e):e||[],!1).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init=jQuery.fn.init=function(e,t){var n,r;if(!e)return this;if(typeof e=="string"){e[0]==="<"&&e[e.length-1]===">"&&e.length>=3?n=[null,e,null]:n=rquickExpr.exec(e);if(n&&(n[1]||!t)){if(n[1]){t=t instanceof jQuery?t[0]:t,jQuery.merge(this,jQuery.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:document,!0));if(rsingleTag.test(n[1])&&jQuery.isPlainObject(t))for(n in t)jQuery.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return r=document.getElementById(n[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=document,this.selector=e,this}return!t||t.jquery?(t||rootjQuery).find(e):this.constructor(t).find(e)}return e.nodeType?(this.context=this[0]=e,this.length=1,this):jQuery.isFunction(e)?typeof rootjQuery.ready!="undefined"?rootjQuery.ready(e):e(jQuery):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),jQuery.makeArray(e,this))};init.prototype=jQuery.fn,rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:!0,contents:!0,next:!0,prev:!0};jQuery.extend({dir:function(e,t,n){var r=[],i=n!==undefined;while((e=e[t])&&e.nodeType!==9)if(e.nodeType===1){if(i&&jQuery(e).is(n))break;r.push(e)}return r},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}}),jQuery.fn.extend({has:function(e){var t=jQuery(e,this),n=t.length;return this.filter(function(){var e=0;for(;e-1:n.nodeType===1&&jQuery.find.matchesSelector(n,e))){s.push(n);break}return this.pushStack(s.length>1?jQuery.unique(s):s)},index:function(e){return e?typeof e=="string"?indexOf.call(jQuery(e),this[0]):indexOf.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),jQuery(e,t))))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),jQuery.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return jQuery.dir(e,"parentNode")},parentsUntil:function(e,t,n){return jQuery.dir(e,"parentNode",n)},next:function(e){return sibling(e,"nextSibling")},prev:function(e){return sibling(e,"previousSibling")},nextAll:function(e){return jQuery.dir(e,"nextSibling")},prevAll:function(e){return jQuery.dir(e,"previousSibling")},nextUntil:function(e,t,n){return jQuery.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return jQuery.dir(e,"previousSibling",n)},siblings:function(e){return jQuery.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return jQuery.sibling(e.firstChild)},contents:function(e){return e.contentDocument||jQuery.merge([],e.childNodes)}},function(e,t){jQuery.fn[e]=function(n,r){var i=jQuery.map(this,t,n);return e.slice(-5)!=="Until"&&(r=n),r&&typeof r=="string"&&(i=jQuery.filter(r,i)),this.length>1&&(guaranteedUnique[e]||jQuery.unique(i),rparentsprev.test(e)&&i.reverse()),this.pushStack(i)}});var rnotwhite=/\S+/g,optionsCache={};jQuery.Callbacks=function(e){e=typeof e=="string"?optionsCache[e]||createOptions(e):jQuery.extend({},e);var t,n,r,i,s,o,u=[],a=!e.once&&[],f=function(c){t=e.memory&&c,n=!0,o=i||0,i=0,s=u.length,r=!0;for(;u&&o-1)u.splice(n,1),r&&(n<=s&&s--,n<=o&&o--)}),this},has:function(e){return e?jQuery.inArray(e,u)>-1:!!u&&!!u.length},empty:function(){return u=[],s=0,this},disable:function(){return u=a=t=undefined,this},disabled:function(){return!u},lock:function(){return a=undefined,t||l.disable(),this},locked:function(){return!a},fireWith:function(e,t){return u&&(!n||a)&&(t=t||[],t=[e,t.slice?t.slice():t],r?a.push(t):f(t)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!n}};return l},jQuery.extend({Deferred:function(e){var t=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return jQuery.Deferred(function(n){jQuery.each(t,function(t,s){var o=jQuery.isFunction(e[t])&&e[t];i[s[1]](function(){var e=o&&o.apply(this,arguments);e&&jQuery.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s[0]+"With"](this===r?n.promise():this,o?[e]:arguments)})}),e=null}).promise()},promise:function(e){return e!=null?jQuery.extend(e,r):r}},i={};return r.pipe=r.then,jQuery.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=function(){return i[s[0]+"With"](this===i?r:this,arguments),this},i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=slice.call(arguments),r=n.length,i=r!==1||e&&jQuery.isFunction(e.promise)?r:0,s=i===1?e:jQuery.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?slice.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t0)return;readyList.resolveWith(document,[jQuery]),jQuery.fn.triggerHandler&&(jQuery(document).triggerHandler("ready"),jQuery(document).off("ready"))}}),jQuery.ready.promise=function(e){return readyList||(readyList=jQuery.Deferred(),document.readyState==="complete"?setTimeout(jQuery.ready):(document.addEventListener("DOMContentLoaded",completed,!1),window.addEventListener("load",completed,!1))),readyList.promise(e)},jQuery.ready.promise();var access=jQuery.access=function(e,t,n,r,i,s,o){var u=0,a=e.length,f=n==null;if(jQuery.type(n)==="object"){i=!0;for(u in n)jQuery.access(e,t,u,n[u],!0,s,o)}else if(r!==undefined){i=!0,jQuery.isFunction(r)||(o=!0),f&&(o?(t.call(e,r),t=null):(f=t,t=function(e,t,n){return f.call(jQuery(e),n)}));if(t)for(;u1,null,!0)},removeData:function(e){return this.each(function(){data_user.remove(this,e)})}}),jQuery.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=data_priv.get(e,t),n&&(!r||jQuery.isArray(n)?r=data_priv.access(e,t,jQuery.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=jQuery.queue(e,t),r=n.length,i=n.shift(),s=jQuery._queueHooks(e,t),o=function(){jQuery.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return data_priv.get(e,n)||data_priv.access(e,n,{empty:jQuery.Callbacks("once memory").add(function(){data_priv.remove(e,[t+"queue",n])})})}}),jQuery.fn.extend({queue:function(e,t){var n=2;return typeof e!="string"&&(t=e,e="fx",n--),arguments.lengthx",support.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue})();var strundefined=typeof undefined;support.focusinBubbles="onfocusin"in window;var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;jQuery.event={global:{},add:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=data_priv.get(e);if(!m)return;n.handler&&(s=n,n=s.handler,i=s.selector),n.guid||(n.guid=jQuery.guid++),(a=m.events)||(a=m.events={}),(o=m.handle)||(o=m.handle=function(t){return typeof jQuery!==strundefined&&jQuery.event.triggered!==t.type?jQuery.event.dispatch.apply(e,arguments):undefined}),t=(t||"").match(rnotwhite)||[""],f=t.length;while(f--){u=rtypenamespace.exec(t[f])||[],p=v=u[1],d=(u[2]||"").split(".").sort();if(!p)continue;c=jQuery.event.special[p]||{},p=(i?c.delegateType:c.bindType)||p,c=jQuery.event.special[p]||{},l=jQuery.extend({type:p,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&jQuery.expr.match.needsContext.test(i),namespace:d.join(".")},s),(h=a[p])||(h=a[p]=[],h.delegateCount=0,(!c.setup||c.setup.call(e,r,d,o)===!1)&&e.addEventListener&&e.addEventListener(p,o,!1)),c.add&&(c.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,l):h.push(l),jQuery.event.global[p]=!0}},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=data_priv.hasData(e)&&data_priv.get(e);if(!m||!(a=m.events))return;t=(t||"").match(rnotwhite)||[""],f=t.length;while(f--){u=rtypenamespace.exec(t[f])||[],p=v=u[1],d=(u[2]||"").split(".").sort();if(!p){for(p in a)jQuery.event.remove(e,p+t[f],n,r,!0);continue}c=jQuery.event.special[p]||{},p=(r?c.delegateType:c.bindType)||p,h=a[p]||[],u=u[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=h.length;while(s--)l=h[s],(i||v===l.origType)&&(!n||n.guid===l.guid)&&(!u||u.test(l.namespace))&&(!r||r===l.selector||r==="**"&&l.selector)&&(h.splice(s,1),l.selector&&h.delegateCount--,c.remove&&c.remove.call(e,l));o&&!h.length&&((!c.teardown||c.teardown.call(e,d,m.handle)===!1)&&jQuery.removeEvent(e,p,m.handle),delete a[p])}jQuery.isEmptyObject(a)&&(delete m.handle,data_priv.remove(e,"events"))},trigger:function(e,t,n,r){var i,s,o,u,a,f,l,c=[n||document],h=hasOwn.call(e,"type")?e.type:e,p=hasOwn.call(e,"namespace")?e.namespace.split("."):[];s=o=n=n||document;if(n.nodeType===3||n.nodeType===8)return;if(rfocusMorph.test(h+jQuery.event.triggered))return;h.indexOf(".")>=0&&(p=h.split("."),h=p.shift(),p.sort()),a=h.indexOf(":")<0&&"on"+h,e=e[jQuery.expando]?e:new jQuery.Event(h,typeof e=="object"&&e),e.isTrigger=r?2:3,e.namespace=p.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=undefined,e.target||(e.target=n),t=t==null?[e]:jQuery.makeArray(t,[e]),l=jQuery.event.special[h]||{};if(!r&&l.trigger&&l.trigger.apply(n,t)===!1)return;if(!r&&!l.noBubble&&!jQuery.isWindow(n)){u=l.delegateType||h,rfocusMorph.test(u+h)||(s=s.parentNode);for(;s;s=s.parentNode)c.push(s),o=s;o===(n.ownerDocument||document)&&c.push(o.defaultView||o.parentWindow||window)}i=0;while((s=c[i++])&&!e.isPropagationStopped())e.type=i>1?u:l.bindType||h,f=(data_priv.get(s,"events")||{})[e.type]&&data_priv.get(s,"handle"),f&&f.apply(s,t),f=a&&s[a],f&&f.apply&&jQuery.acceptData(s)&&(e.result=f.apply(s,t),e.result===!1&&e.preventDefault());return e.type=h,!r&&!e.isDefaultPrevented()&&(!l._default||l._default.apply(c.pop(),t)===!1)&&jQuery.acceptData(n)&&a&&jQuery.isFunction(n[h])&&!jQuery.isWindow(n)&&(o=n[a],o&&(n[a]=null),jQuery.event.triggered=h,n[h](),jQuery.event.triggered=undefined,o&&(n[a]=o)),e.result},dispatch:function(e){e=jQuery.event.fix(e);var t,n,r,i,s,o=[],u=slice.call(arguments),a=(data_priv.get(this,"events")||{})[e.type]||[],f=jQuery.event.special[e.type]||{};u[0]=e,e.delegateTarget=this;if(f.preDispatch&&f.preDispatch.call(this,e)===!1)return;o=jQuery.event.handlers.call(this,e,a),t=0;while((i=o[t++])&&!e.isPropagationStopped()){e.currentTarget=i.elem,n=0;while((s=i.handlers[n++])&&!e.isImmediatePropagationStopped())if(!e.namespace_re||e.namespace_re.test(s.namespace))e.handleObj=s,e.data=s.data,r=((jQuery.event.special[s.origType]||{}).handle||s.handler).apply(i.elem,u),r!==undefined&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation())}return f.postDispatch&&f.postDispatch.call(this,e),e.result},handlers:function(e,t){var n,r,i,s,o=[],u=t.delegateCount,a=e.target;if(u&&a.nodeType&&(!e.button||e.type!=="click"))for(;a!==this;a=a.parentNode||this)if(a.disabled!==!0||e.type!=="click"){r=[];for(n=0;n=0:jQuery.find(i,this,null,[a]).length),r[i]&&r.push(s);r.length&&o.push({elem:a,handlers:r})}return u]*)\/>/gi,rtagName=/<([\w:]+)/,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style|link)/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/^$|\/(?:java|ecma)script/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*\s*$/g,wrapMap={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option,wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead,wrapMap.th=wrapMap.td,jQuery.extend({clone:function(e,t,n){var r,i,s,o,u=e.cloneNode(!0),a=jQuery.contains(e.ownerDocument,e);if(!support.noCloneChecked&&(e.nodeType===1||e.nodeType===11)&&!jQuery.isXMLDoc(e)){o=getAll(u),s=getAll(e);for(r=0,i=s.length;r0&&setGlobalEval(o,!a&&getAll(e,"script")),u},buildFragment:function(e,t,n,r){var i,s,o,u,a,f,l=t.createDocumentFragment(),c=[],h=0,p=e.length;for(;h")+u[2],f=u[0];while(f--)s=s.lastChild;jQuery.merge(c,s.childNodes),s=l.firstChild,s.textContent=""}}l.textContent="",h=0;while(i=c[h++]){if(r&&jQuery.inArray(i,r)!==-1)continue;a=jQuery.contains(i.ownerDocument,i),s=getAll(l.appendChild(i),"script"),a&&setGlobalEval(s);if(n){f=0;while(i=s[f++])rscriptType.test(i.type||"")&&n.push(i)}}return l},cleanData:function(e){var t,n,r,i,s=jQuery.event.special,o=0;for(;(n=e[o])!==undefined;o++){if(jQuery.acceptData(n)){i=n[data_priv.expando];if(i&&(t=data_priv.cache[i])){if(t.events)for(r in t.events)s[r]?jQuery.event.remove(n,r):jQuery.removeEvent(n,r,t.handle);data_priv.cache[i]&&delete data_priv.cache[i]}}delete data_user.cache[n[data_user.expando]]}}}),jQuery.fn.extend({text:function(e){return access(this,function(e){return e===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9)this.textContent=e})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=manipulationTarget(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=manipulationTarget(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?jQuery.filter(e,this):this,i=0;for(;(n=r[i])!=null;i++)!t&&n.nodeType===1&&jQuery.cleanData(getAll(n)),n.parentNode&&(t&&jQuery.contains(n.ownerDocument,n)&&setGlobalEval(getAll(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++)e.nodeType===1&&(jQuery.cleanData(getAll(e,!1)),e.textContent="");return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return jQuery.clone(this,e,t)})},html:function(e){return access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&t.nodeType===1)return t.innerHTML;if(typeof e=="string"&&!rnoInnerhtml.test(e)&&!wrapMap[(rtagName.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(rxhtmlTag,"<$1>");try{for(;n1&&typeof h=="string"&&!support.checkClone&&rchecked.test(h))return this.each(function(n){var r=l.eq(n);p&&(e[0]=h.call(this,n,r.html())),r.domManip(e,t)});if(f){n=jQuery.buildFragment(e,this[0].ownerDocument,!1,this),r=n.firstChild,n.childNodes.length===1&&(n=r);if(r){i=jQuery.map(getAll(n,"script"),disableScript),s=i.length;for(;a1)},show:function(){return showHide(this,!0)},hide:function(){return showHide(this)},toggle:function(e){return typeof e=="boolean"?e?this.show():this.hide():this.each(function(){isHidden(this)?jQuery(this).show():jQuery(this).hide()})}}),jQuery.Tween=Tween,Tween.prototype={constructor:Tween,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(jQuery.cssNumber[n]?"":"px")},cur:function(){var e=Tween.propHooks[this.prop];return e&&e.get?e.get(this):Tween.propHooks._default.get(this)},run:function(e){var t,n=Tween.propHooks[this.prop];return this.options.duration?this.pos=t=jQuery.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Tween.propHooks._default.set(this),this}},Tween.prototype.init.prototype=Tween.prototype,Tween.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=jQuery.css(e.elem,e.prop,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){jQuery.fx.step[e.prop]?jQuery.fx.step[e.prop](e):e.elem.style&&(e.elem.style[jQuery.cssProps[e.prop]]!=null||jQuery.cssHooks[e.prop])?jQuery.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},jQuery.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},jQuery.fx=Tween.prototype.init,jQuery.fx.step={};var fxNow,timerId,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i"),rrun=/queueHooks$/,animationPrefilters=[defaultPrefilter],tweeners={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=rfxnum.exec(t),s=i&&i[3]||(jQuery.cssNumber[e]?"":"px"),o=(jQuery.cssNumber[e]||s!=="px"&&+r)&&rfxnum.exec(jQuery.css(n.elem,e)),u=1,a=20;if(o&&o[3]!==s){s=s||o[3],i=i||[],o=+r||1;do u=u||".5",o/=u,jQuery.style(n.elem,e,o+s);while(u!==(u=n.cur()/r)&&u!==1&&--a)}return i&&(o=n.start=+o||+r||0,n.unit=s,n.end=i[1]?o+(i[1]+1)*i[2]:+i[2]),n}]};jQuery.Animation=jQuery.extend(Animation,{tweener:function(e,t){jQuery.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r1)},removeAttr:function(e){return this.each(function(){jQuery.removeAttr(this,e)})}}),jQuery.extend({attr:function(e,t,n){var r,i,s=e.nodeType;if(!e||s===3||s===8||s===2)return;if(typeof e.getAttribute===strundefined)return jQuery.prop(e,t,n);if(s!==1||!jQuery.isXMLDoc(e))t=t.toLowerCase(),r=jQuery.attrHooks[t]||(jQuery.expr.match.bool.test(t)?boolHook:nodeHook);if(n===undefined)return r&&"get"in r&&(i=r.get(e,t))!==null?i:(i=jQuery.find.attr(e,t),i==null?undefined:i);if(n!==null)return r&&"set"in r&&(i=r.set(e,n,t))!==undefined?i:(e.setAttribute(t,n+""),n);jQuery.removeAttr(e,t)},removeAttr:function(e,t){var n,r,i=0,s=t&&t.match(rnotwhite);if(s&&e.nodeType===1)while(n=s[i++])r=jQuery.propFix[n]||n,jQuery.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!support.radioValue&&t==="radio"&&jQuery.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),boolHook={set:function(e,t,n){return t===!1?jQuery.removeAttr(e,n):e.setAttribute(n,n),n}},jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(e,t){var n=attrHandle[t]||jQuery.find.attr;attrHandle[t]=function(e,t,r){var i,s;return r||(s=attrHandle[t],attrHandle[t]=i,i=n(e,t,r)!=null?t.toLowerCase():null,attrHandle[t]=s),i}});var rfocusable=/^(?:input|select|textarea|button)$/i;jQuery.fn.extend({prop:function(e,t){return access(this,jQuery.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[jQuery.propFix[e]||e]})}}),jQuery.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,s,o=e.nodeType;if(!e||o===3||o===8||o===2)return;return s=o!==1||!jQuery.isXMLDoc(e),s&&(t=jQuery.propFix[t]||t,i=jQuery.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&(r=i.get(e,t))!==null?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||rfocusable.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),support.optSelected||(jQuery.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this});var rclass=/[\t\r\n\f]/g;jQuery.fn.extend({addClass:function(e){var t,n,r,i,s,o,u=typeof e=="string"&&e,a=0,f=this.length;if(jQuery.isFunction(e))return this.each(function(t){jQuery(this).addClass(e.call(this,t,this.className))});if(u){t=(e||"").match(rnotwhite)||[];for(;a=0)r=r.replace(" "+i+" "," ");o=e?jQuery.trim(r):"",n.className!==o&&(n.className=o)}}}return this},toggleClass:function(e,t){var n=typeof e;return typeof t=="boolean"&&n==="string"?t?this.addClass(e):this.removeClass(e):jQuery.isFunction(e)?this.each(function(n){jQuery(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var t,r=0,i=jQuery(this),s=e.match(rnotwhite)||[];while(t=s[r++])i.hasClass(t)?i.removeClass(t):i.addClass(t)}else if(n===strundefined||n==="boolean")this.className&&data_priv.set(this,"__className__",this.className),this.className=this.className||e===!1?"":data_priv.get(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1}});var rreturn=/\r/g;jQuery.fn.extend({val:function(e){var t,n,r,i=this[0];if(!arguments.length){if(i)return t=jQuery.valHooks[i.type]||jQuery.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,typeof n=="string"?n.replace(rreturn,""):n==null?"":n);return}return r=jQuery.isFunction(e),this.each(function(n){var i;if(this.nodeType!==1)return;r?i=e.call(this,n,jQuery(this).val()):i=e,i==null?i="":typeof i=="number"?i+="":jQuery.isArray(i)&&(i=jQuery.map(i,function(e){return e==null?"":e+""})),t=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!t||!("set"in t)||t.set(this,i,"value")===undefined)this.value=i})}}),jQuery.extend({valHooks:{option:{get:function(e){var t=jQuery.find.attr(e,"value");return t!=null?t:jQuery.trim(jQuery.text(e))}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0)n=!0}return n||(e.selectedIndex=-1),s}}}}),jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(e,t){if(jQuery.isArray(t))return e.checked=jQuery.inArray(jQuery(e).val(),t)>=0}},support.checkOn||(jQuery.valHooks[this].get=function(e){return e.getAttribute("value")===null?"on":e.value})}),jQuery.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(e,t){jQuery.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),jQuery.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)}});var nonce=jQuery.now(),rquery=/\?/;jQuery.parseJSON=function(e){return JSON.parse(e+"")},jQuery.parseXML=function(e){var t,n;if(!e||typeof e!="string")return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&jQuery.error("Invalid XML: "+e),t};var ajaxLocParts,ajaxLocation,rhash=/#.*$/,rts=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rurl=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,prefilters={},transports={},allTypes="*/".concat("*");try{ajaxLocation=location.href}catch(e){ajaxLocation=document.createElement("a"),ajaxLocation.href="",ajaxLocation=ajaxLocation.href}ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[],jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ajaxLocation,type:"GET",isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,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":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?ajaxExtend(ajaxExtend(e,jQuery.ajaxSettings),t):ajaxExtend(jQuery.ajaxSettings,e)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(e,t){function S(e,t,s,u){var f,m,g,b,E,S=t;if(y===2)return;y=2,o&&clearTimeout(o),n=undefined,i=u||"",w.readyState=e>0?4:0,f=e>=200&&e<300||e===304,s&&(b=ajaxHandleResponses(l,w,s)),b=ajaxConvert(l,b,w,f);if(f)l.ifModified&&(E=w.getResponseHeader("Last-Modified"),E&&(jQuery.lastModified[r]=E),E=w.getResponseHeader("etag"),E&&(jQuery.etag[r]=E)),e===204||l.type==="HEAD"?S="nocontent":e===304?S="notmodified":(S=b.state,m=b.data,g=b.error,f=!g);else{g=S;if(e||!S)S="error",e<0&&(e=0)}w.status=e,w.statusText=(t||S)+"",f?p.resolveWith(c,[m,S,w]):p.rejectWith(c,[w,S,g]),w.statusCode(v),v=undefined,a&&h.trigger(f?"ajaxSuccess":"ajaxError",[w,l,f?m:g]),d.fireWith(c,[w,S]),a&&(h.trigger("ajaxComplete",[w,l]),--jQuery.active||jQuery.event.trigger("ajaxStop"))}typeof e=="object"&&(t=e,e=undefined),t=t||{};var n,r,i,s,o,u,a,f,l=jQuery.ajaxSetup({},t),c=l.context||l,h=l.context&&(c.nodeType||c.jquery)?jQuery(c):jQuery.event,p=jQuery.Deferred(),d=jQuery.Callbacks("once memory"),v=l.statusCode||{},m={},g={},y=0,b="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(y===2){if(!s){s={};while(t=rheaders.exec(i))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return t==null?null:t},getAllResponseHeaders:function(){return y===2?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return y||(e=g[n]=g[n]||e,m[e]=t),this},overrideMimeType:function(e){return y||(l.mimeType=e),this},statusCode:function(e){var t;if(e)if(y<2)for(t in e)v[t]=[v[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||b;return n&&n.abort(t),S(0,t),this}};p.promise(w).complete=d.add,w.success=w.done,w.error=w.fail,l.url=((e||l.url||ajaxLocation)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//"),l.type=t.method||t.type||l.method||l.type,l.dataTypes=jQuery.trim(l.dataType||"*").toLowerCase().match(rnotwhite)||[""],l.crossDomain==null&&(u=rurl.exec(l.url.toLowerCase()),l.crossDomain=!(!u||u[1]===ajaxLocParts[1]&&u[2]===ajaxLocParts[2]&&(u[3]||(u[1]==="http:"?"80":"443"))===(ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?"80":"443")))),l.data&&l.processData&&typeof l.data!="string"&&(l.data=jQuery.param(l.data,l.traditional)),inspectPrefiltersOrTransports(prefilters,l,t,w);if(y===2)return w;a=l.global,a&&jQuery.active++===0&&jQuery.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!rnoContent.test(l.type),r=l.url,l.hasContent||(l.data&&(r=l.url+=(rquery.test(r)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=rts.test(r)?r.replace(rts,"$1_="+nonce++):r+(rquery.test(r)?"&":"?")+"_="+nonce++)),l.ifModified&&(jQuery.lastModified[r]&&w.setRequestHeader("If-Modified-Since",jQuery.lastModified[r]),jQuery.etag[r]&&w.setRequestHeader("If-None-Match",jQuery.etag[r])),(l.data&&l.hasContent&&l.contentType!==!1||t.contentType)&&w.setRequestHeader("Content-Type",l.contentType),w.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):l.accepts["*"]);for(f in l.headers)w.setRequestHeader(f,l.headers[f]);if(!l.beforeSend||l.beforeSend.call(c,w,l)!==!1&&y!==2){b="abort";for(f in{success:1,error:1,complete:1})w[f](l[f]);n=inspectPrefiltersOrTransports(transports,l,t,w);if(!n)S(-1,"No Transport");else{w.readyState=1,a&&h.trigger("ajaxSend",[w,l]),l.async&&l.timeout>0&&(o=setTimeout(function(){w.abort("timeout")},l.timeout));try{y=1,n.send(m,S)}catch(E){if(!(y<2))throw E;S(-1,E)}}return w}return w.abort()},getJSON:function(e,t,n){return jQuery.get(e,t,n,"json")},getScript:function(e,t){return jQuery.get(e,undefined,t,"script")}}),jQuery.each(["get","post"],function(e,t){jQuery[t]=function(e,n,r,i){return jQuery.isFunction(n)&&(i=i||r,r=n,n=undefined),jQuery.ajax({url:e,type:t,dataType:i,data:n,success:r})}}),jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){jQuery.fn[t]=function(e){return this.on(t,e)}}),jQuery._evalUrl=function(e){return jQuery.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},jQuery.fn.extend({wrapAll:function(e){var t;return jQuery.isFunction(e)?this.each(function(t){jQuery(this).wrapAll(e.call(this,t))}):(this[0]&&(t=jQuery(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return jQuery.isFunction(e)?this.each(function(t){jQuery(this).wrapInner(e.call(this,t))}):this.each(function(){var t=jQuery(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=jQuery.isFunction(e);return this.each(function(n){jQuery(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){jQuery.nodeName(this,"body")||jQuery(this).replaceWith(this.childNodes)}).end()}}),jQuery.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},jQuery.expr.filters.visible=function(e){return!jQuery.expr.filters.hidden(e)};var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;jQuery.param=function(e,t){var n,r=[],i=function(e,t){t=jQuery.isFunction(t)?t():t==null?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};t===undefined&&(t=jQuery.ajaxSettings&&jQuery.ajaxSettings.traditional);if(jQuery.isArray(e)||e.jquery&&!jQuery.isPlainObject(e))jQuery.each(e,function(){i(this.name,this.value)});else for(n in e)buildParams(n,e[n],t,i);return r.join("&").replace(r20,"+")},jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=jQuery.prop(this,"elements");return e?jQuery.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(e)&&(this.checked||!rcheckableType.test(e))}).map(function(e,t){var n=jQuery(this).val();return n==null?null:jQuery.isArray(n)?jQuery.map(n,function(e){return{name:t.name,value:e.replace(rCRLF,"\r\n")}}):{name:t.name,value:n.replace(rCRLF,"\r\n")}}).get()}}),jQuery.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var xhrId=0,xhrCallbacks={},xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();window.ActiveXObject&&jQuery(window).on("unload",function(){for(var e in xhrCallbacks)xhrCallbacks[e]()}),support.cors=!!xhrSupported&&"withCredentials"in xhrSupported,support.ajax=xhrSupported=!!xhrSupported,jQuery.ajaxTransport(function(e){var t;if(support.cors||xhrSupported&&!e.crossDomain)return{send:function(n,r){var i,s=e.xhr(),o=++xhrId;s.open(e.type,e.url,e.async,e.username,e.password);if(e.xhrFields)for(i in e.xhrFields)s[i]=e.xhrFields[i];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),!e.crossDomain&&!n["X-Requested-With"]&&(n["X-Requested-With"]="XMLHttpRequest");for(i in n)s.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete xhrCallbacks[o],t=s.onload=s.onerror=null,e==="abort"?s.abort():e==="error"?r(s.status,s.statusText):r(xhrSuccessStatus[s.status]||s.status,s.statusText,typeof s.responseText=="string"?{text:s.responseText}:undefined,s.getAllResponseHeaders()))}},s.onload=t(),s.onerror=t("error"),t=xhrCallbacks[o]=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(u){if(t)throw u}},abort:function(){t&&t()}}}),jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return jQuery.globalEval(e),e}}}),jQuery.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),jQuery.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=jQuery("'),l.close(),f=l.w.frames[0].document,o=f.createElement("div")}catch(c){o=n.createElement("div"),f=n.body}function h(t){return function(){var n=Array.prototype.slice.call(arguments,0);n.unshift(o),f.appendChild(o),o.addBehavior("#default#userData"),o.load(r);var i=t.apply(e,n);return f.removeChild(o),i}}function p(e){return"_"+e}e.set=h(function(t,n,i){n=p(n);if(i===undefined)return e.remove(n);t.setAttribute(n,e.serialize(i)),t.save(r)}),e.get=h(function(t,n){return n=p(n),e.deserialize(t.getAttribute(n))}),e.remove=h(function(e,t){t=p(t),e.removeAttribute(t),e.save(r)}),e.clear=h(function(e){var t=e.XMLDocument.documentElement.attributes;e.load(r);for(var n=0,i;i=t[n];n++)e.removeAttribute(i.name);e.save(r)}),e.getAll=h(function(t){var n=t.XMLDocument.documentElement.attributes;t.load(r);var i={};for(var s=0,o;o=n[s];++s)i[o]=e.get(o);return i})}try{e.set(s,s),e.get(s)!=s&&(e.disabled=!0),e.remove(s)}catch(c){e.disabled=!0}typeof module!="undefined"&&typeof module!="function"?module.exports=e:typeof define=="function"&&define.amd?define(e):this.store=e}(),function(e,t){var n=function(e){this.defaults={locale_data:{messages:{"":{domain:"messages",lang:"en",plural_forms:"(n != 1);"}}},domain:"messages"},this.options=_.extend({},this.defaults,e),this.textdomain(this.options.domain);if(e.domain&&!this.options.locale_data[this.options.domain])throw new Error("Text domain set to non-existent domain: `"+e.domain+"`")};n.context_delimiter=String.fromCharCode(4);var r=_.memoize(function(e){function t(e,t){var n=e(t);return n===!0?1:n?n:0}var e=e||"(n != 1)";return _.partial(t,new Function("n","return "+e))});_.extend(n.prototype,{textdomain:function(e){if(!e)return this._textdomain;this._textdomain=e},gettext:function(e){return this.dcnpgettext.call(this,t,t,e)},dgettext:function(e,n){return this.dcnpgettext.call(this,e,t,n)},dcgettext:function(e,n){return this.dcnpgettext.call(this,e,t,n)},ngettext:function(e,n,r){return this.dcnpgettext.call(this,t,t,e,n,r)},dngettext:function(e,n,r,i){return this.dcnpgettext.call(this,e,t,n,r,i)},dcngettext:function(e,n,r,i){return this.dcnpgettext.call(this,e,t,n,r,i)},pgettext:function(e,n){return this.dcnpgettext.call(this,t,e,n)},dpgettext:function(e,t,n){return this.dcnpgettext.call(this,e,t,n)},dcpgettext:function(e,t,n){return this.dcnpgettext.call(this,e,t,n)},npgettext:function(e,n,r,i){return this.dcnpgettext.call(this,t,e,n,r,i)},dnpgettext:function(e,t,n,r,i){return this.dcnpgettext.call(this,e,t,n,r,i)},dcnpgettext:function(e,t,i,s,o){s=s||i,e=e||this._textdomain,o=typeof o=="undefined"?1:o;var u;if(!this.options)return u=new n,u.dcnpgettext.call(u,undefined,undefined,i,s,o);if(!this.options.locale_data)throw new Error("No locale data provided.");if(!this.options.locale_data[e])throw new Error("Domain `"+e+"` was not found.");if(!this.options.locale_data[e][""])throw new Error("No locale meta information provided.");if(!i)throw new Error("No translation key found.");if(typeof o!="number"){o=parseInt(o,10);if(isNaN(o))throw new Error("The number that was passed in is not a number.")}var a=t?t+n.context_delimiter+i:i,f=this.options.locale_data,l=f[e],c=l[""].plural_forms,h=r(c)(o)+1,p,d;if(!l)throw new Error("No domain named `"+e+"` could be found.");return p=l[a],!p||h>=p.length?(this.options.missing_key_callback&&this.options.missing_key_callback(a),d=[null,i,s],d[r()(o)+1]):(d=p[h],d?d:(d=[null,i,s],d[r()(o)+1]))}}),e.Jed=n}(this),+function(e){"use strict";function n(n,r){return this.each(function(){var i=e(this),s=i.data("bs.modal"),o=e.extend({},t.DEFAULTS,i.data(),typeof n=="object"&&n);s||i.data("bs.modal",s=new t(this,o)),typeof n=="string"?s[n](r):o.show&&s.show(r)})}var t=function(t,n){this.options=n,this.$body=e(document.body),this.$element=e(t),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,e.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};t.VERSION="3.2.0",t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this.isShown?this.hide():this.show(e)},t.prototype.show=function(t){var n=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);if(this.isShown||r.isDefaultPrevented())return;this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var r=e.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),r&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});r?n.$element.find(".modal-dialog").one("bsTransitionEnd",function(){n.$element.trigger("focus").trigger (i)}).emulateTransitionEnd(300):n.$element.trigger("focus").trigger(i)})},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]!==e.target&&!this.$element.has(e.target).length&&this.$element.trigger("focus")},this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){e.which==27&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('',delay:100,minimumDisplay:5,trigger:"keyup change blur"};var n=[/^password(\d+)?$/i,/^letmein(\d+)?$/i,/^welcome(\d+)?$/i,/^secret(\d+)?$/i,/^reddit(\d+)?$/i,/^(reddit)\1+/i,/^(test)\1+$/i,/^abcd?e?f?1234?5?6?$/i,/^iloveyou$/i,/^admin$/i,/^trustno1$/i,/^.werty$/i,/^sunshine$/i,/^monkey$/i,/^shadow$/i,/^princess$/i,/^dragon$/i],r="abcdefghijklmnopqrstuvwxyz",i="qwertyuiopasdfghjklzxcvbnm",s="qazwsxedcrfvtgbyhnujmikolp",o="01234567890",u="!@#$%^&*()",h=[{test:/./g,weight:4},{test:/[A-Z]/g,weight:function(e,t){return!t||e.length===t?0:(e.length-t)*2}},{test:/[a-z]/g,weight:function(e,t){return!t||e.length===t?0:(e.length-t)*2}},{test:/\d/g,weight:function(e,t){return!t||e.length===t?0:t*4}},{test:/\W|_/g,weight:6},{test:/^[a-z]+$/i,weight:-1},{test:/^\d+$/i,weight:-1},{test:c(r),weight:-3},{test:c(i),weight:-3},{test:c(s),weight:-3},{test:c(o),weight:-3},{test:c(u),weight:-3},{test:f("[a-z]"),weight:-2},{test:f("[A-Z]"),weight:-2},{test:f("\\d"),weight:-2},{test:l,weight:-1}];_.extend(t.prototype,{_cancelScore:!1,initialize:function(n,r){this.options=e.extend({},t.DEFAULTS,r);var i=this.$el=e(n),s=this.$meter=e(this.options.template),o=this.options.trigger;o!=="manual"&&i.on(this.options.trigger,_.debounce(this.score.bind(this),this.options.delay)),s.insertAfter(i);var u=s.outerWidth(),a=u+5+"px";return i.css({"padding-right":a}),i.trigger("initialize.strengthMeter"),this},score:function(){var t=this.$el.val(),n=_.map(this.options.related,function(t){return e(t).val()||""}),r=d(t,n),i=Math.min(100,Math.max(this.options.minimumDisplay,r));this.$el.trigger("score.strengthMeter",i),this._cancelScore||this.$meter.find(".strength-meter-fill").css({width:i+"%"}),this._cancelScore=!1},cancelScore:function(){this._cancelScore=!0}}),e.fn.strengthMeter=v,e.fn.strengthMeter.Constructor=t}(window.jQuery),!function(e){"use strict";function n(n){var r=Array.prototype.slice.call(arguments,1);return this.each(function(){var i=e(this),s=i.data("c.toggle"),o=typeof n=="object"&&n;s||(s=new t(this,o),i.data("c.toggle",s)),typeof n=="string"&&s[n].apply(s,r)})}var t=function(e,t){this.initialize(e,t)};_.extend(t.prototype,{initialize:function(t,n){var r=this.$el=e(t);return r.on("click",function(t){var n=e(t.target),r=n.data("toggle");n.toggleClass("c-toggle-toggled"),e(r).toggleClass("c-toggle-content-toggled")}),this}}),e.fn.togglable=n,e.fn.togglable.Constructor=t}(window.jQuery),!function(e){e.actions={trigger:function(e,t){t=t||{},t.action=e;var n="action:"+e,r=$.Event(n,t);$(document.body).trigger(r),r.isDefaultPrevented()?$(document.body).trigger($.Event(n+":failure",t)):$(document.body).trigger($.Event(n+":success",t)),$(document.body).trigger($.Event(n+":complete",t))},on:function(e,t){$(document.body).on("action:"+e,t)},off:function(e,t){$(document.body).off("action:"+e,t)}}}(r);function open_menu(e){$(e).siblings(".drop-choices").not(".inuse").css("top",e.offsetHeight+"px").each(function(){$(this).css("left",$(e).position().left+"px").css("top",$(e).height()+$(e).position().top+"px")}).addClass("active inuse")}function close_menu(e){$(e).closest(".drop-choices").removeClass("active inuse")}function close_menus(e){$(".drop-choices.inuse").not(".active").removeClass("inuse"),$(".drop-choices.active").removeClass("active").trigger("close_menu"),$(".flairselector").empty(),$(e.target).closest("#search").length==0&&($("#moresearchinfo").slideUp(),$("#searchexpando").length==1?$("#searchexpando").slideUp(function(){$("#search_showmore").parent().show()}):$("#search_showmore").parent().show())}function select_tab_menu(e,t){var n="tabbedpane-"+t,r=$(e).parent().parent().parent();r.find(".tabmenu li").removeClass("selected"),$(e).parent().addClass("selected"),r.find(".tabbedpane").each(function(){this.style.display=this.id==n?"block":"none"})}function post_user(e,t){var n=$(e).find('input[name="user"]').val();return n==null?post_form(e,t):post_form(e,t+"/"+n)}function post_form(e,t,n,i,s){try{return e.disabled?!1:(n==null&&(n=function(e){return r.config.status_msg.submitting}),$(e).find(".error").not(".status").hide(),$(e).find(".status").html(n(e)).show(),simple_post_form(e,t,{},s))}catch(o){return!1}}function get_form_fields(e,t,n){return t=t||{},n||(n=function(e){return!0}),$(e).find("select, input, textarea").not(".gray, :disabled").each(function(){var e=$(this),r=e.attr("type");if(!n(this))return;if(e.data("send-checked"))t[e.attr("name")]=e.is(":checked");else if(r!="radio"&&r!="checkbox"||e.is(":checked"))t[e.attr("name")]=e.val()}),t.id==null&&(t.id=$(e).attr("id")?"#"+$(e).attr("id"):""),t}function form_error(e){return function(t){var n;t=="ratelimit"?n=r._("please wait a few seconds and try again."):n=r._("an error occurred (status: %(status)s)").format({status:t.status}),$(e).find(".status").text(n)}}function simple_post_form(e,t,n,r,i){return $.request(t,get_form_fields(e,n),i,r,"json",!1,form_error(e)),!1}function post_pseudo_form(e,t,n){var i=function(t){var n=$(t).parents("form:first");return n.length==0||n.get(0)==$(e).get(0)};return $(e).find(".error").not(".status").hide(),$(e).find(".status").html(r.config.status_msg.submitting).show(),$.request(t,get_form_fields(e,{},i),null,n,"json",!1,form_error(e)),!1}function post_multipart_form(e,t){return $(e).find(".error").not(".status").hide(),$(e).find(".status").html(r.config.status_msg.submitting).show(),!0}function showlang(){var e=$("#lang-popup").prop("innerHTML"),t=new r.ui.Popup({className:"lang-modal",content:e});return t.show(),!1}function deleteRow(e){$(e).delete_table_row()}function change_state(e,t,n,i,s){var o=$(e).parents("form").first(),u=$(e).data("event-action");u||(u=o.find("[data-event-action]").data("event-action")),r.actions.trigger("legacy:change-state",{target:e,eventAction:u,op:t,callback:n,keep:i,post_callback:s,$form:o})}$(function(){r.actions.on("legacy:change-state:success",function(e){var t=e.target,n=e.op,r=e.callback,i=e.keep,s=e.post_callback,o=e.$form,u=o.find('input[name="id"]');return u.length?u=u.val():u=$(t).thing_id(),simple_post_form(o,n,{id:u},undefined,s),r&&r(o.length?o:t,n),$.defined(i)||o.html(o.find('[name="executed"]').val()),!1})});function unread_thing(e){var t=$(e);t.hasClass("thing")||(t=t.thing()),$(t).addClass("new unread")}function read_thing(e){var t=$(e);t.hasClass("thing")||(t=t.thing()),$(t).hasClass("new")?$(t).removeClass("new"):$(t).removeClass("unread"),$.request("read_message",{id:$(t).thing_id()})}function click_thing(e){var t=$(e);t.hasClass("thing")||(t=t.thing()),t.hasClass("message")&&t.hasClass("recipient")&&(t.hasClass("unread")?t.removeClass("unread"):t.hasClass("new")&&read_thing(e))}function hide_thing(e){if($("body").hasClass("comments-page"))return;var t=$(e).thing();if(t.is(".comment")&&t.has(".child:not(:empty)").length){var n="["+_.escape(r._("deleted"))+"]",i=t.addClass("deleted").find(".entry:first");i.find(".usertext").addClass("grayed").find(".md").html("

"+n+"

"),i.find(".author").replaceWith(""+n+""),i.find(".userattrs, .score, .buttons").remove()}else t.fadeOut(function(){$(this).toggleClass("hidden");var e=$(this).thing_id();$(document).trigger("hide_thing_"+e)})}function toggle(e,t,n){if(r.access.isLinkRestricted(e))return!1;r.analytics.breadcrumbs.storeLastClick(e);var i=$(e).parent().addBack().filter(".option"),s=i.removeClass("active").siblings().addClass("active").get(0);return n&&!s.onclick&&(s.onclick=function(){return toggle(s,n,t)}),t&&t(e),!1}function cancelToggleForm(e,t,n,r){if(n&&$(e).filter("button").length){var i=$(e).thing().find(n).children(":visible").filter(":first");toggle(i)}return $(e).thing().find(t).each(function(){r&&r($(this)),$(this).hide().remove()}),!1}function linkstatus(e){return r.config.status_msg.submitting}function subscribe(e){return function(){r.config.logged&&(r.config.cur_site==e&&$("body").addClass("subscriber"),$.things(e).find(".entry").addClass("likes"),$.request("subscribe",{sr:e,action:"sub"}),r.analytics.fireUITrackingPixel("sub",e,{has_subd:r.config.has_subscribed}))}}function unsubscribe(e){return function(){r.config.logged&&(r.config.cur_site==e&&$("body").removeClass("subscriber"),$.things(e).find(".entry").removeClass("likes"),$.request("subscribe",{sr:e,action:"unsub"}),r.analytics.fireUITrackingPixel("unsub",e))}}function quarantine_optout(e){return function(){r.config.logged&&($.request("quarantine_optout",{sr:e}),$.redirect("/"))}}function friend(e,t,n){return function(){r.config.logged&&(encoded=encodeURIComponent(document.referrer),$.request("friend?note="+encoded,{name:e,container:t,type:n}))}}function unfriend(e,t,n){return function(){$.request("unfriend",{name:e,container:t,type:n})}}function add_whitelisted(e){return function(){r.config.logged&&$.request("add_whitelisted",{name:e})}}function remove_whitelisted(e){return function(){r.config.logged&&$.request("remove_whitelisted",{id:e})}}function reject_promo(e){$(e).thing().find(".rejection-form").show().find("textare").focus()}function cancel_reject_promo(e){$(e).thing().find(".rejection-form").hide()}function complete_reject_promo(e){var t=$(e);t.thing().removeClass("accepted").addClass("rejected").find(".reject_promo").remove(),t.data("hide-after-seen")&&hide_thing(e)}function helpon(e){$(e).parents(".usertext-edit:first").children(".markhelp:first").show()}function helpoff(e){$(e).parents(".usertext-edit:first").children(".markhelp:first").hide()}function show_all_messages(e){var t=$(e).parents(".message"),n=t.find(".message"),r=t.add(n),i=[];return _.each(r,function(e){var t=$(e),n=t.find(".expand:first"),r=t.hasClass("collapsed");r&&(t.toggleClass("collapsed noncollapsed"),n.text("[-]"),i.push(t.thing_id()))}),i.length&&$.request("uncollapse_message",{id:i.join(",")}),!1}function hide_all_messages(e){var t=$(e).parents(".message"),n=t.find(".message"),r=t.add(n),i=[];return _.each(r,function(e){var t=$(e),n=t.find(".expand:first"),r=t.hasClass("collapsed");r||(t.toggleClass("collapsed noncollapsed"),n.text("[+]"),i.push(t.thing_id()))}),i.length&&$.request("collapse_message",{id:i.join(",")}),!1}function togglecomment(e){var t=$(e).thing(),n=t.find(".expand:first"),r=t.hasClass("collapsed");t.toggleClass("collapsed noncollapsed"),r?n.text("[–]"):n.text("[+]")}function toggleSrQuarantine(e){var t=$(".quarantine-tool"),n=t.find(".expand:first"),r=t.hasClass("collapsed");t.toggleClass("collapsed noncollapsed"),r?n.text("[–]"):n.text("[+]")}function togglemessage(e){var t=$(e).thing(),n=t.find(".expand:first"),r=t.hasClass("collapsed");t.toggleClass("collapsed noncollapsed"),r?(n.text("[–]"),$.request("uncollapse_message",{id:$(t).thing_id()})):(n.text("[+]"),$.request("collapse_message",{id:$(t).thing_id()}))}function morechildren(e,t,n,i,s){$(e).html(r.config.status_msg.loading).css("color","red");var o=$(e).parents(".thing.morechildren:first").thing_id(),u={link_id:t,sort:n,children:i,depth:s,id:o};return $.request("morechildren",u,undefined,undefined,undefined,!1),!1}function moremessages(e){return $(e).html(r.config.status_msg.loading).css("color","red"),$.request("moremessages",{parent_id:$(e).thing_id()}),!1}function add_thing_to_cookie(e,t){var n=$(e).thing_id();if(n&&n.length)return add_thing_id_to_cookie(n,t)}function add_thing_id_to_cookie(e,t){var n=r.cookies.getUserCookie(t);n.data||(n.data="");if(n.data.substring(0,e.length)==e)return;n.data=e+","+n.data;var i=n.data.split(",");i.length>5&&(i=$.uniq(i,5),n.data=i.join(",")),r.cookies.setUserCookie(n)}function clicked_items(){var e=r.cookies.getUserCookie("recentclicks2");if(e&&e.data){var t=e.data.split(",");for(var n=t.length-1;n>=0;n--)(!t[n]||!t[n].length)&&t.splice(n,1);return t}return[]}function clear_clicked_items(){r.cookies.setUserCookie({name:"recentclicks2",value:null}),$(".gadget").remove()}function updateEventHandlers(e){e=$(e);var t=e.parent();$(e).filter(".link").find("a.title, a.comments").mousedown(function(){add_thing_to_cookie(this,"recentclicks2")}),t.filter(".organic-listing").length&&(e.find(".hide-button a, .del-button a.yes, .report-button a.yes").each(function(){$(this).get(0).onclick=null}),e.find(".hide-button a").click(function(){var e=$(this).get(0);change_state(e,"hide",function(){r.spotlight.next()})}),e.find(".del-button a.yes").click(function(){var e=$(this).get(0);change_state(e,"del",function(){r.spotlight.next()})}),e.find(".report-button a.yes").click(function(){var e=$(this).get(0);change_state(e,"report",function(){r.spotlight.next()})}))}function last_click(){var e=r.analytics.breadcrumbs.lastClickFullname();e&&$("body").hasClass("listing-page")&&($(".last-clicked").removeClass("last-clicked"),$(".id-"+e).last().addClass("last-clicked"))}function login(e){return post_user(this,"login")}function register(e){return post_user(this,"register")}function fetch_title(){var e=$("#url-field"),t=e.find(".NO_URL"),n=e.find(".title-status"),i=$("#url").val();if(i){if($('form#newlink textarea[name="title"]').val()&&!confirm("This will replace your existing title, proceed?"))return;n.show().text(r.config.status_msg.loading),t.hide(),$.request("fetch_title",{url:i})}else n.hide(),t.show().text("a url is required")}function select_form_tab(e,t,n){var r=$(e).parent();r.addClass("selected").siblings().removeClass("selected");var i=r.parent("ul").next(".formtabs-content");i.find(t).show().find(":input").removeAttr("disabled").end(),i.find(n).hide().find(":input").attr("disabled",!0)}function show_edit_usertext(e){var t=e.find(".usertext-edit"),n=e.find(".usertext-body"),r=t.find("div > textarea"),i=Math.max(n.children(".md").width(),500),s=Math.max(n.children(".md").height(),100);n.hide(),t.show(),r.css("width",""),r.css("height","");if(r.get(0).scrollHeight>r.height()){var o=Math.max(i-5,r.width());r.width(o),t.width(o);var u=Math.max(s,r.height());r.height(u)}e.find(".cancel, .save").show().end().find(".help-toggle").show().end(),r.focus()}function hide_edit_usertext(e){e.find(".usertext-edit").hide().end().find(".usertext-body").show().end().find(".cancel, .save").hide().end().find(".help-toggle").hide().end().find(".markhelp").hide().end()}function comment_reply_for_elem(e){e=$(e);var t=e.thing(),n=e.thing_id(),r=t.find(".child .usertext:first");if(!r.length||r.parent().thing_id()!=t.thing_id())r=$(".usertext.cloneable:first").clone(!0),e.new_thing_child(r),r.prop("thing_id").value=n,r.attr("id","commentreply_"+n),r.find(".error").hide();return r}function edit_usertext(e){r.actions.trigger("edit",{target:e})}$(function(){r.actions.on("edit:success",function(e){var t=$(e.target).thing();t.find(".edit-usertext:first").parent("li").addBack().hide(),show_edit_usertext(t.find(".usertext:first"))})});function cancel_usertext(e){$(window).off("beforeunload");var t=$(e);t.thing().find(".edit-usertext:first").parent("li").addBack().show(),hide_edit_usertext(t.closest(".usertext"))}function reply(e){return r.actions.trigger("reply",{target:e,eventAction:$(e).data("event-action")}),!1}$(function(){r.actions.on("reply",function(e){r.access.isLinkRestricted(e.target)&&e.preventDefault()}),r.actions.on("reply:success",function(e){var t=comment_reply_for_elem(e.target),n=t.find("textarea");if(window.getSelection&&n.val().length==0){var r=window.getSelection(),i=$(r.focusNode).parents(".md").first(),s=$(r.anchorNode).parents(".md").first();if(i.length&&i.is(s)){var o=r.toString();o.length>0&&(o=o.replace(/^/gm,"> "),n.val(o+"\n\n"),n.scrollTop(n.scrollHeight))}}show_edit_usertext(t),t.show(),t.find(".cancel").get(0).onclick=function(){$(window).off("beforeunload"),t.hide()},$(e.target).thing().find(".showreplies:visible").click()})});function toggle_distinguish_span(e){var t=$(e).parents("form")[0];$(t).children().toggle()}function set_distinguish(e,t){t==="yes_sticky"&&($(e).parents("form").first().find('input[name="sticky"]').val("true"),t="yes"),change_state(e,"distinguish/"+t),$(e).children().toggle()}function toggle_clear_suggested_sort(e){var t=$(e).parents("form")[0];$(t).children().toggle()}function block_programmatic(e){$.request("block_programmatic",{thing_fullname:e.value,should_block:e.checked})}function subreddit_hide_ads(e){$.request("subreddit_hide_ads",{subreddit_fullname:e.value,should_hide:e.checked})}function set_suggested_sort(e,t){$(e).parents("form").first().find('input[name="sort"]').val(t),change_state(e,"set_suggested_sort"),$(e).children().toggle()}function populate_click_gadget(){if($(".click-gadget").length){var e=clicked_items();e&&e.length&&(e=$.uniq(e,5),e.sort(),$.request("gadget/click/"+e.join(","),undefined,undefined,undefined,"json",!0))}}function fetch_parent(e,t,n){var i=$(e).thing(),s="";return $(e).css("color","red").html(r.config.status_msg.loading),$.getJSON(t,function(t){$.each(t,function(){this&&this.data.children&&$.each(this.data.children,function(){this.data.name==n&&(s=this.data.body_html)})}),s&&i.find(".md").first().before('
'+$.unsafe(s)+"
"),$(e).parent("li").addBack().remove()}),!1}function big_mod_action(e,t){if(!e.hasClass("pressed")){var n=e.thing_id(),i,s,o;t===-1?(s="remove",i="remove",o=".removed"):t===-2?(s="spam",i="remove",o=".spammed"):t===1&&(s="approve",i="approve",o=".approved"),r.actions.trigger("legacy:big-mod-action",{target:e[0],thingID:n,apiAction:i,eventAction:s,showSiblingSelector:o})}return e.siblings(".pretty-button").removeClass("pressed"),!1}function big_mod_toggle(e,t,n){var i=!e.hasClass("pressed");return r.actions.trigger("legacy:big-mod-toggle",{target:e[0],eventAction:i?t:n,isActionPress:i,thingID:e.thing_id()}),!1}$(function(){function t(){return toggle(this)}r.actions.on("legacy:big-mod-action:success",function(e){var t=$(e.target),n={id:e.thingID};e.eventAction==="remove"&&(n.spam=!1),t.addClass("pressed"),t.siblings(".status-msg").hide(),$.request(e.apiAction,n,null,!0),t.siblings(e.showSiblingSelector).show(),t.siblings(".pretty-button").removeClass("pressed")}),r.actions.on("legacy:big-mod-toggle:success",function(e){e.isActionPress?$(e.target).addClass("pressed"):$(e.target).removeClass("pressed"),$.request(e.eventAction,{id:e.thingID},null,!0)}),$("body").click(close_menus),$("body").set_thing_init(updateEventHandlers),"placeholder"in document.createElement("input")||$("textarea[placeholder], input[placeholder]").addClass("gray").each(function(){var e=$(this),t=e.attr("placeholder");e.val()==""&&e.val(t)}),$("textarea.gray, input.gray").focus(function(){$(this).attr("rows",7).filter(".gray").removeClass("gray").val("")}),last_click(),$(window).on("pageshow",function(){last_click()}),$('#search input[name="q"]').focus(function(){$("#searchexpando").slideDown()}),$('#search input[name="restrict_sr"]').change(function(){store.safeSet("search.restrict_sr.checked",this.checked)}),$('#searchexpando input[name="restrict_sr"]').prop("checked",!!store.safeGet("search.restrict_sr.checked")),$("#search_showmore").click(function(e){$("#search_showmore").parent().hide(),$("#moresearchinfo").slideDown(),e.preventDefault()}),$("#moresearchinfo").prepend('[-]'),$("#search_hidemore").click(function(e){$("#search_showmore").parent().show(),$("#moresearchinfo").slideUp(),e.preventDefault()});var e=$('#search input[name="q"]').val();$(".search-result-listing").find(".search-title, .search-link, .search-subreddit-link, .search-result-body").highlight(e),$(".search-result-link").find("a.search-title, a.thumbnail").mousedown(function(){var e=$(this).closest("[data-fullname]").data("fullname");e&&add_thing_id_to_cookie(e,"recentclicks2")}),$("#shortlink-text").click(function(){$(this).select()}),$(".sr_style_toggle").change(function(){return $("#sr_style_throbber").html('').css("display","inline-block"),post_form($(this),"set_sr_style_enabled")}),$(".reddit-themes .theme").click(function(){$("div.theme.selected").removeClass("selected"),$("input[name='enable_default_themes']").prop("checked",!0),$(this).hasClass("select-custom-theme")?$("#other_theme_selector").prop("checked",!0):$("input[name='theme_selector'][value='"+$(this).attr("id")+"']").prop("checked",!0),$(this).addClass("selected")}),$(".seo-comments-close").click(function(){r.cookies.set("initref",!1,{expires:30});var e={process_notes:"seo_listings_on_comments_page",target_fullname:r.config.cur_link,target_id:r.config.cur_link?r.utils.fullnameToId(r.config.cur_link):null,target_type:$.getThingType($(".thing.link:first"))},t=["session_referrer_domain","referrer_domain","referrer_url","sr_id","sr_name"];r.analytics.sendEvent("internal_click_events","feature_opt_out",t,e);var n=$(".seo-comments, .seo-comments-recommendations, #bottom-comments");n.slideUp("fast",function(){n.remove()})}),$("body").delegate(".ajax-yn-button","submit",function(){var e=$(this).find('input[name="_op"]').val();return post_form(this,e),!1}).delegate(".ajax-yn-button .togglebutton","click",t).delegate(".ajax-yn-button .no","click",t).delegate(".ajax-yn-button .yes","click",function(){$(this).closest("form").submit()})}),!function(e,t,n){e.srAutocomplete={NUM_SEED:10,KEYS:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40},SR_NAMES_DELIM:",",selectedSr:{},origSr:"",MAX_SUBREDDITS:100,MAX_DESCRIPTION_LENGTH:200,hoverCardTemplate:t.template('
<%- title %>
Description: <%- description %>\n Subscribers: <%- subscribers %>\n
'),_initialized:!1,setup:function(e,t,r,i,s){this.srSearchCache=n.with_default(e,{}),this.srHovercardCache={},this.includeSearches=t,this.isMultiple=r,this.dynamicSuggestions=i,this.includeUnadvertisable=s,this.suggestedSr={},this.defaultSuggestedSr={},this.oldSrName="";var o=n("#suggested-reddits").find(".sr-suggestion").map(function(e,t){return t.innerText});for(var u=0;u").addClass("sr-name-row").on("mouseover",this.highlightDropdown.bind(this)).on("mousedown",this.srDropdownMdown.bind(this)).on("mouseup",this.srDropdownMup.bind(this)).text(e)},srToken:function(e){var t=n('').on("click",this.srRemoveSr.bind(this));return n("" ).attr({"class":"sr-span"}).html(e).append(t)},srSuggestion:function(e){var t=n("").attr({href:"#","class":"sr-suggestion",tabindex:"100"}).on("click",this.setSrName.bind(this)).text(e);return this.isMultiple&&this._bindHovercard(t),n("
  • ").append(t)},srHovercard:function(e){var t=e.public_description||"none";t.length>this.MAX_DESCRIPTION_LENGTH&&(t=t.substring(0,this.MAX_DESCRIPTION_LENGTH)+"...");var n=e.subscribers||"unknown",r=e.display_name;return this.hoverCardTemplate({title:r,description:t,subscribers:n})},srSearch:function(t){t=t.toLowerCase();var i=this.srSearchCache;i[t]?this.srUpdateDropdown(i[t]):n.request("search_reddit_names.json",{query:t,include_over_18:e.config.over_18,include_unadvertisable:this.includeUnadvertisable},function(n){i[t]=n.names,e.srAutocomplete.srUpdateDropdown(n.names)})},srIsValidSubreddit:function(t,i,s){n(".SUBREDDIT_NOEXIST").text("loading...").show(),i=i.bind(this);if(!t)return this.srShowNoSubredditExistsErrorMsg(t);t=t.toLowerCase(),n.request("search_reddit_names.json",{query:t,include_over_18:e.config.over_18,exact:!0,include_unadvertisable:this.includeUnadvertisable},function(e){n(".field-sr").hide(),e.names.length==1?(this.srHideErrorMsg(),i(t)):this.srShowNoSubredditExistsErrorMsg(t)}.bind(this),!1,"json",!1,function(n){if(n==="ratelimit"){typeof s=="undefined"&&(s=0);if(s>3)return this.srShowRequestFailedMsg();window.setTimeout(e.srAutocomplete.srIsValidSubreddit.bind(this,t,i,s+1),2e3)}else this.srShowRequestFailedMsg()}.bind(this))},srNameUp:function(e){var t=n("#sr-autocomplete").val(),r=this.oldSrName||"";this.oldSrName=t,t===""?this.hideSrNameList():e.keyCode!=this.KEYS.UP&&e.keyCode!=this.KEYS.DOWN&&e.keyCode!=this.KEYS.TAB&&(e.keyCode==this.KEYS.ESCAPE&&this.origSr?(n("#sr-autocomplete").val(this.origSr),this.hideSrNameList()):t!=r&&(this.origSr=t,this.srSearch(n("#sr-autocomplete").val())))},srNameDown:function(e){var t=n("#sr-autocomplete");if(e.keyCode==this.KEYS.UP||e.keyCode==this.KEYS.DOWN||e.keyCode==this.KEYS.TAB){var r=e.keyCode==this.KEYS.UP&&"up"||"down",i=n("#sr-drop-down .sr-selected:first"),s=n("#sr-drop-down .sr-name-row:first"),o=n("#sr-drop-down .sr-name-row:last"),u=null;return r=="down"||e.keyCode==this.KEYS.TAB?i.length?i.get(0)==o.get(0)?u=null:u=i.next(":first"):u=s:i.length?i.get(0)==s.get(0)?u=null:u=i.prev(":first"):u=o,this.highlightDropdownRow(u),u?t.val(n.trim(u.text())):t.val(this.origSr),!1}if(e.keyCode==this.KEYS.ENTER)return this.srIsValidSubreddit(e.target.value,this.srAddSr(undefined,{subreddit:e.target.value})),this.isMultiple&&(e.target.value=""),this.hideSrNameList(),!1;if(e.keyCode==this.KEYS.BACKSPACE&&!e.target.value&&Object.keys(this.selectedSr).length!==0){e.preventDefault();var a=n("#sr-autocomplete-area > span").last();if(a){var f=a.text();delete this.selectedSr[f],a.remove(),this.srUpdateSelectedSrInput()}n("#sr-autocomplete").trigger("sr-changed",{deleteSubreddit:!0})}},hideSrNameList:function(){n("#sr-drop-down").hide()},highlightDropdown:function(t){var n=t.target;e.srAutocomplete.highlightDropdownRow(n)},highlightDropdownRow:function(e){n("#sr-drop-down").children(".sr-selected").removeClass("sr-selected"),e&&n(e).addClass("sr-selected")},srDropdownMdown:function(t){return e.srAutocomplete.srMouseRow=t.target,!1},srDropdownMup:function(e){var t=e.target;if(this.srMouseRow==t){var r=n(t).text();this.srIsValidSubreddit(r,this.srAddSr(undefined,{isAutocomplete:!0,subreddit:r})),this.isMultiple&&n("#sr-autocomplete").val(""),n("#sr-drop-down").hide()}},setSrName:function(e){e.preventDefault();var t=e.target,r=n(t).text();return n("#sr-autocomplete").trigger("focus"),this.srIsValidSubreddit(r,this.srAddSr(undefined,{isSuggestion:!0,subreddit:r})),!1},srAddSr:function(t,i){var s=Object.keys(this.selectedSr).length>=this.MAX_SUBREDDITS,o=this.isMultiple&&t&&!(t.toLowerCase()in this.selectedSr)&&!s;if(o){var u=this.srToken(t);n("#sr-autocomplete").before(u),this.selectedSr[t]=!0,this.srUpdateSelectedSrInput()}else if(t&&!this.isMultiple)n("#sr-autocomplete").val(t);else{if(!n.defined(t))return function(t){e.srAutocomplete.srAddSr(t,i)}.bind(this);if(s){this.srShowTooManySubredditsMsg();return}}e.srAutocomplete.srHideErrorMsg(),n.defined(i)?n("#sr-autocomplete").trigger("sr-changed",i):n("#sr-autocomplete").trigger("sr-changed")},srReset:function(){this.selectedSr={};var e=n("#sr-autocomplete-area > span").last();while(e.length!==0)e.remove(),e=n("#sr-autocomplete-area > span").last();this.srUpdateSelectedSrInput(),n("#sr-autocomplete").trigger("sr-changed",{deleteSubreddit:!0})},srShowNoSubredditExistsErrorMsg:function(t){var n="subreddit does not exist";t&&(n="subreddit /r/"+t+" does not exist"),e.srAutocomplete.srShowErrorMsg(n)},srShowTooManySubredditsMsg:function(){e.srAutocomplete.srShowErrorMsg(e._("the maximum number of subreddits you can target is %(num)s").format({num:this.MAX_SUBREDDITS}))},srShowRequestFailedMsg:function(){var t=e._("something went wrong. please try again");return e.srAutocomplete.srShowErrorMsg(t)},srShowErrorMsg:function(e){n(".SUBREDDIT_NOEXIST").text(e).show()},srHideErrorMsg:function(){n(".SUBREDDIT_NOEXIST").hide()},srRemoveSr:function(e){n(e.target).parent().remove(),delete this.selectedSr[e.target.previousSibling.nodeValue],this.srUpdateSelectedSrInput(),n("#sr-autocomplete").trigger("sr-changed",{deleteSubreddit:!0})},srUpdateSelectedSrInput:function(){var e=Object.keys(this.selectedSr).join(this.SR_NAMES_DELIM);n("#selected_sr_names").val(e)},srUpdateDropdown:function(e){var t=n("#sr-drop-down");if(!e.length){t.hide();return}var r=t.children(":first");r.removeClass("sr-selected"),t.children().remove();var i=0;n.each(e,function(n){if(e[n].toLowerCase()in this.selectedSr)return;if(i>10)return;i++;var r=e[n],s=this.srDropdownRow(r);t.append(s)}.bind(this));var s=n("#sr-autocomplete-area").outerHeight();t.css("top",s),t.show()},srSuggestionsClear:function(){n("#suggested-reddits").find("ul").empty(),this.suggestedSr={}},srSuggestionsReset:function(){this.srSuggestionsClear();for(var e in this.defaultSuggestedSr)this.srAddSuggestion(e)},srGetNewSuggestions:function(t,i){var s=n.map(this.selectedSr,function(e,t){return t});t=n.with_default(t,s),t=t.slice(Math.max(t.length-e.srAutocomplete.NUM_SEED,0)),i=n.with_default(i,!0),n.when(this.srFetchSuggestions(t)).then(function(t){i&&e.srAutocomplete.srSuggestionsClear();for(var n=0;n").addClass("promotedlink").appendTo(n("body")).show();n("#siteTable_organic").length&&n("#siteTable_organic").is(":hidden")?this.adBlockIsEnabled=o.is(":visible"):this.adBlockIsEnabled=o.is(":hidden"),this.adBlockIsEnabled&&e.analytics.adblockEvent("native-headline",{method:"element-hidden"}),this.showPromo=s&&!this.adBlockIsEnabled},requestPromo:function(t){t=t||{};var i=e.utils.parseQueryString(location.search),s="/api/request_promo";i.feature&&(s+="?"+n.param({feature:i.feature},!0));var o=new Date;return n.ajax({type:"POST",url:s,timeout:e.config.ads_loading_timeout_ms,data:{site:this.site,r:e.config.post_site,dt:this.displayedThings,loid:this.loid,is_refresh:t.refresh,placements:t.placements,referrer:document.referrer,day:o.getDay(),hour:o.getHours(),adblock:e.utils.getAdblockLevel()}})}}}(r,_,jQuery),!function(e,t,n){e.spotlight={_bindEvents:function(){this.$listing.off(".spotlight"),this.$listing.find(".arrow.prev").off(".spotlight"),this.$listing.find(".arrow.next").off(".spotlight"),n(document).off(".spotlight"),n(window).off(".spotlight"),this.$listing.on("click.spotlight",function(e){var t=n(e.target);t.is(".thumbnail, .title")&&(this.adWasClicked=!0)}.bind(this)),this.$listing.length&&(this.$listing.find(".arrow.prev").on("click.spotlight",this.prev),this.$listing.find(".arrow.next").on("click.spotlight",this.next)),this.showPromo&&("hidden"in document?n(document).on("visibilitychange.spotlight",this._requestOrSaveTimestamp.bind(this)):n(window).on("focus.spotlight blur.spotlight",this._requestOrSaveTimestamp.bind(this)))},setup:function(i,s,o,u,a,f){this.organics=[],this.lineup=[],this.adWasClicked=!1,this.interestProb=s,this.houseProbability=u,this.site=a,this.displayed_things=f,this.lastTabChangeTimestamp=Date.now(),this.MIN_PROMO_TIME=3e3,this.next=this._advance.bind(this,1),this.prev=this._advance.bind(this,-1),this.$listing=n(".organic-listing"),this.userEngagedWithAd=!1,(!e.promo||!e.promo._initialized)&&e.promo.setup(this.displayed_things,this.site,this.showPromo),this.showPromo=o&&!e.promo.adBlockIsEnabled,this._bindEvents(),i.forEach(function(e){this.organics.push(e),this.lineup.push({fullname:e})},this),s&&this.lineup.push(".interestbar");var l,c=e.analytics.breadcrumbs.lastClickFullname(),h=n(c?".id-"+c:null);if(h.length&&this.$listing.has(h).length)e.debug("restoring spotlight selection to last click"),l={fullname:c};else{var p=this._isDocumentVisible()&&this.showPromo;l=this.chooseRandom(p)}this.lineup=t.chain(this.lineup).reject(function(e){return t.isEqual(l,e)}).shuffle().unshift(l).value(),this.lineup.pos=0,this._advance(0)},_requestOrSaveTimestamp:function(){this._isDocumentVisible()?this.requestNewPromo():this.lastTabChangeTimestamp=Date.now()},_isDocumentVisible:function(){return"hidden"in document?!document.hidden:document.hasFocus()},requestNewPromo:function(){var t=this.$listing.find(".promotedlink");if(!t.is(":visible"))return;if(this.adWasClicked)return;var n=t.next(".clearleft"),i=Date.now()-this.lastTabChangeTimestamp;if(e.promo.adBlockIsEnabled||i1){this._advance(e||1);return}this.$listing.hide();return}t.removeClass("working"),this.$listing.removeClass("loading");if(n){var s=n.css("background-color");s&&this.$listing.css("background-color",s)}r.hide(),n.show(),this.help(n),this.lineup.pos!=0&&(this._materializePos(this._advancePos(1)),this._materializePos(this._advancePos(-1)))}.bind(this))},help:function(t){var i=n("#spotlight-help");if(!i.length)return;n(function(){var n=i.data("HelpBubble");n||(n=new e.ui.Bubble({el:i.get(0)})),n.hide(function(){i.find(".help-section").hide(),t.hasClass("promoted")?i.find(".help-promoted").show():t.hasClass("interestbar")?i.find(".help-interestbar").show():t.hasClass("adsense-wrap")?i.find(".help-adserver").show():i.find(".help-organic").show()})})}}}(r,_,jQuery),!function(e,t,n){e.listing={_initialized:!1,FOLD_LINE:6,setup:function(t,r,i,s){this.displayedThings=t,this.site=r,this.showPromo=i,this.pos=n.with_default(s,0),(!e.promo||!e.promo._initialized)&&e.promo.setup(this.displayedThings,this.site,this.showPromo),this.showPromo=i&&!e.promo.adBlockIsEnabled,this.showPromo&&this.insertPromo(),this._initialized=!0},insertPromo:function(){var t=e.promo.requestPromo({placements:"feed-"+this.pos}),r=this;t.pipe(function(e){if(!e||!e.length)return;var t=n(".sitetable.linklisting").find(".thing").length;if(tt.middleOfPage&&t.prevLinkCount!==t.linkCount&&!t.fromPrevButton&&(r(t.linkCount),t.prevLinkCount=t.linkCount,t.linkCount+=25,t.loadPoint+=20,t.middleOfPage=getMiddleOfPage(t.loadPoint)),t.linkCount>=t.urlCount+100&&n(window).off("scroll",doLoad)},getMiddleOfPage=function(e){var t=n("#siteTable .thing:nth-child("+e+")").first().offset();return t?t.top:null},adjustRankWidth=function(e,t){var r=n(e).find(".rank");return t<900?n(r).width(27):t<9900?n(r).width(37):n(r).width(47),e},n(document).ready(function(){if(e.config.feature_lazy_load_listings){var t=parseInt(n.url().param("count"),10)||0;n("#siteTable .thing.link .rank").width(adjustRankWidth(this,t)),s(),o()}})}(r,_,jQuery),!function(e,t,n){"use strict";e.r=e.r||{},r.adzerk={createSponsorshipAdFrame:function(e){var n=t("