2015-10-03 16:59:53 +09:30

12 lines
368 KiB
JavaScript

!function(e){var t=e.babelHelpers={};t.inherits=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},t.defaults=function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var o=n[r],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e},t.createClass=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t.createDecoratedClass=function(){function e(e,t,n){for(var r=0;r<t.length;r++){var o=t[r],i=o.decorators,s=o.key;if(delete o.key,delete o.decorators,o.enumerable=o.enumerable||!1,o.configurable=!0,("value"in o||o.initializer)&&(o.writable=!0),i){for(var a=0;a<i.length;a++){var u=i[a];if("function"!=typeof u)throw new TypeError("The decorator for method "+o.key+" is of the invalid type "+typeof u);o=u(e,s,o)||o}if(void 0!==o.initializer){n[s]=o;continue}}Object.defineProperty(e,s,o)}}return function(t,n,r,o,i){return n&&e(t.prototype,n,o),r&&e(t,r,i),t}}(),t.createDecoratedObject=function(e){for(var t={},n=0;n<e.length;n++){var r=e[n],o=r.decorators,i=r.key;if(delete r.key,delete r.decorators,r.enumerable=!0,r.configurable=!0,("value"in r||r.initializer)&&(r.writable=!0),o)for(var s=0;s<o.length;s++){var a=o[s];if("function"!=typeof a)throw new TypeError("The decorator for method "+r.key+" is of the invalid type "+typeof a);r=a(t,i,r)||r}r.initializer&&(r.value=r.initializer.call(t)),Object.defineProperty(t,i,r)}return t},t.defineDecoratedPropertyDescriptor=function(e,t,n){var r=n[t];if(r){var o={};for(var i in r)o[i]=r[i];o.value=o.initializer.call(e),Object.defineProperty(e,t,o)}},t.taggedTemplateLiteral=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},t.taggedTemplateLiteralLoose=function(e,t){return e.raw=t,e},t.toArray=function(e){return Array.isArray(e)?e:Array.from(e)},t.toConsumableArray=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},t.slicedToArray=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{!r&&a["return"]&&a["return"]()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),t.slicedToArrayLoose=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){for(var n,r=[],o=e[Symbol.iterator]();!(n=o.next()).done&&(r.push(n.value),!t||r.length!==t););return r}throw new TypeError("Invalid attempt to destructure non-iterable instance")},t.objectWithoutProperties=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},t.hasOwn=Object.prototype.hasOwnProperty,t.slice=Array.prototype.slice,t.bind=Function.prototype.bind,t.defineProperty=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},t.asyncToGenerator=function(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(r,s){try{var a=t[r](s),u=a.value}catch(l){return void n(l)}a.done?e(u):Promise.resolve(u).then(o,i)}var o=r.bind(null,"next"),i=r.bind(null,"throw");o()})}},t.interopRequireWildcard=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t},t.interopRequireDefault=function(e){return e&&e.__esModule?e:{"default":e}},t._typeof=function(e){return e&&e.constructor===Symbol?"symbol":typeof e},t._extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.get=function n(e,t,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,t);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:n(i,t,r)}if("value"in o)return o.value;var s=o.get;return void 0===s?void 0:s.call(r)},t.set=function r(e,t,n,o){var i=Object.getOwnPropertyDescriptor(e,t);if(void 0===i){var s=Object.getPrototypeOf(e);null!==s&&r(s,t,n,o)}else if("value"in i&&i.writable)i.value=n;else{var a=i.set;void 0!==a&&a.call(o,n)}return n},t.classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t.objectDestructuringEmpty=function(e){if(null==e)throw new TypeError("Cannot destructure undefined")},t.temporalUndefined={},t.temporalAssertDefined=function(e,t,n){if(e===n)throw new ReferenceError(t+" is not defined - temporal dead zone");return!0},t.selfGlobal="undefined"==typeof e?self:e,t.defaultProps=function(e,t){if(e)for(var n in e)"undefined"==typeof t[n]&&(t[n]=e[n]);return t},t._instanceof=function(e,t){return null!=t&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t},t.interopRequire=function(e){return e&&e.__esModule?e["default"]:e}}("undefined"==typeof global?self:global),function(e){"use strict";function t(e,t){if("/"===e.charAt(0)&&(e=e.slice(1)),"."!==e.charAt(0))return e;for(var n=e.split("/");"."===n[0]||".."===n[0];)".."===n.shift()&&t.pop();return t.concat(n).join("/")}function n(e){var t=p[e];return t&&!f[e]&&(f[e]=!0,t.execute()),t&&t.proxy}function r(e,t){d[e]=t}function o(e){return d[e]||n(e)}function i(e){return!!d[e]||!!p[e]}function s(e,t){var n=document.createElement("script");n.async&&(n.async=!1),c?n.onreadystatechange=function(){/loaded|complete/.test(this.readyState)&&(this.onreadystatechange=null,t())}:n.onload=n.onerror=t,n.setAttribute("src",e),l.appendChild(n)}function a(e){return new Promise(function(t,n){s((h.baseURL||"/")+e+".js",function(r){u&&(h.register(e,u[0],u[1]),u=void 0);var o=p[e];return o?void Promise.all(o.deps.map(function(e){return d[e]||p[e]?Promise.resolve():a(e)})).then(t,n):void n(new Error("Error loading module "+e))})})}var u,l=document.getElementsByTagName("head")[0],c=/MSIE/.test(navigator.userAgent),f=Object.create(null),p=Object.create(null),d=Object.create(null),h={set:r,get:o,has:i,"import":function(e){return new Promise(function(n,r){var i=t(e,[]),s=o(i);return s?n(s):a(e).then(function(){return o(i)})})},register:function(e,n,r){if(Array.isArray(e))return u=[],void u.push.apply(u,arguments);var i,s,a=Object.create(null),l=Object.create(null);p[e]=i={proxy:a,values:l,deps:n.map(function(n){return t(n,e.split("/").slice(0,-1))}),dependants:[],update:function(e,t){s.setters[i.deps.indexOf(e)](t)},execute:function(){i.deps.map(function(t){var n=d[t];n?i.update(t,n):(n=o(t)&&p[t].values,n&&(p[t].dependants.push(e),i.update(t,n)))}),s.execute()}},s=r(function(t,n){return l[t]=n,i.lock=!0,i.dependants.forEach(function(t){p[t]&&!p[t].lock&&p[t].update(e,l)}),i.lock=!1,Object.getOwnPropertyDescriptor(a,t)||Object.defineProperty(a,t,{enumerable:!0,get:function(){return l[t]}}),n})}};e.System=h}(window);var m=function e(t,n){"use strict";function r(e){return"function"==typeof e}function o(e){return"[object Object]"===me.call(e)}function i(e){return"[object String]"===me.call(e)}function s(e){le=e.document,ce=e.location,pe=e.cancelAnimationFrame||e.clearTimeout,fe=e.requestAnimationFrame||e.setTimeout}function a(e,t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(o(e))return G(e,n);var s,a=null!=t&&o(t)&&!("tag"in t||"view"in t||"subtree"in t),u=a?t:{},l="class"in u?"class":"className",c={tag:"div",attrs:{}},f=[];if(!i(e))throw new Error("selector in m(selector, attrs, children) should be a string");for(;null!=(s=ge.exec(e));)if(""===s[1]&&s[2])c.tag=s[2];else if("#"===s[1])c.attrs.id=s[2];else if("."===s[1])f.push(s[2]);else if("["===s[3][0]){var p=ve.exec(s[3]);c.attrs[p[1]]=p[3]||(p[2]?"":!0)}var d=a?n.slice(1):n;1===d.length&&he(d[0])?c.children=d[0]:c.children=d;for(var h in u)u.hasOwnProperty(h)&&(h===l&&null!=u[h]&&""!==u[h]?(f.push(u[h]),c.attrs[h]=""):c.attrs[h]=u[h]);return f.length&&(c.attrs[l]=f.join(" ")),c}function u(e,t){for(var n=0;n<e.length&&!t(e[n],n++););}function l(e,t){u(e,function(e,n){return(e=e&&e.attrs)&&null!=e.key&&t(e,n)})}function c(e){try{if(null==e||null==e.toString())return""}catch(t){return""}return e}function f(e,t,n,r){try{d(e,t,n),t.nodeValue=r}catch(o){}}function p(e){for(var t=0;t<e.length;t++)he(e[t])&&(e=e.concat.apply([],e),t--);return e}function d(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}function h(e,t,n,r){l(e,function(e,r){t[e=e.key]=t[e]?{action:xe,index:r,from:t[e].index,element:n.nodes[t[e].index]||le.createElement("div")}:{action:Ce,index:r}});var o=[];for(var i in t)o.push(t[i]);var s=o.sort(B),a=new Array(n.length);return a.nodes=n.nodes.slice(),u(s,function(t){var o=t.index;if(t.action===ke&&(U(n[o].nodes,n[o]),a.splice(o,1)),t.action===Ce){var i=le.createElement("div");i.key=e[o].attrs.key,d(r,i,o),a.splice(o,0,{attrs:{key:e[o].attrs.key},nodes:[i]}),a.nodes[o]=i}if(t.action===xe){var s=t.element,u=r.childNodes[o];u!==s&&null!==s&&r.insertBefore(s,u||null),a[o]=n[t.from],a.nodes[o]=s}}),a}function m(e,t,n,r){var o=e.length!==t.length;return o||l(e,function(e,n){var r=t[n];return o=r&&r.attrs&&r.attrs.key!==e.key}),o?h(e,n,t,r):t}function g(e,t,n){u(e,function(e,r){null!=t[r]&&n.push.apply(n,t[r].nodes)}),u(t.nodes,function(e,r){null!=e.parentNode&&n.indexOf(e)<0&&U([e],[t[r]])}),e.length<t.length&&(t.length=e.length),t.nodes=n}function v(e){var t=0;l(e,function(){return u(e,function(e){(e=e&&e.attrs)&&null==e.key&&(e.key="__mithril__"+t++)}),1})}function y(e,t,n){(e.tag!==t.tag||n.sort().join()!==Object.keys(t.attrs).sort().join()||e.attrs.id!==t.attrs.id||e.attrs.key!==t.attrs.key||"all"===a.redraw.strategy()&&(!t.configContext||t.configContext.retain!==!0)||"diff"===a.redraw.strategy()&&t.configContext&&t.configContext.retain===!1)&&(t.nodes.length&&U(t.nodes),t.configContext&&r(t.configContext.onunload)&&t.configContext.onunload(),t.controllers&&u(t.controllers,function(e){e.unload&&e.onunload({preventDefault:be})}))}function b(e,t){return e.attrs.xmlns?e.attrs.xmlns:"svg"===e.tag?"http://www.w3.org/2000/svg":"math"===e.tag?"http://www.w3.org/1998/Math/MathML":t}function w(e,t,n){n.length&&(e.views=t,e.controllers=n,u(n,function(e){if(e.onunload&&e.onunload.$old&&(e.onunload=e.onunload.$old),Be&&e.onunload){var t=e.onunload;e.onunload=be,e.onunload.$old=t}}))}function k(e,t,n,o,i){if(r(t.attrs.config)){var s=i.configContext=i.configContext||{};e.push(function(){return t.attrs.config.call(t,n,!o,s,i)})}}function C(e,t,r,o,i,s,a,u){var l=e.nodes[0];return o&&R(l,t.tag,t.attrs,e.attrs,i),e.children=$(l,t.tag,n,n,t.children,e.children,!1,0,t.attrs.contenteditable?l:r,i,a),e.nodes.intact=!0,u.length&&(e.views=s,e.controllers=u),l}function x(e,t,n){var r;e.$trusted?r=Y(t,n,e):(r=[le.createTextNode(e)],t.nodeName.match(ye)||d(t,r[0],n));var o="string"==typeof e||"number"==typeof e||"boolean"==typeof e?new e.constructor(e):e;return o.nodes=r,o}function _(e,t,n,r,o,i){var s=t.nodes;return r&&r===le.activeElement||(e.$trusted?(U(s,t),s=Y(n,o,e)):"textarea"===i?n.value=e:r?r.innerHTML=e:((1===s[0].nodeType||s.length>1)&&(U(t.nodes,t),s=[le.createTextNode(e)]),f(n,s[0],o,e))),t=new e.constructor(e),t.nodes=s,t}function N(e,t,n,r,o,i,s){return 0===e.nodes.length?x(t,r,n):e.valueOf()!==t.valueOf()||o===!0?_(t,e,r,i,n,s):(e.nodes.intact=!0,e)}function S(e){if(e.$trusted){var t=e.match(/<[^\/]|\>\s*[^<]/g);if(null!=t)return t.length}else if(he(e))return e.length;return 1}function T(e,t,r,o,i,s,a,u,c){e=p(e);var f=[],d=t.length===e.length,h=0,y={},b=!1;l(t,function(e,n){b=!0,y[t[n].attrs.key]={action:ke,index:n}}),v(e),b&&(t=m(e,t,y,r));for(var w=0,k=0,C=e.length;C>k;k++){var x=$(r,i,t,o,e[k],t[w],s,o+h||h,a,u,c);x!==n&&(d=d&&x.nodes.intact,h+=S(x),t[w++]=x)}return d||g(e,t,f),t}function D(e,t,n,r,o){if(null!=t){if(me.call(t)===me.call(e))return t;if(o&&o.nodes){var i=n-r,s=i+(he(e)?e:t.nodes).length;U(o.nodes.slice(i,s),o.slice(i,s))}else t.nodes&&U(t.nodes,t)}return t=new e.constructor,t.tag&&(t={}),t.nodes=[],t}function P(e,t){return t===n?e.attrs.is?le.createElement(e.tag,e.attrs.is):le.createElement(e.tag):e.attrs.is?le.createElementNS(t,e.tag,e.attrs.is):le.createElementNS(t,e.tag)}function H(e,t,n,r){return r?R(t,e.tag,e.attrs,{},n):e.attrs}function E(e,t,r,o,i,s){return null!=e.children&&e.children.length>0?$(t,e.tag,n,n,e.children,r.children,!0,0,e.attrs.contenteditable?t:o,i,s):e.children}function O(e,t,n,r,o,i,s){var a={tag:e.tag,attrs:t,children:n,nodes:[r]};return w(a,i,s),a.children&&!a.children.nodes&&(a.children.nodes=[]),"select"===e.tag&&"value"in e.attrs&&R(r,e.tag,{value:e.attrs.value},{},o),a}function M(e,t,n,r){var o="diff"===a.redraw.strategy()&&e?e.indexOf(t):-1;return o>-1?n[o]:"function"==typeof r?new r:{}}function A(e,t,n,r){null!=r.onunload&&Ie.push({controller:r,handler:r.onunload}),e.push(n),t.push(r)}function I(e,t,n,r,o,i){var s=M(n.views,t,r,e.controller),a=+(e&&e.attrs&&e.attrs.key);return e=0===Be||$e||r&&r.indexOf(s)>-1?e.view(s):{tag:"placeholder"},"retain"===e.subtree?n:(a===a&&((e.attrs=e.attrs||{}).key=a),A(i,o,t,s),e)}function j(e,t,n,r){for(var o=t&&t.controllers;null!=e.view;)e=I(e,e.view.$original||e.view,t,o,r,n);return e}function L(e,t,n,r,o,s,a,u){var l=[],c=[];if(e=j(e,t,l,c),!e.tag&&c.length)throw new Error("Component template must return a virtual element, not an array, string, etc.");e.attrs=e.attrs||{},t.attrs=t.attrs||{};var f=Object.keys(e.attrs),p=f.length>("key"in e.attrs?1:0);if(y(e,t,f),i(e.tag)){var h=0===t.nodes.length;a=b(e,a);var m;if(h){m=P(e,a);var g=H(e,m,a,p),v=E(e,m,t,n,a,u);t=O(e,g,v,m,a,l,c)}else m=C(t,e,n,p,a,l,u,c);return(h||s===!0&&null!=m)&&d(r,m,o),k(u,e,m,h,t),t}}function $(e,t,n,i,s,a,u,l,f,p,d){return s=c(s),"retain"===s.subtree?a:(a=D(s,a,l,i,n),he(s)?T(s,a,e,l,t,u,f,p,d):null!=s&&o(s)?L(s,a,f,e,l,u,p,d):r(s)?a:N(a,s,l,e,u,f,t))}function B(e,t){return e.action-t.action||e.index-t.index}function R(e,t,n,i,s){for(var a in n){var u=n[a],l=i[a];if(a in i&&l===u)"value"===a&&"input"===t&&e.value!=u&&(e.value=u);else{i[a]=u;try{if("config"===a||"key"===a)continue;if(r(u)&&"on"===a.slice(0,2))e[a]=q(u,e);else if("style"===a&&null!=u&&o(u)){for(var c in u)(null==l||l[c]!==u[c])&&(e.style[c]=u[c]);for(var c in l)c in u||(e.style[c]="")}else null!=s?"href"===a?e.setAttributeNS("http://www.w3.org/1999/xlink","href",u):e.setAttribute("className"===a?"class":a,u):a in e&&"list"!==a&&"style"!==a&&"form"!==a&&"type"!==a&&"width"!==a&&"height"!==a?("input"!==t||e[a]!==u)&&(e[a]=u):e.setAttribute(a,u)}catch(f){if(f.message.indexOf("Invalid argument")<0)throw f}}}return i}function U(e,t){for(var n=e.length-1;n>-1;n--)if(e[n]&&e[n].parentNode){try{e[n].parentNode.removeChild(e[n])}catch(r){}t=[].concat(t),t[n]&&F(t[n])}e.length&&(e.length=0)}function F(e){e.configContext&&r(e.configContext.onunload)&&(e.configContext.onunload(),e.configContext.onunload=null),e.controllers&&u(e.controllers,function(e){r(e.onunload)&&e.onunload({preventDefault:be})}),e.children&&(he(e.children)?u(e.children,F):e.children.tag&&F(e.children))}function Y(e,t,n){var r=e.childNodes[t];if(r){var o=1!==r.nodeType,i=le.createElement("span");o?(e.insertBefore(i,r||null),i.insertAdjacentHTML("beforebegin",n),e.removeChild(i)):r.insertAdjacentHTML("beforebegin",n)}else e.insertAdjacentHTML("beforeend",n);for(var s=[];e.childNodes[t]!==r;)s.push(e.childNodes[t]),t++;return s}function q(e,t){return function(n){n=n||event,a.redraw.strategy("diff"),a.startComputation();try{return e.call(t,n)}finally{V()}}}function z(e){var t=Ne.indexOf(e);return 0>t?Ne.push(e)-1:t}function W(e){var t=function(){return arguments.length&&(e=arguments[0]),e};return t.toJSON=function(){return e},t}function G(e,t){var n=function(){return(e.controller||be).apply(this,t)||this};e.controller&&(n.prototype=e.controller.prototype);var r=function(n){var r=arguments.length>1?t.concat([].slice.call(arguments,1)):t;return e.view.apply(e,r?[n].concat(r):[n])};r.$original=e.view;var o={controller:n,view:r};return t[0]&&null!=t[0].key&&(o.attrs={key:t[0].key}),o}function X(){Me&&(Me(),Me=null),u(De,function(e,t){var n=Pe[t];if(He[t]){var r=[He[t]];a.render(e,n.view?n.view(He[t],r):"")}}),Ae&&(Ae(),Ae=null),Ee=null,Oe=new Date,a.redraw.strategy("diff")}function V(){"none"===a.redraw.strategy()?(Be--,a.redraw.strategy("diff")):a.endComputation()}function K(e){return e.slice(Fe[a.route.mode].length)}function Z(e,t,n){Re={};var r=n.indexOf("?");-1!==r&&(Re=te(n.substr(r+1,n.length)),n=n.substr(0,r));var o=Object.keys(t),i=o.indexOf(n);if(-1!==i)return a.mount(e,t[o[i]]),!0;for(var s in t){if(s===n)return a.mount(e,t[s]),!0;var l=new RegExp("^"+s.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(l.test(n))return n.replace(l,function(){var n=s.match(/:[^\/]+/g)||[],r=[].slice.call(arguments,1,-2);u(n,function(e,t){Re[e.replace(/:|\./g,"")]=decodeURIComponent(r[t])}),a.mount(e,t[s])}),!0}}function J(e){if(e=e||event,!e.ctrlKey&&!e.metaKey&&2!==e.which){e.preventDefault?e.preventDefault():e.returnValue=!1;for(var t=e.currentTarget||e.srcElement,n="pathname"===a.route.mode&&t.search?te(t.search.slice(1)):{};t&&"A"!==t.nodeName.toUpperCase();)t=t.parentNode;a.route(t[a.route.mode].slice(Fe[a.route.mode].length),n)}}function Q(){"hash"!==a.route.mode&&ce.hash?ce.hash=ce.hash:t.scrollTo(0,0)}function ee(e,t){var r={},i=[];for(var s in e){var a=t?t+"["+s+"]":s,l=e[s];if(null===l)i.push(encodeURIComponent(a));else if(o(l))i.push(ee(l,a));else if(he(l)){var c=[];r[a]=r[a]||{},u(l,function(e){r[a][e]||(r[a][e]=!0,c.push(encodeURIComponent(a)+"="+encodeURIComponent(e)))}),i.push(c.join("&"))}else l!==n&&i.push(encodeURIComponent(a)+"="+encodeURIComponent(l))}return i.join("&")}function te(e){if(""===e||null==e)return{};"?"===e.charAt(0)&&(e=e.slice(1));var t=e.split("&"),n={};return u(t,function(e){var t=e.split("="),r=decodeURIComponent(t[0]),o=2===t.length?decodeURIComponent(t[1]):null;null!=n[r]?(he(n[r])||(n[r]=[n[r]]),n[r].push(o)):n[r]=o}),n}function ne(e){var t=z(e);U(e.childNodes,Se[t]),Se[t]=n}function re(e,t){var n=a.prop(t);return e.then(n),n.then=function(n,r){return re(e.then(n,r),t)},n["catch"]=n.then.bind(null,null),n["finally"]=function(e){var r=function(t){return a.deferred().resolve(e(t)).promise};return n.then(function(e){return re(r(e).then(function(){return e}),t)},function(e){return re(r(e).then(function(){throw new Error(e)}),t)})},n}function oe(e,t){function n(e){d=e||f,m.map(function(e){d===c?e.resolve(h):e.reject(h)})}function i(e,t,n,i){if((null!=h&&o(h)||r(h))&&r(e))try{var s=0;e.call(h,function(e){s++||(h=e,t())},function(e){s++||(h=e,n())})}catch(u){a.deferred.onerror(u),h=u,n()}else i()}function s(){var o;try{o=h&&h.then}catch(f){return a.deferred.onerror(f),h=f,d=l,s()}i(o,function(){d=u,s()},function(){d=l,s()},function(){try{d===u&&r(e)?h=e(h):d===l&&r(t)&&(h=t(h),d=u)}catch(s){return a.deferred.onerror(s),h=s,n()}h===p?(h=TypeError(),n()):i(o,function(){n(c)},n,function(){n(d===u&&c)})})}var u=1,l=2,c=3,f=4,p=this,d=0,h=0,m=[];p.promise={},p.resolve=function(e){return d||(h=e,d=u,s()),this},p.reject=function(e){return d||(h=e,d=l,s()),this},p.promise.then=function(e,t){var n=new oe(e,t);return d===c?n.resolve(h):d===f?n.reject(h):m.push(n),n.promise}}function ie(e){return e}function se(e){if(!e.dataType||"jsonp"!==e.dataType.toLowerCase()){var o=new t.XMLHttpRequest;if(o.open(e.method,e.url,!0,e.user,e.password),o.onreadystatechange=function(){4===o.readyState&&(o.status>=200&&o.status<300?e.onload({type:"load",target:o}):e.onerror({type:"error",target:o}))},e.serialize===JSON.stringify&&e.data&&"GET"!==e.method&&o.setRequestHeader("Content-Type","application/json; charset=utf-8"),e.deserialize===JSON.parse&&o.setRequestHeader("Accept","application/json, text/*"),r(e.config)){var s=e.config(o,e);null!=s&&(o=s)}var a="GET"!==e.method&&e.data?e.data:"";if(a&&!i(a)&&a.constructor!==t.FormData)throw new Error("Request data should be either be a string or FormData. Check the `serialize` option in `m.request`");return o.send(a),o}var u="mithril_callback_"+(new Date).getTime()+"_"+Math.round(1e16*Math.random()).toString(36),l=le.createElement("script");t[u]=function(r){l.parentNode.removeChild(l),e.onload({type:"load",target:{responseText:r}}),t[u]=n},l.onerror=function(){return l.parentNode.removeChild(l),e.onerror({type:"error",target:{status:500,responseText:JSON.stringify({error:"Error making jsonp request"})}}),t[u]=n,!1},l.onload=function(){return!1},l.src=e.url+(e.url.indexOf("?")>0?"&":"?")+(e.callbackKey?e.callbackKey:"callback")+"="+u+"&"+ee(e.data||{}),le.body.appendChild(l)}function ae(e,t,n){if("GET"===e.method&&"jsonp"!==e.dataType){var r=e.url.indexOf("?")<0?"?":"&",o=ee(t);e.url=e.url+(o?r+o:"")}else e.data=n(t);return e}function ue(e,t){var n=e.match(/:[a-z]\w+/gi);return n&&t&&u(n,function(n){var r=n.slice(1);e=e.replace(n,t[r]),delete t[r]}),e}var le,ce,fe,pe,de="v0.2.1",he=Array.isArray||function(e){return"[object Array]"===me.call(e)},me={}.toString,ge=/(?:(^|#|\.)([^#\.\[\]]+))|(\[.+?\])/g,ve=/\[(.+?)(?:=("|'|)(.*?)\2)?\]/,ye=/^(AREA|BASE|BR|COL|COMMAND|EMBED|HR|IMG|INPUT|KEYGEN|LINK|META|PARAM|SOURCE|TRACK|WBR)$/,be=function(){};s(t),a.version=function(){return de};var we,ke=1,Ce=2,xe=3,_e={appendChild:function(e){we===n&&(we=le.createElement("html")),le.documentElement&&le.documentElement!==e?le.replaceChild(e,le.documentElement):le.appendChild(e),this.childNodes=le.childNodes},insertBefore:function(e){this.appendChild(e)},childNodes:[]},Ne=[],Se={};a.render=function(e,t,r){var o=[];if(!e)throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var i=z(e),s=e===le,a=s||e===le.documentElement?_e:e;s&&"html"!==t.tag&&(t={tag:"html",attrs:{},children:t}),Se[i]===n&&U(a.childNodes),r===!0&&ne(e),Se[i]=$(a,null,n,n,t,Se[i],!1,0,null,n,o),u(o,function(e){e()})},a.trust=function(e){return e=new String(e),e.$trusted=!0,e},a.prop=function(e){return(null!=e&&o(e)||r(e))&&r(e.then)?re(e):W(e)};var Te,De=[],Pe=[],He=[],Ee=null,Oe=0,Me=null,Ae=null,Ie=[],je=16;a.component=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);return G(e,t)},a.mount=a.module=function(e,t){if(!e)throw new Error("Please ensure the DOM element exists before rendering a template into it.");var n=De.indexOf(e);0>n&&(n=De.length);var o=!1,i={preventDefault:function(){o=!0,Me=Ae=null}};if(u(Ie,function(e){e.handler.call(e.controller,i),e.controller.onunload=null}),o?u(Ie,function(e){e.controller.onunload=e.handler}):Ie=[],He[n]&&r(He[n].onunload)&&He[n].onunload(i),!o){a.redraw.strategy("all"),a.startComputation(),De[n]=e;var s=Te=t?t:t={controller:be},l=new(t.controller||be);return s===Te&&(He[n]=l,Pe[n]=t),V(),He[n]}t||(De.splice(n,1),He.splice(n,1),Pe.splice(n,1))};var Le=!1,$e=!1;a.redraw=function(e){if(!Le){Le=!0,e&&($e=!0);try{Ee&&!e?(fe===t.requestAnimationFrame||new Date-Oe>je)&&(Ee>0&&pe(Ee),Ee=fe(X,je)):(X(),console.log("redraw..."),Ee=fe(function(){Ee=null},je))}finally{Le=$e=!1}}},a.redraw.strategy=a.prop();var Be=0;a.startComputation=function(){Be++},a.endComputation=function(){Be>1?Be--:(Be=0,a.redraw())},a.withAttr=function(e,t){return function(n){n=n||event;var r=n.currentTarget||this;t(e in r?r[e]:r.getAttribute(e))}};var Re,Ue,Fe={pathname:"",hash:"#",search:"?"},Ye=be,qe=!1;return a.route=function(e,n,r,o){if(0===arguments.length)return Ue;if(3===arguments.length&&i(n)){Ye=function(t){var o=Ue=K(t);if(!Z(e,r,o)){if(qe)throw new Error("Ensure the default route matches one of the routes defined in m.route");qe=!0,a.route(n,!0),qe=!1}};var s="hash"===a.route.mode?"onhashchange":"onpopstate";t[s]=function(){var e=ce[a.route.mode];"pathname"===a.route.mode&&(e+=ce.search),Ue!==K(e)&&Ye(e)},Me=Q,t[s]()}else if(e.addEventListener||e.attachEvent)e.href=("pathname"!==a.route.mode?ce.pathname:"")+Fe[a.route.mode]+o.attrs.href,e.addEventListener?(e.removeEventListener("click",J),e.addEventListener("click",J)):(e.detachEvent("onclick",J),e.attachEvent("onclick",J));else if(i(e)){var u=Ue;Ue=e;var l=n||{},c=Ue.indexOf("?"),f=c>-1?te(Ue.slice(c+1)):{};for(var p in l)f[p]=l[p];var d=ee(f),h=c>-1?Ue.slice(0,c):Ue;d&&(Ue=h+(-1===h.indexOf("?")?"?":"&")+d);var m=(3===arguments.length?r:n)===!0||u===e;t.history.pushState?(Me=Q,Ae=function(){t.history[m?"replaceState":"pushState"](null,le.title,Fe[a.route.mode]+Ue)},Ye(Fe[a.route.mode]+Ue)):(ce[a.route.mode]=Ue,Ye(Fe[a.route.mode]+Ue))}},a.route.param=function(e){if(!Re)throw new Error("You must call m.route(element, defaultRoute, routes) before calling m.route.param()");return Re[e]},a.route.mode="search",a.route.buildQueryString=ee,a.route.parseQueryString=te,a.deferred=function(){var e=new oe;return e.promise=re(e.promise),e},a.deferred.onerror=function(e){if("[object Error]"===me.call(e)&&!e.constructor.toString().match(/ Error/))throw Be=0,e},a.sync=function(e){function t(e,t){return function(s){return i[e]=s,t||(n="reject"),0===--o&&(r.promise(i),r[n](i)),s}}var n="resolve",r=a.deferred(),o=e.length,i=new Array(o);return e.length>0?u(e,function(e,n){e.then(t(n,!0),t(n,!1))}):r.resolve([]),r.promise},a.request=function(e){e.background!==!0&&a.startComputation();var t=new oe,n=e.dataType&&"jsonp"===e.dataType.toLowerCase(),r=e.serialize=n?ie:e.serialize||JSON.stringify,o=e.deserialize=n?ie:e.deserialize||JSON.parse,i=n?function(e){return e.responseText}:e.extract||function(e){return 0===e.responseText.length&&o===JSON.parse?null:e.responseText};return e.method=(e.method||"GET").toUpperCase(),e.url=ue(e.url,e.data),e=ae(e,e.data,r),e.onload=e.onerror=function(n){try{n=n||event;var r=("load"===n.type?e.unwrapSuccess:e.unwrapError)||ie,s=r(o(i(n.target,e)),n.target);"load"===n.type&&(he(s)&&e.type?u(s,function(t,n){s[n]=new e.type(t)}):e.type&&(s=new e.type(s))),t["load"===n.type?"resolve":"reject"](s)}catch(n){a.deferred.onerror(n),t.reject(n)}e.background!==!0&&a.endComputation()},se(e),t.promise=re(t.promise,e.initialValue),t.promise},a.deps=function(e){return s(t=e||t),t},a.deps.factory=e,a}("undefined"!=typeof window?window:{});"object"==typeof module&&null!=module&&module.exports?module.exports=m:"function"==typeof define&&define.amd&&define(function(){return m}),function(e){"function"==typeof define&&define.amd?define(["mithril"],e):"object"==typeof exports?module.exports=e(require("mithril")):e(m)}(function(e){function t(e,t){var n="select"===e.tag?e.attrs.multi?"multi":"select":e.attrs.type;return"multi"===n?e.attrs.onchange=function(){t([].slice.call(this.selectedOptions,function(e){return e.value}))}:"select"===n?e.attrs.onchange=function(e){t(this.selectedOptions[0].value)}:"checkbox"===n?e.attrs.onchange=function(e){t(this.checked)}:e.attrs.onchange=e.attrs.oninput=function(e){t(this.value)},"select"===e.tag?e.children.forEach(function(e){(e.attrs.value===t()||e.children[0]===t())&&(e.attrs.selected=!0)}):"checkbox"===n?e.attrs.checked=t():"radio"===n?e.attrs.checked=t()===e.attrs.value:e.attrs.value=t(),e}return t.view=function(e,n,r){return t(n,n.attrs.bidi)},e.attrs&&(e.attrs.bidi=t),e.bidi=t,t}),function(e,t){"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){function n(e){var t="length"in e&&e.length,n=Q.type(e);return"function"===n||Q.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t,n){if(Q.isFunction(t))return Q.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return Q.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ae.test(t))return Q.filter(t,e,n);t=Q.filter(t,e)}return Q.grep(e,function(e){return W.call(t,e)>=0!==n})}function o(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function i(e){var t=he[e]={};return Q.each(e.match(de)||[],function(e,n){t[n]=!0}),t}function s(){Z.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1),Q.ready()}function a(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=Q.expando+a.uid++}function u(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(we,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:be.test(n)?Q.parseJSON(n):n}catch(o){}ye.set(e,t,n)}else n=void 0;return n}function l(){return!0}function c(){return!1}function f(){try{return Z.activeElement}catch(e){}}function p(e,t){return Q.nodeName(e,"table")&&Q.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function d(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function h(e){var t=je.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n=0,r=e.length;r>n;n++)ve.set(e[n],"globalEval",!t||ve.get(t[n],"globalEval"))}function g(e,t){var n,r,o,i,s,a,u,l;if(1===t.nodeType){if(ve.hasData(e)&&(i=ve.access(e),s=ve.set(t,i),l=i.events)){delete s.handle,s.events={};for(o in l)for(n=0,r=l[o].length;r>n;n++)Q.event.add(t,o,l[o][n])}ye.hasData(e)&&(a=ye.access(e),u=Q.extend({},a),ye.set(t,u))}}function v(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&Q.nodeName(e,t)?Q.merge([e],n):n}function y(e,t){var n=t.nodeName.toLowerCase();"input"===n&&_e.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function b(t,n){var r,o=Q(n.createElement(t)).appendTo(n.body),i=e.getDefaultComputedStyle&&(r=e.getDefaultComputedStyle(o[0]))?r.display:Q.css(o[0],"display");return o.detach(),i}function w(e){var t=Z,n=Re[e];return n||(n=b(e,t),"none"!==n&&n||(Be=(Be||Q("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=Be[0].contentDocument,t.write(),t.close(),n=b(e,t),Be.detach()),Re[e]=n),n}function k(e,t,n){var r,o,i,s,a=e.style;return n=n||Ye(e),n&&(s=n.getPropertyValue(t)||n[t]),n&&(""!==s||Q.contains(e.ownerDocument,e)||(s=Q.style(e,t)),Fe.test(s)&&Ue.test(t)&&(r=a.width,o=a.minWidth,i=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=o,a.maxWidth=i)),void 0!==s?s+"":s}function C(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function x(e,t){if(t in e)return t;for(var n=t[0].toUpperCase()+t.slice(1),r=t,o=Ve.length;o--;)if(t=Ve[o]+n,t in e)return t;return r}function _(e,t,n){var r=ze.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function N(e,t,n,r,o){for(var i=n===(r?"border":"content")?4:"width"===t?1:0,s=0;4>i;i+=2)"margin"===n&&(s+=Q.css(e,n+Ce[i],!0,o)),r?("content"===n&&(s-=Q.css(e,"padding"+Ce[i],!0,o)),"margin"!==n&&(s-=Q.css(e,"border"+Ce[i]+"Width",!0,o))):(s+=Q.css(e,"padding"+Ce[i],!0,o),"padding"!==n&&(s+=Q.css(e,"border"+Ce[i]+"Width",!0,o)));return s}function S(e,t,n){var r=!0,o="width"===t?e.offsetWidth:e.offsetHeight,i=Ye(e),s="border-box"===Q.css(e,"boxSizing",!1,i);if(0>=o||null==o){if(o=k(e,t,i),(0>o||null==o)&&(o=e.style[t]),Fe.test(o))return o;r=s&&(K.boxSizingReliable()||o===e.style[t]),o=parseFloat(o)||0}return o+N(e,t,n||(s?"border":"content"),r,i)+"px"}function T(e,t){for(var n,r,o,i=[],s=0,a=e.length;a>s;s++)r=e[s],r.style&&(i[s]=ve.get(r,"olddisplay"),n=r.style.display,t?(i[s]||"none"!==n||(r.style.display=""),""===r.style.display&&xe(r)&&(i[s]=ve.access(r,"olddisplay",w(r.nodeName)))):(o=xe(r),"none"===n&&o||ve.set(r,"olddisplay",o?n:Q.css(r,"display"))));
for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?i[s]||"":"none"));return e}function D(e,t,n,r,o){return new D.prototype.init(e,t,n,r,o)}function P(){return setTimeout(function(){Ke=void 0}),Ke=Q.now()}function H(e,t){var n,r=0,o={height:e};for(t=t?1:0;4>r;r+=2-t)n=Ce[r],o["margin"+n]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function E(e,t,n){for(var r,o=(nt[t]||[]).concat(nt["*"]),i=0,s=o.length;s>i;i++)if(r=o[i].call(n,t,e))return r}function O(e,t,n){var r,o,i,s,a,u,l,c,f=this,p={},d=e.style,h=e.nodeType&&xe(e),m=ve.get(e,"fxshow");n.queue||(a=Q._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,u=a.empty.fire,a.empty.fire=function(){a.unqueued||u()}),a.unqueued++,f.always(function(){f.always(function(){a.unqueued--,Q.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],l=Q.css(e,"display"),c="none"===l?ve.get(e,"olddisplay")||w(e.nodeName):l,"inline"===c&&"none"===Q.css(e,"float")&&(d.display="inline-block")),n.overflow&&(d.overflow="hidden",f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(r in t)if(o=t[r],Je.exec(o)){if(delete t[r],i=i||"toggle"===o,o===(h?"hide":"show")){if("show"!==o||!m||void 0===m[r])continue;h=!0}p[r]=m&&m[r]||Q.style(e,r)}else l=void 0;if(Q.isEmptyObject(p))"inline"===("none"===l?w(e.nodeName):l)&&(d.display=l);else{m?"hidden"in m&&(h=m.hidden):m=ve.access(e,"fxshow",{}),i&&(m.hidden=!h),h?Q(e).show():f.done(function(){Q(e).hide()}),f.done(function(){var t;ve.remove(e,"fxshow");for(t in p)Q.style(e,t,p[t])});for(r in p)s=E(h?m[r]:0,r,f),r in m||(m[r]=s.start,h&&(s.end=s.start,s.start="width"===r||"height"===r?1:0))}}function M(e,t){var n,r,o,i,s;for(n in e)if(r=Q.camelCase(n),o=t[r],i=e[n],Q.isArray(i)&&(o=i[1],i=e[n]=i[0]),n!==r&&(e[r]=i,delete e[n]),s=Q.cssHooks[r],s&&"expand"in s){i=s.expand(i),delete e[r];for(n in i)n in e||(e[n]=i[n],t[n]=o)}else t[r]=o}function A(e,t,n){var r,o,i=0,s=tt.length,a=Q.Deferred().always(function(){delete u.elem}),u=function(){if(o)return!1;for(var t=Ke||P(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,i=1-r,s=0,u=l.tweens.length;u>s;s++)l.tweens[s].run(i);return a.notifyWith(e,[l,i,n]),1>i&&u?n:(a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:Q.extend({},t),opts:Q.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Ke||P(),duration:n.duration,tweens:[],createTween:function(t,n){var r=Q.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(o)return this;for(o=!0;r>n;n++)l.tweens[n].run(1);return t?a.resolveWith(e,[l,t]):a.rejectWith(e,[l,t]),this}}),c=l.props;for(M(c,l.opts.specialEasing);s>i;i++)if(r=tt[i].call(l,e,c,l.opts))return r;return Q.map(c,E,l),Q.isFunction(l.opts.start)&&l.opts.start.call(e,l),Q.fx.timer(Q.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function I(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,o=0,i=t.toLowerCase().match(de)||[];if(Q.isFunction(n))for(;r=i[o++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function j(e,t,n,r){function o(a){var u;return i[a]=!0,Q.each(e[a]||[],function(e,a){var l=a(t,n,r);return"string"!=typeof l||s||i[l]?s?!(u=l):void 0:(t.dataTypes.unshift(l),o(l),!1)}),u}var i={},s=e===bt;return o(t.dataTypes[0])||!i["*"]&&o("*")}function L(e,t){var n,r,o=Q.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:r||(r={}))[n]=t[n]);return r&&Q.extend(!0,e,r),e}function $(e,t,n){for(var r,o,i,s,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(o in a)if(a[o]&&a[o].test(r)){u.unshift(o);break}if(u[0]in n)i=u[0];else{for(o in n){if(!u[0]||e.converters[o+" "+u[0]]){i=o;break}s||(s=o)}i=i||s}return i?(i!==u[0]&&u.unshift(i),n[i]):void 0}function B(e,t,n,r){var o,i,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];for(i=c.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=i,i=c.shift())if("*"===i)i=u;else if("*"!==u&&u!==i){if(s=l[u+" "+i]||l["* "+i],!s)for(o in l)if(a=o.split(" "),a[1]===i&&(s=l[u+" "+a[0]]||l["* "+a[0]])){s===!0?s=l[o]:l[o]!==!0&&(i=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(f){return{state:"parsererror",error:s?f:"No conversion from "+u+" to "+i}}}return{state:"success",data:t}}function R(e,t,n,r){var o;if(Q.isArray(t))Q.each(t,function(t,o){n||_t.test(e)?r(e,o):R(e+"["+("object"==typeof o?t:"")+"]",o,n,r)});else if(n||"object"!==Q.type(t))r(e,t);else for(o in t)R(e+"["+o+"]",t[o],n,r)}function U(e){return Q.isWindow(e)?e:9===e.nodeType&&e.defaultView}var F=[],Y=F.slice,q=F.concat,z=F.push,W=F.indexOf,G={},X=G.toString,V=G.hasOwnProperty,K={},Z=e.document,J="2.1.4",Q=function(e,t){return new Q.fn.init(e,t)},ee=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,te=/^-ms-/,ne=/-([\da-z])/gi,re=function(e,t){return t.toUpperCase()};Q.fn=Q.prototype={jquery:J,constructor:Q,selector:"",length:0,toArray:function(){return Y.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:Y.call(this)},pushStack:function(e){var t=Q.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return Q.each(this,e,t)},map:function(e){return this.pushStack(Q.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(Y.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:z,sort:F.sort,splice:F.splice},Q.extend=Q.fn.extend=function(){var e,t,n,r,o,i,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||Q.isFunction(s)||(s={}),a===u&&(s=this,a--);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(Q.isPlainObject(r)||(o=Q.isArray(r)))?(o?(o=!1,i=n&&Q.isArray(n)?n:[]):i=n&&Q.isPlainObject(n)?n:{},s[t]=Q.extend(l,i,r)):void 0!==r&&(s[t]=r));return s},Q.extend({expando:"jQuery"+(J+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===Q.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!Q.isArray(e)&&e-parseFloat(e)+1>=0},isPlainObject:function(e){return"object"!==Q.type(e)||e.nodeType||Q.isWindow(e)?!1:e.constructor&&!V.call(e.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?G[X.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=Q.trim(e),e&&(1===e.indexOf("use strict")?(t=Z.createElement("script"),t.text=e,Z.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(te,"ms-").replace(ne,re)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var o,i=0,s=e.length,a=n(e);if(r){if(a)for(;s>i&&(o=t.apply(e[i],r),o!==!1);i++);else for(i in e)if(o=t.apply(e[i],r),o===!1)break}else if(a)for(;s>i&&(o=t.call(e[i],i,e[i]),o!==!1);i++);else for(i in e)if(o=t.call(e[i],i,e[i]),o===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ee,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?Q.merge(r,"string"==typeof e?[e]:e):z.call(r,e)),r},inArray:function(e,t,n){return null==t?-1:W.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,o=e.length;n>r;r++)e[o++]=t[r];return e.length=o,e},grep:function(e,t,n){for(var r,o=[],i=0,s=e.length,a=!n;s>i;i++)r=!t(e[i],i),r!==a&&o.push(e[i]);return o},map:function(e,t,r){var o,i=0,s=e.length,a=n(e),u=[];if(a)for(;s>i;i++)o=t(e[i],i,r),null!=o&&u.push(o);else for(i in e)o=t(e[i],i,r),null!=o&&u.push(o);return q.apply([],u)},guid:1,proxy:function(e,t){var n,r,o;return"string"==typeof t&&(n=e[t],t=e,e=n),Q.isFunction(e)?(r=Y.call(arguments,2),o=function(){return e.apply(t||this,r.concat(Y.call(arguments)))},o.guid=e.guid=e.guid||Q.guid++,o):void 0},now:Date.now,support:K}),Q.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){G["[object "+t+"]"]=t.toLowerCase()});var oe=function(e){function t(e,t,n,r){var o,i,s,a,u,l,f,d,h,m;if((t?t.ownerDocument||t:R)!==O&&E(t),t=t||O,n=n||[],a=t.nodeType,"string"!=typeof e||!e||1!==a&&9!==a&&11!==a)return n;if(!r&&A){if(11!==a&&(o=ye.exec(e)))if(s=o[1]){if(9===a){if(i=t.getElementById(s),!i||!i.parentNode)return n;if(i.id===s)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(s))&&$(t,i)&&i.id===s)return n.push(i),n}else{if(o[2])return J.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&k.getElementsByClassName)return J.apply(n,t.getElementsByClassName(s)),n}if(k.qsa&&(!I||!I.test(e))){if(d=f=B,h=t,m=1!==a&&e,1===a&&"object"!==t.nodeName.toLowerCase()){for(l=N(e),(f=t.getAttribute("id"))?d=f.replace(we,"\\$&"):t.setAttribute("id",d),d="[id='"+d+"'] ",u=l.length;u--;)l[u]=d+p(l[u]);h=be.test(e)&&c(t.parentNode)||t,m=l.join(",")}if(m)try{return J.apply(n,h.querySelectorAll(m)),n}catch(g){}finally{f||t.removeAttribute("id")}}}return T(e.replace(ue,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>C.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[B]=!0,e}function o(e){var t=O.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function i(e,t){for(var n=e.split("|"),r=e.length;r--;)C.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||G)-(~e.sourceIndex||G);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var o,i=e([],n.length,t),s=i.length;s--;)n[o=i[s]]&&(n[o]=!(r[o]=n[o]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function p(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,o=n&&"parentNode"===r,i=F++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var a,u,l=[U,i];if(s){for(;t=t[r];)if((1===t.nodeType||o)&&e(t,n,s))return!0}else for(;t=t[r];)if(1===t.nodeType||o){if(u=t[B]||(t[B]={}),(a=u[r])&&a[0]===U&&a[1]===i)return l[2]=a[2];if(u[r]=l,l[2]=e(t,n,s))return!0}}}function h(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function m(e,n,r){for(var o=0,i=n.length;i>o;o++)t(e,n[o],r);return r}function g(e,t,n,r,o){for(var i,s=[],a=0,u=e.length,l=null!=t;u>a;a++)(i=e[a])&&(!n||n(i,r,o))&&(s.push(i),l&&t.push(a));return s}function v(e,t,n,o,i,s){return o&&!o[B]&&(o=v(o)),i&&!i[B]&&(i=v(i,s)),r(function(r,s,a,u){var l,c,f,p=[],d=[],h=s.length,v=r||m(t||"*",a.nodeType?[a]:a,[]),y=!e||!r&&t?v:g(v,p,e,a,u),b=n?i||(r?e:h||o)?[]:s:y;if(n&&n(y,b,a,u),o)for(l=g(b,d),o(l,[],a,u),c=l.length;c--;)(f=l[c])&&(b[d[c]]=!(y[d[c]]=f));if(r){if(i||e){if(i){for(l=[],c=b.length;c--;)(f=b[c])&&l.push(y[c]=f);i(null,b=[],l,u)}for(c=b.length;c--;)(f=b[c])&&(l=i?ee(r,f):p[c])>-1&&(r[l]=!(s[l]=f))}}else b=g(b===s?b.splice(h,b.length):b),i?i(null,s,b,u):J.apply(s,b)})}function y(e){for(var t,n,r,o=e.length,i=C.relative[e[0].type],s=i||C.relative[" "],a=i?1:0,u=d(function(e){return e===t},s,!0),l=d(function(e){return ee(t,e)>-1},s,!0),c=[function(e,n,r){var o=!i&&(r||n!==D)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,o}];o>a;a++)if(n=C.relative[e[a].type])c=[d(h(c),n)];else{if(n=C.filter[e[a].type].apply(null,e[a].matches),n[B]){for(r=++a;o>r&&!C.relative[e[r].type];r++);return v(a>1&&h(c),a>1&&p(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ue,"$1"),n,r>a&&y(e.slice(a,r)),o>r&&y(e=e.slice(r)),o>r&&p(e))}c.push(n)}return h(c)}function b(e,n){var o=n.length>0,i=e.length>0,s=function(r,s,a,u,l){var c,f,p,d=0,h="0",m=r&&[],v=[],y=D,b=r||i&&C.find.TAG("*",l),w=U+=null==y?1:Math.random()||.1,k=b.length;for(l&&(D=s!==O&&s);h!==k&&null!=(c=b[h]);h++){if(i&&c){for(f=0;p=e[f++];)if(p(c,s,a)){u.push(c);break}l&&(U=w)}o&&((c=!p&&c)&&d--,r&&m.push(c))}if(d+=h,o&&h!==d){for(f=0;p=n[f++];)p(m,v,s,a);if(r){if(d>0)for(;h--;)m[h]||v[h]||(v[h]=K.call(u));v=g(v)}J.apply(u,v),l&&!r&&v.length>0&&d+n.length>1&&t.uniqueSort(u)}return l&&(U=w,D=y),m};return o?r(s):s}var w,k,C,x,_,N,S,T,D,P,H,E,O,M,A,I,j,L,$,B="sizzle"+1*new Date,R=e.document,U=0,F=0,Y=n(),q=n(),z=n(),W=function(e,t){return e===t&&(H=!0),0},G=1<<31,X={}.hasOwnProperty,V=[],K=V.pop,Z=V.push,J=V.push,Q=V.slice,ee=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe=re.replace("w","w#"),ie="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+oe+"))|)"+ne+"*\\]",se=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),ue=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ce=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),fe=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),pe=new RegExp(se),de=new RegExp("^"+oe+"$"),he={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re.replace("w","w*")+")"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+se),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},me=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,be=/[+~]/,we=/'|\\/g,ke=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),Ce=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},xe=function(){E()};try{J.apply(V=Q.call(R.childNodes),R.childNodes),V[R.childNodes.length].nodeType}catch(_e){J={apply:V.length?function(e,t){Z.apply(e,Q.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}k=t.support={},_=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},E=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:R;return r!==O&&9===r.nodeType&&r.documentElement?(O=r,M=r.documentElement,n=r.defaultView,n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",xe,!1):n.attachEvent&&n.attachEvent("onunload",xe)),A=!_(r),k.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),k.getElementsByTagName=o(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),k.getElementsByClassName=ve.test(r.getElementsByClassName),k.getById=o(function(e){return M.appendChild(e).id=B,!r.getElementsByName||!r.getElementsByName(B).length}),k.getById?(C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&A){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},C.filter.ID=function(e){var t=e.replace(ke,Ce);return function(e){return e.getAttribute("id")===t}}):(delete C.find.ID,C.filter.ID=function(e){var t=e.replace(ke,Ce);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=k.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):k.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},C.find.CLASS=k.getElementsByClassName&&function(e,t){return A?t.getElementsByClassName(e):void 0},j=[],I=[],(k.qsa=ve.test(r.querySelectorAll))&&(o(function(e){M.appendChild(e).innerHTML="<a id='"+B+"'></a><select id='"+B+"-\f]' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&I.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||I.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+B+"-]").length||I.push("~="),e.querySelectorAll(":checked").length||I.push(":checked"),e.querySelectorAll("a#"+B+"+*").length||I.push(".#.+[+~]")}),o(function(e){var t=r.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&I.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||I.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),I.push(",.*:")})),(k.matchesSelector=ve.test(L=M.matches||M.webkitMatchesSelector||M.mozMatchesSelector||M.oMatchesSelector||M.msMatchesSelector))&&o(function(e){k.disconnectedMatch=L.call(e,"div"),L.call(e,"[s!='']:x"),j.push("!=",se)}),I=I.length&&new RegExp(I.join("|")),j=j.length&&new RegExp(j.join("|")),t=ve.test(M.compareDocumentPosition),$=t||ve.test(M.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},W=t?function(e,t){if(e===t)return H=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!k.sortDetached&&t.compareDocumentPosition(e)===n?e===r||e.ownerDocument===R&&$(R,e)?-1:t===r||t.ownerDocument===R&&$(R,t)?1:P?ee(P,e)-ee(P,t):0:4&n?-1:1)}:function(e,t){if(e===t)return H=!0,0;var n,o=0,i=e.parentNode,a=t.parentNode,u=[e],l=[t];if(!i||!a)return e===r?-1:t===r?1:i?-1:a?1:P?ee(P,e)-ee(P,t):0;if(i===a)return s(e,t);for(n=e;n=n.parentNode;)u.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;u[o]===l[o];)o++;return o?s(u[o],l[o]):u[o]===R?-1:l[o]===R?1:0},r):O},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==O&&E(e),n=n.replace(fe,"='$1']"),k.matchesSelector&&A&&(!j||!j.test(n))&&(!I||!I.test(n)))try{var r=L.call(e,n);if(r||k.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(o){}return t(n,O,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==O&&E(e),$(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==O&&E(e);var n=C.attrHandle[t.toLowerCase()],r=n&&X.call(C.attrHandle,t.toLowerCase())?n(e,t,!A):void 0;return void 0!==r?r:k.attributes||!A?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,o=0;if(H=!k.detectDuplicates,P=!k.sortStable&&e.slice(0),e.sort(W),H){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return P=null,e},x=t.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+=x(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=x(t);return n},C=t.selectors={cacheLength:50,createPseudo:r,match:he,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(ke,Ce),e[3]=(e[3]||e[4]||e[5]||"").replace(ke,Ce),"~="===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]||t.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]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&pe.test(n)&&(t=N(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(ke,Ce).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Y[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&Y(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(o){var i=t.attr(o,e);return null==i?"!="===n:n?(i+="","="===n?i===r:"!="===n?i!==r:"^="===n?r&&0===i.indexOf(r):"*="===n?r&&i.indexOf(r)>-1:"$="===n?r&&i.slice(-r.length)===r:"~="===n?(" "+i.replace(ae," ")+" ").indexOf(r)>-1:"|="===n?i===r||i.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,m=i!==s?"nextSibling":"previousSibling",g=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!u&&!a;if(g){if(i){for(;m;){for(f=t;f=f[m];)if(a?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?g.firstChild:g.lastChild],s&&y){for(c=g[B]||(g[B]={}),l=c[e]||[],d=l[0]===U&&l[1],p=l[0]===U&&l[2],f=d&&g.childNodes[d];f=++d&&f&&f[m]||(p=d=0)||h.pop();)if(1===f.nodeType&&++p&&f===t){c[e]=[U,d,p];break}}else if(y&&(l=(t[B]||(t[B]={}))[e])&&l[0]===U)p=l[1];else for(;(f=++d&&f&&f[m]||(p=d=0)||h.pop())&&((a?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++p||(y&&((f[B]||(f[B]={}))[e]=[U,p]),f!==t)););return p-=o,p===r||p%r===0&&p/r>=0}}},PSEUDO:function(e,n){var o,i=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return i[B]?i(n):i.length>1?(o=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,o=i(e,n),s=o.length;s--;)r=ee(e,o[s]),e[r]=!(t[r]=o[s])}):function(e){return i(e,0,o)}):i}},pseudos:{not:r(function(e){var t=[],n=[],o=S(e.replace(ue,"$1"));return o[B]?r(function(e,t,n,r){for(var i,s=o(e,null,r,[]),a=e.length;a--;)(i=s[a])&&(e[a]=!(t[a]=i))}):function(e,r,i){return t[0]=e,o(t,null,i,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(ke,Ce),function(t){return(t.textContent||t.innerText||x(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ke,Ce).toLowerCase(),function(t){var n;do if(n=A?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===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===M},focus:function(e){return e===O.activeElement&&(!O.hasFocus||O.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return me.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:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[0>n?n+t:n]}),even:l(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},C.pseudos.nth=C.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[w]=a(w);for(w in{submit:!0,reset:!0})C.pseudos[w]=u(w);return f.prototype=C.filters=C.pseudos,C.setFilters=new f,N=t.tokenize=function(e,n){var r,o,i,s,a,u,l,c=q[e+" "];if(c)return n?0:c.slice(0);for(a=e,u=[],l=C.preFilter;a;){(!r||(o=le.exec(a)))&&(o&&(a=a.slice(o[0].length)||a),u.push(i=[])),r=!1,(o=ce.exec(a))&&(r=o.shift(),i.push({value:r,type:o[0].replace(ue," ")}),a=a.slice(r.length));for(s in C.filter)!(o=he[s].exec(a))||l[s]&&!(o=l[s](o))||(r=o.shift(),i.push({value:r,type:s,matches:o}),a=a.slice(r.length));if(!r)break}return n?a.length:a?t.error(e):q(e,u).slice(0)},S=t.compile=function(e,t){var n,r=[],o=[],i=z[e+" "];if(!i){for(t||(t=N(e)),n=t.length;n--;)i=y(t[n]),i[B]?r.push(i):o.push(i);i=z(e,b(o,r)),i.selector=e}return i},T=t.select=function(e,t,n,r){var o,i,s,a,u,l="function"==typeof e&&e,f=!r&&N(e=l.selector||e);if(n=n||[],1===f.length){if(i=f[0]=f[0].slice(0),i.length>2&&"ID"===(s=i[0]).type&&k.getById&&9===t.nodeType&&A&&C.relative[i[1].type]){if(t=(C.find.ID(s.matches[0].replace(ke,Ce),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=he.needsContext.test(e)?0:i.length;o--&&(s=i[o],!C.relative[a=s.type]);)if((u=C.find[a])&&(r=u(s.matches[0].replace(ke,Ce),be.test(i[0].type)&&c(t.parentNode)||t))){if(i.splice(o,1),e=r.length&&p(i),!e)return J.apply(n,r),n;break}}return(l||S(e,f))(r,t,!A,n,be.test(e)&&c(t.parentNode)||t),n},k.sortStable=B.split("").sort(W).join("")===B,k.detectDuplicates=!!H,E(),k.sortDetached=o(function(e){return 1&e.compareDocumentPosition(O.createElement("div"))}),o(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||i("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),k.attributes&&o(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||i("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||i(te,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);Q.find=oe,Q.expr=oe.selectors,Q.expr[":"]=Q.expr.pseudos,Q.unique=oe.uniqueSort,Q.text=oe.getText,Q.isXMLDoc=oe.isXML,Q.contains=oe.contains;var ie=Q.expr.match.needsContext,se=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ae=/^.[^:#\[\.,]*$/;Q.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?Q.find.matchesSelector(r,e)?[r]:[]:Q.find.matches(e,Q.grep(t,function(e){return 1===e.nodeType}))},Q.fn.extend({find:function(e){var t,n=this.length,r=[],o=this;if("string"!=typeof e)return this.pushStack(Q(e).filter(function(){for(t=0;n>t;t++)if(Q.contains(o[t],this))return!0}));for(t=0;n>t;t++)Q.find(e,o[t],r);return r=this.pushStack(n>1?Q.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&ie.test(e)?Q(e):e||[],!1).length}});var ue,le=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ce=Q.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:le.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||ue).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof Q?t[0]:t,Q.merge(this,Q.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:Z,!0)),se.test(n[1])&&Q.isPlainObject(t))for(n in t)Q.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return r=Z.getElementById(n[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=Z,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):Q.isFunction(e)?"undefined"!=typeof ue.ready?ue.ready(e):e(Q):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),Q.makeArray(e,this))};ce.prototype=Q.fn,ue=Q(Z);var fe=/^(?:parents|prev(?:Until|All))/,pe={children:!0,contents:!0,next:!0,prev:!0};Q.extend({dir:function(e,t,n){for(var r=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&Q(e).is(n))break;r.push(e)}return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),Q.fn.extend({has:function(e){var t=Q(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(Q.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,r=0,o=this.length,i=[],s=ie.test(e)||"string"!=typeof e?Q(e,t||this.context):0;o>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&Q.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?Q.unique(i):i)},index:function(e){return e?"string"==typeof e?W.call(Q(e),this[0]):W.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Q.unique(Q.merge(this.get(),Q(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Q.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Q.dir(e,"parentNode")},parentsUntil:function(e,t,n){return Q.dir(e,"parentNode",n)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return Q.dir(e,"nextSibling")},prevAll:function(e){return Q.dir(e,"previousSibling")},nextUntil:function(e,t,n){return Q.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return Q.dir(e,"previousSibling",n)},siblings:function(e){return Q.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return Q.sibling(e.firstChild)},contents:function(e){return e.contentDocument||Q.merge([],e.childNodes)}},function(e,t){Q.fn[e]=function(n,r){var o=Q.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=Q.filter(r,o)),this.length>1&&(pe[e]||Q.unique(o),fe.test(e)&&o.reverse()),this.pushStack(o)}});var de=/\S+/g,he={};Q.Callbacks=function(e){e="string"==typeof e?he[e]||i(e):Q.extend({},e);var t,n,r,o,s,a,u=[],l=!e.once&&[],c=function(i){for(t=e.memory&&i,n=!0,a=o||0,o=0,s=u.length,r=!0;u&&s>a;a++)if(u[a].apply(i[0],i[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,u&&(l?l.length&&c(l.shift()):t?u=[]:f.disable())},f={add:function(){if(u){var n=u.length;!function i(t){Q.each(t,function(t,n){var r=Q.type(n);"function"===r?e.unique&&f.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})}(arguments),r?s=u.length:t&&(o=n,c(t))}return this},remove:function(){return u&&Q.each(arguments,function(e,t){for(var n;(n=Q.inArray(t,u,n))>-1;)u.splice(n,1),r&&(s>=n&&s--,a>=n&&a--)}),this},has:function(e){return e?Q.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],s=0,this},disable:function(){return u=l=t=void 0,this},disabled:function(){return!u},lock:function(){return l=void 0,t||f.disable(),this},locked:function(){return!l},fireWith:function(e,t){return!u||n&&!l||(t=t||[],t=[e,t.slice?t.slice():t],r?l.push(t):c(t)),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!n}};return f},Q.extend({Deferred:function(e){var t=[["resolve","done",Q.Callbacks("once memory"),"resolved"],["reject","fail",Q.Callbacks("once memory"),"rejected"],["notify","progress",Q.Callbacks("memory")]],n="pending",r={
state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return Q.Deferred(function(n){Q.each(t,function(t,i){var s=Q.isFunction(e[t])&&e[t];o[i[1]](function(){var e=s&&s.apply(this,arguments);e&&Q.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[i[0]+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?Q.extend(e,r):r}},o={};return r.pipe=r.then,Q.each(t,function(e,i){var s=i[2],a=i[3];r[i[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),o[i[0]]=function(){return o[i[0]+"With"](this===o?r:this,arguments),this},o[i[0]+"With"]=s.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(e){var t,n,r,o=0,i=Y.call(arguments),s=i.length,a=1!==s||e&&Q.isFunction(e.promise)?s:0,u=1===a?e:Q.Deferred(),l=function(e,n,r){return function(o){n[e]=this,r[e]=arguments.length>1?Y.call(arguments):o,r===t?u.notifyWith(n,r):--a||u.resolveWith(n,r)}};if(s>1)for(t=new Array(s),n=new Array(s),r=new Array(s);s>o;o++)i[o]&&Q.isFunction(i[o].promise)?i[o].promise().done(l(o,r,i)).fail(u.reject).progress(l(o,n,t)):--a;return a||u.resolveWith(r,i),u.promise()}});var me;Q.fn.ready=function(e){return Q.ready.promise().done(e),this},Q.extend({isReady:!1,readyWait:1,holdReady:function(e){e?Q.readyWait++:Q.ready(!0)},ready:function(e){(e===!0?--Q.readyWait:Q.isReady)||(Q.isReady=!0,e!==!0&&--Q.readyWait>0||(me.resolveWith(Z,[Q]),Q.fn.triggerHandler&&(Q(Z).triggerHandler("ready"),Q(Z).off("ready"))))}}),Q.ready.promise=function(t){return me||(me=Q.Deferred(),"complete"===Z.readyState?setTimeout(Q.ready):(Z.addEventListener("DOMContentLoaded",s,!1),e.addEventListener("load",s,!1))),me.promise(t)},Q.ready.promise();var ge=Q.access=function(e,t,n,r,o,i,s){var a=0,u=e.length,l=null==n;if("object"===Q.type(n)){o=!0;for(a in n)Q.access(e,t,a,n[a],!0,i,s)}else if(void 0!==r&&(o=!0,Q.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(Q(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return o?e:l?t.call(e):u?t(e[0],n):i};Q.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},a.uid=1,a.accepts=Q.acceptData,a.prototype={key:function(e){if(!a.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=a.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,Q.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,o=this.key(e),i=this.cache[o];if("string"==typeof t)i[t]=n;else if(Q.isEmptyObject(i))Q.extend(this.cache[o],t);else for(r in t)i[r]=t[r];return i},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,n){var r;return void 0===t||t&&"string"==typeof t&&void 0===n?(r=this.get(e,t),void 0!==r?r:this.get(e,Q.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r,o,i=this.key(e),s=this.cache[i];if(void 0===t)this.cache[i]={};else{Q.isArray(t)?r=t.concat(t.map(Q.camelCase)):(o=Q.camelCase(t),t in s?r=[t,o]:(r=o,r=r in s?[r]:r.match(de)||[])),n=r.length;for(;n--;)delete s[r[n]]}},hasData:function(e){return!Q.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var ve=new a,ye=new a,be=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,we=/([A-Z])/g;Q.extend({hasData:function(e){return ye.hasData(e)||ve.hasData(e)},data:function(e,t,n){return ye.access(e,t,n)},removeData:function(e,t){ye.remove(e,t)},_data:function(e,t,n){return ve.access(e,t,n)},_removeData:function(e,t){ve.remove(e,t)}}),Q.fn.extend({data:function(e,t){var n,r,o,i=this[0],s=i&&i.attributes;if(void 0===e){if(this.length&&(o=ye.get(i),1===i.nodeType&&!ve.get(i,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=Q.camelCase(r.slice(5)),u(i,r,o[r])));ve.set(i,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each(function(){ye.set(this,e)}):ge(this,function(t){var n,r=Q.camelCase(e);if(i&&void 0===t){if(n=ye.get(i,e),void 0!==n)return n;if(n=ye.get(i,r),void 0!==n)return n;if(n=u(i,r,void 0),void 0!==n)return n}else this.each(function(){var n=ye.get(this,r);ye.set(this,r,t),-1!==e.indexOf("-")&&void 0!==n&&ye.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){ye.remove(this,e)})}}),Q.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=ve.get(e,t),n&&(!r||Q.isArray(n)?r=ve.access(e,t,Q.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=Q.queue(e,t),r=n.length,o=n.shift(),i=Q._queueHooks(e,t),s=function(){Q.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,s,i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ve.get(e,n)||ve.access(e,n,{empty:Q.Callbacks("once memory").add(function(){ve.remove(e,[t+"queue",n])})})}}),Q.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?Q.queue(this[0],e):void 0===t?this:this.each(function(){var n=Q.queue(this,e,t);Q._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&Q.dequeue(this,e)})},dequeue:function(e){return this.each(function(){Q.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,o=Q.Deferred(),i=this,s=this.length,a=function(){--r||o.resolveWith(i,[i])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)n=ve.get(i[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),o.promise(t)}});var ke=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ce=["Top","Right","Bottom","Left"],xe=function(e,t){return e=t||e,"none"===Q.css(e,"display")||!Q.contains(e.ownerDocument,e)},_e=/^(?:checkbox|radio)$/i;!function(){var e=Z.createDocumentFragment(),t=e.appendChild(Z.createElement("div")),n=Z.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),K.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",K.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Ne="undefined";K.focusinBubbles="onfocusin"in e;var Se=/^key/,Te=/^(?:mouse|pointer|contextmenu)|click/,De=/^(?:focusinfocus|focusoutblur)$/,Pe=/^([^.]*)(?:\.(.+)|)$/;Q.event={global:{},add:function(e,t,n,r,o){var i,s,a,u,l,c,f,p,d,h,m,g=ve.get(e);if(g)for(n.handler&&(i=n,n=i.handler,o=i.selector),n.guid||(n.guid=Q.guid++),(u=g.events)||(u=g.events={}),(s=g.handle)||(s=g.handle=function(t){return typeof Q!==Ne&&Q.event.triggered!==t.type?Q.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(de)||[""],l=t.length;l--;)a=Pe.exec(t[l])||[],d=m=a[1],h=(a[2]||"").split(".").sort(),d&&(f=Q.event.special[d]||{},d=(o?f.delegateType:f.bindType)||d,f=Q.event.special[d]||{},c=Q.extend({type:d,origType:m,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&Q.expr.match.needsContext.test(o),namespace:h.join(".")},i),(p=u[d])||(p=u[d]=[],p.delegateCount=0,f.setup&&f.setup.call(e,r,h,s)!==!1||e.addEventListener&&e.addEventListener(d,s,!1)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),o?p.splice(p.delegateCount++,0,c):p.push(c),Q.event.global[d]=!0)},remove:function(e,t,n,r,o){var i,s,a,u,l,c,f,p,d,h,m,g=ve.hasData(e)&&ve.get(e);if(g&&(u=g.events)){for(t=(t||"").match(de)||[""],l=t.length;l--;)if(a=Pe.exec(t[l])||[],d=m=a[1],h=(a[2]||"").split(".").sort(),d){for(f=Q.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=u[d]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=i=p.length;i--;)c=p[i],!o&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(i,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));s&&!p.length&&(f.teardown&&f.teardown.call(e,h,g.handle)!==!1||Q.removeEvent(e,d,g.handle),delete u[d])}else for(d in u)Q.event.remove(e,d+t[l],n,r,!0);Q.isEmptyObject(u)&&(delete g.handle,ve.remove(e,"events"))}},trigger:function(t,n,r,o){var i,s,a,u,l,c,f,p=[r||Z],d=V.call(t,"type")?t.type:t,h=V.call(t,"namespace")?t.namespace.split("."):[];if(s=a=r=r||Z,3!==r.nodeType&&8!==r.nodeType&&!De.test(d+Q.event.triggered)&&(d.indexOf(".")>=0&&(h=d.split("."),d=h.shift(),h.sort()),l=d.indexOf(":")<0&&"on"+d,t=t[Q.expando]?t:new Q.Event(d,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=h.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:Q.makeArray(n,[t]),f=Q.event.special[d]||{},o||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!o&&!f.noBubble&&!Q.isWindow(r)){for(u=f.delegateType||d,De.test(u+d)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(r.ownerDocument||Z)&&p.push(a.defaultView||a.parentWindow||e)}for(i=0;(s=p[i++])&&!t.isPropagationStopped();)t.type=i>1?u:f.bindType||d,c=(ve.get(s,"events")||{})[t.type]&&ve.get(s,"handle"),c&&c.apply(s,n),c=l&&s[l],c&&c.apply&&Q.acceptData(s)&&(t.result=c.apply(s,n),t.result===!1&&t.preventDefault());return t.type=d,o||t.isDefaultPrevented()||f._default&&f._default.apply(p.pop(),n)!==!1||!Q.acceptData(r)||l&&Q.isFunction(r[d])&&!Q.isWindow(r)&&(a=r[l],a&&(r[l]=null),Q.event.triggered=d,r[d](),Q.event.triggered=void 0,a&&(r[l]=a)),t.result}},dispatch:function(e){e=Q.event.fix(e);var t,n,r,o,i,s=[],a=Y.call(arguments),u=(ve.get(this,"events")||{})[e.type]||[],l=Q.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(s=Q.event.handlers.call(this,e,u),t=0;(o=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,n=0;(i=o.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((Q.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,a),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,o,i,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)i=t[n],o=i.selector+" ",void 0===r[o]&&(r[o]=i.needsContext?Q(o,this).index(u)>=0:Q.find(o,this,null,[u]).length),r[o]&&r.push(i);r.length&&s.push({elem:u,handlers:r})}return a<t.length&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,o,i=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||Z,r=n.documentElement,o=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||o&&o.scrollLeft||0)-(r&&r.clientLeft||o&&o.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||o&&o.scrollTop||0)-(r&&r.clientTop||o&&o.clientTop||0)),e.which||void 0===i||(e.which=1&i?1:2&i?3:4&i?2:0),e}},fix:function(e){if(e[Q.expando])return e;var t,n,r,o=e.type,i=e,s=this.fixHooks[o];for(s||(this.fixHooks[o]=s=Te.test(o)?this.mouseHooks:Se.test(o)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new Q.Event(i),t=r.length;t--;)n=r[t],e[n]=i[n];return e.target||(e.target=Z),3===e.target.nodeType&&(e.target=e.target.parentNode),s.filter?s.filter(e,i):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==f()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===f()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&Q.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return Q.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var o=Q.extend(new Q.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?Q.event.trigger(o,null,t):Q.event.dispatch.call(t,o),o.isDefaultPrevented()&&n.preventDefault()}},Q.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},Q.Event=function(e,t){return this instanceof Q.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?l:c):this.type=e,t&&Q.extend(this,t),this.timeStamp=e&&e.timeStamp||Q.now(),void(this[Q.expando]=!0)):new Q.Event(e,t)},Q.Event.prototype={isDefaultPrevented:c,isPropagationStopped:c,isImmediatePropagationStopped:c,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=l,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=l,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=l,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},Q.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){Q.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,o=e.relatedTarget,i=e.handleObj;return(!o||o!==r&&!Q.contains(r,o))&&(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}}),K.focusinBubbles||Q.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){Q.event.simulate(t,e.target,Q.event.fix(e),!0)};Q.event.special[t]={setup:function(){var r=this.ownerDocument||this,o=ve.access(r,t);o||r.addEventListener(e,n,!0),ve.access(r,t,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this,o=ve.access(r,t)-1;o?ve.access(r,t,o):(r.removeEventListener(e,n,!0),ve.remove(r,t))}}}),Q.fn.extend({on:function(e,t,n,r,o){var i,s;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(s in e)this.on(s,t,n,e[s],o);return this}if(null==n&&null==r?(r=t,n=t=void 0):null==r&&("string"==typeof t?(r=n,n=void 0):(r=n,n=t,t=void 0)),r===!1)r=c;else if(!r)return this;return 1===o&&(i=r,r=function(e){return Q().off(e),i.apply(this,arguments)},r.guid=i.guid||(i.guid=Q.guid++)),this.each(function(){Q.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,Q(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=c),this.each(function(){Q.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){Q.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?Q.event.trigger(e,t,n,!0):void 0}});var He=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ee=/<([\w:]+)/,Oe=/<|&#?\w+;/,Me=/<(?:script|style|link)/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ie=/^$|\/(?:java|ecma)script/i,je=/^true\/(.*)/,Le=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,$e={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};$e.optgroup=$e.option,$e.tbody=$e.tfoot=$e.colgroup=$e.caption=$e.thead,$e.th=$e.td,Q.extend({clone:function(e,t,n){var r,o,i,s,a=e.cloneNode(!0),u=Q.contains(e.ownerDocument,e);if(!(K.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Q.isXMLDoc(e)))for(s=v(a),i=v(e),r=0,o=i.length;o>r;r++)y(i[r],s[r]);if(t)if(n)for(i=i||v(e),s=s||v(a),r=0,o=i.length;o>r;r++)g(i[r],s[r]);else g(e,a);return s=v(a,"script"),s.length>0&&m(s,!u&&v(e,"script")),a},buildFragment:function(e,t,n,r){for(var o,i,s,a,u,l,c=t.createDocumentFragment(),f=[],p=0,d=e.length;d>p;p++)if(o=e[p],o||0===o)if("object"===Q.type(o))Q.merge(f,o.nodeType?[o]:o);else if(Oe.test(o)){for(i=i||c.appendChild(t.createElement("div")),s=(Ee.exec(o)||["",""])[1].toLowerCase(),a=$e[s]||$e._default,i.innerHTML=a[1]+o.replace(He,"<$1></$2>")+a[2],l=a[0];l--;)i=i.lastChild;Q.merge(f,i.childNodes),i=c.firstChild,i.textContent=""}else f.push(t.createTextNode(o));for(c.textContent="",p=0;o=f[p++];)if((!r||-1===Q.inArray(o,r))&&(u=Q.contains(o.ownerDocument,o),i=v(c.appendChild(o),"script"),u&&m(i),n))for(l=0;o=i[l++];)Ie.test(o.type||"")&&n.push(o);return c},cleanData:function(e){for(var t,n,r,o,i=Q.event.special,s=0;void 0!==(n=e[s]);s++){if(Q.acceptData(n)&&(o=n[ve.expando],o&&(t=ve.cache[o]))){if(t.events)for(r in t.events)i[r]?Q.event.remove(n,r):Q.removeEvent(n,r,t.handle);ve.cache[o]&&delete ve.cache[o]}delete ye.cache[n[ye.expando]]}}}),Q.fn.extend({text:function(e){return ge(this,function(e){return void 0===e?Q.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 this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=p(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=p(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=e?Q.filter(e,this):this,o=0;null!=(n=r[o]);o++)t||1!==n.nodeType||Q.cleanData(v(n)),n.parentNode&&(t&&Q.contains(n.ownerDocument,n)&&m(v(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Q.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return Q.clone(this,e,t)})},html:function(e){return ge(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&&!Me.test(e)&&!$e[(Ee.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(He,"<$1></$2>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(Q.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(o){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,Q.cleanData(v(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=q.apply([],e);var n,r,o,i,s,a,u=0,l=this.length,c=this,f=l-1,p=e[0],m=Q.isFunction(p);if(m||l>1&&"string"==typeof p&&!K.checkClone&&Ae.test(p))return this.each(function(n){var r=c.eq(n);m&&(e[0]=p.call(this,n,r.html())),r.domManip(e,t)});if(l&&(n=Q.buildFragment(e,this[0].ownerDocument,!1,this),r=n.firstChild,1===n.childNodes.length&&(n=r),r)){for(o=Q.map(v(n,"script"),d),i=o.length;l>u;u++)s=n,u!==f&&(s=Q.clone(s,!0,!0),i&&Q.merge(o,v(s,"script"))),t.call(this[u],s,u);if(i)for(a=o[o.length-1].ownerDocument,Q.map(o,h),u=0;i>u;u++)s=o[u],Ie.test(s.type||"")&&!ve.access(s,"globalEval")&&Q.contains(a,s)&&(s.src?Q._evalUrl&&Q._evalUrl(s.src):Q.globalEval(s.textContent.replace(Le,"")))}return this}}),Q.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Q.fn[e]=function(e){for(var n,r=[],o=Q(e),i=o.length-1,s=0;i>=s;s++)n=s===i?this:this.clone(!0),Q(o[s])[t](n),z.apply(r,n.get());return this.pushStack(r)}});var Be,Re={},Ue=/^margin/,Fe=new RegExp("^("+ke+")(?!px)[a-z%]+$","i"),Ye=function(t){return t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):e.getComputedStyle(t,null)};!function(){function t(){s.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",s.innerHTML="",o.appendChild(i);var t=e.getComputedStyle(s,null);n="1%"!==t.top,r="4px"===t.width,o.removeChild(i)}var n,r,o=Z.documentElement,i=Z.createElement("div"),s=Z.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",K.clearCloneStyle="content-box"===s.style.backgroundClip,i.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",i.appendChild(s),e.getComputedStyle&&Q.extend(K,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==r&&t(),r},reliableMarginRight:function(){var t,n=s.appendChild(Z.createElement("div"));return n.style.cssText=s.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",s.style.width="1px",o.appendChild(i),t=!parseFloat(e.getComputedStyle(n,null).marginRight),o.removeChild(i),s.removeChild(n),t}}))}(),Q.swap=function(e,t,n,r){var o,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];o=n.apply(e,r||[]);for(i in t)e.style[i]=s[i];return o};var qe=/^(none|table(?!-c[ea]).+)/,ze=new RegExp("^("+ke+")(.*)$","i"),We=new RegExp("^([+-])=("+ke+")","i"),Ge={position:"absolute",visibility:"hidden",display:"block"},Xe={letterSpacing:"0",fontWeight:"400"},Ve=["Webkit","O","Moz","ms"];Q.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=k(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,i,s,a=Q.camelCase(t),u=e.style;return t=Q.cssProps[a]||(Q.cssProps[a]=x(u,a)),s=Q.cssHooks[t]||Q.cssHooks[a],void 0===n?s&&"get"in s&&void 0!==(o=s.get(e,!1,r))?o:u[t]:(i=typeof n,"string"===i&&(o=We.exec(n))&&(n=(o[1]+1)*o[2]+parseFloat(Q.css(e,t)),i="number"),null!=n&&n===n&&("number"!==i||Q.cssNumber[a]||(n+="px"),K.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(u[t]=n)),void 0)}},css:function(e,t,n,r){var o,i,s,a=Q.camelCase(t);return t=Q.cssProps[a]||(Q.cssProps[a]=x(e.style,a)),s=Q.cssHooks[t]||Q.cssHooks[a],s&&"get"in s&&(o=s.get(e,!0,n)),void 0===o&&(o=k(e,t,r)),"normal"===o&&t in Xe&&(o=Xe[t]),""===n||n?(i=parseFloat(o),n===!0||Q.isNumeric(i)?i||0:o):o}}),Q.each(["height","width"],function(e,t){Q.cssHooks[t]={get:function(e,n,r){return n?qe.test(Q.css(e,"display"))&&0===e.offsetWidth?Q.swap(e,Ge,function(){return S(e,t,r)}):S(e,t,r):void 0},set:function(e,n,r){var o=r&&Ye(e);return _(e,n,r?N(e,t,r,"border-box"===Q.css(e,"boxSizing",!1,o),o):0)}}}),Q.cssHooks.marginRight=C(K.reliableMarginRight,function(e,t){return t?Q.swap(e,{display:"inline-block"},k,[e,"marginRight"]):void 0}),Q.each({margin:"",padding:"",border:"Width"},function(e,t){Q.cssHooks[e+t]={expand:function(n){for(var r=0,o={},i="string"==typeof n?n.split(" "):[n];4>r;r++)o[e+Ce[r]+t]=i[r]||i[r-2]||i[0];return o}},Ue.test(e)||(Q.cssHooks[e+t].set=_)}),Q.fn.extend({css:function(e,t){return ge(this,function(e,t,n){var r,o,i={},s=0;if(Q.isArray(t)){for(r=Ye(e),o=t.length;o>s;s++)i[t[s]]=Q.css(e,t[s],!1,r);return i}return void 0!==n?Q.style(e,t,n):Q.css(e,t)},e,t,arguments.length>1)},show:function(){return T(this,!0)},hide:function(){return T(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){xe(this)?Q(this).show():Q(this).hide()})}}),Q.Tween=D,D.prototype={constructor:D,init:function(e,t,n,r,o,i){this.elem=e,this.prop=n,this.easing=o||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(Q.cssNumber[n]?"":"px")},cur:function(){var e=D.propHooks[this.prop];return e&&e.get?e.get(this):D.propHooks._default.get(this)},run:function(e){var t,n=D.propHooks[this.prop];return this.options.duration?this.pos=t=Q.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):D.propHooks._default.set(this),this}},D.prototype.init.prototype=D.prototype,D.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=Q.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){Q.fx.step[e.prop]?Q.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[Q.cssProps[e.prop]]||Q.cssHooks[e.prop])?Q.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},D.propHooks.scrollTop=D.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Q.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},Q.fx=D.prototype.init,Q.fx.step={};var Ke,Ze,Je=/^(?:toggle|show|hide)$/,Qe=new RegExp("^(?:([+-])=|)("+ke+")([a-z%]*)$","i"),et=/queueHooks$/,tt=[O],nt={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),o=Qe.exec(t),i=o&&o[3]||(Q.cssNumber[e]?"":"px"),s=(Q.cssNumber[e]||"px"!==i&&+r)&&Qe.exec(Q.css(n.elem,e)),a=1,u=20;if(s&&s[3]!==i){i=i||s[3],o=o||[],s=+r||1;do a=a||".5",s/=a,Q.style(n.elem,e,s+i);while(a!==(a=n.cur()/r)&&1!==a&&--u)}return o&&(s=n.start=+s||+r||0,n.unit=i,n.end=o[1]?s+(o[1]+1)*o[2]:+o[2]),n}]};Q.Animation=Q.extend(A,{tweener:function(e,t){Q.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,o=e.length;o>r;r++)n=e[r],nt[n]=nt[n]||[],nt[n].unshift(t)},prefilter:function(e,t){t?tt.unshift(e):tt.push(e)}}),Q.speed=function(e,t,n){var r=e&&"object"==typeof e?Q.extend({},e):{complete:n||!n&&t||Q.isFunction(e)&&e,duration:e,easing:n&&t||t&&!Q.isFunction(t)&&t};return r.duration=Q.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in Q.fx.speeds?Q.fx.speeds[r.duration]:Q.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){Q.isFunction(r.old)&&r.old.call(this),r.queue&&Q.dequeue(this,r.queue)},r},Q.fn.extend({fadeTo:function(e,t,n,r){return this.filter(xe).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var o=Q.isEmptyObject(e),i=Q.speed(t,n,r),s=function(){var t=A(this,Q.extend({},e),i);(o||ve.get(this,"finish"))&&t.stop(!0)};return s.finish=s,o||i.queue===!1?this.each(s):this.queue(i.queue,s)},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&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",i=Q.timers,s=ve.get(this);if(o)s[o]&&s[o].stop&&r(s[o]);else for(o in s)s[o]&&s[o].stop&&et.test(o)&&r(s[o]);for(o=i.length;o--;)i[o].elem!==this||null!=e&&i[o].queue!==e||(i[o].anim.stop(n),t=!1,i.splice(o,1));(t||!n)&&Q.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=ve.get(this),r=n[e+"queue"],o=n[e+"queueHooks"],i=Q.timers,s=r?r.length:0;for(n.finish=!0,Q.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=i.length;t--;)i[t].elem===this&&i[t].queue===e&&(i[t].anim.stop(!0),i.splice(t,1));for(t=0;s>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),Q.each(["toggle","show","hide"],function(e,t){var n=Q.fn[t];Q.fn[t]=function(e,r,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(H(t,!0),e,r,o)}}),Q.each({slideDown:H("show"),slideUp:H("hide"),slideToggle:H("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Q.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),Q.timers=[],Q.fx.tick=function(){var e,t=0,n=Q.timers;for(Ke=Q.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||Q.fx.stop(),Ke=void 0},Q.fx.timer=function(e){Q.timers.push(e),e()?Q.fx.start():Q.timers.pop()},Q.fx.interval=13,Q.fx.start=function(){Ze||(Ze=setInterval(Q.fx.tick,Q.fx.interval))},Q.fx.stop=function(){clearInterval(Ze),Ze=null},Q.fx.speeds={slow:600,fast:200,_default:400},Q.fn.delay=function(e,t){return e=Q.fx?Q.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},function(){var e=Z.createElement("input"),t=Z.createElement("select"),n=t.appendChild(Z.createElement("option"));e.type="checkbox",K.checkOn=""!==e.value,K.optSelected=n.selected,t.disabled=!0,K.optDisabled=!n.disabled,e=Z.createElement("input"),e.value="t",e.type="radio",K.radioValue="t"===e.value}();var rt,ot,it=Q.expr.attrHandle;Q.fn.extend({attr:function(e,t){return ge(this,Q.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){Q.removeAttr(this,e)})}}),Q.extend({attr:function(e,t,n){var r,o,i=e.nodeType;if(e&&3!==i&&8!==i&&2!==i)return typeof e.getAttribute===Ne?Q.prop(e,t,n):(1===i&&Q.isXMLDoc(e)||(t=t.toLowerCase(),r=Q.attrHooks[t]||(Q.expr.match.bool.test(t)?ot:rt)),void 0===n?r&&"get"in r&&null!==(o=r.get(e,t))?o:(o=Q.find.attr(e,t),null==o?void 0:o):null!==n?r&&"set"in r&&void 0!==(o=r.set(e,n,t))?o:(e.setAttribute(t,n+""),n):void Q.removeAttr(e,t))},removeAttr:function(e,t){var n,r,o=0,i=t&&t.match(de);if(i&&1===e.nodeType)for(;n=i[o++];)r=Q.propFix[n]||n,Q.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!K.radioValue&&"radio"===t&&Q.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),ot={set:function(e,t,n){return t===!1?Q.removeAttr(e,n):e.setAttribute(n,n),n}},Q.each(Q.expr.match.bool.source.match(/\w+/g),function(e,t){var n=it[t]||Q.find.attr;it[t]=function(e,t,r){var o,i;return r||(i=it[t],it[t]=o,o=null!=n(e,t,r)?t.toLowerCase():null,it[t]=i),o}});var st=/^(?:input|select|textarea|button)$/i;Q.fn.extend({prop:function(e,t){return ge(this,Q.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[Q.propFix[e]||e]})}}),Q.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,o,i,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return i=1!==s||!Q.isXMLDoc(e),i&&(t=Q.propFix[t]||t,o=Q.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:e[t]=n:o&&"get"in o&&null!==(r=o.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||st.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),K.optSelected||(Q.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),Q.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Q.propFix[this.toLowerCase()]=this});var at=/[\t\r\n\f]/g;Q.fn.extend({addClass:function(e){var t,n,r,o,i,s,a="string"==typeof e&&e,u=0,l=this.length;if(Q.isFunction(e))return this.each(function(t){Q(this).addClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(de)||[];l>u;u++)if(n=this[u],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(at," "):" ")){for(i=0;o=t[i++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=Q.trim(r),n.className!==s&&(n.className=s)}return this},removeClass:function(e){var t,n,r,o,i,s,a=0===arguments.length||"string"==typeof e&&e,u=0,l=this.length;if(Q.isFunction(e))return this.each(function(t){Q(this).removeClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(de)||[];l>u;u++)if(n=this[u],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(at," "):"")){for(i=0;o=t[i++];)for(;r.indexOf(" "+o+" ")>=0;)r=r.replace(" "+o+" "," ");s=e?Q.trim(r):"",n.className!==s&&(n.className=s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):Q.isFunction(e)?this.each(function(n){
Q(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,r=0,o=Q(this),i=e.match(de)||[];t=i[r++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else(n===Ne||"boolean"===n)&&(this.className&&ve.set(this,"__className__",this.className),this.className=this.className||e===!1?"":ve.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(at," ").indexOf(t)>=0)return!0;return!1}});var ut=/\r/g;Q.fn.extend({val:function(e){var t,n,r,o=this[0];{if(arguments.length)return r=Q.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=r?e.call(this,n,Q(this).val()):e,null==o?o="":"number"==typeof o?o+="":Q.isArray(o)&&(o=Q.map(o,function(e){return null==e?"":e+""})),t=Q.valHooks[this.type]||Q.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))});if(o)return t=Q.valHooks[o.type]||Q.valHooks[o.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(ut,""):null==n?"":n)}}}),Q.extend({valHooks:{option:{get:function(e){var t=Q.find.attr(e,"value");return null!=t?t:Q.trim(Q.text(e))}},select:{get:function(e){for(var t,n,r=e.options,o=e.selectedIndex,i="select-one"===e.type||0>o,s=i?null:[],a=i?o+1:r.length,u=0>o?a:i?o:0;a>u;u++)if(n=r[u],(n.selected||u===o)&&(K.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!Q.nodeName(n.parentNode,"optgroup"))){if(t=Q(n).val(),i)return t;s.push(t)}return s},set:function(e,t){for(var n,r,o=e.options,i=Q.makeArray(t),s=o.length;s--;)r=o[s],(r.selected=Q.inArray(r.value,i)>=0)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),Q.each(["radio","checkbox"],function(){Q.valHooks[this]={set:function(e,t){return Q.isArray(t)?e.checked=Q.inArray(Q(e).val(),t)>=0:void 0}},K.checkOn||(Q.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),Q.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){Q.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),Q.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var lt=Q.now(),ct=/\?/;Q.parseJSON=function(e){return JSON.parse(e+"")},Q.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&Q.error("Invalid XML: "+e),t};var ft=/#.*$/,pt=/([?&])_=[^&]*/,dt=/^(.*?):[ \t]*([^\r\n]*)$/gm,ht=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,mt=/^(?:GET|HEAD)$/,gt=/^\/\//,vt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,yt={},bt={},wt="*/".concat("*"),kt=e.location.href,Ct=vt.exec(kt.toLowerCase())||[];Q.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:kt,type:"GET",isLocal:ht.test(Ct[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":wt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":Q.parseJSON,"text xml":Q.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?L(L(e,Q.ajaxSettings),t):L(Q.ajaxSettings,e)},ajaxPrefilter:I(yt),ajaxTransport:I(bt),ajax:function(e,t){function n(e,t,n,s){var u,c,v,y,w,C=t;2!==b&&(b=2,a&&clearTimeout(a),r=void 0,i=s||"",k.readyState=e>0?4:0,u=e>=200&&300>e||304===e,n&&(y=$(f,k,n)),y=B(f,y,k,u),u?(f.ifModified&&(w=k.getResponseHeader("Last-Modified"),w&&(Q.lastModified[o]=w),w=k.getResponseHeader("etag"),w&&(Q.etag[o]=w)),204===e||"HEAD"===f.type?C="nocontent":304===e?C="notmodified":(C=y.state,c=y.data,v=y.error,u=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),k.status=e,k.statusText=(t||C)+"",u?h.resolveWith(p,[c,C,k]):h.rejectWith(p,[k,C,v]),k.statusCode(g),g=void 0,l&&d.trigger(u?"ajaxSuccess":"ajaxError",[k,f,u?c:v]),m.fireWith(p,[k,C]),l&&(d.trigger("ajaxComplete",[k,f]),--Q.active||Q.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,o,i,s,a,u,l,c,f=Q.ajaxSetup({},t),p=f.context||f,d=f.context&&(p.nodeType||p.jquery)?Q(p):Q.event,h=Q.Deferred(),m=Q.Callbacks("once memory"),g=f.statusCode||{},v={},y={},b=0,w="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!s)for(s={};t=dt.exec(i);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)g[t]=[g[t],e[t]];else k.always(e[k.status]);return this},abort:function(e){var t=e||w;return r&&r.abort(t),n(0,t),this}};if(h.promise(k).complete=m.add,k.success=k.done,k.error=k.fail,f.url=((e||f.url||kt)+"").replace(ft,"").replace(gt,Ct[1]+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=Q.trim(f.dataType||"*").toLowerCase().match(de)||[""],null==f.crossDomain&&(u=vt.exec(f.url.toLowerCase()),f.crossDomain=!(!u||u[1]===Ct[1]&&u[2]===Ct[2]&&(u[3]||("http:"===u[1]?"80":"443"))===(Ct[3]||("http:"===Ct[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=Q.param(f.data,f.traditional)),j(yt,f,t,k),2===b)return k;l=Q.event&&f.global,l&&0===Q.active++&&Q.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!mt.test(f.type),o=f.url,f.hasContent||(f.data&&(o=f.url+=(ct.test(o)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=pt.test(o)?o.replace(pt,"$1_="+lt++):o+(ct.test(o)?"&":"?")+"_="+lt++)),f.ifModified&&(Q.lastModified[o]&&k.setRequestHeader("If-Modified-Since",Q.lastModified[o]),Q.etag[o]&&k.setRequestHeader("If-None-Match",Q.etag[o])),(f.data&&f.hasContent&&f.contentType!==!1||t.contentType)&&k.setRequestHeader("Content-Type",f.contentType),k.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+wt+"; q=0.01":""):f.accepts["*"]);for(c in f.headers)k.setRequestHeader(c,f.headers[c]);if(f.beforeSend&&(f.beforeSend.call(p,k,f)===!1||2===b))return k.abort();w="abort";for(c in{success:1,error:1,complete:1})k[c](f[c]);if(r=j(bt,f,t,k)){k.readyState=1,l&&d.trigger("ajaxSend",[k,f]),f.async&&f.timeout>0&&(a=setTimeout(function(){k.abort("timeout")},f.timeout));try{b=1,r.send(v,n)}catch(C){if(!(2>b))throw C;n(-1,C)}}else n(-1,"No Transport");return k},getJSON:function(e,t,n){return Q.get(e,t,n,"json")},getScript:function(e,t){return Q.get(e,void 0,t,"script")}}),Q.each(["get","post"],function(e,t){Q[t]=function(e,n,r,o){return Q.isFunction(n)&&(o=o||r,r=n,n=void 0),Q.ajax({url:e,type:t,dataType:o,data:n,success:r})}}),Q._evalUrl=function(e){return Q.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},Q.fn.extend({wrapAll:function(e){var t;return Q.isFunction(e)?this.each(function(t){Q(this).wrapAll(e.call(this,t))}):(this[0]&&(t=Q(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 Q.isFunction(e)?this.each(function(t){Q(this).wrapInner(e.call(this,t))}):this.each(function(){var t=Q(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=Q.isFunction(e);return this.each(function(n){Q(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){Q.nodeName(this,"body")||Q(this).replaceWith(this.childNodes)}).end()}}),Q.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},Q.expr.filters.visible=function(e){return!Q.expr.filters.hidden(e)};var xt=/%20/g,_t=/\[\]$/,Nt=/\r?\n/g,St=/^(?:submit|button|image|reset|file)$/i,Tt=/^(?:input|select|textarea|keygen)/i;Q.param=function(e,t){var n,r=[],o=function(e,t){t=Q.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=Q.ajaxSettings&&Q.ajaxSettings.traditional),Q.isArray(e)||e.jquery&&!Q.isPlainObject(e))Q.each(e,function(){o(this.name,this.value)});else for(n in e)R(n,e[n],t,o);return r.join("&").replace(xt,"+")},Q.fn.extend({serialize:function(){return Q.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=Q.prop(this,"elements");return e?Q.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!Q(this).is(":disabled")&&Tt.test(this.nodeName)&&!St.test(e)&&(this.checked||!_e.test(e))}).map(function(e,t){var n=Q(this).val();return null==n?null:Q.isArray(n)?Q.map(n,function(e){return{name:t.name,value:e.replace(Nt,"\r\n")}}):{name:t.name,value:n.replace(Nt,"\r\n")}}).get()}}),Q.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var Dt=0,Pt={},Ht={0:200,1223:204},Et=Q.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in Pt)Pt[e]()}),K.cors=!!Et&&"withCredentials"in Et,K.ajax=Et=!!Et,Q.ajaxTransport(function(e){var t;return K.cors||Et&&!e.crossDomain?{send:function(n,r){var o,i=e.xhr(),s=++Dt;if(i.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)i[o]=e.xhrFields[o];e.mimeType&&i.overrideMimeType&&i.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(o in n)i.setRequestHeader(o,n[o]);t=function(e){return function(){t&&(delete Pt[s],t=i.onload=i.onerror=null,"abort"===e?i.abort():"error"===e?r(i.status,i.statusText):r(Ht[i.status]||i.status,i.statusText,"string"==typeof i.responseText?{text:i.responseText}:void 0,i.getAllResponseHeaders()))}},i.onload=t(),i.onerror=t("error"),t=Pt[s]=t("abort");try{i.send(e.hasContent&&e.data||null)}catch(a){if(t)throw a}},abort:function(){t&&t()}}:void 0}),Q.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return Q.globalEval(e),e}}}),Q.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),Q.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,o){t=Q("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),Z.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Ot=[],Mt=/(=)\?(?=&|$)|\?\?/;Q.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ot.pop()||Q.expando+"_"+lt++;return this[e]=!0,e}}),Q.ajaxPrefilter("json jsonp",function(t,n,r){var o,i,s,a=t.jsonp!==!1&&(Mt.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Mt.test(t.data)&&"data");return a||"jsonp"===t.dataTypes[0]?(o=t.jsonpCallback=Q.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Mt,"$1"+o):t.jsonp!==!1&&(t.url+=(ct.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return s||Q.error(o+" was not called"),s[0]},t.dataTypes[0]="json",i=e[o],e[o]=function(){s=arguments},r.always(function(){e[o]=i,t[o]&&(t.jsonpCallback=n.jsonpCallback,Ot.push(o)),s&&Q.isFunction(i)&&i(s[0]),s=i=void 0}),"script"):void 0}),Q.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||Z;var r=se.exec(e),o=!n&&[];return r?[t.createElement(r[1])]:(r=Q.buildFragment([e],t,o),o&&o.length&&Q(o).remove(),Q.merge([],r.childNodes))};var At=Q.fn.load;Q.fn.load=function(e,t,n){if("string"!=typeof e&&At)return At.apply(this,arguments);var r,o,i,s=this,a=e.indexOf(" ");return a>=0&&(r=Q.trim(e.slice(a)),e=e.slice(0,a)),Q.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),s.length>0&&Q.ajax({url:e,type:o,dataType:"html",data:t}).done(function(e){i=arguments,s.html(r?Q("<div>").append(Q.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){s.each(n,i||[e.responseText,t,e])}),this},Q.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){Q.fn[t]=function(e){return this.on(t,e)}}),Q.expr.filters.animated=function(e){return Q.grep(Q.timers,function(t){return e===t.elem}).length};var It=e.document.documentElement;Q.offset={setOffset:function(e,t,n){var r,o,i,s,a,u,l,c=Q.css(e,"position"),f=Q(e),p={};"static"===c&&(e.style.position="relative"),a=f.offset(),i=Q.css(e,"top"),u=Q.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(i+u).indexOf("auto")>-1,l?(r=f.position(),s=r.top,o=r.left):(s=parseFloat(i)||0,o=parseFloat(u)||0),Q.isFunction(t)&&(t=t.call(e,n,a)),null!=t.top&&(p.top=t.top-a.top+s),null!=t.left&&(p.left=t.left-a.left+o),"using"in t?t.using.call(e,p):f.css(p)}},Q.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){Q.offset.setOffset(this,e,t)});var t,n,r=this[0],o={top:0,left:0},i=r&&r.ownerDocument;if(i)return t=i.documentElement,Q.contains(t,r)?(typeof r.getBoundingClientRect!==Ne&&(o=r.getBoundingClientRect()),n=U(i),{top:o.top+n.pageYOffset-t.clientTop,left:o.left+n.pageXOffset-t.clientLeft}):o},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===Q.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),Q.nodeName(e[0],"html")||(r=e.offset()),r.top+=Q.css(e[0],"borderTopWidth",!0),r.left+=Q.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-Q.css(n,"marginTop",!0),left:t.left-r.left-Q.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||It;e&&!Q.nodeName(e,"html")&&"static"===Q.css(e,"position");)e=e.offsetParent;return e||It})}}),Q.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var r="pageYOffset"===n;Q.fn[t]=function(o){return ge(this,function(t,o,i){var s=U(t);return void 0===i?s?s[n]:t[o]:void(s?s.scrollTo(r?e.pageXOffset:i,r?i:e.pageYOffset):t[o]=i)},t,o,arguments.length,null)}}),Q.each(["top","left"],function(e,t){Q.cssHooks[t]=C(K.pixelPosition,function(e,n){return n?(n=k(e,t),Fe.test(n)?Q(e).position()[t]+"px":n):void 0})}),Q.each({Height:"height",Width:"width"},function(e,t){Q.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){Q.fn[r]=function(r,o){var i=arguments.length&&(n||"boolean"!=typeof r),s=n||(r===!0||o===!0?"margin":"border");return ge(this,function(t,n,r){var o;return Q.isWindow(t)?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===r?Q.css(t,n,s):Q.style(t,n,r,s)},t,i?r:void 0,i,null)}})}),Q.fn.size=function(){return this.length},Q.fn.andSelf=Q.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return Q});var jt=e.jQuery,Lt=e.$;return Q.noConflict=function(t){return e.$===Q&&(e.$=Lt),t&&e.jQuery===Q&&(e.jQuery=jt),Q},typeof t===Ne&&(e.jQuery=e.$=Q),Q}),function(e){function t(t){if("string"==typeof t.data&&(t.data={keys:t.data}),t.data&&t.data.keys&&"string"==typeof t.data.keys){var n=t.handler,r=t.data.keys.toLowerCase().split(" ");t.handler=function(t){if(this===t.target||!(/textarea|select/i.test(t.target.nodeName)||e.hotkeys.options.filterTextInputs&&e.inArray(t.target.type,e.hotkeys.textAcceptingInputTypes)>-1)){var o="keypress"!==t.type&&e.hotkeys.specialKeys[t.which],i=String.fromCharCode(t.which).toLowerCase(),s="",a={};e.each(["alt","ctrl","shift"],function(e,n){t[n+"Key"]&&o!==n&&(s+=n+"+")}),t.metaKey&&!t.ctrlKey&&"meta"!==o&&(s+="meta+"),t.metaKey&&"meta"!==o&&s.indexOf("alt+ctrl+shift+")>-1&&(s=s.replace("alt+ctrl+shift+","hyper+")),o?a[s+o]=!0:(a[s+i]=!0,a[s+e.hotkeys.shiftNums[i]]=!0,"shift+"===s&&(a[e.hotkeys.shiftNums[i]]=!0));for(var u=0,l=r.length;l>u;u++)if(a[r[u]])return n.apply(this,arguments)}}}}e.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],options:{filterTextInputs:!0}},e.each(["keydown","keyup","keypress"],function(){e.event.special[this]={add:t}})}(jQuery||this.jQuery||window.jQuery);var CanvasImage=function(e){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),document.body.appendChild(this.canvas),this.width=this.canvas.width=e.width,this.height=this.canvas.height=e.height,this.context.drawImage(e,0,0,this.width,this.height)};CanvasImage.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},CanvasImage.prototype.update=function(e){this.context.putImageData(e,0,0)},CanvasImage.prototype.getPixelCount=function(){return this.width*this.height},CanvasImage.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},CanvasImage.prototype.removeCanvas=function(){this.canvas.parentNode.removeChild(this.canvas)};var ColorThief=function(){};if(ColorThief.prototype.getColor=function(e,t){var n=this.getPalette(e,5,t),r=n[0];return r},ColorThief.prototype.getPalette=function(e,t,n){"undefined"==typeof t&&(t=10),"undefined"==typeof n&&(n=10);for(var r,o,i,s,a,u=new CanvasImage(e),l=u.getImageData(),c=l.data,f=u.getPixelCount(),p=[],d=0;f>d;d+=n)r=4*d,o=c[r+0],i=c[r+1],s=c[r+2],a=c[r+3],a>=125&&(o>250&&i>250&&s>250||p.push([o,i,s]));var h=MMCQ.quantize(p,t),m=h.palette();return u.removeCanvas(),m},!pv)var pv={map:function(e,t){var n={};return t?e.map(function(e,r){return n.index=r,t.call(n,e)}):e.slice()},naturalOrder:function(e,t){return t>e?-1:e>t?1:0},sum:function(e,t){var n={};return e.reduce(t?function(e,r,o){return n.index=o,e+t.call(n,r)}:function(e,t){return e+t},0)},max:function(e,t){return Math.max.apply(null,t?pv.map(e,t):e)}};var MMCQ=function(){function e(e,t,n){return(e<<2*u)+(t<<u)+n}function t(e){function t(){n.sort(e),r=!0}var n=[],r=!1;return{push:function(e){n.push(e),r=!1},peek:function(e){return r||t(),void 0===e&&(e=n.length-1),n[e]},pop:function(){return r||t(),n.pop()},size:function(){return n.length},map:function(e){return n.map(e)},debug:function(){return r||t(),n}}}function n(e,t,n,r,o,i,s){var a=this;a.r1=e,a.r2=t,a.g1=n,a.g2=r,a.b1=o,a.b2=i,a.histo=s}function r(){this.vboxes=new t(function(e,t){return pv.naturalOrder(e.vbox.count()*e.vbox.volume(),t.vbox.count()*t.vbox.volume())})}function o(t){var n,r,o,i,s=1<<3*u,a=new Array(s);return t.forEach(function(t){r=t[0]>>l,o=t[1]>>l,i=t[2]>>l,n=e(r,o,i),a[n]=(a[n]||0)+1}),a}function i(e,t){var r,o,i,s=1e6,a=0,u=1e6,c=0,f=1e6,p=0;return e.forEach(function(e){r=e[0]>>l,o=e[1]>>l,i=e[2]>>l,s>r?s=r:r>a&&(a=r),u>o?u=o:o>c&&(c=o),f>i?f=i:i>p&&(p=i)}),new n(s,a,u,c,f,p,t)}function s(t,n){function r(e){var t,r,o,i,s,a=e+"1",l=e+"2",c=0;for(u=n[a];u<=n[l];u++)if(h[u]>d/2){for(o=n.copy(),i=n.copy(),t=u-n[a],r=n[l]-u,s=r>=t?Math.min(n[l]-1,~~(u+r/2)):Math.max(n[a],~~(u-1-t/2));!h[s];)s++;for(c=m[s];!c&&h[s-1];)c=m[--s];return o[l]=s,i[a]=o[l]+1,[o,i]}}if(n.count()){var o=n.r2-n.r1+1,i=n.g2-n.g1+1,s=n.b2-n.b1+1,a=pv.max([o,i,s]);if(1==n.count())return[n.copy()];var u,l,c,f,p,d=0,h=[],m=[];if(a==o)for(u=n.r1;u<=n.r2;u++){for(f=0,l=n.g1;l<=n.g2;l++)for(c=n.b1;c<=n.b2;c++)p=e(u,l,c),f+=t[p]||0;d+=f,h[u]=d}else if(a==i)for(u=n.g1;u<=n.g2;u++){for(f=0,l=n.r1;l<=n.r2;l++)for(c=n.b1;c<=n.b2;c++)p=e(l,u,c),f+=t[p]||0;d+=f,h[u]=d}else for(u=n.b1;u<=n.b2;u++){for(f=0,l=n.r1;l<=n.r2;l++)for(c=n.g1;c<=n.g2;c++)p=e(l,c,u),f+=t[p]||0;d+=f,h[u]=d}return h.forEach(function(e,t){m[t]=d-e}),r(a==o?"r":a==i?"g":"b")}}function a(e,n){function a(e,t){for(var n,r=1,o=0;c>o;)if(n=e.pop(),n.count()){var i=s(u,n),a=i[0],l=i[1];if(!a)return;if(e.push(a),l&&(e.push(l),r++),r>=t)return;if(o++>c)return}else e.push(n),o++}if(!e.length||2>n||n>256)return!1;var u=o(e),l=0;u.forEach(function(){l++});var p=i(e,u),d=new t(function(e,t){return pv.naturalOrder(e.count(),t.count())});d.push(p),a(d,f*n);for(var h=new t(function(e,t){return pv.naturalOrder(e.count()*e.volume(),t.count()*t.volume())});d.size();)h.push(d.pop());a(h,n-h.size());for(var m=new r;h.size();)m.push(h.pop());return m}var u=5,l=8-u,c=1e3,f=.75;return n.prototype={volume:function(e){var t=this;return(!t._volume||e)&&(t._volume=(t.r2-t.r1+1)*(t.g2-t.g1+1)*(t.b2-t.b1+1)),t._volume},count:function(t){var n=this,r=n.histo;if(!n._count_set||t){var o,i,s,a=0;for(o=n.r1;o<=n.r2;o++)for(i=n.g1;i<=n.g2;i++)for(s=n.b1;s<=n.b2;s++)index=e(o,i,s),a+=r[index]||0;n._count=a,n._count_set=!0}return n._count},copy:function(){var e=this;return new n(e.r1,e.r2,e.g1,e.g2,e.b1,e.b2,e.histo)},avg:function(t){var n=this,r=n.histo;if(!n._avg||t){var o,i,s,a,l,c=0,f=1<<8-u,p=0,d=0,h=0;for(i=n.r1;i<=n.r2;i++)for(s=n.g1;s<=n.g2;s++)for(a=n.b1;a<=n.b2;a++)l=e(i,s,a),o=r[l]||0,c+=o,p+=o*(i+.5)*f,d+=o*(s+.5)*f,h+=o*(a+.5)*f;c?n._avg=[~~(p/c),~~(d/c),~~(h/c)]:n._avg=[~~(f*(n.r1+n.r2+1)/2),~~(f*(n.g1+n.g2+1)/2),~~(f*(n.b1+n.b2+1)/2)]}return n._avg},contains:function(e){var t=this,n=e[0]>>l;return gval=e[1]>>l,bval=e[2]>>l,n>=t.r1&&n<=t.r2&&gval>=t.g1&&n<=t.g2&&bval>=t.b1&&n<=t.b2}},r.prototype={push:function(e){this.vboxes.push({vbox:e,color:e.avg()})},palette:function(){return this.vboxes.map(function(e){return e.color})},size:function(){return this.vboxes.size()},map:function(e){for(var t=this.vboxes,n=0;n<t.size();n++)if(t.peek(n).vbox.contains(e))return t.peek(n).color;return this.nearest(e)},nearest:function(e){for(var t,n,r,o=this.vboxes,i=0;i<o.size();i++)n=Math.sqrt(Math.pow(e[0]-o.peek(i).color[0],2)+Math.pow(e[1]-o.peek(i).color[1],2)+Math.pow(e[1]-o.peek(i).color[1],2)),(t>n||void 0===t)&&(t=n,r=o.peek(i).color);return r},forcebw:function(){var e=this.vboxes;e.sort(function(e,t){return pv.naturalOrder(pv.sum(e.color),pv.sum(t.color))});var t=e[0].color;t[0]<5&&t[1]<5&&t[2]<5&&(e[0].color=[0,0,0]);var n=e.length-1,r=e[n].color;r[0]>251&&r[1]>251&&r[2]>251&&(e[n].color=[255,255,255])}},{quantize:a}}();(function(e){function t(e,t,n){switch(arguments.length){case 2:return null!=e?e:t;case 3:return null!=e?e:null!=t?t:n;default:throw new Error("Implement me")}}function n(e,t){return Ne.call(e,t)}function r(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function o(e){be.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function i(e,t){var n=!0;return p(function(){return n&&(o(e),n=!1),t.apply(this,arguments)},t)}function s(e,t){gt[e]||(o(t),gt[e]=!0)}function a(e,t){return function(n){return m(e.call(this,n),t)}}function u(e,t){return function(n){return this.localeData().ordinal(e.call(this,n),t)}}function l(){}function c(e,t){t!==!1&&E(e),d(this,e),this._d=new Date(+e._d)}function f(e){var t=_(e),n=t.year||0,r=t.quarter||0,o=t.month||0,i=t.week||0,s=t.day||0,a=t.hour||0,u=t.minute||0,l=t.second||0,c=t.millisecond||0;this._milliseconds=+c+1e3*l+6e4*u+36e5*a,this._days=+s+7*i,this._months=+o+3*r+12*n,this._data={},this._locale=be.localeData(),this._bubble()}function p(e,t){for(var r in t)n(t,r)&&(e[r]=t[r]);return n(t,"toString")&&(e.toString=t.toString),n(t,"valueOf")&&(e.valueOf=t.valueOf),e}function d(e,t){var n,r,o;if("undefined"!=typeof t._isAMomentObject&&(e._isAMomentObject=t._isAMomentObject),"undefined"!=typeof t._i&&(e._i=t._i),"undefined"!=typeof t._f&&(e._f=t._f),"undefined"!=typeof t._l&&(e._l=t._l),"undefined"!=typeof t._strict&&(e._strict=t._strict),"undefined"!=typeof t._tzm&&(e._tzm=t._tzm),"undefined"!=typeof t._isUTC&&(e._isUTC=t._isUTC),"undefined"!=typeof t._offset&&(e._offset=t._offset),"undefined"!=typeof t._pf&&(e._pf=t._pf),"undefined"!=typeof t._locale&&(e._locale=t._locale),Ae.length>0)for(n in Ae)r=Ae[n],o=t[r],"undefined"!=typeof o&&(e[r]=o);return e}function h(e){return 0>e?Math.ceil(e):Math.floor(e)}function m(e,t,n){for(var r=""+Math.abs(e),o=e>=0;r.length<t;)r="0"+r;return(o?n?"+":"":"-")+r}function g(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function v(e,t){var n;return t=j(t,e),e.isBefore(t)?n=g(e,t):(n=g(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function y(e,t){return function(n,r){var o,i;return null===r||isNaN(+r)||(s(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period)."),i=n,n=r,r=i),n="string"==typeof n?+n:n,o=be.duration(n,r),b(this,o,e),this}}function b(e,t,n,r){var o=t._milliseconds,i=t._days,s=t._months;r=null==r?!0:r,o&&e._d.setTime(+e._d+o*n),i&&de(e,"Date",pe(e,"Date")+i*n),s&&fe(e,pe(e,"Month")+s*n),r&&be.updateOffset(e,i||s)}function w(e){return"[object Array]"===Object.prototype.toString.call(e)}function k(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}function C(e,t,n){var r,o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0;for(r=0;o>r;r++)(n&&e[r]!==t[r]||!n&&S(e[r])!==S(t[r]))&&s++;return s+i}function x(e){if(e){var t=e.toLowerCase().replace(/(.)s$/,"$1");e=lt[e]||ct[t]||t}return e}function _(e){var t,r,o={};for(r in e)n(e,r)&&(t=x(r),t&&(o[t]=e[r]));return o}function N(t){var n,r;if(0===t.indexOf("week"))n=7,r="day";else{if(0!==t.indexOf("month"))return;n=12,r="month"}be[t]=function(o,i){var s,a,u=be._locale[t],l=[];if("number"==typeof o&&(i=o,o=e),a=function(e){var t=be().utc().set(r,e);return u.call(be._locale,t,o||"")},null!=i)return a(i);for(s=0;n>s;s++)l.push(a(s));return l}}function S(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=t>=0?Math.floor(t):Math.ceil(t)),n}function T(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function D(e,t,n){return ae(be([e,11,31+t-n]),t,n).week}function P(e){return H(e)?366:365}function H(e){return e%4===0&&e%100!==0||e%400===0}function E(e){var t;e._a&&-2===e._pf.overflow&&(t=e._a[Te]<0||e._a[Te]>11?Te:e._a[De]<1||e._a[De]>T(e._a[Se],e._a[Te])?De:e._a[Pe]<0||e._a[Pe]>24||24===e._a[Pe]&&(0!==e._a[He]||0!==e._a[Ee]||0!==e._a[Oe])?Pe:e._a[He]<0||e._a[He]>59?He:e._a[Ee]<0||e._a[Ee]>59?Ee:e._a[Oe]<0||e._a[Oe]>999?Oe:-1,e._pf._overflowDayOfYear&&(Se>t||t>De)&&(t=De),e._pf.overflow=t)}function O(t){return null==t._isValid&&(t._isValid=!isNaN(t._d.getTime())&&t._pf.overflow<0&&!t._pf.empty&&!t._pf.invalidMonth&&!t._pf.nullInput&&!t._pf.invalidFormat&&!t._pf.userInvalidated,t._strict&&(t._isValid=t._isValid&&0===t._pf.charsLeftOver&&0===t._pf.unusedTokens.length&&t._pf.bigHour===e)),t._isValid}function M(e){return e?e.toLowerCase().replace("_","-"):e}function A(e){for(var t,n,r,o,i=0;i<e.length;){for(o=M(e[i]).split("-"),t=o.length,n=M(e[i+1]),n=n?n.split("-"):null;t>0;){if(r=I(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&C(o,n,!0)>=t-1)break;t--}i++}return null}function I(e){var t=null;if(!Me[e]&&Ie)try{t=be.locale(),require("./locale/"+e),be.locale(t)}catch(n){}return Me[e]}function j(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(be.isMoment(e)||k(e)?+e:+be(e))-+n,n._d.setTime(+n._d+r),be.updateOffset(n,!1),n):be(e).local()}function L(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function $(e){var t,n,r=e.match(Be);for(t=0,n=r.length;n>t;t++)mt[r[t]]?r[t]=mt[r[t]]:r[t]=L(r[t]);return function(o){var i="";for(t=0;n>t;t++)i+=r[t]instanceof Function?r[t].call(o,e):r[t];return i}}function B(e,t){return e.isValid()?(t=R(t,e.localeData()),ft[t]||(ft[t]=$(t)),ft[t](e)):e.localeData().invalidDate()}function R(e,t){function n(e){return t.longDateFormat(e)||e}var r=5;for(Re.lastIndex=0;r>=0&&Re.test(e);)e=e.replace(Re,n),Re.lastIndex=0,r-=1;return e}function U(e,t){var n,r=t._strict;switch(e){case"Q":return Ze;case"DDDD":return Qe;case"YYYY":case"GGGG":case"gggg":return r?et:Ye;case"Y":case"G":case"g":return nt;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return r?tt:qe;case"S":if(r)return Ze;case"SS":if(r)return Je;case"SSS":if(r)return Qe;case"DDD":return Fe;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return We;case"a":case"A":return t._locale._meridiemParse;case"x":return Ve;case"X":return Ke;case"Z":case"ZZ":return Ge;case"T":return Xe;case"SSSS":return ze;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return r?Je:Ue;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Ue;case"Do":return r?t._locale._ordinalParse:t._locale._ordinalParseLenient;default:return n=new RegExp(K(V(e.replace("\\","")),"i"))}}function F(e){e=e||"";var t=e.match(Ge)||[],n=t[t.length-1]||[],r=(n+"").match(at)||["-",0,0],o=+(60*r[1])+S(r[2]);return"+"===r[0]?-o:o}function Y(e,t,n){var r,o=n._a;switch(e){case"Q":null!=t&&(o[Te]=3*(S(t)-1));break;case"M":case"MM":null!=t&&(o[Te]=S(t)-1);break;case"MMM":case"MMMM":r=n._locale.monthsParse(t,e,n._strict),null!=r?o[Te]=r:n._pf.invalidMonth=t;break;case"D":case"DD":null!=t&&(o[De]=S(t));break;case"Do":null!=t&&(o[De]=S(parseInt(t.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=t&&(n._dayOfYear=S(t));break;case"YY":o[Se]=be.parseTwoDigitYear(t);break;case"YYYY":case"YYYYY":case"YYYYYY":o[Se]=S(t);break;case"a":case"A":n._isPm=n._locale.isPM(t);break;case"h":case"hh":n._pf.bigHour=!0;case"H":case"HH":o[Pe]=S(t);break;case"m":case"mm":o[He]=S(t);break;case"s":case"ss":o[Ee]=S(t);break;case"S":case"SS":case"SSS":case"SSSS":o[Oe]=S(1e3*("0."+t));break;case"x":n._d=new Date(S(t));break;case"X":n._d=new Date(1e3*parseFloat(t));break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=F(t);break;case"dd":case"ddd":case"dddd":r=n._locale.weekdaysParse(t),null!=r?(n._w=n._w||{},n._w.d=r):n._pf.invalidWeekday=t;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":e=e.substr(0,1);case"gggg":case"GGGG":case"GGGGG":e=e.substr(0,2),t&&(n._w=n._w||{},n._w[e]=S(t));break;case"gg":case"GG":n._w=n._w||{},n._w[e]=be.parseTwoDigitYear(t)}}function q(e){var n,r,o,i,s,a,u;n=e._w,null!=n.GG||null!=n.W||null!=n.E?(s=1,a=4,r=t(n.GG,e._a[Se],ae(be(),1,4).year),o=t(n.W,1),i=t(n.E,1)):(s=e._locale._week.dow,a=e._locale._week.doy,r=t(n.gg,e._a[Se],ae(be(),s,a).year),o=t(n.w,1),null!=n.d?(i=n.d,s>i&&++o):i=null!=n.e?n.e+s:s),u=ue(r,o,i,a,s),e._a[Se]=u.year,e._dayOfYear=u.dayOfYear}function z(e){var n,r,o,i,s=[];if(!e._d){for(o=G(e),e._w&&null==e._a[De]&&null==e._a[Te]&&q(e),e._dayOfYear&&(i=t(e._a[Se],o[Se]),e._dayOfYear>P(i)&&(e._pf._overflowDayOfYear=!0),r=re(i,0,e._dayOfYear),e._a[Te]=r.getUTCMonth(),e._a[De]=r.getUTCDate()),n=0;3>n&&null==e._a[n];++n)e._a[n]=s[n]=o[n];for(;7>n;n++)e._a[n]=s[n]=null==e._a[n]?2===n?1:0:e._a[n];24===e._a[Pe]&&0===e._a[He]&&0===e._a[Ee]&&0===e._a[Oe]&&(e._nextDay=!0,e._a[Pe]=0),e._d=(e._useUTC?re:ne).apply(null,s),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()+e._tzm),
e._nextDay&&(e._a[Pe]=24)}}function W(e){var t;e._d||(t=_(e._i),e._a=[t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],z(e))}function G(e){var t=new Date;return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function X(t){if(t._f===be.ISO_8601)return void J(t);t._a=[],t._pf.empty=!0;var n,r,o,i,s,a=""+t._i,u=a.length,l=0;for(o=R(t._f,t._locale).match(Be)||[],n=0;n<o.length;n++)i=o[n],r=(a.match(U(i,t))||[])[0],r&&(s=a.substr(0,a.indexOf(r)),s.length>0&&t._pf.unusedInput.push(s),a=a.slice(a.indexOf(r)+r.length),l+=r.length),mt[i]?(r?t._pf.empty=!1:t._pf.unusedTokens.push(i),Y(i,r,t)):t._strict&&!r&&t._pf.unusedTokens.push(i);t._pf.charsLeftOver=u-l,a.length>0&&t._pf.unusedInput.push(a),t._pf.bigHour===!0&&t._a[Pe]<=12&&(t._pf.bigHour=e),t._isPm&&t._a[Pe]<12&&(t._a[Pe]+=12),t._isPm===!1&&12===t._a[Pe]&&(t._a[Pe]=0),z(t),E(t)}function V(e){return e.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,o){return t||n||r||o})}function K(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(e){var t,n,o,i,s;if(0===e._f.length)return e._pf.invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<e._f.length;i++)s=0,t=d({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._pf=r(),t._f=e._f[i],X(t),O(t)&&(s+=t._pf.charsLeftOver,s+=10*t._pf.unusedTokens.length,t._pf.score=s,(null==o||o>s)&&(o=s,n=t));p(e,n||t)}function J(e){var t,n,r=e._i,o=rt.exec(r);if(o){for(e._pf.iso=!0,t=0,n=it.length;n>t;t++)if(it[t][1].exec(r)){e._f=it[t][0]+(o[6]||" ");break}for(t=0,n=st.length;n>t;t++)if(st[t][1].exec(r)){e._f+=st[t][0];break}r.match(Ge)&&(e._f+="Z"),X(e)}else e._isValid=!1}function Q(e){J(e),e._isValid===!1&&(delete e._isValid,be.createFromInputFallback(e))}function ee(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function te(t){var n,r=t._i;r===e?t._d=new Date:k(r)?t._d=new Date(+r):null!==(n=je.exec(r))?t._d=new Date(+n[1]):"string"==typeof r?Q(t):w(r)?(t._a=ee(r.slice(0),function(e){return parseInt(e,10)}),z(t)):"object"==typeof r?W(t):"number"==typeof r?t._d=new Date(r):be.createFromInputFallback(t)}function ne(e,t,n,r,o,i,s){var a=new Date(e,t,n,r,o,i,s);return 1970>e&&a.setFullYear(e),a}function re(e){var t=new Date(Date.UTC.apply(null,arguments));return 1970>e&&t.setUTCFullYear(e),t}function oe(e,t){if("string"==typeof e)if(isNaN(e)){if(e=t.weekdaysParse(e),"number"!=typeof e)return null}else e=parseInt(e,10);return e}function ie(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function se(e,t,n){var r=be.duration(e).abs(),o=_e(r.as("s")),i=_e(r.as("m")),s=_e(r.as("h")),a=_e(r.as("d")),u=_e(r.as("M")),l=_e(r.as("y")),c=o<pt.s&&["s",o]||1===i&&["m"]||i<pt.m&&["mm",i]||1===s&&["h"]||s<pt.h&&["hh",s]||1===a&&["d"]||a<pt.d&&["dd",a]||1===u&&["M"]||u<pt.M&&["MM",u]||1===l&&["y"]||["yy",l];return c[2]=t,c[3]=+e>0,c[4]=n,ie.apply({},c)}function ae(e,t,n){var r,o=n-t,i=n-e.day();return i>o&&(i-=7),o-7>i&&(i+=7),r=be(e).add(i,"d"),{week:Math.ceil(r.dayOfYear()/7),year:r.year()}}function ue(e,t,n,r,o){var i,s,a=re(e,0,1).getUTCDay();return a=0===a?7:a,n=null!=n?n:o,i=o-a+(a>r?7:0)-(o>a?7:0),s=7*(t-1)+(n-o)+i+1,{year:s>0?e:e-1,dayOfYear:s>0?s:P(e-1)+s}}function le(t){var n,r=t._i,o=t._f;return t._locale=t._locale||be.localeData(t._l),null===r||o===e&&""===r?be.invalid({nullInput:!0}):("string"==typeof r&&(t._i=r=t._locale.preparse(r)),be.isMoment(r)?new c(r,!0):(o?w(o)?Z(t):X(t):te(t),n=new c(t),n._nextDay&&(n.add(1,"d"),n._nextDay=e),n))}function ce(e,t){var n,r;if(1===t.length&&w(t[0])&&(t=t[0]),!t.length)return be();for(n=t[0],r=1;r<t.length;++r)t[r][e](n)&&(n=t[r]);return n}function fe(e,t){var n;return"string"==typeof t&&(t=e.localeData().monthsParse(t),"number"!=typeof t)?e:(n=Math.min(e.date(),T(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e)}function pe(e,t){return e._d["get"+(e._isUTC?"UTC":"")+t]()}function de(e,t,n){return"Month"===t?fe(e,n):e._d["set"+(e._isUTC?"UTC":"")+t](n)}function he(e,t){return function(n){return null!=n?(de(this,e,n),be.updateOffset(this,t),this):pe(this,e)}}function me(e){return 400*e/146097}function ge(e){return 146097*e/400}function ve(e){be.duration.fn[e]=function(){return this._data[e]}}function ye(e){"undefined"==typeof ender&&(we=xe.moment,e?xe.moment=i("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",be):xe.moment=be)}for(var be,we,ke,Ce="2.8.4",xe="undefined"!=typeof global?global:this,_e=Math.round,Ne=Object.prototype.hasOwnProperty,Se=0,Te=1,De=2,Pe=3,He=4,Ee=5,Oe=6,Me={},Ae=[],Ie="undefined"!=typeof module&&module&&module.exports,je=/^\/?Date\((\-?\d+)/i,Le=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,$e=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Be=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Re=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ue=/\d\d?/,Fe=/\d{1,3}/,Ye=/\d{1,4}/,qe=/[+\-]?\d{1,6}/,ze=/\d+/,We=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Ge=/Z|[\+\-]\d\d:?\d\d/gi,Xe=/T/i,Ve=/[\+\-]?\d+/,Ke=/[\+\-]?\d+(\.\d{1,3})?/,Ze=/\d/,Je=/\d\d/,Qe=/\d{3}/,et=/\d{4}/,tt=/[+-]?\d{6}/,nt=/[+-]?\d+/,rt=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ot="YYYY-MM-DDTHH:mm:ssZ",it=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],st=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],at=/([\+\-]|\d\d)/gi,ut=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),lt={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},ct={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},ft={},pt={s:45,m:45,h:22,d:26,M:11},dt="DDD w W M D d".split(" "),ht="M D H h m s w W".split(" "),mt={M:function(){return this.month()+1},MMM:function(e){return this.localeData().monthsShort(this,e)},MMMM:function(e){return this.localeData().months(this,e)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(e){return this.localeData().weekdaysMin(this,e)},ddd:function(e){return this.localeData().weekdaysShort(this,e)},dddd:function(e){return this.localeData().weekdays(this,e)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return m(this.year()%100,2)},YYYY:function(){return m(this.year(),4)},YYYYY:function(){return m(this.year(),5)},YYYYYY:function(){var e=this.year(),t=e>=0?"+":"-";return t+m(Math.abs(e),6)},gg:function(){return m(this.weekYear()%100,2)},gggg:function(){return m(this.weekYear(),4)},ggggg:function(){return m(this.weekYear(),5)},GG:function(){return m(this.isoWeekYear()%100,2)},GGGG:function(){return m(this.isoWeekYear(),4)},GGGGG:function(){return m(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return S(this.milliseconds()/100)},SS:function(){return m(S(this.milliseconds()/10),2)},SSS:function(){return m(this.milliseconds(),3)},SSSS:function(){return m(this.milliseconds(),3)},Z:function(){var e=-this.zone(),t="+";return 0>e&&(e=-e,t="-"),t+m(S(e/60),2)+":"+m(S(e)%60,2)},ZZ:function(){var e=-this.zone(),t="+";return 0>e&&(e=-e,t="-"),t+m(S(e/60),2)+m(S(e)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},gt={},vt=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];dt.length;)ke=dt.pop(),mt[ke+"o"]=u(mt[ke],ke);for(;ht.length;)ke=ht.pop(),mt[ke+ke]=a(mt[ke],2);mt.DDDD=a(mt.DDD,3),p(l.prototype,{set:function(e){var t,n;for(n in e)t=e[n],"function"==typeof t?this[n]=t:this["_"+n]=t;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(e){return this._months[e.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(e){return this._monthsShort[e.month()]},monthsParse:function(e,t,n){var r,o,i;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;12>r;r++){if(o=be.utc([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(e){return this._weekdays[e.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(e){return this._weekdaysShort[e.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(e){return this._weekdaysMin[e.day()]},weekdaysParse:function(e){var t,n,r;for(this._weekdaysParse||(this._weekdaysParse=[]),t=0;7>t;t++)if(this._weekdaysParse[t]||(n=be([2e3,1]).day(t),r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[t]=new RegExp(r.replace(".",""),"i")),this._weekdaysParse[t].test(e))return t},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(e){var t=this._longDateFormat[e];return!t&&this._longDateFormat[e.toUpperCase()]&&(t=this._longDateFormat[e.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e]=t),t},isPM:function(e){return"p"===(e+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(e,t,n){var r=this._calendar[e];return"function"==typeof r?r.apply(t,[n]):r},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(e,t,n,r){var o=this._relativeTime[n];return"function"==typeof o?o(e,t,n,r):o.replace(/%d/i,e)},pastFuture:function(e,t){var n=this._relativeTime[e>0?"future":"past"];return"function"==typeof n?n(t):n.replace(/%s/i,t)},ordinal:function(e){return this._ordinal.replace("%d",e)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(e){return e},postformat:function(e){return e},week:function(e){return ae(e,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),be=function(t,n,o,i){var s;return"boolean"==typeof o&&(i=o,o=e),s={},s._isAMomentObject=!0,s._i=t,s._f=n,s._l=o,s._strict=i,s._isUTC=!1,s._pf=r(),le(s)},be.suppressDeprecationWarnings=!1,be.createFromInputFallback=i("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),be.min=function(){var e=[].slice.call(arguments,0);return ce("isBefore",e)},be.max=function(){var e=[].slice.call(arguments,0);return ce("isAfter",e)},be.utc=function(t,n,o,i){var s;return"boolean"==typeof o&&(i=o,o=e),s={},s._isAMomentObject=!0,s._useUTC=!0,s._isUTC=!0,s._l=o,s._i=t,s._f=n,s._strict=i,s._pf=r(),le(s).utc()},be.unix=function(e){return be(1e3*e)},be.duration=function(e,t){var r,o,i,s,a=e,u=null;return be.isDuration(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:"number"==typeof e?(a={},t?a[t]=e:a.milliseconds=e):(u=Le.exec(e))?(r="-"===u[1]?-1:1,a={y:0,d:S(u[De])*r,h:S(u[Pe])*r,m:S(u[He])*r,s:S(u[Ee])*r,ms:S(u[Oe])*r}):(u=$e.exec(e))?(r="-"===u[1]?-1:1,i=function(e){var t=e&&parseFloat(e.replace(",","."));return(isNaN(t)?0:t)*r},a={y:i(u[2]),M:i(u[3]),d:i(u[4]),h:i(u[5]),m:i(u[6]),s:i(u[7]),w:i(u[8])}):"object"==typeof a&&("from"in a||"to"in a)&&(s=v(be(a.from),be(a.to)),a={},a.ms=s.milliseconds,a.M=s.months),o=new f(a),be.isDuration(e)&&n(e,"_locale")&&(o._locale=e._locale),o},be.version=Ce,be.defaultFormat=ot,be.ISO_8601=function(){},be.momentProperties=Ae,be.updateOffset=function(){},be.relativeTimeThreshold=function(t,n){return pt[t]===e?!1:n===e?pt[t]:(pt[t]=n,!0)},be.lang=i("moment.lang is deprecated. Use moment.locale instead.",function(e,t){return be.locale(e,t)}),be.locale=function(e,t){var n;return e&&(n="undefined"!=typeof t?be.defineLocale(e,t):be.localeData(e),n&&(be.duration._locale=be._locale=n)),be._locale._abbr},be.defineLocale=function(e,t){return null!==t?(t.abbr=e,Me[e]||(Me[e]=new l),Me[e].set(t),be.locale(e),Me[e]):(delete Me[e],null)},be.langData=i("moment.langData is deprecated. Use moment.localeData instead.",function(e){return be.localeData(e)}),be.localeData=function(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return be._locale;if(!w(e)){if(t=I(e))return t;e=[e]}return A(e)},be.isMoment=function(e){return e instanceof c||null!=e&&n(e,"_isAMomentObject")},be.isDuration=function(e){return e instanceof f};for(ke=vt.length-1;ke>=0;--ke)N(vt[ke]);be.normalizeUnits=function(e){return x(e)},be.invalid=function(e){var t=be.utc(NaN);return null!=e?p(t._pf,e):t._pf.userInvalidated=!0,t},be.parseZone=function(){return be.apply(null,arguments).parseZone()},be.parseTwoDigitYear=function(e){return S(e)+(S(e)>68?1900:2e3)},p(be.fn=c.prototype,{clone:function(){return be(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var e=be(this).utc();return 0<e.year()&&e.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():B(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):B(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds()]},isValid:function(){return O(this)},isDSTShifted:function(){return this._a?this.isValid()&&C(this._a,(this._isUTC?be.utc(this._a):be(this._a)).toArray())>0:!1},parsingFlags:function(){return p({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(e){return this.zone(0,e)},local:function(e){return this._isUTC&&(this.zone(0,e),this._isUTC=!1,e&&this.add(this._dateTzOffset(),"m")),this},format:function(e){var t=B(this,e||be.defaultFormat);return this.localeData().postformat(t)},add:y(1,"add"),subtract:y(-1,"subtract"),diff:function(e,t,n){var r,o,i,s=j(e,this),a=6e4*(this.zone()-s.zone());return t=x(t),"year"===t||"month"===t?(r=432e5*(this.daysInMonth()+s.daysInMonth()),o=12*(this.year()-s.year())+(this.month()-s.month()),i=this-be(this).startOf("month")-(s-be(s).startOf("month")),i-=6e4*(this.zone()-be(this).startOf("month").zone()-(s.zone()-be(s).startOf("month").zone())),o+=i/r,"year"===t&&(o/=12)):(r=this-s,o="second"===t?r/1e3:"minute"===t?r/6e4:"hour"===t?r/36e5:"day"===t?(r-a)/864e5:"week"===t?(r-a)/6048e5:r),n?o:h(o)},from:function(e,t){return be.duration({to:this,from:e}).locale(this.locale()).humanize(!t)},fromNow:function(e){return this.from(be(),e)},calendar:function(e){var t=e||be(),n=j(t,this).startOf("day"),r=this.diff(n,"days",!0),o=-6>r?"sameElse":-1>r?"lastWeek":0>r?"lastDay":1>r?"sameDay":2>r?"nextDay":7>r?"nextWeek":"sameElse";return this.format(this.localeData().calendar(o,this,be(t)))},isLeapYear:function(){return H(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=oe(e,this.localeData()),this.add(e-t,"d")):t},month:he("Month",!0),startOf:function(e){switch(e=x(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e?this.weekday(0):"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(t){return t=x(t),t===e||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")},isAfter:function(e,t){var n;return t=x("undefined"!=typeof t?t:"millisecond"),"millisecond"===t?(e=be.isMoment(e)?e:be(e),+this>+e):(n=be.isMoment(e)?+e:+be(e),n<+this.clone().startOf(t))},isBefore:function(e,t){var n;return t=x("undefined"!=typeof t?t:"millisecond"),"millisecond"===t?(e=be.isMoment(e)?e:be(e),+e>+this):(n=be.isMoment(e)?+e:+be(e),+this.clone().endOf(t)<n)},isSame:function(e,t){var n;return t=x(t||"millisecond"),"millisecond"===t?(e=be.isMoment(e)?e:be(e),+this===+e):(n=+be(e),+this.clone().startOf(t)<=n&&n<=+this.clone().endOf(t))},min:i("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(e){return e=be.apply(null,arguments),this>e?this:e}),max:i("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(e){return e=be.apply(null,arguments),e>this?this:e}),zone:function(e,t){var n,r=this._offset||0;return null==e?this._isUTC?r:this._dateTzOffset():("string"==typeof e&&(e=F(e)),Math.abs(e)<16&&(e=60*e),!this._isUTC&&t&&(n=this._dateTzOffset()),this._offset=e,this._isUTC=!0,null!=n&&this.subtract(n,"m"),r!==e&&(!t||this._changeInProgress?b(this,be.duration(r-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,be.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(e){return e=e?be(e).zone():0,(this.zone()-e)%60===0},daysInMonth:function(){return T(this.year(),this.month())},dayOfYear:function(e){var t=_e((be(this).startOf("day")-be(this).startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},quarter:function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},weekYear:function(e){var t=ae(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==e?t:this.add(e-t,"y")},isoWeekYear:function(e){var t=ae(this,1,4).year;return null==e?t:this.add(e-t,"y")},week:function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},isoWeek:function(e){var t=ae(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},weekday:function(e){var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},isoWeekday:function(e){return null==e?this.day()||7:this.day(this.day()%7?e:e-7)},isoWeeksInYear:function(){return D(this.year(),1,4)},weeksInYear:function(){var e=this.localeData()._week;return D(this.year(),e.dow,e.doy)},get:function(e){return e=x(e),this[e]()},set:function(e,t){return e=x(e),"function"==typeof this[e]&&this[e](t),this},locale:function(t){var n;return t===e?this._locale._abbr:(n=be.localeData(t),null!=n&&(this._locale=n),this)},lang:i("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===e?this.localeData():this.locale(t)}),localeData:function(){return this._locale},_dateTzOffset:function(){return 15*Math.round(this._d.getTimezoneOffset()/15)}}),be.fn.millisecond=be.fn.milliseconds=he("Milliseconds",!1),be.fn.second=be.fn.seconds=he("Seconds",!1),be.fn.minute=be.fn.minutes=he("Minutes",!1),be.fn.hour=be.fn.hours=he("Hours",!0),be.fn.date=he("Date",!0),be.fn.dates=i("dates accessor is deprecated. Use date instead.",he("Date",!0)),be.fn.year=he("FullYear",!0),be.fn.years=i("years accessor is deprecated. Use year instead.",he("FullYear",!0)),be.fn.days=be.fn.day,be.fn.months=be.fn.month,be.fn.weeks=be.fn.week,be.fn.isoWeeks=be.fn.isoWeek,be.fn.quarters=be.fn.quarter,be.fn.toJSON=be.fn.toISOString,p(be.duration.fn=f.prototype,{_bubble:function(){var e,t,n,r=this._milliseconds,o=this._days,i=this._months,s=this._data,a=0;s.milliseconds=r%1e3,e=h(r/1e3),s.seconds=e%60,t=h(e/60),s.minutes=t%60,n=h(t/60),s.hours=n%24,o+=h(n/24),a=h(me(o)),o-=h(ge(a)),i+=h(o/30),o%=30,a+=h(i/12),i%=12,s.days=o,s.months=i,s.years=a},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return h(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*S(this._months/12)},humanize:function(e){var t=se(this,!e,this.localeData());return e&&(t=this.localeData().pastFuture(+this,t)),this.localeData().postformat(t)},add:function(e,t){var n=be.duration(e,t);return this._milliseconds+=n._milliseconds,this._days+=n._days,this._months+=n._months,this._bubble(),this},subtract:function(e,t){var n=be.duration(e,t);return this._milliseconds-=n._milliseconds,this._days-=n._days,this._months-=n._months,this._bubble(),this},get:function(e){return e=x(e),this[e.toLowerCase()+"s"]()},as:function(e){var t,n;if(e=x(e),"month"===e||"year"===e)return t=this._days+this._milliseconds/864e5,n=this._months+12*me(t),"month"===e?n:n/12;switch(t=this._days+Math.round(ge(this._months/12)),e){case"week":return t/7+this._milliseconds/6048e5;case"day":return t+this._milliseconds/864e5;case"hour":return 24*t+this._milliseconds/36e5;case"minute":return 24*t*60+this._milliseconds/6e4;case"second":return 24*t*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*t*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+e)}},lang:be.fn.lang,locale:be.fn.locale,toIsoString:i("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var e=Math.abs(this.years()),t=Math.abs(this.months()),n=Math.abs(this.days()),r=Math.abs(this.hours()),o=Math.abs(this.minutes()),i=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(e?e+"Y":"")+(t?t+"M":"")+(n?n+"D":"")+(r||o||i?"T":"")+(r?r+"H":"")+(o?o+"M":"")+(i?i+"S":""):"P0D"},localeData:function(){return this._locale}}),be.duration.fn.toString=be.duration.fn.toISOString;for(ke in ut)n(ut,ke)&&ve(ke.toLowerCase());be.duration.fn.asMilliseconds=function(){return this.as("ms")},be.duration.fn.asSeconds=function(){return this.as("s")},be.duration.fn.asMinutes=function(){return this.as("m")},be.duration.fn.asHours=function(){return this.as("h")},be.duration.fn.asDays=function(){return this.as("d")},be.duration.fn.asWeeks=function(){return this.as("weeks")},be.duration.fn.asMonths=function(){return this.as("M")},be.duration.fn.asYears=function(){return this.as("y")},be.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===S(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),Ie?module.exports=be:"function"==typeof define&&define.amd?(define("moment",function(e,t,n){return n.config&&n.config()&&n.config().noGlobal===!0&&(xe.moment=we),be}),ye(!0)):ye()}).call(this),function(){var e,t=[].slice;e=function(){var e,n,r,o,i,s;return o=1<=arguments.length?t.call(arguments,0):[],i=/(^|[\s\n]|<br\/?>)((?:https?|ftp):\/\/[\-A-Z0-9+\u0026\u2019@#\/%?=()~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~()_|])/gi,o.length>0?(r=o[0],n=function(){var t;t=[];for(e in r)s=r[e],"callback"!==e&&t.push(" "+e+"='"+s+"'");return t}().join(""),this.replace(i,function(e,t,o){var i;return i=("function"==typeof r.callback?r.callback(o):void 0)||"<a href='"+o+"'"+n+">"+o+"</a>",""+t+i})):this.replace(i,"$1<a href='$2'>$2</a>")},String.prototype.autoLink=e}.call(this),+function(e){"use strict";function t(t){return this.each(function(){var r=e(this),o=r.data("bs.affix"),i="object"==typeof t&&t;o||r.data("bs.affix",o=new n(this,i)),"string"==typeof t&&o[t]()})}var n=function(t,r){this.options=e.extend({},n.DEFAULTS,r),this.$target=e(this.options.target).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.5",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(e,t,n,r){var o=this.$target.scrollTop(),i=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return n>o?"top":!1;if("bottom"==this.affixed)return null!=n?o+this.unpin<=i.top?!1:"bottom":e-r>=o+s?!1:"bottom";var a=null==this.affixed,u=a?o:i.top,l=a?s:t;return null!=n&&n>=o?"top":null!=r&&u+l>=e-r?"bottom":!1},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var e=this.$target.scrollTop(),t=this.$element.offset();return this.pinnedOffset=t.top-e},n.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),r=this.options.offset,o=r.top,i=r.bottom,s=Math.max(e(document).height(),e(document.body).height());"object"!=typeof r&&(i=o=r),"function"==typeof o&&(o=r.top(this.$element)),"function"==typeof i&&(i=r.bottom(this.$element));var a=this.getState(s,t,o,i);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var u="affix"+(a?"-"+a:""),l=e.Event(u+".bs.affix");if(this.$element.trigger(l),l.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-t-i})}};var r=e.fn.affix;e.fn.affix=t,e.fn.affix.Constructor=n,e.fn.affix.noConflict=function(){return e.fn.affix=r,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var n=e(this),r=n.data();r.offset=r.offset||{},null!=r.offsetBottom&&(r.offset.bottom=r.offsetBottom),null!=r.offsetTop&&(r.offset.top=r.offsetTop),t.call(n,r)})})}(jQuery),+function(e){"use strict";function t(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r=n&&e(n);return r&&r.length?r:t.parent()}function n(n){n&&3===n.which||(e(o).remove(),e(i).each(function(){var r=e(this),o=t(r),i={relatedTarget:this};o.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&e.contains(o[0],n.target)||(o.trigger(n=e.Event("hide.bs.dropdown",i)),n.isDefaultPrevented()||(r.attr("aria-expanded","false"),o.removeClass("open").trigger("hidden.bs.dropdown",i))))}))}function r(t){return this.each(function(){var n=e(this),r=n.data("bs.dropdown");r||n.data("bs.dropdown",r=new s(this)),"string"==typeof t&&r[t].call(n)})}var o=".dropdown-backdrop",i='[data-toggle="dropdown"]',s=function(t){e(t).on("click.bs.dropdown",this.toggle)};s.VERSION="3.3.5",s.prototype.toggle=function(r){var o=e(this);if(!o.is(".disabled, :disabled")){var i=t(o),s=i.hasClass("open");if(n(),!s){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",n);var a={relatedTarget:this};if(i.trigger(r=e.Event("show.bs.dropdown",a)),r.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger("shown.bs.dropdown",a)}return!1}},s.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var r=e(this);if(n.preventDefault(),n.stopPropagation(),!r.is(".disabled, :disabled")){var o=t(r),s=o.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&o.find(i).trigger("focus"),r.trigger("click");var a=" li:not(.disabled):visible",u=o.find(".dropdown-menu"+a).find("a, button");if(u.length){var l=u.index(n.target);38==n.which&&l>0&&l--,40==n.which&&l<u.length-1&&l++,~l||(l=0),u.eq(l).trigger("focus")}}}};var a=e.fn.dropdown;e.fn.dropdown=r,e.fn.dropdown.Constructor=s,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=a,this},e(document).on("click.bs.dropdown.data-api",n).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",i,s.prototype.toggle).on("keydown.bs.dropdown.data-api",i,s.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",s.prototype.keydown)}(jQuery),+function(e){"use strict";function t(t,r){return this.each(function(){var o=e(this),i=o.data("bs.modal"),s=e.extend({},n.DEFAULTS,o.data(),"object"==typeof t&&t);i||o.data("bs.modal",i=new n(this,s)),"string"==typeof t?i[t](r):s.show&&i.show(r)})}var n=function(t,n){this.options=n,this.$body=e(document.body),this.$element=e(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,e.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.3.5",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(e){return this.isShown?this.hide():this.show(e)},n.prototype.show=function(t){var r=this,o=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(o),this.isShown||o.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){r.$element.one("mouseup.dismiss.bs.modal",function(t){e(t.target).is(r.$element)&&(r.ignoreBackdropClick=!0)})}),this.backdrop(function(){var o=e.support.transition&&r.$element.hasClass("fade");r.$element.parent().length||r.$element.appendTo(r.$body),r.$element.show().scrollTop(0),r.adjustDialog(),o&&r.$element[0].offsetWidth,r.$element.addClass("in"),r.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});o?r.$dialog.one("bsTransitionEnd",function(){r.$element.trigger("focus").trigger(i)}).emulateTransitionEnd(n.TRANSITION_DURATION):r.$element.trigger("focus").trigger(i);
}))},n.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",e.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",e.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?e(window).on("resize.bs.modal",e.proxy(this.handleUpdate,this)):e(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.$body.removeClass("modal-open"),e.resetAdjustments(),e.resetScrollbar(),e.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(t){var r=this,o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&o;if(this.$backdrop=e(document.createElement("div")).addClass("modal-backdrop "+o).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",e.proxy(function(e){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){r.removeBackdrop(),t&&t()};e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):s()}else t&&t()},n.prototype.handleUpdate=function(){this.adjustDialog()},n.prototype.adjustDialog=function(){var e=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth<e,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",e+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},n.prototype.measureScrollbar=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",this.$body.append(e);var t=e.offsetWidth-e.clientWidth;return this.$body[0].removeChild(e),t};var r=e.fn.modal;e.fn.modal=t,e.fn.modal.Constructor=n,e.fn.modal.noConflict=function(){return e.fn.modal=r,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var r=e(this),o=r.attr("href"),i=e(r.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("bs.modal")?"toggle":e.extend({remote:!/#/.test(o)&&o},i.data(),r.data());r.is("a")&&n.preventDefault(),i.one("show.bs.modal",function(e){e.isDefaultPrevented()||i.one("hidden.bs.modal",function(){r.is(":visible")&&r.trigger("focus")})}),t.call(i,s,this)})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var r=e(this),o=r.data("bs.tooltip"),i="object"==typeof t&&t;(o||!/destroy|hide/.test(t))&&(o||r.data("bs.tooltip",o=new n(this,i)),"string"==typeof t&&o[t]())})}var n=function(e,t){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",e,t)};n.VERSION="3.3.5",n.TRANSITION_DURATION=150,n.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(t,n,r){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&e(e.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),i=o.length;i--;){var s=o[i];if("click"==s)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",u="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},n.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,r){n[e]!=r&&(t[e]=r)}),t},n.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusin"==t.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},n.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusout"==t.type?"focus":"hover"]=!1),n.isInStateTrue()?void 0:(clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide())},n.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var r=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!r)return;var o=this,i=this.tip(),s=this.getUID(this.type);this.setContent(),i.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&i.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,u=/\s?auto?\s?/i,l=u.test(a);l&&(a=a.replace(u,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),f=i[0].offsetWidth,p=i[0].offsetHeight;if(l){var d=a,h=this.getPosition(this.$viewport);a="bottom"==a&&c.bottom+p>h.bottom?"top":"top"==a&&c.top-p<h.top?"bottom":"right"==a&&c.right+f>h.width?"left":"left"==a&&c.left-f<h.left?"right":a,i.removeClass(d).addClass(a)}var m=this.getCalculatedOffset(a,c,f,p);this.applyPlacement(m,a);var g=function(){var e=o.hoverState;o.$element.trigger("shown.bs."+o.type),o.hoverState=null,"out"==e&&o.leave(o)};e.support.transition&&this.$tip.hasClass("fade")?i.one("bsTransitionEnd",g).emulateTransitionEnd(n.TRANSITION_DURATION):g()}},n.prototype.applyPlacement=function(t,n){var r=this.tip(),o=r[0].offsetWidth,i=r[0].offsetHeight,s=parseInt(r.css("margin-top"),10),a=parseInt(r.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),t.top+=s,t.left+=a,e.offset.setOffset(r[0],e.extend({using:function(e){r.css({top:Math.round(e.top),left:Math.round(e.left)})}},t),0),r.addClass("in");var u=r[0].offsetWidth,l=r[0].offsetHeight;"top"==n&&l!=i&&(t.top=t.top+i-l);var c=this.getViewportAdjustedDelta(n,t,u,l);c.left?t.left+=c.left:t.top+=c.top;var f=/top|bottom/.test(n),p=f?2*c.left-o+u:2*c.top-i+l,d=f?"offsetWidth":"offsetHeight";r.offset(t),this.replaceArrow(p,r[0][d],f)},n.prototype.replaceArrow=function(e,t,n){this.arrow().css(n?"left":"top",50*(1-e/t)+"%").css(n?"top":"left","")},n.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},n.prototype.hide=function(t){function r(){"in"!=o.hoverState&&i.detach(),o.$element.removeAttr("aria-describedby").trigger("hidden.bs."+o.type),t&&t()}var o=this,i=e(this.$tip),s=e.Event("hide.bs."+this.type);return this.$element.trigger(s),s.isDefaultPrevented()?void 0:(i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",r).emulateTransitionEnd(n.TRANSITION_DURATION):r(),this.hoverState=null,this)},n.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},n.prototype.hasContent=function(){return this.getTitle()},n.prototype.getPosition=function(t){t=t||this.$element;var n=t[0],r="BODY"==n.tagName,o=n.getBoundingClientRect();null==o.width&&(o=e.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var i=r?{top:0,left:0}:t.offset(),s={scroll:r?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},a=r?{width:e(window).width(),height:e(window).height()}:null;return e.extend({},o,s,a,i)},n.prototype.getCalculatedOffset=function(e,t,n,r){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-r,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},n.prototype.getViewportAdjustedDelta=function(e,t,n,r){var o={top:0,left:0};if(!this.$viewport)return o;var i=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(e)){var a=t.top-i-s.scroll,u=t.top+i-s.scroll+r;a<s.top?o.top=s.top-a:u>s.top+s.height&&(o.top=s.top+s.height-u)}else{var l=t.left-i,c=t.left+i+n;l<s.left?o.left=s.left-l:c>s.right&&(o.left=s.left+s.width-c)}return o},n.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},n.prototype.getUID=function(e){do e+=~~(1e6*Math.random());while(document.getElementById(e));return e},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(t){var n=this;t&&(n=e(t.currentTarget).data("bs."+this.type),n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),t?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide(function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null})};var r=e.fn.tooltip;e.fn.tooltip=t,e.fn.tooltip.Constructor=n,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=r,this}}(jQuery),+function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one("bsTransitionEnd",function(){n=!0});var o=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(o,t),this},e(function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){return e(t.target).is(this)?t.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),function(e,t){"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Spinner=t()}(this,function(){"use strict";function e(e,t){var n,r=document.createElement(e||"div");for(n in t)r[n]=t[n];return r}function t(e){for(var t=1,n=arguments.length;n>t;t++)e.appendChild(arguments[t]);return e}function n(e,t,n,r){var o=["opacity",t,~~(100*e),n,r].join("-"),i=.01+n/r*100,s=Math.max(1-(1-e)/t*(100-i),e),a=l.substring(0,l.indexOf("Animation")).toLowerCase(),u=a&&"-"+a+"-"||"";return f[o]||(p.insertRule("@"+u+"keyframes "+o+"{0%{opacity:"+s+"}"+i+"%{opacity:"+e+"}"+(i+.01)+"%{opacity:1}"+(i+t)%100+"%{opacity:"+e+"}100%{opacity:"+s+"}}",p.cssRules.length),f[o]=1),o}function r(e,t){var n,r,o=e.style;for(t=t.charAt(0).toUpperCase()+t.slice(1),r=0;r<c.length;r++)if(n=c[r]+t,void 0!==o[n])return n;return void 0!==o[t]?t:void 0}function o(e,t){for(var n in t)e.style[r(e,n)||n]=t[n];return e}function i(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)void 0===e[r]&&(e[r]=n[r])}return e}function s(e,t){return"string"==typeof e?e:e[t%e.length]}function a(e){this.opts=i(e||{},a.defaults,d)}function u(){function n(t,n){return e("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',n)}p.addRule(".spin-vml","behavior:url(#default#VML)"),a.prototype.lines=function(e,r){function i(){return o(n("group",{coordsize:c+" "+c,coordorigin:-l+" "+-l}),{width:c,height:c})}function a(e,a,u){t(p,t(o(i(),{rotation:360/r.lines*e+"deg",left:~~a}),t(o(n("roundrect",{arcsize:r.corners}),{width:l,height:r.width,left:r.radius,top:-r.width>>1,filter:u}),n("fill",{color:s(r.color,e),opacity:r.opacity}),n("stroke",{opacity:0}))))}var u,l=r.length+r.width,c=2*l,f=2*-(r.width+r.length)+"px",p=o(i(),{position:"absolute",top:f,left:f});if(r.shadow)for(u=1;u<=r.lines;u++)a(u,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(u=1;u<=r.lines;u++)a(u);return t(e,p)},a.prototype.opacity=function(e,t,n,r){var o=e.firstChild;r=r.shadow&&r.lines||0,o&&t+r<o.childNodes.length&&(o=o.childNodes[t+r],o=o&&o.firstChild,o=o&&o.firstChild,o&&(o.opacity=n))}}var l,c=["webkit","Moz","ms","O"],f={},p=function(){var n=e("style",{type:"text/css"});return t(document.getElementsByTagName("head")[0],n),n.sheet||n.styleSheet}(),d={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};a.defaults={},i(a.prototype,{spin:function(t){this.stop();var n=this,r=n.opts,i=n.el=o(e(0,{className:r.className}),{position:r.position,width:0,zIndex:r.zIndex});if(o(i,{left:r.left,top:r.top}),t&&t.insertBefore(i,t.firstChild||null),i.setAttribute("role","progressbar"),n.lines(i,n.opts),!l){var s,a=0,u=(r.lines-1)*(1-r.direction)/2,c=r.fps,f=c/r.speed,p=(1-r.opacity)/(f*r.trail/100),d=f/r.lines;!function h(){a++;for(var e=0;e<r.lines;e++)s=Math.max(1-(a+(r.lines-e)*d)%f*p,r.opacity),n.opacity(i,e*r.direction+u,s,r);n.timeout=n.el&&setTimeout(h,~~(1e3/c))}()}return n},stop:function(){var e=this.el;return e&&(clearTimeout(this.timeout),e.parentNode&&e.parentNode.removeChild(e),this.el=void 0),this},lines:function(r,i){function a(t,n){return o(e(),{position:"absolute",width:i.length+i.width+"px",height:i.width+"px",background:t,boxShadow:n,transformOrigin:"left",transform:"rotate("+~~(360/i.lines*c+i.rotate)+"deg) translate("+i.radius+"px,0)",borderRadius:(i.corners*i.width>>1)+"px"})}for(var u,c=0,f=(i.lines-1)*(1-i.direction)/2;c<i.lines;c++)u=o(e(),{position:"absolute",top:1+~(i.width/2)+"px",transform:i.hwaccel?"translate3d(0,0,0)":"",opacity:i.opacity,animation:l&&n(i.opacity,i.trail,f+c*i.direction,i.lines)+" "+1/i.speed+"s linear infinite"}),i.shadow&&t(u,o(a("#000","0 0 4px #000"),{top:"2px"})),t(r,t(u,a(s(i.color,c),"0 0 1px rgba(0,0,0,.1)")));return r},opacity:function(e,t,n){t<e.childNodes.length&&(e.childNodes[t].style.opacity=n)}});var h=o(e("group"),{behavior:"url(#default#VML)"});return!r(h,"transform")&&h.adj?u():l=r(h,"animation"),a}),function(e){if("object"==typeof exports)e(require("jquery"),require("spin.js"));else if("function"==typeof define&&define.amd)define(["jquery","spin"],e);else{if(!window.Spinner)throw new Error("Spin.js not present");e(window.jQuery,window.Spinner)}}(function(e,t){e.fn.spin=function(n,r){return this.each(function(){var o=e(this),i=o.data();i.spinner&&(i.spinner.stop(),delete i.spinner),n!==!1&&(n=e.extend({color:r||o.css("color")},e.fn.spin.presets[n]||n),i.spinner=new t(n).spin(this))})},e.fn.spin.presets={tiny:{lines:8,length:2,width:2,radius:3},small:{lines:8,length:4,width:3,radius:5},large:{lines:10,length:8,width:4,radius:8}}}),function(){"use strict";function e(t,r){function o(e,t){return function(){return e.apply(t,arguments)}}var i;if(r=r||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=r.touchBoundary||10,this.layer=t,this.tapDelay=r.tapDelay||200,this.tapTimeout=r.tapTimeout||700,!e.notNeeded(t)){for(var s=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],a=this,u=0,l=s.length;l>u;u++)a[s[u]]=o(a[s[u]],a);n&&(t.addEventListener("mouseover",this.onMouse,!0),t.addEventListener("mousedown",this.onMouse,!0),t.addEventListener("mouseup",this.onMouse,!0)),t.addEventListener("click",this.onClick,!0),t.addEventListener("touchstart",this.onTouchStart,!1),t.addEventListener("touchmove",this.onTouchMove,!1),t.addEventListener("touchend",this.onTouchEnd,!1),t.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(t.removeEventListener=function(e,n,r){var o=Node.prototype.removeEventListener;"click"===e?o.call(t,e,n.hijacked||n,r):o.call(t,e,n,r)},t.addEventListener=function(e,n,r){var o=Node.prototype.addEventListener;"click"===e?o.call(t,e,n.hijacked||(n.hijacked=function(e){e.propagationStopped||n(e)}),r):o.call(t,e,n,r)}),"function"==typeof t.onclick&&(i=t.onclick,t.addEventListener("click",function(e){i(e)},!1),t.onclick=null)}}var t=navigator.userAgent.indexOf("Windows Phone")>=0,n=navigator.userAgent.indexOf("Android")>0&&!t,r=/iP(ad|hone|od)/.test(navigator.userAgent)&&!t,o=r&&/OS 4_\d(_\d)?/.test(navigator.userAgent),i=r&&/OS [6-7]_\d/.test(navigator.userAgent),s=navigator.userAgent.indexOf("BB10")>0;e.prototype.needsClick=function(e){switch(e.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(e.disabled)return!0;break;case"input":if(r&&"file"===e.type||e.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(e.className)},e.prototype.needsFocus=function(e){switch(e.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!n;case"input":switch(e.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!e.disabled&&!e.readOnly;default:return/\bneedsfocus\b/.test(e.className)}},e.prototype.sendClick=function(e,t){var n,r;document.activeElement&&document.activeElement!==e&&document.activeElement.blur(),r=t.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(e),!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,e.dispatchEvent(n)},e.prototype.determineEventType=function(e){return n&&"select"===e.tagName.toLowerCase()?"mousedown":"click"},e.prototype.focus=function(e){var t;r&&e.setSelectionRange&&0!==e.type.indexOf("date")&&"time"!==e.type&&"month"!==e.type?(t=e.value.length,e.setSelectionRange(t,t)):e.focus()},e.prototype.updateScrollParent=function(e){var t,n;if(t=e.fastClickScrollParent,!t||!t.contains(e)){n=e;do{if(n.scrollHeight>n.offsetHeight){t=n,e.fastClickScrollParent=n;break}n=n.parentElement}while(n)}t&&(t.fastClickLastScrollTop=t.scrollTop)},e.prototype.getTargetElementFromEventTarget=function(e){return e.nodeType===Node.TEXT_NODE?e.parentNode:e},e.prototype.onTouchStart=function(e){var t,n,i;if(e.targetTouches.length>1)return!0;if(t=this.getTargetElementFromEventTarget(e.target),n=e.targetTouches[0],r){if(i=window.getSelection(),i.rangeCount&&!i.isCollapsed)return!0;if(!o){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return e.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(t)}}return this.trackingClick=!0,this.trackingClickStart=e.timeStamp,this.targetElement=t,this.touchStartX=n.pageX,this.touchStartY=n.pageY,e.timeStamp-this.lastClickTime<this.tapDelay&&e.preventDefault(),!0},e.prototype.touchHasMoved=function(e){var t=e.changedTouches[0],n=this.touchBoundary;return Math.abs(t.pageX-this.touchStartX)>n||Math.abs(t.pageY-this.touchStartY)>n?!0:!1},e.prototype.onTouchMove=function(e){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(e.target)||this.touchHasMoved(e))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},e.prototype.findControl=function(e){return void 0!==e.control?e.control:e.htmlFor?document.getElementById(e.htmlFor):e.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},e.prototype.onTouchEnd=function(e){var t,s,a,u,l,c=this.targetElement;if(!this.trackingClick)return!0;if(e.timeStamp-this.lastClickTime<this.tapDelay)return this.cancelNextClick=!0,!0;if(e.timeStamp-this.trackingClickStart>this.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=e.timeStamp,s=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,i&&(l=e.changedTouches[0],c=document.elementFromPoint(l.pageX-window.pageXOffset,l.pageY-window.pageYOffset)||c,c.fastClickScrollParent=this.targetElement.fastClickScrollParent),a=c.tagName.toLowerCase(),"label"===a){if(t=this.findControl(c)){if(this.focus(c),n)return!1;c=t}}else if(this.needsFocus(c))return e.timeStamp-s>100||r&&window.top!==window&&"input"===a?(this.targetElement=null,!1):(this.focus(c),this.sendClick(c,e),r&&"select"===a||(this.targetElement=null,e.preventDefault()),!1);return r&&!o&&(u=c.fastClickScrollParent,u&&u.fastClickLastScrollTop!==u.scrollTop)?!0:(this.needsClick(c)||(e.preventDefault(),this.sendClick(c,e)),!1)},e.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},e.prototype.onMouse=function(e){return this.targetElement?e.forwardedTouchEvent?!0:e.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(e.stopImmediatePropagation?e.stopImmediatePropagation():e.propagationStopped=!0,e.stopPropagation(),e.preventDefault(),!1):!0:!0},e.prototype.onClick=function(e){var t;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===e.target.type&&0===e.detail?!0:(t=this.onMouse(e),t||(this.targetElement=null),t)},e.prototype.destroy=function(){var e=this.layer;n&&(e.removeEventListener("mouseover",this.onMouse,!0),e.removeEventListener("mousedown",this.onMouse,!0),e.removeEventListener("mouseup",this.onMouse,!0)),e.removeEventListener("click",this.onClick,!0),e.removeEventListener("touchstart",this.onTouchStart,!1),e.removeEventListener("touchmove",this.onTouchMove,!1),e.removeEventListener("touchend",this.onTouchEnd,!1),e.removeEventListener("touchcancel",this.onTouchCancel,!1)},e.notNeeded=function(e){var t,r,o,i;if("undefined"==typeof window.ontouchstart)return!0;if(r=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!n)return!0;if(t=document.querySelector("meta[name=viewport]")){if(-1!==t.content.indexOf("user-scalable=no"))return!0;if(r>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(s&&(o=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),o[1]>=10&&o[2]>=3&&(t=document.querySelector("meta[name=viewport]")))){if(-1!==t.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===e.style.msTouchAction||"manipulation"===e.style.touchAction?!0:(i=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],i>=27&&(t=document.querySelector("meta[name=viewport]"),t&&(-1!==t.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===e.style.touchAction||"manipulation"===e.style.touchAction?!0:!1)},e.attach=function(t,n){return new e(t,n)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return e}):"undefined"!=typeof module&&module.exports?(module.exports=e.attach,module.exports.FastClick=e):window.FastClick=e}(),System.register("flarum/ForumApp",["flarum/utils/History","flarum/App","flarum/components/Search","flarum/components/Composer","flarum/components/ReplyComposer","flarum/components/DiscussionPage","flarum/components/SignUpModal"],function(e){"use strict";var t,n,r,o,i,s,a,u;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]}],execute:function(){u=function(e){function n(){babelHelpers.classCallCheck(this,n);for(var e=arguments.length,o=Array(e),i=0;e>i;i++)o[i]=arguments[i];babelHelpers.get(Object.getPrototypeOf(n.prototype),"constructor",this).apply(this,o),this.history=new t,this.pane=null,this.search=new r,this.drawer=null,this.postComponents={},this.notificationComponents={}}return babelHelpers.inherits(n,e),babelHelpers.createClass(n,[{key:"composingReplyTo",value:function(e){return this.composer.component instanceof i&&this.composer.component.props.discussion===e&&this.composer.position!==o.PositionEnum.HIDDEN}},{key:"viewingDiscussion",value:function(e){return this.current instanceof s&&this.current.discussion===e}},{key:"authenticationComplete",value:function(e){if(e.authenticated)window.location.reload();else{var t=new a(e);this.modal.show(t),t.$("[name=password]").focus()}}}]),n}(n),e("default",u)}}}),System.register("flarum/app",["flarum/ForumApp","flarum/initializers/store","flarum/initializers/preload","flarum/initializers/routes","flarum/initializers/components","flarum/initializers/humanTime","flarum/initializers/boot"],function(e){"use strict";var t,n,r,o,i,s,a,u;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]}],execute:function(){u=new t,u.initializers.add("store",n),u.initializers.add("routes",o),u.initializers.add("components",i),u.initializers.add("humanTime",s),u.initializers.add("preload",r,-100),u.initializers.add("boot",a,-100),e("default",u)}}}),System.register("flarum/initializers/boot",["flarum/utils/ScrollListener","flarum/utils/Pane","flarum/utils/Drawer","flarum/utils/mapRoutes","flarum/components/Navigation","flarum/components/HeaderPrimary","flarum/components/HeaderSecondary","flarum/components/Composer","flarum/components/ModalManager","flarum/components/AlertManager"],function(e){"use strict";function t(e){var t=e.forum.attribute("defaultRoute"),p="index";for(var d in e.routes)e.routes[d].path===t&&(p=d);e.routes[p].path="/",e.history.push(p,"/"),m.startComputation(),m.mount(document.getElementById("app-navigation"),s.component({className:"App-backControl",drawer:!0})),m.mount(document.getElementById("header-navigation"),s.component()),m.mount(document.getElementById("header-primary"),a.component()),m.mount(document.getElementById("header-secondary"),u.component()),e.pane=new r(document.getElementById("app")),e.drawer=new o,e.composer=m.mount(document.getElementById("composer"),l.component()),e.modal=m.mount(document.getElementById("modal"),c.component()),e.alerts=m.mount(document.getElementById("alerts"),f.component());var h=e.forum.attribute("basePath");m.route.mode="pathname",m.route(document.getElementById("content"),h+"/",i(e.routes,h)),m.endComputation(),$("#home-link").click(function(t){t.ctrlKey||t.metaKey||2===t.which||(t.preventDefault(),e.history.home())}),new n(function(e){var t=$("#app"),n=t.offset().top;t.toggleClass("affix",e>=n).toggleClass("scrolled",e>n)}).start(),$(function(){FastClick.attach(document.body),$("body").addClass("ontouchstart"in window?"touch":"no-touch")}),e.booted=!0}var n,r,o,i,s,a,u,l,c,f;return e("default",t),{setters:[function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]},function(e){u=e["default"]},function(e){l=e["default"]},function(e){c=e["default"]},function(e){f=e["default"]}],execute:function(){}}}),System.register("flarum/initializers/components",["flarum/components/CommentPost","flarum/components/DiscussionRenamedPost","flarum/components/PostedActivity","flarum/components/JoinedActivity","flarum/components/DiscussionRenamedNotification"],function(e){"use strict";function t(e){e.postComponents.comment=n,e.postComponents.discussionRenamed=r,e.notificationComponents.discussionRenamed=s}var n,r,o,i,s;return e("default",t),{setters:[function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]}],execute:function(){}}}),System.register("flarum/initializers/routes",["flarum/components/IndexPage","flarum/components/DiscussionPage","flarum/components/PostsUserPage","flarum/components/DiscussionsUserPage","flarum/components/SettingsPage","flarum/components/NotificationsPage"],function(e){"use strict";var t,n,r,o,i,s;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]}],execute:function(){e("default",function(e){e.routes={index:{path:"/all",component:t.component()},"index.filter":{path:"/:filter",component:t.component()},discussion:{path:"/d/:id",component:n.component()},"discussion.near":{path:"/d/:id/:near",component:n.component()},user:{path:"/u/:username",component:r.component()},"user.posts":{path:"/u/:username",component:r.component()},"user.discussions":{path:"/u/:username/discussions",component:o.component()},settings:{path:"/settings",component:i.component()},notifications:{path:"/notifications",component:s.component()
}},e.route.discussion=function(t,n){return e.route(n&&1!==n?"discussion.near":"discussion",{id:t.id()+"-"+t.slug(),near:n&&1!==n?n:void 0})},e.route.post=function(t){return e.route.discussion(t.discussion(),t.number())},e.route.user=function(t){return e.route("user",{username:t.username()})}})}}}),System.register("flarum/utils/DiscussionControls",["flarum/components/DiscussionPage","flarum/components/ReplyComposer","flarum/components/LogInModal","flarum/components/Button","flarum/components/Separator","flarum/utils/ItemList","flarum/utils/extractText"],function(e){"use strict";var t,n,r,o,i,s,a;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]}],execute:function(){e("default",{controls:function(e,t){var n=this,r=new s;return["user","moderation","destructive"].forEach(function(o){var s=n[o+"Controls"](e,t).toArray();s.length&&(s.forEach(function(e){return r.add(e.itemName,e)}),r.add(o+"Separator",i.component()))}),r},userControls:function(e,n){var r=new s;return n instanceof t&&r.add("reply",!app.session.user||e.canReply()?o.component({icon:"reply",children:app.trans(app.session.user?"core.forum.discussion_controls_reply_button":"core.forum.discussion_controls_log_in_to_reply_button"),onclick:this.replyAction.bind(e,!0,!1)}):o.component({icon:"reply",children:app.trans("core.forum.discussion_controls_cannot_reply_button"),className:"disabled",title:app.trans("core.forum.discussion_controls_cannot_reply_text")})),r},moderationControls:function(e){var t=new s;return e.canRename()&&t.add("rename",o.component({icon:"pencil",children:app.trans("core.forum.discussion_controls_rename_button"),onclick:this.renameAction.bind(e)})),t},destructiveControls:function(e){var t=new s;return e.isHidden()?e.canDelete()&&(t.add("restore",o.component({icon:"reply",children:app.trans("core.forum.discussion_controls_restore_button"),onclick:this.restoreAction.bind(e),disabled:0===e.commentsCount()})),t.add("delete",o.component({icon:"times",children:app.trans("core.forum.discussion_controls_delete_forever_button"),onclick:this.deleteAction.bind(e)}))):e.canHide()&&t.add("hide",o.component({icon:"trash-o",children:app.trans("core.forum.discussion_controls_delete_button"),onclick:this.hideAction.bind(e)})),t},replyAction:function(e,t){var o=this,i=m.deferred(),s=function(){if(o.canReply()){e&&app.viewingDiscussion(o)&&app.current.stream.goToLast();var r=app.composer.component;(!app.composingReplyTo(o)||t)&&(r=new n({user:app.session.user,discussion:o}),app.composer.load(r)),app.composer.show(),i.resolve(r)}else i.reject()};return app.session.user?s():app.modal.show(new r({onlogin:function(){return app.current.one("loaded",s)}})),i.promise},hideAction:function(){return this.pushAttributes({hideTime:new Date,hideUser:app.session.user}),this.save({isHidden:!0})},restoreAction:function(){return this.pushAttributes({hideTime:null,hideUser:null}),this.save({isHidden:!1})},deleteAction:function(){return confirm(a(app.trans("core.forum.discussion_controls_delete_confirmation")))?(app.cache.discussionList&&app.cache.discussionList.removeDiscussion(this),app.viewingDiscussion(this)&&app.history.back(),this["delete"]()):void 0},renameAction:function(){var e=this,t=this.title(),n=prompt(a(app.trans("core.forum.discussion_controls_rename_text")),t);return n&&n!==t?this.save({title:n}).then(function(){app.viewingDiscussion(e)&&app.current.stream.update(),m.redraw()}):void 0}})}}}),System.register("flarum/utils/History",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(t){babelHelpers.classCallCheck(this,e),this.stack=[]}return babelHelpers.createClass(e,[{key:"getTop",value:function(){return this.stack[this.stack.length-1]}},{key:"push",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?m.route():arguments[1],n=this.stack[this.stack.length-2];n&&n.name===e&&this.stack.pop();var r=this.getTop();r&&r.name===e?r.url=t:this.stack.push({name:e,url:t})}},{key:"canGoBack",value:function(){return this.stack.length>1}},{key:"back",value:function(){this.stack.pop(),m.route(this.getTop().url)}},{key:"backUrl",value:function(){var e=this.stack[this.stack.length-2];return e.url}},{key:"home",value:function(){this.stack.splice(1),m.route("/")}}]),e}(),e("default",t)}}}),System.register("flarum/utils/Pane",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(t){babelHelpers.classCallCheck(this,e),this.pinnedKey="panePinned",this.$element=$(t),this.pinned="true"===localStorage.getItem(this.pinnedKey),this.active=!1,this.showing=!1,this.render()}return babelHelpers.createClass(e,[{key:"enable",value:function(){this.active=!0,this.render()}},{key:"disable",value:function(){this.active=!1,this.showing=!1,this.render()}},{key:"show",value:function(){clearTimeout(this.hideTimeout),this.showing=!0,this.render()}},{key:"hide",value:function(){this.showing=!1,this.render()}},{key:"onmouseleave",value:function(){this.hideTimeout=setTimeout(this.hide.bind(this),250)}},{key:"togglePinned",value:function(){this.pinned=!this.pinned,localStorage.setItem(this.pinnedKey,this.pinned?"true":"false"),this.render()}},{key:"render",value:function(){this.$element.toggleClass("panePinned",this.pinned).toggleClass("hasPane",this.active).toggleClass("paneShowing",this.showing)}}]),e}(),e("default",t)}}}),System.register("flarum/utils/PostControls",["flarum/components/EditPostComposer","flarum/components/Button","flarum/components/Separator","flarum/utils/ItemList"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){e("default",{controls:function(e,t){var n=this,i=new o;return["user","moderation","destructive"].forEach(function(o){var s=n[o+"Controls"](e,t).toArray();s.length&&(s.forEach(function(e){return i.add(e.itemName,e)}),i.add(o+"Separator",r.component()))}),i},userControls:function(){return new o},moderationControls:function(e){var t=new o;return"comment"===e.contentType()&&e.canEdit()&&(e.isHidden()||t.add("edit",n.component({icon:"pencil",children:app.trans("core.forum.post_controls_edit_button"),onclick:this.editAction.bind(e)}))),t},destructiveControls:function(e){var t=new o;return"comment"!==e.contentType()||e.isHidden()?(e.canEdit()&&t.add("restore",n.component({icon:"reply",children:app.trans("core.forum.post_controls_restore_button"),onclick:this.restoreAction.bind(e)})),e.canDelete()&&1!==e.number()&&t.add("delete",n.component({icon:"times",children:app.trans("core.forum.post_controls_delete_forever_button"),onclick:this.deleteAction.bind(e)}))):e.canEdit()&&t.add("hide",n.component({icon:"trash-o",children:app.trans("core.forum.post_controls_delete_button"),onclick:this.hideAction.bind(e)})),t},editAction:function(){app.composer.load(new t({post:this})),app.composer.show()},hideAction:function(){return this.pushAttributes({hideTime:new Date,hideUser:app.session.user}),this.save({isHidden:!0}).then(function(){return m.redraw()})},restoreAction:function(){return this.pushAttributes({hideTime:null,hideUser:null}),this.save({isHidden:!1}).then(function(){return m.redraw()})},deleteAction:function(){return this.discussion().removePost(this.id()),this["delete"]()}})}}}),System.register("flarum/utils/UserControls",["flarum/components/Button","flarum/components/Separator","flarum/components/EditUserModal","flarum/components/UserPage","flarum/utils/ItemList"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]}],execute:function(){e("default",{controls:function(e,t){var r=this,o=new i;return["user","moderation","destructive"].forEach(function(i){var s=r[i+"Controls"](e,t).toArray();s.length&&(s.forEach(function(e){return o.add(e.itemName,e)}),o.add(i+"Separator",n.component()))}),o},userControls:function(){return new i},moderationControls:function(e){var n=new i;return e.canEdit()&&n.add("edit",t.component({icon:"pencil",children:app.trans("core.forum.user_controls_edit_button"),onclick:this.editAction.bind(e)})),n},destructiveControls:function(e){var n=new i;return"1"!==e.id()&&e.canDelete()&&n.add("delete",t.component({icon:"times",children:app.trans("core.forum.user_controls_delete_button"),onclick:this.deleteAction.bind(e)})),n},deleteAction:function(){var e=this;confirm("Are you sure you want to delete this user? All of the user's posts will be deleted.")&&this["delete"]().then(function(){app.current instanceof o&&app.current.user===e?app.history.back():window.location.reload()})},editAction:function(){app.modal.show(new r({user:this}))}})}}}),System.register("flarum/utils/affixSidebar",[],function(e){"use strict";function t(e,t){var n=this;if(!t){var r=$(e),o=$("#header"),i=$("#footer");r.outerHeight(!0)>$(window).height()-o.outerHeight(!0)||r.find("> ul").affix({offset:{top:function(){return r.offset().top-o.outerHeight(!0)-parseInt(r.css("margin-top"),10)},bottom:function(){return n.bottom=i.outerHeight(!0)}}})}}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/slidable",[],function(e){"use strict";function t(e){var t=$(e),n=50,r=void 0,o=void 0,i=void 0,s=void 0,a=!1,u=!1,l=0,c=function(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];n.duration=n.duration||"fast",n.step=function(e){$(this).css("transform","translate("+e+"px, 0)")},t.find(".Slidable-content").animate({"background-position-x":e},n)},f=function(){c(0,{complete:function(){t.removeClass("sliding"),r.hide(),o.hide(),u=!1}})};return t.find(".Slidable-content").on("touchstart",function(e){r=t.find(".Slidable-underneath--left:not(.disabled)"),o=t.find(".Slidable-underneath--right:not(.disabled)"),i=e.originalEvent.targetTouches[0].clientX,s=e.originalEvent.targetTouches[0].clientY,a=!0,l=0}).on("touchmove",function(e){var c=e.originalEvent.targetTouches[0].clientX,f=e.originalEvent.targetTouches[0].clientY;if(a&&Math.abs(c-i)>Math.abs(f-s)&&(u=!0),a=!1,u){l=c-i;var p=function(e,t){if(e.length){var r="left"===t?l>0:0>l;r&&e.hasClass("Slidable-underneath--elastic")&&(l-=.5*l),e.toggle(r);var o=Math.max(0,Math.min(1,(Math.abs(l)-25)/n));e.find(".icon").css("transform","scale("+o+")")}else l=Math["left"===t?"min":"max"](0,l)};p(r,"left"),p(o,"right"),$(this).css("transform","translate("+l+"px, 0)"),$(this).css("background-position-x",l+"px"),t.toggleClass("sliding",!!l),e.preventDefault()}}).on("touchend",function(){var e=function(e){e.click(),e.hasClass("Slidable-underneath--elastic")?f():c((l>0?1:-1)*t.width())};o.length&&-n>l?e(o):r.length&&l>n?e(r):f(),a=!1,u=!1}),{reset:f}}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/components/AvatarEditor",["flarum/Component","flarum/helpers/avatar","flarum/helpers/icon","flarum/helpers/listItems","flarum/utils/ItemList","flarum/components/Button","flarum/components/LoadingIndicator"],function(e){"use strict";var t,n,r,o,i,s,a,u;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]}],execute:function(){u=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.loading=!1}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this.props.user;return m("div",{className:"AvatarEditor Dropdown "+this.props.className+(this.loading?" loading":"")},n(e),m("a",{className:"Dropdown-toggle","data-toggle":"dropdown",onclick:this.quickUpload.bind(this)},this.loading?a.component():r("pencil")),m("ul",{className:"Dropdown-menu Menu"},o(this.controlItems().toArray())))}},{key:"controlItems",value:function(){var e=new i;return e.add("upload",s.component({icon:"upload",children:app.trans("core.forum.user_avatar_upload_button"),onclick:this.upload.bind(this)})),e.add("remove",s.component({icon:"times",children:app.trans("core.forum.user_avatar_remove_button"),onclick:this.remove.bind(this)})),e}},{key:"quickUpload",value:function(e){this.props.user.avatarUrl()||(e.preventDefault(),e.stopPropagation(),this.upload())}},{key:"upload",value:function(){var e=this;if(!this.loading){var t=this.props.user,n=$('<input type="file">');n.appendTo("body").hide().click().on("change",function(n){var r=new FormData;r.append("avatar",$(n.target)[0].files[0]),e.loading=!0,m.redraw(),app.request({method:"POST",url:app.forum.attribute("apiUrl")+"/users/"+t.id()+"/avatar",serialize:function(e){return e},data:r}).then(e.success.bind(e),e.failure.bind(e))})}}},{key:"remove",value:function(){var e=this.props.user;this.loading=!0,m.redraw(),app.request({method:"DELETE",url:app.forum.attribute("apiUrl")+"/users/"+e.id()+"/avatar"}).then(this.success.bind(this),this.failure.bind(this))}},{key:"success",value:function(e){app.store.pushPayload(e),delete this.props.user.avatarColor,this.loading=!1,m.redraw()}},{key:"failure",value:function(){this.loading=!1}}],[{key:"initProps",value:function(e){babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e),e.className=e.className||""}}]),t}(t),e("default",u)}}}),System.register("flarum/components/ChangeEmailModal",["flarum/components/Modal","flarum/components/Button"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.success=!1,this.email=m.prop(app.session.user.email())}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"className",value:function(){return"ChangeEmailModal Modal--small"}},{key:"title",value:function(){return app.trans("core.forum.change_email_title")}},{key:"content",value:function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.trans("core.forum.change_email_confirmation_message",{email:m("strong",null,this.email())})),m("div",{className:"Form-group"},m(n,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},app.trans("core.forum.change_email_dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{type:"email",name:"email",className:"FormControl",placeholder:app.session.user.email(),value:this.email(),onchange:m.withAttr("value",this.email),disabled:this.loading})),m("div",{className:"Form-group"},n.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading,children:app.trans("core.forum.change_email_submit_button")}))))}},{key:"onsubmit",value:function(e){var t=this;return e.preventDefault(),this.email()===app.session.user.email()?void this.hide():(this.loading=!0,void app.session.user.save({email:this.email()}).then(function(){t.loading=!1,t.success=!0,m.redraw()},function(e){t.loading=!1,t.handleErrors(e)}))}}]),t}(t),e("default",r)}}}),System.register("flarum/components/ChangePasswordModal",["flarum/components/Modal","flarum/components/Button"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"className",value:function(){return"ChangePasswordModal Modal--small"}},{key:"title",value:function(){return app.trans("core.forum.change_password_title")}},{key:"content",value:function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.trans("core.forum.change_password_text")),m("div",{className:"Form-group"},n.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading,children:app.trans("core.forum.change_password_send_button")}))))}},{key:"onsubmit",value:function(e){var t=this;e.preventDefault(),this.loading=!0,app.request({method:"POST",url:app.forum.attribute("apiUrl")+"/forgot",data:{email:app.session.user.email()}}).then(function(){return t.hide()},function(){return t.loading=!1})}}]),t}(t),e("default",r)}}}),System.register("flarum/components/CommentPost",["flarum/components/Post","flarum/utils/classList","flarum/components/PostUser","flarum/components/PostMeta","flarum/components/PostEdited","flarum/components/EditPostComposer","flarum/components/Composer","flarum/utils/ItemList","flarum/helpers/listItems","flarum/components/Button"],function(e){"use strict";var t,n,r,o,i,s,a,u,l,c,f;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]},function(e){u=e["default"]},function(e){l=e["default"]},function(e){c=e["default"]}],execute:function(){f=function(e){function t(){var e=this;babelHelpers.classCallCheck(this,t);for(var n=arguments.length,o=Array(n),i=0;n>i;i++)o[i]=arguments[i];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,o),this.revealContent=!1,this.postUser=new r({post:this.props.post}),this.subtree.check(function(){return e.postUser.cardVisible},function(){return e.isEditing()})}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"content",value:function(){return[m("header",{className:"Post-header"},m("ul",null,l(this.headerItems().toArray()))),m("div",{className:"Post-body"},this.isEditing()?m("div",{className:"Post-preview",config:this.configPreview.bind(this)}):m.trust(this.props.post.contentHtml()))]}},{key:"config",value:function(e,n){babelHelpers.get(Object.getPrototypeOf(t.prototype),"config",this).apply(this,arguments);var r=this.isEditing()?"":this.props.post.contentHtml();n.contentHtml!==r&&("undefined"==typeof hljs?this.loadHljs():this.$("pre code").each(function(e,t){hljs.highlightBlock(t)})),n.contentHtml=r}},{key:"loadHljs",value:function(){var e=document.getElementsByTagName("head")[0],t=document.createElement("link");t.type="text/css",t.rel="stylesheet",t.href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/default.min.css",e.appendChild(t);var n=document.createElement("script");n.type="text/javascript",n.onload=function(){hljs._={},hljs.initHighlighting()},n.async=!0,n.src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js",e.appendChild(n)}},{key:"isEditing",value:function(){return app.composer.component instanceof s&&app.composer.component.props.post===this.props.post&&app.composer.position!==a.PositionEnum.MINIMIZED}},{key:"attrs",value:function(){var e=this.props.post;return{className:n({CommentPost:!0,"Post--hidden":e.isHidden(),"Post--edited":e.isEdited(),revealContent:this.revealContent,editing:this.isEditing()})}}},{key:"configPreview",value:function(e,t,n){if(!t){var r=void 0,o=function(){var t=app.composer.component.content();r!==t&&(r=t,s9e.TextFormatter.preview(r||"",e))};o();var i=setInterval(o,50);n.onunload=function(){return clearInterval(i)}}}},{key:"toggleContent",value:function(){this.revealContent=!this.revealContent}},{key:"headerItems",value:function(){var e=new u,t=this.props.post,n={post:t};return e.add("user",this.postUser.render(),100),e.add("meta",o.component(n)),t.isEdited()&&!t.isHidden()&&e.add("edited",i.component(n)),t.isHidden()&&e.add("toggle",c.component({className:"Button Button--default Button--more",icon:"ellipsis-h",onclick:this.toggleContent.bind(this)})),e}}]),t}(t),e("default",f)}}}),System.register("flarum/components/Composer",["flarum/Component","flarum/utils/ItemList","flarum/components/ComposerButton","flarum/helpers/listItems","flarum/utils/classList","flarum/utils/computed"],function(e){"use strict";var t,n,r,o,i,s,a;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]}],execute:function(){a=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.position=t.PositionEnum.HIDDEN,this.oldPosition=null,this.height=null,this.active=!1,this.computedHeight=s("height","position",function(e,n){return n===t.PositionEnum.MINIMIZED?"":n===t.PositionEnum.FULLSCREEN?$(window).height():Math.max(200,Math.min(e,$(window).height()-$("#header").outerHeight()))})}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this,n={minimized:this.position===t.PositionEnum.MINIMIZED,fullScreen:this.position===t.PositionEnum.FULLSCREEN,active:this.active};n.visible=this.position===t.PositionEnum.NORMAL||n.minimized||n.fullScreen,this.component&&(this.component.props.disabled=n.minimized);var r=function(){e.position===t.PositionEnum.MINIMIZED&&e.show(),m.redraw.strategy("none")};return m("div",{className:"Composer "+i(n)},m("div",{className:"Composer-handle",config:this.configHandle.bind(this)}),m("ul",{className:"Composer-controls"},o(this.controlItems().toArray())),m("div",{className:"Composer-content",onclick:r},this.component?this.component.render():""))}},{key:"config",value:function(e,t){var n=this;if(this.updateHeight(),!e){t.retain=!0,this.height=localStorage.getItem("composerHeight")||this.$().height(),this.$().hide().css("bottom",-this.height),this.$().on("focus blur",":input",function(e){n.active="focusin"===e.type,m.redraw()}),this.$().on("keydown",":input","esc",function(){return n.close()}),window.onbeforeunload=function(){return n.component&&n.component.preventExit()||void 0};var r={};$(window).on("resize",r.onresize=this.updateHeight.bind(this)).resize(),$(document).on("mousemove",r.onmousemove=this.onmousemove.bind(this)).on("mouseup",r.onmouseup=this.onmouseup.bind(this)),t.onunload=function(){$(window).off("resize",r.onresize),$(document).off("mousemove",r.onmousemove).off("mouseup",r.onmouseup)}}}},{key:"configHandle",value:function(e,t){if(!t){var n=this;$(e).css("cursor","row-resize").bind("dragstart mousedown",function(e){return e.preventDefault()}).mousedown(function(e){n.mouseStart=e.clientY,n.heightStart=n.$().height(),n.handle=$(this),$("body").css("cursor","row-resize")})}}},{key:"onmousemove",value:function(e){if(this.handle){var t=this.mouseStart-e.clientY;this.height=this.heightStart+t,this.updateHeight();var n=$(window).scrollTop(),r=n>0&&n+$(window).height()>=$(document).height();this.updateBodyPadding(r),localStorage.setItem("composerHeight",this.height)}}},{key:"onmouseup",value:function(){this.handle&&(this.handle=null,$("body").css("cursor",""))}},{key:"updateHeight",value:function(){var e=this.computedHeight(),t=this.$(".TextEditor-flexible");if(this.$().height(e),t.length){var n=t.offset().top-this.$().offset().top,r=parseInt(t.css("padding-bottom"),10),o=this.$(".TextEditor-controls").outerHeight(!0);t.height(e-n-r-o)}}},{key:"updateBodyPadding",value:function(){var e=this.position!==t.PositionEnum.HIDDEN&&this.position!==t.PositionEnum.MINIMIZED,n=e?this.computedHeight()-parseInt($("#app").css("padding-bottom"),10):0;$("#content").css({paddingBottom:n})}},{key:"update",value:function(){var e=this,n=this.$().stop(!0),r=n.is(":visible")?n.outerHeight():0,o=$(window).scrollTop();m.redraw(!0),n.show(),this.updateHeight();var i=n.outerHeight();switch(this.position){case t.PositionEnum.NORMAL:this.oldPosition!==t.PositionEnum.FULLSCREEN?(n.show().css({height:r}).animate({bottom:0,height:i},"fast",this.component.focus.bind(this.component)),"absolute"===n.css("position")&&(n.css("top",$(window).scrollTop()),this.$backdrop=$("<div/>").addClass("composer-backdrop").appendTo("body"))):this.component.focus();break;case t.PositionEnum.MINIMIZED:n.css({top:"auto",height:r}).animate({height:i},"fast"),this.$backdrop&&this.$backdrop.remove();break;case t.PositionEnum.HIDDEN:n.css({top:"auto",height:r}).animate({bottom:-i},"fast",function(){n.hide(),e.clear(),m.redraw()}),this.$backdrop&&this.$backdrop.remove();break;case t.PositionEnum.FULLSCREEN:this.component.focus()}this.position!==t.PositionEnum.FULLSCREEN&&(this.updateBodyPadding(),$("html, body").scrollTop(o)),this.oldPosition=this.position}},{key:"preventExit",value:function a(){if(this.component){var a=this.component.preventExit();if(a)return!confirm(a)}}},{key:"load",value:function(e){this.preventExit()||(this.component&&(this.clear(),m.redraw(!0)),this.component=e)}},{key:"clear",value:function(){this.component=null}},{key:"show",value:function(){-1!==[t.PositionEnum.MINIMIZED,t.PositionEnum.HIDDEN].indexOf(this.position)&&(this.position=t.PositionEnum.NORMAL),this.update()}},{key:"hide",value:function(){this.position=t.PositionEnum.HIDDEN,this.update()}},{key:"close",value:function(){this.preventExit()||this.hide()}},{key:"minimize",value:function(){this.position!==t.PositionEnum.HIDDEN&&(this.position=t.PositionEnum.MINIMIZED,this.update())}},{key:"fullScreen",value:function(){this.position!==t.PositionEnum.HIDDEN&&(this.position=t.PositionEnum.FULLSCREEN,this.update())}},{key:"exitFullScreen",value:function(){this.position===t.PositionEnum.FULLSCREEN&&(this.position=t.PositionEnum.NORMAL,this.update())}},{key:"controlItems",value:function(){var e=new n;return this.position===t.PositionEnum.FULLSCREEN?e.add("exitFullScreen",r.component({icon:"compress",title:app.trans("core.forum.composer_exit_full_screen_tooltip"),onclick:this.exitFullScreen.bind(this)})):(this.position!==t.PositionEnum.MINIMIZED&&(e.add("minimize",r.component({icon:"minus minimize",title:app.trans("core.forum.composer_minimize_tooltip"),onclick:this.minimize.bind(this),itemClassName:"App-backControl"})),e.add("fullScreen",r.component({icon:"expand",title:app.trans("core.forum.composer_full_screen_tooltip"),onclick:this.fullScreen.bind(this)}))),e.add("close",r.component({icon:"times",title:app.trans("core.forum.composer_close_tooltip"),onclick:this.close.bind(this)}))),e}}]),t}(t),a.PositionEnum={HIDDEN:"hidden",NORMAL:"normal",MINIMIZED:"minimized",FULLSCREEN:"fullScreen"},e("default",a)}}}),System.register("flarum/components/ComposerBody",["flarum/Component","flarum/components/LoadingIndicator","flarum/components/TextEditor","flarum/helpers/avatar","flarum/helpers/listItems","flarum/utils/ItemList"],function(e){"use strict";var t,n,r,o,i,s,a;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]}],execute:function(){a=function(e){function t(e){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.loading=!1,this.content=m.prop(this.props.originalContent),this.editor=new r({submitLabel:this.props.submitLabel,placeholder:this.props.placeholder,onchange:this.content,onsubmit:this.onsubmit.bind(this),value:this.content()})}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return this.editor.props.disabled=this.loading,m("div",{className:"ComposerBody"},o(this.props.user,{className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},i(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},this.editor.render())),n.component({className:"ComposerBody-loading"+(this.loading?" active":"")}))}},{key:"focus",value:function(){this.$(":input:enabled:visible:first").focus()}},{key:"preventExit",value:function(){var e=this.content();return e&&e!==this.props.originalContent&&this.props.confirmExit}},{key:"headerItems",value:function(){return new s}},{key:"onsubmit",value:function(){}}]),t}(t),e("default",a)}}}),System.register("flarum/components/ComposerButton",["flarum/components/Button"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,null,[{key:"initProps",value:function(e){babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e),e.className=e.className||"Button Button--icon Button--link"}}]),t}(t),e("default",n)}}}),System.register("flarum/components/DiscussionComposer",["flarum/components/ComposerBody","flarum/utils/extractText"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.title=m.prop("")}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"headerItems",value:function(){var e=babelHelpers.get(Object.getPrototypeOf(t.prototype),"headerItems",this).call(this);return e.add("title",m("h3",null,m("input",{className:"FormControl",value:this.title(),oninput:m.withAttr("value",this.title),placeholder:this.props.titlePlaceholder,disabled:!!this.props.disabled,onkeydown:this.onkeydown.bind(this)}))),e}},{key:"onkeydown",value:function(e){13===e.which&&(e.preventDefault(),this.editor.setSelectionRange(0,0)),m.redraw.strategy("none")}},{key:"config",value:function(e,n){var r=this;babelHelpers.get(Object.getPrototypeOf(t.prototype),"config",this).call(this,e,n),this.editor.$("textarea").keydown(function(e){if(8===e.which&&0===e.target.selectionStart&&0===e.target.selectionEnd){e.preventDefault();var t=r.$(":input:enabled:visible:first")[0];t.focus(),t.selectionStart=t.selectionEnd=t.value.length}})}},{key:"preventExit",value:function(){return(this.title()||this.content())&&this.props.confirmExit}},{key:"data",value:function(){return{title:this.title(),content:this.content()}}},{key:"onsubmit",value:function(){var e=this;this.loading=!0;var t=this.data();app.store.createRecord("discussions").save(t).then(function(e){app.composer.hide(),app.cache.discussionList.addDiscussion(e),m.route(app.route.discussion(e))},function(t){e.loading=!1,m.redraw(),app.alertErrors(t.errors)})}}],[{key:"initProps",value:function(e){babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e),e.placeholder=e.placeholder||n(app.trans("core.forum.composer_discussion_body_placeholder")),e.submitLabel=e.submitLabel||app.trans("core.forum.composer_discussion_submit_button"),e.confirmExit=e.confirmExit||n(app.trans("core.forum.composer_discussion_discard_confirmation")),e.titlePlaceholder=e.titlePlaceholder||n(app.trans("core.forum.composer_discussion_title_placeholder"))}}]),t}(t),e("default",r)}}}),System.register("flarum/components/DiscussionHero",["flarum/Component","flarum/utils/ItemList","flarum/helpers/listItems"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("header",{className:"Hero DiscussionHero"},m("div",{className:"container"
},m("ul",{className:"DiscussionHero-items"},r(this.items().toArray()))))}},{key:"items",value:function o(){var o=new n,e=this.props.discussion,t=e.badges().toArray();return t.length&&o.add("badges",m("ul",{className:"DiscussionHero-badges badges"},r(t)),10),o.add("title",m("h2",{className:"DiscussionHero-title"},e.title())),o}}]),t}(t),e("default",o)}}}),System.register("flarum/components/DiscussionList",["flarum/Component","flarum/components/DiscussionListItem","flarum/components/Button","flarum/components/LoadingIndicator","flarum/components/Placeholder"],function(e){"use strict";var t,n,r,o,i,s;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]}],execute:function(){s=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.loading=!0,this.moreResults=!1,this.discussions=[],this.refresh()}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this.props.params,t=void 0;if(this.loading?t=o.component():this.moreResults&&(t=r.component({children:app.trans("core.forum.discussion_list_load_more_button"),className:"Button",onclick:this.loadMore.bind(this)})),0===this.discussions.length&&!this.loading){var s="Looks like there are no discussions here. Why don't you create a new one?";return m("div",{className:"DiscussionList"},i.component({text:s}))}return m("div",{className:"DiscussionList"},m("ul",{className:"DiscussionList-discussions"},this.discussions.map(function(t){return m("li",{key:t.id(),"data-id":t.id()},n.component({discussion:t,params:e}))})),m("div",{className:"DiscussionList-loadMore"},t))}},{key:"requestParams",value:function(){var e={include:["startUser","lastUser"],filter:{}};return e.sort=this.sortMap()[this.props.params.sort],this.props.params.q&&(e.filter.q=this.props.params.q,e.include.push("relevantPosts","relevantPosts.discussion","relevantPosts.user")),e}},{key:"sortMap",value:function(){var e={};return this.props.params.q&&(e.relevance=""),e.latest="-lastTime",e.top="-commentsCount",e.newest="-startTime",e.oldest="+startTime",e}},{key:"refresh",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];return t&&(this.loading=!0,this.discussions=[]),this.loadResults().then(function(t){e.discussions=[],e.parseResults(t)},function(){e.loading=!1,m.redraw()})}},{key:"loadResults",value:function(e){var t=app.preloadedDocument();if(t)return m.deferred().resolve(t).promise;var n=this.requestParams();return n.page={offset:e},n.include=n.include.join(","),app.store.find("discussions",n)}},{key:"loadMore",value:function(){this.loading=!0,this.loadResults(this.discussions.length).then(this.parseResults.bind(this))}},{key:"parseResults",value:function(e){return[].push.apply(this.discussions,e),this.loading=!1,this.moreResults=!!e.payload.links.next,m.lazyRedraw(),e}},{key:"removeDiscussion",value:function(e){var t=this.discussions.indexOf(e);-1!==t&&this.discussions.splice(t,1)}},{key:"addDiscussion",value:function(e){this.discussions.unshift(e)}}]),t}(t),e("default",s)}}}),System.register("flarum/components/DiscussionListItem",["flarum/Component","flarum/helpers/avatar","flarum/helpers/listItems","flarum/helpers/highlight","flarum/helpers/icon","flarum/utils/humanTime","flarum/utils/ItemList","flarum/utils/abbreviateNumber","flarum/components/Dropdown","flarum/components/TerminalPost","flarum/components/PostPreview","flarum/utils/SubtreeRetainer","flarum/utils/DiscussionControls","flarum/utils/slidable","flarum/utils/extractText","flarum/utils/classList"],function(e){"use strict";var t,n,r,o,i,s,a,u,l,c,f,p,d,h,g,v,y;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]},function(e){u=e["default"]},function(e){l=e["default"]},function(e){c=e["default"]},function(e){f=e["default"]},function(e){p=e["default"]},function(e){d=e["default"]},function(e){h=e["default"]},function(e){g=e["default"]},function(e){v=e["default"]}],execute:function(){y=function(e){function t(){var e=this;babelHelpers.classCallCheck(this,t);for(var n=arguments.length,r=Array(n),o=0;n>o;o++)r[o]=arguments[o];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,r),this.subtree=new p(function(){return e.props.discussion.freshness},function(){var e=app.session.user&&app.session.user.readTime();return e&&e.getTime()},function(){return e.active()})}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"attrs",value:function(){return{className:v(["DiscussionListItem",this.active()?"active":"",this.props.discussion.isHidden()?"DiscussionListItem--hidden":""])}}},{key:"view",value:function(){var e=this,t=this.subtree.retain();if(t)return t;var a=this.props.discussion,c=a.startUser(),p=a.isUnread(),h=a.isRead(),v=!this.showRepliesCount()&&p,y=Math.min(a.lastPostNumber(),(a.readNumber()||0)+1),b=this.props.params.q?a.relevantPosts():[],w=d.controls(a,this).toArray(),k=this.attrs();return m("div",k,w.length?l.component({icon:"ellipsis-v",children:w,className:"DiscussionListItem-controls",buttonClassName:"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right"}):"",m("a",{className:"Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic"+(p?"":" disabled"),onclick:this.markAsRead.bind(this)},i("check")),m("div",{className:"DiscussionListItem-content Slidable-content"+(p?" unread":"")+(h?" read":"")},m("a",{href:c?app.route.user(c):"#",className:"DiscussionListItem-author",title:g(app.trans("core.forum.discussion_list_started_text",{user:c,ago:s(a.startTime())})),config:function(e){$(e).tooltip({placement:"right"}),m.route.apply(this,arguments)}},n(c,{title:""})),m("ul",{className:"DiscussionListItem-badges badges"},r(a.badges().toArray())),m("a",{href:app.route.discussion(a,y),config:m.route,className:"DiscussionListItem-main"},m("h3",{className:"DiscussionListItem-title"},o(a.title(),this.props.params.q)),m("ul",{className:"DiscussionListItem-info"},r(this.infoItems().toArray()))),m("span",{className:"DiscussionListItem-count",onclick:this.markAsRead.bind(this),title:v?app.trans("core.forum.discussion_list_mark_as_read_tooltip"):""},u(a[v?"unreadCount":"repliesCount"]())),b&&b.length?m("div",{className:"DiscussionListItem-relevantPosts"},b.map(function(t){return f.component({post:t,highlight:e.props.params.q})})):""))}},{key:"config",value:function(e){var t=this;e||"ontouchstart"in window&&!function(){var e=h(t.$().addClass("Slidable"));t.$(".DiscussionListItem-controls").on("hidden.bs.dropdown",function(){return e.reset()})}()}},{key:"active",value:function(){var e=m.route.param("id");return e&&e.split("-")[0]===this.props.discussion.id()}},{key:"showStartPost",value:function(){return-1!==["newest","oldest"].indexOf(this.props.params.sort)}},{key:"showRepliesCount",value:function(){return"replies"===this.props.params.sort}},{key:"markAsRead",value:function(){var e=this.props.discussion;e.isUnread()&&(e.save({readNumber:e.lastPostNumber()}),m.redraw())}},{key:"infoItems",value:function(){var e=new a;return e.add("terminalPost",c.component({discussion:this.props.discussion,lastPost:!this.showStartPost()})),e}}]),t}(t),e("default",y)}}}),System.register("flarum/components/DiscussionPage",["flarum/components/Page","flarum/utils/ItemList","flarum/components/DiscussionHero","flarum/components/PostStream","flarum/components/PostStreamScrubber","flarum/components/LoadingIndicator","flarum/components/SplitDropdown","flarum/helpers/listItems","flarum/utils/DiscussionControls"],function(e){"use strict";var t,n,r,o,i,s,a,u,l,c;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]},function(e){u=e["default"]},function(e){l=e["default"]}],execute:function(){c=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.discussion=null,this.near=null,this.refresh(),app.cache.discussionList&&(app.pane.enable(),app.pane.hide(),app.previous instanceof t&&m.redraw.strategy("diff")),app.history.push("discussion"),this.bodyClass="App--discussion"}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"onunload",value:function(e){if(this.discussion){var t=m.route.param("id");if(t&&t.split("-")[0]===this.discussion.id()){e.preventDefault();var n=m.route.param("near")||"1";return n!==String(this.near)&&this.stream.goToNumber(n),void(this.near=null)}}app.pane.disable(),app.composingReplyTo(this.discussion)&&!app.composer.component.content()?app.composer.hide():app.composer.minimize()}},{key:"view",value:function(){var e=this.discussion;return m("div",{className:"DiscussionPage"},app.cache.discussionList?m("div",{className:"DiscussionPage-list",config:this.configPane.bind(this)},$(".App-navigation").is(":visible")?"":app.cache.discussionList.render()):"",m("div",{className:"DiscussionPage-discussion"},e?[r.component({discussion:e}),m("div",{className:"container"},m("nav",{className:"DiscussionPage-nav"},m("ul",null,u(this.sidebarItems().toArray()))),m("div",{className:"DiscussionPage-stream"},this.stream.render()))]:s.component({className:"LoadingIndicator--block"})))}},{key:"refresh",value:function(){this.near=m.route.param("near")||0,this.discussion=null;var e=app.preloadedDocument();if(e)setTimeout(this.show.bind(this,e));else{var t=this.requestParams();app.store.find("discussions",m.route.param("id").split("-")[0],t).then(this.show.bind(this))}m.lazyRedraw()}},{key:"requestParams",value:function(){return{page:{near:this.near}}}},{key:"show",value:function(e){this.discussion=e,app.setTitle(e.title()),app.setTitleCount(0);var t=[];e.payload&&e.payload.included&&(t=e.payload.included.filter(function(e){return"posts"===e.type&&e.relationships&&e.relationships.discussion}).map(function(e){return app.store.getById("posts",e.id)}).sort(function(e,t){return e.id()-t.id()}).slice(0,20)),this.stream=new o({discussion:e,includedPosts:t}),this.stream.on("positionChanged",this.positionChanged.bind(this)),this.stream.goToNumber(m.route.param("near")||t[0].number(),!0)}},{key:"configPane",value:function(e,t,n){if(!t){n.retain=!0;var r=$(e),o=app.pane;r.hover(o.show.bind(o),o.onmouseleave.bind(o));var i=function(e){e.pageX<10&&o.show()};$(document).on("mousemove",i),n.onunload=function(){return $(document).off("mousemove",i)};var s=r.find(".DiscussionListItem.active");if(s.length){var a=r.offset().top,u=a+r.outerHeight(),l=s.offset().top,c=l+s.outerHeight();(a>l||c>u)&&r.scrollTop(r.scrollTop()-a+l)}}}},{key:"sidebarItems",value:function(){var e=new n;return e.add("controls",a.component({children:l.controls(this.discussion,this).toArray(),icon:"ellipsis-v",className:"App-primaryControl",buttonClassName:"Button--primary"})),e.add("scrubber",i.component({stream:this.stream,className:"App-titleControl"}),-100),e}},{key:"positionChanged",value:function(e,t){var n=this.discussion,r=app.route.discussion(n,this.near=e);m.route(r,!0),window.history.replaceState(null,document.title,r),app.history.push("discussion"),app.session.user&&t>(n.readNumber()||0)&&(n.save({readNumber:t}),m.redraw())}}]),t}(t),e("default",c)}}}),System.register("flarum/components/DiscussionRenamedNotification",["flarum/components/Notification"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"icon",value:function(){return"pencil"}},{key:"href",value:function(){var e=this.props.notification;return app.route.discussion(e.subject(),e.content().postNumber)}},{key:"content",value:function(){return app.trans("core.forum.notifications_discussion_renamed_text",{user:this.props.notification.sender()})}}]),t}(t),e("default",n)}}}),System.register("flarum/components/DiscussionRenamedPost",["flarum/components/EventPost"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"icon",value:function(){return"pencil"}},{key:"descriptionKey",value:function(){return"core.forum.post_stream_discussion_renamed_text"}},{key:"descriptionData",value:function(){var e=this.props.post,t=e.content()[0],n=e.content()[1];return{old:m("strong",{className:"DiscussionRenamedPost-old"},t),"new":m("strong",{className:"DiscussionRenamedPost-new"},n)}}}]),t}(t),e("default",n)}}}),System.register("flarum/components/DiscussionsSearchSource",["flarum/helpers/highlight","flarum/components/LinkButton"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(){function e(){babelHelpers.classCallCheck(this,e),this.results={}}return babelHelpers.createClass(e,[{key:"search",value:function(e){var t=this;this.results[e]=[];var n={filter:{q:e},page:{limit:3},include:"relevantPosts,relevantPosts.discussion,relevantPosts.user"};return app.store.find("discussions",n).then(function(n){return t.results[e]=n})}},{key:"view",value:function(e){var r=this.results[e]||[];return[m("li",{className:"Dropdown-header"},app.trans("core.forum.search_discussions_heading")),m("li",null,n.component({icon:"search",children:app.trans("core.forum.search_all_discussions_button",{query:e}),href:app.route("index",{q:e})})),r.map(function(n){var r=n.relevantPosts(),o=r&&r[0];return m("li",{className:"DiscussionSearchResult","data-index":"discussions"+n.id()},m("a",{href:app.route.discussion(n,o&&o.number()),config:m.route},m("div",{className:"DiscussionSearchResult-title"},t(n.title(),e)),o?m("div",{className:"DiscussionSearchResult-excerpt"},t(o.contentPlain(),e,100)):""))})]}}]),e}(),e("default",r)}}}),System.register("flarum/components/DiscussionsUserPage",["flarum/components/UserPage","flarum/components/DiscussionList"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.loadUser(m.route.param("username"))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"content",value:function(){return m("div",{className:"DiscussionsUserPage"},n.component({params:{q:"author:"+this.user.username()}}))}}]),t}(t),e("default",r)}}}),System.register("flarum/components/EditPostComposer",["flarum/components/ComposerBody","flarum/helpers/icon"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){var e=this;babelHelpers.classCallCheck(this,t);for(var n=arguments.length,r=Array(n),o=0;n>o;o++)r[o]=arguments[o];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,r),this.editor.props.preview=function(){m.route(app.route.post(e.props.post))}}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"headerItems",value:function(){var e=babelHelpers.get(Object.getPrototypeOf(t.prototype),"headerItems",this).call(this),r=this.props.post;return e.add("title",m("h3",null,n("pencil")," ",m("a",{href:app.route.discussion(r.discussion(),r.number()),config:m.route},app.trans("core.forum.composer_edit_post_link",{number:r.number(),discussion:r.discussion().title()})))),e}},{key:"data",value:function(){return{content:this.content()}}},{key:"onsubmit",value:function(){var e=this;this.loading=!0;var t=this.data();this.props.post.save(t).then(function(){app.composer.hide(),m.redraw()},function(){e.loading=!1,m.redraw()})}}],[{key:"initProps",value:function(e){babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e),e.submitLabel=e.submitLabel||app.trans("core.forum.composer_edit_submit_button"),e.confirmExit=e.confirmExit||app.trans("core.forum.composer_edit_discard_confirmation"),e.originalContent=e.originalContent||e.post.content(),e.user=e.user||e.post.user(),e.post.editedContent=e.originalContent}}]),t}(t),e("default",r)}}}),System.register("flarum/components/EditUserModal",["flarum/components/Modal","flarum/components/Button","flarum/components/GroupBadge","flarum/models/Group","flarum/utils/extractText"],function(e){"use strict";var t,n,r,o,i,s;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]}],execute:function(){s=function(e){function t(){var e=this;babelHelpers.classCallCheck(this,t);for(var n=arguments.length,r=Array(n),i=0;n>i;i++)r[i]=arguments[i];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,r);var s=this.props.user;this.username=m.prop(s.username()||""),this.email=m.prop(s.email()||""),this.setPassword=m.prop(!1),this.password=m.prop(s.password()||""),this.groups={},app.store.all("groups").filter(function(e){return-1===[o.GUEST_ID,o.MEMBER_ID].indexOf(e.id())}).forEach(function(t){return e.groups[t.id()]=m.prop(-1!==s.groups().indexOf(t))})}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"className",value:function(){return"EditUserModal Modal--small"}},{key:"title",value:function(){return"Edit User"}},{key:"content",value:function(){var e=this;return m("div",{className:"Modal-body"},m("div",{className:"Form"},m("div",{className:"Form-group"},m("label",null,"Username"),m("input",{className:"FormControl",placeholder:i(app.trans("core.forum.edit_user_username_label")),value:this.username(),onchange:m.withAttr("value",this.username)})),m("div",{className:"Form-group"},m("label",null,"Email"),m("div",null,m("input",{className:"FormControl",placeholder:i(app.trans("core.forum.edit_user_email_label")),value:this.email(),onchange:m.withAttr("value",this.email)}))),m("div",{className:"Form-group"},m("label",null,"Password"),m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",checked:this.setPassword(),onchange:function(t){e.setPassword(t.target.checked),m.redraw(!0),t.target.checked&&e.$("[name=password]").select(),m.redraw.strategy("none")}}),"Set new password"),this.setPassword()?m("input",{className:"FormControl",type:"password",name:"password",placeholder:i(app.trans("core.forum.edit_user_password_label")),value:this.password(),onchange:m.withAttr("value",this.password)}):"")),m("div",{className:"Form-group EditUserModal-groups"},m("label",null,"Groups"),m("div",null,Object.keys(this.groups).map(function(e){return app.store.getById("groups",e)}).map(function(t){return m("label",{className:"checkbox"},m("input",{type:"checkbox",checked:e.groups[t.id()](),disabled:"1"===e.props.user.id()&&t.id()===o.ADMINISTRATOR_ID,onchange:m.withAttr("checked",e.groups[t.id()])}),r.component({group:t,label:""})," ",t.nameSingular())}))),m("div",{className:"Form-group"},n.component({className:"Button Button--primary",type:"submit",loading:this.loading,children:app.trans("core.forum.edit_user_submit_button")}))))}},{key:"onsubmit",value:function(e){var t=this;e.preventDefault(),this.loading=!0;var n=Object.keys(this.groups).filter(function(e){return t.groups[e]()}).map(function(e){return app.store.getById("groups",e)}),r={username:this.username(),email:this.email(),relationships:{groups:n}};this.setPassword()&&(r.password=this.password()),this.props.user.save(r).then(function(){return t.hide()},function(e){t.loading=!1,t.handleErrors(e)})}}]),t}(t),e("default",s)}}}),System.register("flarum/components/EventPost",["flarum/components/Post","flarum/utils/string","flarum/helpers/username","flarum/helpers/icon"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e.ucfirst},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"attrs",value:function(){return{className:"EventPost "+n(this.props.post.contentType())+"Post"}}},{key:"content",value:function(){var e=this.props.post.user(),t=r(e),n=babelHelpers._extends(this.descriptionData(),{user:e,username:e?m("a",{className:"EventPost-user",href:app.route.user(e),config:m.route},t):t});return[o(this.icon(),{className:"EventPost-icon"}),m("div",{"class":"EventPost-info"},app.trans(this.descriptionKey(),n))]}},{key:"icon",value:function(){return""}},{key:"descriptionKey",value:function(){return""}},{key:"descriptionData",value:function(){return{}}}]),t}(t),e("default",i)}}}),System.register("flarum/components/ForgotPasswordModal",["flarum/components/Modal","flarum/components/Alert","flarum/components/Button","flarum/utils/extractText"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.email=m.prop(this.props.email||""),this.success=!1}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"className",value:function(){return"ForgotPasswordModal Modal--small"}},{key:"title",value:function(){return app.trans("core.forum.forgot_password_title")}},{key:"content",value:function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.trans("core.forum.forgot_password_email_sent_message")),m("div",{className:"Form-group"},m(r,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},app.trans("core.forum.forgot_password_dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.trans("core.forum.forgot_password_text")),m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:o(app.trans("core.forum.forgot_password_email_placeholder")),value:this.email(),onchange:m.withAttr("value",this.email),disabled:this.loading})),m("div",{className:"Form-group"},r.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading,children:app.trans("core.forum.forgot_password_submit_button")}))))}},{key:"onsubmit",value:function(e){var t=this;e.preventDefault(),this.loading=!0,app.request({method:"POST",url:app.forum.attribute("apiUrl")+"/forgot",data:{email:this.email()},handlers:{404:function(){throw t.alert=new n({type:"warning",message:"That email wasn't found in our database."}),new Error}}}).then(function(){t.loading=!1,t.success=!0,t.alert=null,m.redraw()},function(e){t.loading=!1,t.handleErrors(e)})}}]),t}(t),e("default",i)}}}),System.register("flarum/components/HeaderPrimary",["flarum/Component","flarum/utils/ItemList","flarum/helpers/listItems","flarum/components/SelectDropdown","flarum/components/Button"],function(e){"use strict";var t,n,r,o,i,s;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]}],execute:function(){s=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("ul",{className:"Header-controls"},r(this.items().toArray()))}},{key:"items",value:function(){return new n}}]),t}(t),e("default",s)}}}),System.register("flarum/components/HeaderSecondary",["flarum/Component","flarum/components/Button","flarum/components/LogInModal","flarum/components/SignUpModal","flarum/components/SessionDropdown","flarum/components/SelectDropdown","flarum/components/NotificationsDropdown","flarum/utils/ItemList","flarum/helpers/listItems"],function(e){"use strict";var t,n,r,o,i,s,a,u,l,c;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]},function(e){u=e["default"]},function(e){l=e["default"]}],execute:function(){c=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("ul",{className:"Header-controls"},l(this.items().toArray()))}},{key:"items",value:function c(){var c=new u;if(c.add("search",app.search.render(),30),Object.keys(app.locales).length>1){var e=[],t=function(t){e.push(n.component({active:app.locale===t,children:app.locales[t],icon:app.locale===t?"check":!0,onclick:function(){app.session.user?app.session.user.savePreferences({locale:t}).then(function(){return window.location.reload()}):(document.cookie="locale="+t+"; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT",window.location.reload())}}))};for(var l in app.locales)t(l);c.add("locale",s.component({children:e,buttonClassName:"Button Button--link"}),20)}return app.session.user?(c.add("notifications",a.component(),10),c.add("session",i.component(),0)):(app.forum.attribute("allowSignUp")&&c.add("signUp",n.component({children:app.trans("core.forum.header_sign_up_link"),className:"Button Button--link",onclick:function(){return app.modal.show(new o)}}),10),c.add("logIn",n.component({children:app.trans("core.forum.header_log_in_link"),className:"Button Button--link",onclick:function(){return app.modal.show(new r)}}),0)),c}}]),t}(t),e("default",c)}}}),System.register("flarum/components/IndexPage",["flarum/extend","flarum/components/Page","flarum/utils/ItemList","flarum/helpers/listItems","flarum/components/DiscussionList","flarum/components/WelcomeHero","flarum/components/DiscussionComposer","flarum/components/LogInModal","flarum/components/DiscussionPage","flarum/components/Select","flarum/components/Button","flarum/components/LinkButton","flarum/components/SelectDropdown"],function(e){"use strict";var t,n,r,o,i,s,a,u,l,c,f,p,d,h;return{setters:[function(e){t=e.extend},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]},function(e){u=e["default"]},function(e){l=e["default"]},function(e){c=e["default"]},function(e){f=e["default"]},function(e){p=e["default"]},function(e){d=e["default"]}],execute:function(){h=function(e){function n(){babelHelpers.classCallCheck(this,n);for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(n.prototype),"constructor",this).apply(this,t),app.previous instanceof l&&(this.lastDiscussion=app.previous.discussion),app.previous instanceof n&&(app.cache.discussionList=null);var o=this.params();app.cache.discussionList&&Object.keys(o).some(function(e){return app.cache.discussionList.props.params[e]!==o[e]?(app.cache.discussionList=null,!0):void 0}),app.cache.discussionList||(app.cache.discussionList=new i({params:o})),app.history.push("index"),this.bodyClass="App--index"}return babelHelpers.inherits(n,e),babelHelpers.createClass(n,[{key:"onunload",value:function(){app.cache.scrollTop=$(window).scrollTop()}},{key:"view",value:function(){return m("div",{className:"IndexPage"},this.hero(),m("div",{className:"container"},m("nav",{className:"IndexPage-nav sideNav"},m("ul",null,o(this.sidebarItems().toArray()))),m("div",{className:"IndexPage-results sideNavOffset"},m("div",{className:"IndexPage-toolbar"},m("ul",{className:"IndexPage-toolbar-view"},o(this.viewItems().toArray())),m("ul",{className:"IndexPage-toolbar-action"},o(this.actionItems().toArray()))),app.cache.discussionList.render())))}},{key:"config",value:function(e,r){if(babelHelpers.get(Object.getPrototypeOf(n.prototype),"config",this).apply(this,arguments),!e){t(r,"onunload",function(){return $("#app").css("min-height","")}),app.setTitle(""),app.setTitleCount(0);var o=this.$(".Hero").outerHeight(),i=app.cache.scrollTop;if($("#app").css("min-height",$(window).height()+o),$(window).scrollTop(i-(app.cache.heroHeight-o)),app.cache.heroHeight=o,this.lastDiscussion){var s=this.$('.DiscussionListItem[data-id="'+this.lastDiscussion.id()+'"]');if(s.length){var a=$("#header").outerHeight(),u=$(window).height(),l=s.offset().top,c=l+s.outerHeight();(i+a>l||c>i+u)&&$(window).scrollTop(l-a)}}}}},{key:"hero",value:function(){return s.component()}},{key:"sidebarItems",value:function(){var e=new r,t=app.forum.canStartDiscussion()||!app.session.user;return e.add("newDiscussion",f.component({children:app.trans(t?"core.forum.index_start_discussion_button":"core.forum.index_cannot_start_discussion_button"),icon:"edit",className:"Button Button--primary IndexPage-newDiscussion",itemClassName:"App-primaryControl",onclick:this.newDiscussion.bind(this),disabled:!t})),e.add("nav",d.component({children:this.navItems(this).toArray(),buttonClassName:"Button",className:"App-titleControl"})),e}},{key:"navItems",value:function(){var e=new r,t=this.stickyParams();return e.add("allDiscussions",p.component({href:app.route("index",t),children:app.trans("core.forum.index_all_discussions_link"),icon:"comments-o"}),100),e}},{key:"viewItems",value:function(){var e=new r,t={};for(var n in app.cache.discussionList.sortMap())t[n]=app.trans("core.forum.index_sort_"+n+"_button");return e.add("sort",c.component({options:t,value:this.params().sort,onchange:this.changeSort.bind(this)})),e}},{key:"actionItems",value:function(){var e=new r;return e.add("refresh",f.component({title:app.trans("core.forum.index_refresh_tooltip"),icon:"refresh",className:"Button Button--icon",onclick:function(){return app.cache.discussionList.refresh()}})),app.session.user&&e.add("markAllAsRead",f.component({title:app.trans("core.forum.index_mark_all_as_read_tooltip"),icon:"check",className:"Button Button--icon",onclick:this.markAllAsRead.bind(this)})),e}},{key:"searching",value:function(){return this.params().q}},{key:"clearSearch",value:function(){var e=this.params();delete e.q,m.route(app.route(this.props.routeName,e))}},{key:"changeSort",value:function(e){var t=this.params();e===Object.keys(app.cache.discussionList.sortMap())[0]?delete t.sort:t.sort=e,m.route(app.route(this.props.routeName,t))}},{key:"stickyParams",value:function(){return{sort:m.route.param("sort"),q:m.route.param("q")}}},{key:"params",value:function h(){var h=this.stickyParams();return h.filter=m.route.param("filter"),h}},{key:"newDiscussion",value:function(){var e=m.deferred();return app.session.user?this.composeNewDiscussion(e):app.modal.show(new u({onlogin:this.composeNewDiscussion.bind(this,e)})),e.promise}},{key:"composeNewDiscussion",value:function(e){var t=new a({user:app.session.user});return app.composer.load(t),app.composer.show(),e.resolve(t),e.promise}},{key:"markAllAsRead",value:function(){app.session.user.save({readTime:new Date})}}]),n}(n),e("default",h)}}}),System.register("flarum/components/LoadingPost",["flarum/Component","flarum/helpers/avatar"],function(e){
"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("div",{className:"Post CommentPost LoadingPost"},m("header",{className:"Post-header"},n(null,{className:"PostUser-avatar"}),m("div",{className:"fakeText"})),m("div",{className:"Post-body"},m("div",{className:"fakeText"}),m("div",{className:"fakeText"}),m("div",{className:"fakeText"})))}}]),t}(t),e("default",r)}}}),System.register("flarum/components/LogInButton",["flarum/components/Button"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,null,[{key:"initProps",value:function(e){e.className=(e.className||"")+" LogInButton",e.onclick=function(){var t=1e3,n=500,r=$(window);window.open(app.forum.attribute("baseUrl")+e.path,"logInPopup","width="+t+","+("height="+n+",")+("top="+(r.height()/2-n/2)+",")+("left="+(r.width()/2-t/2)+",")+"status=no,scrollbars=no,resizable=no")},babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e)}}]),t}(t),e("default",n)}}}),System.register("flarum/components/LogInButtons",["flarum/Component","flarum/utils/ItemList"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("div",{className:"LogInButtons"},this.items().toArray())}},{key:"items",value:function(){return new n}}]),t}(t),e("default",r)}}}),System.register("flarum/components/LogInModal",["flarum/components/Modal","flarum/components/ForgotPasswordModal","flarum/components/SignUpModal","flarum/components/Alert","flarum/components/Button","flarum/components/LogInButtons","flarum/utils/extractText"],function(e){"use strict";var t,n,r,o,i,s,a,u;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]}],execute:function(){u=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.email=m.prop(this.props.email||""),this.password=m.prop(this.props.password||"")}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"className",value:function(){return"LogInModal Modal--small"}},{key:"title",value:function(){return app.trans("core.forum.log_in_title")}},{key:"content",value:function(){return[m("div",{className:"Modal-body"},m(s,null),m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",placeholder:a(app.trans("core.forum.log_in_username_or_email_placeholder")),value:this.email(),onchange:m.withAttr("value",this.email),disabled:this.loading})),m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",placeholder:a(app.trans("core.forum.log_in_password_placeholder")),value:this.password(),onchange:m.withAttr("value",this.password),disabled:this.loading})),m("div",{className:"Form-group"},i.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading,children:app.trans("core.forum.log_in_submit_button")})))),m("div",{className:"Modal-footer"},m("p",{className:"LogInModal-forgotPassword"},m("a",{onclick:this.forgotPassword.bind(this)},app.trans("core.forum.log_in_forgot_password_link"))),app.forum.attribute("allowSignUp")?m("p",{className:"LogInModal-signUp"},app.trans("core.forum.log_in_no_account_text"),m("a",{onclick:this.signUp.bind(this)},app.trans("core.forum.log_in_sign_up_link"))):"")]}},{key:"forgotPassword",value:function(){var e=this.email(),t=-1!==e.indexOf("@")?{email:e}:void 0;app.modal.show(new n(t))}},{key:"signUp",value:function(){var e={password:this.password()},t=this.email();e[-1!==t.indexOf("@")?"email":"username"]=t,app.modal.show(new r(e))}},{key:"onready",value:function(){this.$("[name="+(this.email()?"password":"email")+"]").select()}},{key:"onsubmit",value:function(e){var t=this;e.preventDefault(),this.loading=!0;var n=this.email(),r=this.password();app.session.login(n,r).then(null,function(e){t.loading=!1,e&&"confirm_email"===e.code?t.alert=o.component({children:app.trans("core.forum.log_in_confirmation_required_message",{email:e.email})}):t.alert=o.component({type:"error",children:app.trans("core.forum.log_in_invalid_login_message")}),m.redraw(),t.onready()})}}]),t}(t),e("default",u)}}}),System.register("flarum/components/Notification",["flarum/Component","flarum/helpers/avatar","flarum/helpers/icon","flarum/helpers/humanTime"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this.props.notification,t=this.href();return m("a",{className:"Notification Notification--"+e.contentType()+" "+(e.isRead()?"":"unread"),href:t,config:function(e,n){-1===t.indexOf("://")&&m.route.apply(this,arguments),n||$(e).click(this.markAsRead.bind(this))}},n(e.sender()),r(this.icon(),{className:"Notification-icon"}),m("span",{className:"Notification-content"},this.content()),o(e.time()),m("div",{className:"Notification-excerpt"},this.excerpt()))}},{key:"icon",value:function(){}},{key:"href",value:function(){}},{key:"content",value:function(){}},{key:"excerpt",value:function(){}},{key:"markAsRead",value:function(){app.session.user.pushAttributes({unreadNotificationsCount:app.session.user.unreadNotificationsCount()-1}),this.props.notification.save({isRead:!0})}}]),t}(t),e("default",i)}}}),System.register("flarum/components/NotificationGrid",["flarum/Component","flarum/components/Checkbox","flarum/helpers/icon","flarum/utils/ItemList"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(e){function t(){var e=this;babelHelpers.classCallCheck(this,t);for(var r=arguments.length,o=Array(r),i=0;r>i;i++)o[i]=arguments[i];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,o),this.methods=[{name:"alert",icon:"bell",label:app.trans("core.forum.settings_notify_by_web_heading")},{name:"email",icon:"envelope-o",label:app.trans("core.forum.settings_notify_by_email_heading")}],this.inputs={},this.types=this.notificationTypes().toArray(),this.types.forEach(function(t){e.methods.forEach(function(r){var o=e.preferenceKey(t.name,r.name),i=e.props.user.preferences()[o];e.inputs[o]=new n({state:!!i,disabled:"undefined"==typeof i,onchange:function(){return e.toggle([o])}})})})}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this;return m("table",{className:"NotificationGrid"},m("thead",null,m("tr",null,m("td",null),this.methods.map(function(t){return m("th",{className:"NotificationGrid-groupToggle",onclick:e.toggleMethod.bind(e,t.name)},r(t.icon)," ",t.label)}))),m("tbody",null,this.types.map(function(t){return m("tr",null,m("td",{className:"NotificationGrid-groupToggle",onclick:e.toggleType.bind(e,t.name)},r(t.icon)," ",t.label),e.methods.map(function(n){return m("td",{className:"NotificationGrid-checkbox"},e.inputs[e.preferenceKey(t.name,n.name)].render())}))})))}},{key:"config",value:function(e){e||(this.$("thead .NotificationGrid-groupToggle").bind("mouseenter mouseleave",function(e){var t=parseInt($(this).index(),10)+1;$(this).parents("table").find("td:nth-child("+t+")").toggleClass("highlighted","mouseenter"===e.type)}),this.$("tbody .NotificationGrid-groupToggle").bind("mouseenter mouseleave",function(e){$(this).parent().find("td").toggleClass("highlighted","mouseenter"===e.type)}))}},{key:"toggle",value:function(e){var t=this,n=this.props.user,r=n.preferences(),o=!r[e[0]];e.forEach(function(e){var n=t.inputs[e];n.loading=!0,r[e]=n.props.state=o}),m.redraw(),n.save({preferences:r}).then(function(){e.forEach(function(e){return t.inputs[e].loading=!1}),m.redraw()})}},{key:"toggleMethod",value:function(e){var t=this,n=this.types.map(function(n){return t.preferenceKey(n.name,e)}).filter(function(e){return!t.inputs[e].props.disabled});this.toggle(n)}},{key:"toggleType",value:function(e){var t=this,n=this.methods.map(function(n){return t.preferenceKey(e,n.name)}).filter(function(e){return!t.inputs[e].props.disabled});this.toggle(n)}},{key:"preferenceKey",value:function(e,t){return"notify_"+e+"_"+t}},{key:"notificationTypes",value:function(){var e=new o;return e.add("discussionRenamed",{name:"discussionRenamed",icon:"pencil",label:app.trans("core.forum.settings_notify_discussion_renamed_label")}),e}}]),t}(t),e("default",i)}}}),System.register("flarum/components/NotificationList",["flarum/Component","flarum/helpers/listItems","flarum/components/Button","flarum/components/LoadingIndicator","flarum/models/Discussion"],function(e){"use strict";var t,n,r,o,i,s;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]}],execute:function(){s=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.loading=!1}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=[];return app.cache.notifications&&!function(){var t={};app.cache.notifications.forEach(function(n){var r=n.subject();if("undefined"!=typeof r){var o=!1;r instanceof i?o=r:r&&r.discussion&&(o=r.discussion());var s=o?o.id():0;t[s]=t[s]||{discussion:o,notifications:[]},t[s].notifications.push(n),-1===e.indexOf(t[s])&&e.push(t[s])}})}(),m("div",{className:"NotificationList"},m("div",{className:"NotificationList-header"},m("div",{className:"App-primaryControl"},r.component({className:"Button Button--icon Button--link",icon:"check",title:app.trans("core.forum.notifications_mark_all_as_read_tooltip"),onclick:this.markAllAsRead.bind(this)})),m("h4",{className:"App-titleControl App-titleControl--text"},app.trans("core.forum.notifications_title"))),m("div",{className:"NotificationList-content"},e.length?e.map(function(e){var t=e.discussion&&e.discussion.badges().toArray();return m("div",{className:"NotificationGroup"},e.discussion?m("a",{className:"NotificationGroup-header",href:app.route.discussion(e.discussion),config:m.route},t&&t.length?m("ul",{className:"NotificationGroup-badges badges"},n(t)):"",e.discussion.title()):m("div",{className:"NotificationGroup-header"},app.forum.attribute("title")),m("ul",{className:"NotificationGroup-content"},e.notifications.map(function(e){var t=app.notificationComponents[e.contentType()];return t?m("li",null,t.component({notification:e})):""})))}):this.loading?o.component({className:"LoadingIndicator--block"}):m("div",{className:"NotificationList-empty"},app.trans("core.forum.notifications_empty_text"))))}},{key:"load",value:function(){var e=this;(!app.cache.notifications||app.session.user.newNotificationsCount())&&(this.loading=!0,m.redraw(),app.store.find("notifications").then(function(t){app.session.user.pushAttributes({newNotificationsCount:0}),app.cache.notifications=t.sort(function(e,t){return t.time()-e.time()}),e.loading=!1,m.redraw()}))}},{key:"markAllAsRead",value:function(){app.cache.notifications&&(app.session.user.pushAttributes({unreadNotificationsCount:0}),app.cache.notifications.forEach(function(e){return e.pushAttributes({isRead:!0})}),app.request({url:app.forum.attribute("apiUrl")+"/notifications/read",method:"POST"}))}}]),t}(t),e("default",s)}}}),System.register("flarum/components/NotificationsDropdown",["flarum/components/Dropdown","flarum/helpers/icon","flarum/components/NotificationList"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.showing=!1,this.list=new r}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,null,[{key:"initProps",value:function(e){e.className=e.className||"NotificationsDropdown",e.buttonClassName=e.buttonClassName||"Button Button--flat",e.menuClassName=e.menuClassName||"Dropdown-menu--right",e.label=e.label||app.trans("core.forum.notifications_tooltip"),e.icon=e.icon||"bell",babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e)}}]),babelHelpers.createClass(t,[{key:"getButton",value:function(){var e=this.getNewCount(),n=babelHelpers.get(Object.getPrototypeOf(t.prototype),"getButton",this).call(this);return n.attrs.title=this.props.label,n.attrs.className+=e?" new":"",n.attrs.onclick=this.onclick.bind(this),n}},{key:"getButtonContent",value:function(){var e=this.getUnreadCount();return[n(this.props.icon,{className:"Button-icon"}),e?m("span",{className:"NotificationsDropdown-unread"},e):"",m("span",{className:"Button-label"},this.props.label)]}},{key:"getMenu",value:function(){return m("div",{className:"Dropdown-menu "+this.props.menuClassName,onclick:this.menuClick.bind(this)},this.showing?this.list.render():"")}},{key:"onclick",value:function(){app.drawer.isOpen()?this.goToRoute():(this.showing=!0,this.list.load())}},{key:"goToRoute",value:function(){m.route(app.route("notifications"))}},{key:"getUnreadCount",value:function(){return app.session.user.unreadNotificationsCount()}},{key:"getNewCount",value:function(){return app.session.user.newNotificationsCount()}},{key:"menuClick",value:function(e){(e.shiftKey||e.metaKey||e.ctrlKey||2===e.which)&&e.stopPropagation()}}]),t}(t),e("default",o)}}}),System.register("flarum/components/NotificationsPage",["flarum/components/Page","flarum/components/NotificationList"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,r=Array(e),o=0;e>o;o++)r[o]=arguments[o];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,r),app.history.push("notifications"),this.list=new n,this.list.load(),this.bodyClass="App--notifications"}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("div",{className:"NotificationsPage"},this.list.render())}}]),t}(t),e("default",r)}}}),System.register("flarum/components/Page",["flarum/Component"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),app.previous=app.current,app.current=this,app.drawer.hide(),app.modal.close(),this.bodyClass=""}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"config",value:function(e,t){var n=this;e||this.bodyClass&&($("#app").addClass(this.bodyClass),t.onunload=function(){return $("#app").removeClass(n.bodyClass)})}}]),t}(t),e("default",n)}}}),System.register("flarum/components/Post",["flarum/Component","flarum/utils/SubtreeRetainer","flarum/components/Dropdown","flarum/utils/PostControls","flarum/helpers/listItems","flarum/utils/ItemList"],function(e){"use strict";var t,n,r,o,i,s,a;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]}],execute:function(){a=function(e){function t(){var e=this;babelHelpers.classCallCheck(this,t);for(var r=arguments.length,o=Array(r),i=0;r>i;i++)o[i]=arguments[i];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,o),this.subtree=new n(function(){return e.props.post.freshness},function(){var t=e.props.post.user();return t&&t.freshness},function(){return e.controlsOpen})}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this,t=this.attrs();return t.className="Post "+(t.className||""),m("article",t,this.subtree.retain()||function(){var t=o.controls(e.props.post,e).toArray();return m("div",null,e.content(),m("aside",{className:"Post-actions"},m("ul",null,i(e.actionItems().toArray()),t.length?m("li",null,m(r,{className:"Post-controls",buttonClassName:"Button Button--icon Button--flat",menuClassName:"Dropdown-menu--right",icon:"ellipsis-h",onshow:function(){return e.$(".Post-actions").addClass("open")},onhide:function(){return e.$(".Post-actions").removeClass("open")}},t)):"")),m("footer",{className:"Post-footer"},m("ul",null,i(e.footerItems().toArray()))))}())}},{key:"config",value:function(e,t){var n=this.$(".Post-actions"),r=this.$(".Post-controls");n.toggleClass("open",r.hasClass("open"))}},{key:"attrs",value:function(){return{}}},{key:"content",value:function(){return""}},{key:"actionItems",value:function(){return new s}},{key:"footerItems",value:function(){return new s}}]),t}(t),e("default",a)}}}),System.register("flarum/components/PostEdited",["flarum/Component","flarum/helpers/icon","flarum/utils/humanTime","flarum/utils/extractText"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this.props.post,t=e.editUser(),i=o(app.trans("core.forum.post_edited_tooltip",{user:t,ago:r(e.editTime())}));return m("span",{className:"PostEdited",title:i},n("pencil"))}},{key:"config",value:function(e){e||this.$().tooltip()}}]),t}(t),e("default",i)}}}),System.register("flarum/components/PostMeta",["flarum/Component","flarum/helpers/humanTime","flarum/helpers/fullTime"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this.props.post,t=e.time(),o=window.location.origin+app.route.post(e),i="ontouchstart"in document.documentElement,s=function(){var e=this;setTimeout(function(){return $(e).parent().find(".PostMeta-permalink").select()}),m.redraw.strategy("none")};return m("div",{className:"Dropdown PostMeta"},m("a",{className:"Dropdown-toggle",onclick:s,"data-toggle":"dropdown"},n(t)),m("div",{className:"Dropdown-menu dropdown-menu"},m("span",{className:"PostMeta-number"},app.trans("core.forum.post_number_tooltip",{number:e.number()}))," ",r(t),i?m("a",{className:"Button PostMeta-permalink",href:o},o):m("input",{className:"FormControl PostMeta-permalink",value:o,onclick:function(e){return e.stopPropagation()}})))}}]),t}(t),e("default",o)}}}),System.register("flarum/components/PostPreview",["flarum/Component","flarum/helpers/avatar","flarum/helpers/username","flarum/helpers/highlight"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this.props.post,t=e.user(),i=o(e.contentPlain(),this.props.highlight,300);return m("a",{className:"PostPreview",href:app.route.post(e),config:m.route,onclick:this.props.onclick},m("span",{className:"PostPreview-content"},n(t),r(t)," ",m("span",{className:"PostPreview-excerpt"},i)))}}]),t}(t),e("default",i)}}}),System.register("flarum/components/PostStream",["flarum/Component","flarum/utils/ScrollListener","flarum/components/LoadingPost","flarum/utils/anchorScroll","flarum/utils/mixin","flarum/utils/evented","flarum/components/ReplyPlaceholder"],function(e){"use strict";var t,n,r,o,i,s,a,u;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]}],execute:function(){u=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,r=Array(e),o=0;e>o;o++)r[o]=arguments[o];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,r),this.discussion=this.props.discussion,this.paused=!1,this.scrollListener=new n(this.onscroll.bind(this)),this.loadPageTimeouts={},this.pagesLoading=0,this.show(this.props.includedPosts)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"goToNumber",value:function(e,t){var n=this;if("reply"===e)return this.goToLast().then(function(){$("html,body").stop(!0).animate({scrollTop:$(document).height()-$(window).height()},"fast")});this.paused=!0;var r=this.loadNearNumber(e);return m.redraw(!0),r.then(function(){m.redraw(!0),n.scrollToNumber(e,t).done(n.unpause.bind(n))})}},{key:"goToIndex",value:function(e,t,n){var r=this;this.paused=!0;var i=this.loadNearIndex(e);return m.redraw(!0),i.then(function(){o(r.$(".PostStream-item:"+(t?"last":"first")),function(){return m.redraw(!0)}),r.scrollToIndex(e,n,t).done(r.unpause.bind(r))})}},{key:"goToFirst",value:function(){return this.goToIndex(0)}},{key:"goToLast",value:function(){return this.goToIndex(this.count()-1,!0)}},{key:"update",value:function(){this.viewingEnd&&(this.visibleEnd=this.count(),this.loadRange(this.visibleStart,this.visibleEnd).then(function(){return m.redraw()}))}},{key:"count",value:function(){return this.discussion.postIds().length}},{key:"sanitizeIndex",value:function(e){return Math.max(0,Math.min(this.count(),e))}},{key:"show",value:function(e){this.visibleStart=e.length?this.discussion.postIds().indexOf(e[0].id()):0,this.visibleEnd=this.visibleStart+e.length}},{key:"reset",value:function(e,t){this.visibleStart=e||0,this.visibleEnd=this.sanitizeIndex(t||this.constructor.loadCount)}},{key:"posts",value:function(){return this.discussion.postIds().slice(this.visibleStart,this.visibleEnd).map(function(e){var t=app.store.getById("posts",e);return t&&t.discussion()&&t.user()!==!1&&null!==t.canEdit()?t:null})}},{key:"view",value:function(){function e(e,t,n){n.fadedIn||$(e).hide().fadeIn(),n.fadedIn=!0}var t=this,n=void 0;return this.visibleEnd=this.sanitizeIndex(this.visibleEnd),this.viewingEnd=this.visibleEnd===this.count(),m("div",{className:"PostStream"},this.posts().map(function(o,i){var s=void 0,a={"data-index":t.visibleStart+i};if(o){var u=o.time(),l=app.postComponents[o.contentType()];s=l?l.component({post:o}):"",a.key="post"+o.id(),a.config=e,a["data-time"]=u.toISOString(),a["data-number"]=o.number(),a["data-id"]=o.id();var c=u-n;c>3456e5&&(s=[m("div",{className:"PostStream-timeGap"},m("span",null,app.trans("core.forum.post_stream_time_lapsed_text",{period:moment.duration(c).humanize()}))),s]),n=u}else a.key=t.visibleStart+i,s=r.component();return m("div",babelHelpers._extends({className:"PostStream-item"},a),s)}),!this.viewingEnd||app.session.user&&!this.discussion.canReply()?"":m("div",{className:"PostStream-item",key:"reply"},a.component({discussion:this.discussion})))}},{key:"config",value:function(e,t){var n=this;e||(setTimeout(function(){return n.scrollListener.start()}),t.onunload=function(){n.scrollListener.stop(),clearTimeout(n.calculatePositionTimeout)})}},{key:"onscroll",value:function(e){if(!this.paused){var t=this.getMarginTop(),n=$(window).height()-t,r=e+t,o=500;if(this.visibleStart>0){var i=this.$(".PostStream-item[data-index="+this.visibleStart+"]");i.length&&i.offset().top>r-o&&this.loadPrevious()}if(this.visibleEnd<this.count()){var i=this.$(".PostStream-item[data-index="+(this.visibleEnd-1)+"]");i.length&&i.offset().top+i.outerHeight(!0)<r+n+o&&this.loadNext()}clearTimeout(this.calculatePositionTimeout),this.calculatePositionTimeout=setTimeout(this.calculatePosition.bind(this),100)}}},{key:"loadNext",value:function(){var e=this.visibleEnd,t=this.visibleEnd=this.sanitizeIndex(this.visibleEnd+this.constructor.loadCount),n=e-2*this.constructor.loadCount;n>this.visibleStart&&n>=0&&(this.visibleStart=n+this.constructor.loadCount+1,this.loadPageTimeouts[n]&&(clearTimeout(this.loadPageTimeouts[n]),this.loadPageTimeouts[n]=null,this.pagesLoading--)),this.loadPage(e,t)}},{key:"loadPrevious",value:function(){var e=this.visibleStart,t=this.visibleStart=this.sanitizeIndex(this.visibleStart-this.constructor.loadCount),n=t+2*this.constructor.loadCount;n<this.visibleEnd&&n<=this.count()&&(this.visibleEnd=n,this.loadPageTimeouts[n]&&(clearTimeout(this.loadPageTimeouts[n]),this.loadPageTimeouts[n]=null,this.pagesLoading--)),this.loadPage(t,e,!0)}},{key:"loadPage",value:function(e,t,n){var r=this,i=function(){if(!(e<r.visibleStart||t>r.visibleEnd)){var i=n?r.visibleEnd-1:r.visibleStart;o('.PostStream-item[data-index="'+i+'"]',function(){return m.redraw(!0)}),r.unpause()}};i(),this.loadPageTimeouts[e]=setTimeout(function(){r.loadRange(e,t).then(function(){i(),r.pagesLoading--}),r.loadPageTimeouts[e]=null},this.pagesLoading?1e3:0),this.pagesLoading++}},{key:"loadRange",value:function(e,t){var n=[],r=[];return this.discussion.postIds().slice(e,t).forEach(function(e){var t=app.store.getById("posts",e);t&&t.discussion()?r.push(t):n.push(e)}),n.length?app.store.find("posts",n):m.deferred().resolve(r).promise}},{key:"loadNearNumber",value:function(e){return this.posts().some(function(t){return t&&Number(t.number())===Number(e)})?m.deferred().resolve().promise:(this.reset(),app.store.find("posts",{filter:{discussion:this.discussion.id()},page:{near:e}}).then(this.show.bind(this)))}},{key:"loadNearIndex",value:function(e){if(e>=this.visibleStart&&e<=this.visibleEnd)return m.deferred().resolve().promise;var t=this.sanitizeIndex(e-this.constructor.loadCount/2),n=t+this.constructor.loadCount;return this.reset(t,n),this.loadRange(t,n).then(this.show.bind(this))}},{key:"calculatePosition",value:function(){var e=this.getMarginTop(),t=$(window),n=t.height()-e,r=t.scrollTop()+e,o=void 0,i=void 0;this.$(".PostStream-item").each(function(){var e=$(this),t=e.offset().top,s=e.outerHeight(!0);if(t+s>r){if(o||(o=e.data("number")),!(r+n>t+s))return!1;e.data("number")&&(i=e.data("number"))}}),o&&this.trigger("positionChanged",o||1,i)}},{key:"getMarginTop",value:function(){return this.$()&&$("#header").outerHeight()+parseInt(this.$().css("margin-top"),10)}},{key:"scrollToNumber",value:function(e,t){var n=this.$(".PostStream-item[data-number="+e+"]");return this.scrollToItem(n,t).done(this.flashItem.bind(this,n))}},{key:"scrollToIndex",value:function(e,t,n){var r=this.$(".PostStream-item[data-index="+e+"]");return this.scrollToItem(r,t,!0,n)}},{key:"scrollToItem",value:function(e,t,n,r){var o=$("html, body").stop(!0);if(e.length){var i=e.offset().top-this.getMarginTop(),s=e.offset().top+e.height(),a=$(document).scrollTop(),u=a+$(window).height();if(n||a>i||s>u){var l=r?s-$(window).height()+app.composer.computedHeight():e.is(":first-child")?0:i;t?o.scrollTop(l):l!==a&&o.animate({scrollTop:l},"fast")}}return o.promise()}},{key:"flashItem",value:function(e){e.addClass("flash").one("animationend webkitAnimationEnd",function(){return e.removeClass("flash")})}},{key:"unpause",value:function(){this.paused=!1,this.scrollListener.update(!0),this.trigger("unpaused")}}]),t}(i(t,s)),u.loadCount=20,e("default",u)}}}),System.register("flarum/components/PostStreamScrubber",["flarum/Component","flarum/helpers/icon","flarum/utils/ScrollListener","flarum/utils/SubtreeRetainer","flarum/utils/computed","flarum/utils/formatNumber"],function(e){"use strict";var t,n,r,o,i,s,a;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]}],execute:function(){a=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),s=0;e>s;s++)n[s]=arguments[s];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.handlers={},this.index=0,this.visible=1,this.description="",this.visibleIndex=i("index","visible","count",function(e,t,n){return Math.min(n,Math.ceil(Math.max(0,e)+t))}),this.props.stream.on("unpaused",this.handlers.streamWasUnpaused=this.streamWasUnpaused.bind(this)),this.scrollListener=new r(this.onscroll.bind(this)),this.subtree=new o(function(){return!0})}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){function e(e,t,n){var r=$(e),i={top:100-100*o+"%",height:100*o+"%"};n.oldStyle?r.stop(!0).css(n.oldStyle).animate(i):r.css(i),n.oldStyle=i}var t=this.subtree.retain(),r=this.props.stream.discussion.unreadCount(),o=Math.min(this.count()-this.index,r)/this.count(),i=app.trans("core.forum.post_scrubber_viewing_text",{index:m("span",{className:"Scrubber-index"},t||s(this.visibleIndex())),count:m("span",{className:"Scrubber-count"},s(this.count()))});return m("div",{className:"PostStreamScrubber Dropdown "+(this.disabled()?"disabled ":"")+(this.props.className||"")},m("button",{className:"Button Dropdown-toggle","data-toggle":"dropdown"},i," ",n("sort")),m("div",{className:"Dropdown-menu dropdown-menu"},m("div",{className:"Scrubber"},m("a",{className:"Scrubber-first",onclick:this.goToFirst.bind(this)},n("angle-double-up")," ",app.trans("core.forum.post_scrubber_original_post_link")),m("div",{className:"Scrubber-scrollbar"},m("div",{className:"Scrubber-before"}),m("div",{className:"Scrubber-handle"},m("div",{className:"Scrubber-bar"}),m("div",{className:"Scrubber-info"},m("strong",null,i),m("span",{"class":"Scrubber-description"},t||this.description))),m("div",{className:"Scrubber-after"}),m("div",{className:"Scrubber-unread",config:e},app.trans("core.forum.post_scrubber_unread_text",{count:r}))),m("a",{className:"Scrubber-last",onclick:this.goToLast.bind(this)},n("angle-double-down")," ",app.trans("core.forum.post_scrubber_now_link")))))}},{key:"goToFirst",value:function(){this.props.stream.goToFirst(),this.index=0,this.renderScrollbar(!0)}},{key:"goToLast",value:function(){this.props.stream.goToLast(),this.index=this.props.stream.count(),this.renderScrollbar(!0)}},{key:"count",value:function(){return this.props.stream.count()}},{key:"streamWasUnpaused",value:function(){this.update(window.pageYOffset),this.renderScrollbar(!0)}},{key:"disabled",value:function(){return this.visible>=this.count();
}},{key:"onscroll",value:function(e){var t=this.props.stream;!t.paused&&t.$()&&(this.update(e),this.renderScrollbar())}},{key:"update",value:function(e){var t=this.props.stream,n=t.getMarginTop(),r=e+n,o=$(window).height()-n,i=t.$("> .PostStream-item[data-index]"),s=i.first().data("index")||0,a=0,u="";i.each(function(){var e=$(this),t=e.offset().top,n=e.outerHeight(!0);if(r>t+n)return a=(t+n-r)/n,s=parseFloat(e.data("index"))+1-a,!0;if(t>r+o)return!1;r>=t&&t+n>r?(a=(t+n-r)/n,s=parseFloat(e.data("index"))+1-a):t+n>=r+o?a+=(r+o-t)/n:a++;var i=e.data("time");i&&(u=i)}),this.index=s,this.visible=a,this.description=u?moment(u).format("MMMM YYYY"):""}},{key:"config",value:function(e,t){e||(t.onunload=this.ondestroy.bind(this),this.scrollListener.start(),$(window).on("resize",this.handlers.onresize=this.onresize.bind(this)).resize(),this.$(".Scrubber-scrollbar").bind("click",this.onclick.bind(this)).css({cursor:"pointer","user-select":"none"}).bind("dragstart mousedown touchstart",function(e){return e.preventDefault()}),this.dragging=!1,this.mouseStart=0,this.indexStart=0,this.$(".Scrubber-handle").css("cursor","move").bind("mousedown touchstart",this.onmousedown.bind(this)).click(function(e){return e.stopPropagation()}),$(document).on("mousemove touchmove",this.handlers.onmousemove=this.onmousemove.bind(this)).on("mouseup touchend",this.handlers.onmouseup=this.onmouseup.bind(this)))}},{key:"ondestroy",value:function(){this.scrollListener.stop(),this.props.stream.off("unpaused",this.handlers.streamWasUnpaused),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove touchmove",this.handlers.onmousemove).off("mouseup touchend",this.handlers.onmouseup)}},{key:"renderScrollbar",value:function(e){var t=this.percentPerPost(),n=this.index,r=this.count(),o=this.visible||1,i=this.$();i.find(".Scrubber-index").text(s(this.visibleIndex())),i.find(".Scrubber-description").text(this.description),i.toggleClass("disabled",this.disabled());var a={};a.before=Math.max(0,t.index*Math.min(n,r-o)),a.handle=Math.min(100-a.before,t.visible*o),a.after=100-a.before-a.handle;var u=e?"animate":"css";for(var l in a){var c=i.find(".Scrubber-"+l);c.stop(!0,!0)[u]({height:a[l]+"%"},"fast"),"animate"===u&&c.css("overflow","visible")}}},{key:"percentPerPost",value:function a(){var e=this.count()||1,t=this.visible||1,n=50/this.$(".Scrubber-scrollbar").outerHeight()*100,r=Math.max(100/e,n/t),a=e===t?0:(100-r*t)/(e-t);return{index:a,visible:r}}},{key:"onresize",value:function(){this.scrollListener.update(!0);var e=this.$(),t=this.$(".Scrubber-scrollbar");t.css("max-height",$(window).height()-e.offset().top+$(window).scrollTop()-parseInt($("#app").css("padding-bottom"),10)-(e.outerHeight()-t.outerHeight()))}},{key:"onmousedown",value:function(e){this.mouseStart=e.clientY||e.originalEvent.touches[0].clientY,this.indexStart=this.index,this.dragging=!0,this.props.stream.paused=!0,$("body").css("cursor","move")}},{key:"onmousemove",value:function(e){if(this.dragging){var t=(e.clientY||e.originalEvent.touches[0].clientY)-this.mouseStart,n=t/this.$(".Scrubber-scrollbar").outerHeight()*100,r=n/this.percentPerPost().index||0,o=Math.min(this.indexStart+r,this.count()-1);this.index=Math.max(0,o),this.renderScrollbar()}}},{key:"onmouseup",value:function(){if(this.dragging){this.mouseStart=0,this.indexStart=0,this.dragging=!1,$("body").css("cursor",""),this.$().removeClass("open");var e=Math.floor(this.index);this.props.stream.goToIndex(e),this.renderScrollbar(!0)}}},{key:"onclick",value:function(e){var t=this.$(".Scrubber-scrollbar"),n=(e.clientY||e.originalEvent.touches[0].clientY)-t.offset().top+$("body").scrollTop(),r=n/t.outerHeight()*100;r-=parseFloat(t.find(".Scrubber-handle")[0].style.height)/2;var o=r/this.percentPerPost().index;o=Math.max(0,Math.min(this.count()-1,o)),this.props.stream.goToIndex(Math.floor(o)),this.index=o,this.renderScrollbar(!0),this.$().removeClass("open")}}]),t}(t),e("default",a)}}}),System.register("flarum/components/PostUser",["flarum/Component","flarum/components/UserCard","flarum/helpers/avatar","flarum/helpers/username","flarum/helpers/listItems"],function(e){"use strict";var t,n,r,o,i,s;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]}],execute:function(){s=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.cardVisible=!1}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this.props.post,t=e.user();if(!t)return m("div",{className:"PostUser"},m("h3",null,r(t,{className:"PostUser-avatar"})," ",o(t)));var s="";return!e.isHidden()&&this.cardVisible&&(s=n.component({user:t,className:"UserCard--popover",controlsButtonClassName:"Button Button--icon Button--flat"})),m("div",{className:"PostUser"},m("h3",null,m("a",{href:app.route.user(t),config:m.route},r(t,{className:"PostUser-avatar"})," ",o(t))),m("ul",{className:"PostUser-badges badges"},i(t.badges().toArray())),s)}},{key:"config",value:function(e){var t=this;if(!e){var n=void 0;this.$().on("mouseover","h3 a, .UserCard",function(){clearTimeout(n),n=setTimeout(t.showCard.bind(t),500)}).on("mouseout","h3 a, .UserCard",function(){clearTimeout(n),n=setTimeout(t.hideCard.bind(t),250)})}}},{key:"showCard",value:function(){var e=this;this.cardVisible=!0,m.redraw(),setTimeout(function(){return e.$(".UserCard").addClass("in")})}},{key:"hideCard",value:function(){var e=this;this.$(".UserCard").removeClass("in").one("transitionend webkitTransitionEnd oTransitionEnd",function(){e.cardVisible=!1,m.redraw()})}}]),t}(t),e("default",s)}}}),System.register("flarum/components/PostsUserPage",["flarum/components/UserPage","flarum/components/LoadingIndicator","flarum/components/Button","flarum/components/CommentPost"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.loading=!0,this.moreResults=!1,this.posts=[],this.loadLimit=20,this.loadUser(m.route.param("username"))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"content",value:function(){var e=void 0;return this.loading?e=n.component():this.moreResults&&(e=m("div",{className:"PostsUserPage-loadMore"},r.component({children:app.trans("core.forum.user_posts_load_more_button"),className:"Button",onclick:this.loadMore.bind(this)}))),m("div",{className:"PostsUserPage"},m("ul",{className:"PostsUserPage-list"},this.posts.map(function(e){return m("li",null,m("div",{className:"PostsUserPage-discussion"},"In ",m("a",{href:app.route.post(e),config:m.route},e.discussion().title())),o.component({post:e,showDiscussionTitle:!0}))})),e)}},{key:"show",value:function(e){babelHelpers.get(Object.getPrototypeOf(t.prototype),"show",this).call(this,e),this.refresh()}},{key:"refresh",value:function(){this.loading=!0,this.posts=[],m.lazyRedraw(),this.loadResults().then(this.parseResults.bind(this))}},{key:"loadResults",value:function(e){return app.store.find("posts",{filter:{user:this.user.id(),type:"comment"},page:{offset:e,limit:this.loadLimit},sort:"-time"})}},{key:"loadMore",value:function(){this.loading=!0,this.loadResults(this.posts.length).then(this.parseResults.bind(this))}},{key:"parseResults",value:function(e){return this.loading=!1,[].push.apply(this.posts,e),this.moreResults=e.length>=this.loadLimit,m.redraw(),e}}]),t}(t),e("default",i)}}}),System.register("flarum/components/ReplyComposer",["flarum/components/ComposerBody","flarum/components/Alert","flarum/components/Button","flarum/helpers/icon","flarum/utils/extractText"],function(e){"use strict";var t,n,r,o,i,s;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]}],execute:function(){s=function(e){function t(){var e=this;babelHelpers.classCallCheck(this,t);for(var n=arguments.length,r=Array(n),o=0;n>o;o++)r[o]=arguments[o];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,r),this.editor.props.preview=function(){m.route(app.route.discussion(e.props.discussion,"reply"))}}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"headerItems",value:function(){var e=babelHelpers.get(Object.getPrototypeOf(t.prototype),"headerItems",this).call(this),n=this.props.discussion;return e.add("title",m("h3",null,o("reply")," ",m("a",{href:app.route.discussion(n),config:m.route},n.title()))),e}},{key:"data",value:function(){return{content:this.content(),relationships:{discussion:this.props.discussion}}}},{key:"onsubmit",value:function(){var e=this,t=this.props.discussion;this.loading=!0,m.redraw();var o=this.data();app.store.createRecord("posts").save(o).then(function(e){app.viewingDiscussion(t)?app.current.stream.update():!function(){var t=void 0,o=r.component({className:"Button Button--link",children:app.trans("core.forum.composer_reply_view_button"),onclick:function(){m.route(app.route.post(e)),app.alerts.dismiss(t)}});app.alerts.show(t=new n({type:"success",message:app.trans("core.forum.composer_reply_posted_message"),controls:[o]}))}(),app.composer.hide()},function(t){e.loading=!1,m.redraw(),app.alertErrors(t.errors)})}}],[{key:"initProps",value:function(e){babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e),e.placeholder=e.placeholder||i(app.trans("core.forum.composer_reply_body_placeholder")),e.submitLabel=e.submitLabel||app.trans("core.forum.composer_reply_submit_button"),e.confirmExit=e.confirmExit||i(app.trans("core.forum.composer_reply_discard_confirmation"))}}]),t}(t),e("default",s)}}}),System.register("flarum/components/ReplyPlaceholder",["flarum/Component","flarum/helpers/avatar","flarum/helpers/username","flarum/utils/DiscussionControls"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){function e(e){$(this).trigger("click"),e.preventDefault()}var t=this;if(app.composingReplyTo(this.props.discussion))return m("article",{className:"Post CommentPost editing"},m("header",{className:"Post-header"},m("div",{className:"PostUser"},m("h3",null,n(app.session.user,{className:"PostUser-avatar"}),r(app.session.user)))),m("div",{className:"Post-body",config:this.configPreview.bind(this)}));var i=function(){o.replyAction.call(t.props.discussion,!0)};return m("article",{className:"Post ReplyPlaceholder",onclick:i,onmousedown:e},m("header",{className:"Post-header"},n(app.session.user,{className:"PostUser-avatar"})," ",app.trans("core.forum.post_stream_reply_placeholder")))}},{key:"configPreview",value:function(e,t,n){if(!t){var r=void 0,o=setInterval(function(){var t=app.composer.component.content();if(r!==t){r=t;var n=$(window).scrollTop()+$(window).height()>=$(document).height();s9e.TextFormatter.preview(r||"",e),n&&$(window).scrollTop($(document).height())}},50);n.onunload=function(){return clearInterval(o)}}}}]),t}(t),e("default",i)}}}),System.register("flarum/components/Search",["flarum/Component","flarum/components/LoadingIndicator","flarum/utils/ItemList","flarum/utils/classList","flarum/utils/extractText","flarum/helpers/icon","flarum/components/DiscussionsSearchSource","flarum/components/UsersSearchSource"],function(e){"use strict";var t,n,r,o,i,s,a,u,l;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]},function(e){u=e["default"]}],execute:function(){l=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.value=m.prop(),this.hasFocus=!1,this.sources=this.sourceItems().toArray(),this.loadingSources=0,this.searched=[],this.index=0}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this,t=this.getCurrentSearch();return"undefined"==typeof this.value()&&this.value(t||""),m("div",{className:"Search "+o({open:this.value()&&this.hasFocus,focused:this.hasFocus,active:!!t,loading:!!this.loadingSources})},m("div",{className:"Search-input"},m("input",{className:"FormControl",placeholder:i(app.trans("core.forum.header_search_placeholder")),value:this.value(),oninput:m.withAttr("value",this.value),onfocus:function(){return e.hasFocus=!0},onblur:function(){return e.hasFocus=!1}}),this.loadingSources?n.component({size:"tiny",className:"Button Button--icon Button--link"}):t?m("button",{className:"Search-clear Button Button--icon Button--link",onclick:this.clear.bind(this)},s("times-circle")):""),m("ul",{className:"Dropdown-menu Search-results"},this.value()&&this.hasFocus?this.sources.map(function(t){return t.view(e.value())}):""))}},{key:"config",value:function(e){var t=this;if(this.setIndex(this.getCurrentNumericIndex()),!e){var n=this;this.$(".Search-results").on("mousedown",function(e){return e.preventDefault()}).on("click",function(){return t.$("input").blur()}).on("mouseenter","> li:not(.Dropdown-header)",function(){n.setIndex(n.selectableItems().index(this))}),this.$("input").on("keydown",function(e){switch(e.which){case 40:case 38:t.setIndex(t.getCurrentNumericIndex()+(40===e.which?1:-1),!0),e.preventDefault();break;case 13:m.route(t.getItem(t.index).find("a").attr("href")),t.$("input").blur();break;case 27:t.clear()}}).on("input focus",function(){var e=this.value.toLowerCase();e&&(clearTimeout(n.searchTimeout),n.searchTimeout=setTimeout(function(){-1===n.searched.indexOf(e)&&(e.length>=3&&n.sources.map(function(t){t.search&&(n.loadingSources++,t.search(e).then(function(){n.loadingSources--,m.redraw()}))}),n.searched.push(e),m.redraw())},250))}).on("focus",function(){$(this).one("mouseup",function(e){return e.preventDefault()}).select()})}}},{key:"getCurrentSearch",value:function(){return app.current&&"function"==typeof app.current.searching&&app.current.searching()}},{key:"clear",value:function(){this.value(""),this.getCurrentSearch()?app.current.clearSearch():m.redraw()}},{key:"sourceItems",value:function(){var e=new r;return e.add("discussions",new a),e.add("users",new u),e}},{key:"selectableItems",value:function(){return this.$(".Search-results > li:not(.Dropdown-header)")}},{key:"getCurrentNumericIndex",value:function(){return this.selectableItems().index(this.getItem(this.index))}},{key:"getItem",value:function(e){var t=this.selectableItems(),n=t.filter('[data-index="'+e+'"]');return n.length||(n=t.eq(e)),n}},{key:"setIndex",value:function(e,t){var n=this.selectableItems(),r=n.parent(),o=e;0>e?o=n.length-1:e>=n.length&&(o=0);var i=n.removeClass("active").eq(o).addClass("active");if(this.index=i.attr("data-index")||o,t){var s=r.scrollTop(),a=r.offset().top,u=a+r.outerHeight(),l=i.offset().top,c=l+i.outerHeight(),f=void 0;a>l?f=s-a+l-parseInt(r.css("padding-top"),10):c>u&&(f=s-u+c+parseInt(r.css("padding-bottom"),10)),"undefined"!=typeof f&&r.stop(!0).animate({scrollTop:f},100)}}}]),t}(t),e("default",l)}}}),System.register("flarum/components/SearchSource",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(){babelHelpers.classCallCheck(this,e)}return babelHelpers.createClass(e,[{key:"search",value:function(){}},{key:"view",value:function(){}}]),e}(),e("default",t)}}}),System.register("flarum/components/SessionDropdown",["flarum/helpers/avatar","flarum/helpers/username","flarum/components/Dropdown","flarum/components/LinkButton","flarum/components/Button","flarum/utils/ItemList","flarum/components/Separator","flarum/models/Group"],function(e){"use strict";var t,n,r,o,i,s,a,u,l;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]},function(e){u=e["default"]}],execute:function(){l=function(e){function r(){babelHelpers.classCallCheck(this,r),babelHelpers.get(Object.getPrototypeOf(r.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(r,e),babelHelpers.createClass(r,[{key:"view",value:function(){return this.props.children=this.items().toArray(),babelHelpers.get(Object.getPrototypeOf(r.prototype),"view",this).call(this)}},{key:"getButtonContent",value:function(){var e=app.session.user;return[t(e)," ",m("span",{className:"Button-label"},n(e))]}},{key:"items",value:function l(){var l=new s,e=app.session.user;return l.add("profile",o.component({icon:"user",children:app.trans("core.forum.header_profile_button"),href:app.route.user(e)}),100),l.add("settings",o.component({icon:"cog",children:app.trans("core.forum.header_settings_button"),href:app.route("settings")}),50),e.groups().some(function(e){return e.id()===u.ADMINISTRATOR_ID})&&l.add("administration",o.component({icon:"wrench",children:app.trans("core.forum.header_admin_button"),href:app.forum.attribute("baseUrl")+"/admin",target:"_blank",config:function(){}}),0),l.add("separator",a.component(),-90),l.add("logOut",i.component({icon:"sign-out",children:app.trans("core.forum.header_log_out_button"),onclick:app.session.logout.bind(app.session)}),-100),l}}],[{key:"initProps",value:function(e){babelHelpers.get(Object.getPrototypeOf(r),"initProps",this).call(this,e),e.className="SessionDropdown",e.buttonClassName="Button Button--user Button--flat",e.menuClassName="Dropdown-menu--right"}}]),r}(r),e("default",l)}}}),System.register("flarum/components/SettingsPage",["flarum/components/UserPage","flarum/utils/ItemList","flarum/components/Switch","flarum/components/Button","flarum/components/FieldSet","flarum/components/NotificationGrid","flarum/components/ChangePasswordModal","flarum/components/ChangeEmailModal","flarum/helpers/listItems"],function(e){"use strict";var t,n,r,o,i,s,a,u,l,c;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]},function(e){u=e["default"]},function(e){l=e["default"]}],execute:function(){c=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.show(app.session.user),app.setTitle(app.trans("core.forum.settings_title"))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"content",value:function(){return m("div",{className:"SettingsPage"},m("ul",null,l(this.settingsItems().toArray())))}},{key:"settingsItems",value:function(){var e=new n;return e.add("account",i.component({label:app.trans("core.forum.settings_account_heading"),className:"Settings-account",children:this.accountItems().toArray()})),e.add("notifications",i.component({label:app.trans("core.forum.settings_notifications_heading"),className:"Settings-notifications",children:[s.component({user:this.user})]})),e.add("privacy",i.component({label:app.trans("core.forum.settings_privacy_heading"),className:"Settings-privacy",children:this.privacyItems().toArray()})),e}},{key:"accountItems",value:function(){var e=new n;return e.add("changePassword",o.component({children:app.trans("core.forum.settings_change_password_button"),className:"Button",onclick:function(){return app.modal.show(new a)}})),e.add("changeEmail",o.component({children:app.trans("core.forum.settings_change_email_button"),className:"Button",onclick:function(){return app.modal.show(new u)}})),e}},{key:"preferenceSaver",value:function(e){var t=this;return function(n,r){r&&(r.loading=!0),m.redraw(),t.user.savePreferences(babelHelpers.defineProperty({},e,n)).then(function(){r&&(r.loading=!1),m.redraw()})}}},{key:"privacyItems",value:function(){var e=this,t=new n;return t.add("discloseOnline",r.component({children:app.trans("core.forum.settings_privacy_disclose_online_label"),state:this.user.preferences().discloseOnline,onchange:function(t,n){e.user.pushAttributes({lastSeenTime:null}),e.preferenceSaver("discloseOnline")(t,n)}})),t}}]),t}(t),e("default",c)}}}),System.register("flarum/components/SignUpModal",["flarum/components/Modal","flarum/components/LogInModal","flarum/helpers/avatar","flarum/components/Button","flarum/components/LogInButtons","flarum/utils/extractText"],function(e){"use strict";var t,n,r,o,i,s,a;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]}],execute:function(){a=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.username=m.prop(this.props.username||""),this.email=m.prop(this.props.email||""),this.password=m.prop(this.props.password||""),this.welcomeUser=null}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"className",value:function(){return"Modal--small SignUpModal"+(this.welcomeUser?" SignUpModal--success":"")}},{key:"title",value:function(){return app.trans("core.forum.sign_up_title")}},{key:"content",value:function(){return[m("div",{className:"Modal-body"},this.body()),m("div",{className:"Modal-footer"},this.footer())]}},{key:"body",value:function a(){var a=[this.props.token?"":m(i,null),m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"username",placeholder:s(app.trans("core.forum.sign_up_username_placeholder")),value:this.username(),onchange:m.withAttr("value",this.username),disabled:this.loading})),m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:s(app.trans("core.forum.sign_up_email_placeholder")),value:this.email(),onchange:m.withAttr("value",this.email),disabled:this.loading||this.props.token&&this.props.email})),this.props.token?"":m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",placeholder:s(app.trans("core.forum.sign_up_password_placeholder")),value:this.password(),onchange:m.withAttr("value",this.password),disabled:this.loading})),m("div",{className:"Form-group"},m(o,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},app.trans("core.forum.sign_up_submit_button"))))];if(this.welcomeUser){var e=this.welcomeUser,t=function(e,t){t||$(e).hide().fadeIn()};a.push(m("div",{className:"SignUpModal-welcome",style:{background:e.color()},config:t},m("div",{className:"darkenBackground"},m("div",{className:"container"},r(e),m("h3",null,app.trans("core.forum.sign_up_welcome_text",{user:e})),m("p",null,app.trans("core.forum.sign_up_confirmation_message",{email:m("strong",null,e.email())})),m("p",null,m(o,{className:"Button Button--primary",onclick:this.hide.bind(this)},app.trans("core.forum.sign_up_dismiss_button")))))))}return a}},{key:"footer",value:function(){return[m("p",{className:"SignUpModal-logIn"},app.trans("core.forum.sign_up_already_have_account_text"),m("a",{onclick:this.logIn.bind(this)},app.trans("core.forum.sign_up_log_in_link")))]}},{key:"logIn",value:function(){var e={email:this.email()||this.username(),password:this.password()};app.modal.show(new n(e))}},{key:"onready",value:function(){this.props.username&&!this.props.email?this.$("[name=email]").select():this.$("[name=username]").select()}},{key:"onsubmit",value:function(e){var t=this;e.preventDefault(),this.loading=!0;var n=this.submitData();app.request({url:app.forum.attribute("baseUrl")+"/register",method:"POST",data:n}).then(function(e){var n=app.store.pushPayload(e);n.isActivated()?window.location.reload():(t.welcomeUser=n,t.loading=!1,m.redraw())},function(e){t.loading=!1,t.handleErrors(e)})}},{key:"submitData",value:function(){var e={username:this.username(),email:this.email()};return this.props.token?e.token=this.props.token:e.password=this.password(),e}}]),t}(t),e("default",a)}}}),System.register("flarum/components/TerminalPost",["flarum/Component","flarum/helpers/humanTime","flarum/helpers/icon"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this.props.discussion,t=this.props.lastPost&&e.repliesCount(),o=e[t?"lastUser":"startUser"](),i=e[t?"lastTime":"startTime"]();return m("span",null,t?r("reply"):""," ",app.trans("core.forum.discussion_list_"+(t?"replied":"started")+"_text",{user:o,ago:n(i)}))}}]),t}(t),e("default",o)}}}),System.register("flarum/components/TextEditor",["flarum/Component","flarum/utils/ItemList","flarum/helpers/listItems","flarum/components/Button"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.value=m.prop(this.props.value||"")}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("div",{className:"TextEditor"},m("textarea",{className:"FormControl TextEditor-flexible",config:this.configTextarea.bind(this),oninput:m.withAttr("value",this.oninput.bind(this)),placeholder:this.props.placeholder||"",disabled:!!this.props.disabled,value:this.value()}),m("ul",{className:"TextEditor-controls"},r(this.controlItems().toArray())))}},{key:"configTextarea",value:function(e,t){var n=this;if(!t){var r=function(){n.onsubmit(),m.redraw()};$(e).bind("keydown","meta+return",r),$(e).bind("keydown","ctrl+return",r)}}},{key:"controlItems",value:function(){var e=new n;return e.add("submit",o.component({children:this.props.submitLabel,icon:"check",className:"Button Button--primary",onclick:this.onsubmit.bind(this)})),this.props.preview&&e.add("preview",o.component({icon:"eye",className:"Button Button--icon",onclick:this.props.preview})),e}},{key:"setValue",value:function(e){this.$("textarea").val(e).trigger("input")}},{key:"setSelectionRange",value:function(e,t){var n=this.$("textarea");n[0].setSelectionRange(e,t),n.focus()}},{key:"getSelectionRange",value:function(){var e=this.$("textarea");return[e[0].selectionStart,e[0].selectionEnd]}},{key:"insertAtCursor",value:function(e){var t=this.$("textarea")[0],n=this.value(),r=t?t.selectionStart:n.length;if(this.setValue(n.slice(0,r)+e+n.slice(r)),t){var o=r+e.length;this.setSelectionRange(o,o)}}},{key:"oninput",value:function(e){this.value(e),this.props.onchange(this.value()),m.redraw.strategy("none")}},{key:"onsubmit",value:function(){this.props.onsubmit(this.value())}}]),t}(t),e("default",i)}}}),System.register("flarum/components/UserBio",["flarum/Component","flarum/components/LoadingIndicator","flarum/utils/classList","flarum/utils/extractText"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.editing=!1,this.loading=!1}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this.props.user,t=void 0;if(this.editing)t=m("textarea",{className:"FormControl",placeholder:o(app.trans("core.forum.user_bio_placeholder")),rows:"3",value:e.bio()});else{var i=void 0;if(this.loading)i=m("p",{className:"UserBio-placeholder"},n.component({size:"tiny"}));else{var s=e.bioHtml();s?i=m.trust(s):this.props.editable&&(i=m("p",{className:"UserBio-placeholder"},app.trans("core.forum.user_bio_placeholder")))}t=m("div",{className:"UserBio-content"},i)}return m("div",{className:"UserBio "+r({editable:this.props.editable,editing:this.editing}),onclick:this.edit.bind(this)},t)}},{key:"edit",value:function(){if(this.props.editable){this.editing=!0,m.redraw();var e=this,t=function(t){t.shiftKey||(t.preventDefault(),e.save($(this).val()))};this.$("textarea").focus().bind("blur",t).bind("keydown","return",t)}}},{key:"save",value:function(e){var t=this,n=this.props.user;n.bio()!==e&&(this.loading=!0,n.save({bio:e}).then(function(){t.loading=!1,m.redraw()})),this.editing=!1,m.redraw()}}]),t}(t),e("default",i)}}}),System.register("flarum/components/UserCard",["flarum/Component","flarum/utils/humanTime","flarum/utils/ItemList","flarum/utils/UserControls","flarum/helpers/avatar","flarum/helpers/username","flarum/helpers/icon","flarum/components/Dropdown","flarum/components/UserBio","flarum/components/AvatarEditor","flarum/helpers/listItems"],function(e){"use strict";var t,n,r,o,i,s,a,u,l,c,f,p;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]},function(e){u=e["default"]},function(e){l=e["default"]},function(e){c=e["default"]},function(e){f=e["default"]}],execute:function(){p=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this.props.user,t=o.controls(e,this).toArray(),n=e.color(),r=e.badges().toArray();return m("div",{className:"UserCard "+(this.props.className||""),style:n?{backgroundColor:n}:""},m("div",{className:"darkenBackground"},m("div",{className:"container"},t.length?u.component({children:t,className:"UserCard-controls App-primaryControl",menuClassName:"Dropdown-menu--right",buttonClassName:this.props.controlsButtonClassName,label:app.trans("core.forum.user_controls_button"),icon:"ellipsis-v"}):"",m("div",{className:"UserCard-profile"},m("h2",{className:"UserCard-identity"},this.props.editable?[c.component({user:e,className:"UserCard-avatar"}),s(e)]:m("a",{href:app.route.user(e),config:m.route},m("div",{className:"UserCard-avatar"},i(e)),s(e))),r.length?m("ul",{className:"UserCard-badges badges"},f(r)):"",m("ul",{className:"UserCard-info"},f(this.infoItems().toArray()))))))}},{key:"infoItems",value:function(){var e=new r,t=this.props.user,o=t.lastSeenTime();if(e.add("bio",l.component({user:t,editable:this.props.editable})),o){var i=t.isOnline();e.add("lastSeen",m("span",{className:"UserCard-lastSeen"+(i?" online":"")},i?[a("circle")," ",app.trans("core.forum.user_online_text")]:[a("clock-o")," ",n(o)]))}return e.add("joined",app.trans("core.forum.user_joined_date_text",{ago:n(t.joinTime())})),e}}]),t}(t),e("default",p)}}}),System.register("flarum/components/UserPage",["flarum/components/Page","flarum/utils/ItemList","flarum/utils/affixSidebar","flarum/components/UserCard","flarum/components/LoadingIndicator","flarum/components/SelectDropdown","flarum/components/LinkButton","flarum/components/Separator","flarum/helpers/listItems"],function(e){
"use strict";var t,n,r,o,i,s,a,u,l,c;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]},function(e){u=e["default"]},function(e){l=e["default"]}],execute:function(){c=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.user=null,app.history.push("user"),this.bodyClass="App--user"}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("div",{className:"UserPage"},this.user?[o.component({user:this.user,className:"Hero UserHero",editable:this.user.canEdit()||this.user===app.session.user,controlsButtonClassName:"Button"}),m("div",{className:"container"},m("nav",{className:"sideNav UserPage-nav",config:r},m("ul",null,l(this.sidebarItems().toArray()))),m("div",{className:"sideNavOffset UserPage-content"},this.content()))]:[i.component({className:"LoadingIndicator--block"})])}},{key:"content",value:function(){}},{key:"show",value:function(e){this.user=e,app.setTitle(e.username()),m.redraw()}},{key:"loadUser",value:function(e){var t=this,n=e.toLowerCase();app.store.all("users").some(function(e){return e.username().toLowerCase()===n&&e.joinTime()?(t.show(e),!0):void 0}),this.user||app.store.find("users",e).then(this.show.bind(this))}},{key:"sidebarItems",value:function(){var e=new n;return e.add("nav",s.component({children:this.navItems().toArray(),className:"App-titleControl",buttonClassName:"Button"})),e}},{key:"navItems",value:function(){var e=new n,t=this.user;return e.add("posts",a.component({href:app.route("user.posts",{username:t.username()}),children:[app.trans("core.forum.user_posts_link"),m("span",{className:"Button-badge"},t.commentsCount())],icon:"comment-o"})),e.add("discussions",a.component({href:app.route("user.discussions",{username:t.username()}),children:[app.trans("core.forum.user_discussions_link"),m("span",{className:"Button-badge"},t.discussionsCount())],icon:"reorder"})),app.session.user===t&&(e.add("separator",u.component()),e.add("settings",a.component({href:app.route("settings"),children:app.trans("core.forum.user_settings_link"),icon:"cog"}))),e}}]),t}(t),e("default",c)}}}),System.register("flarum/components/UsersSearchSource",["flarum/helpers/highlight","flarum/helpers/avatar"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(){function e(){babelHelpers.classCallCheck(this,e)}return babelHelpers.createClass(e,[{key:"search",value:function(e){return app.store.find("users",{filter:{q:e},page:{limit:5}})}},{key:"view",value:function(e){var r=app.store.all("users").filter(function(t){return t.username().toLowerCase().substr(0,e.length)===e});return r.length?[m("li",{className:"Dropdown-header"},app.trans("core.forum.search_users_heading")),r.map(function(r){return m("li",{className:"UserSearchResult","data-index":"users"+r.id()},m("a",{href:app.route.user(r),config:m.route},n(r),t(r.username(),e)))})]:""}}]),e}(),e("default",r)}}}),System.register("flarum/components/WelcomeHero",["flarum/Component","flarum/components/Button"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.hidden=localStorage.getItem("welcomeHidden")}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this;if(this.hidden)return m("div",null);var t=function(){e.$().slideUp(e.hide.bind(e))};return m("header",{className:"Hero WelcomeHero"},m("div",{"class":"container"},n.component({icon:"times",onclick:t,className:"Hero-close Button Button--icon Button--link"}),m("div",{className:"containerNarrow"},m("h2",{className:"Hero-title"},app.forum.attribute("welcomeTitle")),m("div",{className:"Hero-subtitle"},m.trust(app.forum.attribute("welcomeMessage"))))))}},{key:"hide",value:function(){localStorage.setItem("welcomeHidden","true"),this.hidden=!0}}]),t}(t),e("default",r)}}}),System.register("flarum/App",["flarum/utils/ItemList","flarum/components/Alert","flarum/components/Button","flarum/components/RequestErrorModal","flarum/Translator","flarum/utils/extract","flarum/utils/patchMithril","flarum/utils/RequestError"],function(e){"use strict";var t,n,r,o,i,s,a,u,l;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]},function(e){u=e["default"]}],execute:function(){l=function(){function e(){babelHelpers.classCallCheck(this,e),a(window),this.forum=null,this.routes={},this.preload={data:null,document:null,session:null},this.initializers=new t,this.session=null,this.translator=new i,this.store=null,this.cache={},this.booted=!1,this.requestError=null,this.title="",this.titleCount=0}return babelHelpers.createClass(e,[{key:"boot",value:function(){var e=this;this.initializers.toArray().forEach(function(t){return t(e)})}},{key:"preloadedDocument",value:function(){if(app.preload.document){var e=app.store.pushPayload(app.preload.document);return app.preload.document=null,e}return null}},{key:"setTitle",value:function(e){this.title=e,this.updateTitle()}},{key:"setTitleCount",value:function(e){this.titleCount=e,this.updateTitle()}},{key:"updateTitle",value:function(){document.title=(this.titleCount?"("+this.titleCount+") ":"")+(this.title?this.title+" - ":"")+this.forum.attribute("title")}},{key:"request",value:function(e){var t=this;e.config=e.config||this.session.authorize.bind(this.session),e.background=e.background||!0,e.deserialize=e.deserialize||function(e){try{return JSON.parse(e)}catch(t){throw new u(t.message,e)}};var o=e.extract;return e.extract=function(e){var t=void 0;t=o?o(e.responseText):e.responseText.length>0?e.responseText:null;var n=e.status;if(n>=500&&599>=n)throw new u("Internal Server Error",t);return t},this.alerts.dismiss(this.requestErrorAlert),m.request(e).then(null,function(e){throw e instanceof u&&t.alerts.show(t.requestErrorAlert=new n({type:"error",children:"Oops! Something went wrong. Please reload the page and try again.",controls:app.forum.attribute("debug")?[m(r,{className:"Button Button--link",onclick:t.showDebug.bind(t,e)},"Debug")]:void 0})),e})}},{key:"showDebug",value:function(e){this.alerts.dismiss(this.requestErrorAlert),this.modal.show(new o({error:e}))}},{key:"alertErrors",value:function(e){var t=this;e.forEach(function(e){t.alerts.show(new n({type:"error",children:e.detail}))})}},{key:"route",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=this.routes[e].path.replace(/:([^\/]+)/g,function(e,n){return s(t,n)}),r=m.route.buildQueryString(t),o="pathname"===m.route.mode?app.forum.attribute("basePath"):"";return o+n+(r?"?"+r:"")}},{key:"trans",value:function(e,t){return this.translator.trans(e,t)}}]),e}(),e("default",l)}}}),System.register("flarum/Component",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(t,n){void 0===t&&(t={}),babelHelpers.classCallCheck(this,e),n&&(t.children=n),this.constructor.initProps(t),this.props=t,this.element=null,this.init()}return babelHelpers.createClass(e,[{key:"init",value:function(){}},{key:"onunload",value:function(){}},{key:"render",value:function(){var e=this,t=this.view();t.attrs=t.attrs||{};var n=t.attrs.config;return t.attrs.config=function(){for(var t=arguments.length,r=Array(t),o=0;t>o;o++)r[o]=arguments[o];e.element=r[0],e.config.apply(e,r.slice(1)),n&&n.apply(e,r)},t}},{key:"$",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){var t=$(this.element);return e?t.find(e):t})},{key:"config",value:function(){}},{key:"view",value:function(){throw new Error("Component#view must be implemented by subclass")}}],[{key:"component",value:function(e,t){void 0===e&&(e={});var n=babelHelpers._extends({},e);t&&(n.children=t),this.initProps(n);var r=function(e){return e.props=n,e.render()};r.$original=this.prototype.view;var o={controller:this.bind(void 0,n),view:r,props:n,component:this};return n.key&&(o.attrs={key:n.key}),o}},{key:"initProps",value:function(e){}}]),e}(),e("default",t)}}}),System.register("flarum/Model",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(t,n){void 0===t&&(t={}),babelHelpers.classCallCheck(this,e),this.data=t,this.freshness=new Date,this.exists=!1,this.store=n}return babelHelpers.createClass(e,[{key:"id",value:function(){return this.data.id}},{key:"attribute",value:function(e){return this.data.attributes[e]}},{key:"pushData",value:function(t){for(var n in t)if("object"==typeof t[n]){this.data[n]=this.data[n]||{};for(var r in t[n])t[n][r]instanceof e&&(t[n][r]={data:e.getRelationshipData(t[n][r])}),this.data[n][r]=t[n][r]}else this.data[n]=t[n];this.freshness=new Date}},{key:"pushAttributes",value:function(e){this.pushData({attributes:e})}},{key:"save",value:function(t){var n=this,r={type:this.data.type,id:this.data.id,attributes:t};if(t.relationships){r.relationships={};for(var o in t.relationships){var i=t.relationships[o];r.relationships[o]={data:i instanceof Array?i.map(e.getRelationshipData):e.getRelationshipData(i)}}delete t.relationships}var s=JSON.parse(JSON.stringify(this.data));return this.pushData(r),app.request({method:this.exists?"PATCH":"POST",url:app.forum.attribute("apiUrl")+this.apiEndpoint(),data:{data:r}}).then(function(e){return n.store.data[e.data.type]=n.store.data[e.data.type]||{},n.store.data[e.data.type][e.data.id]=n,n.store.pushPayload(e)},function(e){throw n.pushData(s),m.lazyRedraw(),e})}},{key:"delete",value:function(e){var t=this;return this.exists?app.request({method:"DELETE",url:app.forum.attribute("apiUrl")+this.apiEndpoint(),data:e}).then(function(){t.exists=!1,t.store.remove(t)}):m.deferred.resolve().promise}},{key:"apiEndpoint",value:function(){return"/"+this.data.type+(this.exists?"/"+this.data.id:"")}}],[{key:"attribute",value:function(e,t){return function(){var n=this.data.attributes&&this.data.attributes[e];return t?t(n):n}}},{key:"hasOne",value:function(e){return function(){if(this.data.relationships){var t=this.data.relationships[e];if(t)return app.store.getById(t.data.type,t.data.id)}return!1}}},{key:"hasMany",value:function(e){return function(){if(this.data.relationships){var t=this.data.relationships[e];if(t)return t.data.map(function(e){return app.store.getById(e.type,e.id)})}return!1}}},{key:"transformDate",value:function(e){return e?new Date(e):null}},{key:"getRelationshipData",value:function(e){return{type:e.data.type,id:e.data.id}}}]),e}(),e("default",t)}}}),System.register("flarum/Session",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(t,n){babelHelpers.classCallCheck(this,e),this.user=n,this.token=t}return babelHelpers.createClass(e,[{key:"login",value:function(e,t){return app.request({method:"POST",url:app.forum.attribute("baseUrl")+"/login",data:{identification:e,password:t}}).then(function(){return window.location.reload()})}},{key:"logout",value:function(){window.location=app.forum.attribute("baseUrl")+"/logout?token="+this.token}},{key:"authorize",value:function(e){this.token&&e.setRequestHeader("Authorization","Token "+this.token)}}]),e}(),e("default",t)}}}),System.register("flarum/Store",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(t){babelHelpers.classCallCheck(this,e),this.data={},this.models=t}return babelHelpers.createClass(e,[{key:"pushPayload",value:function(e){e.included&&e.included.map(this.pushObject.bind(this));var t=e.data instanceof Array?e.data.map(this.pushObject.bind(this)):this.pushObject(e.data);return t.payload=e,t}},{key:"pushObject",value:function(e){if(!this.models[e.type])return null;var t=this.data[e.type]=this.data[e.type]||{};return t[e.id]?t[e.id].pushData(e):t[e.id]=this.createRecord(e.type,e),t[e.id].exists=!0,t[e.id]}},{key:"find",value:function(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=n,o=app.forum.attribute("apiUrl")+"/"+e;return t instanceof Array?o+="?ids[]="+t.join("&ids[]="):"object"==typeof t?r=t:t&&(o+="/"+t),app.request({method:"GET",url:o,data:r}).then(this.pushPayload.bind(this))}},{key:"getById",value:function(e,t){return this.data[e]&&this.data[e][t]}},{key:"getBy",value:function(e,t,n){return this.all(e).filter(function(e){return e[t]()===n})[0]}},{key:"all",value:function(e){var t=this.data[e];return t?Object.keys(t).map(function(e){return t[e]}):[]}},{key:"remove",value:function(e){delete this.data[e.data.type][e.id()]}},{key:"createRecord",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.type=t.type||e,new this.models[e](t,this)}}]),e}(),e("default",t)}}}),System.register("flarum/Translator",["flarum/models/User","flarum/helpers/username","flarum/utils/extractText","flarum/utils/extract"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(){function e(){babelHelpers.classCallCheck(this,e),this.translations={}}return babelHelpers.createClass(e,[{key:"plural",value:function(e){return 1===e?"one":"other"}},{key:"trans",value:function(e,t,i){void 0===t&&(t={});var s=e.split("."),a=this.translations;if(s.forEach(function(e){a=a&&a[e]}),a&&"object"==typeof a&&"undefined"!=typeof t.count&&(a=a[this.plural(r(t.count))]),"user"in t){var u=o(t,"user");t.username||(t.username=n(u))}return"string"==typeof a?(a=a.split(new RegExp("({[^}]+})","gi")),a.forEach(function(e,n){var r=e.match(/^{(.+)}$/i);r&&(a[n]=t[r[1]])}),a):i||[e]}}]),e}(),e("default",i)}}}),System.register("flarum/extend",[],function(e){"use strict";function t(e,t,n){var r=e[t];e[t]=function(){for(var e=arguments.length,t=Array(e),o=0;e>o;o++)t[o]=arguments[o];var i=r?r.apply(this,t):void 0;return n.apply(this,[i].concat(t)),i},babelHelpers._extends(e[t],r)}function n(e,t,n){var r=e[t];e[t]=function(){for(var e=arguments.length,t=Array(e),o=0;e>o;o++)t[o]=arguments[o];return n.apply(this,[r.bind(this)].concat(t))},babelHelpers._extends(e[t],r)}return e("extend",t),e("override",n),{setters:[],execute:function(){}}}),System.register("flarum/helpers/avatar",[],function(e){"use strict";function t(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];t.className="Avatar "+(t.className||"");var n="",r="undefined"===t.title||t.title;if(r||delete t.title,e){var o=e.username()||"?",i=e.avatarUrl();if(r&&(t.title=t.title||o),i)return m("img",babelHelpers._extends({},t,{src:i}));n=o.charAt(0).toUpperCase(),t.style={background:e.color()}}return m("span",t,n)}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/helpers/fullTime",[],function(e){"use strict";function t(e){var t=moment(e),n=t.format(),r=t.format("LLLL");return m("time",{pubdate:!0,datetime:n},r)}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/helpers/highlight",["flarum/utils/string"],function(e){"use strict";function t(e,t,r){if(!t&&!r)return e;var o=t instanceof RegExp?t:new RegExp(t,"gi"),i=e,s=0;return r&&(t&&(s=Math.max(0,e.search(o)-r/2)),i=n(i,r,s)),i=$("<div/>").text(i).html(),t&&(i=i.replace(o,"<mark>$&</mark>")),m.trust(i)}var n;return e("default",t),{setters:[function(e){n=e.truncate}],execute:function(){}}}),System.register("flarum/helpers/humanTime",["flarum/utils/humanTime"],function(e){"use strict";function t(e){var t=moment(e),r=t.format(),o=t.format("LLLL"),i=n(e);return m("time",{pubdate:!0,datetime:r,title:o,"data-humantime":!0},i)}var n;return e("default",t),{setters:[function(e){n=e["default"]}],execute:function(){}}}),System.register("flarum/helpers/icon",[],function(e){"use strict";function t(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.className="icon fa fa-fw fa-"+e+" "+(t.className||""),m("i",t)}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/helpers/listItems",["flarum/components/Separator","flarum/utils/classList"],function(e){"use strict";function t(e){return e&&e.component===o}function n(e){var n=[],r=void 0;return e.forEach(function(o,i){(!t(o)||r&&!t(r)&&i!==e.length-1)&&(r=o,n.push(o))}),n}function r(e){return e instanceof Array||(e=[e]),n(e).map(function(e){var t=e.component&&e.component.isListItem,n=e.component&&e.component.isActive&&e.component.isActive(e.props),r=e.props?e.props.itemClassName:e.itemClassName;return[t?e:m("li",{className:i([e.itemName?"item-"+e.itemName:"",r,n?"active":""])},e)," "]})}var o,i;return e("default",r),{setters:[function(e){o=e["default"]},function(e){i=e["default"]}],execute:function(){}}}),System.register("flarum/helpers/punctuate",[],function(e){"use strict";function t(e){var t=[];return e.forEach(function(n,r){t.push(n),r<e.length-1&&t.push((e.length>2?", ":"")+(r===e.length-2?" and ":""))}),t}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/helpers/username",[],function(e){"use strict";function t(e){var t=e&&e.username()||app.trans("core.forum.user_deleted_text");return m("span",{className:"username"},t)}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/components/Alert",["flarum/Component","flarum/components/Button","flarum/helpers/listItems","flarum/utils/extract"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=babelHelpers._extends({},this.props),t=o(e,"type");e.className="Alert Alert--"+t+" "+(e.className||"");var i=o(e,"children"),s=o(e,"controls")||[],a=o(e,"dismissible"),u=o(e,"ondismiss"),l=[];return(a||void 0===a)&&l.push(m(n,{icon:"times",className:"Button Button--link Button--icon Alert-dismiss",onclick:u})),m("div",e,m("span",{className:"Alert-body"},i),m("ul",{className:"Alert-controls"},r(s.concat(l))))}}]),t}(t),e("default",i)}}}),System.register("flarum/components/AlertManager",["flarum/Component","flarum/components/Alert"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.components=[]}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("div",{className:"AlertManager"},this.components.map(function(e){return m("div",{className:"AlertManager-alert"},e)}))}},{key:"show",value:function(e){if(!(e instanceof n))throw new Error("The AlertManager component can only show Alert components");e.props.ondismiss=this.dismiss.bind(this,e),this.components.push(e),m.redraw()}},{key:"dismiss",value:function(e){var t=this.components.indexOf(e);-1!==t&&(this.components.splice(t,1),m.redraw())}},{key:"clear",value:function(){this.components=[],m.redraw()}}]),t}(t),e("default",r)}}}),System.register("flarum/components/Badge",["flarum/Component","flarum/helpers/icon","flarum/utils/extract"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=babelHelpers._extends({},this.props),t=r(e,"type"),o=r(e,"icon");return e.className="Badge "+(t?"Badge--"+t:"")+" "+(e.className||""),e.title=r(e,"label")||"",e.key=e.type,m("span",e,o?n(o,{className:"Badge-icon"}):m.trust("&nbsp;"))}},{key:"config",value:function(e){e||this.props.label&&this.$().tooltip({container:"body"})}}]),t}(t),e("default",o)}}}),System.register("flarum/components/Button",["flarum/Component","flarum/helpers/icon","flarum/utils/extract","flarum/components/LoadingIndicator"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=babelHelpers._extends({},this.props);delete e.children,e.className=e.className||"",e.type=e.type||"button";var t=r(e,"icon");t&&(e.className+=" hasIcon");var n=r(e,"loading");return(e.disabled||n)&&(e.className+=" disabled"+(n?" loading":""),delete e.onclick),m("button",e,this.getButtonContent())}},{key:"getButtonContent",value:function(){var e=this.props.icon;return[e&&e!==!0?n(e,{className:"Button-icon"}):"",this.props.children?m("span",{className:"Button-label"},this.props.children):"",this.props.loading?o.component({size:"tiny",className:"LoadingIndicator--inline"}):""]}}]),t}(t),e("default",i)}}}),System.register("flarum/components/Checkbox",["flarum/Component","flarum/components/LoadingIndicator","flarum/helpers/icon"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.loading=!1}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e="Checkbox "+(this.props.state?"on":"off")+" "+(this.props.className||"");return this.loading&&(e+=" loading"),this.props.disabled&&(e+=" disabled"),m("label",{className:e},m("input",{type:"checkbox",checked:this.props.state,disabled:this.props.disabled,onchange:m.withAttr("checked",this.onchange.bind(this))}),m("div",{className:"Checkbox-display"},this.getDisplay()),this.props.children)}},{key:"getDisplay",value:function(){return this.loading?n.component({size:"tiny"}):r(this.props.state?"check":"times")}},{key:"onchange",value:function(e){this.props.onchange&&this.props.onchange(e,this)}}]),t}(t),e("default",o)}}}),System.register("flarum/components/Dropdown",["flarum/Component","flarum/helpers/icon","flarum/helpers/listItems"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this.props.children?r(this.props.children):[];return m("div",{className:"ButtonGroup Dropdown dropdown "+this.props.className+" itemCount"+e.length},this.getButton(),this.getMenu(e))}},{key:"config",value:function(e){var t=this;e||(this.$().on("shown.bs.dropdown",function(){var e=t.$(".Dropdown-menu").removeClass("Dropdown-menu--top");e.toggleClass("Dropdown-menu--top",e.offset().top+e.height()>$(window).scrollTop()+$(window).height()),t.props.onshow&&(t.props.onshow(),m.redraw())}),this.$().on("hidden.bs.dropdown",function(){t.props.onhide&&(t.props.onhide(),m.redraw())}))}},{key:"getButton",value:function(){return m("button",{className:"Dropdown-toggle "+this.props.buttonClassName,"data-toggle":"dropdown",onclick:this.props.onclick},this.getButtonContent())}},{key:"getButtonContent",value:function(){return[this.props.icon?n(this.props.icon,{className:"Button-icon"}):"",m("span",{className:"Button-label"},this.props.label),this.props.caretIcon?n(this.props.caretIcon,{className:"Button-caret"}):""]}},{key:"getMenu",value:function(e){return m("ul",{className:"Dropdown-menu dropdown-menu "+this.props.menuClassName},e)}}],[{key:"initProps",value:function(e){babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e),e.className=e.className||"",e.buttonClassName=e.buttonClassName||"",e.menuClassName=e.menuClassName||"",e.label=e.label||"",e.caretIcon="undefined"!=typeof e.caretIcon?e.caretIcon:"caret-down"}}]),t}(t),e("default",o)}}}),System.register("flarum/components/FieldSet",["flarum/Component","flarum/helpers/listItems"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("fieldset",{className:this.props.className},m("legend",null,this.props.label),m("ul",null,n(this.props.children)))}}]),t}(t),e("default",r)}}}),System.register("flarum/components/GroupBadge",["flarum/components/Badge"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,null,[{key:"initProps",value:function(e){babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e),e.group&&(e.icon=e.group.icon(),e.style={backgroundColor:e.group.color()},e.label="undefined"==typeof e.label?e.group.nameSingular():e.label,e.type="group--"+e.group.nameSingular(),delete e.group)}}]),t}(t),e("default",n)}}}),System.register("flarum/components/LinkButton",["flarum/components/Button"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=babelHelpers.get(Object.getPrototypeOf(t.prototype),"view",this).call(this);return e.tag="a",e}}],[{key:"initProps",value:function(e){e.active=this.isActive(e),e.config=e.config||m.route}},{key:"isActive",value:function(e){return"undefined"!=typeof e.active?e.active:m.route()===e.href}}]),t}(t),e("default",n)}}}),System.register("flarum/components/LoadingIndicator",["flarum/Component"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=babelHelpers._extends({},this.props);return e.className="LoadingIndicator "+(e.className||""),delete e.size,m("div",e,m.trust("&nbsp;"))}},{key:"config",value:function(){var e=this.props.size||"small";$.fn.spin.presets[e].zIndex="auto",this.$().spin(e)}}]),t}(t),e("default",n)}}}),System.register("flarum/components/Modal",["flarum/Component","flarum/components/Alert","flarum/components/Button"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.alert=null}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return this.alert&&(this.alert.props.dismissible=!1),m("div",{className:"Modal modal-dialog "+this.className()},m("div",{className:"Modal-content"},this.isDismissible()?m("div",{className:"Modal-close App-backControl"},r.component({icon:"times",onclick:this.hide.bind(this),className:"Button Button--icon Button--link"})):"",m("form",{onsubmit:this.onsubmit.bind(this)},m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},this.title())),alert?m("div",{className:"Modal-alert"},this.alert):"",this.content())))}},{key:"isDismissible",value:function(){return!0}},{key:"className",value:function(){}},{key:"title",value:function(){}},{key:"content",value:function(){}},{key:"onsubmit",value:function(){}},{key:"onready",value:function(){this.$("form :input:first").focus().select()}},{key:"hide",value:function(){app.modal.close()}},{key:"handleErrors",value:function(e){var t=e&&e.errors;t&&(this.alert=new n({type:"error",children:t.map(function(e,n){return[e.detail,n<t.length-1?m("br"):""]})})),m.redraw(),t?this.$("form [name="+t[0].source.pointer.replace("/data/attributes/","")+"]").select():this.$("form :input:first").select()}}]),t}(t),e("default",o)}}}),System.register("flarum/components/ModalManager",["flarum/Component","flarum/components/Modal"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.showing=!1,this.component=null}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("div",{className:"ModalManager modal fade"},this.component&&this.component.render())}},{key:"config",value:function(e,t){e||(t.retain=!0,this.$().on("hidden.bs.modal",this.clear.bind(this)).on("shown.bs.modal",this.onready.bind(this)))}},{key:"show",value:function(e){if(!(e instanceof n))throw new Error("The ModalManager component can only show Modal components");clearTimeout(this.hideTimeout),this.showing=!0,this.component=e,m.redraw(!0),this.$().modal({backdrop:this.component.isDismissible()?!0:"static"}).modal("show"),this.onready()}},{key:"close",value:function(){var e=this;this.showing&&(this.hideTimeout=setTimeout(function(){e.$().modal("hide"),e.showing=!1}))}},{key:"clear",value:function(){this.component=null,m.lazyRedraw()}},{key:"onready",value:function(){this.component&&this.component.onready&&this.component.onready(this.$())}}]),t}(t),e("default",r)}}}),System.register("flarum/components/Navigation",["flarum/Component","flarum/components/Button","flarum/components/LinkButton"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=app,t=e.history,n=e.pane;return m("div",{className:"Navigation ButtonGroup "+(this.props.className||""),onmouseenter:n&&n.show.bind(n),onmouseleave:n&&n.onmouseleave.bind(n)},t.canGoBack()?[this.getBackButton(),this.getPaneButton()]:this.getDrawerButton());
}},{key:"config",value:function(e,t){t.retain=!0}},{key:"getBackButton",value:function(){var e=app,t=e.history;return r.component({className:"Button Button--icon Navigation-back",href:t.backUrl(),icon:"chevron-left",config:function(){},onclick:function(e){e.shiftKey||e.ctrlKey||e.metaKey||2===e.which||(e.preventDefault(),t.back())}})}},{key:"getPaneButton",value:function(){var e=app,t=e.pane;return t&&t.active?n.component({className:"Button Button--icon Navigation-pin"+(t.pinned?" active":""),onclick:t.togglePinned.bind(t),icon:"thumb-tack"}):""}},{key:"getDrawerButton",value:function(){if(!this.props.drawer)return"";var e=app,t=e.drawer,r=app.session.user;return n.component({className:"Button Button--icon Navigation-drawer"+(r&&r.newNotificationsCount()?" new":""),onclick:function(e){e.stopPropagation(),t.show()},icon:"reorder"})}}]),t}(t),e("default",o)}}}),System.register("flarum/components/Placeholder",["flarum/Component"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("div",{className:"Placeholder"},m("p",null,this.props.text))}}]),t}(t),e("default",n)}}}),System.register("flarum/components/RequestErrorModal",["flarum/components/Modal"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"className",value:function(){return"RequestErrorModal Modal--large"}},{key:"title",value:function(){return this.props.error.message}},{key:"content",value:function(){var e=void 0;try{e=JSON.stringify(JSON.parse(this.props.error.responseText),null,2)}catch(t){e=this.props.error.responseText}return m("div",{className:"Modal-body"},m("pre",null,e))}}]),t}(t),e("default",n)}}}),System.register("flarum/components/Select",["flarum/Component","flarum/helpers/icon"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this.props,t=e.options,r=e.onchange,o=e.value;return m("span",{className:"Select"},m("select",{className:"Select-input FormControl",onchange:r?m.withAttr("value",r.bind(this)):void 0,value:o},Object.keys(t).map(function(e){return m("option",{value:e},t[e])})),n("sort",{className:"Select-caret"}))}}]),t}(t),e("default",r)}}}),System.register("flarum/components/SelectDropdown",["flarum/components/Dropdown","flarum/helpers/icon"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"getButtonContent",value:function(){var e=this.props.children.filter(function(e){return e.props.active})[0],t=e&&e.props.children||this.props.defaultLabel;return t instanceof Array&&(t=t[0]),[m("span",{className:"Button-label"},t),n(this.props.caretIcon,{className:"Button-caret"})]}}],[{key:"initProps",value:function(e){e.caretIcon="undefined"!=typeof e.caretIcon?e.caretIcon:"sort",babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e),e.className+=" Dropdown--select"}}]),t}(t),e("default",r)}}}),System.register("flarum/components/Separator",["flarum/Component"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("li",{className:"Dropdown-separator"})}}]),t}(t),n.isListItem=!0,e("default",n)}}}),System.register("flarum/components/SplitDropdown",["flarum/components/Dropdown","flarum/components/Button","flarum/helpers/icon"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"getButton",value:function(){var e=this.getFirstChild(),t=babelHelpers._extends({},e.props);return t.className=(t.className||"")+" SplitDropdown-button Button "+this.props.buttonClassName,[n.component(t),m("button",{className:"Dropdown-toggle Button Button--icon "+this.props.buttonClassName,"data-toggle":"dropdown"},r(this.props.icon,{className:"Button-icon"}),r("caret-down",{className:"Button-caret"}))]}},{key:"getFirstChild",value:function(){for(var e=this.props.children;e instanceof Array;)e=e[0];return e}}],[{key:"initProps",value:function(e){babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e),e.className+=" Dropdown--split",e.menuClassName+=" Dropdown-menu--right"}}]),t}(t),e("default",o)}}}),System.register("flarum/components/Switch",["flarum/components/Checkbox"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"getDisplay",value:function(){return this.loading?babelHelpers.get(Object.getPrototypeOf(t.prototype),"getDisplay",this).call(this):""}}],[{key:"initProps",value:function(e){babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e),e.className=(e.className||"")+" Checkbox--switch"}}]),t}(t),e("default",n)}}}),System.register("flarum/initializers/humanTime",["flarum/utils/humanTime"],function(e){"use strict";function t(){$("[data-humantime]").each(function(){var e=$(this),t=r(e.attr("datetime"));e.html(t)})}function n(){setInterval(t,1e3)}var r;return e("default",n),{setters:[function(e){r=e["default"]}],execute:function(){}}}),System.register("flarum/initializers/preload",["flarum/Session"],function(e){"use strict";function t(e){e.store.pushPayload({data:e.preload.data}),e.forum=e.store.getById("forums",1),e.session=new n(e.preload.session.token,e.store.getById("users",e.preload.session.userId))}var n;return e("default",t),{setters:[function(e){n=e["default"]}],execute:function(){}}}),System.register("flarum/initializers/store",["flarum/Store","flarum/models/Forum","flarum/models/User","flarum/models/Discussion","flarum/models/Post","flarum/models/Group","flarum/models/Activity","flarum/models/Notification"],function(e){"use strict";function t(e){e.store=new n({forums:r,users:o,discussions:i,posts:s,groups:a,activity:u,notifications:l})}var n,r,o,i,s,a,u,l;return e("default",t),{setters:[function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]},function(e){u=e["default"]},function(e){l=e["default"]}],execute:function(){}}}),System.register("flarum/models/Discussion",["flarum/Model","flarum/utils/mixin","flarum/utils/computed","flarum/utils/ItemList","flarum/utils/string","flarum/components/Badge"],function(e){"use strict";var t,n,r,o,i,s,a;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e.slug},function(e){s=e["default"]}],execute:function(){a=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"removePost",value:function(e){var t=this.data.relationships,n=t&&t.posts;n&&n.data.some(function(t,r){return e===t.id?(n.data.splice(r,1),!0):void 0})}},{key:"unreadCount",value:function(){var e=app.session.user;return e&&e.readTime()<this.lastTime()?Math.max(0,this.lastPostNumber()-(this.readNumber()||0)):0}},{key:"badges",value:function(){var e=new o;return this.isHidden()&&e.add("hidden",m(s,{type:"hidden",icon:"trash",label:"Hidden"})),e}},{key:"postIds",value:function(){return this.data.relationships.posts.data.map(function(e){return e.id})}}]),t}(n(t,{title:t.attribute("title"),slug:r("title",i),startTime:t.attribute("startTime",t.transformDate),startUser:t.hasOne("startUser"),startPost:t.hasOne("startPost"),lastTime:t.attribute("lastTime",t.transformDate),lastUser:t.hasOne("lastUser"),lastPost:t.hasOne("lastPost"),lastPostNumber:t.attribute("lastPostNumber"),commentsCount:t.attribute("commentsCount"),repliesCount:r("commentsCount",function(e){return Math.max(0,e-1)}),posts:t.hasMany("posts"),relevantPosts:t.hasMany("relevantPosts"),readTime:t.attribute("readTime",t.transformDate),readNumber:t.attribute("readNumber"),isUnread:r("unreadCount",function(e){return!!e}),isRead:r("unreadCount",function(e){return app.session.user&&!e}),hideTime:t.attribute("hideTime",t.transformDate),hideUser:t.hasOne("hideUser"),isHidden:r("hideTime","commentsCount",function(e,t){return!!e||0===t}),canReply:t.attribute("canReply"),canRename:t.attribute("canRename"),canHide:t.attribute("canHide"),canDelete:t.attribute("canDelete")})),e("default",a)}}}),System.register("flarum/models/Forum",["flarum/Model","flarum/utils/mixin"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"apiEndpoint",value:function(){return"/forum"}}]),t}(n(t,{canStartDiscussion:t.attribute("canStartDiscussion")})),e("default",r)}}}),System.register("flarum/models/Group",["flarum/Model","flarum/utils/mixin"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),t}(n(t,{nameSingular:t.attribute("nameSingular"),namePlural:t.attribute("namePlural"),color:t.attribute("color"),icon:t.attribute("icon")})),r.ADMINISTRATOR_ID="1",r.GUEST_ID="2",r.MEMBER_ID="3",e("default",r)}}}),System.register("flarum/models/Notification",["flarum/Model","flarum/utils/mixin","flarum/utils/computed"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),t}(n(t,{contentType:t.attribute("contentType"),subjectId:t.attribute("subjectId"),content:t.attribute("content"),time:t.attribute("time",t.date),isRead:t.attribute("isRead"),unreadCount:t.attribute("unreadCount"),additionalUnreadCount:r("unreadCount",function(e){return Math.max(0,e-1)}),user:t.hasOne("user"),sender:t.hasOne("sender"),subject:t.hasOne("subject")})),e("default",o)}}}),System.register("flarum/models/Post",["flarum/Model","flarum/utils/mixin","flarum/utils/computed","flarum/utils/string"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e.getPlainContent}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),t}(n(t,{number:t.attribute("number"),discussion:t.hasOne("discussion"),time:t.attribute("time",t.transformDate),user:t.hasOne("user"),contentType:t.attribute("contentType"),content:t.attribute("content"),contentHtml:t.attribute("contentHtml"),contentPlain:r("contentHtml",o),editTime:t.attribute("editTime",t.transformDate),editUser:t.hasOne("editUser"),isEdited:r("editTime",function(e){return!!e}),hideTime:t.attribute("hideTime",t.transformDate),hideUser:t.hasOne("hideUser"),isHidden:r("hideTime",function(e){return!!e}),canEdit:t.attribute("canEdit"),canDelete:t.attribute("canDelete")})),e("default",i)}}}),System.register("flarum/models/User",["flarum/Model","flarum/utils/mixin","flarum/utils/stringToColor","flarum/utils/ItemList","flarum/utils/computed","flarum/components/GroupBadge"],function(e){"use strict";var t,n,r,o,i,s,a;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]}],execute:function(){a=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"isOnline",value:function(){return this.lastSeenTime()>moment().subtract(5,"minutes").toDate()}},{key:"badges",value:function(){var e=new o,t=this.groups();return t&&t.forEach(function(t){e.add("group"+t.id(),s.component({group:t}))}),e}},{key:"calculateAvatarColor",value:function(){var e=new Image,t=this;e.onload=function(){var e=new ColorThief;t.avatarColor=e.getColor(this),t.freshness=new Date,m.redraw()},e.src=this.avatarUrl()}},{key:"savePreferences",value:function(e){var t=this.preferences();return babelHelpers._extends(t,e),this.save({preferences:t})}}]),t}(n(t,{username:t.attribute("username"),email:t.attribute("email"),isActivated:t.attribute("isActivated"),password:t.attribute("password"),avatarUrl:t.attribute("avatarUrl"),bio:t.attribute("bio"),bioHtml:i("bio",function(e){return e?"<p>"+$("<div/>").text(e).html().replace(/\n/g,"<br>").autoLink()+"</p>":""}),preferences:t.attribute("preferences"),groups:t.hasMany("groups"),joinTime:t.attribute("joinTime",t.transformDate),lastSeenTime:t.attribute("lastSeenTime",t.transformDate),readTime:t.attribute("readTime",t.transformDate),unreadNotificationsCount:t.attribute("unreadNotificationsCount"),newNotificationsCount:t.attribute("newNotificationsCount"),discussionsCount:t.attribute("discussionsCount"),commentsCount:t.attribute("commentsCount"),canEdit:t.attribute("canEdit"),canDelete:t.attribute("canDelete"),avatarColor:null,color:i("username","avatarUrl","avatarColor",function(e,t,n){return n?"rgb("+n.join(", ")+")":t?(this.calculateAvatarColor(),""):"#"+r(e)})})),e("default",a)}}}),System.register("flarum/utils/Drawer",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(){var t=this;babelHelpers.classCallCheck(this,e),$("#content").click(function(e){t.isOpen()&&(e.preventDefault(),t.hide())})}return babelHelpers.createClass(e,[{key:"isOpen",value:function(){return $("#app").hasClass("drawerOpen")}},{key:"hide",value:function(){$("#app").removeClass("drawerOpen"),this.$backdrop&&this.$backdrop.remove()}},{key:"show",value:function(){var e=this;$("#app").addClass("drawerOpen"),this.$backdrop=$("<div/>").addClass("drawer-backdrop fade").appendTo("body").click(function(){return e.hide()}),setTimeout(function(){return e.$backdrop.addClass("in")})}}]),e}(),e("default",t)}}}),System.register("flarum/utils/ItemList",[],function(e){"use strict";var t,n;return{setters:[],execute:function(){t=function r(e,t){babelHelpers.classCallCheck(this,r),this.content=e,this.priority=t},n=function(){function e(){babelHelpers.classCallCheck(this,e)}return babelHelpers.createClass(e,[{key:"add",value:function(e,n){var r=arguments.length<=2||void 0===arguments[2]?0:arguments[2];this[e]=new t(n,r)}},{key:"merge",value:function(e){for(var n in e)e.hasOwnProperty(n)&&e[n]instanceof t&&(this[n]=e[n])}},{key:"toArray",value:function(){var e=[];for(var n in this)this.hasOwnProperty(n)&&this[n]instanceof t&&(this[n].content=Object(this[n].content),this[n].content.itemName=n,e.push(this[n]),this[n].key=e.length);return e.sort(function(e,t){return e.priority===t.priority?e.key-t.key:e.priority>t.priority?-1:1}).map(function(e){return e.content})}}]),e}(),e("default",n)}}}),System.register("flarum/utils/RequestError",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function n(e,t){babelHelpers.classCallCheck(this,n),this.message=e,this.responseText=t},e("default",t)}}}),System.register("flarum/utils/ScrollListener",[],function(e){"use strict";var t,n;return{setters:[],execute:function(){t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},n=function(){function e(t){babelHelpers.classCallCheck(this,e),this.callback=t,this.lastTop=-1}return babelHelpers.createClass(e,[{key:"loop",value:function(){this.active&&(this.update(),t(this.loop.bind(this)))}},{key:"update",value:function(e){var t=window.pageYOffset;(this.lastTop!==t||e)&&(this.callback(t),this.lastTop=t)}},{key:"start",value:function(){this.active||(this.active=!0,this.loop())}},{key:"stop",value:function(){this.active=!1}}]),e}(),e("default",n)}}}),System.register("flarum/utils/SubtreeRetainer",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(){babelHelpers.classCallCheck(this,e);for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];this.callbacks=n,this.data={}}return babelHelpers.createClass(e,[{key:"retain",value:function(){var e=this,t=!1;return this.callbacks.forEach(function(n,r){var o=n();o!==e.data[r]&&(e.data[r]=o,t=!0)}),t?!1:{subtree:"retain"}}},{key:"check",value:function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];this.callbacks=this.callbacks.concat(t)}},{key:"invalidate",value:function(){this.data={}}}]),e}(),e("default",t)}}}),System.register("flarum/utils/abbreviateNumber",[],function(e){"use strict";function t(e){return e>=1e6?Math.floor(e/1e6)+"M":e>=1e3?Math.floor(e/1e3)+"K":e.toString()}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/anchorScroll",[],function(e){"use strict";function t(e,t){var n=$(window),r=$(e).offset().top-n.scrollTop();t(),n.scrollTop($(e).offset().top-r)}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/classList",[],function(e){"use strict";function t(e){var t=void 0;if(e instanceof Array)t=e.filter(function(e){return e});else{t=[];for(var n in e)e[n]&&t.push(n)}return t.join(" ")}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/computed",[],function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];var r=t.slice(0,-1),o=t.slice(-1)[0],i={},s=void 0;return function(){var e=this,t=!1;return r.forEach(function(n){var r="function"==typeof e[n]?e[n]():e[n];i[n]!==r&&(t=!0,i[n]=r)}),t&&(s=o.apply(this,r.map(function(e){return i[e]}))),s}}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/evented",[],function(e){"use strict";return{setters:[],execute:function(){e("default",{handlers:null,getHandlers:function(e){return this.handlers=this.handlers||{},this.handlers[e]=this.handlers[e]||[],this.handlers[e]},trigger:function(e){for(var t=this,n=arguments.length,r=Array(n>1?n-1:0),o=1;n>o;o++)r[o-1]=arguments[o];this.getHandlers(e).forEach(function(e){return e.apply(t,r)})},on:function(e,t){this.getHandlers(e).push(t)},one:function(e,t){var n=function r(){t.apply(this,arguments),this.off(e,r)};this.getHandlers(e).push(n)},off:function(e,t){var n=this.getHandlers(e),r=n.indexOf(t);-1!==r&&n.splice(r,1)}})}}}),System.register("flarum/utils/extract",[],function(e){"use strict";function t(e,t){var n=e[t];return delete e[t],n}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/extractText",[],function(e){"use strict";function t(e){var n="";return n+=e instanceof Array?e.map(function(e){return t(e)}).join(""):"object"==typeof e?t(e.children):e}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/formatNumber",[],function(e){"use strict";function t(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/humanTime",[],function(e){"use strict";function t(e){var t=moment(e),n=864e5,r=t.diff(moment()),o=null;return o=-30*n>r?t.year()===moment().year()?t.format("D MMM"):t.format("MMM 'YY"):t.fromNow()}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/mapRoutes",[],function(e){"use strict";function t(e){var t=arguments.length<=1||void 0===arguments[1]?"":arguments[1],n={};for(var r in e){var o=e[r];o.component&&(o.component.props.routeName=r),n[t+o.path]=o.component}return n}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/mixin",[],function(e){"use strict";function t(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];var o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),t}(e);return n.forEach(function(e){babelHelpers._extends(o.prototype,e)}),o}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/patchMithril",["../Component"],function(e){"use strict";function t(e){var t=e.m,r=function o(e){for(var r=arguments.length,i=Array(r>1?r-1:0),s=1;r>s;s++)i[s-1]=arguments[s];if(e.prototype&&e.prototype instanceof n)return e.component.apply(e,i);var a=t.apply(this,arguments);return a.attrs.bidi&&o.bidi(a,a.attrs.bidi),a.attrs.route&&(a.attrs.href=a.attrs.route,a.attrs.config=o.route,delete a.attrs.route),a};Object.keys(t).forEach(function(e){return r[e]=t[e]}),r.lazyRedraw=function(){r.startComputation(),r.endComputation()},e.m=r}var n;return e("default",t),{setters:[function(e){n=e["default"]}],execute:function(){}}}),System.register("flarum/utils/string",[],function(e){"use strict";function t(e,t){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2];return(n>0?"...":"")+e.substring(n,n+t)+(e.length>n+t?"...":"")}function n(e){return e.toLowerCase().replace(/[^a-z0-9]/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"")||"-"}function r(e){var t=$("<div/>").html(e.replace(/(<\/p>|<br>)/g,"$1 &nbsp;"));return t.find(r.removeSelectors.join(",")).remove(),t.text()}function o(e){return e.substr(0,1).toUpperCase()+e.substr(1)}return e("truncate",t),e("slug",n),e("getPlainContent",r),e("ucfirst",o),{setters:[],execute:function(){r.removeSelectors=["blockquote","script"]}}}),System.register("flarum/utils/stringToColor",[],function(e){"use strict";function t(e,t,n){var r=void 0,o=void 0,i=void 0,s=Math.floor(6*e),a=6*e-s,u=n*(1-t),l=n*(1-a*t),c=n*(1-(1-a)*t);switch(s%6){case 0:r=n,o=c,i=u;break;case 1:r=l,o=n,i=u;break;case 2:r=u,o=n,i=c;break;case 3:r=u,o=l,i=n;break;case 4:r=c,o=u,i=n;break;case 5:r=n,o=u,i=l}return{r:Math.floor(255*r),g:Math.floor(255*o),b:Math.floor(255*i)}}function n(e){for(var n=0,r=0;r<e.length;r++)n+=e.charCodeAt(r);var o=n%360,i=t(o/360,.3,.9);return""+i.r.toString(16)+i.g.toString(16)+i.b.toString(16)}return e("default",n),{setters:[],execute:function(){}}});