2 lines
260 KiB
JavaScript
2 lines
260 KiB
JavaScript
/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */
|
||
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,(function(e,t){"use strict";var n=[],r=Object.getPrototypeOf,i=n.slice,o=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},a=n.push,s=n.indexOf,u={},l=u.toString,c=u.hasOwnProperty,d=c.toString,h=d.call(Object),f={},p=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},g=function(e){return null!=e&&e===e.window},m=e.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function y(e,t,n){var r,i,o=(n=n||m).createElement("script");if(o.text=e,t)for(r in v)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?u[l.call(e)]||"object":typeof e}var x="3.5.1",b=function(e,t){return new b.fn.init(e,t)};function A(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!p(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}b.fn=b.prototype={jquery:x,constructor:b,length:0,toArray:function(){return i.call(this)},get:function(e){return null==e?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return b.each(this,e)},map:function(e){return this.pushStack(b.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(b.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(b.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:n.sort,splice:n.splice},b.extend=b.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||p(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(b.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||b.isPlainObject(n)?n:{},i=!1,a[t]=b.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},b.extend({expando:"jQuery"+(x+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==l.call(e)||(t=r(e))&&("function"!=typeof(n=c.call(t,"constructor")&&t.constructor)||d.call(n)!==h))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){y(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(A(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(A(Object(e))?b.merge(n,"string"==typeof e?[e]:e):a.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:s.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,a=0,s=[];if(A(e))for(r=e.length;a<r;a++)null!=(i=t(e[a],a,n))&&s.push(i);else for(a in e)null!=(i=t(e[a],a,n))&&s.push(i);return o(s)},guid:1,support:f}),"function"==typeof Symbol&&(b.fn[Symbol.iterator]=n[Symbol.iterator]),b.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){u["[object "+t+"]"]=t.toLowerCase()}));var S=function(e){var t,n,r,i,o,a,s,u,l,c,d,h,f,p,g,m,v,y,w,x="sizzle"+1*new Date,b=e.document,A=0,S=0,T=ue(),C=ue(),k=ue(),F=ue(),I=function(e,t){return e===t&&(d=!0),0},E={}.hasOwnProperty,D=[],L=D.pop,N=D.push,M=D.push,O=D.slice,_=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},j="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="[\\x20\\t\\r\\n\\f]",P="(?:\\\\[\\da-fA-F]{1,6}"+H+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",R="\\["+H+"*("+P+")(?:"+H+"*([*^$|!~]?=)"+H+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+P+"))|)"+H+"*\\]",$=":("+P+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+R+")*)|.*)\\)|)",q=new RegExp(H+"+","g"),B=new RegExp("^"+H+"+|((?:^|[^\\\\])(?:\\\\.)*)"+H+"+$","g"),U=new RegExp("^"+H+"*,"+H+"*"),V=new RegExp("^"+H+"*([>+~]|"+H+")"+H+"*"),z=new RegExp(H+"|>"),W=new RegExp($),G=new RegExp("^"+P+"$"),Z={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+H+"*(even|odd|(([+-]|)(\\d*)n|)"+H+"*(?:([+-]|)"+H+"*(\\d+)|))"+H+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+H+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+H+"*((?:-\\d)?\\d*)"+H+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+H+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"<22>":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){h()},ae=xe((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{M.apply(D=O.call(b.childNodes),b.childNodes),D[b.childNodes.length].nodeType}catch(t){M={apply:D.length?function(e,t){N.apply(e,O.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,l,c,d,p,v,y=t&&t.ownerDocument,b=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==b&&9!==b&&11!==b)return r;if(!i&&(h(t),t=t||f,g)){if(11!==b&&(d=K.exec(e)))if(o=d[1]){if(9===b){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(y&&(l=y.getElementById(o))&&w(t,l)&&l.id===o)return r.push(l),r}else{if(d[2])return M.apply(r,t.getElementsByTagName(e)),r;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return M.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!F[e+" "]&&(!m||!m.test(e))&&(1!==b||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===b&&(z.test(e)||V.test(e))){for((y=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=x)),s=(p=a(e)).length;s--;)p[s]=(c?"#"+c:":scope")+" "+we(p[s]);v=p.join(",")}try{return M.apply(r,y.querySelectorAll(v)),r}catch(t){F(e,!0)}finally{c===x&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[x]=!0,e}function ce(e){var t=f.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function he(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return le((function(t){return t=+t,le((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},h=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:b;return a!=f&&9===a.nodeType&&a.documentElement&&(p=(f=a).documentElement,g=!o(f),b!=f&&(i=f.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ce((function(e){return p.appendChild(e).appendChild(f.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=X.test(f.getElementsByClassName),n.getById=ce((function(e){return p.appendChild(e).id=x,!f.getElementsByName||!f.getElementsByName(x).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=X.test(f.querySelectorAll))&&(ce((function(e){var t;p.appendChild(e).innerHTML="<a id='"+x+"'></a><select id='"+x+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+H+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+H+"*(?:value|"+j+")"),e.querySelectorAll("[id~="+x+"-]").length||m.push("~="),(t=f.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||m.push("\\["+H+"*name"+H+"*="+H+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||m.push(".#.+[+~]"),e.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+H+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")}))),(n.matchesSelector=X.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",$)})),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=X.test(p.compareDocumentPosition),w=t||X.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},I=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==f||e.ownerDocument==b&&w(b,e)?-1:t==f||t.ownerDocument==b&&w(b,t)?1:c?_(c,e)-_(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==f?-1:t==f?1:i?-1:o?1:c?_(c,e)-_(c,t):0;if(i===o)return he(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?he(a[r],s[r]):a[r]==b?-1:s[r]==b?1:0}),f},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(h(e),n.matchesSelector&&g&&!F[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){F(t,!0)}return 0<se(t,f,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=f&&h(e),w(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=f&&h(e);var i=r.attrHandle[t.toLowerCase()],o=i&&E.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,o=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(I),d){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=se.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=se.selectors={cacheLength:50,createPseudo:le,match:Z,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Z.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&W.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).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("(^|"+H+")"+e+"("+H+"|$)"))&&T(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&-1<i.indexOf(n):"$="===t?n&&i.slice(-n.length)===n:"~="===t?-1<(" "+i.replace(q," ")+" ").indexOf(n):"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,d,h,f,p,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s,w=!1;if(m){if(o){for(;g;){for(h=t;h=h[g];)if(s?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?m.firstChild:m.lastChild],a&&y){for(w=(f=(l=(c=(d=(h=m)[x]||(h[x]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===A&&l[1])&&l[2],h=f&&m.childNodes[f];h=++f&&h&&h[g]||(w=f=0)||p.pop();)if(1===h.nodeType&&++w&&h===t){c[e]=[A,f,w];break}}else if(y&&(w=f=(l=(c=(d=(h=t)[x]||(h[x]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===A&&l[1]),!1===w)for(;(h=++f&&h&&h[g]||(w=f=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++w||(y&&((c=(d=h[x]||(h[x]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]=[A,w]),h!==t)););return(w-=i)===r||w%r==0&&0<=w/r}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[x]?i(t):1<i.length?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=_(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:le((function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[x]?le((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:le((function(e){return function(t){return 0<se(e,t).length}})),contains:le((function(e){return e=e.replace(te,ne),function(t){return-1<(t.textContent||i(t)).indexOf(e)}})),lang:le((function(e){return G.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:me((function(){return[0]})),last:me((function(e,t){return[t-1]})),eq:me((function(e,t,n){return[n<0?n+t:n]})),even:me((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:me((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:me((function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e})),gt:me((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ye(){}function we(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function xe(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=S++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,d,h=[A,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=(d=t[x]||(t[x]={}))[t.uniqueID]||(d[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===A&&l[1]===s)return h[2]=l[2];if((c[o]=h)[2]=e(t,n,u))return!0}return!1}}function be(e){return 1<e.length?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Ae(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Se(e,t,n,r,i,o){return r&&!r[x]&&(r=Se(r)),i&&!i[x]&&(i=Se(i,o)),le((function(o,a,s,u){var l,c,d,h=[],f=[],p=a.length,g=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:Ae(g,h,e,s,u),v=n?i||(o?e:p||r)?[]:a:m;if(n&&n(m,v,s,u),r)for(l=Ae(v,f),r(l,[],s,u),c=l.length;c--;)(d=l[c])&&(v[f[c]]=!(m[f[c]]=d));if(o){if(i||e){if(i){for(l=[],c=v.length;c--;)(d=v[c])&&l.push(m[c]=d);i(null,v=[],l,u)}for(c=v.length;c--;)(d=v[c])&&-1<(l=i?_(o,d):h[c])&&(o[l]=!(a[l]=d))}}else v=Ae(v===a?v.splice(p,v.length):v),i?i(null,a,v,u):M.apply(a,v)}))}function Te(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=xe((function(e){return e===t}),s,!0),d=xe((function(e){return-1<_(t,e)}),s,!0),h=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):d(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])h=[xe(be(h),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[x]){for(i=++u;i<o&&!r.relative[e[i].type];i++);return Se(1<u&&be(h),1<u&&we(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u<i&&Te(e.slice(u,i)),i<o&&Te(e=e.slice(i)),i<o&&we(e))}h.push(n)}return be(h)}return ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,a=se.tokenize=function(e,t){var n,i,o,a,s,u,l,c=C[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=r.preFilter;s;){for(a in n&&!(i=U.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=V.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(B," ")}),s=s.slice(n.length)),r.filter)!(i=Z[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):C(e,u).slice(0)},s=se.compile=function(e,t){var n,i,o,s,u,c,d=[],p=[],m=k[e+" "];if(!m){for(t||(t=a(e)),n=t.length;n--;)(m=Te(t[n]))[x]?d.push(m):p.push(m);(m=k(e,(i=p,s=0<(o=d).length,u=0<i.length,c=function(e,t,n,a,c){var d,p,m,v=0,y="0",w=e&&[],x=[],b=l,S=e||u&&r.find.TAG("*",c),T=A+=null==b?1:Math.random()||.1,C=S.length;for(c&&(l=t==f||t||c);y!==C&&null!=(d=S[y]);y++){if(u&&d){for(p=0,t||d.ownerDocument==f||(h(d),n=!g);m=i[p++];)if(m(d,t||f,n)){a.push(d);break}c&&(A=T)}s&&((d=!m&&d)&&v--,e&&w.push(d))}if(v+=y,s&&y!==v){for(p=0;m=o[p++];)m(w,x,t,n);if(e){if(0<v)for(;y--;)w[y]||x[y]||(x[y]=L.call(a));x=Ae(x)}M.apply(a,x),c&&!e&&0<x.length&&1<v+o.length&&se.uniqueSort(a)}return c&&(A=T,l=b),w},s?le(c):c))).selector=e}return m},u=se.select=function(e,t,n,i){var o,u,l,c,d,h="function"==typeof e&&e,f=!i&&a(e=h.selector||e);if(n=n||[],1===f.length){if(2<(u=f[0]=f[0].slice(0)).length&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=Z.needsContext.test(e)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((d=r.find[c])&&(i=d(l.matches[0].replace(te,ne),ee.test(u[0].type)&&ve(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&we(u)))return M.apply(n,i),n;break}}return(h||s(e,f))(i,t,!g,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=x.split("").sort(I).join("")===x,n.detectDuplicates=!!d,h(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(f.createElement("fieldset"))})),ce((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ce((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||de(j,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(e);b.find=S,b.expr=S.selectors,b.expr[":"]=b.expr.pseudos,b.uniqueSort=b.unique=S.uniqueSort,b.text=S.getText,b.isXMLDoc=S.isXML,b.contains=S.contains,b.escapeSelector=S.escape;var T=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&b(e).is(n))break;r.push(e)}return r},C=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=b.expr.match.needsContext;function F(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var I=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function E(e,t,n){return p(t)?b.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?b.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?b.grep(e,(function(e){return-1<s.call(t,e)!==n})):b.filter(t,e,n)}b.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?b.find.matchesSelector(r,e)?[r]:[]:b.find.matches(e,b.grep(t,(function(e){return 1===e.nodeType})))},b.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(b(e).filter((function(){for(t=0;t<r;t++)if(b.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)b.find(e,i[t],n);return 1<r?b.uniqueSort(n):n},filter:function(e){return this.pushStack(E(this,e||[],!1))},not:function(e){return this.pushStack(E(this,e||[],!0))},is:function(e){return!!E(this,"string"==typeof e&&k.test(e)?b(e):e||[],!1).length}});var D,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(b.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof b?t[0]:t,b.merge(this,b.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:m,!0)),I.test(r[1])&&b.isPlainObject(t))for(r in t)p(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=m.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):p(e)?void 0!==n.ready?n.ready(e):e(b):b.makeArray(e,this)}).prototype=b.fn,D=b(m);var N=/^(?:parents|prev(?:Until|All))/,M={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}b.fn.extend({has:function(e){var t=b(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(b.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&b(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&b.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?b.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?s.call(b(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(b.uniqueSort(b.merge(this.get(),b(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T(e,"parentNode")},parentsUntil:function(e,t,n){return T(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return T(e,"nextSibling")},prevAll:function(e){return T(e,"previousSibling")},nextUntil:function(e,t,n){return T(e,"nextSibling",n)},prevUntil:function(e,t,n){return T(e,"previousSibling",n)},siblings:function(e){return C((e.parentNode||{}).firstChild,e)},children:function(e){return C(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(F(e,"template")&&(e=e.content||e),b.merge([],e.childNodes))}},(function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),1<this.length&&(M[e]||b.uniqueSort(i),N.test(e)&&i.reverse()),this.pushStack(i)}}));var _=/[^\x20\t\r\n\f]+/g;function j(e){return e}function H(e){throw e}function P(e,t,n,r){var i;try{e&&p(i=e.promise)?i.call(e).done(t).fail(n):e&&p(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}b.Callbacks=function(e){var t,n;e="string"==typeof e?(t=e,n={},b.each(t.match(_)||[],(function(e,t){n[t]=!0})),n):b.extend({},e);var r,i,o,a,s=[],u=[],l=-1,c=function(){for(a=a||e.once,o=r=!0;u.length;l=-1)for(i=u.shift();++l<s.length;)!1===s[l].apply(i[0],i[1])&&e.stopOnFalse&&(l=s.length,i=!1);e.memory||(i=!1),r=!1,a&&(s=i?[]:"")},d={add:function(){return s&&(i&&!r&&(l=s.length-1,u.push(i)),function t(n){b.each(n,(function(n,r){p(r)?e.unique&&d.has(r)||s.push(r):r&&r.length&&"string"!==w(r)&&t(r)}))}(arguments),i&&!r&&c()),this},remove:function(){return b.each(arguments,(function(e,t){for(var n;-1<(n=b.inArray(t,s,n));)s.splice(n,1),n<=l&&l--})),this},has:function(e){return e?-1<b.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=i="",this},disabled:function(){return!s},lock:function(){return a=u=[],i||r||(s=i=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),r||c()),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!o}};return d},b.extend({Deferred:function(t){var n=[["notify","progress",b.Callbacks("memory"),b.Callbacks("memory"),2],["resolve","done",b.Callbacks("once memory"),b.Callbacks("once memory"),0,"resolved"],["reject","fail",b.Callbacks("once memory"),b.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return b.Deferred((function(t){b.each(n,(function(n,r){var i=p(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&p(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=r.apply(s,u))===n.promise())throw new TypeError("Thenable self-resolution");l=e&&("object"==typeof e||"function"==typeof e)&&e.then,p(l)?i?l.call(e,a(o,n,j,i),a(o,n,H,i)):(o++,l.call(e,a(o,n,j,i),a(o,n,H,i),a(o,n,j,n.notifyWith))):(r!==j&&(s=void 0,u=[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){b.Deferred.exceptionHook&&b.Deferred.exceptionHook(e,c.stackTrace),o<=t+1&&(r!==H&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(b.Deferred.getStackHook&&(c.stackTrace=b.Deferred.getStackHook()),e.setTimeout(c))}}return b.Deferred((function(e){n[0][3].add(a(0,e,p(i)?i:j,e.notifyWith)),n[1][3].add(a(0,e,p(t)?t:j)),n[2][3].add(a(0,e,p(r)?r:H))})).promise()},promise:function(e){return null!=e?b.extend(e,i):i}},o={};return b.each(n,(function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add((function(){r=s}),n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),o=i.call(arguments),a=b.Deferred(),s=function(e){return function(n){r[e]=this,o[e]=1<arguments.length?i.call(arguments):n,--t||a.resolveWith(r,o)}};if(t<=1&&(P(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||p(o[n]&&o[n].then)))return a.then();for(;n--;)P(o[n],s(n),a.reject);return a.promise()}});var R=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;b.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&R.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},b.readyException=function(t){e.setTimeout((function(){throw t}))};var $=b.Deferred();function q(){m.removeEventListener("DOMContentLoaded",q),e.removeEventListener("load",q),b.ready()}b.fn.ready=function(e){return $.then(e).catch((function(e){b.readyException(e)})),this},b.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--b.readyWait:b.isReady)||(b.isReady=!0)!==e&&0<--b.readyWait||$.resolveWith(m,[b])}}),b.ready.then=$.then,"complete"===m.readyState||"loading"!==m.readyState&&!m.documentElement.doScroll?e.setTimeout(b.ready):(m.addEventListener("DOMContentLoaded",q),e.addEventListener("load",q));var B=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)B(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,p(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(b(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},U=/^-ms-/,V=/-([a-z])/g;function z(e,t){return t.toUpperCase()}function W(e){return e.replace(U,"ms-").replace(V,z)}var G=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Z(){this.expando=b.expando+Z.uid++}Z.uid=1,Z.prototype={cache:function(e){var t=e[this.expando];return t||(t={},G(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[W(t)]=n;else for(r in t)i[W(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][W(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(W):(t=W(t))in r?[t]:t.match(_)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||b.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!b.isEmptyObject(t)}};var Y=new Z,Q=new Z,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,X=/[A-Z]/g;function K(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(X,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}b.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),b.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=W(r.slice(5)),K(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){Q.set(this,e)})):B(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=Q.get(o,e))||void 0!==(n=K(o,e))?n:void 0;this.each((function(){Q.set(this,e,t)}))}),null,t,1<arguments.length,null,!0)},removeData:function(e){return this.each((function(){Q.remove(this,e)}))}}),b.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,b.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){b.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:b.Callbacks("once memory").add((function(){Y.remove(e,[t+"queue",n])}))})}}),b.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?b.queue(this[0],e):void 0===t?this:this.each((function(){var n=b.queue(this,e,t);b._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&b.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){b.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=b.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=m.documentElement,ie=function(e){return b.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return b.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===b.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return b.css(e,t,"")},u=s(),l=n&&n[3]||(b.cssNumber[t]?"":"px"),c=e.nodeType&&(b.cssNumber[t]||"px"!==l&&+u)&&te.exec(b.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)b.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,b.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,d=e.length;c<d;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=b.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<d;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}b.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){ae(this)?b(this).show():b(this).hide()}))}});var ce,de,he=/^(?:checkbox|radio)$/i,fe=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,pe=/^$|^module$|\/(?:java|ecma)script/i;ce=m.createDocumentFragment().appendChild(m.createElement("div")),(de=m.createElement("input")).setAttribute("type","radio"),de.setAttribute("checked","checked"),de.setAttribute("name","t"),ce.appendChild(de),f.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",f.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function me(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&F(e,t)?b.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,f.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var ye=/<|&#?\w+;/;function we(e,t,n,r,i){for(var o,a,s,u,l,c,d=t.createDocumentFragment(),h=[],f=0,p=e.length;f<p;f++)if((o=e[f])||0===o)if("object"===w(o))b.merge(h,o.nodeType?[o]:o);else if(ye.test(o)){for(a=a||d.appendChild(t.createElement("div")),s=(fe.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+b.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;b.merge(h,a.childNodes),(a=d.firstChild).textContent=""}else h.push(t.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(r&&-1<b.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=me(d.appendChild(o),"script"),l&&ve(a),n)for(c=0;o=a[c++];)pe.test(o.type||"")&&n.push(o);return d}var xe=/^key/,be=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ae=/^([^.]*)(?:\.(.+)|)/;function Se(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return m.activeElement}catch(e){}}()==("focus"===t)}function ke(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)ke(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return b().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=b.guid++)),e.each((function(){b.event.add(this,t,i,r,n)}))}function Fe(e,t,n){n?(Y.set(e,t,!1),b.event.add(e,t,{namespace:!1,handler:function(e){var r,o,a=Y.get(this,t);if(1&e.isTrigger&&this[t]){if(a.length)(b.event.special[t]||{}).delegateType&&e.stopPropagation();else if(a=i.call(arguments),Y.set(this,t,a),r=n(this,t),this[t](),a!==(o=Y.get(this,t))||r?Y.set(this,t,!1):o={},a!==o)return e.stopImmediatePropagation(),e.preventDefault(),o.value}else a.length&&(Y.set(this,t,{value:b.event.trigger(b.extend(a[0],b.Event.prototype),a.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,t)&&b.event.add(e,t,Se)}b.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,d,h,f,p,g,m=Y.get(e);if(G(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&b.find.matchesSelector(re,i),n.guid||(n.guid=b.guid++),(u=m.events)||(u=m.events=Object.create(null)),(a=m.handle)||(a=m.handle=function(t){return void 0!==b&&b.event.triggered!==t.type?b.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(_)||[""]).length;l--;)f=g=(s=Ae.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),f&&(d=b.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,d=b.event.special[f]||{},c=b.extend({type:f,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&b.expr.match.needsContext.test(i),namespace:p.join(".")},o),(h=u[f])||((h=u[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,p,a)||e.addEventListener&&e.addEventListener(f,a)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),b.event.global[f]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,d,h,f,p,g,m=Y.hasData(e)&&Y.get(e);if(m&&(u=m.events)){for(l=(t=(t||"").match(_)||[""]).length;l--;)if(f=g=(s=Ae.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),f){for(d=b.event.special[f]||{},h=u[f=(r?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(e,c));a&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,m.handle)||b.removeEvent(e,f,m.handle),delete u[f])}else for(f in u)b.event.remove(e,f+t[l],n,r,!0);b.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=b.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=b.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){for(a=b.event.handlers.call(this,u,l),t=0;(i=a[t++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((b.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<b(i,this).index(l):b.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(b.Event.prototype,e,{enumerable:!0,configurable:!0,get:p(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[b.expando]?e:new b.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return he.test(t.type)&&t.click&&F(t,"input")&&Fe(t,"click",Se),!1},trigger:function(e){var t=this||e;return he.test(t.type)&&t.click&&F(t,"input")&&Fe(t,"click"),!0},_default:function(e){var t=e.target;return he.test(t.type)&&t.click&&F(t,"input")&&Y.get(t,"click")||F(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},b.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},b.Event=function(e,t){if(!(this instanceof b.Event))return new b.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Se:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&b.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[b.expando]=!0},b.Event.prototype={constructor:b.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Se,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Se,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Se,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},b.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&xe.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&be.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},b.event.addProp),b.each({focus:"focusin",blur:"focusout"},(function(e,t){b.event.special[e]={setup:function(){return Fe(this,e,Ce),!1},trigger:function(){return Fe(this,e),!0},delegateType:t}})),b.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||b.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}})),b.fn.extend({on:function(e,t,n,r){return ke(this,e,t,n,r)},one:function(e,t,n,r){return ke(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,b(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each((function(){b.event.remove(this,e,n,t)}))}});var Ie=/<script|<style|<link/i,Ee=/checked\s*(?:[^=]|=\s*.checked.)/i,De=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return F(e,"table")&&F(11!==t.nodeType?t:t.firstChild,"tr")&&b(e).children("tbody")[0]||e}function Ne(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Me(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)b.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=b.extend({},o),Q.set(t,a))}}function _e(e,t,n,r){t=o(t);var i,a,s,u,l,c,d=0,h=e.length,g=h-1,m=t[0],v=p(m);if(v||1<h&&"string"==typeof m&&!f.checkClone&&Ee.test(m))return e.each((function(i){var o=e.eq(i);v&&(t[0]=m.call(this,i,o.html())),_e(o,t,n,r)}));if(h&&(a=(i=we(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=a),a||r)){for(u=(s=b.map(me(i,"script"),Ne)).length;d<h;d++)l=i,d!==g&&(l=b.clone(l,!0,!0),u&&b.merge(s,me(l,"script"))),n.call(e[d],l,d);if(u)for(c=s[s.length-1].ownerDocument,b.map(s,Me),d=0;d<u;d++)l=s[d],pe.test(l.type||"")&&!Y.access(l,"globalEval")&&b.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?b._evalUrl&&!l.noModule&&b._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):y(l.textContent.replace(De,""),l,c))}return e}function je(e,t,n){for(var r,i=t?b.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||b.cleanData(me(r)),r.parentNode&&(n&&ie(r)&&ve(me(r,"script")),r.parentNode.removeChild(r));return e}b.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),d=ie(e);if(!(f.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(a=me(c),r=0,i=(o=me(e)).length;r<i;r++)s=o[r],"input"===(l=(u=a[r]).nodeName.toLowerCase())&&he.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||me(e),a=a||me(c),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,c);return 0<(a=me(c,"script")).length&&ve(a,!d&&me(e,"script")),c},cleanData:function(e){for(var t,n,r,i=b.event.special,o=0;void 0!==(n=e[o]);o++)if(G(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?b.event.remove(n,r):b.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),b.fn.extend({detach:function(e){return je(this,e,!0)},remove:function(e){return je(this,e)},text:function(e){return B(this,(function(e){return void 0===e?b.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return _e(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)}))},prepend:function(){return _e(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return _e(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return _e(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(b.cleanData(me(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return b.clone(this,e,t)}))},html:function(e){return B(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ie.test(e)&&!ge[(fe.exec(e)||["",""])[1].toLowerCase()]){e=b.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(b.cleanData(me(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return _e(this,arguments,(function(t){var n=this.parentNode;b.inArray(this,e)<0&&(b.cleanData(me(this)),n&&n.replaceChild(t,this))}),e)}}),b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){b.fn[e]=function(e){for(var n,r=[],i=b(e),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),b(i[s])[t](n),a.apply(r,n.get());return this.pushStack(r)}}));var He=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Pe=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Re=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},$e=new RegExp(ne.join("|"),"i");function qe(e,t,n){var r,i,o,a,s=e.style;return(n=n||Pe(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=b.style(e,t)),!f.pixelBoxStyles()&&He.test(a)&&$e.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Be(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(l).appendChild(c);var t=e.getComputedStyle(c);r="1%"!==t.top,u=12===n(t.marginLeft),c.style.right="60%",a=36===n(t.right),i=36===n(t.width),c.style.position="absolute",o=12===n(c.offsetWidth/3),re.removeChild(l),c=null}}function n(e){return Math.round(parseFloat(e))}var r,i,o,a,s,u,l=m.createElement("div"),c=m.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===c.style.backgroundClip,b.extend(f,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,n,r,i;return null==s&&(t=m.createElement("table"),n=m.createElement("tr"),r=m.createElement("div"),t.style.cssText="position:absolute;left:-11111px",n.style.height="1px",r.style.height="9px",re.appendChild(t).appendChild(n).appendChild(r),i=e.getComputedStyle(n),s=3<parseInt(i.height),re.removeChild(t)),s}}))}();var Ue=["Webkit","Moz","ms"],Ve=m.createElement("div").style,ze={};function We(e){return b.cssProps[e]||ze[e]||(e in Ve?e:ze[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Ue.length;n--;)if((e=Ue[n]+t)in Ve)return e}(e)||e)}var Ge=/^(none|table(?!-c[ea]).+)/,Ze=/^--/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Xe(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=b.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=b.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=b.css(e,"border"+ne[a]+"Width",!0,i))):(u+=b.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=b.css(e,"border"+ne[a]+"Width",!0,i):s+=b.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Ke(e,t,n){var r=Pe(e),i=(!f.boxSizingReliable()||n)&&"border-box"===b.css(e,"boxSizing",!1,r),o=i,a=qe(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(He.test(a)){if(!n)return a;a="auto"}return(!f.boxSizingReliable()&&i||!f.reliableTrDimensions()&&F(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===b.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===b.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Xe(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=qe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=W(t),u=Ze.test(t),l=e.style;if(u||(t=We(s)),a=b.cssHooks[t]||b.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(b.cssNumber[s]?"":"px")),f.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=W(t);return Ze.test(t)||(t=We(s)),(a=b.cssHooks[t]||b.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=qe(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),b.each(["height","width"],(function(e,t){b.cssHooks[t]={get:function(e,n,r){if(n)return!Ge.test(b.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ke(e,t,r):Re(e,Ye,(function(){return Ke(e,t,r)}))},set:function(e,n,r){var i,o=Pe(e),a=!f.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===b.css(e,"boxSizing",!1,o),u=r?Xe(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Xe(e,t,"border",!1,o)-.5)),u&&(i=te.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=b.css(e,t)),Je(0,n,u)}}})),b.cssHooks.marginLeft=Be(f.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(qe(e,"marginLeft"))||e.getBoundingClientRect().left-Re(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),b.each({margin:"",padding:"",border:"Width"},(function(e,t){b.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+ne[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(b.cssHooks[e+t].set=Je)})),b.fn.extend({css:function(e,t){return B(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Pe(e),i=t.length;a<i;a++)o[t[a]]=b.css(e,t[a],!1,r);return o}return void 0!==n?b.style(e,t,n):b.css(e,t)}),e,t,1<arguments.length)}}),((b.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||b.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=b.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):1!==e.elem.nodeType||!b.cssHooks[e.prop]&&null==e.elem.style[We(e.prop)]?e.elem[e.prop]=e.now:b.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},b.fx=et.prototype.init,b.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===m.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(st):e.setTimeout(st,b.fx.interval),b.fx.tick())}function ut(){return e.setTimeout((function(){tt=void 0})),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(dt.tweeners[t]||[]).concat(dt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function dt(e,t,n){var r,i,o=0,a=dt.prefilters.length,s=b.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var t=tt||ut(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{},easing:b.easing._default},n),originalProperties:t,originalOptions:n,startTime:tt||ut(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=W(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=b.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);o<a;o++)if(r=dt.prefilters[o].call(l,e,c,l.opts))return p(r.stop)&&(b._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return b.map(c,ct,l),p(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}b.Animation=b.extend(dt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){p(e)?(t=e,e=["*"]):e=e.match(_);for(var n,r=0,i=e.length;r<i;r++)n=e[r],dt.tweeners[n]=dt.tweeners[n]||[],dt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,d="width"in t||"height"in t,h=this,f={},p=e.style,g=e.nodeType&&ae(e),m=Y.get(e,"fxshow");for(r in n.queue||(null==(a=b._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,b.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!m||void 0===m[r])continue;g=!0}f[r]=m&&m[r]||b.style(e,r)}if((u=!b.isEmptyObject(t))||!b.isEmptyObject(f))for(r in d&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(l=m&&m.display)&&(l=Y.get(e,"display")),"none"===(c=b.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=b.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===b.css(e,"float")&&(u||(h.done((function(){p.display=l})),null==l&&(c=p.display,l="none"===c?"":c)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),u=!1,f)u||(m?"hidden"in m&&(g=m.hidden):m=Y.access(e,"fxshow",{display:l}),o&&(m.hidden=!g),g&&le([e],!0),h.done((function(){for(r in g||le([e]),Y.remove(e,"fxshow"),f)b.style(e,r,f[r])}))),u=ct(g?m[r]:0,r,h),r in m||(m[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?dt.prefilters.unshift(e):dt.prefilters.push(e)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||p(e)&&e,duration:e,easing:n&&t||t&&!p(t)&&t};return b.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in b.fx.speeds?r.duration=b.fx.speeds[r.duration]:r.duration=b.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){p(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=dt(this,b.extend({},e),o);(i||Y.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=b.timers,a=Y.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&at.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||b.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=Y.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),b.each(["toggle","show","hide"],(function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(lt(t,!0),e,r,i)}})),b.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),b.timers=[],b.fx.tick=function(){var e,t=0,n=b.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||b.fx.stop(),tt=void 0},b.fx.timer=function(e){b.timers.push(e),b.fx.start()},b.fx.interval=13,b.fx.start=function(){nt||(nt=!0,st())},b.fx.stop=function(){nt=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fn.delay=function(t,n){return t=b.fx&&b.fx.speeds[t]||t,n=n||"fx",this.queue(n,(function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}}))},rt=m.createElement("input"),it=m.createElement("select").appendChild(m.createElement("option")),rt.type="checkbox",f.checkOn=""!==rt.value,f.optSelected=it.selected,(rt=m.createElement("input")).value="t",rt.type="radio",f.radioValue="t"===rt.value;var ht,ft=b.expr.attrHandle;b.fn.extend({attr:function(e,t){return B(this,b.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each((function(){b.removeAttr(this,e)}))}}),b.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?b.prop(e,t,n):(1===o&&b.isXMLDoc(e)||(i=b.attrHooks[t.toLowerCase()]||(b.expr.match.bool.test(t)?ht:void 0)),void 0!==n?null===n?void b.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=b.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!f.radioValue&&"radio"===t&&F(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(_);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),ht={set:function(e,t,n){return!1===t?b.removeAttr(e,n):e.setAttribute(n,n),n}},b.each(b.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=ft[t]||b.find.attr;ft[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ft[a],ft[a]=i,i=null!=n(e,t,r)?a:null,ft[a]=o),i}}));var pt=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function mt(e){return(e.match(_)||[]).join(" ")}function vt(e){return e.getAttribute&&e.getAttribute("class")||""}function yt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(_)||[]}b.fn.extend({prop:function(e,t){return B(this,b.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each((function(){delete this[b.propFix[e]||e]}))}}),b.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&b.isXMLDoc(e)||(t=b.propFix[t]||t,i=b.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=b.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(b.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),b.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){b.propFix[this.toLowerCase()]=this})),b.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(p(e))return this.each((function(t){b(this).addClass(e.call(this,t,vt(this)))}));if((t=yt(e)).length)for(;n=this[u++];)if(i=vt(n),r=1===n.nodeType&&" "+mt(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(p(e))return this.each((function(t){b(this).removeClass(e.call(this,t,vt(this)))}));if(!arguments.length)return this.attr("class","");if((t=yt(e)).length)for(;n=this[u++];)if(i=vt(n),r=1===n.nodeType&&" "+mt(i)+" "){for(a=0;o=t[a++];)for(;-1<r.indexOf(" "+o+" ");)r=r.replace(" "+o+" "," ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):p(e)?this.each((function(n){b(this).toggleClass(e.call(this,n,vt(this),t),t)})):this.each((function(){var t,i,o,a;if(r)for(i=0,o=b(this),a=yt(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=vt(this))&&Y.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Y.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&-1<(" "+mt(vt(n))+" ").indexOf(t))return!0;return!1}});var wt=/\r/g;b.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=p(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,b(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=b.map(i,(function(e){return null==e?"":e+""}))),(t=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=b.valHooks[i.type]||b.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(wt,""):null==n?"":n:void 0}}),b.extend({valHooks:{option:{get:function(e){var t=b.find.attr(e,"value");return null!=t?t:mt(b.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!F(n.parentNode,"optgroup"))){if(t=b(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=b.makeArray(t),a=i.length;a--;)((r=i[a]).selected=-1<b.inArray(b.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),b.each(["radio","checkbox"],(function(){b.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<b.inArray(b(e).val(),t)}},f.checkOn||(b.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),f.focusin="onfocusin"in e;var xt=/^(?:focusinfocus|focusoutblur)$/,bt=function(e){e.stopPropagation()};b.extend(b.event,{trigger:function(t,n,r,i){var o,a,s,u,l,d,h,f,v=[r||m],y=c.call(t,"type")?t.type:t,w=c.call(t,"namespace")?t.namespace.split("."):[];if(a=f=s=r=r||m,3!==r.nodeType&&8!==r.nodeType&&!xt.test(y+b.event.triggered)&&(-1<y.indexOf(".")&&(y=(w=y.split(".")).shift(),w.sort()),l=y.indexOf(":")<0&&"on"+y,(t=t[b.expando]?t:new b.Event(y,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=w.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:b.makeArray(n,[t]),h=b.event.special[y]||{},i||!h.trigger||!1!==h.trigger.apply(r,n))){if(!i&&!h.noBubble&&!g(r)){for(u=h.delegateType||y,xt.test(u+y)||(a=a.parentNode);a;a=a.parentNode)v.push(a),s=a;s===(r.ownerDocument||m)&&v.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=v[o++])&&!t.isPropagationStopped();)f=a,t.type=1<o?u:h.bindType||y,(d=(Y.get(a,"events")||Object.create(null))[t.type]&&Y.get(a,"handle"))&&d.apply(a,n),(d=l&&a[l])&&d.apply&&G(a)&&(t.result=d.apply(a,n),!1===t.result&&t.preventDefault());return t.type=y,i||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(v.pop(),n)||!G(r)||l&&p(r[y])&&!g(r)&&((s=r[l])&&(r[l]=null),b.event.triggered=y,t.isPropagationStopped()&&f.addEventListener(y,bt),r[y](),t.isPropagationStopped()&&f.removeEventListener(y,bt),b.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=b.extend(new b.Event,n,{type:e,isSimulated:!0});b.event.trigger(r,null,t)}}),b.fn.extend({trigger:function(e,t){return this.each((function(){b.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return b.event.trigger(e,t,n,!0)}}),f.focusin||b.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){b.event.simulate(t,e.target,b.event.fix(e))};b.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=Y.access(r,t);i||r.addEventListener(e,n,!0),Y.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=Y.access(r,t)-1;i?Y.access(r,t,i):(r.removeEventListener(e,n,!0),Y.remove(r,t))}}}));var At=e.location,St={guid:Date.now()},Tt=/\?/;b.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(t){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+t),n};var Ct=/\[\]$/,kt=/\r?\n/g,Ft=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;function Et(e,t,n,r){var i;if(Array.isArray(t))b.each(t,(function(t,i){n||Ct.test(e)?r(e,i):Et(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==w(t))r(e,t);else for(i in t)Et(e+"["+i+"]",t[i],n,r)}b.param=function(e,t){var n,r=[],i=function(e,t){var n=p(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,(function(){i(this.name,this.value)}));else for(n in e)Et(n,e[n],t,i);return r.join("&")},b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&It.test(this.nodeName)&&!Ft.test(e)&&(this.checked||!he.test(e))})).map((function(e,t){var n=b(this).val();return null==n?null:Array.isArray(n)?b.map(n,(function(e){return{name:t.name,value:e.replace(kt,"\r\n")}})):{name:t.name,value:n.replace(kt,"\r\n")}})).get()}});var Dt=/%20/g,Lt=/#.*$/,Nt=/([?&])_=[^&]*/,Mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,_t=/^\/\//,jt={},Ht={},Pt="*/".concat("*"),Rt=m.createElement("a");function $t(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(_)||[];if(p(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qt(e,t,n,r){var i={},o=e===Ht;function a(s){var u;return i[s]=!0,b.each(e[s]||[],(function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)})),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Bt(e,t){var n,r,i=b.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&b.extend(!0,e,r),e}Rt.href=At.href,b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:At.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(At.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Pt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Bt(Bt(e,b.ajaxSettings),t):Bt(b.ajaxSettings,e)},ajaxPrefilter:$t(jt),ajaxTransport:$t(Ht),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,i,o,a,s,u,l,c,d,h,f=b.ajaxSetup({},n),p=f.context||f,g=f.context&&(p.nodeType||p.jquery)?b(p):b.event,v=b.Deferred(),y=b.Callbacks("once memory"),w=f.statusCode||{},x={},A={},S="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=Mt.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(e=A[e.toLowerCase()]=A[e.toLowerCase()]||e,x[e]=t),this},overrideMimeType:function(e){return null==l&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||S;return r&&r.abort(t),C(0,t),this}};if(v.promise(T),f.url=((t||f.url||At.href)+"").replace(_t,At.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(_)||[""],null==f.crossDomain){u=m.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=Rt.protocol+"//"+Rt.host!=u.protocol+"//"+u.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=b.param(f.data,f.traditional)),qt(jt,f,n,T),l)return T;for(d in(c=b.event&&f.global)&&0==b.active++&&b.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Ot.test(f.type),i=f.url.replace(Lt,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Dt,"+")):(h=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Tt.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(Nt,"$1"),h=(Tt.test(i)?"&":"?")+"_="+St.guid+++h),f.url=i+h),f.ifModified&&(b.lastModified[i]&&T.setRequestHeader("If-Modified-Since",b.lastModified[i]),b.etag[i]&&T.setRequestHeader("If-None-Match",b.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&T.setRequestHeader("Content-Type",f.contentType),T.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Pt+"; q=0.01":""):f.accepts["*"]),f.headers)T.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,T,f)||l))return T.abort();if(S="abort",y.add(f.complete),T.done(f.success),T.fail(f.error),r=qt(Ht,f,n,T)){if(T.readyState=1,c&&g.trigger("ajaxSend",[T,f]),l)return T;f.async&&0<f.timeout&&(s=e.setTimeout((function(){T.abort("timeout")}),f.timeout));try{l=!1,r.send(x,C)}catch(t){if(l)throw t;C(-1,t)}}else C(-1,"No Transport");function C(t,n,a,u){var d,h,m,x,A,S=n;l||(l=!0,s&&e.clearTimeout(s),r=void 0,o=u||"",T.readyState=0<t?4:0,d=200<=t&&t<300||304===t,a&&(x=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(f,T,a)),!d&&-1<b.inArray("script",f.dataTypes)&&(f.converters["text script"]=function(){}),x=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(f,x,T,d),d?(f.ifModified&&((A=T.getResponseHeader("Last-Modified"))&&(b.lastModified[i]=A),(A=T.getResponseHeader("etag"))&&(b.etag[i]=A)),204===t||"HEAD"===f.type?S="nocontent":304===t?S="notmodified":(S=x.state,h=x.data,d=!(m=x.error))):(m=S,!t&&S||(S="error",t<0&&(t=0))),T.status=t,T.statusText=(n||S)+"",d?v.resolveWith(p,[h,S,T]):v.rejectWith(p,[T,S,m]),T.statusCode(w),w=void 0,c&&g.trigger(d?"ajaxSuccess":"ajaxError",[T,f,d?h:m]),y.fireWith(p,[T,S]),c&&(g.trigger("ajaxComplete",[T,f]),--b.active||b.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return b.get(e,t,n,"json")},getScript:function(e,t){return b.get(e,void 0,t,"script")}}),b.each(["get","post"],(function(e,t){b[t]=function(e,n,r,i){return p(n)&&(i=i||r,r=n,n=void 0),b.ajax(b.extend({url:e,type:t,dataType:i,data:n,success:r},b.isPlainObject(e)&&e))}})),b.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),b._evalUrl=function(e,t,n){return b.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){b.globalEval(e,t,n)}})},b.fn.extend({wrapAll:function(e){var t;return this[0]&&(p(e)&&(e=e.call(this[0])),t=b(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return p(e)?this.each((function(t){b(this).wrapInner(e.call(this,t))})):this.each((function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=p(e);return this.each((function(n){b(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){b(this).replaceWith(this.childNodes)})),this}}),b.expr.pseudos.hidden=function(e){return!b.expr.pseudos.visible(e)},b.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},b.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Ut={0:200,1223:204},Vt=b.ajaxSettings.xhr();f.cors=!!Vt&&"withCredentials"in Vt,f.ajax=Vt=!!Vt,b.ajaxTransport((function(t){var n,r;if(f.cors||Vt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Ut[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout((function(){n&&r()}))},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(i){if(n)throw i}},abort:function(){n&&n()}}})),b.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),b.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=b("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),m.head.appendChild(t[0])},abort:function(){n&&n()}}}));var zt,Wt=[],Gt=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Wt.pop()||b.expando+"_"+St.guid++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",(function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Gt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=p(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Gt,"$1"+i):!1!==t.jsonp&&(t.url+=(Tt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||b.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always((function(){void 0===o?b(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Wt.push(i)),a&&p(o)&&o(a[0]),a=o=void 0})),"script"})),f.createHTMLDocument=((zt=m.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===zt.childNodes.length),b.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(f.createHTMLDocument?((r=(t=m.implementation.createHTMLDocument("")).createElement("base")).href=m.location.href,t.head.appendChild(r)):t=m),o=!n&&[],(i=I.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&b(o).remove(),b.merge([],i.childNodes)));var r,i,o},b.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=mt(e.slice(s)),e=e.slice(0,s)),p(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&b.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,a.html(r?b("<div>").append(b.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},b.expr.pseudos.animated=function(e){return b.grep(b.timers,(function(t){return e===t.elem})).length},b.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=b.css(e,"position"),c=b(e),d={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=b.css(e,"top"),u=b.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),p(t)&&(t=t.call(e,n,b.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):("number"==typeof d.top&&(d.top+="px"),"number"==typeof d.left&&(d.left+="px"),c.css(d))}},b.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){b.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===b.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===b.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=b(e).offset()).top+=b.css(e,"borderTopWidth",!0),i.left+=b.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-b.css(r,"marginTop",!0),left:t.left-i.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===b.css(e,"position");)e=e.offsetParent;return e||re}))}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;b.fn[e]=function(r){return B(this,(function(e,r,i){var o;if(g(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),b.each(["top","left"],(function(e,t){b.cssHooks[t]=Be(f.pixelPosition,(function(e,n){if(n)return n=qe(e,t),He.test(n)?b(e).position()[t]+"px":n}))})),b.each({Height:"height",Width:"width"},(function(e,t){b.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){b.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return B(this,(function(t,n,i){var o;return g(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?b.css(t,n,s):b.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){b.fn[t]=function(e){return this.on(t,e)}})),b.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),b.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){b.fn[t]=function(e,n){return 0<arguments.length?this.on(t,null,e,n):this.trigger(t)}}));var Zt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;b.proxy=function(e,t){var n,r,o;if("string"==typeof t&&(n=e[t],t=e,e=n),p(e))return r=i.call(arguments,2),(o=function(){return e.apply(t||this,r.concat(i.call(arguments)))}).guid=e.guid=e.guid||b.guid++,o},b.holdReady=function(e){e?b.readyWait++:b.ready(!0)},b.isArray=Array.isArray,b.parseJSON=JSON.parse,b.nodeName=F,b.isFunction=p,b.isWindow=g,b.camelCase=W,b.type=w,b.now=Date.now,b.isNumeric=function(e){var t=b.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},b.trim=function(e){return null==e?"":(e+"").replace(Zt,"")},"function"==typeof define&&define.amd&&define("jquery",[],(function(){return b}));var Yt=e.jQuery,Qt=e.$;return b.noConflict=function(t){return e.$===b&&(e.$=Qt),t&&e.jQuery===b&&(e.jQuery=Yt),b},void 0===t&&(e.jQuery=e.$=b),b})),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports&&"function"==typeof require?require("jquery"):jQuery)}((function(e){"use strict";function t(n,r){var i=e.noop,o=this,a={ajaxSettings:{},autoSelectFirst:!1,appendTo:document.body,serviceUrl:null,lookup:null,onSelect:null,width:"auto",minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:t.formatResult,delimiter:null,zIndex:9999,type:"GET",noCache:!1,onSearchStart:i,onSearchComplete:i,onSearchError:i,preserveInput:!1,containerClass:"autocomplete-suggestions",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,preventBadQueries:!0,lookupFilter:function(e,t,n){return-1!==e.value.toLowerCase().indexOf(n)},paramName:"query",transformResult:function(t){return"string"==typeof t?e.parseJSON(t):t},showNoSuggestionNotice:!1,noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1};o.element=n,o.el=e(n),o.suggestions=[],o.badQueries=[],o.selectedIndex=-1,o.currentValue=o.element.value,o.intervalId=0,o.cachedResponse={},o.onChangeInterval=null,o.onChange=null,o.isLocal=!1,o.suggestionsContainer=null,o.noSuggestionsContainer=null,o.options=e.extend({},a,r),o.classes={selected:"autocomplete-selected",suggestion:"autocomplete-suggestion"},o.hint=null,o.hintValue="",o.selection=null,o.initialize(),o.setOptions(r)}var n={escapeRegExChars:function(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(e){var t=document.createElement("div");return t.className=e,t.style.position="absolute",t.style.display="none",t}},r=27,i=9,o=13,a=38,s=39,u=40;t.utils=n,e.Autocomplete=t,t.formatResult=function(e,t){if(!t)return e.value;var r="("+n.escapeRegExChars(t)+")";return e.value.replace(new RegExp(r,"gi"),"<strong>$1</strong>").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/<(\/?strong)>/g,"<$1>")},t.prototype={killerFn:null,initialize:function(){var n,r=this,i="."+r.classes.suggestion,o=r.classes.selected,a=r.options;r.element.setAttribute("autocomplete","off"),r.killerFn=function(t){e(t.target).closest("."+r.options.containerClass).length||(r.killSuggestions(),r.disableKillerFn())},r.noSuggestionsContainer=e('<div class="autocomplete-no-suggestion"></div>').html(this.options.noSuggestionNotice).get(0),r.suggestionsContainer=t.utils.createNode(a.containerClass),(n=e(r.suggestionsContainer)).appendTo(a.appendTo),"auto"!==a.width&&n.css("width",a.width),n.on("mouseover.autocomplete",i,(function(){r.activate(e(this).data("index"))})),n.on("mouseout.autocomplete",(function(){r.selectedIndex=-1,n.children("."+o).removeClass(o)})),n.on("click.autocomplete",i,(function(){return r.select(e(this).data("index")),!1})),r.fixPositionCapture=function(){r.visible&&r.fixPosition()},e(window).on("resize.autocomplete",r.fixPositionCapture),r.el.on("keydown.autocomplete",(function(e){r.onKeyPress(e)})),r.el.on("keyup.autocomplete",(function(e){r.onKeyUp(e)})),r.el.on("blur.autocomplete",(function(){r.onBlur()})),r.el.on("focus.autocomplete",(function(){r.onFocus()})),r.el.on("change.autocomplete",(function(e){r.onKeyUp(e)})),r.el.on("input.autocomplete",(function(e){r.onKeyUp(e)}))},onFocus:function(){var e=this;e.fixPosition(),e.el.val().length>=e.options.minChars&&e.onValueChange()},onBlur:function(){this.enableKillerFn()},abortAjax:function(){var e=this;e.currentRequest&&(e.currentRequest.abort(),e.currentRequest=null)},setOptions:function(t){var n=this,r=n.options;e.extend(r,t),n.isLocal=e.isArray(r.lookup),n.isLocal&&(r.lookup=n.verifySuggestionsFormat(r.lookup)),r.orientation=n.validateOrientation(r.orientation,"bottom"),e(n.suggestionsContainer).css({"max-height":r.maxHeight+"px",width:r.width+"px","z-index":r.zIndex})},clearCache:function(){this.cachedResponse={},this.badQueries=[]},clear:function(){this.clearCache(),this.currentValue="",this.suggestions=[]},disable:function(){var e=this;e.disabled=!0,clearInterval(e.onChangeInterval),e.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var t=this,n=e(t.suggestionsContainer),r=n.parent().get(0);if(r===document.body||t.options.forceFixPosition){var i=t.options.orientation,o=n.outerHeight(),a=t.el.outerHeight(),s=t.el.offset(),u={top:s.top,left:s.left};if("auto"===i){var l=e(window).height(),c=e(window).scrollTop(),d=-c+s.top-o,h=c+l-(s.top+a+o);i=Math.max(d,h)===d?"top":"bottom"}if(u.top+="top"===i?-o:a,r!==document.body){var f,p=n.css("opacity");t.visible||n.css("opacity",0).show(),f=n.offsetParent().offset(),u.top-=f.top,u.left-=f.left,t.visible||n.css("opacity",p).hide()}"auto"===t.options.width&&(u.width=t.el.outerWidth()+"px"),n.css(u)}},enableKillerFn:function(){e(document).on("click.autocomplete",this.killerFn)},disableKillerFn:function(){e(document).off("click.autocomplete",this.killerFn)},killSuggestions:function(){var e=this;e.stopKillSuggestions(),e.intervalId=window.setInterval((function(){e.visible&&(e.options.preserveInput||e.el.val(e.currentValue),e.hide()),e.stopKillSuggestions()}),50)},stopKillSuggestions:function(){window.clearInterval(this.intervalId)},isCursorAtEnd:function(){var e,t=this.el.val().length,n=this.element.selectionStart;return"number"==typeof n?n===t:!document.selection||((e=document.selection.createRange()).moveStart("character",-t),t===e.text.length)},onKeyPress:function(e){var t=this;if(t.disabled||t.visible||e.which!==u||!t.currentValue){if(!t.disabled&&t.visible){switch(e.which){case r:t.el.val(t.currentValue),t.hide();break;case s:if(t.hint&&t.options.onHint&&t.isCursorAtEnd()){t.selectHint();break}return;case i:if(t.hint&&t.options.onHint)return void t.selectHint();if(-1===t.selectedIndex)return void t.hide();if(t.select(t.selectedIndex),!1===t.options.tabDisabled)return;break;case o:if(-1===t.selectedIndex)return void t.hide();t.select(t.selectedIndex);break;case a:t.moveUp();break;case u:t.moveDown();break;default:return}e.stopImmediatePropagation(),e.preventDefault()}}else t.suggest()},onKeyUp:function(e){var t=this;if(!t.disabled){switch(e.which){case a:case u:return}clearInterval(t.onChangeInterval),t.currentValue!==t.el.val()&&(t.findBestHint(),t.options.deferRequestBy>0?t.onChangeInterval=setInterval((function(){t.onValueChange()}),t.options.deferRequestBy):t.onValueChange())}},onValueChange:function(){var t=this,n=t.options,r=t.el.val(),i=t.getQuery(r);return t.selection&&t.currentValue!==i&&(t.selection=null,(n.onInvalidateSelection||e.noop).call(t.element)),clearInterval(t.onChangeInterval),t.currentValue=r,t.selectedIndex=-1,n.triggerSelectOnValidInput&&t.isExactMatch(i)?void t.select(0):void(i.length<n.minChars?t.hide():t.getSuggestions(i))},isExactMatch:function(e){var t=this.suggestions;return 1===t.length&&t[0].value.toLowerCase()===e.toLowerCase()},getQuery:function(t){var n,r=this.options.delimiter;return r?(n=t.split(r),e.trim(n[n.length-1])):t},getSuggestionsLocal:function(t){var n,r=this.options,i=t.toLowerCase(),o=r.lookupFilter,a=parseInt(r.lookupLimit,10);return n={suggestions:e.grep(r.lookup,(function(e){return o(e,t,i)}))},a&&n.suggestions.length>a&&(n.suggestions=n.suggestions.slice(0,a)),n},getSuggestions:function(t){var n,r,i,o,a=this,s=a.options,u=s.serviceUrl;if(s.params[s.paramName]=t,r=s.ignoreParams?null:s.params,!1!==s.onSearchStart.call(a.element,s.params)){if(e.isFunction(s.lookup))return void s.lookup(t,(function(e){a.suggestions=e.suggestions,a.suggest(),s.onSearchComplete.call(a.element,t,e.suggestions)}));a.isLocal?n=a.getSuggestionsLocal(t):(e.isFunction(u)&&(u=u.call(a.element,t)),i=u+"?"+e.param(r||{}),n=a.cachedResponse[i]),n&&e.isArray(n.suggestions)?(a.suggestions=n.suggestions,a.suggest(),s.onSearchComplete.call(a.element,t,n.suggestions)):a.isBadQuery(t)?s.onSearchComplete.call(a.element,t,[]):(a.abortAjax(),o={url:u,data:r,type:s.type,dataType:s.dataType},e.extend(o,s.ajaxSettings),a.currentRequest=e.ajax(o).done((function(e){var n;a.currentRequest=null,n=s.transformResult(e,t),a.processResponse(n,t,i),s.onSearchComplete.call(a.element,t,n.suggestions)})).fail((function(e,n,r){s.onSearchError.call(a.element,t,e,n,r)})))}},isBadQuery:function(e){if(!this.options.preventBadQueries)return!1;for(var t=this.badQueries,n=t.length;n--;)if(0===e.indexOf(t[n]))return!0;return!1},hide:function(){var t=this,n=e(t.suggestionsContainer);e.isFunction(t.options.onHide)&&t.visible&&t.options.onHide.call(t.element,n),t.visible=!1,t.selectedIndex=-1,clearInterval(t.onChangeInterval),e(t.suggestionsContainer).hide(),t.signalHint(null)},suggest:function(){if(this.suggestions.length){var t,n=this,r=n.options,i=r.groupBy,o=r.formatResult,a=n.getQuery(n.currentValue),s=n.classes.suggestion,u=n.classes.selected,l=e(n.suggestionsContainer),c=e(n.noSuggestionsContainer),d=r.beforeRender,h="",f=function(e,n){var r=e.data[i];return t===r?"":'<div class="autocomplete-group"><strong>'+(t=r)+"</strong></div>"};return r.triggerSelectOnValidInput&&n.isExactMatch(a)?void n.select(0):(e.each(n.suggestions,(function(e,t){i&&(h+=f(t,0)),h+='<div class="'+s+'" data-index="'+e+'">'+o(t,a,e)+"</div>"})),this.adjustContainerWidth(),c.detach(),l.html(h),e.isFunction(d)&&d.call(n.element,l,n.suggestions),n.fixPosition(),l.show(),r.autoSelectFirst&&(n.selectedIndex=0,l.scrollTop(0),l.children("."+s).first().addClass(u)),n.visible=!0,void n.findBestHint())}this.options.showNoSuggestionNotice?this.noSuggestions():this.hide()},noSuggestions:function(){var t=this,n=e(t.suggestionsContainer),r=e(t.noSuggestionsContainer);this.adjustContainerWidth(),r.detach(),n.empty(),n.append(r),t.fixPosition(),n.show(),t.visible=!0},adjustContainerWidth:function(){var t,n=this,r=n.options,i=e(n.suggestionsContainer);"auto"===r.width&&(t=n.el.outerWidth(),i.css("width",t>0?t:300))},findBestHint:function(){var t=this,n=t.el.val().toLowerCase(),r=null;n&&(e.each(t.suggestions,(function(e,t){var i=0===t.value.toLowerCase().indexOf(n);return i&&(r=t),!i})),t.signalHint(r))},signalHint:function(t){var n="",r=this;t&&(n=r.currentValue+t.value.substr(r.currentValue.length)),r.hintValue!==n&&(r.hintValue=n,r.hint=t,(this.options.onHint||e.noop)(n))},verifySuggestionsFormat:function(t){return t.length&&"string"==typeof t[0]?e.map(t,(function(e){return{value:e,data:null}})):t},validateOrientation:function(t,n){return t=e.trim(t||"").toLowerCase(),-1===e.inArray(t,["auto","bottom","top"])&&(t=n),t},processResponse:function(e,t,n){var r=this,i=r.options;e.suggestions=r.verifySuggestionsFormat(e.suggestions),i.noCache||(r.cachedResponse[n]=e,i.preventBadQueries&&!e.suggestions.length&&r.badQueries.push(t)),t===r.getQuery(r.currentValue)&&(r.suggestions=e.suggestions,r.suggest())},activate:function(t){var n,r=this,i=r.classes.selected,o=e(r.suggestionsContainer),a=o.find("."+r.classes.suggestion);return o.find("."+i).removeClass(i),r.selectedIndex=t,-1!==r.selectedIndex&&a.length>r.selectedIndex?(n=a.get(r.selectedIndex),e(n).addClass(i),n):null},selectHint:function(){var t=this,n=e.inArray(t.hint,t.suggestions);t.select(n)},select:function(e){this.hide(),this.onSelect(e)},moveUp:function(){var t=this;if(-1!==t.selectedIndex)return 0===t.selectedIndex?(e(t.suggestionsContainer).children().first().removeClass(t.classes.selected),t.selectedIndex=-1,t.el.val(t.currentValue),void t.findBestHint()):void t.adjustScroll(t.selectedIndex-1)},moveDown:function(){var e=this;e.selectedIndex!==e.suggestions.length-1&&e.adjustScroll(e.selectedIndex+1)},adjustScroll:function(t){var n=this,r=n.activate(t);if(r){var i,o,a,s=e(r).outerHeight();i=r.offsetTop,a=(o=e(n.suggestionsContainer).scrollTop())+n.options.maxHeight-s,o>i?e(n.suggestionsContainer).scrollTop(i):i>a&&e(n.suggestionsContainer).scrollTop(i-n.options.maxHeight+s),n.options.preserveInput||n.el.val(n.getValue(n.suggestions[t].value)),n.signalHint(null)}},onSelect:function(t){var n=this,r=n.options.onSelect,i=n.suggestions[t];n.currentValue=n.getValue(i.value),n.currentValue===n.el.val()||n.options.preserveInput||n.el.val(n.currentValue),n.signalHint(null),n.suggestions=[],n.selection=i,e.isFunction(r)&&r.call(n.element,i)},getValue:function(e){var t,n,r=this.options.delimiter;return r?1===(n=(t=this.currentValue).split(r)).length?e:t.substr(0,t.length-n[n.length-1].length)+e:e},dispose:function(){var t=this;t.el.off(".autocomplete").removeData("autocomplete"),t.disableKillerFn(),e(window).off("resize.autocomplete",t.fixPositionCapture),e(t.suggestionsContainer).remove()}},e.fn.autocomplete=e.fn.devbridgeAutocomplete=function(n,r){var i="autocomplete";return arguments.length?this.each((function(){var o=e(this),a=o.data(i);"string"==typeof n?a&&"function"==typeof a[n]&&a[n](r):(a&&a.dispose&&a.dispose(),a=new t(this,n),o.data(i,a))})):this.first().data(i)}})),function(e){function t(e,t,n){var r=document.createElement("source");r.src=n,r.type="video/"+t,e.appendChild(r)}var n=/Android/gi.test(navigator.userAgent),r=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),i="data:video/webm;base64,GkXfo0AgQoaBAUL3gQFC8oEEQvOBCEKCQAR3ZWJtQoeBAkKFgQIYU4BnQI0VSalmQCgq17FAAw9CQE2AQAZ3aGFtbXlXQUAGd2hhbW15RIlACECPQAAAAAAAFlSua0AxrkAu14EBY8WBAZyBACK1nEADdW5khkAFVl9WUDglhohAA1ZQOIOBAeBABrCBCLqBCB9DtnVAIueBAKNAHIEAAIAwAQCdASoIAAgAAUAmJaQAA3AA/vz0AAA=",o="data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAAG21kYXQAAAGzABAHAAABthADAowdbb9/AAAC6W1vb3YAAABsbXZoZAAAAAB8JbCAfCWwgAAAA+gAAAAAAAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAIVdHJhawAAAFx0a2hkAAAAD3wlsIB8JbCAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAIAAAACAAAAAABsW1kaWEAAAAgbWRoZAAAAAB8JbCAfCWwgAAAA+gAAAAAVcQAAAAAAC1oZGxyAAAAAAAAAAB2aWRlAAAAAAAAAAAAAAAAVmlkZW9IYW5kbGVyAAAAAVxtaW5mAAAAFHZtaGQAAAABAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAAEcc3RibAAAALhzdHNkAAAAAAAAAAEAAACobXA0dgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAIAAgASAAAAEgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABj//wAAAFJlc2RzAAAAAANEAAEABDwgEQAAAAADDUAAAAAABS0AAAGwAQAAAbWJEwAAAQAAAAEgAMSNiB9FAEQBFGMAAAGyTGF2YzUyLjg3LjQGAQIAAAAYc3R0cwAAAAAAAAABAAAAAQAAAAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAFHN0c3oAAAAAAAAAEwAAAAEAAAAUc3RjbwAAAAAAAAABAAAALAAAAGB1ZHRhAAAAWG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAK2lsc3QAAAAjqXRvbwAAABtkYXRhAAAAAQAAAABMYXZmNTIuNzguMw==",a=function(){return r?this.noSleepTimer=null:n&&(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("loop",""),t(this.noSleepVideo,"webm",i),t(this.noSleepVideo,"mp4",o)),this};a.prototype.enable=function(e){r?(this.disable(),this.noSleepTimer=window.setInterval((function(){window.location.href="/",window.setTimeout(window.stop,0)}),e||15e3)):n&&this.noSleepVideo.play()},a.prototype.disable=function(){r?this.noSleepTimer&&(window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):n&&this.noSleepVideo.pause()},e.NoSleep=a}(this),function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}((function(e){"use strict";function t(t){return!t||void 0!==t.allowPageScroll||void 0===t.swipe&&void 0===t.swipeStatus||(t.allowPageScroll=l),void 0!==t.click&&void 0===t.tap&&(t.tap=t.click),t||(t={}),t=e.extend({},e.fn.swipe.defaults,t),this.each((function(){var r=e(this),i=r.data(F);i||(i=new n(this,t),r.data(F,i))}))}function n(t,n){function I(t){if(!(!0===Ae.data(F+"_intouch")||e(t.target).closest(n.excludedElements,Ae).length>0)){var s=t.originalEvent?t.originalEvent:t;if(!s.pointerType||"mouse"!=s.pointerType||0!=n.fallbackToMouseEvents){var u,l=s.touches,c=l?l[0]:s;return Se=x,l?Te=l.length:!1!==n.preventDefaultEvents&&t.preventDefault(),he=0,fe=null,pe=null,xe=null,ge=0,me=0,ve=0,ye=1,we=0,(d={})[r]=te(r),d[i]=te(i),d[o]=te(o),d[a]=te(a),be=d,Y(),X(0,c),!l||Te===n.fingers||n.fingers===y||q()?(ke=oe(),2==Te&&(X(1,l[1]),me=ve=re(Ce[0].start,Ce[1].start)),(n.swipeStatus||n.pinchStatus)&&(u=_(s,Se))):u=!1,!1===u?(_(s,Se=S),u):(n.hold&&(Ne=setTimeout(e.proxy((function(){Ae.trigger("hold",[s.target]),n.hold&&(u=n.hold.call(Ae,s,s.target))}),this),n.longTapThreshold)),J(!0),null)}}var d}function E(t){var d,h,f,p,g=t.originalEvent?t.originalEvent:t;if(Se!==A&&Se!==S&&!Q()){var w,x=g.touches,T=K(x?x[0]:g);if(Fe=oe(),x&&(Te=x.length),n.hold&&clearTimeout(Ne),Se=b,2==Te&&(0==me?(X(1,x[1]),me=ve=re(Ce[0].start,Ce[1].start)):(K(x[1]),ve=re(Ce[0].end,Ce[1].end),Ce[0].end,Ce[1].end,xe=1>ye?u:s),ye=(ve/me*1).toFixed(2),we=Math.abs(me-ve)),Te===n.fingers||n.fingers===y||!x||q()){if(fe=ie(T.start,T.end),function(e,t){if(!1!==n.preventDefaultEvents)if(n.allowPageScroll===l)e.preventDefault();else{var s=n.allowPageScroll===c;switch(t){case r:(n.swipeLeft&&s||!s&&n.allowPageScroll!=m)&&e.preventDefault();break;case i:(n.swipeRight&&s||!s&&n.allowPageScroll!=m)&&e.preventDefault();break;case o:(n.swipeUp&&s||!s&&n.allowPageScroll!=v)&&e.preventDefault();break;case a:(n.swipeDown&&s||!s&&n.allowPageScroll!=v)&&e.preventDefault()}}}(t,pe=ie(T.last,T.end)),f=T.start,p=T.end,he=Math.round(Math.sqrt(Math.pow(p.x-f.x,2)+Math.pow(p.y-f.y,2))),ge=ne(),function(e,t){e!=l&&(t=Math.max(t,ee(e)),be[e].distance=t)}(fe,he),w=_(g,Se),!n.triggerOnTouchEnd||n.triggerOnTouchLeave){var C=!0;if(n.triggerOnTouchLeave){var k={left:(h=(d=e(d=this)).offset()).left,right:h.left+d.outerWidth(),top:h.top,bottom:h.top+d.outerHeight()};C=function(e,t){return e.x>t.left&&e.x<t.right&&e.y>t.top&&e.y<t.bottom}(T.end,k)}!n.triggerOnTouchEnd&&C?Se=O(b):n.triggerOnTouchLeave&&!C&&(Se=O(A)),Se!=S&&Se!=A||_(g,Se)}}else _(g,Se=S);!1===w&&_(g,Se=S)}}function D(e){var t=e.originalEvent?e.originalEvent:e,r=t.touches;if(r){if(r.length&&!Q())return function(e){Ie=oe(),Ee=e.touches.length+1}(t),!0;if(r.length&&Q())return!0}return Q()&&(Te=Ee),Fe=oe(),ge=ne(),P()||!H()?_(t,Se=S):n.triggerOnTouchEnd||!1===n.triggerOnTouchEnd&&Se===b?(!1!==n.preventDefaultEvents&&e.preventDefault(),_(t,Se=A)):!n.triggerOnTouchEnd&&W()?j(t,Se=A,f):Se===b&&_(t,Se=S),J(!1),null}function L(){Te=0,Fe=0,ke=0,me=0,ve=0,ye=1,Y(),J(!1)}function N(e){var t=e.originalEvent?e.originalEvent:e;n.triggerOnTouchLeave&&_(t,Se=O(A))}function M(){Ae.unbind(se,I),Ae.unbind(de,L),Ae.unbind(ue,E),Ae.unbind(le,D),ce&&Ae.unbind(ce,N),J(!1)}function O(e){var t=e,r=R(),i=H(),o=P();return!r||o?t=S:!i||e!=b||n.triggerOnTouchEnd&&!n.triggerOnTouchLeave?!i&&e==A&&n.triggerOnTouchLeave&&(t=S):t=A,t}function _(e,t){var r,i=e.touches;return(!(!B()||!U())||U())&&(r=j(e,t,d)),(!(!$()||!q())||q())&&!1!==r&&(r=j(e,t,h)),Z()&&G()&&!1!==r?r=j(e,t,p):ge>n.longTapThreshold&&w>he&&n.longTap&&!1!==r?r=j(e,t,g):!(1!==Te&&T||!(isNaN(he)||he<n.threshold)||!W())&&!1!==r&&(r=j(e,t,f)),t===S&&L(),t===A&&(i&&i.length||L()),r}function j(t,l,c){var m;if(c==d){if(Ae.trigger("swipeStatus",[l,fe||null,he||0,ge||0,Te,Ce,pe]),n.swipeStatus&&!1===(m=n.swipeStatus.call(Ae,t,l,fe||null,he||0,ge||0,Te,Ce,pe)))return!1;if(l==A&&B()){if(clearTimeout(Le),clearTimeout(Ne),Ae.trigger("swipe",[fe,he,ge,Te,Ce,pe]),n.swipe&&!1===(m=n.swipe.call(Ae,t,fe,he,ge,Te,Ce,pe)))return!1;switch(fe){case r:Ae.trigger("swipeLeft",[fe,he,ge,Te,Ce,pe]),n.swipeLeft&&(m=n.swipeLeft.call(Ae,t,fe,he,ge,Te,Ce,pe));break;case i:Ae.trigger("swipeRight",[fe,he,ge,Te,Ce,pe]),n.swipeRight&&(m=n.swipeRight.call(Ae,t,fe,he,ge,Te,Ce,pe));break;case o:Ae.trigger("swipeUp",[fe,he,ge,Te,Ce,pe]),n.swipeUp&&(m=n.swipeUp.call(Ae,t,fe,he,ge,Te,Ce,pe));break;case a:Ae.trigger("swipeDown",[fe,he,ge,Te,Ce,pe]),n.swipeDown&&(m=n.swipeDown.call(Ae,t,fe,he,ge,Te,Ce,pe))}}}if(c==h){if(Ae.trigger("pinchStatus",[l,xe||null,we||0,ge||0,Te,ye,Ce]),n.pinchStatus&&!1===(m=n.pinchStatus.call(Ae,t,l,xe||null,we||0,ge||0,Te,ye,Ce)))return!1;if(l==A&&$())switch(xe){case s:Ae.trigger("pinchIn",[xe||null,we||0,ge||0,Te,ye,Ce]),n.pinchIn&&(m=n.pinchIn.call(Ae,t,xe||null,we||0,ge||0,Te,ye,Ce));break;case u:Ae.trigger("pinchOut",[xe||null,we||0,ge||0,Te,ye,Ce]),n.pinchOut&&(m=n.pinchOut.call(Ae,t,xe||null,we||0,ge||0,Te,ye,Ce))}}return c==f?l!==S&&l!==A||(clearTimeout(Le),clearTimeout(Ne),G()&&!Z()?(De=oe(),Le=setTimeout(e.proxy((function(){De=null,Ae.trigger("tap",[t.target]),n.tap&&(m=n.tap.call(Ae,t,t.target))}),this),n.doubleTapThreshold)):(De=null,Ae.trigger("tap",[t.target]),n.tap&&(m=n.tap.call(Ae,t,t.target)))):c==p?l!==S&&l!==A||(clearTimeout(Le),clearTimeout(Ne),De=null,Ae.trigger("doubletap",[t.target]),n.doubleTap&&(m=n.doubleTap.call(Ae,t,t.target))):c==g&&(l!==S&&l!==A||(clearTimeout(Le),De=null,Ae.trigger("longtap",[t.target]),n.longTap&&(m=n.longTap.call(Ae,t,t.target)))),m}function H(){var e=!0;return null!==n.threshold&&(e=he>=n.threshold),e}function P(){var e=!1;return null!==n.cancelThreshold&&null!==fe&&(e=ee(fe)-he>=n.cancelThreshold),e}function R(){return!n.maxTimeThreshold||!(ge>=n.maxTimeThreshold)}function $(){var e=V(),t=z(),r=null===n.pinchThreshold||we>=n.pinchThreshold;return e&&t&&r}function q(){return!!(n.pinchStatus||n.pinchIn||n.pinchOut)}function B(){var e=R(),t=H(),n=V(),r=z();return!P()&&r&&n&&t&&e}function U(){return!!(n.swipe||n.swipeStatus||n.swipeLeft||n.swipeRight||n.swipeUp||n.swipeDown)}function V(){return Te===n.fingers||n.fingers===y||!T}function z(){return 0!==Ce[0].end.x}function W(){return!!n.tap}function G(){return!!n.doubleTap}function Z(){if(null==De)return!1;var e=oe();return G()&&e-De<=n.doubleTapThreshold}function Y(){Ie=0,Ee=0}function Q(){var e=!1;Ie&&(oe()-Ie<=n.fingerReleaseThreshold&&(e=!0));return e}function J(e){Ae&&(!0===e?(Ae.bind(ue,E),Ae.bind(le,D),ce&&Ae.bind(ce,N)):(Ae.unbind(ue,E,!1),Ae.unbind(le,D,!1),ce&&Ae.unbind(ce,N,!1)),Ae.data(F+"_intouch",!0===e))}function X(e,t){var n={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return n.start.x=n.last.x=n.end.x=t.pageX||t.clientX,n.start.y=n.last.y=n.end.y=t.pageY||t.clientY,Ce[e]=n,n}function K(e){var t=void 0!==e.identifier?e.identifier:0,n=function(e){return Ce[e]||null}(t);return null===n&&(n=X(t,e)),n.last.x=n.end.x,n.last.y=n.end.y,n.end.x=e.pageX||e.clientX,n.end.y=e.pageY||e.clientY,n}function ee(e){return be[e]?be[e].distance:void 0}function te(e){return{direction:e,distance:0}}function ne(){return Fe-ke}function re(e,t){var n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return Math.round(Math.sqrt(n*n+r*r))}function ie(e,t){if(s=t,(n=e).x==s.x&&n.y==s.y)return l;var n,s,u=function(e,t){var n=e.x-t.x,r=t.y-e.y,i=Math.atan2(r,n),o=Math.round(180*i/Math.PI);return 0>o&&(o=360-Math.abs(o)),o}(e,t);return 45>=u&&u>=0||360>=u&&u>=315?r:u>=135&&225>=u?i:u>45&&135>u?a:o}function oe(){return(new Date).getTime()}n=e.extend({},n);var ae=T||k||!n.fallbackToMouseEvents,se=ae?k?C?"MSPointerDown":"pointerdown":"touchstart":"mousedown",ue=ae?k?C?"MSPointerMove":"pointermove":"touchmove":"mousemove",le=ae?k?C?"MSPointerUp":"pointerup":"touchend":"mouseup",ce=ae?k?"mouseleave":null:"mouseleave",de=k?C?"MSPointerCancel":"pointercancel":"touchcancel",he=0,fe=null,pe=null,ge=0,me=0,ve=0,ye=1,we=0,xe=0,be=null,Ae=e(t),Se="start",Te=0,Ce={},ke=0,Fe=0,Ie=0,Ee=0,De=0,Le=null,Ne=null;try{Ae.bind(se,I),Ae.bind(de,L)}catch(t){e.error("events not supported "+se+","+de+" on jQuery.swipe")}this.enable=function(){return this.disable(),Ae.bind(se,I),Ae.bind(de,L),Ae},this.disable=function(){return M(),Ae},this.destroy=function(){M(),Ae.data(F,null),Ae=null},this.option=function(t,r){if("object"==typeof t)n=e.extend(n,t);else if(void 0!==n[t]){if(void 0===r)return n[t];n[t]=r}else{if(!t)return n;e.error("Option "+t+" does not exist on jQuery.swipe.options")}return null}}var r="left",i="right",o="up",a="down",s="in",u="out",l="none",c="auto",d="swipe",h="pinch",f="tap",p="doubletap",g="longtap",m="horizontal",v="vertical",y="all",w=10,x="start",b="move",A="end",S="cancel",T="ontouchstart"in window,C=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!T,k=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!T,F="TouchSwipe";e.fn.swipe=function(n){var r=e(this),i=r.data(F);if(i&&"string"==typeof n){if(i[n])return i[n].apply(i,Array.prototype.slice.call(arguments,1));e.error("Method "+n+" does not exist on jQuery.swipe")}else if(i&&"object"==typeof n)i.option.apply(i,arguments);else if(!(i||"object"!=typeof n&&n))return t.apply(this,arguments);return r},e.fn.swipe.version="1.6.18",e.fn.swipe.defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0},e.fn.swipe.phases={PHASE_START:x,PHASE_MOVE:b,PHASE_END:A,PHASE_CANCEL:S},e.fn.swipe.directions={LEFT:r,RIGHT:i,UP:o,DOWN:a,IN:s,OUT:u},e.fn.swipe.pageScroll={NONE:l,HORIZONTAL:m,VERTICAL:v,AUTO:c},e.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:y}})),$(()=>{index.init()});const index=(()=>{const e={},t=6e5,n=new NoSleep;let r,i,o,a,s,u,l,c,d=!1,h=null,f=null,p=0,g=!1,m=0,v=0;const y=t=>{let n;this.previousSuggestionValue!==t.value&&(this.previousSuggestionValue=t.value,PreviousSuggestion=t,e[t.value]?w(e[t.value]):(n=$.ajax({url:location.protocol+"//geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find",data:{text:t.value,magicKey:t.data,f:"json"}}),n.done(e=>{const t=e.locations[0];t?w(t.feature.geometry):alert("An unexpected error occurred. Please try a different search string.")})))},w=e=>{const t={lat:Math.round2(e.y,4),lon:Math.round2(e.x,4)};D(t),localStorage.setItem("TwcQuery",$("#txtAddress").val())},x=()=>{const e=$(window).width(),t=$(window).height(),n=T();let c,d,h,f,p,g,m;n&&(e/t>=1.583333333333333?(i.hide(),a.hide(),s.show(),u.show(),o.attr("style","width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"),h=(e-1.3333333333333333*t)/2,h<60&&(h=60),s.attr("style","width:"+h+"px; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"),s.css("visibility","visible"),f=(e-1.3333333333333333*t)/2,f<60&&(f=60),u.attr("style","width:"+f+"px; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"),u.css("visibility","visible"),c=e-h-f,$("#display").attr("style","width:"+c+"px; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;")):(i.show(),a.show(),s.hide(),u.hide(),m=0,p=(t-.75*(e-0))/2,p<0&&(p=0),i.attr("style","width:100%; height:"+p+"px; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"),g=(t-.75*(e-0))/2,g<30&&(g=30),a.attr("style","width:100%; height:"+g+"px; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"),a.css("visibility","visible"),d=t-p-g,$("#display").attr("style","width:100%; height:"+d+"px; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"),o.attr("style","width:100%; height:"+d+"px; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"))),n||(i.hide(),a.hide(),s.hide(),u.hide(),r.attr("style",""),o.attr("style",""),$(window).off("resize",x)),n?($("body").css("overflow","hidden"),$(".ToggleFullScreen").val("Exit Full Screen"),C()||F()):($("body").css("overflow",""),$(".ToggleFullScreen").val("Full Screen")),l.show()},b=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation,A=screen.unlockOrientation||screen.mozUnlockOrientation||screen.msUnlockOrientation||screen.orientation&&screen.orientation.unlock,S=()=>{if(T()){if(r.attr("style","position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"),x(),$(window).on("resize",x),b)try{b("landscape-primary")}catch(e){console.log("Unable to lock screen orientation.")}}else if(r.attr("style",""),o.attr("style",""),$(window).off("resize",x),x(),A)try{A()}catch(e){console.log("Unable to unlock screen orientation.")}},T=()=>g||C()||window.innerHeight===screen.height||window.innerHeight===screen.height-1,C=()=>g?document.body:document.fullScreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement,k=()=>(T()?I():F(),navigation.isPlaying()?n.enable():n.disable(),H(),!1),F=()=>{const e=document.body,t=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;t?t.call(e,{navigationUI:"hide"}):(window.scrollTo(0,0),g=!0,$(window).resize()),H()},I=()=>{g&&(g=!1,$(window).resize()),document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},E=()=>(B("navButton","menu"),H(),!1),D=e=>{e&&(D.latLon=e);const t=D.latLon;if(!t)return;$("#txtAddress").blur(),V(),h=null,L(),B("latLon",t),x(),$("#chkScrollText").is(":checked")&&B("assignScrollText",c.val()),B("units",$("input[type='radio'][name='radUnits']:checked").val());const n=$("#display");n.on("mousemove",P),n.on("mousedown",P),n.on("keydown",R);const r=(e,t)=>{switch(t){case"left":M();break;case"right":default:O()}};n.swipe({swipeRight:r,swipeLeft:r})},L=()=>{let e="(None)";if(h)switch($("input[type='radio'][name='radUnits']:checked").val()){case"ENGLISH":e=h.toLocaleString("en-US",{weekday:"short",month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"});break;default:e=h.toLocaleString("en-GB",{weekday:"short",month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"})}$("#spanLastRefresh").html(e),h&&$("#chkAutoRefresh").is(":checked")&&U()},N=()=>(D(),H(),!1),M=()=>(B("navButton","next"),H(),!1),O=()=>(B("navButton","previous"),H(),!1),_=()=>{const e=$(window);e.height()!==m&&e.width()!==v&&(m=e.height(),v=e.width(),B("navButton","reset"),H())};let j=null;const H=()=>{$(document.activeElement).blur(),$("body").removeClass("HideCursor"),s.fadeIn2(),u.fadeIn2(),a.fadeIn2(),j&&(window.clearTimeout(j),j=null),j=window.setTimeout(()=>{T()&&($("body").addClass("HideCursor"),s.fadeOut2(),u.fadeOut2(),a.fadeOut2())},2e3)},P=e=>{T()&&0===e.originalEvent.movementX&&0===e.originalEvent.movementY&&0===e.originalEvent.buttons||H()},R=e=>{const t=e.keyCode||e.which;if(T()||document.activeElement===document.body)switch(t){case 32:return q(),!1;case 39:case 34:return M(),!1;case 37:case 33:return O(),!1;case 36:return E(),!1;case 48:return N(),!1;case 70:return k(),!1}};$.fn.fadeIn2=function(){const e=this;let t=0,n=null;if("0"===e.css("opacity"))return e.css("visibility","visible"),e.css("opacity","0.0"),n=window.setInterval(()=>{t+=.1,t=Math.round2(t,1),e.css("opacity",t.toString()),1===t&&(e.css("visibility","visible"),window.clearInterval(n))},50),e},$.fn.fadeOut2=function(){const e=this;let t=1,n=null;if("1"===e.css("opacity"))return e.css("visibility","visible"),e.css("opacity","1.0"),n=window.setInterval(()=>{t-=.2,t=Math.round2(t,1),e.css("opacity",t.toString()),0===t&&(e.css("visibility","hidden"),window.clearInterval(n))},50),e},Math.round2=(e,t)=>Number(Math.round(e+"e"+t)+"e-"+t);const q=()=>(B("navButton","playToggle"),H(),!1),B=(e,t={})=>{navigation.message({type:e,message:t})},U=()=>{if(f)return;p=0;const e=()=>{p+=500;let e=t-p;e<0&&(e=0);const n=new Date(e);$("#spanRefreshCountDown").html((n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes())+":"+(n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds())),p>=t&&D()};f=window.setInterval(e,500),e()},V=()=>{f&&(window.clearInterval(f),$("#spanRefreshCountDown").html("--:--"),f=null)},z=async()=>{if(!navigator.geolocation)return;const e=await new Promise(e=>{navigator.geolocation.getCurrentPosition(e)}),t=e.coords.latitude,n=e.coords.longitude;let r;try{r=await $.ajax({url:location.protocol+"//geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/reverseGeocode",data:{location:n+","+t,distance:1e3,f:"json"}})}catch(e){console.error("Unable to fetch reverse geocode"),console.error(e.status,e.responseJSONe)}const i=`${r.address.Postal}, ${r.address.City}, ${states.getTwoDigitCode(r.address.Region)}, ${r.address.CountryCode}`;$("#txtAddress").val(i).blur().focus(),localStorage.setItem("TwcQuery",i)},W=e=>{$("#spanCity").text(e.city+", "),$("#spanState").text(e.state),$("#spanStationId").text(e.stationId),$("#spanRadarId").text(e.radarId),$("#spanZoneId").text(e.zoneId)},G=()=>(Z(),!1),Z=e=>{const t=$(e.target);c.blur();let n=c.val();localStorage.setItem("TwcScrollText",n);const r=t.is(":checked");localStorage.setItem("TwcScrollTextChecked",r),!1===t.is(":checked")&&(n=""),B("assignScrollText",n)};return{init:()=>{m=$(window).height(),v=$(window).width(),r=$("#divTwc"),i=$("#divTwcTop"),o=$("#divTwcMiddle"),a=$("#divTwcBottom"),s=$("#divTwcLeft"),u=$("#divTwcRight"),l=$("#divTwcNavContainer"),c=$("#txtScrollText"),$("#frmScrollText").on("submit",G),c.on("focus",e=>{$(e.target).select()}),$("#chkScrollText").on("change",Z),$("#txtAddress").on("focus",e=>{$(e.target).select()}).focus(),$(".NavigateMenu").on("click",E),$(".NavigateRefresh").on("click",N),$(".NavigateNext").on("click",M),$(".NavigatePrevious").on("click",O),$(".NavigatePlay").on("click",q),$("#btnGetGps").on("click",z),$(window).on("resize",S),$(window).on("resize",_),$(document).on("mousemove",P),$(document).on("mousedown",P),r.on("mousedown",P),$(document).on("keydown",R),document.addEventListener("touchmove",e=>{g&&e.preventDefault()}),$(".ToggleFullScreen").on("click",k),x();const e=["Land Features","Bay","Channel","Cove","Dam","Delta","Gulf","Lagoon","Lake","Ocean","Reef","Reservoir","Sea","Sound","Strait","Waterfall","Wharf","Amusement Park","Historical Monument","Landmark","Tourist Attraction","Zoo","College","Beach","Campground","Golf Course","Harbor","Nature Reserve","Other Parks and Outdoors","Park","Racetrack","Scenic Overlook","Ski Resort","Sports Center","Sports Field","Wildlife Reserve","Airport","Ferry","Marina","Pier","Port","Resort","Postal","Populated Place"].join(",");$("#frmGetLatLng #txtAddress").devbridgeAutocomplete({serviceUrl:location.protocol+"//geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest",deferRequestBy:300,paramName:"text",params:{f:"json",countryCode:"USA",category:e,maxSuggestions:10},dataType:"json",transformResult:e=>(d&&(d=!1,window.setTimeout(()=>{$(t.suggestionsContainer.children[0]).click()},1)),{suggestions:$.map(e.suggestions,(function(e){return{value:e.text,data:e.magicKey}}))}),minChars:3,showNoSuggestionNotice:!0,noSuggestionNotice:"No results found. Please try a different search string.",onSelect:y,width:490});const t=$("#frmGetLatLng #txtAddress").devbridgeAutocomplete();$("#frmGetLatLng").submit(()=>(t.suggestions[0]&&$(t.suggestionsContainer.children[0]).click(),!1));const n=localStorage.getItem("TwcQuery");n&&(d=!0,$("#txtAddress").val(n).blur().focus());const f=localStorage.getItem("TwcPlay");null!==f&&"true"!==f||B("navButton","play");const p=localStorage.getItem("TwcScrollText");p&&c.val(p);const w=localStorage.getItem("TwcScrollTextChecked");w&&"true"===w?$("#chkScrollText").prop("checked","checked"):$("#chkScrollText").prop("checked",""),$("#btnClearQuery").on("click",()=>{$("#spanCity").text(""),$("#spanState").text(""),$("#spanStationId").text(""),$("#spanRadarId").text(""),$("#spanZoneId").text(""),$("#chkScrollText").prop("checked",""),c.val(""),localStorage.removeItem("TwcScrollText"),localStorage.removeItem("TwcScrollTextChecked"),$("#chkAutoRefresh").prop("checked","checked"),localStorage.removeItem("TwcAutoRefresh"),$("#radEnglish").prop("checked","checked"),localStorage.removeItem("TwcUnits"),localStorage.removeItem("TwcPlay"),B("navButton","play"),localStorage.removeItem("TwcQuery")});const b=localStorage.getItem("TwcUnits");b&&"ENGLISH"!==b?"METRIC"===b&&$("#radMetric").prop("checked","checked"):$("#radEnglish").prop("checked","checked"),$("input[type='radio'][name='radUnits']").on("change",e=>{const t=$(e.target).val();localStorage.setItem("TwcUnits",t),L(),B("units",t)}),$("#chkAutoRefresh").on("change",e=>{const t=$(e.target).is(":checked");h&&(t?U():V()),localStorage.setItem("TwcAutoRefresh",t)});const A=localStorage.getItem("TwcAutoRefresh");A&&"true"!==A?$("#chkAutoRefresh").prop("checked",""):$("#chkAutoRefresh").prop("checked","checked")},message:e=>{if(e.type)switch(e.type){case"loaded":h=new Date,L();break;case"weatherParameters":W(e.message);break;case"isPlaying":localStorage.setItem("TwcPlay",navigation.isPlaying()),navigation.isPlaying()?(n.enable(),$("img[src='images/nav/ic_play_arrow_white_24dp_1x.png']").attr("title","Pause"),$("img[src='images/nav/ic_play_arrow_white_24dp_1x.png']").attr("src","images/nav/ic_pause_white_24dp_1x.png"),$("img[src='images/nav/ic_play_arrow_white_24dp_2x.png']").attr("title","Pause"),$("img[src='images/nav/ic_play_arrow_white_24dp_2x.png']").attr("src","images/nav/ic_pause_white_24dp_2x.png")):(n.disable(),$("img[src='images/nav/ic_pause_white_24dp_1x.png']").attr("title","Play"),$("img[src='images/nav/ic_pause_white_24dp_1x.png']").attr("src","images/nav/ic_play_arrow_white_24dp_1x.png"),$("img[src='images/nav/ic_pause_white_24dp_2x.png']").attr("title","Play"),$("img[src='images/nav/ic_pause_white_24dp_2x.png']").attr("src","images/nav/ic_play_arrow_white_24dp_2x.png"));break;default:console.error("Unknown event '"+e.eventType)}}}})();!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.SuperGif=t()}(this,(function(){var e=function(e){return e.reduce((function(e,t){return 2*e+t}),0)},t=function(e){for(var t=[],n=7;n>=0;n--)t.push(!!(e&1<<n));return t},n=function(e){this.data=e,this.len=this.data.length,this.pos=0,this.readByte=function(){if(this.pos>=this.data.length)throw new Error("Attempted to read past end of stream.");return e instanceof Uint8Array?e[this.pos++]:255&e.charCodeAt(this.pos++)},this.readBytes=function(e){for(var t=[],n=0;n<e;n++)t.push(this.readByte());return t},this.read=function(e){for(var t="",n=0;n<e;n++)t+=String.fromCharCode(this.readByte());return t},this.readUnsigned=function(){var e=this.readBytes(2);return(e[1]<<8)+e[0]}},r=function(n,r){r||(r={});var i=function(e){for(var t=[],r=0;r<e;r++)t.push(n.readBytes(3));return t},o=function(){var e,t;t="";do{e=n.readByte(),t+=n.read(e)}while(0!==e);return t},a=function(a){a.leftPos=n.readUnsigned(),a.topPos=n.readUnsigned(),a.width=n.readUnsigned(),a.height=n.readUnsigned();var s=t(n.readByte());a.lctFlag=s.shift(),a.interlaced=s.shift(),a.sorted=s.shift(),a.reserved=s.splice(0,2),a.lctSize=e(s.splice(0,3)),a.lctFlag&&(a.lct=i(1<<a.lctSize+1)),a.lzwMinCodeSize=n.readByte();var u=o();a.pixels=function(e,t){for(var n,r,i=0,o=function(e){for(var n=0,r=0;r<e;r++)t.charCodeAt(i>>3)&1<<(7&i)&&(n|=1<<r),i++;return n},a=[],s=1<<e,u=s+1,l=e+1,c=[],d=function(){c=[],l=e+1;for(var t=0;t<s;t++)c[t]=[t];c[s]=[],c[u]=null};;)if(r=n,(n=o(l))!==s){if(n===u)break;if(n<c.length)r!==s&&c.push(c[r].concat(c[n][0]));else{if(n!==c.length)throw new Error("Invalid LZW code.");c.push(c[r].concat(c[r][0]))}a.push.apply(a,c[n]),c.length===1<<l&&l<12&&l++}else d();return a}(a.lzwMinCodeSize,u),a.interlaced&&(a.pixels=function(e,t){for(var n=new Array(e.length),r=e.length/t,i=function(r,i){var o=e.slice(i*t,(i+1)*t);n.splice.apply(n,[r*t,t].concat(o))},o=[0,4,2,1],a=[8,8,4,2],s=0,u=0;u<4;u++)for(var l=o[u];l<r;l+=a[u])i(l,s),s++;return n}(a.pixels,a.width)),r.img&&r.img(a)},s=function(){var i={};switch(i.sentinel=n.readByte(),String.fromCharCode(i.sentinel)){case"!":i.type="ext",function(i){switch(i.label=n.readByte(),i.label){case 249:i.extType="gce",function(i){n.readByte();var o=t(n.readByte());i.reserved=o.splice(0,3),i.disposalMethod=e(o.splice(0,3)),i.userInput=o.shift(),i.transparencyGiven=o.shift(),i.delayTime=n.readUnsigned(),i.transparencyIndex=n.readByte(),i.terminator=n.readByte(),r.gce&&r.gce(i)}(i);break;case 254:i.extType="com",function(e){e.comment=o(),r.com&&r.com(e)}(i);break;case 1:i.extType="pte",function(e){n.readByte(),e.ptHeader=n.readBytes(12),e.ptData=o(),r.pte&&r.pte(e)}(i);break;case 255:i.extType="app",function(e){switch(n.readByte(),e.identifier=n.read(8),e.authCode=n.read(3),e.identifier){case"NETSCAPE":!function(e){n.readByte(),e.unknown=n.readByte(),e.iterations=n.readUnsigned(),e.terminator=n.readByte(),r.app&&r.app.NETSCAPE&&r.app.NETSCAPE(e)}(e);break;default:!function(e){e.appData=o(),r.app&&r.app[e.identifier]&&r.app[e.identifier](e)}(e)}}(i);break;default:i.extType="unknown",function(e){e.data=o(),r.unknown&&r.unknown(e)}(i)}}(i);break;case",":i.type="img",a(i);break;case";":i.type="eof",r.eof&&r.eof(i);break;default:throw new Error("Unknown block: 0x"+i.sentinel.toString(16))}"eof"!==i.type&&setTimeout(s,0)};!function(){var o={};if(o.sig=n.read(3),o.ver=n.read(3),"GIF"!==o.sig)throw new Error("Not a GIF file.");o.width=n.readUnsigned(),o.height=n.readUnsigned();var a=t(n.readByte());o.gctFlag=a.shift(),o.colorRes=e(a.splice(0,3)),o.sorted=a.shift(),o.gctSize=e(a.splice(0,3)),o.bgColor=n.readByte(),o.pixelAspectRatio=n.readByte(),o.gctFlag&&(o.gct=i(1<<o.gctSize+1)),r.hdr&&r.hdr(o)}(),setTimeout(s,0)};return function(e){var t,i,o={vp_l:0,vp_t:0,vp_w:null,vp_h:null,c_w:null,c_h:null};for(var a in e)o[a]=e[a];o.vp_w&&o.vp_h&&(o.is_vp=!0);var s=null,u=!1,l=null,c=null,d=null,h=null,f=null,p=null,g=null,m=!0,v=!1,y=[],w=[],x=o.src;o.gif||(o.gif=document.createElement("img"),o.gif.setAttribute("rel:animated_src",x),o.gif.src="");var b=o.gif;void 0===o.auto_play&&(o.auto_play=!b.getAttribute("rel:auto_play")||"1"==b.getAttribute("rel:auto_play"));var A,S,T,C,k=o.hasOwnProperty("on_end")?o.on_end:null,F=o.hasOwnProperty("loop_delay")?o.loop_delay:0,I=o.hasOwnProperty("loop_mode")?o.loop_mode:"auto",E=!o.hasOwnProperty("draw_while_loading")||o.draw_while_loading,D=!!E&&(!o.hasOwnProperty("show_progress_bar")||o.show_progress_bar),L=o.hasOwnProperty("progressbar_height")?o.progressbar_height:25,N=o.hasOwnProperty("progressbar_background_color")?o.progressbar_background_color:"rgba(255,255,255,0.4)",M=o.hasOwnProperty("progressbar_foreground_color")?o.progressbar_foreground_color:"rgba(255,0,22,.8)",O=function(){l=null,c=null,f=d,d=null,p=null},_=function(){try{r(t,V)}catch(e){P("parse")}},j=function(e,t){A.width=e*W(),A.height=t*W(),T.style.minWidth=e*W()+"px",C.width=e,C.height=t,C.style.width=e+"px",C.style.height=t+"px",C.getContext("2d").setTransform(1,0,0,1,0,0)},H=function(e,t,n){if(n&&D){var r,i,a,s=L;if(o.is_vp)v?(i=(o.vp_t+o.vp_h-s)/W(),s/=W(),r=o.vp_l/W()+e/t*(o.vp_w/W()),a=A.width/W()):(i=o.vp_t+o.vp_h-s,s=s,r=o.vp_l+e/t*o.vp_w,a=A.width);else i=(A.height-s)/(v?W():1),r=e/t*A.width/(v?W():1),a=A.width/(v?W():1),s/=v?W():1;S.fillStyle=N,S.fillRect(r,i,a-r,s),S.fillStyle=M,S.fillRect(0,i,r,s)}},P=function(e){s=e,i={width:b.width,height:b.height},y=[],S.fillStyle="black",S.fillRect(0,0,o.c_w?o.c_w:i.width,o.c_h?o.c_h:i.height),S.strokeStyle="red",S.lineWidth=3,S.moveTo(0,0),S.lineTo(o.c_w?o.c_w:i.width,o.c_h?o.c_h:i.height),S.moveTo(0,o.c_h?o.c_h:i.height),S.lineTo(o.c_w?o.c_w:i.width,0),S.stroke()},R=function(){p&&(y.push({data:p.getImageData(0,0,i.width,i.height),delay:c}),w.push({x:0,y:0}))},$=function(){var e,t,n,r=-1,i=0,a=function(e){r+=e,l()},u=(e=!1,t=function(){null!==k&&k(b),i++,!1!==I||i<0?n():(e=!1,m=!1)},n=function(){if(e=m){a(1);var i=10*y[r].delay;i||(i=100),0==(r+1+y.length)%y.length?(i+=F,setTimeout(t,i)):setTimeout(n,i)}},function(){e||setTimeout(n,0)}),l=function(){var e;(r=parseInt(r,10))>y.length-1&&(r=0),r<0&&(r=0),e=w[r],C.getContext("2d").putImageData(y[r].data,e.x,e.y),S.globalCompositeOperation="copy",S.drawImage(C,0,0),o.canvas.getContext("2d").drawImage(A,o.x,o.y)};return{init:function(){s||(o.c_w&&o.c_h||S.scale(W(),W()),o.auto_play?u():(r=0,l()))},step:u,play:function(){m=!0,u()},pause:function(){m=!1},playing:m,move_relative:a,current_frame:function(){return r},length:function(){return y.length},move_to:function(e){r=e,l()}}}(),q=function(e){H(t.pos,t.data.length,e)},B=function(){},U=function(e,t){return function(n){e(n),q(t)}},V={hdr:U((function(e){j((i=e).width,i.height)})),gce:U((function(e){R(),O(),l=e.transparencyGiven?e.transparencyIndex:null,c=e.delayTime,d=e.disposalMethod})),com:U(B),app:{NETSCAPE:U(B)},img:U((function(e){p||(p=C.getContext("2d"));var t=y.length,n=e.lctFlag?e.lct:i.gct;t>0&&(3===f?null!==h?p.putImageData(y[h].data,0,0):p.clearRect(g.leftPos,g.topPos,g.width,g.height):h=t-1,2===f&&p.clearRect(g.leftPos,g.topPos,g.width,g.height));var r=p.getImageData(e.leftPos,e.topPos,e.width,e.height);e.pixels.forEach((function(e,t){e!==l&&(r.data[4*t+0]=n[e][0],r.data[4*t+1]=n[e][1],r.data[4*t+2]=n[e][2],r.data[4*t+3]=255)})),p.putImageData(r,e.leftPos,e.topPos),v||(S.scale(W(),W()),v=!0),E&&(S.drawImage(C,0,0),E=o.auto_play),g=e}),!0),eof:function(e){R(),q(!1),o.c_w&&o.c_h||(A.width=i.width*W(),A.height=i.height*W()),$.init(),u=!1,Z&&Z(b)}},z=function(){var e=b.parentNode,t=document.createElement("div");A=document.createElement("canvas"),S=A.getContext("2d"),T=document.createElement("div"),C=document.createElement("canvas"),t.width=A.width=b.width,t.height=A.height=b.height,T.style.minWidth=b.width+"px",t.className="jsgif",T.className="jsgif_toolbar",t.style.display="none",t.appendChild(A),t.appendChild(T),e&&(e.insertBefore(t,b),e.removeChild(b)),o.c_w&&o.c_h&&j(o.c_w,o.c_h),G=!0},W=function(){return o.max_width&&i&&i.width>o.max_width?o.max_width/i.width:o.max_height&&i&&i.height>o.max_height?o.max_height/i.height:1},G=!1,Z=!1,Y=function(e){return!u&&(Z=e||!1,u=!0,y=[],O(),h=null,f=null,p=null,g=null,!0)};return{play:$.play,pause:$.pause,move_relative:$.move_relative,move_to:$.move_to,get_playing:function(){return m},get_canvas:function(){return A},get_canvas_scale:function(){return W()},get_loading:function(){return u},get_auto_play:function(){return o.auto_play},get_length:function(){return $.length()},get_current_frame:function(){return $.current_frame()},load_url:function(e,r){if(Y(r)){var i=new XMLHttpRequest;i.open("GET",e,!0),"overrideMimeType"in i?i.overrideMimeType("text/plain; charset=x-user-defined"):"responseType"in i?i.responseType="arraybuffer":i.setRequestHeader("Accept-Charset","x-user-defined"),i.onloadstart=function(){G||z()},i.onload=function(e){200!=this.status&&P("xhr - response"),"response"in this||(this.response=new VBArray(this.responseText).toArray().map(String.fromCharCode).join(""));var r=this.response;r.toString().indexOf("ArrayBuffer")>0&&(r=new Uint8Array(r)),t=new n(r),setTimeout(_,0)},i.onprogress=function(e){e.lengthComputable&&H(e.loaded,e.total,!0)},i.onerror=function(){P("xhr")},i.send()}},load:function(e){this.load_url(b.getAttribute("rel:animated_src")||b.src,e)},load_raw:function(e,r){Y(r)&&(G||z(),t=new n(e),setTimeout(_,0))},set_frame_offset:function(e,t){w[e]?(void 0!==t.x&&(w[e].x=t.x),void 0!==t.y&&(w[e].y=t.y)):w[e]=t},getX:function(){return o.x},setX:function(e){o.x=e},getY:function(){return o.y},setY:function(e){o.y=e},setFirstTime:function(){!0}}}}));var luxon=function(e){"use strict";function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}function r(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t,n){return(a=function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),1}catch(e){return}}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&o(i,n.prototype),i}).apply(null,arguments)}function s(e){var t="function"==typeof Map?new Map:void 0;return(s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return a(e,arguments,i(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o(r,e)})(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){var t=0;if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator])return(t=e[Symbol.iterator]()).next.bind(t);if(Array.isArray(e)||(e=function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(s(Error)),d=function(e){function t(t){return e.call(this,"Invalid DateTime: "+t.toMessage())||this}return r(t,e),t}(c),h=function(e){function t(t){return e.call(this,"Invalid Interval: "+t.toMessage())||this}return r(t,e),t}(c),f=function(e){function t(t){return e.call(this,"Invalid Duration: "+t.toMessage())||this}return r(t,e),t}(c),p=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(c),g=function(e){function t(t){return e.call(this,"Invalid unit "+t)||this}return r(t,e),t}(c),m=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(c),v=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return r(t,e),t}(c),y="numeric",w="short",x="long",b={year:y,month:y,day:y},A={year:y,month:w,day:y},S={year:y,month:x,day:y},T={year:y,month:x,day:y,weekday:x},C={hour:y,minute:y},k={hour:y,minute:y,second:y},F={hour:y,minute:y,second:y,timeZoneName:w},I={hour:y,minute:y,second:y,timeZoneName:x},E={hour:y,minute:y,hour12:!1},D={hour:y,minute:y,second:y,hour12:!1},L={hour:y,minute:y,second:y,hour12:!1,timeZoneName:w},N={hour:y,minute:y,second:y,hour12:!1,timeZoneName:x},M={year:y,month:y,day:y,hour:y,minute:y},O={year:y,month:y,day:y,hour:y,minute:y,second:y},_={year:y,month:w,day:y,hour:y,minute:y},j={year:y,month:w,day:y,hour:y,minute:y,second:y},H={year:y,month:w,day:y,weekday:w,hour:y,minute:y},P={year:y,month:x,day:y,hour:y,minute:y,timeZoneName:w},R={year:y,month:x,day:y,hour:y,minute:y,second:y,timeZoneName:w},$={year:y,month:x,day:y,weekday:x,hour:y,minute:y,timeZoneName:x},q={year:y,month:x,day:y,weekday:x,hour:y,minute:y,second:y,timeZoneName:x};function B(e){return void 0===e}function U(e){return"number"==typeof e}function V(e){return"number"==typeof e&&e%1==0}function z(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function W(){return!B(Intl.DateTimeFormat.prototype.formatToParts)}function G(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function Z(e,t,n){if(0!==e.length)return e.reduce((function(e,r){var i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i}),null)[1]}function Y(e,t){return t.reduce((function(t,n){return t[n]=e[n],t}),{})}function Q(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function J(e,t,n){return V(e)&&t<=e&&e<=n}function X(e,t){return void 0===t&&(t=2),e.toString().length<t?("0".repeat(t)+e).slice(-t):e.toString()}function K(e){return B(e)||null===e||""===e?void 0:parseInt(e,10)}function ee(e){if(!B(e)&&null!==e&&""!==e){var t=1e3*parseFloat("0."+e);return Math.floor(t)}}function te(e,t,n){void 0===n&&(n=!1);var r=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*r)/r}function ne(e){return e%4==0&&(e%100!=0||e%400==0)}function re(e){return ne(e)?366:365}function ie(e,t){var n,r=(n=t-1)-12*Math.floor(n/12)+1;return 2==r?ne(e+(t-r)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function oe(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&0<=e.year&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function ae(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,r=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return 4==t||3==r?53:52}function se(e){return 99<e?e:60<e?1900+e:2e3+e}function ue(e,t,n,r){void 0===r&&(r=null);var i=new Date(e),o={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(o.timeZone=r);var a=Object.assign({timeZoneName:t},o),s=z();if(s&&W()){var u=new Intl.DateTimeFormat(n,a).formatToParts(i).find((function(e){return"timezonename"===e.type.toLowerCase()}));return u?u.value:null}if(s){var l=new Intl.DateTimeFormat(n,o).format(i);return new Intl.DateTimeFormat(n,a).format(i).substring(l.length).replace(/^[, \u200e]+/,"")}return null}function le(e,t){var n=parseInt(e,10);Number.isNaN(n)&&(n=0);var r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function ce(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new m("Invalid unit value "+e);return t}function de(e,t,n){var r={};for(var i in e)if(Q(e,i)){if(0<=n.indexOf(i))continue;var o=e[i];if(null==o)continue;r[t(i)]=ce(o)}return r}function he(e,t){var n=Math.trunc(e/60),r=Math.abs(e%60),i=0<=n&&!Object.is(n,-0)?"+":"-",o=i+Math.abs(n);switch(t){case"short":return i+X(Math.abs(n),2)+":"+X(r,2);case"narrow":return 0<r?o+":"+r:o;case"techie":return i+X(Math.abs(n),2)+X(r,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function fe(e){return Y(e,["hour","minute","second","millisecond"])}var pe=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function ge(e){return JSON.stringify(e,Object.keys(e).sort())}var me=["January","February","March","April","May","June","July","August","September","October","November","December"],ve=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ye=["J","F","M","A","M","J","J","A","S","O","N","D"];function we(e){switch(e){case"narrow":return ye;case"short":return ve;case"long":return me;case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var xe=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],be=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ae=["M","T","W","T","F","S","S"];function Se(e){switch(e){case"narrow":return Ae;case"short":return be;case"long":return xe;case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Te=["AM","PM"],Ce=["Before Christ","Anno Domini"],ke=["BC","AD"],Fe=["B","A"];function Ie(e){switch(e){case"narrow":return Fe;case"short":return ke;case"long":return Ce;default:return null}}function Ee(e,t){for(var n,r="",i=l(e);!(n=i()).done;){var o=n.value;o.literal?r+=o.val:r+=t(o.val)}return r}var De={D:b,DD:A,DDD:S,DDDD:T,t:C,tt:k,ttt:F,tttt:I,T:E,TT:D,TTT:L,TTTT:N,f:M,ff:_,fff:P,ffff:$,F:O,FF:j,FFF:R,FFFF:q},Le=function(){function e(e,t){this.opts=t,this.loc=e,this.systemLoc=null}e.create=function(t,n){return void 0===n&&(n={}),new e(t,n)},e.parseFormat=function(e){for(var t=null,n="",r=!1,i=[],o=0;o<e.length;o++){var a=e.charAt(o);"'"===a?(0<n.length&&i.push({literal:r,val:n}),t=null,n="",r=!r):r||a===t?n+=a:(0<n.length&&i.push({literal:!1,val:n}),t=n=a)}return 0<n.length&&i.push({literal:r,val:n}),i},e.macroTokenToFormatOpts=function(e){return De[e]};var t=e.prototype;return t.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},t.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},t.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return X(e,t);var n=Object.assign({},this.opts);return 0<t&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},t.formatDateTimeFromString=function(t,n){function r(e,n){return u.loc.extract(t,e,n)}function i(e){return t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):""}function o(e,n){return l?(i=t,we(e)[i.month-1]):r(n?{month:e}:{month:e,day:"numeric"},"month");var i}function a(e,n){return l?(i=t,Se(e)[i.weekday-1]):r(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday");var i}function s(e){return l?(n=t,Ie(e)[n.year<0?0:1]):r({era:e},"era");var n}var u=this,l="en"===this.loc.listingMode(),c=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&W();return Ee(e.parseFormat(n),(function(n){switch(n){case"S":return u.num(t.millisecond);case"u":case"SSS":return u.num(t.millisecond,3);case"s":return u.num(t.second);case"ss":return u.num(t.second,2);case"m":return u.num(t.minute);case"mm":return u.num(t.minute,2);case"h":return u.num(t.hour%12==0?12:t.hour%12);case"hh":return u.num(t.hour%12==0?12:t.hour%12,2);case"H":return u.num(t.hour);case"HH":return u.num(t.hour,2);case"Z":return i({format:"narrow",allowZ:u.opts.allowZ});case"ZZ":return i({format:"short",allowZ:u.opts.allowZ});case"ZZZ":return i({format:"techie",allowZ:u.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:u.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:u.loc.locale});case"z":return t.zoneName;case"a":return l?Te[t.hour<12?0:1]:r({hour:"numeric",hour12:!0},"dayperiod");case"d":return c?r({day:"numeric"},"day"):u.num(t.day);case"dd":return c?r({day:"2-digit"},"day"):u.num(t.day,2);case"c":return u.num(t.weekday);case"ccc":return a("short",!0);case"cccc":return a("long",!0);case"ccccc":return a("narrow",!0);case"E":return u.num(t.weekday);case"EEE":return a("short",!1);case"EEEE":return a("long",!1);case"EEEEE":return a("narrow",!1);case"L":return c?r({month:"numeric",day:"numeric"},"month"):u.num(t.month);case"LL":return c?r({month:"2-digit",day:"numeric"},"month"):u.num(t.month,2);case"LLL":return o("short",!0);case"LLLL":return o("long",!0);case"LLLLL":return o("narrow",!0);case"M":return c?r({month:"numeric"},"month"):u.num(t.month);case"MM":return c?r({month:"2-digit"},"month"):u.num(t.month,2);case"MMM":return o("short",!1);case"MMMM":return o("long",!1);case"MMMMM":return o("narrow",!1);case"y":return c?r({year:"numeric"},"year"):u.num(t.year);case"yy":return c?r({year:"2-digit"},"year"):u.num(t.year.toString().slice(-2),2);case"yyyy":return c?r({year:"numeric"},"year"):u.num(t.year,4);case"yyyyyy":return c?r({year:"numeric"},"year"):u.num(t.year,6);case"G":return s("short");case"GG":return s("long");case"GGGGG":return s("narrow");case"kk":return u.num(t.weekYear.toString().slice(-2),2);case"kkkk":return u.num(t.weekYear,4);case"W":return u.num(t.weekNumber);case"WW":return u.num(t.weekNumber,2);case"o":return u.num(t.ordinal);case"ooo":return u.num(t.ordinal,3);case"q":return u.num(t.quarter);case"qq":return u.num(t.quarter,2);case"X":return u.num(Math.floor(t.ts/1e3));case"x":return u.num(t.ts);default:return(h=e.macroTokenToFormatOpts(d=n))?u.formatWithSystemDefault(t,h):d}var d,h}))},t.formatDurationFromString=function(t,n){function r(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}}var i,o=this,a=e.parseFormat(n),s=a.reduce((function(e,t){var n=t.literal,r=t.val;return n?e:e.concat(r)}),[]),u=t.shiftTo.apply(t,s.map(r).filter((function(e){return e})));return Ee(a,(i=u,function(e){var t=r(e);return t?o.num(i.get(t),e.length):e}))},e}(),Ne=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Me=function(){function e(){}var t=e.prototype;return t.offsetName=function(){throw new v},t.formatOffset=function(){throw new v},t.offset=function(){throw new v},t.equals=function(){throw new v},n(e,[{key:"type",get:function(){throw new v}},{key:"name",get:function(){throw new v}},{key:"universal",get:function(){throw new v}},{key:"isValid",get:function(){throw new v}}]),e}(),Oe=null,_e=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var i=t.prototype;return i.offsetName=function(e,t){return ue(e,t.format,t.locale)},i.formatOffset=function(e,t){return he(this.offset(e),t)},i.offset=function(e){return-new Date(e).getTimezoneOffset()},i.equals=function(e){return"local"===e.type},n(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return z()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===Oe&&(Oe=new t),Oe}}]),t}(Me),je=RegExp("^"+pe.source+"$"),He={},Pe={year:0,month:1,day:2,hour:3,minute:4,second:5},Re={},$e=function(e){function t(n){var r;return(r=e.call(this)||this).zoneName=n,r.valid=t.isValidZone(n),r}r(t,e),t.create=function(e){return Re[e]||(Re[e]=new t(e)),Re[e]},t.resetCache=function(){Re={},He={}},t.isValidSpecifier=function(e){return!(!e||!e.match(je))},t.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},t.parseGMTOffset=function(e){if(e){var t=e.match(/^Etc\/GMT([+-]\d{1,2})$/i);if(t)return-60*parseInt(t[1])}return null};var i=t.prototype;return i.offsetName=function(e,t){return ue(e,t.format,t.locale,this.name)},i.formatOffset=function(e,t){return he(this.offset(e),t)},i.offset=function(e){var t,n,r,i,o,a,s=new Date(e),u=(a=this.name,He[a]||(He[a]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:a,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),He[a]),l=u.formatToParts?function(e,t){for(var n=e.formatToParts(t),r=[],i=0;i<n.length;i++){var o=n[i],a=o.type,s=o.value,u=Pe[a];B(u)||(r[u]=parseInt(s,10))}return r}(u,s):(t=s,n=u.format(t).replace(/\u200E/g,""),i=(r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n))[1],o=r[2],[r[3],i,o,r[4],r[5],r[6]]),c=l[0],d=l[1],h=l[2],f=l[3],p=+s,g=p%1e3;return(oe({year:c,month:d,day:h,hour:24===f?0:f,minute:l[4],second:l[5],millisecond:0})-(p-=0<=g?g:1e3+g))/6e4},i.equals=function(e){return"iana"===e.type&&e.name===this.name},n(t,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),t}(Me),qe=null,Be=function(e){function t(t){var n;return(n=e.call(this)||this).fixed=t,n}r(t,e),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){var n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(le(n[1],n[2]))}return null},n(t,null,[{key:"utcInstance",get:function(){return null===qe&&(qe=new t(0)),qe}}]);var i=t.prototype;return i.offsetName=function(){return this.name},i.formatOffset=function(e,t){return he(this.fixed,t)},i.offset=function(){return this.fixed},i.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},n(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+he(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Me),Ue=function(e){function t(t){var n;return(n=e.call(this)||this).zoneName=t,n}r(t,e);var i=t.prototype;return i.offsetName=function(){return null},i.formatOffset=function(){return""},i.offset=function(){return NaN},i.equals=function(){return!1},n(t,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),t}(Me);function Ve(e,t){var n;if(B(e)||null===e)return t;if(e instanceof Me)return e;if("string"!=typeof e)return U(e)?Be.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new Ue(e);var r=e.toLowerCase();return"local"===r?t:"utc"===r||"gmt"===r?Be.utcInstance:null!=(n=$e.parseGMTOffset(e))?Be.instance(n):$e.isValidSpecifier(r)?$e.create(e):Be.parseSpecifier(r)||new Ue(e)}var ze=function(){return Date.now()},We=null,Ge=null,Ze=null,Ye=null,Qe=!1,Je=function(){function e(){}return e.resetCaches=function(){st.resetCache(),$e.resetCache()},n(e,null,[{key:"now",get:function(){return ze},set:function(e){ze=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){We=e?Ve(e):null}},{key:"defaultZone",get:function(){return We||_e.instance}},{key:"defaultLocale",get:function(){return Ge},set:function(e){Ge=e}},{key:"defaultNumberingSystem",get:function(){return Ze},set:function(e){Ze=e}},{key:"defaultOutputCalendar",get:function(){return Ye},set:function(e){Ye=e}},{key:"throwOnInvalid",get:function(){return Qe},set:function(e){Qe=e}}]),e}(),Xe={};function Ke(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=Xe[n];return r||(r=new Intl.DateTimeFormat(e,t),Xe[n]=r),r}var et={},tt={};var nt=null;function rt(e,t,n,r,i){var o=e.listingMode(n);return"error"===o?null:("en"===o?r:i)(t)}var it=function(){function e(e,t,n){if(this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&z()){var r={useGrouping:!1};0<n.padTo&&(r.minimumIntegerDigits=n.padTo),this.inf=function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=et[n];return r||(r=new Intl.NumberFormat(e,t),et[n]=r),r}(e,r)}}return e.prototype.format=function(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}return X(this.floor?Math.floor(e):te(e,3),this.padTo)},e}(),ot=function(){function e(e,t,n){var r;if(this.opts=n,this.hasIntl=z(),e.zone.universal&&this.hasIntl?(r="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:nr.fromMillis(e.ts+60*e.offset*1e3)):"local"===e.zone.type?this.dt=e:r=(this.dt=e).zone.name,this.hasIntl){var i=Object.assign({},this.opts);r&&(i.timeZone=r),this.dtf=Ke(t,i)}}var t=e.prototype;return t.format=function(){if(this.hasIntl)return this.dtf.format(this.dt.toJSDate());var e=function(e){var t="EEEE, LLLL d, yyyy, h:mm a";switch(ge(Y(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case ge(b):return"M/d/yyyy";case ge(A):return"LLL d, yyyy";case ge(S):return"LLLL d, yyyy";case ge(T):return"EEEE, LLLL d, yyyy";case ge(C):return"h:mm a";case ge(k):return"h:mm:ss a";case ge(F):case ge(I):return"h:mm a";case ge(E):return"HH:mm";case ge(D):return"HH:mm:ss";case ge(L):case ge(N):return"HH:mm";case ge(M):return"M/d/yyyy, h:mm a";case ge(_):return"LLL d, yyyy, h:mm a";case ge(P):return"LLLL d, yyyy, h:mm a";case ge($):return t;case ge(O):return"M/d/yyyy, h:mm:ss a";case ge(j):return"LLL d, yyyy, h:mm:ss a";case ge(H):return"EEE, d LLL yyyy, h:mm a";case ge(R):return"LLLL d, yyyy, h:mm:ss a";case ge(q):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return t}}(this.opts),t=st.create("en-US");return Le.create(t).formatDateTimeFromString(this.dt,e)},t.formatToParts=function(){return this.hasIntl&&W()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),at=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&G()&&(this.rtf=function(e,t){void 0===t&&(t={}),t.base;var n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],0<=t.indexOf(n)||(i[n]=e[n]);return i}(t,["base"]),r=JSON.stringify([e,n]),i=tt[r];return i||(i=new Intl.RelativeTimeFormat(e,t),tt[r]=i),i}(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n,r){void 0===n&&(n="always"),void 0===r&&(r=!1);var i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){var a="days"===e;switch(t){case 1:return a?"tomorrow":"next "+i[e][0];case-1:return a?"yesterday":"last "+i[e][0];case 0:return a?"today":"this "+i[e][0]}}var s=Object.is(t,-0)||t<0,u=Math.abs(t),l=1===u,c=i[e],d=r?!l&&c[2]||c[1]:l?i[e][0]:e;return s?u+" "+d+" ago":"in "+u+" "+d}(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),st=function(){function e(e,t,n,r){var i,o,a,s=function(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,r=e.substring(0,t);try{n=Ke(e).resolvedOptions()}catch(e){n=Ke(r).resolvedOptions()}return[r,n.numberingSystem,n.calendar]}(e),u=s[0],l=s[1],c=s[2];this.locale=u,this.numberingSystem=t||l||null,this.outputCalendar=n||c||null,this.intl=(i=this.locale,o=this.numberingSystem,a=this.outputCalendar,z()?((a||o)&&(i+="-u",a&&(i+="-ca-"+a),o&&(i+="-nu-"+o)),i):[]),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}e.fromOpts=function(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)},e.create=function(t,n,r,i){void 0===i&&(i=!1);var o=t||Je.defaultLocale;return new e(o||(i?"en-US":function(){if(nt)return nt;if(z()){var e=(new Intl.DateTimeFormat).resolvedOptions().locale;return nt=e&&"und"!==e?e:"en-US"}return nt="en-US"}()),n||Je.defaultNumberingSystem,r||Je.defaultOutputCalendar,o)},e.resetCache=function(){nt=null,Xe={},et={},tt={}},e.fromObject=function(t){var n=void 0===t?{}:t,r=n.locale,i=n.numberingSystem,o=n.outputCalendar;return e.create(r,i,o)};var t=e.prototype;return t.listingMode=function(e){void 0===e&&(e=!0);var t=z()&&W(),n=this.isEnglish(),r=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&r||e?!t||n&&r?"en":"intl":"error"},t.clone=function(t){return t&&0!==Object.getOwnPropertyNames(t).length?e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this},t.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},t.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},t.months=function(e,t,n){var r=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),rt(this,e,n,we,(function(){var n=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";return r.monthsCache[i][e]||(r.monthsCache[i][e]=function(e){for(var t=[],n=1;n<=12;n++){var r=nr.utc(2016,n,1);t.push(e(r))}return t}((function(e){return r.extract(e,n,"month")}))),r.monthsCache[i][e]}))},t.weekdays=function(e,t,n){var r=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),rt(this,e,n,Se,(function(){var n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return r.weekdaysCache[i][e]||(r.weekdaysCache[i][e]=function(e){for(var t=[],n=1;n<=7;n++){var r=nr.utc(2016,11,13+n);t.push(e(r))}return t}((function(e){return r.extract(e,n,"weekday")}))),r.weekdaysCache[i][e]}))},t.meridiems=function(e){var t=this;return void 0===e&&(e=!0),rt(this,void 0,e,(function(){return Te}),(function(){if(!t.meridiemCache){var e={hour:"numeric",hour12:!0};t.meridiemCache=[nr.utc(2016,11,13,9),nr.utc(2016,11,13,19)].map((function(n){return t.extract(n,e,"dayperiod")}))}return t.meridiemCache}))},t.eras=function(e,t){var n=this;return void 0===t&&(t=!0),rt(this,e,t,Ie,(function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[nr.utc(-40,1,1),nr.utc(2017,1,1)].map((function(e){return n.extract(e,t,"era")}))),n.eraCache[e]}))},t.extract=function(e,t,n){var r=this.dtFormatter(e,t).formatToParts().find((function(e){return e.type.toLowerCase()===n}));return r?r.value:null},t.numberFormatter=function(e){return void 0===e&&(e={}),new it(this.intl,e.forceSimple||this.fastNumbers,e)},t.dtFormatter=function(e,t){return void 0===t&&(t={}),new ot(e,this.intl,t)},t.relFormatter=function(e){return void 0===e&&(e={}),new at(this.intl,this.isEnglish(),e)},t.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||z()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},t.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},n(e,[{key:"fastNumbers",get:function(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||z()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}}]),e}();function ut(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.reduce((function(e,t){return e+t.source}),"");return RegExp("^"+r+"$")}function lt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce((function(t,n){var r=t[0],i=t[1],o=t[2],a=n(e,o),s=a[0],u=a[1],l=a[2];return[Object.assign(r,s),i||u,l]}),[{},null,1]).slice(0,2)}}function ct(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i],s=a[0],u=a[1],l=s.exec(e);if(l)return u(l)}return[null,null]}function dt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n){var r,i={};for(r=0;r<t.length;r++)i[t[r]]=K(e[n+r]);return[i,null,n+r]}}var ht=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,ft=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,9}))?)?)?/,pt=RegExp(""+ft.source+ht.source+"?"),gt=RegExp("(?:T"+pt.source+")?"),mt=dt("weekYear","weekNumber","weekDay"),vt=dt("year","ordinal"),yt=RegExp(ft.source+" ?(?:"+ht.source+"|("+pe.source+"))?"),wt=RegExp("(?: "+yt.source+")?");function xt(e,t,n){var r=e[t];return B(r)?n:K(r)}function bt(e,t){return[{year:xt(e,t),month:xt(e,t+1,1),day:xt(e,t+2,1)},null,t+3]}function At(e,t){return[{hour:xt(e,t,0),minute:xt(e,t+1,0),second:xt(e,t+2,0),millisecond:ee(e[t+3])},null,t+4]}function St(e,t){var n=!e[t]&&!e[t+1],r=le(e[t+1],e[t+2]);return[{},n?null:Be.instance(r),t+3]}function Tt(e,t){return[{},e[t]?$e.create(e[t]):null,t+1]}var Ct=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})(?:[.,](-?\d{1,9}))?S)?)?)$/;function kt(e){function t(e){return e&&d?-e:e}var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],d="-"===n[0];return[{years:t(K(r)),months:t(K(i)),weeks:t(K(o)),days:t(K(a)),hours:t(K(s)),minutes:t(K(u)),seconds:t(K(l)),milliseconds:t(ee(c))}]}var Ft={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function It(e,t,n,r,i,o,a){var s={year:2===t.length?se(K(t)):K(t),month:ve.indexOf(n)+1,day:K(r),hour:K(i),minute:K(o)};return a&&(s.second=K(a)),e&&(s.weekday=3<e.length?xe.indexOf(e)+1:be.indexOf(e)+1),s}var Et=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Dt(e){var t,n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],u=e[7],l=e[8],c=e[9],d=e[10],h=e[11],f=It(n,o,i,r,a,s,u);return t=l?Ft[l]:c?0:le(d,h),[f,new Be(t)]}var Lt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Nt=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Mt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Ot(e){var t=e[1],n=e[2],r=e[3];return[It(t,e[4],r,n,e[5],e[6],e[7]),Be.utcInstance]}function _t(e){var t=e[1],n=e[2],r=e[3],i=e[4],o=e[5],a=e[6];return[It(t,e[7],n,r,i,o,a),Be.utcInstance]}var jt=ut(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,gt),Ht=ut(/(\d{4})-?W(\d\d)(?:-?(\d))?/,gt),Pt=ut(/(\d{4})-?(\d{3})/,gt),Rt=ut(pt),$t=lt(bt,At,St),qt=lt(mt,At,St),Bt=lt(vt,At),Ut=lt(At,St),Vt=ut(/(\d{4})-(\d\d)-(\d\d)/,wt),zt=ut(yt),Wt=lt(bt,At,St,Tt),Gt=lt(At,St,Tt),Zt={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Yt=Object.assign({years:{months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},Zt),Qt=365.2425,Jt=30.436875,Xt=Object.assign({years:{months:12,weeks:Qt/7,days:Qt,hours:24*Qt,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:Qt/28,days:Qt/4,hours:24*Qt/4,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:Jt/7,days:Jt,hours:24*Jt,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},Zt),Kt=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],en=Kt.slice(0).reverse();function tn(e,t,n){void 0===n&&(n=!1);var r={values:n?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new on(r)}function nn(e,t,n,r,i){var o,a=e[i][n],s=t[n]/a,u=Math.sign(s)!==Math.sign(r[i])&&0!==r[i]&&Math.abs(s)<=1?(o=s)<0?Math.floor(o):Math.ceil(o):Math.trunc(s);r[i]+=u,t[n]-=u*a}function rn(e,t){en.reduce((function(n,r){return B(t[r])?n:(n&&nn(e,t,n,t,r),r)}),null)}var on=function(){function e(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||st.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Xt:Yt,this.isLuxonDuration=!0}e.fromMillis=function(t,n){return e.fromObject(Object.assign({milliseconds:t},n))},e.fromObject=function(t){if(null==t||"object"!=typeof t)throw new m("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new e({values:de(t,e.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:st.fromObject(t),conversionAccuracy:t.conversionAccuracy})},e.fromISO=function(t,n){var r=ct(t,[Ct,kt])[0];if(r){var i=Object.assign(r,n);return e.fromObject(i)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new m("need to specify a reason the Duration is invalid");var r=t instanceof Ne?t:new Ne(t,n);if(Je.throwOnInvalid)throw new f(r);return new e({invalid:r})},e.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new g(e);return t},e.isDuration=function(e){return e&&e.isLuxonDuration||!1};var t=e.prototype;return t.toFormat=function(e,t){void 0===t&&(t={});var n=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Le.create(this.loc,n).formatDurationFromString(this,e):"Invalid Duration"},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=te(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},t.toJSON=function(){return this.toISO()},t.toString=function(){return this.toISO()},t.valueOf=function(){return this.as("milliseconds")},t.plus=function(e){if(!this.isValid)return this;for(var t,n=an(e),r={},i=l(Kt);!(t=i()).done;){var o=t.value;(Q(n.values,o)||Q(this.values,o))&&(r[o]=n.get(o)+this.get(o))}return tn(this,{values:r},!0)},t.minus=function(e){if(!this.isValid)return this;var t=an(e);return this.plus(t.negate())},t.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,r=Object.keys(this.values);n<r.length;n++){var i=r[n];t[i]=ce(e(this.values[i],i))}return tn(this,{values:t},!0)},t.get=function(t){return this[e.normalizeUnit(t)]},t.set=function(t){return this.isValid?tn(this,{values:Object.assign(this.values,de(t,e.normalizeUnit,[]))}):this},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,r=t.numberingSystem,i=t.conversionAccuracy,o={loc:this.loc.clone({locale:n,numberingSystem:r})};return i&&(o.conversionAccuracy=i),tn(this,o)},t.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},t.normalize=function(){if(!this.isValid)return this;var e=this.toObject();return rn(this.matrix,e),tn(this,{values:e},!0)},t.shiftTo=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!this.isValid)return this;if(0===n.length)return this;n=n.map((function(t){return e.normalizeUnit(t)}));var i,o={},a={},s=this.toObject();rn(this.matrix,s);for(var u,c=l(Kt);!(u=c()).done;){var d=u.value;if(0<=n.indexOf(d)){i=d;var h=0;for(var f in a)h+=this.matrix[f][d]*a[f],a[f]=0;U(s[d])&&(h+=s[d]);var p=Math.trunc(h);for(var g in o[d]=p,a[d]=h-p,s)Kt.indexOf(g)>Kt.indexOf(d)&&nn(this.matrix,s,g,o,d)}else U(s[d])&&(a[d]=s[d])}for(var m in a)0!==a[m]&&(o[i]+=m===i?a[m]:a[m]/this.matrix[i][m]);return tn(this,{values:o},!0).normalize()},t.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var r=n[t];e[r]=-this.values[r]}return tn(this,{values:e},!0)},t.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t,n=l(Kt);!(t=n()).done;){var r=t.value;if(this.values[r]!==e.values[r])return!1}return!0},n(e,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),e}();function an(e){if(U(e))return on.fromMillis(e);if(on.isDuration(e))return e;if("object"==typeof e)return on.fromObject(e);throw new m("Unknown duration argument "+e+" of type "+typeof e)}var sn="Invalid Interval",un=function(){function e(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new m("need to specify a reason the Interval is invalid");var r=t instanceof Ne?t:new Ne(t,n);if(Je.throwOnInvalid)throw new h(r);return new e({invalid:r})},e.fromDateTimes=function(t,n){var r,i,o=rr(t),a=rr(n),s=(i=a,(r=o)&&r.isValid?i&&i.isValid?i<r?un.invalid("end before start","The end of an interval must be after its start, but you had start="+r.toISO()+" and end="+i.toISO()):null:un.invalid("missing or invalid end"):un.invalid("missing or invalid start"));return null==s?new e({start:o,end:a}):s},e.after=function(t,n){var r=an(n),i=rr(t);return e.fromDateTimes(i,i.plus(r))},e.before=function(t,n){var r=an(n),i=rr(t);return e.fromDateTimes(i.minus(r),i)},e.fromISO=function(t,n){var r=(t||"").split("/",2),i=r[0],o=r[1];if(i&&o){var a=nr.fromISO(i,n),s=nr.fromISO(o,n);if(a.isValid&&s.isValid)return e.fromDateTimes(a,s);if(a.isValid){var u=on.fromISO(o,n);if(u.isValid)return e.after(a,u)}else if(s.isValid){var l=on.fromISO(i,n);if(l.isValid)return e.before(s,l)}}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.isInterval=function(e){return e&&e.isLuxonInterval||!1};var t=e.prototype;return t.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},t.count=function(e){if(void 0===e&&(e="milliseconds"),!this.isValid)return NaN;var t=this.start.startOf(e),n=this.end.startOf(e);return Math.floor(n.diff(t,e).get(e))+1},t.hasSame=function(e){return!!this.isValid&&this.e.minus(1).hasSame(this.s,e)},t.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},t.isAfter=function(e){return!!this.isValid&&this.s>e},t.isBefore=function(e){return!!this.isValid&&this.e<=e},t.contains=function(e){return!!this.isValid&&this.s<=e&&this.e>e},t.set=function(t){var n=void 0===t?{}:t,r=n.start,i=n.end;return this.isValid?e.fromDateTimes(r||this.s,i||this.e):this},t.splitAt=function(){var t=this;if(!this.isValid)return[];for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=r.map(rr).filter((function(e){return t.contains(e)})).sort(),a=[],s=this.s,u=0;s<this.e;){var l=o[u]||this.e,c=+l>+this.e?this.e:l;a.push(e.fromDateTimes(s,c)),s=c,u+=1}return a},t.splitBy=function(t){var n=an(t);if(!this.isValid||!n.isValid||0===n.as("milliseconds"))return[];for(var r,i,o=this.s,a=[];o<this.e;)i=+(r=o.plus(n))>+this.e?this.e:r,a.push(e.fromDateTimes(o,i)),o=i;return a},t.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},t.overlaps=function(e){return this.e>e.s&&this.s<e.e},t.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},t.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},t.engulfs=function(e){return!!this.isValid&&this.s<=e.s&&this.e>=e.e},t.equals=function(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)},t.intersection=function(t){if(!this.isValid)return this;var n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return r<n?null:e.fromDateTimes(n,r)},t.union=function(t){if(!this.isValid)return this;var n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return e.fromDateTimes(n,r)},e.merge=function(e){var t=e.sort((function(e,t){return e.s-t.s})).reduce((function(e,t){var n=e[0],r=e[1];return r?r.overlaps(t)||r.abutsStart(t)?[n,r.union(t)]:[n.concat([r]),t]:[n,t]}),[[],null]),n=t[0],r=t[1];return r&&n.push(r),n},e.xor=function(t){for(var n,r,i=null,o=0,a=[],s=t.map((function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]})),u=l((n=Array.prototype).concat.apply(n,s).sort((function(e,t){return e.time-t.time})));!(r=u()).done;){var c=r.value;i=1===(o+="s"===c.type?1:-1)?c.time:(i&&+i!=+c.time&&a.push(e.fromDateTimes(i,c.time)),null)}return e.merge(a)},t.difference=function(){for(var t=this,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.xor([this].concat(r)).map((function(e){return t.intersection(e)})).filter((function(e){return e&&!e.isEmpty()}))},t.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":sn},t.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):sn},t.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():sn},t.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):sn},t.toFormat=function(e,t){var n=(void 0===t?{}:t).separator,r=void 0===n?" – ":n;return this.isValid?""+this.s.toFormat(e)+r+this.e.toFormat(e):sn},t.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):on.invalid(this.invalidReason)},t.mapEndpoints=function(t){return e.fromDateTimes(t(this.s),t(this.e))},n(e,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),e}(),ln=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=Je.defaultZone);var t=nr.local().setZone(e).set({month:12});return!e.universal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return $e.isValidSpecifier(e)&&$e.isValidZone(e)},e.normalizeZone=function(e){return Ve(e,Je.defaultZone)},e.months=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,o=n.numberingSystem,a=void 0===o?null:o,s=n.outputCalendar,u=void 0===s?"gregory":s;return st.create(i,a,u).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,o=n.numberingSystem,a=void 0===o?null:o,s=n.outputCalendar,u=void 0===s?"gregory":s;return st.create(i,a,u).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,o=n.numberingSystem,a=void 0===o?null:o;return st.create(i,a,null).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,o=n.numberingSystem,a=void 0===o?null:o;return st.create(i,a,null).weekdays(e,!0)},e.meridiems=function(e){var t=(void 0===e?{}:e).locale,n=void 0===t?null:t;return st.create(n).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");var n=(void 0===t?{}:t).locale,r=void 0===n?null:n;return st.create(r,null,"gregory").eras(e)},e.features=function(){var e=!1,t=!1,n=!1,r=!1;if(z()){e=!0,t=W(),r=G();try{n="America/New_York"===new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone}catch(e){n=!1}}return{intl:e,intlTokens:t,zones:n,relative:r}},e}();function cn(e,t){function n(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()}var r=n(t)-n(e);return Math.floor(on.fromMillis(r).as("days"))}var dn={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},hn={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},fn=dn.hanidec.replace(/[\[|\]]/g,"").split("");function pn(e,t){var n=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+dn[n||"latn"]+t)}function gn(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){var n=e[0];return t(function(e){var t=parseInt(e,10);if(isNaN(t)){t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(-1!==e[n].search(dn.hanidec))t+=fn.indexOf(e[n]);else for(var i in hn){var o=hn[i],a=o[0],s=o[1];a<=r&&r<=s&&(t+=r-a)}}return parseInt(t,10)}return t}(n))}}}function mn(e){return e.replace(/\./,"\\.?")}function vn(e){return e.replace(/\./,"").toLowerCase()}function yn(e,t){return null===e?null:{regex:RegExp(e.map(mn).join("|")),deser:function(n){var r=n[0];return e.findIndex((function(e){return vn(r)===vn(e)}))+t}}}function wn(e,t){return{regex:e,deser:function(e){return le(e[1],e[2])},groups:t}}function xn(e){return{regex:e,deser:function(e){return e[0]}}}var bn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}},An=null;function Sn(e,t,n){var r,i,o,a=(r=Le.parseFormat(n),i=e,(o=Array.prototype).concat.apply(o,r.map((function(e){return function(e,t){if(e.literal)return e;var n=Le.macroTokenToFormatOpts(e.val);if(!n)return e;var r=Le.create(t,n).formatDateTimeParts(An=An||nr.fromMillis(1555555555555)).map((function(e){return function(e,t){var n=e.type,r=e.value;if("literal"===n)return{literal:!0,val:r};var i=t[n],o=bn[n];return"object"==typeof o&&(o=o[i]),o?{literal:!1,val:o}:void 0}(e,n)}));return r.includes(void 0)?e:r}(e,i)})))),s=a.map((function(t){return function(e,t){function n(e){return{regex:RegExp(e.val.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")),deser:function(e){return e[0]},literal:!0}}var r=pn(t),i=pn(t,"{2}"),o=pn(t,"{3}"),a=pn(t,"{4}"),s=pn(t,"{6}"),u=pn(t,"{1,2}"),l=pn(t,"{1,3}"),c=pn(t,"{1,6}"),d=pn(t,"{1,9}"),h=pn(t,"{2,4}"),f=pn(t,"{4,6}"),p=function(p){if(e.literal)return n(p);switch(p.val){case"G":return yn(t.eras("short",!1),0);case"GG":return yn(t.eras("long",!1),0);case"y":return gn(c);case"yy":return gn(h,se);case"yyyy":return gn(a);case"yyyyy":return gn(f);case"yyyyyy":return gn(s);case"M":return gn(u);case"MM":return gn(i);case"MMM":return yn(t.months("short",!0,!1),1);case"MMMM":return yn(t.months("long",!0,!1),1);case"L":return gn(u);case"LL":return gn(i);case"LLL":return yn(t.months("short",!1,!1),1);case"LLLL":return yn(t.months("long",!1,!1),1);case"d":return gn(u);case"dd":return gn(i);case"o":return gn(l);case"ooo":return gn(o);case"HH":return gn(i);case"H":return gn(u);case"hh":return gn(i);case"h":return gn(u);case"mm":return gn(i);case"m":case"q":return gn(u);case"qq":return gn(i);case"s":return gn(u);case"ss":return gn(i);case"S":return gn(l);case"SSS":return gn(o);case"u":return xn(d);case"a":return yn(t.meridiems(),0);case"kkkk":return gn(a);case"kk":return gn(h,se);case"W":return gn(u);case"WW":return gn(i);case"E":case"c":return gn(r);case"EEE":return yn(t.weekdays("short",!1,!1),1);case"EEEE":return yn(t.weekdays("long",!1,!1),1);case"ccc":return yn(t.weekdays("short",!0,!1),1);case"cccc":return yn(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return wn(new RegExp("([+-]"+u.source+")(?::("+i.source+"))?"),2);case"ZZZ":return wn(new RegExp("([+-]"+u.source+")("+i.source+")?"),2);case"z":return xn(/[a-z_+-/]{1,256}?/i);default:return n(p)}}(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return p.token=e,p}(t,e)})),u=s.find((function(e){return e.invalidReason}));if(u)return{input:t,tokens:a,invalidReason:u.invalidReason};var l,c,d,h=["^"+(d=s).map((function(e){return e.regex})).reduce((function(e,t){return e+"("+t.source+")"}),"")+"$",d],f=h[1],g=RegExp(h[0],"i"),m=function(e,t,n){var r=e.match(t);if(r){var i={},o=1;for(var a in n)if(Q(n,a)){var s=n[a],u=s.groups?s.groups+1:1;!s.literal&&s.token&&(i[s.token.val[0]]=s.deser(r.slice(o,o+u))),o+=u}return[r,i]}return[r,{}]}(t,g,f),v=m[0],y=m[1],w=y?(c=B((l=y).Z)?B(l.z)?null:$e.create(l.z):new Be(l.Z),B(l.q)||(l.M=3*(l.q-1)+1),B(l.h)||(l.h<12&&1===l.a?l.h+=12:12===l.h&&0===l.a&&(l.h=0)),0===l.G&&l.y&&(l.y=-l.y),B(l.u)||(l.S=ee(l.u)),[Object.keys(l).reduce((function(e,t){var n=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(t);return n&&(e[n]=l[t]),e}),{}),c]):[null,null],x=w[0],b=w[1];if(Q(y,"a")&&Q(y,"H"))throw new p("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:a,regex:g,rawMatches:v,matches:y,result:x,zone:b}}var Tn=[0,31,59,90,120,151,181,212,243,273,304,334],Cn=[0,31,60,91,121,152,182,213,244,274,305,335];function kn(e,t){return new Ne("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function Fn(e,t,n){var r=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===r?7:r}function In(e,t,n){return n+(ne(e)?Cn:Tn)[t-1]}function En(e,t){var n=ne(e)?Cn:Tn,r=n.findIndex((function(e){return e<t}));return{month:r+1,day:t-n[r]}}function Dn(e){var t,n=e.year,r=e.month,i=e.day,o=In(n,r,i),a=Fn(n,r,i),s=Math.floor((o-a+10)/7);return s<1?s=ae(t=n-1):s>ae(n)?(t=n+1,s=1):t=n,Object.assign({weekYear:t,weekNumber:s,weekday:a},fe(e))}function Ln(e){var t,n=e.weekYear,r=e.weekNumber,i=e.weekday,o=Fn(n,1,4),a=re(n),s=7*r+i-o-3;s<1?s+=re(t=n-1):a<s?(t=n+1,s-=re(n)):t=n;var u=En(t,s),l=u.month,c=u.day;return Object.assign({year:t,month:l,day:c},fe(e))}function Nn(e){var t=e.year,n=In(t,e.month,e.day);return Object.assign({year:t,ordinal:n},fe(e))}function Mn(e){var t=e.year,n=En(t,e.ordinal),r=n.month,i=n.day;return Object.assign({year:t,month:r,day:i},fe(e))}function On(e){var t=V(e.year),n=J(e.month,1,12),r=J(e.day,1,ie(e.year,e.month));return t?n?!r&&kn("day",e.day):kn("month",e.month):kn("year",e.year)}function _n(e){var t=e.hour,n=e.minute,r=e.second,i=e.millisecond,o=J(t,0,23)||24===t&&0===n&&0===r&&0===i,a=J(n,0,59),s=J(r,0,59),u=J(i,0,999);return o?a?s?!u&&kn("millisecond",i):kn("second",r):kn("minute",n):kn("hour",t)}var jn="Invalid DateTime";function Hn(e){return new Ne("unsupported zone",'the zone "'+e.name+'" is not supported')}function Pn(e){return null===e.weekData&&(e.weekData=Dn(e.c)),e.weekData}function Rn(e,t){var n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new nr(Object.assign({},n,t,{old:n}))}function $n(e,t,n){var r=e-60*t*1e3,i=n.offset(r);if(t===i)return[r,t];r-=60*(i-t)*1e3;var o=n.offset(r);return i===o?[r,i]:[e-60*Math.min(i,o)*1e3,Math.max(i,o)]}function qn(e,t){var n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Bn(e,t,n){return $n(oe(e),t,n)}function Un(e,t){var n=Object.keys(t.values);-1===n.indexOf("milliseconds")&&n.push("milliseconds"),t=t.shiftTo.apply(t,n);var r=e.o,i=e.c.year+t.years,o=e.c.month+t.months+3*t.quarters,a=Object.assign({},e.c,{year:i,month:o,day:Math.min(e.c.day,ie(i,o))+t.days+7*t.weeks}),s=on.fromObject({hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),u=$n(oe(a),r,e.zone),l=u[0],c=u[1];return 0!==s&&(l+=s,c=e.zone.offset(l)),{ts:l,o:c}}function Vn(e,t,n,r,i){var o=n.setZone,a=n.zone;if(e&&0!==Object.keys(e).length){var s=t||a,u=nr.fromObject(Object.assign(e,n,{zone:s,setZone:void 0}));return o?u:u.setZone(a)}return nr.invalid(new Ne("unparsable",'the input "'+i+"\" can't be parsed as "+r))}function zn(e,t,n){return void 0===n&&(n=!0),e.isValid?Le.create(st.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Wn(e,t){var n=t.suppressSeconds,r=void 0!==n&&n,i=t.suppressMilliseconds,o=void 0!==i&&i,a=t.includeOffset,s=t.includeZone,u=void 0!==s&&s,l=t.spaceZone,c=void 0!==l&&l,d=t.format,h=void 0===d?"extended":d,f="basic"===h?"HHmm":"HH:mm";return r&&0===e.second&&0===e.millisecond||(f+="basic"===h?"ss":":ss",o&&0===e.millisecond||(f+=".SSS")),(u||a)&&c&&(f+=" "),u?f+="z":a&&(f+="basic"===h?"ZZZ":"ZZ"),zn(e,f)}var Gn={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Zn={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Yn={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Qn=["year","month","day","hour","minute","second","millisecond"],Jn=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Xn=["year","ordinal","hour","minute","second","millisecond"];function Kn(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new g(e);return t}function er(e,t){for(var n,r=l(Qn);!(n=r()).done;){var i=n.value;B(e[i])&&(e[i]=Gn[i])}var o=On(e)||_n(e);if(o)return nr.invalid(o);var a=Je.now(),s=Bn(e,t.offset(a),t),u=s[0],c=s[1];return new nr({ts:u,zone:t,o:c})}function tr(e,t,n){function r(e,r){return e=te(e,o||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(e,r)}function i(r){return n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r)}var o=!!B(n.round)||n.round;if(n.unit)return r(i(n.unit),n.unit);for(var a,s=l(n.units);!(a=s()).done;){var u=a.value,c=i(u);if(1<=Math.abs(c))return r(c,u)}return r(0,n.units[n.units.length-1])}var nr=function(){function e(e){var t=e.zone||Je.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new Ne("invalid input"):null)||(t.isValid?null:Hn(t));this.ts=B(e.ts)?Je.now():e.ts;var r=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t)){var o=[e.old.c,e.old.o];r=o[0],i=o[1]}else{var a=t.offset(this.ts);r=qn(this.ts,a),r=(n=Number.isNaN(r.year)?new Ne("invalid input"):null)?null:r,i=n?null:a}this._zone=t,this.loc=e.loc||st.create(),this.invalid=n,this.weekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}e.local=function(t,n,r,i,o,a,s){return B(t)?new e({ts:Je.now()}):er({year:t,month:n,day:r,hour:i,minute:o,second:a,millisecond:s},Je.defaultZone)},e.utc=function(t,n,r,i,o,a,s){return B(t)?new e({ts:Je.now(),zone:Be.utcInstance}):er({year:t,month:n,day:r,hour:i,minute:o,second:a,millisecond:s},Be.utcInstance)},e.fromJSDate=function(t,n){void 0===n&&(n={});var r,i=(r=t,"[object Date]"===Object.prototype.toString.call(r)?t.valueOf():NaN);if(Number.isNaN(i))return e.invalid("invalid input");var o=Ve(n.zone,Je.defaultZone);return o.isValid?new e({ts:i,zone:o,loc:st.fromObject(n)}):e.invalid(Hn(o))},e.fromMillis=function(t,n){if(void 0===n&&(n={}),U(t))return t<-864e13||864e13<t?e.invalid("Timestamp out of range"):new e({ts:t,zone:Ve(n.zone,Je.defaultZone),loc:st.fromObject(n)});throw new m("fromMillis requires a numerical input, but received a "+typeof t+" with value "+t)},e.fromSeconds=function(t,n){if(void 0===n&&(n={}),U(t))return new e({ts:1e3*t,zone:Ve(n.zone,Je.defaultZone),loc:st.fromObject(n)});throw new m("fromSeconds requires a numerical input")},e.fromObject=function(t){var n=Ve(t.zone,Je.defaultZone);if(!n.isValid)return e.invalid(Hn(n));var r=Je.now(),i=n.offset(r),o=de(t,Kn,["zone","locale","outputCalendar","numberingSystem"]),a=!B(o.ordinal),s=!B(o.year),u=!B(o.month)||!B(o.day),c=s||u,d=o.weekYear||o.weekNumber,h=st.fromObject(t);if((c||a)&&d)throw new p("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new p("Can't mix ordinal dates with month/day");var f,g,m=d||o.weekday&&!c,v=qn(r,i);m?(f=Jn,g=Zn,v=Dn(v)):a?(f=Xn,g=Yn,v=Nn(v)):(f=Qn,g=Gn);for(var y,w=!1,x=l(f);!(y=x()).done;){var b=y.value;B(o[b])?o[b]=w?g[b]:v[b]:w=!0}var A,S,T,C,k,F,I,E=(m?(k=V((C=o).weekYear),F=J(C.weekNumber,1,ae(C.weekYear)),I=J(C.weekday,1,7),k?F?!I&&kn("weekday",C.weekday):kn("week",C.week):kn("weekYear",C.weekYear)):a?(S=V((A=o).year),T=J(A.ordinal,1,re(A.year)),S?!T&&kn("ordinal",A.ordinal):kn("year",A.year)):On(o))||_n(o);if(E)return e.invalid(E);var D=Bn(m?Ln(o):a?Mn(o):o,i,n),L=new e({ts:D[0],zone:n,o:D[1],loc:h});return o.weekday&&c&&t.weekday!==L.weekday?e.invalid("mismatched weekday","you can't specify both a weekday of "+o.weekday+" and a date of "+L.toISO()):L},e.fromISO=function(e,t){void 0===t&&(t={});var n=ct(e,[jt,$t],[Ht,qt],[Pt,Bt],[Rt,Ut]);return Vn(n[0],n[1],t,"ISO 8601",e)},e.fromRFC2822=function(e,t){void 0===t&&(t={});var n=ct(e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim(),[Et,Dt]);return Vn(n[0],n[1],t,"RFC 2822",e)},e.fromHTTP=function(e,t){void 0===t&&(t={});var n=ct(e,[Lt,Ot],[Nt,Ot],[Mt,_t]);return Vn(n[0],n[1],t,"HTTP",t)},e.fromFormat=function(t,n,r){if(void 0===r&&(r={}),B(t)||B(n))throw new m("fromFormat requires an input string and a format");var i,o=r.locale,a=void 0===o?null:o,s=r.numberingSystem,u=void 0===s?null:s,l=[(i=Sn(st.fromOpts({locale:a,numberingSystem:u,defaultToEN:!0}),t,n)).result,i.zone,i.invalidReason],c=l[0],d=l[1],h=l[2];return h?e.invalid(h):Vn(c,d,r,"format "+n,t)},e.fromString=function(t,n,r){return void 0===r&&(r={}),e.fromFormat(t,n,r)},e.fromSQL=function(e,t){void 0===t&&(t={});var n=ct(e,[Vt,Wt],[zt,Gt]);return Vn(n[0],n[1],t,"SQL",e)},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new m("need to specify a reason the DateTime is invalid");var r=t instanceof Ne?t:new Ne(t,n);if(Je.throwOnInvalid)throw new d(r);return new e({invalid:r})},e.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var t=e.prototype;return t.get=function(e){return this[e]},t.resolvedLocaleOpts=function(e){void 0===e&&(e={});var t=Le.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t.locale,numberingSystem:t.numberingSystem,outputCalendar:t.calendar}},t.toUTC=function(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),this.setZone(Be.instance(e),t)},t.toLocal=function(){return this.setZone(Je.defaultZone)},t.setZone=function(t,n){var r=void 0===n?{}:n,i=r.keepLocalTime,o=void 0!==i&&i,a=r.keepCalendarTime,s=void 0!==a&&a;if((t=Ve(t,Je.defaultZone)).equals(this.zone))return this;if(t.isValid){var u=this.ts;if(o||s){var l=t.offset(this.ts);u=Bn(this.toObject(),l,t)[0]}return Rn(this,{ts:u,zone:t})}return e.invalid(Hn(t))},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,r=t.numberingSystem,i=t.outputCalendar;return Rn(this,{loc:this.loc.clone({locale:n,numberingSystem:r,outputCalendar:i})})},t.setLocale=function(e){return this.reconfigure({locale:e})},t.set=function(e){if(!this.isValid)return this;var t,n=de(e,Kn,[]);B(n.weekYear)&&B(n.weekNumber)&&B(n.weekday)?B(n.ordinal)?(t=Object.assign(this.toObject(),n),B(n.day)&&(t.day=Math.min(ie(t.year,t.month),t.day))):t=Mn(Object.assign(Nn(this.c),n)):t=Ln(Object.assign(Dn(this.c),n));var r=Bn(t,this.o,this.zone);return Rn(this,{ts:r[0],o:r[1]})},t.plus=function(e){return this.isValid?Rn(this,Un(this,an(e))):this},t.minus=function(e){return this.isValid?Rn(this,Un(this,an(e).negate())):this},t.startOf=function(e){if(!this.isValid)return this;var t={},n=on.normalizeUnit(e);switch(n){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}if("weeks"===n&&(t.weekday=1),"quarters"===n){var r=Math.ceil(this.month/3);t.month=3*(r-1)+1}return this.set(t)},t.endOf=function(e){var t;return this.isValid?this.plus(((t={})[e]=1,t)).startOf(e).minus(1):this},t.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Le.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):jn},t.toLocaleString=function(e){return void 0===e&&(e=b),this.isValid?Le.create(this.loc.clone(e),e).formatDateTime(this):jn},t.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Le.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},t.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},t.toISODate=function(e){var t=(void 0===e?{}:e).format,n="basic"===(void 0===t?"extended":t)?"yyyyMMdd":"yyyy-MM-dd";return 9999<this.year&&(n="+"+n),zn(this,n)},t.toISOWeekDate=function(){return zn(this,"kkkk-'W'WW-c")},t.toISOTime=function(e){var t=void 0===e?{}:e,n=t.suppressMilliseconds,r=void 0!==n&&n,i=t.suppressSeconds,o=void 0!==i&&i,a=t.includeOffset,s=void 0===a||a,u=t.format;return Wn(this,{suppressSeconds:o,suppressMilliseconds:r,includeOffset:s,format:void 0===u?"extended":u})},t.toRFC2822=function(){return zn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},t.toHTTP=function(){return zn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},t.toSQLDate=function(){return zn(this,"yyyy-MM-dd")},t.toSQLTime=function(e){var t=void 0===e?{}:e,n=t.includeOffset,r=void 0===n||n,i=t.includeZone;return Wn(this,{includeOffset:r,includeZone:void 0!==i&&i,spaceZone:!0})},t.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},t.toString=function(){return this.isValid?this.toISO():jn},t.valueOf=function(){return this.toMillis()},t.toMillis=function(){return this.isValid?this.ts:NaN},t.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},t.toJSON=function(){return this.toISO()},t.toBSON=function(){return this.toJSDate()},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},t.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return on.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var r,i=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),o=(r=t,(Array.isArray(r)?r:[r]).map(on.normalizeUnit)),a=e.valueOf()>this.valueOf(),s=function(e,t,n,r){var i,o=function(e,t,n){for(var r,i,o={},a=0,s=[["years",function(e,t){return t.year-e.year}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){var n=cn(e,t);return(n-n%7)/7}],["days",cn]];a<s.length;a++){var u=s[a],l=u[0],c=u[1];if(0<=n.indexOf(l)){var d;r=l;var h,f=c(e,t);t<(i=e.plus(((d={})[l]=f,d)))?(e=e.plus(((h={})[l]=f-1,h)),--f):e=i,o[l]=f}}return[e,o,i,r]}(e,t,n),a=o[0],s=o[1],u=o[2],l=o[3],c=t-a,d=n.filter((function(e){return 0<=["hours","minutes","seconds","milliseconds"].indexOf(e)}));0===d.length&&(u<t&&(u=a.plus(((i={})[l]=1,i))),u!==a&&(s[l]=(s[l]||0)+c/(u-a)));var h,f=on.fromObject(Object.assign(s,r));return 0<d.length?(h=on.fromMillis(c,r)).shiftTo.apply(h,d).plus(f):f}(a?this:e,a?e:this,o,i);return a?s.negate():s},t.diffNow=function(t,n){return void 0===t&&(t="milliseconds"),void 0===n&&(n={}),this.diff(e.local(),t,n)},t.until=function(e){return this.isValid?un.fromDateTimes(this,e):this},t.hasSame=function(e,t){if(!this.isValid)return!1;if("millisecond"===t)return this.valueOf()===e.valueOf();var n=e.valueOf();return this.startOf(t)<=n&&n<=this.endOf(t)},t.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},t.toRelative=function(t){if(void 0===t&&(t={}),!this.isValid)return null;var n=t.base||e.fromObject({zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;return tr(n,this.plus(r),Object.assign(t,{numeric:"always",units:["years","months","days","hours","minutes","seconds"]}))},t.toRelativeCalendar=function(t){return void 0===t&&(t={}),this.isValid?tr(t.base||e.fromObject({zone:this.zone}),this,Object.assign(t,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},e.min=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.every(e.isDateTime))throw new m("min requires all arguments be DateTimes");return Z(n,(function(e){return e.valueOf()}),Math.min)},e.max=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.every(e.isDateTime))throw new m("max requires all arguments be DateTimes");return Z(n,(function(e){return e.valueOf()}),Math.max)},e.fromFormatExplain=function(e,t,n){void 0===n&&(n={});var r=n.locale,i=void 0===r?null:r,o=n.numberingSystem,a=void 0===o?null:o;return Sn(st.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),e,t)},e.fromStringExplain=function(t,n,r){return void 0===r&&(r={}),e.fromFormatExplain(t,n,r)},n(e,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?Pn(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?Pn(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?Pn(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?Nn(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?ln.months("short",{locale:this.locale})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?ln.months("long",{locale:this.locale})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?ln.weekdays("short",{locale:this.locale})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?ln.weekdays("long",{locale:this.locale})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.universal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return ne(this.year)}},{key:"daysInMonth",get:function(){return ie(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?re(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?ae(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return b}},{key:"DATE_MED",get:function(){return A}},{key:"DATE_FULL",get:function(){return S}},{key:"DATE_HUGE",get:function(){return T}},{key:"TIME_SIMPLE",get:function(){return C}},{key:"TIME_WITH_SECONDS",get:function(){return k}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return F}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return I}},{key:"TIME_24_SIMPLE",get:function(){return E}},{key:"TIME_24_WITH_SECONDS",get:function(){return D}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return L}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return N}},{key:"DATETIME_SHORT",get:function(){return M}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return O}},{key:"DATETIME_MED",get:function(){return _}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return j}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return H}},{key:"DATETIME_FULL",get:function(){return P}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return R}},{key:"DATETIME_HUGE",get:function(){return $}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return q}}]),e}();function rr(e){if(nr.isDateTime(e))return e;if(e&&e.valueOf&&U(e.valueOf()))return nr.fromJSDate(e);if(e&&"object"==typeof e)return nr.fromObject(e);throw new m("Unknown datetime argument: "+e+", of type "+typeof e)}return e.DateTime=nr,e.Duration=on,e.FixedOffsetZone=Be,e.IANAZone=$e,e.Info=ln,e.Interval=un,e.InvalidZone=Ue,e.LocalZone=_e,e.Settings=Je,e.Zone=Me,e}({});!function(){"use strict";var e=Math.PI,t=Math.sin,n=Math.cos,r=Math.tan,i=Math.asin,o=Math.atan2,a=Math.acos,s=e/180,u=864e5,l=2440588,c=2451545;function d(e){return new Date((e+.5-l)*u)}function h(e){return function(e){return e.valueOf()/u-.5+l}(e)-c}var f=23.4397*s;function p(e,i){return o(t(e)*n(f)-r(i)*t(f),n(e))}function g(e,r){return i(t(r)*n(f)+n(r)*t(f)*t(e))}function m(e,i,a){return o(t(e),n(e)*t(i)-r(a)*n(i))}function v(e,r,o){return i(t(r)*t(o)+n(r)*n(o)*n(e))}function y(e,t){return s*(280.16+360.9856235*e)-t}function w(e){return s*(357.5291+.98560028*e)}function x(n){return n+s*(1.9148*t(n)+.02*t(2*n)+3e-4*t(3*n))+102.9372*s+e}function b(e){var t=x(w(e));return{dec:g(t,0),ra:p(t,0)}}var A={getPosition:function(e,t,n){var r=s*-n,i=s*t,o=h(e),a=b(o),u=y(o,r)-a.ra;return{azimuth:m(u,i,a.dec),altitude:v(u,i,a.dec)}}},S=A.times=[[-.833,"sunrise","sunset"],[-.3,"sunriseEnd","sunsetStart"],[-6,"dawn","dusk"],[-12,"nauticalDawn","nauticalDusk"],[-18,"nightEnd","night"],[6,"goldenHourEnd","goldenHour"]];A.addTime=function(e,t,n){S.push([e,t,n])};var T=9e-4;function C(t,n,r){return T+(t+n)/(2*e)+r}function k(e,n,r){return c+e+.0053*t(n)-.0069*t(2*r)}function F(e,r,i,o,s,u,l){return k(C(function(e,r,i){return a((t(e)-t(r)*t(i))/(n(r)*n(i)))}(e,i,o),r,s),u,l)}function I(e){var r=s*(134.963+13.064993*e),i=s*(93.272+13.22935*e),o=s*(218.316+13.176396*e)+6.289*s*t(r),a=5.128*s*t(i),u=385001-20905*n(r);return{ra:p(o,a),dec:g(o,a),dist:u}}function E(e,t){return new Date(e.valueOf()+t*u/24)}A.getTimes=function(t,n,r,i){var o,a,u,l,c,f=s*-r,p=s*n,m=function(e){return-2.076*Math.sqrt(e)/60}(i=i||0),v=function(t,n){return Math.round(t-T-n/(2*e))}(h(t),f),y=C(0,f,v),b=w(y),A=x(b),I=g(A,0),E=k(y,b,A),D={solarNoon:d(E),nadir:d(E-.5)};for(o=0,a=S.length;o<a;o+=1)c=E-((l=F(((u=S[o])[0]+m)*s,f,p,I,v,b,A))-E),D[u[1]]=d(c),D[u[2]]=d(l);return D},A.getMoonPosition=function(e,i,a){var u=s*-a,l=s*i,c=h(e),d=I(c),f=y(c,u)-d.ra,p=v(f,l,d.dec),g=o(t(f),r(l)*n(d.dec)-t(d.dec)*n(f));return p+=function(e){return e<0&&(e=0),2967e-7/Math.tan(e+.00312536/(e+.08901179))}(p),{azimuth:m(f,l,d.dec),altitude:p,distance:d.dist,parallacticAngle:g}},A.getMoonIllumination=function(e){var r=h(e||new Date),i=b(r),s=I(r),u=149598e3,l=a(t(i.dec)*t(s.dec)+n(i.dec)*n(s.dec)*n(i.ra-s.ra)),c=o(u*t(l),s.dist-u*n(l)),d=o(n(i.dec)*t(i.ra-s.ra),t(i.dec)*n(s.dec)-n(i.dec)*t(s.dec)*n(i.ra-s.ra));return{fraction:(1+n(c))/2,phase:.5+.5*c*(d<0?-1:1)/Math.PI,angle:d}},A.getMoonTimes=function(e,t,n,r){var i=new Date(e);r?i.setUTCHours(0,0,0,0):i.setHours(0,0,0,0);for(var o,a,u,l,c,d,h,f,p,g,m,v,y,w=.133*s,x=A.getMoonPosition(i,t,n).altitude-w,b=1;b<=24&&(o=A.getMoonPosition(E(i,b),t,n).altitude-w,f=((c=(x+(a=A.getMoonPosition(E(i,b+1),t,n).altitude-w))/2-o)*(h=-(d=(a-x)/2)/(2*c))+d)*h+o,g=0,(p=d*d-4*c*o)>=0&&(m=h-(y=Math.sqrt(p)/(2*Math.abs(c))),v=h+y,Math.abs(m)<=1&&g++,Math.abs(v)<=1&&g++,m<-1&&(m=v)),1===g?x<0?u=b+m:l=b+m:2===g&&(u=b+(f<0?v:m),l=b+(f<0?m:v)),!u||!l);b+=2)x=a;var S={};return u&&(S.rise=E(i,u)),l&&(S.set=E(i,l)),u||l||(S[f>0?"alwaysUp":"alwaysDown"]=!0),S},"object"==typeof exports&&"undefined"!=typeof module?module.exports=A:"function"==typeof define&&define.amd?define(A):window.SunCalc=A}();const draw=(()=>{const e=(e,t,n,r,i,o,a,s=0,u="start")=>{e.textAlign=u,e.font=n+` '${t}'`,e.shadowColor="#000000",e.shadowOffsetX=s,e.shadowOffsetY=s,e.strokeStyle="#000000",e.lineWidth=2,e.strokeText(a,i,o),e.fillStyle=r,e.fillText(a,i,o),e.fillStyle="",e.strokeStyle="",e.shadowOffsetX=0,e.shadowOffsetY=0};return{horizontalGradient:(e,t,n,r,i,o,a)=>{const s=e.createLinearGradient(0,n,0,i);s.addColorStop(0,o),s.addColorStop(.4,a),s.addColorStop(.6,a),s.addColorStop(1,o),e.fillStyle=s,e.fillRect(t,n,r-t,i-n)},horizontalGradientSingle:(e,t,n,r,i,o,a)=>{const s=e.createLinearGradient(0,n,0,i);s.addColorStop(0,o),s.addColorStop(1,a),e.fillStyle=s,e.fillRect(t,n,r-t,i-n)},triangle:(e,t,n,r,i,o,a,s)=>{e.fillStyle=t,e.beginPath(),e.moveTo(n,r),e.lineTo(i,o),e.lineTo(a,s),e.fill()},titleText:(t,n,r)=>{const i="Star4000",o="24pt",a="#ffff00";let s=55;r?(e(t,i,o,a,170,s,n,3),s+=30,e(t,i,o,a,170,s,r,3),s+=30):(s+=15,e(t,i,o,a,170,s,n,3),s+=30)},text:e,box:(e,t,n,r,i,o)=>{e.fillStyle=t,e.fillRect(n,r,i,o)},border:(e,t,n,r,i,o,a)=>{e.strokeStyle=t,e.lineWidth=n,e.strokeRect(r,i,o,a)},theme:1,topColor1:"rgb(192, 91, 2)",topColor2:"rgb(72, 34, 64)",sideColor1:"rgb(46, 18, 80)",sideColor2:"rgb(192, 91, 2)"}})(),STATUS={loading:Symbol("loading"),loaded:Symbol("loaded"),failed:Symbol("failed"),noData:Symbol("noData"),disabled:Symbol("disabled")};class WeatherDisplay{constructor(e,t,n,r){this.navId=e,this.elemId=void 0,this.gifs=[],this.data=void 0,this.loadingStatus=STATUS.loading,this.name=n||t,this.timing={totalScreens:1,baseDelay:5e3,delay:1},this.navBaseCount=0,this.screenIndex=-1,this.createCanvas(t),"progress"!==t&&this.addCheckbox(r),this.enabled?this.setStatus(STATUS.loading):this.setStatus(STATUS.disabled),this.startNavCount()}addCheckbox(e=!0){let t=window.localStorage.getItem(this.elemId+"Enabled");null===t&&(t=e),this.enabled="true"===t||!0===t,window.localStorage.setItem(this.elemId+"Enabled",this.enabled);const n=document.createElement("template");n.innerHTML=`<label for="${this.elemId}Enabled">\n\t\t\t\t\t\t\t<input type="checkbox" value="true" id="${this.elemId}Enabled" name="${this.elemId}Enabled"${this.enabled?" checked":""}/>\n\t\t\t\t\t\t ${this.name}</label>`,n.content.firstChild.addEventListener("change",e=>this.checkboxChange(e));document.getElementById("enabledDisplays").appendChild(n.content.firstChild)}checkboxChange(e){this.enabled=e.target.checked,window.localStorage.setItem(this.elemId+"Enabled",this.enabled),this.getData()}setStatus(e){this.status=e,navigation.updateStatus({id:this.navId,status:this.status})}get status(){return this.loadingStatus}set status(e){this.loadingStatus=e}createCanvas(e,t=640,n=480){if(this.elemId)return;this.elemId=e;const r=document.createElement("template");r.innerHTML=`<canvas id='${e+"Canvas"}' width='${t}' height='${n}'/ style='display: none;'>`;document.getElementById("container").appendChild(r.content.firstChild)}getData(){return this.data=void 0,this.enabled?(this.setStatus(STATUS.loading),this.calcNavTiming(),!0):(this.setStatus(STATUS.disabled),!1)}drawCanvas(){this.gifs.forEach(e=>e.pause()),this.gifs.length=0,this.canvas=document.getElementById(this.elemId+"Canvas"),this.context=this.canvas.getContext("2d"),this.screenIndex<0&&(this.screenIndex=0)}finishDraw(){let e=!0,t=!0,n=!0,r=!0,i=void 0;"almanac"===this.elemId&&(t=!1),"travelForecast"===this.elemId&&(t=!1),"regionalForecast"===this.elemId&&(t=!1),"radar"===this.elemId&&(e=!1,n=!1,t=!1),"hazards"===this.elemId&&(t=!1,i=!0,r=!1),n&&(this.drawCurrentDateTime(i),this.dateTimeInterval||setInterval(()=>this.drawCurrentDateTime(i),100)),r&&this.drawLogoImage(),t&&this.drawNoaaImage()}drawCurrentDateTime(e){if(!this.isActive())return;const{DateTime:t}=luxon,n="Star4000 Small",r="24pt",i="#ffffff";if(!this.dateTimeBackground){const e=this.context.getImageData(410,30,175,60);if(0===e.data[0])return;this.dateTimeBackground=e}e?draw.box(this.context,"rgb(25, 50, 112)",0,389,640,16):this.context.putImageData(this.dateTimeBackground,410,30);const o=t.local(),a=o.toLocaleString(t.TIME_WITH_SECONDS).padStart(11," ");let s,u;e?(s=400,u=402):(s=410,u=65),navigation.units()===UNITS.metric&&(s+=45),draw.text(this.context,n,r,i,s,u,a.toUpperCase(),2);const l=o.toFormat(" ccc LLL ")+o.day.toString().padStart(2," ");e?(s=55,u=402):(s=410,u=85),draw.text(this.context,n,r,i,s,u,l.toUpperCase(),2)}async drawNoaaImage(){this.drawNoaaImage.image||(this.drawNoaaImage.image=utils.image.load("images/noaa5.gif"));const e=await this.drawNoaaImage.image;this.context.drawImage(e,356,39)}async drawLogoImage(){this.drawLogoImage.image||(this.drawLogoImage.image=utils.image.load("images/Logo3.png"));const e=await this.drawLogoImage.image;this.context.drawImage(e,50,30,85,67)}showCanvas(e){if(e===navigation.msg.command.firstFrame&&this.navNext(e),e===navigation.msg.command.lastFrame&&this.navPrev(e),"block"===this.canvas.style.display)return!1;this.canvas.style.display="block",this.timing}hideCanvas(){this.resetNavBaseCount(),this.canvas&&(this.canvas.style.display="none")}isActive(){return null!==document.getElementById(this.elemId+"Canvas").offsetParent}isEnabled(){return this.enabled}navBaseTime(){navigation.isPlaying()&&this.isActive()&&(this.navBaseCount++,this.baseCountChange&&this.baseCountChange(this.navBaseCount),this.updateScreenFromBaseCount())}async updateScreenFromBaseCount(){let e=this.screenIndexFromBaseCount();!1!==e?e!==this.screenIndex&&(this.screenIndex=-1===e?0:e,this.screenIndexChange?this.screenIndexChange(this.screenIndex):(await this.drawCanvas(),this.showCanvas())):this.sendNavDisplayMessage(navigation.msg.response.next)}calcNavTiming(){if(!1===this.timing)return;Array.isArray(this.timing.delay)&&(this.timing.totalScreens=this.timing.delay.length);let e=[];if("number"==typeof this.timing.delay)for(let t=0;t<this.timing.totalScreens;t++)e.push(this.timing.delay);else e=this.timing.delay.map(e=>"object"==typeof e?e.time:e);let t=0;if(this.timing.fullDelay=e.map(e=>{const n=t+e;return t+=e,n}),Array.isArray(this.timing.delay)&&"object"==typeof this.timing.delay[0])this.timing.screenIndexes=this.timing.delay.map(e=>e.si);else{this.timing.screenIndexes=[];for(let e=0;e<this.timing.totalScreens;e++)this.timing.screenIndexes.push(e)}}navNext(e){if(e===navigation.msg.command.firstFrame)this.resetNavBaseCount();else{const e=this.timing.fullDelay.find(e=>e>this.navBaseCount);this.navBaseCount=e}this.updateScreenFromBaseCount()}navPrev(e){if(e===navigation.msg.command.lastFrame)this.navBaseCount=this.timing.fullDelay[this.timing.totalScreens-1]-1;else{const e=this.timing.fullDelay.reduce((e,t)=>t<this.navBaseCount?t:e,0);if(0===e&&0===this.navBaseCount)return void this.sendNavDisplayMessage(navigation.msg.response.previous);this.navBaseCount=e}this.updateScreenFromBaseCount()}screenIndexFromBaseCount(){this.timing.fullDelay||this.calcNavTiming();const e=this.timing.fullDelay.findIndex(e=>e>this.navBaseCount);return-1!==e&&this.timing.screenIndexes[e]}startNavCount(){this.navInterval||(this.navInterval=setInterval(()=>this.navBaseTime(),this.timing.baseDelay))}resetNavBaseCount(){this.navBaseCount=0,this.screenIndex=-1,this.navInterval&&(clearInterval(this.navInterval),this.navInterval=void 0),this.startNavCount()}sendNavDisplayMessage(e){navigation.displayNavMessage({id:this.navId,type:e})}}const icons={getWeatherIconFromIconLink:function(e,t=!1){const n=e=>"images/"+e;void 0===t&&(t=e.indexOf("/night/")>=0);let r=e.toLowerCase().match(/[^/]+$/)[0].match(/(.*?)[,?&.]/)[1];switch("dualimage"===r&&(r=e.match(/&j=(.*)&/)[1]),r+(t?"-n":"")){case"skc":case"hot":case"haze":return n("CC_Clear1.gif");case"skc-n":case"nskc":case"nskc-n":return n("CC_Clear0.gif");case"sct":case"few":case"bkn":return n("CC_PartlyCloudy1.gif");case"bkn-n":case"few-n":case"nfew-n":case"nfew":case"sct-n":case"nsct":case"nsct-n":return n("CC_PartlyCloudy0.gif");case"ovc":case"novc":case"ovc-n":return n("CC_Cloudy.gif");case"fog":return n("CC_Fog.gif");case"rain_sleet":return n("Sleet.gif");case"rain_showers":case"rain_showers_high":return n("CC_Showers.gif");case"rain_showers-n":case"rain_showers_high-n":return n("CC_Showers.gif");case"rain":return n("CC_Rain.gif");case"snow":return n("CC_Snow.gif");case"rain_snow":return n("CC_RainSnow.gif");case"snow_fzra":case"fzra":return n("CC_FreezingRain.gif");case"snow_sleet":return n("Snow-Sleet.gif");case"tsra_sct":case"tsra":return n("EF_ScatTstorms.gif");case"tsra_sct-n":case"tsra-n":return n("CC_TStorm.gif");case"tsra_hi":case"tsra_hi-n":case"hurricane":return n("CC_TStorm.gif");case"wind_few":case"wind_sct":case"wind_bkn":case"wind_ovc":case"wind_skc":case"wind_skc-n":return n("CC_Windy.gif");case"blizzard":return n("Blowing-Snow.gif");default:return console.log(`Unable to locate icon for ${r} ${e} ${t}`),!1}},getWeatherRegionalIconFromIconLink:(e,t)=>{void 0===t&&(t=e.indexOf("/night/")>=0);const n=e=>"images/r/"+e;let r=e.toLowerCase().match(/[^/]+$/)[0].match(/(.*?)[,?&.]/)[1];switch("dualimage"===r&&(r=e.match(/&j=(.*)&/)[1]),r+(t?"-n":"")){case"skc":case"hot":case"haze":return n("Sunny.gif");case"skc-n":case"nskc":case"nskc-n":return n("Clear-1992.gif");case"bkn":return n("Mostly-Cloudy-1994-2.gif");case"bkn-n":case"few-n":case"nfew-n":case"nfew":return n("Partly-Clear-1994-2.gif");case"sct":case"few":return n("Partly-Cloudy.gif");case"sct-n":case"nsct":case"nsct-n":return n("Mostly-Clear.gif");case"ovc":case"ovc-n":return n("Cloudy.gif");case"fog":case"fog-n":return n("Fog.gif");case"rain_sleet":return n("Sleet.gif");case"rain_showers":case"rain_showers_high":return n("Scattered-Showers-1994-2.gif");case"rain_showers-n":case"rain_showers_high-n":return n("Scattered-Showers-Night-1994-2.gif");case"rain":return n("Rain-1992.gif");case"snow":return n("Heavy-Snow-1994-2.gif");case"rain_snow":return n("Rain-Snow-1992.gif");case"snow_fzra":return n("Freezing-Rain-Snow-1992.gif");case"fzra":return n("Freezing-Rain-1992.gif");case"snow_sleet":return n("Wintry-Mix-1992.gif");case"tsra_sct":case"tsra":return n("Scattered-Tstorms-1994-2.gif");case"tsra_sct-n":case"tsra-n":return n("Scattered-Tstorms-Night-1994-2.gif");case"tsra_hi":case"tsra_hi-n":case"hurricane":return n("Thunderstorm.gif");case"wind_few":case"wind_sct":case"wind_bkn":case"wind_ovc":return n("Wind.gif");case"wind_skc":return n("Sunny-Wind-1994.gif");case"wind_skc-n":return n("Clear-Wind-1994.gif");case"blizzard":return n("Blowing Snow.gif");default:return console.log(`Unable to locate regional icon for ${r} ${e} ${t}`),!1}}},utils=(()=>{const e=[];Math.round2=(e,t)=>Number(Math.round(e+"e"+t)+"e-"+t);const t=e=>{switch(e){case"EST":return-5;case"EDT":return-4;case"CST":return-6;case"CDT":return-5;case"MST":return-7;case"MDT":return-6;case"PST":return-8;case"PDT":return-7;case"AST":case"AKST":return-9;case"ADT":case"AKDT":return-8;case"HST":return-10;case"HDT":return-9;default:return null}};Date.prototype.getTimeZone=function(){const e=this.toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2];if(null===e)switch(this.toTimeString().split(" ")[2]){case"(Eastern":return"EST";case"(Central":return"CST";case"(Mountain":return"MST";case"(Pacific":return"PST";case"(Alaskan":return"AST";case"(Hawaiian":return"HST"}else if(4===e.length)return e.substr(1);return e},Date.prototype.addHours=function(e){var t=new Date(this.valueOf());return t.setHours(t.getHours()+e),t},Date.prototype.getDayShortName=function(){return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][this.getDay()]},Date.prototype.getMonthShortName=function(){return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][this.getMonth()]};Date.prototype.getFormattedTime=function(){let e,t,n;switch(_Units){case Units.English:return e=0===this.getHours()?"12":this.getHours()>12?this.getHours()-12:this.getHours(),t=(this.getMinutes()<10?"0":"")+this.getMinutes(),n=this.getHours()<12?"am":"pm",e+":"+t+" "+n;default:return e=(this.getHours()<10?" ":"")+this.getHours(),t=(this.getMinutes()<10?"0":"")+this.getMinutes(),e+":"+t}},Date.prototype.toTimeAMPM=function(){let e=this.getHours(),t=this.getMinutes(),n=e>=12?"pm":"am";return e%=12,e=e||12,t=t<10?"0"+t:t,e+":"+t+" "+n};return String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var r=n.lastIndexOf(e,t);return-1!==r&&r===t}),String.prototype.wordWrap=function(){let e,t,n,r,i,o=this,a=arguments.length>=1?arguments[0]:75,s=arguments.length>=2?arguments[1]:"\n",u=arguments.length>=3&&arguments[2];if(o+="",a<1)return o;for(e=-1,n=(i=o.split(/\r\n|\n|\r/)).length;++e<n;i[e]+=r)for(r=i[e],i[e]="";r.length>a;i[e]+=r.slice(0,t)+((r=r.slice(t)).length?s:""))t=2===u||(t=r.slice(0,a+1).match(/\S*(\s)?$/))[1]?a:t.input.length-t[0].length||!0===u&&a||t.input.length+(t=r.slice(a).match(/^\S*/))[0].length;return i.join("\n").replace(/\n /g,"\n")},{image:{load:e=>new Promise(t=>{const n=new Image;n.onload=e=>{t(e.target)},e instanceof Blob?n.src=window.URL.createObjectURL(e):n.src=e}),superGifAsync:e=>new Promise(t=>{const n=new SuperGif(e);n.load(()=>t(n))}),preload:t=>{if(e.includes(t))return!1;return(new Image).scr=t,e.push(t),console.log(e),!0},drawLocalCanvas:e=>{const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");return n.imageSmoothingEnabled=!1,n.drawImage(e,0,0),n}},weather:{getPoint:async(e,t)=>{try{return await $.ajax({type:"GET",url:`https://api.weather.gov/points/${e},${t}`,dataType:"json",crossDomain:!0})}catch(n){return console.error("Unable to get point"),console.error(e,t),console.error(n.status,n.responseJSON),!1}}},units:{mphToKph:e=>Math.round(1.60934*e),kphToMph:e=>Math.round(e/1.60934),celsiusToFahrenheit:e=>Math.round(9*e/5+32),fahrenheitToCelsius:e=>Math.round2(5*(e-32)/9,1),milesToKilometers:e=>Math.round(1.60934*e),kilometersToMiles:e=>Math.round(e/1.60934),feetToMeters:e=>Math.round(.3048*e),metersToFeet:e=>Math.round(e/.3048),inchesToCentimeters:e=>Math.round2(2.54*e,2),pascalToInHg:e=>Math.round2(2953e-7*e,2)},calc:{relativeHumidity:(e,t)=>{const n=e,r=t;return Math.round(Math.exp(17.625*r/(243.04+r))/Math.exp(17.625*n/(243.04+n))*100)},heatIndex:(e,t)=>{const n=e,r=t;let i,o=.5*(n+61+1.2*(n-68)+.094*r);return n>=80&&(o=2.04901523*n-42.379+10.14333127*r-.22475541*n*r-.00683783*n*n-.05481717*r*r+.00122874*n*n*r+85282e-8*n*r*r-199e-8*n*n*r*r,r<13&&n>80&&n<112?(i=(13-r)/4*Math.sqrt((17-Math.abs(n-95))/17),o-=i):r>85&&n>80&&n<87&&(i=(r-85)/10*((87-n)/5),o+=i)),o<e&&(o=e),Math.round(o)},windChill:(e,t)=>{if("0"===t||"Calm"===t||"NA"===t)return"";const n=e,r=t;return Math.round(35.74+.6215*n-35.75*Math.pow(r,.16)+.4275*n*Math.pow(r,.16))},directionToNSEW:e=>["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.floor(e/22.5+.5)%16],distance:(e,t,n,r)=>Math.sqrt((n-=e)*n+(r-=t)*r),wrap:(e,t)=>(e%t+t)%t},dateTime:{getDateFromUTC:(e,t)=>{const n=t.split(":");return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),n[0],n[1],0))},getTimeZoneOffsetFromUTC:t,dateToTimeZone:(e,n)=>{const r=t(e.getTimeZone()),i=t(n);let o=new Date(e);return o=o.addHours(-1*r),o=o.addHours(i),o},getDateFromTime:(e,n,r)=>{const i=n.split(":");if(r){const n=-1*t(r);return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),i[0],i[1],0)).addHours(n)}return new Date(e.getFullYear(),e.getMonth(),e.getDate(),i[0],i[1],0)},xmlDateToJsDate:e=>{let t=e.split(/[-T:+]/g);void 0===t[5]&&console.log("bit[5] is undefined"),t[5]=t[5].replace("Z","");const n=new Date(t[0],t[1]-1,t[2]);n.setHours(t[3],t[4],t[5]),t.length<8&&(t.push("00"),t.push("00"));const r=("-"===(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1:1)*(60*t[6]+Number(t[7]));return n.setMinutes(n.getMinutes()-r-n.getTimezoneOffset())},timeTo24Hour:e=>{const t=e.substr(e.length-2),n=e.split(":")[1].substr(0,2);let r=e.split(":")[0];switch(t.toLowerCase()){case"am":"12"===r&&(r="0");break;case"pm":"12"!==r&&(r=(parseInt(r)+12).toString())}return r+":"+n}},object:{shallowEqual:(e,t)=>{if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const r of n)if("object"!=typeof e[r]&&e[r]!==t[r])return!1;return!0}}}})();$.ajaxCORS=function(e){return e.url=e.url.replace("https://api.weather.gov/",""),$.ajax(e)};class CurrentWeather extends WeatherDisplay{constructor(e,t){super(e,t,"Current Conditions"),this.backgroundImage=utils.image.load("images/BackGround1_1.png")}async getData(e){let t,n;super.getData();try{const r=$.ajaxCORS({type:"GET",url:`https://api.weather.gov/stations/${e.stationId}/observations`,data:{limit:2},dataType:"json",crossDomain:!0}),i=$.ajax({type:"GET",url:"https://api.weather.gov/stations/"+e.stationId,dataType:"json",crossDomain:!0});[t,n]=await Promise.all([r,i])}catch(e){return console.error("Unable to get current observations"),console.error(e.status,e.responseJSON),void this.setStatus(STATUS.failed)}utils.image.preload(icons.getWeatherIconFromIconLink(t.features[0].properties.icon)),this.data=Object.assign({},t,{station:n}),this.setStatus(STATUS.loaded)}async drawCanvas(){super.drawCanvas();const e=this.data.features[0].properties;let t=Math.round(e.temperature.value),n=Math.round(e.dewpoint.value),r=Math.round(e.cloudLayers[0].base.value),i="m.",o=Math.round(e.visibility.value/1e3),a=" km.",s=Math.round(e.windSpeed.value);const u=utils.calc.directionToNSEW(e.windDirection.value);let l=Math.round(e.barometricPressure.value),c=Math.round(e.heatIndex.value),d=Math.round(e.windChill.value),h=Math.round(e.windGust.value),f=Math.round(e.relativeHumidity.value);const p=icons.getWeatherIconFromIconLink(e.icon);let g="";const m=e.textDescription,v=e.barometricPressure.value-this.data.features[1].properties.barometricPressure.value;v>150&&(g="R"),v<-150&&(g="F"),navigation.units()===UNITS.english&&(t=utils.units.celsiusToFahrenheit(t),n=utils.units.celsiusToFahrenheit(n),r=100*Math.round(utils.units.metersToFeet(r)/100),i="ft.",o=utils.units.kilometersToMiles(e.visibility.value/1e3),a=" mi.",s=utils.units.kphToMph(s),l=utils.units.pascalToInHg(l),c=utils.units.celsiusToFahrenheit(c),d=utils.units.celsiusToFahrenheit(d),h=utils.units.kphToMph(h)),this.context.drawImage(await this.backgroundImage,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.horizontalGradientSingle(this.context,0,90,52,399,draw.sideColor1,draw.sideColor2),draw.horizontalGradientSingle(this.context,584,90,640,399,draw.sideColor1,draw.sideColor2),draw.titleText(this.context,"Current","Conditions"),draw.text(this.context,"Star4000 Large","24pt","#FFFFFF",170,135,t+String.fromCharCode(176),2);let y=e.textDescription;switch(m.length>15&&(y=this.shortConditions(y)),draw.text(this.context,"Star4000 Extended","24pt","#FFFFFF",195,170,y,2,"center"),draw.text(this.context,"Star4000 Extended","24pt","#FFFFFF",80,330,"Wind:",2),draw.text(this.context,"Star4000 Extended","24pt","#FFFFFF",300,330,u+" "+s,2,"right"),h&&draw.text(this.context,"Star4000 Extended","24pt","#FFFFFF",80,375,"Gusts to "+h,2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFF00",315,120,this.data.station.properties.name.substr(0,20),2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",340,165,"Humidity:",2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",560,165,f+"%",2,"right"),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",340,205,"Dewpoint:",2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",560,205,n+String.fromCharCode(176),2,"right"),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",340,245,"Ceiling:",2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",560,245,""===r?"Unlimited":r+i,2,"right"),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",340,285,"Visibility:",2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",560,285,o+a,2,"right"),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",340,325,"Pressure:",2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",535,325,l,2,"right"),g){case"R":draw.triangle(this.context,"#000000",552,302,542,312,562,312),draw.box(this.context,"#000000",549,312,6,15),draw.triangle(this.context,"#000000",550,300,540,310,560,310),draw.box(this.context,"#000000",547,310,6,15),draw.triangle(this.context,"#FFFF00",550,301,541,309,559,309),draw.box(this.context,"#FFFF00",548,309,4,15);break;case"F":draw.triangle(this.context,"#000000",552,327,542,317,562,317),draw.box(this.context,"#000000",549,302,6,15),draw.triangle(this.context,"#000000",550,325,540,315,560,315),draw.box(this.context,"#000000",547,300,6,15),draw.triangle(this.context,"#FFFF00",550,324,541,314,559,314),draw.box(this.context,"#FFFF00",548,301,4,15)}e.heatIndex.value&&c!==t?(draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",340,365,"Heat Index:",2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",560,365,c+String.fromCharCode(176),2,"right")):e.windChill.value&&""!==d&&d<t&&(draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",340,365,"Wind Chill:",2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",560,365,d+String.fromCharCode(176),2,"right")),this.gifs.push(await utils.image.superGifAsync({src:p,auto_play:!0,canvas:this.canvas,x:140,y:175,max_width:126})),this.finishDraw()}shortConditions(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/Light/g,"L")).replace(/Heavy/g,"H")).replace(/Partly/g,"P")).replace(/Mostly/g,"M")).replace(/Few/g,"F")).replace(/Thunderstorm/g,"T'storm")).replace(/ in /g,"")).replace(/Vicinity/g,"")).replace(/ and /g," ")).replace(/Freezing Rain/g,"Frz Rn")).replace(/Freezing/g,"Frz")).replace(/Unknown Precip/g,"")).replace(/L Snow Fog/g,"L Snw/Fog")).replace(/ with /g,"/")}}class LatestObservations extends WeatherDisplay{constructor(e,t){super(e,t,"Latest Observations"),this.backgroundImage=utils.image.load("images/BackGround1_1.png"),this.MaximumRegionalStations=7}async getData(e){super.getData();const t=Object.keys(_StationInfo).map(t=>{const n=_StationInfo[t],r=utils.calc.distance(n.Latitude,n.Longitude,e.latitude,e.longitude);return Object.assign({},n,{distance:r})}).sort((e,t)=>e.distance-t.distance).slice(0,30),n=(await Promise.all(t.map(async e=>{try{const t=await $.ajax({type:"GET",url:`https://api.weather.gov/stations/${e.StationId}/observations/latest`,dataType:"json",crossDomain:!0});return Object.assign({},t.properties,{StationId:e.StationId,City:e.City})}catch(t){return void console.log("Unable to get latest observations for "+e.StationId)}}))).filter(e=>e);this.data=n.slice(0,this.MaximumRegionalStations),this.data.length<1?this.setStatus(STATUS.noData):this.setStatus(STATUS.loaded)}async drawCanvas(){super.drawCanvas();const e=this.data.sort((e,t)=>e.Name<t.Name?-1:e.Name>t.Name?1:0);this.context.drawImage(await this.backgroundImage,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.horizontalGradientSingle(this.context,0,90,52,399,draw.sideColor1,draw.sideColor2),draw.horizontalGradientSingle(this.context,584,90,640,399,draw.sideColor1,draw.sideColor2),draw.titleText(this.context,"Latest","Observations"),navigation.units()===UNITS.english?draw.text(this.context,"Star4000 Small","24pt","#FFFFFF",295,105,String.fromCharCode(176)+"F",2):draw.text(this.context,"Star4000 Small","24pt","#FFFFFF",295,105,String.fromCharCode(176)+"C",2),draw.text(this.context,"Star4000 Small","24pt","#FFFFFF",345,105,"WEATHER",2),draw.text(this.context,"Star4000 Small","24pt","#FFFFFF",495,105,"WIND",2);let t=140;e.forEach(e=>{let n=e.temperature.value,r=e.windSpeed.value;const i=utils.calc.directionToNSEW(e.windDirection.value);navigation.units()===UNITS.english&&(n=utils.units.celsiusToFahrenheit(n),r=utils.units.kphToMph(r)),draw.text(this.context,"Star4000","24pt","#FFFFFF",65,t,e.City.substr(0,14),2),draw.text(this.context,"Star4000","24pt","#FFFFFF",345,t,this.shortenCurrentConditions(e.textDescription).substr(0,9),2),r>0?draw.text(this.context,"Star4000","24pt","#FFFFFF",495,t,i+Array(6-i.length-r.toString().length).join(" ")+r.toString(),2):"NA"===r?draw.text(this.context,"Star4000","24pt","#FFFFFF",495,t,"NA",2):draw.text(this.context,"Star4000","24pt","#FFFFFF",495,t,"Calm",2);const o=325-15*n.toString().length;draw.text(this.context,"Star4000","24pt","#FFFFFF",o,t,n,2),t+=40}),this.finishDraw()}shortenCurrentConditions(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/Light/,"L")).replace(/Heavy/,"H")).replace(/Partly/,"P")).replace(/Mostly/,"M")).replace(/Few/,"F")).replace(/Thunderstorm/,"T'storm")).replace(/ in /,"")).replace(/Vicinity/,"")).replace(/ and /," ")).replace(/Freezing Rain/,"Frz Rn")).replace(/Freezing/,"Frz")).replace(/Unknown Precip/,"")).replace(/L Snow Fog/,"L Snw/Fog")).replace(/ with /,"/")}}class TravelForecast extends WeatherDisplay{constructor(e,t,n){super(e,t,"Travel Forecast",n),this.backgroundImage=utils.image.load("images/BackGround6_1.png"),this.cityHeight=72,this.timing.baseDelay=20;const r=_TravelCities.length/4,i=Math.floor(r)-2,o=i%1,a=4*this.cityHeight;this.timing.delay=[150+a];for(let e=0;e<i;e++)this.timing.delay.push(a);0!==o&&this.timing.delay.push(Math.round(this.extra*this.cityHeight)),this.timing.delay.push(150)}async getData(){if(!super.getData())return;const e=_TravelCities.map(async e=>{try{const t=await utils.weather.getPoint(e.Latitude,e.Longitude),n=await $.ajax({url:t.properties.forecast,dataType:"json",crossDomain:!0}),r=n.properties.periods[0].isDaytime?0:1;return{today:0===r,high:n.properties.periods[r].temperature,low:n.properties.periods[r+1].temperature,name:e.Name,icon:icons.getWeatherRegionalIconFromIconLink(n.properties.periods[r].icon)}}catch(t){return console.error(`GetTravelWeather for ${e.Name} failed`),console.error(t.status,t.responseJSON),{name:e.Name}}}),t=await Promise.all(e);this.data=t;this.data.reduce((e,t)=>e||t.high,!1)?(this.setStatus(STATUS.loaded),this.drawLongCanvas()):this.setStatus(STATUS.noData)}async drawLongCanvas(){this.longCanvas||(this.longCanvas=document.createElement("canvas"),this.longCanvas.width=640,this.longCanvas.height=1728,this.longContext=this.longCanvas.getContext("2d"),this.longCanvasGifs=[]);const e=this.data;this.gifs.forEach(e=>e.pause()),this.gifs.length=0,this.longContext.clearRect(0,0,this.longCanvas.width,this.longCanvas.height),draw.box(this.longContext,"rgb(35, 50, 112)",0,0,640,_TravelCities.length*this.cityHeight);for(let e=0;e<=4;e++){const t=346*e;draw.horizontalGradient(this.longContext,0,t,640,t+346,"#102080","#001040")}await Promise.all(e.map(async(e,t)=>{const n=50+this.cityHeight*t;if(draw.text(this.longContext,"Star4000 Large Compressed","24pt","#FFFF00",80,n,e.name,2),e.icon){let{low:t,high:r}=e;navigation.units()===UNITS.metric&&(t=utils.units.fahrenheitToCelsius(t),r=utils.units.fahrenheitToCelsius(r));const i=Math.round(t).toString(),o=Math.round(r).toString(),a=500-20*i.length;draw.text(this.longContext,"Star4000 Large","24pt","#FFFF00",a,n,i,2);const s=560-20*o.length;draw.text(this.longContext,"Star4000 Large","24pt","#FFFF00",s,n,o,2),this.longCanvasGifs.push(await utils.image.superGifAsync({src:e.icon,auto_play:!0,canvas:this.longCanvas,x:330,y:n-35,max_width:47}))}else draw.text(this.longContext,"Star4000 Small","24pt","#FFFFFF",400,n-18,"NO TRAVEL",2),draw.text(this.longContext,"Star4000 Small","24pt","#FFFFFF",400,n,"DATA AVAILABLE",2)}))}async drawCanvas(){super.drawCanvas();const e=this.data;this.context.drawImage(await this.backgroundImage,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.titleText(this.context,"Travel Forecast","For "+this.getTravelCitiesDayName(e)),draw.text(this.context,"Star4000 Small","24pt","#FFFF00",455,105,"LOW",2),draw.text(this.context,"Star4000 Small","24pt","#FFFF00",510,105,"HIGH",2),this.context.drawImage(this.longCanvas,0,0,640,289,0,110,640,289),this.finishDraw()}async showCanvas(){await this.drawCanvas(),super.showCanvas()}screenIndexChange(){this.baseCountChange(this.navBaseCount)}baseCountChange(e){const t=this.getLongCanvas();let n=Math.min(t.height-289,e-150);n<0&&(n=0),this.context.drawImage(t,0,n,640,289,0,110,640,289)}getTravelCitiesDayName(e){const{DateTime:t}=luxon;return e.reduce((e,n)=>{if(n&&""===e){return t.local().plus({days:n.today?0:1}).toLocaleString({weekday:"long"})}return e},"")}getLongCanvas(){return this.longCanvas}}class RegionalForecast extends WeatherDisplay{constructor(e,t){super(e,t,"Regional Forecast"),this.backgroundImage=utils.image.load("images/BackGround5_1.png"),this.timing.totalScreens=3}async getData(e){super.getData();let t="images/Basemap2.png";"HI"===e.State?t="images/HawaiiRadarMap4.png":"AK"===e.State&&(t="images/AlaskaRadarMap6.png"),this.baseMap=utils.image.load(t);const n={x:240,y:117},r=this.getXYFromLatitudeLongitude(e.latitude,e.longitude,n.x,n.y,e.state),i=this.getMinMaxLatitudeLongitude(r.x,r.y,n.x,n.y,e.state);let o=2.5;"HI"===e.State&&(o=1);const a=Object.keys(_StationInfo).map(e=>Object.assign({},_StationInfo[e],{Name:_StationInfo[e].City,targetDistance:o})),s=[..._RegionalCities,...a],u=[];s.forEach(e=>{if(e.Latitude>i.minLat&&e.Latitude<i.maxLat&&e.Longitude>i.minLon&&e.Longitude<i.maxLon-1){const t=e.targetDistance||1;u.reduce((n,r)=>{const i=utils.calc.distance(e.Longitude,e.Latitude,r.Longitude,r.Latitude);return n&&i>=t},!0)&&u.push(e)}});const l=u.map(async t=>{try{const n=await utils.weather.getPoint(t.Latitude,t.Longitude),r=this.getRegionalObservation(n,t),o=await $.ajax({url:n.properties.forecast,dataType:"json",crossDomain:!0}),a=this.getXYForCity(t,i.maxLat,i.minLon,e.state),s=await r,u={daytime:!!s.icon.match(/\/day\//),temperature:utils.units.celsiusToFahrenheit(s.temperature.value),name:t.Name,icon:s.icon,x:a.x,y:a.y};return utils.image.preload(icons.getWeatherRegionalIconFromIconLink(u.icon,!u.daytime)),[u,this.buildForecast(o.properties.periods[1],t,a),this.buildForecast(o.properties.periods[2],t,a)]}catch(e){return console.log(`No regional forecast data for '${t.Name}'`),console.error(e.status,e.responseJSON),!1}}),c=(await Promise.all(l)).filter(e=>e);0!==c.length?(this.data={regionalData:c,offsetXY:n,sourceXY:r},this.setStatus(STATUS.loaded)):this.setStatus(STATUS.noData)}buildForecast(e,t,n){return{daytime:e.isDaytime,temperature:e.temperature||0,name:t.Name,icon:e.icon,x:n.x,y:n.y,time:e.startTime}}async getRegionalObservation(e,t){try{const t=(await $.ajax({type:"GET",url:e.properties.observationStations,dataType:"json",crossDomain:!0})).features[0].id,n=await $.ajax({type:"GET",url:t+"/observations/latest",dataType:"json",crossDomain:!0});return utils.image.preload(icons.getWeatherRegionalIconFromIconLink(n.properties.icon,!n.properties.daytime)),n.properties}catch(e){return console.log("Unable to get regional observations for "+t.Name),console.error(e.status,e.responseJSON),!1}}getXYFromLatitudeLongitude(e,t,n,r,i){if("AK"===i)return this.getXYFromLatitudeLongitudeAK(...arguments);if("HI"===i)return this.getXYFromLatitudeLongitudeHI(...arguments);let o=0,a=0;return o=55.2*(50.5-e),o-=r,o>1600-2*r?o=1600-2*r:o<0&&(o=0),a=41.775*(-127.5-t)*-1,a-=n,a>2550-2*n?a=2550-2*n:a<0&&(a=0),{x:a,y:o}}getXYFromLatitudeLongitudeAK(e,t,n,r){let i=0,o=0;return i=56*(73-e),i-=r,i>1142-2*r?i=1142-2*r:i<0&&(i=0),o=25*(-175-t)*-1,o-=n,o>1200-2*n?o=1200-2*n:o<0&&(o=0),{x:o,y:i}}getXYFromLatitudeLongitudeHI(e,t,n,r){let i=0,o=0;return i=55.2*(25-e),i-=r,i>571-2*r?i=571-2*r:i<0&&(i=0),o=41.775*(-164.5-t)*-1,o-=n,o>600-2*n?o=600-2*n:o<0&&(o=0),{x:o,y:i}}getMinMaxLatitudeLongitude(e,t,n,r,i){if("AK"===i)return this.getMinMaxLatitudeLongitudeAK(...arguments);if("HI"===i)return this.getMinMaxLatitudeLongitudeHI(...arguments);return{minLat:-1*((t+2*r)/55.2-50.5),maxLat:-1*(t/55.2-50.5),minLon:-1*(-1*e/41.775+127.5),maxLon:-1*(-1*(e+2*n)/41.775+127.5)}}getMinMaxLatitudeLongitudeAK(e,t,n,r){return{minLat:-1*((t+2*r)/56-73),maxLat:-1*(t/56-73),minLon:-1*(-1*e/25+175),maxLon:-1*(-1*(e+2*n)/25+175)}}getMinMaxLatitudeLongitudeHI(e,t,n,r){return{minLat:-1*((t+2*r)/55.2-25),maxLat:-1*(t/55.2-25),minLon:-1*(-1*e/41.775+164.5),maxLon:-1*(-1*(e+2*n)/41.775+164.5)}}getXYForCity(e,t,n,r){"AK"===r&&this.getXYForCityAK(...arguments),"HI"===r&&this.getXYForCityHI(...arguments);let i=57*(e.Longitude-n),o=70*(t-e.Latitude);return o<30&&(o=30),o>282&&(o=282),i<40&&(i=40),i>580&&(i=580),{x:i,y:o}}getXYForCityAK(e,t,n){let r=37*(e.Longitude-n),i=70*(t-e.Latitude);return i<30&&(i=30),i>282&&(i=282),r<40&&(r=40),r>580&&(r=580),{x:r,y:i}}getXYForCityHI(e,t,n){let r=57*(e.Longitude-n),i=70*(t-e.Latitude);return i<30&&(i=30),i>282&&(i=282),r<40&&(r=40),r>580&&(r=580),{x:r,y:i}}async drawCanvas(){super.drawCanvas();const{regionalData:e,sourceXY:t,offsetXY:n}=this.data,{DateTime:r}=luxon;if(this.context.drawImage(await this.backgroundImage,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),0===this.screenIndex)draw.titleText(this.context,"Regional","Observations");else{const t=r.fromISO(e[0][this.screenIndex].time).toLocaleString({weekday:"long"});e[0][this.screenIndex].daytime?draw.titleText(this.context,"Forecast for",t):draw.titleText(this.context,"Forecast for",t+" Night")}this.context.drawImage(await this.baseMap,t.x,t.y,2*n.x,2*n.y,0,90,640,312),await Promise.all(e.map(async e=>{const t=e[this.screenIndex],n=icons.getWeatherRegionalIconFromIconLink(t.icon,!t.daytime);n&&this.gifs.push(await utils.image.superGifAsync({src:n,max_width:42,auto_play:!0,canvas:this.canvas,x:t.x,y:t.y-15+90})),draw.text(this.context,"Star4000","20px","#ffffff",t.x-40,t.y-15+90,t.name,2);let r=t.temperature;navigation.units()===UNITS.metric&&(r=Math.round(utils.units.fahrenheitToCelsius(r))),draw.text(this.context,"Star4000 Large Compressed","28px","#ffff00",t.x-15*r.toString().length,t.y+20+90,r,2)})),this.finishDraw(),this.setStatus(STATUS.loaded)}}class LocalForecast extends WeatherDisplay{constructor(e,t){super(e,t,"Local Forecast"),this.timing.baseDelay=5e3,this.backgroundImage=utils.image.load("images/BackGround1_1.png")}async getData(e){super.getData();const t=await this.getRawData(e);if(!t)return void this.setStatus(STATUS.failed);const n=this.parseLocalForecast(t);this.screenTexts=[],n.forEach(e=>{let t=e.DayName.toUpperCase()+"...",n=e.Text;navigation.units()===UNITS.metric&&(n=e.TextC),t+=n.toUpperCase().replace("..."," "),t=t.wordWrap(32,"\n");const r=t.split("\n"),i=r.length;let o="";let a=0;for(let e=0;e<=i-1;e++)""!==r[e]&&(a>6&&(this.screenTexts.push(o),o="",a=0),o+=r[e]+"\n",a++);this.screenTexts.push(o)}),this.timing.totalScreens=this.screenTexts.length,this.calcNavTiming(),this.setStatus(STATUS.loaded)}async getRawData(e){let t="us";navigation.units()===UNITS.metric&&(t="si");try{return await $.ajax({type:"GET",url:e.forecast,data:{units:t},dataType:"json",crossDomain:!0})}catch(t){return console.error("GetWeatherForecast failed: "+e.forecast),console.error(t.status,t.responseJSON),this.setStatus(STATUS.failed),!1}}async drawCanvas(){super.drawCanvas(),this.context.drawImage(await this.backgroundImage,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.horizontalGradientSingle(this.context,0,90,52,399,draw.sideColor1,draw.sideColor2),draw.horizontalGradientSingle(this.context,584,90,640,399,draw.sideColor1,draw.sideColor2),draw.titleText(this.context,"Local ","Forecast"),draw.box(this.context,"rgb(33, 40, 90)",65,105,505,280),this.screenTexts[this.screenIndex].split("\n").forEach((e,t)=>{draw.text(this.context,"Star4000","24pt","#FFFFFF",75,140+40*t,e,2)}),this.finishDraw()}parseLocalForecast(e){return e.properties.periods.slice(0,6).map(e=>({DayName:e.name.toUpperCase(),Text:e.detailedForecast}))}}class ExtendedForecast extends WeatherDisplay{constructor(e,t){super(e,t,"Extended Forecast"),this.timing.totalScreens=2,this.backgroundImage=utils.image.load("images/BackGround2_1.png")}async getData(e){super.getData();let t,n="us";navigation.units()===UNITS.metric&&(n="si");try{t=await $.ajax({type:"GET",url:e.forecast,data:{units:n},dataType:"json",crossDomain:!0})}catch(e){return console.error("Unable to get extended forecast"),console.error(e.status,e.responseJSON),void this.setStatus(STATUS.failed)}this.data=this.parseExtendedForecast(t.properties.periods),this.screenIndex=0,this.setStatus(STATUS.loaded)}parseExtendedForecast(e){const t=[0,1,2,3,4,5,6].map(e=>luxon.DateTime.local().startOf("day").plus({days:e}).toLocaleString({weekday:"short"}));let n=0;const r=[];return e.forEach(e=>{r[n]||r.push({dayName:"",low:void 0,high:void 0,text:void 0,icon:void 0});const i=r[n];i.icon=icons.getWeatherIconFromIconLink(e.icon),i.text=this.shortenExtendedForecastText(e.shortForecast),i.dayName=t[n],utils.image.preload(i.icon),e.isDaytime?(i.high=e.temperature,n++):i.low=e.temperature}),r}shortenExtendedForecastText(e){let t=e;t=t.replace(/ and /g," "),t=t.replace(/Slight /g,""),t=t.replace(/Chance /g,""),t=t.replace(/Very /g,""),t=t.replace(/Patchy /g,""),t=t.replace(/Areas /g,""),t=t.replace(/Dense /g,"");let n=t.split(" ");-1!==t.indexOf("then")&&(n=t.split(" then "),n=n[1].split(" "));let r=n[0].substr(0,10),i="";return n[1]&&(r.endsWith(".")?r=r.replace(/\./,""):i=n[1].substr(0,10),"Blowing"===i&&(i="")),t=r,""!==i&&(t+=" "+i),[t,r,i]}async drawCanvas(){super.drawCanvas();const e=this.data.slice(0+3*this.screenIndex,3+3*this.screenIndex),t=await this.backgroundImage;this.context.drawImage(t,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.horizontalGradientSingle(this.context,0,90,640,399,draw.sideColor1,draw.sideColor2),this.context.drawImage(t,38,100,174,297,38,100,174,297),this.context.drawImage(t,232,100,174,297,232,100,174,297),this.context.drawImage(t,426,100,174,297,426,100,174,297),draw.titleText(this.context,"Extended","Forecast"),await Promise.all(e.map(async(e,t)=>{const n=195*t;draw.text(this.context,"Star4000","24pt","#FFFF00",100+n,135,e.dayName.toUpperCase(),2),draw.text(this.context,"Star4000","24pt","#8080FF",85+n,345,"Lo",2,"center"),draw.text(this.context,"Star4000","24pt","#FFFF00",165+n,345,"Hi",2,"center");let r=e.low;void 0!==r&&(navigation.units()===UNITS.metric&&(r=utils.units.rahrenheitToCelsius(r)),draw.text(this.context,"Star4000 Large","24pt","#FFFFFF",85+n,385,r,2,"center"));let i=e.high;navigation.units()===UNITS.metric&&(i=utils.units.rahrenheitToCelsius(i)),draw.text(this.context,"Star4000 Large","24pt","#FFFFFF",165+n,385,i,2,"center"),draw.text(this.context,"Star4000","24pt","#FFFFFF",120+n,270,e.text[1],2,"center"),draw.text(this.context,"Star4000","24pt","#FFFFFF",120+n,310,e.text[2],2,"center"),this.gifs.push(await utils.image.superGifAsync({src:e.icon,auto_play:!0,canvas:this.canvas,x:70+195*t,y:150,max_height:75}))})),this.finishDraw()}}class Almanac extends WeatherDisplay{constructor(e,t){super(e,t,"Almanac"),this.backgroundImage0=utils.image.load("images/BackGround3_1.png"),this.backgroundImage1=utils.image.load("images/BackGround1_1.png"),this.moonImages=[utils.image.load("images/2/Full-Moon.gif"),utils.image.load("images/2/Last-Quarter.gif"),utils.image.load("images/2/New-Moon.gif"),utils.image.load("images/2/First-Quarter.gif")],this.timing.totalScreens=2}async getData(e){super.getData();const t=[utils.image.load("products/predictions/30day/off14_temp.gif"),utils.image.load("products/predictions/30day/off14_prcp.gif")],{sun:n,moon:r}=this.calcSunMoonData(e),[i,o]=await Promise.all(t);console.log(i,o);const a=this.parseOutlooks(e.latitude,e.longitude,i,o);this.data={sun:n,moon:r,outlook:a},this.drawCanvas()}calcSunMoonData(e){const{DateTime:t}=luxon,n=[SunCalc.getTimes(new Date,e.latitude,e.longitude),SunCalc.getTimes(t.local().plus({days:1}).toJSDate(),e.latitude,e.longitude)],r=[];let i=t.local().minus({days:1}),o=SunCalc.getMoonIllumination(i.toJSDate()).phase,a=0;do{const e=o;i=i.plus({days:1}),o=SunCalc.getMoonIllumination(i.toJSDate()).phase,e<.25&&o>=.25&&r.push(this.getMoonTransition(.25,"First",i)),e<.5&&o>=.5&&r.push(this.getMoonTransition(.5,"Full",i)),e<.75&&o>=.75&&r.push(this.getMoonTransition(.75,"Last",i)),e>o&&r.push(this.getMoonTransition(0,"New",i)),a++}while(a<=30&&r.length<4);return{sun:n,moon:r}}getMoonTransition(e,t,n,r=0){let i=n,o=SunCalc.getMoonIllumination(i.toJSDate()).phase,a=0;const s={hours:0===r?-1:0,minutes:1===r?1:0,seconds:2===r?-1:0,milliseconds:3===r?1:0};let u=(e,t,n)=>e<n&&t>=n;r%2==0&&(u=(e,t,n)=>e>n&&t<=n);do{const n=o;if(i=i.plus(s),o=SunCalc.getMoonIllumination(i.toJSDate()).phase,o>.9&&(o-=1),u(n,o,e)){if(r>=3)break;return this.getMoonTransition(e,t,i,r+1)}a++}while(a<1e3);return{phase:t,date:i}}parseOutlooks(e,t,n,r){const{DateTime:i}=luxon,o=i.local(),a=o.toLocaleString({month:"short"}),s=o.plus({months:1}).toLocaleString({month:"short"}),u=utils.image.drawLocalCanvas(n),l=utils.image.drawLocalCanvas(r),c=this.getOutlookColor(e,t,u),d=this.getOutlookColor(e,t,l);return{thisMonth:a,nextMonth:s,temperature:this.getOutlookTemperatureIndicator(c),precipitation:this.getOutlookPrecipitationIndicator(d)}}getOutlookColor(e,t,n){let r=0,i=0;i=(75-e)/53*707,e<48.83&&(i-=2.9*Math.abs(48.83-e)),i-=1.7*Math.abs(-100.46-t),r=(-155-t)/-110*719,t<-100.46?(r-=1*Math.abs(-100.46-t),e>40?r+=4*Math.abs(40-e):r-=4*Math.abs(40-e)):(r+=2*Math.abs(-100.46-t),e<36&&t>-90?r+=8*Math.abs(36-e):r-=6*Math.abs(36-e)),r=Math.round(r),i=Math.round(i);for(let e=r-8;e<=r+8;e++)for(let t=i-8;t<=i+8;t++){const r=this.getPixelColor(n,e,t);if(0!==r.r&&0!==r.g&&0!==r.b||255!==r.r&&255!==r.g&&255!==r.b)return r}return!1}getPixelColor(e,t,n){const r=e.getImageData(t,n,1,1).data;return{r:r[0],g:r[1],b:r[2]}}getOutlookTemperatureIndicator(e){return e.b>e.r?"Below Normal":e.r>e.b?"Above Normal":"Normal"}getOutlookPrecipitationIndicator(e){return e.g>e.r?"Above Normal":e.r>e.g?"Below Normal":"Normal"}async drawCanvas(){super.drawCanvas();const e=this.data,{DateTime:t}=luxon,n=t.local(),r=n.plus({days:1}),[i,o,a,s]=await Promise.all(this.moonImages);switch(this.screenIndex){case 0:default:this.context.drawImage(await this.backgroundImage0,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.horizontalGradientSingle(this.context,0,90,640,190,draw.sideColor1,draw.sideColor2),draw.titleText(this.context,"Almanac","Astronomical"),draw.text(this.context,"Star4000","24pt","#FFFF00",320,120,n.toLocaleString({weekday:"long"}),2,"center"),draw.text(this.context,"Star4000","24pt","#FFFF00",500,120,r.toLocaleString({weekday:"long"}),2,"center"),draw.text(this.context,"Star4000","24pt","#FFFFFF",70,150,"Sunrise:",2),draw.text(this.context,"Star4000","24pt","#FFFFFF",270,150,t.fromJSDate(e.sun[0].sunrise).toLocaleString(t.TIME_SIMPLE).toLowerCase(),2),draw.text(this.context,"Star4000","24pt","#FFFFFF",450,150,t.fromJSDate(e.sun[1].sunrise).toLocaleString(t.TIME_SIMPLE).toLowerCase(),2),draw.text(this.context,"Star4000","24pt","#FFFFFF",70,180," Sunset:",2),draw.text(this.context,"Star4000","24pt","#FFFFFF",270,180,t.fromJSDate(e.sun[0].sunset).toLocaleString(t.TIME_SIMPLE).toLowerCase(),2),draw.text(this.context,"Star4000","24pt","#FFFFFF",450,180,t.fromJSDate(e.sun[1].sunset).toLocaleString(t.TIME_SIMPLE).toLowerCase(),2),draw.text(this.context,"Star4000","24pt","#FFFF00",70,220,"Moon Data:",2),e.moon.forEach((e,t)=>{const n=e.date.toLocaleString({month:"short",day:"numeric"});draw.text(this.context,"Star4000","24pt","#FFFFFF",120+130*t,260,e.phase,2,"center"),draw.text(this.context,"Star4000","24pt","#FFFFFF",120+130*t,390,n,2,"center");const r=(()=>{switch(e.phase){case"Full":return i;case"Last":return o;case"New":return a;case"First":default:return s}})();this.context.drawImage(r,75+130*t,270)}),this.finishDraw(),this.setStatus(STATUS.loaded);break;case 1:this.context.drawImage(await this.backgroundImage1,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.horizontalGradientSingle(this.context,0,90,52,399,draw.sideColor1,draw.sideColor2),draw.horizontalGradientSingle(this.context,584,90,640,399,draw.sideColor1,draw.sideColor2),draw.titleText(this.context,"Almanac","Outlook"),draw.text(this.context,"Star4000","24pt","#FFFFFF",320,180,"30 Day Outlook",2,"center");var u="MID-"+e.outlook.thisMonth.toUpperCase()+" TO MID-"+e.outlook.nextMonth.toUpperCase();draw.text(this.context,"Star4000","24pt","#FFFFFF",320,220,u,2,"center");var l=e.outlook.temperature;draw.text(this.context,"Star4000","24pt","#FFFFFF",70,300,"Temperatures: "+l,2);var c=e.outlook.precipitation;draw.text(this.context,"Star4000","24pt","#FFFFFF",70,380,"Precipitation: "+c,2)}}}class Radar extends WeatherDisplay{constructor(e,t){super(e,t,"Local Radar"),this.dopplerRadarImageMax=6,this.timing.baseDelay=350,this.timing.delay=[{time:4,si:5},{time:1,si:0},{time:1,si:1},{time:1,si:2},{time:1,si:3},{time:1,si:4},{time:4,si:5},{time:1,si:0},{time:1,si:1},{time:1,si:2},{time:1,si:3},{time:1,si:4},{time:4,si:5},{time:1,si:0},{time:1,si:1},{time:1,si:2},{time:1,si:3},{time:1,si:4},{time:12,si:5}],this.backgroundImage=utils.image.load("images/BackGround4_1.png")}async getData(e){if(super.getData(),"AK"===e.state)return void this.setStatus(STATUS.noData);const{DateTime:t}=luxon;let n="images/4000RadarMap2.jpg";"HI"===e.State&&(n="images/HawaiiRadarMap2.png"),this.baseMap=await utils.image.load(n);const r="Conus/RadarImg/";let i;try{i=await $.ajax({type:"GET",url:r,dataType:"text",crossDomain:!0})}catch(e){return console.error("Unable to get list of radars"),console.error(e.status,e.responseJSON),void this.setStatus(STATUS.failed)}const o=(new DOMParser).parseFromString(i,"text/html").getElementsByTagName("a"),a=[];for(let e in o)a.push(o[e].innerHTML);let s=/Conus_\d/;"HI"===e.state&&(s=/hawaii_\d/);const u=a.filter(e=>e&&e.match(s)).slice(-(this.dopplerRadarImageMax-1));"HI"!==e.state&&u.push("latest_radaronly.gif"),"HI"===e.state&&u.push("hawaii_radaronly.gif");let l,c,d,h=120,f=69;"HI"===e.State?(c=600,d=571,l=this.getXYFromLatitudeLongitudeHI(e.latitude,e.longitude,h,f)):(c=2550,d=1600,h*=2,f*=2,l=this.getXYFromLatitudeLongitudeDoppler(e.latitude,e.longitude,h,f));const p=document.createElement("canvas");p.width=c,p.height=d;const g=p.getContext("2d");g.imageSmoothingEnabled=!1;let m=117,v=60,y=this.getXYFromLatitudeLongitudeDoppler(e.latitude,e.longitude,h,f),w=y.x/2,x=y.y/2;"HI"===e.State&&(m=120,v=69,y=this.getXYFromLatitudeLongitudeHI(e.latitude,e.longitude,h,f),w=y.x,x=y.y);const b=await Promise.all(u.map(async n=>{const i=document.createElement("canvas");i.width=640,i.height=367;const o=i.getContext("2d");o.imageSmoothingEnabled=!1;const[a,s,u]=await new Promise((e,t)=>{$.ajaxCORS({type:"GET",url:r+n,xhrFields:{responseType:"blob"},crossDomain:!0,success:(t,n,r)=>e([t,n,r]),error:(e,n,r)=>t(r)})}),c=n.match(/_(\d{4})(\d\d)(\d\d)_(\d\d)(\d\d)_/);let d;if(c){const[,e,n,r,i,o]=c;d=t.fromObject({year:e,month:n,day:r,hour:i,minute:o,zone:"UTC"}).setZone()}else d=t.fromHTTP(u.getResponseHeader("Last-Modified")).setZone();const y=await utils.image.load(a);"HI"===e.State?(g.clearRect(0,0,571,600),g.drawImage(y,0,0,571,600)):(g.clearRect(0,0,2550,1600),g.drawImage(y,0,0,2550,1600)),o.drawImage(await this.baseMap,l.x,l.y,2*h,2*f,0,0,640,367);const b=document.createElement("canvas");b.width=640,b.height=367;const A=b.getContext("2d");return A.imageSmoothingEnabled=!1,A.drawImage(p,w,x,2*m,2.33*v,0,0,640,367),this.removeDopplerRadarImageNoise(A),this.mergeDopplerRadarImage(o,A),{canvas:i,time:d}}));this.timing.totalScreens=b.length,this.data=b.map(e=>e.canvas),this.times=b.map(e=>e.time),this.setStatus(STATUS.loaded)}async drawCanvas(){if(super.drawCanvas(),-1===this.screenIndex)return;this.context.drawImage(await this.backgroundImage,0,0);const{DateTime:e}=luxon;draw.text(this.context,"Arial","bold 28pt","#ffffff",155,60,"Local",2),draw.text(this.context,"Arial","bold 28pt","#ffffff",155,95,"Radar",2),draw.text(this.context,"Star4000","bold 18pt","#ffffff",438,49,"PRECIP",2,"center"),draw.text(this.context,"Star4000","bold 18pt","#ffffff",298,73,"Light",2),draw.text(this.context,"Star4000","bold 18pt","#ffffff",517,73,"Heavy",2);let t=362;const n=52;draw.box(this.context,"#000000",t-2,50,154,28),draw.box(this.context,"rgb(49, 210, 22)",t,n,17,24),t+=19,draw.box(this.context,"rgb(28, 138, 18)",t,n,17,24),t+=19,draw.box(this.context,"rgb(20, 90, 15)",t,n,17,24),t+=19,draw.box(this.context,"rgb(10, 40, 10)",t,n,17,24),t+=19,draw.box(this.context,"rgb(196, 179, 70)",t,n,17,24),t+=19,draw.box(this.context,"rgb(190, 72, 19)",t,n,17,24),t+=19,draw.box(this.context,"rgb(171, 14, 14)",t,n,17,24),t+=19,draw.box(this.context,"rgb(115, 31, 4)",t,n,17,24),t+=19,this.context.drawImage(this.data[this.screenIndex],0,0,640,367,0,113,640,367),draw.text(this.context,"Star4000 Small","24pt","#ffffff",438,105,this.times[this.screenIndex].toLocaleString(e.TIME_SIMPLE),2,"center"),this.finishDraw()}getXYFromLatitudeLongitude(e,t,n,r,i){if("HI"===i)return this.getXYFromLatitudeLongitudeHI(...arguments);let o=0,a=0;return o=55.2*(50.5-e),o-=r,o>1600-2*r?o=1600-2*r:o<0&&(o=0),a=41.775*(-127.5-t)*-1,a-=n,a>2550-2*n?a=2550-2*n:a<0&&(a=0),{x:a,y:o}}getXYFromLatitudeLongitudeHI(e,t,n,r){let i=0,o=0;return i=55.2*(25-e),i-=r,i>571-2*r?i=571-2*r:i<0&&(i=0),o=41.775*(-164.5-t)*-1,o-=n,o>600-2*n?o=600-2*n:o<0&&(o=0),{x:o,y:i}}getXYFromLatitudeLongitudeDoppler(e,t,n,r){let i=0,o=0;return i=55.2*(51.75-e),i-=r,i>3200-2*r?i=3200-2*r:i<0&&(i=0),o=41.775*(-130.37-t)*-1,o-=n,o>5100-2*n?o=5100-2*n:o<0&&(o=0),{x:2*o,y:2*i}}removeDopplerRadarImageNoise(e){const t=e.getImageData(0,0,e.canvas.width,e.canvas.height);for(let e=0;e<t.data.length;e+=4){let[n,r,i,o]=t.data.slice(e,e+4);1===n&&159===r&&244===i||n>=200&&r>=200&&i>=200||4===n&&233===r&&231===i||3===n&&0===r&&244===i?(n=0,r=0,i=0,o=0):2===n&&253===r&&2===i?(n=49,r=210,i=22,o=255):1===n&&197===r&&1===i?(n=0,r=142,i=0,o=255):0===n&&142===r&&0===i?(n=20,r=90,i=15,o=255):253===n&&248===r&&2===i?(n=10,r=40,i=10,o=255):229===n&&188===r&&0===i?(n=196,r=179,i=70,o=255):253===n&&139===r&&0===i?(n=190,r=72,i=19,o=255):212===n&&0===r&&0===i?(n=171,r=14,i=14,o=255):188===n&&0===r&&0===i&&(n=115,r=31,i=4,o=255),t.data[e]=n,t.data[e+1]=r,t.data[e+2]=i,t.data[e+3]=o}e.putImageData(t,0,0)}mergeDopplerRadarImage(e,t){for(var n=e.getImageData(0,0,e.canvas.width,e.canvas.height),r=t.getImageData(0,0,t.canvas.width,t.canvas.height),i=0;i<r.data.length;i+=4)n.data[i]<116&&n.data[i+1]<116&&n.data[i+2]<116&&(r.data[i]=0,r.data[i+1]=0,r.data[i+2]=0,r.data[i+3]=0);t.putImageData(r,0,0),e.drawImage(t.canvas,0,0)}}class Progress extends WeatherDisplay{constructor(e,t){super(e,t),this.backgroundImage=utils.image.load("images/BackGround1_1.png"),this.timing=!1,this.version=document.getElementById("version").innerHTML}async drawCanvas(e,t){super.drawCanvas(),this.eventListener||(this.eventListener=!0,this.canvas.addEventListener("click",e=>this.canvasClick(e),!1));const n=await this.backgroundImage;if(this.backgroundDrawn||(this.context.drawImage(n,0,0,640,480,0,0,640,480),draw.horizontalGradientSingle(this.context,0,90,52,399,draw.sideColor1,draw.sideColor2),draw.horizontalGradientSingle(this.context,584,90,640,399,draw.sideColor1,draw.sideColor2),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.titleText(this.context,"WeatherStar","4000+ "+this.version)),this.finishDraw(),!e)return;e.forEach((e,t)=>{const r=120+29*t,i=Array(120-Math.floor(2.5*e.name.length)).join(".");let o,a;switch(draw.text(this.context,"Star4000 Extended","19pt","#ffffff",70,r,e.name+i,2),e.status){case STATUS.loading:o="Loading",a="#ffff00";break;case STATUS.loaded:o="Press Here",a="#00ff00",this.context.drawImage(n,440,r-20,75,25,440,r-20,75,25);break;case STATUS.failed:o="Failed",a="#ff0000";break;case STATUS.noData:o="No Data",a="#C0C0C0",draw.box(this.context,"rgb(33, 40, 90)",475,r-15,75,15);break;case STATUS.disabled:o="Disabled",a="#C0C0C0",this.context.drawImage(n,470,r-20,45,25,470,r-20,45,25)}this.context.drawImage(n,475,r-20,165,30,475,r-20,165,30),draw.text(this.context,"Star4000 Extended","19pt",a,565,r,o,2,"end")});const r=t/e.length;r<1?(draw.box(this.context,"#000000",51,428,534,22),draw.box(this.context,"#ffffff",53,430,530,18),draw.box(this.context,"#1d7fff",55,432,526*r,14)):this.context.drawImage(n,51,428,534,22,51,428,534,22)}canvasClick(e){const t=e.offsetX,n=e.offsetY;if(!this.isActive())return;if(n<100||n>410)return;if(t<440||t>570)return;navigation.message("navButton",stop);const r=Math.floor((n-100)/29),i=navigation.getDisplay(r);i&&i.status===STATUS.loaded&&(i.showCanvas(navigation.msg.command.firstFrame),this.hideCanvas())}}document.addEventListener("DOMContentLoaded",()=>{navigation.init()});const UNITS={english:Symbol("english"),metric:Symbol("metric")},navigation=(()=>{let e,t={},n=[],r=UNITS.english,i=!1;const o=(e,t={})=>{index.message({type:e,message:t})},a=async r=>{const i=await utils.weather.getPoint(r.lat,r.lon),a=await $.ajax({type:"GET",url:i.properties.observationStations,dataType:"json",crossDomain:!0}),s=a.features[0].properties.stationIdentifier;let u=i.properties.relativeLocation.properties.city;s in _StationInfo&&(u=_StationInfo[s].City,u=u.split("/")[0]),t.latitude=r.lat,t.longitude=r.lon,t.zoneId=i.properties.forecastZone.substr(-6),t.radarId=i.properties.radarStation.substr(-3),t.stationId=s,t.weatherOffice=i.properties.cwa,t.city=u,t.state=i.properties.relativeLocation.properties.state,t.timeZone=i.properties.relativeLocation.properties.timeZone,t.forecast=i.properties.forecast,t.stations=a.features,o("weatherParameters",t),e=new Progress(-1,"progress"),await e.drawCanvas(),e.showCanvas(),0===n.length&&(n=[new CurrentWeather(0,"currentWeather"),new LatestObservations(1,"latestObservations"),new TravelForecast(2,"travelForecast",!1),new RegionalForecast(3,"regionalForecast"),new LocalForecast(4,"localForecast"),new ExtendedForecast(5,"extendedForecast"),new Almanac(6,"almanac"),new Radar(7,"radar")]),n.forEach(e=>e.getData(t))},s=()=>n.reduce((e,t)=>t.status!==STATUS.loading?e+1:e,0),u=()=>{n.forEach(e=>e.hideCanvas())},l=e=>{const t=e.toLowerCase();r="english"===t?UNITS.english:UNITS.metric},c=()=>i,d={response:{previous:Symbol("previous"),inProgress:Symbol("inProgress"),next:Symbol("next")},command:{firstFrame:Symbol("firstFrame"),previousFrame:Symbol("previousFrame"),nextFrame:Symbol("nextFrame"),lastFrame:Symbol("lastFrame")}},h=t=>{const r=g();e.hideCanvas(),r?(t===d.command.nextFrame&&g().navNext(),t===d.command.previousFrame&&g().navPrev()):n[0].navNext(d.command.firstFrame)},f=e=>{const t=n.length,r=p();let i;for(let o=0;o<t&&(i=utils.calc.wrap(r+(o+1)*e,t),n[i].status!==STATUS.loaded);o++);const o=n[i];u(),e<0&&o.showCanvas(d.command.lastFrame),e>0&&o.showCanvas(d.command.firstFrame)},p=()=>n.findIndex(e=>e.isActive()),g=()=>n[p()],m=t=>{i=t,o("isPlaying",i),e&&i&&!g()&&h(d.command.firstFrame)},v=t=>{switch(t){case"play":m(!0);break;case"playToggle":m(!i);break;case"stop":m(!1);break;case"next":m(!1),h(d.command.nextFrame);break;case"previous":m(!1),h(d.command.previousFrame);break;case"menu":m(!1),e.showCanvas(),u();break;default:console.error("Unknown navButton "+t)}};return{init:async()=>{},message:e=>{if(e.type)switch(e.type){case"latLon":a(e.message);break;case"units":l(e.message);break;case"navButton":v(e.message);break;default:console.error("Unknown event "+e.type)}},updateStatus:t=>{t.id<0||(e.drawCanvas(n,s()),c()&&0===t.id&&t.status===STATUS.loaded&&h(d.command.firstFrame),s()<n.length||o("loaded"))},units:()=>r,isPlaying:c,displayNavMessage:e=>{e.type===d.response.previous&&f(-1),e.type===d.response.next&&f(1)},msg:d,getDisplay:e=>n[e]}})(); |