From 49d2539aef22538dbf1ee36c02aeccd190b0b184 Mon Sep 17 00:00:00 2001 From: David Sevilla Martin Date: Fri, 3 Jan 2020 16:28:15 -0500 Subject: [PATCH] Added some more type hinting, changed arguments for computed util --- FRONTEND FRAMEWORK REWRITE CHANGES.md | 2 ++ js/dist/admin.js | 12 ++++++------ js/dist/admin.js.map | 2 +- js/dist/forum.js | 8 ++++---- js/dist/forum.js.map | 2 +- js/src/common/Application.ts | 4 +++- js/src/common/Model.ts | 10 +++++----- js/src/common/Session.ts | 2 +- js/src/common/Store.ts | 2 +- js/src/common/components/Modal.tsx | 2 ++ js/src/common/components/ModalManager.tsx | 8 +++----- js/src/common/models/User.ts | 4 ++-- js/src/common/utils/computed.ts | 5 ++--- js/src/common/utils/patchMithril.ts | 13 +++++++------ js/src/forum/Forum.ts | 19 ++++++++++--------- .../components/DiscussionsSearchSource.tsx | 2 +- js/src/forum/components/NotificationList.tsx | 4 ++-- js/src/forum/components/UserPage.tsx | 2 +- js/src/forum/components/UsersSearchSource.tsx | 2 +- js/src/forum/utils/UserControls.ts | 6 +++--- 20 files changed, 58 insertions(+), 53 deletions(-) diff --git a/FRONTEND FRAMEWORK REWRITE CHANGES.md b/FRONTEND FRAMEWORK REWRITE CHANGES.md index a8c811362..ece91e7d0 100644 --- a/FRONTEND FRAMEWORK REWRITE CHANGES.md +++ b/FRONTEND FRAMEWORK REWRITE CHANGES.md @@ -12,6 +12,8 @@ - `app.bus` for some event hooking * Translator - Added `app.translator.transText`, automatically extracts text from `translator.trans` output +* Utils + - Changed `computed` util to require multiple keys to be passed as an array #### Forum * Forum Application diff --git a/js/dist/admin.js b/js/dist/admin.js index ea2920395..3ae972216 100644 --- a/js/dist/admin.js +++ b/js/dist/admin.js @@ -1,4 +1,4 @@ -flarum.core=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=143)}([function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e=0&&(m+=t.slice(n,a)),f>=0&&(m+=(n<0?"?":"&")+l.slice(f,d));var v=r(c);return v&&(m+=(n<0&&f<0?"?":"&")+v),o>=0&&(m+=t.slice(o)),p>=0&&(m+=(o<0?"":"&")+l.slice(p)),m}},function(t,e,n){"use strict";var r=n(14);t.exports=function(t){var e=t.indexOf("?"),n=t.indexOf("#"),i=n<0?t.length:n,o=e<0?i:e,a=t.slice(0,o).replace(/\/{2,}/g,"/");return a?("/"!==a[0]&&(a="/"+a),a.length>1&&"/"===a[a.length-1]&&(a=a.slice(0,-1))):a="/",{path:a,params:e<0?{}:r(t.slice(e+1,i))}}},function(t,e,n){"use strict";var r=n(2),i=n(7),o=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,a={},s={}.hasOwnProperty;function u(t){for(var e in t)if(s.call(t,e))return!1;return!0}t.exports=function(t){if(null==t||"string"!=typeof t&&"function"!=typeof t&&"function"!=typeof t.view)throw Error("The selector must be either a string or a component.");var e=i.apply(1,arguments);return"string"==typeof t&&(e.children=r.normalizeChildren(e.children),"["!==t)?function(t,e){var n=e.attrs,i=r.normalizeChildren(e.children),o=s.call(n,"class"),a=o?n.class:n.className;if(e.tag=t.tag,e.attrs=null,e.children=void 0,!u(t.attrs)&&!u(n)){var c={};for(var l in n)s.call(n,l)&&(c[l]=n[l]);n=c}for(var l in t.attrs)s.call(t.attrs,l)&&"className"!==l&&!s.call(n,l)&&(n[l]=t.attrs[l]);for(var l in null==a&&null==t.attrs.className||(n.className=null!=a?null!=t.attrs.className?String(t.attrs.className)+" "+String(a):a:null!=t.attrs.className?t.attrs.className:null),o&&(n.class=null),n)if(s.call(n,l)&&"key"!==l){e.attrs=n;break}return Array.isArray(i)&&1===i.length&&null!=i[0]&&"#"===i[0].tag?e.text=i[0].children:e.children=i,e}(a[t]||function(t){for(var e,n="div",r=[],i={};e=o.exec(t);){var s=e[1],u=e[2];if(""===s&&""!==u)n=u;else if("#"===s)i.id=u;else if("."===s)r.push(u);else if("["===e[3][0]){var c=e[6];c&&(c=c.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===e[4]?r.push(c):i[e[4]]=""===c?c:c||!0}}return r.length>0&&(i.className=r.join(" ")),a[t]={tag:n,attrs:i}}(t),e):(e.tag=t,e)}},function(t,e,n){"use strict";var r=n(2);t.exports=function(){var t,e=arguments[this],n=this+1;if(null==e?e={}:("object"!=typeof e||null!=e.tag||Array.isArray(e))&&(e={},n=this),arguments.length===n+1)t=arguments[n],Array.isArray(t)||(t=[t]);else for(t=[];n0||t(n)}}var r=n(s);try{t(n(a),r)}catch(t){r(t)}}f(n)};n.prototype.then=function(t,e){var r,i,o=this._instance;function a(t,e,n,a){e.push((function(e){if("function"!=typeof t)n(e);else try{r(t(e))}catch(t){i&&i(t)}})),"function"==typeof o.retry&&a===o.state&&o.retry()}var s=new n((function(t,e){r=t,i=e}));return a(t,o.resolvers,r,!0),a(e,o.rejectors,i,!1),s},n.prototype.catch=function(t){return this.then(null,t)},n.prototype.finally=function(t){return this.then((function(e){return n.resolve(t()).then((function(){return e}))}),(function(e){return n.resolve(t()).then((function(){return n.reject(e)}))}))},n.resolve=function(t){return t instanceof n?t:new n((function(e){e(t)}))},n.reject=function(t){return new n((function(e,n){n(t)}))},n.all=function(t){return new n((function(e,n){var r=t.length,i=0,o=[];if(0===t.length)e([]);else for(var a=0;a=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(39),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(1))},function(t,e,n){"use strict";t.exports=n(41)(window)},function(t,e,n){"use strict";t.exports=function(t){if("[object Object]"!==Object.prototype.toString.call(t))return"";var e=[];for(var n in t)r(n,t[n]);return e.join("&");function r(t,n){if(Array.isArray(n))for(var i=0;i-1&&u.pop();for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:{};switch(c=f.duration||1e3,o=f.offset||0,d=f.callback,a=f.easing||r,s=f.a11y||!1,e=window.scrollY||window.pageYOffset,void 0===l?"undefined":i(l)){case"number":t=void 0,s=!1,n=e+l;break;case"object":n=h(t=l);break;case"string":t=document.querySelector(l),n=h(t)}switch(u=n-e+o,i(f.duration)){case"number":c=f.duration;break;case"function":c=f.duration(u)}window.requestAnimationFrame(m)}}(),a=n(17);var s=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},u=function(){function t(t,e){for(var n=0;n
',trigger:"hover focus",offset:0,arrowSelector:".tooltip-arrow, .tooltip__arrow",innerSelector:".tooltip-inner, .tooltip__inner"},f=function(){function t(e,n){s(this,t),p.call(this),n=c({},l,n),e.jquery&&(e=e[0]),this.reference=e,this.options=n;var r="string"==typeof n.trigger?n.trigger.split(" ").filter((function(t){return-1!==["click","hover","focus"].indexOf(t)})):[];this._isOpen=!1,this._popperOptions={},this._setEventListeners(e,r,n)}return u(t,[{key:"_create",value:function(t,e,n,r){var i=window.document.createElement("div");i.innerHTML=e.trim();var o=i.childNodes[0];o.id="tooltip_"+Math.random().toString(36).substr(2,10),o.setAttribute("aria-hidden","false");var a=i.querySelector(this.options.innerSelector);return this._addTitleContent(t,n,r,a),o}},{key:"_addTitleContent",value:function(t,e,n,r){if(1===e.nodeType||11===e.nodeType)n&&r.appendChild(e);else if((o=e)&&"[object Function]"==={}.toString.call(o)){var i=e.call(t);n?r.innerHTML=i:r.textContent=i}else n?r.innerHTML=e:r.textContent=e; +flarum.core=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=142)}([function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e=0&&(m+=t.slice(n,a)),f>=0&&(m+=(n<0?"?":"&")+c.slice(f,d));var v=r(l);return v&&(m+=(n<0&&f<0?"?":"&")+v),o>=0&&(m+=t.slice(o)),p>=0&&(m+=(o<0?"":"&")+c.slice(p)),m}},function(t,e,n){"use strict";var r=n(15);t.exports=function(t){var e=t.indexOf("?"),n=t.indexOf("#"),i=n<0?t.length:n,o=e<0?i:e,a=t.slice(0,o).replace(/\/{2,}/g,"/");return a?("/"!==a[0]&&(a="/"+a),a.length>1&&"/"===a[a.length-1]&&(a=a.slice(0,-1))):a="/",{path:a,params:e<0?{}:r(t.slice(e+1,i))}}},function(t,e,n){"use strict";var r=n(2),i=n(8),o=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,a={},s={}.hasOwnProperty;function u(t){for(var e in t)if(s.call(t,e))return!1;return!0}t.exports=function(t){if(null==t||"string"!=typeof t&&"function"!=typeof t&&"function"!=typeof t.view)throw Error("The selector must be either a string or a component.");var e=i.apply(1,arguments);return"string"==typeof t&&(e.children=r.normalizeChildren(e.children),"["!==t)?function(t,e){var n=e.attrs,i=r.normalizeChildren(e.children),o=s.call(n,"class"),a=o?n.class:n.className;if(e.tag=t.tag,e.attrs=null,e.children=void 0,!u(t.attrs)&&!u(n)){var l={};for(var c in n)s.call(n,c)&&(l[c]=n[c]);n=l}for(var c in t.attrs)s.call(t.attrs,c)&&"className"!==c&&!s.call(n,c)&&(n[c]=t.attrs[c]);for(var c in null==a&&null==t.attrs.className||(n.className=null!=a?null!=t.attrs.className?String(t.attrs.className)+" "+String(a):a:null!=t.attrs.className?t.attrs.className:null),o&&(n.class=null),n)if(s.call(n,c)&&"key"!==c){e.attrs=n;break}return Array.isArray(i)&&1===i.length&&null!=i[0]&&"#"===i[0].tag?e.text=i[0].children:e.children=i,e}(a[t]||function(t){for(var e,n="div",r=[],i={};e=o.exec(t);){var s=e[1],u=e[2];if(""===s&&""!==u)n=u;else if("#"===s)i.id=u;else if("."===s)r.push(u);else if("["===e[3][0]){var l=e[6];l&&(l=l.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===e[4]?r.push(l):i[e[4]]=""===l?l:l||!0}}return r.length>0&&(i.className=r.join(" ")),a[t]={tag:n,attrs:i}}(t),e):(e.tag=t,e)}},function(t,e,n){"use strict";var r=n(2);t.exports=function(){var t,e=arguments[this],n=this+1;if(null==e?e={}:("object"!=typeof e||null!=e.tag||Array.isArray(e))&&(e={},n=this),arguments.length===n+1)t=arguments[n],Array.isArray(t)||(t=[t]);else for(t=[];n0||t(n)}}var r=n(s);try{t(n(a),r)}catch(t){r(t)}}f(n)};n.prototype.then=function(t,e){var r,i,o=this._instance;function a(t,e,n,a){e.push((function(e){if("function"!=typeof t)n(e);else try{r(t(e))}catch(t){i&&i(t)}})),"function"==typeof o.retry&&a===o.state&&o.retry()}var s=new n((function(t,e){r=t,i=e}));return a(t,o.resolvers,r,!0),a(e,o.rejectors,i,!1),s},n.prototype.catch=function(t){return this.then(null,t)},n.prototype.finally=function(t){return this.then((function(e){return n.resolve(t()).then((function(){return e}))}),(function(e){return n.resolve(t()).then((function(){return n.reject(e)}))}))},n.resolve=function(t){return t instanceof n?t:new n((function(e){e(t)}))},n.reject=function(t){return new n((function(e,n){n(t)}))},n.all=function(t){return new n((function(e,n){var r=t.length,i=0,o=[];if(0===t.length)e([]);else for(var a=0;a=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(39),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(1))},function(t,e,n){"use strict";t.exports=n(41)(window)},function(t,e,n){"use strict";t.exports=function(t){if("[object Object]"!==Object.prototype.toString.call(t))return"";var e=[];for(var n in t)r(n,t[n]);return e.join("&");function r(t,n){if(Array.isArray(n))for(var i=0;i-1&&u.pop();for(var c=0;c1&&void 0!==arguments[1]?arguments[1]:{};switch(l=f.duration||1e3,o=f.offset||0,d=f.callback,a=f.easing||r,s=f.a11y||!1,e=window.scrollY||window.pageYOffset,void 0===c?"undefined":i(c)){case"number":t=void 0,s=!1,n=e+c;break;case"object":n=h(t=c);break;case"string":t=document.querySelector(c),n=h(t)}switch(u=n-e+o,i(f.duration)){case"number":l=f.duration;break;case"function":l=f.duration(u)}window.requestAnimationFrame(m)}}(),a=n(18);var s=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},u=function(){function t(t,e){for(var n=0;n
',trigger:"hover focus",offset:0,arrowSelector:".tooltip-arrow, .tooltip__arrow",innerSelector:".tooltip-inner, .tooltip__inner"},f=function(){function t(e,n){s(this,t),p.call(this),n=l({},c,n),e.jquery&&(e=e[0]),this.reference=e,this.options=n;var r="string"==typeof n.trigger?n.trigger.split(" ").filter((function(t){return-1!==["click","hover","focus"].indexOf(t)})):[];this._isOpen=!1,this._popperOptions={},this._setEventListeners(e,r,n)}return u(t,[{key:"_create",value:function(t,e,n,r){var i=window.document.createElement("div");i.innerHTML=e.trim();var o=i.childNodes[0];o.id="tooltip_"+Math.random().toString(36).substr(2,10),o.setAttribute("aria-hidden","false");var a=i.querySelector(this.options.innerSelector);return this._addTitleContent(t,n,r,a),o}},{key:"_addTitleContent",value:function(t,e,n,r){if(1===e.nodeType||11===e.nodeType)n&&r.appendChild(e);else if((o=e)&&"[object Function]"==={}.toString.call(o)){var i=e.call(t);n?r.innerHTML=i:r.textContent=i}else n?r.innerHTML=e:r.textContent=e; /**! * @fileOverview Kickass library to create and place poppers near their reference elements. * @version 1.3.2 @@ -23,12 +23,12 @@ flarum.core=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -var o}},{key:"_show",value:function(t,e){if(this._isOpen&&!this._isOpening)return this;if(this._isOpen=!0,this._tooltipNode)return this._tooltipNode.style.visibility="visible",this._tooltipNode.setAttribute("aria-hidden","false"),this.popperInstance.update(),this;var n=t.getAttribute("title")||e.title;if(!n)return this;var r=this._create(t,e.template,n,e.html);t.setAttribute("aria-describedby",r.id);var i=this._findContainer(e.container,t);return this._append(r,i),this._popperOptions=c({},e.popperOptions,{placement:e.placement}),this._popperOptions.modifiers=c({},this._popperOptions.modifiers,{arrow:c({},this._popperOptions.modifiers&&this._popperOptions.modifiers.arrow,{element:e.arrowSelector}),offset:c({},this._popperOptions.modifiers&&this._popperOptions.modifiers.offset,{offset:e.offset})}),e.boundariesElement&&(this._popperOptions.modifiers.preventOverflow={boundariesElement:e.boundariesElement}),this.popperInstance=new a.a(t,r,this._popperOptions),this._tooltipNode=r,this}},{key:"_hide",value:function(){return this._isOpen?(this._isOpen=!1,this._tooltipNode.style.visibility="hidden",this._tooltipNode.setAttribute("aria-hidden","true"),this):this}},{key:"_dispose",value:function(){var t=this;return this._events.forEach((function(e){var n=e.func,r=e.event;t.reference.removeEventListener(r,n)})),this._events=[],this._tooltipNode&&(this._hide(),this.popperInstance.destroy(),this.popperInstance.options.removeOnDestroy||(this._tooltipNode.parentNode.removeChild(this._tooltipNode),this._tooltipNode=null)),this}},{key:"_findContainer",value:function(t,e){return"string"==typeof t?t=window.document.querySelector(t):!1===t&&(t=e.parentNode),t}},{key:"_append",value:function(t,e){e.appendChild(t)}},{key:"_setEventListeners",value:function(t,e,n){var r=this,i=[],o=[];e.forEach((function(t){switch(t){case"hover":i.push("mouseenter"),o.push("mouseleave");break;case"focus":i.push("focus"),o.push("blur");break;case"click":i.push("click"),o.push("click")}})),i.forEach((function(e){var i=function(e){!0!==r._isOpening&&(e.usedByTooltip=!0,r._scheduleShow(t,n.delay,n,e))};r._events.push({event:e,func:i}),t.addEventListener(e,i)})),o.forEach((function(e){var i=function(e){!0!==e.usedByTooltip&&r._scheduleHide(t,n.delay,n,e)};r._events.push({event:e,func:i}),t.addEventListener(e,i),"click"===e&&n.closeOnClickOutside&&document.addEventListener("mousedown",(function(e){if(r._isOpening){var n=r.popperInstance.popper;t.contains(e.target)||n.contains(e.target)||i(e)}}),!0)}))}},{key:"_scheduleShow",value:function(t,e,n){var r=this;this._isOpening=!0;var i=e&&e.show||e||0;this._showTimeout=window.setTimeout((function(){return r._show(t,n)}),i)}},{key:"_scheduleHide",value:function(t,e,n,r){var i=this;this._isOpening=!1;var o=e&&e.hide||e||0;window.clearTimeout(this._showTimeout),window.setTimeout((function(){if(!1!==i._isOpen&&document.body.contains(i._tooltipNode)){if("mouseleave"===r.type)if(i._setTooltipNodeEvent(r,t,e,n))return;i._hide(t,n)}}),o)}},{key:"_updateTitleContent",value:function(t){if(void 0!==this._tooltipNode){var e=this._tooltipNode.querySelector(this.options.innerSelector);this._clearTitleContent(e,this.options.html,this.reference.getAttribute("title")||this.options.title),this._addTitleContent(this.reference,t,this.options.html,e),this.options.title=t,this.popperInstance.update()}else void 0!==this.options.title&&(this.options.title=t)}},{key:"_clearTitleContent",value:function(t,e,n){1===n.nodeType||11===n.nodeType?e&&t.removeChild(n):e?t.innerHTML="":t.textContent=""}}]),t}(),p=function(){var t=this;this.show=function(){return t._show(t.reference,t.options)},this.hide=function(){return t._hide()},this.dispose=function(){return t._dispose()},this.toggle=function(){return t._isOpen?t.hide():t.show()},this.updateTitleContent=function(e){return t._updateTitleContent(e)},this._events=[],this._setTooltipNodeEvent=function(e,n,r,i){var o=e.relatedreference||e.toElement||e.relatedTarget;return!!t._tooltipNode.contains(o)&&(t._tooltipNode.addEventListener(e.type,(function r(o){var a=o.relatedreference||o.toElement||o.relatedTarget;t._tooltipNode.removeEventListener(e.type,r),n.contains(a)||t._scheduleHide(n,i.delay,i,o)})),!0)}},d=f;$.fn.tooltip=function(t){return this.each((function(){var e=$(this),n=e.data("bs.tooltip"),r="object"==typeof t&&t||{};e.attr("title")&&(r.title=e.attr("title"),e.removeAttr("title"),e.attr("data-original-title",r.title)),"destroy"===t&&(t="dispose"),!n&&["dispose","hide"].includes(t)||(n||e.data("bs.tooltip",n=new d(this,r)),"string"==typeof t&&n[t]&&n[t]())}))},["width","height"].forEach((function(t){var e=t.replace(/./,(function(t){return t[0].toUpperCase()}));$.fn["outer"+e]=function(e){var n=this;if(n){var r=n[t]();return{width:["left","right"],height:["top","bottom"]}[t].forEach((function(t){e&&(r+=parseInt(n.css("margin-"+t),10))})),r}return null}})),$.expr[":"].input=function(){if("disabled"in this||["INPUT","SELECT","TEXTAREA","BUTTON"].includes(this.tagName))return this},$.fn.hover=function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)},$.fn.animatedScrollTop=function(t,e,n){return void 0===e&&(e=$.fx.speeds._default),"number"==typeof t&&(t-=window.scrollY||window.pageYOffset),o(t,{duration:$.fx.speeds[e]||e,callback:n}),this},$.fn.extend=$.extend.bind($), +var o}},{key:"_show",value:function(t,e){if(this._isOpen&&!this._isOpening)return this;if(this._isOpen=!0,this._tooltipNode)return this._tooltipNode.style.visibility="visible",this._tooltipNode.setAttribute("aria-hidden","false"),this.popperInstance.update(),this;var n=t.getAttribute("title")||e.title;if(!n)return this;var r=this._create(t,e.template,n,e.html);t.setAttribute("aria-describedby",r.id);var i=this._findContainer(e.container,t);return this._append(r,i),this._popperOptions=l({},e.popperOptions,{placement:e.placement}),this._popperOptions.modifiers=l({},this._popperOptions.modifiers,{arrow:l({},this._popperOptions.modifiers&&this._popperOptions.modifiers.arrow,{element:e.arrowSelector}),offset:l({},this._popperOptions.modifiers&&this._popperOptions.modifiers.offset,{offset:e.offset})}),e.boundariesElement&&(this._popperOptions.modifiers.preventOverflow={boundariesElement:e.boundariesElement}),this.popperInstance=new a.a(t,r,this._popperOptions),this._tooltipNode=r,this}},{key:"_hide",value:function(){return this._isOpen?(this._isOpen=!1,this._tooltipNode.style.visibility="hidden",this._tooltipNode.setAttribute("aria-hidden","true"),this):this}},{key:"_dispose",value:function(){var t=this;return this._events.forEach((function(e){var n=e.func,r=e.event;t.reference.removeEventListener(r,n)})),this._events=[],this._tooltipNode&&(this._hide(),this.popperInstance.destroy(),this.popperInstance.options.removeOnDestroy||(this._tooltipNode.parentNode.removeChild(this._tooltipNode),this._tooltipNode=null)),this}},{key:"_findContainer",value:function(t,e){return"string"==typeof t?t=window.document.querySelector(t):!1===t&&(t=e.parentNode),t}},{key:"_append",value:function(t,e){e.appendChild(t)}},{key:"_setEventListeners",value:function(t,e,n){var r=this,i=[],o=[];e.forEach((function(t){switch(t){case"hover":i.push("mouseenter"),o.push("mouseleave");break;case"focus":i.push("focus"),o.push("blur");break;case"click":i.push("click"),o.push("click")}})),i.forEach((function(e){var i=function(e){!0!==r._isOpening&&(e.usedByTooltip=!0,r._scheduleShow(t,n.delay,n,e))};r._events.push({event:e,func:i}),t.addEventListener(e,i)})),o.forEach((function(e){var i=function(e){!0!==e.usedByTooltip&&r._scheduleHide(t,n.delay,n,e)};r._events.push({event:e,func:i}),t.addEventListener(e,i),"click"===e&&n.closeOnClickOutside&&document.addEventListener("mousedown",(function(e){if(r._isOpening){var n=r.popperInstance.popper;t.contains(e.target)||n.contains(e.target)||i(e)}}),!0)}))}},{key:"_scheduleShow",value:function(t,e,n){var r=this;this._isOpening=!0;var i=e&&e.show||e||0;this._showTimeout=window.setTimeout((function(){return r._show(t,n)}),i)}},{key:"_scheduleHide",value:function(t,e,n,r){var i=this;this._isOpening=!1;var o=e&&e.hide||e||0;window.clearTimeout(this._showTimeout),window.setTimeout((function(){if(!1!==i._isOpen&&document.body.contains(i._tooltipNode)){if("mouseleave"===r.type)if(i._setTooltipNodeEvent(r,t,e,n))return;i._hide(t,n)}}),o)}},{key:"_updateTitleContent",value:function(t){if(void 0!==this._tooltipNode){var e=this._tooltipNode.querySelector(this.options.innerSelector);this._clearTitleContent(e,this.options.html,this.reference.getAttribute("title")||this.options.title),this._addTitleContent(this.reference,t,this.options.html,e),this.options.title=t,this.popperInstance.update()}else void 0!==this.options.title&&(this.options.title=t)}},{key:"_clearTitleContent",value:function(t,e,n){1===n.nodeType||11===n.nodeType?e&&t.removeChild(n):e?t.innerHTML="":t.textContent=""}}]),t}(),p=function(){var t=this;this.show=function(){return t._show(t.reference,t.options)},this.hide=function(){return t._hide()},this.dispose=function(){return t._dispose()},this.toggle=function(){return t._isOpen?t.hide():t.show()},this.updateTitleContent=function(e){return t._updateTitleContent(e)},this._events=[],this._setTooltipNodeEvent=function(e,n,r,i){var o=e.relatedreference||e.toElement||e.relatedTarget;return!!t._tooltipNode.contains(o)&&(t._tooltipNode.addEventListener(e.type,(function r(o){var a=o.relatedreference||o.toElement||o.relatedTarget;t._tooltipNode.removeEventListener(e.type,r),n.contains(a)||t._scheduleHide(n,i.delay,i,o)})),!0)}},d=f;$.fn.tooltip=function(t){return this.each((function(){var e=$(this),n=e.data("bs.tooltip"),r="object"==typeof t&&t||{};e.attr("title")&&(r.title=e.attr("title"),e.removeAttr("title"),e.attr("data-original-title",r.title)),"destroy"===t&&(t="dispose"),!n&&["dispose","hide"].includes(t)||(n||e.data("bs.tooltip",n=new d(this,r)),"string"==typeof t&&n[t]&&n[t]())}))},["width","height"].forEach((function(t){var e=t.replace(/./,(function(t){return t[0].toUpperCase()}));$.fn["outer"+e]=function(e){var n=this;if(n){var r=n[t]();return{width:["left","right"],height:["top","bottom"]}[t].forEach((function(t){e&&(r+=parseInt(n.css("margin-"+t),10))})),r}return null}})),$.expr[":"].input=function(){if("disabled"in this||["INPUT","SELECT","TEXTAREA","BUTTON"].includes(this.tagName))return this},$.fn.hover=function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)},$.fn.animatedScrollTop=function(t,e,n){return void 0===e&&(e=$.fx.speeds._default),"number"==typeof t&&(t-=window.scrollY||window.pageYOffset),o(t,{duration:$.fx.speeds[e]||e,callback:n}),this},$.fn.extend=$.extend.bind($), /** * Enable special events on Zepto * @license Original Copyright 2013 Enideo. Released under dual MIT and GPL licenses. */ -$.event.special=$.event.special||{};var h=$.fn.bind;$.fn.bind=function(t,e,n){var r=this;return n||(n=e,e=null),$.each(t.split(/\s/),(function(t,n){if((n=n.split(/\./)[0])in $.event.special){var i=$.event.special[n];i._init||(i._init=!0,i.originalHandler=i.handler,i.handler=function(){var t=Array.prototype.slice.call(arguments);t[0]=$.extend({},t[0]),$.event.handle=function(){var t=Array.prototype.slice.call(arguments),e=t[0],n=$(e.target);n.trigger.apply(n,arguments)},i.originalHandler.apply(this,t)}),i.setup.apply(r,[e])}return!0})),h.apply(this,[t,n])};n(58),n(61),n(62);var m=n(18),v=n.n(m),g=n(19),y=n.n(g),b=n(20);dayjs.extend(v.a),dayjs.extend(y.a),Object(b.a)()},function(t,e,n){"use strict";(function(t){for( +$.event.special=$.event.special||{};var h=$.fn.bind;$.fn.bind=function(t,e,n){var r=this;return n||(n=e,e=null),$.each(t.split(/\s/),(function(t,n){if((n=n.split(/\./)[0])in $.event.special){var i=$.event.special[n];i._init||(i._init=!0,i.originalHandler=i.handler,i.handler=function(){var t=Array.prototype.slice.call(arguments);t[0]=$.extend({},t[0]),$.event.handle=function(){var t=Array.prototype.slice.call(arguments),e=t[0],n=$(e.target);n.trigger.apply(n,arguments)},i.originalHandler.apply(this,t)}),i.setup.apply(r,[e])}return!0})),h.apply(this,[t,n])};n(57),n(60),n(61);var m,v,g=n(19),y=n.n(g),b=n(20),w=n.n(b),x=n(3),E=n.n(x),T=n(21),k=n.n(T);dayjs.extend(y.a),dayjs.extend(w.a),m=window.m,v=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r=0){i=1;break}var a=n&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),i))}};function s(t){return t&&"[object Function]"==={}.toString.call(t)}function u(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function c(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function l(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=u(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?t:l(c(t))}var f=n&&!(!window.MSInputMethodContext||!document.documentMode),p=n&&/MSIE 10/.test(navigator.userAgent);function d(t){return 11===t?f:10===t?p:f||p}function h(t){if(!t)return document.documentElement;for(var e=d(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===u(n,"position")?h(n):n:t?t.ownerDocument.documentElement:document.documentElement}function m(t){return null!==t.parentNode?m(t.parentNode):t}function v(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?t:e,i=n?e:t,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a,s,u=o.commonAncestorContainer;if(t!==u&&e!==u||r.contains(i))return"BODY"===(s=(a=u).nodeName)||"HTML"!==s&&h(a.firstElementChild)!==a?h(u):u;var c=m(t);return c.host?v(c.host,e):v(t,m(e).host)}function g(t){var e="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"===n||"HTML"===n){var r=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||r)[e]}return t[e]}function y(t,e){var n="x"===e?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"],10)+parseFloat(t["border"+r+"Width"],10)}function b(t,e,n,r){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],d(10)?parseInt(n["offset"+t])+parseInt(r["margin"+("Height"===t?"Top":"Left")])+parseInt(r["margin"+("Height"===t?"Bottom":"Right")]):0)}function w(t){var e=t.body,n=t.documentElement,r=d(10)&&getComputedStyle(n);return{height:b("Height",e,n,r),width:b("Width",e,n,r)}}var x=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},E=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=d(10),i="HTML"===e.nodeName,o=S(t),a=S(e),s=l(t),c=u(e),f=parseFloat(c.borderTopWidth,10),p=parseFloat(c.borderLeftWidth,10);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var h=O({top:o.top-a.top-f,left:o.left-a.left-p,width:o.width,height:o.height});if(h.marginTop=0,h.marginLeft=0,!r&&i){var m=parseFloat(c.marginTop,10),v=parseFloat(c.marginLeft,10);h.top-=f-m,h.bottom-=f-m,h.left-=p-v,h.right-=p-v,h.marginTop=m,h.marginLeft=v}return(r&&!n?e.contains(s):e===s&&"BODY"!==s.nodeName)&&(h=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=g(e,"top"),i=g(e,"left"),o=n?-1:1;return t.top+=r*o,t.bottom+=r*o,t.left+=i*o,t.right+=i*o,t}(h,e)),h}function _(t){if(!t||!t.parentElement||d())return document.documentElement;for(var e=t.parentElement;e&&"none"===u(e,"transform");)e=e.parentElement;return e||document.documentElement}function j(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?_(t):v(t,e);if("viewport"===r)o=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,r=C(t,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:g(n),s=e?0:g(n,"left");return O({top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o})}(a,i);else{var s=void 0;"scrollParent"===r?"BODY"===(s=l(c(e))).nodeName&&(s=t.ownerDocument.documentElement):s="window"===r?t.ownerDocument.documentElement:r;var f=C(s,a,i);if("HTML"!==s.nodeName||function t(e){var n=e.nodeName;if("BODY"===n||"HTML"===n)return!1;if("fixed"===u(e,"position"))return!0;var r=c(e);return!!r&&t(r)}(a))o=f;else{var p=w(t.ownerDocument),d=p.height,h=p.width;o.top+=f.top-f.marginTop,o.bottom=d+f.top,o.left+=f.left-f.marginLeft,o.right=h+f.left}}var m="number"==typeof(n=n||0);return o.left+=m?n:n.left||0,o.top+=m?n:n.top||0,o.right-=m?n:n.right||0,o.bottom-=m?n:n.bottom||0,o}function N(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=j(n,r,o,i),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},u=Object.keys(s).map((function(t){return k({key:t},s[t],{area:(e=s[t],e.width*e.height)});var e})).sort((function(t,e){return e.area-t.area})),c=u.filter((function(t){var e=t.width,r=t.height;return e>=n.clientWidth&&r>=n.clientHeight})),l=c.length>0?c[0].key:u[0].key,f=t.split("-")[1];return l+(f?"-"+f:"")}function L(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return C(n,r?_(e):v(e,n),r)}function M(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),r=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+r,height:t.offsetHeight+n}}function $(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function A(t,e,n){n=n.split("-")[0];var r=M(t),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",u=o?"height":"width",c=o?"width":"height";return i[a]=e[a]+e[u]/2-r[u]/2,i[s]=n===s?e[s]-r[c]:e[$(s)],i}function P(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function D(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===n}));var r=P(t,(function(t){return t[e]===n}));return t.indexOf(r)}(t,"name",n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&s(n)&&(e.offsets.popper=O(e.offsets.popper),e.offsets.reference=O(e.offsets.reference),e=n(e,t))})),e}function I(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=L(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=N(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=A(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=D(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function z(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function F(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=J.indexOf(t),r=J.slice(n+1).concat(J.slice(0,n));return e?r.reverse():r}var Q={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function G(t,e,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=t.split(/(\+|\-)/).map((function(t){return t.trim()})),s=a.indexOf(P(a,(function(t){return-1!==t.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(u)[0]]),[a[s].split(u)[1]].concat(a.slice(s+1))]:[a];return(c=c.map((function(t,r){var i=(1===r?!o:o)?"height":"width",a=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,r){var i=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return t;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return O(s)[e]/100*o}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o}return o}(t,i,e,n)}))}))).forEach((function(t,e){t.forEach((function(n,r){W(n)&&(i[e]+=n*("-"===t[r-1]?-1:1))}))})),i}var tt={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],r=e.split("-")[1];if(r){var i=t.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),u=s?"left":"top",c=s?"width":"height",l={start:T({},u,o[u]),end:T({},u,o[u]+o[c]-a[c])};t.offsets.popper=k({},a,l[r])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,r=t.placement,i=t.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],u=void 0;return u=W(+n)?[+n,0]:G(n,o,a,s),"left"===s?(o.top+=u[0],o.left-=u[1]):"right"===s?(o.top+=u[0],o.left+=u[1]):"top"===s?(o.left+=u[0],o.top-=u[1]):"bottom"===s&&(o.left+=u[0],o.top+=u[1]),t.popper=o,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||h(t.instance.popper);t.instance.reference===n&&(n=h(n));var r=F("transform"),i=t.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var u=j(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);i.top=o,i.left=a,i[r]=s,e.boundaries=u;var c=e.priority,l=t.offsets.popper,f={primary:function(t){var n=l[t];return l[t]u[t]&&!e.escapeWithReference&&(r=Math.min(l[n],u[t]-("right"===t?l.width:l.height))),T({},n,r)}};return c.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";l=k({},l,f[e](t))})),t.offsets.popper=l,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,r=e.reference,i=t.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",u=a?"left":"top",c=a?"width":"height";return n[s]o(r[s])&&(t.offsets.popper[u]=o(r[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!Z(t.instance.modifiers,"arrow","keepTogether"))return t;var r=e.element;if("string"==typeof r){if(!(r=t.instance.popper.querySelector(r)))return t}else if(!t.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var i=t.placement.split("-")[0],o=t.offsets,a=o.popper,s=o.reference,c=-1!==["left","right"].indexOf(i),l=c?"height":"width",f=c?"Top":"Left",p=f.toLowerCase(),d=c?"left":"top",h=c?"bottom":"right",m=M(r)[l];s[h]-ma[h]&&(t.offsets.popper[p]+=s[p]+m-a[h]),t.offsets.popper=O(t.offsets.popper);var v=s[p]+s[l]/2-m/2,g=u(t.instance.popper),y=parseFloat(g["margin"+f],10),b=parseFloat(g["border"+f+"Width"],10),w=v-t.offsets.popper[p]-y-b;return w=Math.max(Math.min(a[l]-m,w),0),t.arrowElement=r,t.offsets.arrow=(T(n={},p,Math.round(w)),T(n,d,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(z(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=j(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),r=t.placement.split("-")[0],i=$(r),o=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case Q.FLIP:a=[r,i];break;case Q.CLOCKWISE:a=X(r);break;case Q.COUNTERCLOCKWISE:a=X(r,!0);break;default:a=e.behavior}return a.forEach((function(s,u){if(r!==s||a.length===u+1)return t;r=t.placement.split("-")[0],i=$(r);var c=t.offsets.popper,l=t.offsets.reference,f=Math.floor,p="left"===r&&f(c.right)>f(l.left)||"right"===r&&f(c.left)f(l.top)||"bottom"===r&&f(c.top)f(n.right),m=f(c.top)f(n.bottom),g="left"===r&&d||"right"===r&&h||"top"===r&&m||"bottom"===r&&v,y=-1!==["top","bottom"].indexOf(r),b=!!e.flipVariations&&(y&&"start"===o&&d||y&&"end"===o&&h||!y&&"start"===o&&m||!y&&"end"===o&&v),w=!!e.flipVariationsByContent&&(y&&"start"===o&&h||y&&"end"===o&&d||!y&&"start"===o&&v||!y&&"end"===o&&m),x=b||w;(p||g||x)&&(t.flipped=!0,(p||g)&&(r=a[u+1]),x&&(o=function(t){return"end"===t?"start":"start"===t?"end":t}(o)),t.placement=r+(o?"-"+o:""),t.offsets.popper=k({},t.offsets.popper,A(t.instance.popper,t.offsets.reference,t.placement)),t=D(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],r=t.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),t.placement=$(e),t.offsets.popper=O(i),t}},hide:{order:800,enabled:!0,fn:function(t){if(!Z(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=P(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottomn.right||e.top>n.bottom||e.right2&&void 0!==arguments[2]?arguments[2]:{};x(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=a(this.update.bind(this)),this.options=k({},t.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(k({},t.Defaults.modifiers,i.modifiers)).forEach((function(e){r.options.modifiers[e]=k({},t.Defaults.modifiers[e]||{},i.modifiers?i.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return k({name:t},r.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&s(t.onLoad)&&t.onLoad(r.reference,r.popper,r.options,t,r.state)})),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return E(t,[{key:"update",value:function(){return I.call(this)}},{key:"destroy",value:function(){return H.call(this)}},{key:"enableEventListeners",value:function(){return Y.call(this)}},{key:"disableEventListeners",value:function(){return B.call(this)}}]),t}();et.Utils=("undefined"!=typeof window?window:t).PopperUtils,et.placements=K,et.Defaults=tt,e.a=et}).call(this,n(1))},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){var r=e.prototype;n.en.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"};var i=function(t,e,r,i){for(var o,a,s=r.$locale().relativeTime,u=[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],c=u.length,l=0;l0&&(f=u[l-1]),a=s[f.l].replace("%d",p);break}}return e?a:(o>0?s.future:s.past).replace("%s",a)};r.to=function(t,e){return i(t,e,this,!0)},r.from=function(t,e){return i(t,e,this)};var o=function(t){return t.$u?n.utc():n()};r.toNow=function(t){return this.to(o(this),t)},r.fromNow=function(t){return this.from(o(this),t)}}}()},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){var r=e.prototype,i=r.format,o={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};n.en.formats=o,r.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var e=this.$locale().formats,n=void 0===e?{}:e,r=t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,e,r){var i=r&&r.toUpperCase();return e||n[r]||o[r]||n[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}));return i.call(this,r)}}}()},function(t,e,n){"use strict";(function(t){var r=n(21),i=n.n(r);e.a=function(){var e=t.m,n=function t(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o]*>/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,g=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,y=/^(?:body|html)$/i,b=/([A-Z])/g,w=["val","css","html","text","data","width","height","offset"],x=f.createElement("table"),E=f.createElement("tr"),T={tr:f.createElement("tbody"),tbody:x,thead:x,tfoot:x,td:E,th:E,"*":f.createElement("div")},k=/complete|loaded|interactive/,O=/^[\w-]*$/,S={},C=S.toString,_={},j=f.createElement("div"),N={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},L=Array.isArray||function(t){return t instanceof Array};function M(t){return null==t?String(t):S[C.call(t)]||"object"}function $(t){return"function"==M(t)}function A(t){return null!=t&&t==t.window}function P(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function D(t){return"object"==M(t)}function I(t){return D(t)&&!A(t)&&Object.getPrototypeOf(t)==Object.prototype}function z(t){var e=!!t&&"length"in t&&t.length,n=r.type(t);return"function"!=n&&!A(t)&&("array"==n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function F(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function H(t){return t in d?d[t]:d[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function R(t,e){return"number"!=typeof e||h[F(t)]?e:e+"px"}function q(t){return"children"in t?l.call(t.children):r.map(t.childNodes,(function(t){if(1==t.nodeType)return t}))}function Y(t,e){var n,r=t?t.length:0;for(n=0;n")),n===e&&(n=m.test(t)&&RegExp.$1),n in T||(n="*"),(s=T[n]).innerHTML=""+t,o=r.each(l.call(s.childNodes),(function(){s.removeChild(this)}))),I(i)&&(a=r(o),r.each(i,(function(t,e){w.indexOf(t)>-1?a[t](e):a.attr(t,e)}))),o},_.Z=function(t,e){return new Y(t,e)},_.isZ=function(t){return t instanceof _.Z},_.init=function(t,n){var i,o;if(!t)return _.Z();if("string"==typeof t)if("<"==(t=t.trim())[0]&&m.test(t))i=_.fragment(t,RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);i=_.qsa(f,t)}else{if($(t))return r(f).ready(t);if(_.isZ(t))return t;if(L(t))o=t,i=c.call(o,(function(t){return null!=t}));else if(D(t))i=[t],t=null;else if(m.test(t))i=_.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);i=_.qsa(f,t)}}return _.Z(i,t)},(r=function(t,e){return _.init(t,e)}).extend=function(t){var e,n=l.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach((function(n){B(t,n,e)})),t},_.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,a=O.test(o);return t.getElementById&&a&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:l.call(a&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},r.contains=f.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},r.type=M,r.isFunction=$,r.isWindow=A,r.isArray=L,r.isPlainObject=I,r.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},r.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},r.inArray=function(t,e,n){return s.indexOf.call(e,t,n)},r.camelCase=o,r.trim=function(t){return null==t?"":String.prototype.trim.call(t)},r.uuid=0,r.support={},r.expr={},r.noop=function(){},r.map=function(t,e){var n,i,o,a,s=[];if(z(t))for(i=0;i0?r.fn.concat.apply([],a):a},r.each=function(t,e){var n,r;if(z(t)){for(n=0;n=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each((function(){null!=this.parentNode&&this.parentNode.removeChild(this)}))},each:function(t){return s.every.call(this,(function(e,n){return!1!==t.call(e,n,e)})),this},filter:function(t){return $(t)?this.not(this.not(t)):r(c.call(this,(function(e){return _.matches(e,t)})))},add:function(t,e){return r(a(this.concat(r(t,e))))},is:function(t){return this.length>0&&_.matches(this[0],t)},not:function(t){var n=[];if($(t)&&t.call!==e)this.each((function(e){t.call(this,e)||n.push(this)}));else{var i="string"==typeof t?this.filter(t):z(t)&&$(t.item)?l.call(t):r(t);this.forEach((function(t){i.indexOf(t)<0&&n.push(t)}))}return r(n)},has:function(t){return this.filter((function(){return D(t)?r.contains(this,t):r(this).find(t).size()}))},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!D(t)?t:r(t)},last:function(){var t=this[this.length-1];return t&&!D(t)?t:r(t)},find:function(t){var e=this;return t?"object"==typeof t?r(t).filter((function(){var t=this;return s.some.call(e,(function(e){return r.contains(e,t)}))})):1==this.length?r(_.qsa(this[0],t)):this.map((function(){return _.qsa(this,t)})):r()},closest:function(t,e){var n=[],i="object"==typeof t&&r(t);return this.each((function(r,o){for(;o&&!(i?i.indexOf(o)>=0:_.matches(o,t));)o=o!==e&&!P(o)&&o.parentNode;o&&n.indexOf(o)<0&&n.push(o)})),r(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=r.map(n,(function(t){if((t=t.parentNode)&&!P(t)&&e.indexOf(t)<0)return e.push(t),t}));return W(e,t)},parent:function(t){return W(a(this.pluck("parentNode")),t)},children:function(t){return W(this.map((function(){return q(this)})),t)},contents:function(){return this.map((function(){return this.contentDocument||l.call(this.childNodes)}))},siblings:function(t){return W(this.map((function(t,e){return c.call(q(e.parentNode),(function(t){return t!==e}))})),t)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(t){return r.map(this,(function(e){return e[t]}))},show:function(){return this.each((function(){var t,e,n;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(t=this.nodeName,p[t]||(e=f.createElement(t),f.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),p[t]=n),p[t]))}))},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=$(t);if(this[0]&&!e)var n=r(t).get(0),i=n.parentNode||this.length>1;return this.each((function(o){r(this).wrapAll(e?t.call(this,o):i?n.cloneNode(!0):n)}))},wrapAll:function(t){if(this[0]){var e;for(r(this[0]).before(t=r(t));(e=t.children()).length;)t=e.first();r(t).append(this)}return this},wrapInner:function(t){var e=$(t);return this.each((function(n){var i=r(this),o=i.contents(),a=e?t.call(this,n):t;o.length?o.wrapAll(a):i.append(a)}))},unwrap:function(){return this.parent().each((function(){r(this).replaceWith(r(this).children())})),this},clone:function(){return this.map((function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(t){return this.each((function(){var n=r(this);(t===e?"none"==n.css("display"):t)?n.show():n.hide()}))},prev:function(t){return r(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return r(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each((function(e){var n=this.innerHTML;r(this).empty().append(U(this,t,e,n))})):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each((function(e){var n=U(this,t,e,this.textContent);this.textContent=null==n?"":""+n})):0 in this?this.pluck("textContent").join(""):null},attr:function(t,r){var i;return"string"!=typeof t||1 in arguments?this.each((function(e){if(1===this.nodeType)if(D(t))for(n in t)V(this,n,t[n]);else V(this,t,U(this,r,e,this.getAttribute(t)))})):0 in this&&1==this[0].nodeType&&null!=(i=this[0].getAttribute(t))?i:e},removeAttr:function(t){return this.each((function(){1===this.nodeType&&t.split(" ").forEach((function(t){V(this,t)}),this)}))},prop:function(t,e){return t=N[t]||t,1 in arguments?this.each((function(n){this[t]=U(this,e,n,this[t])})):this[0]&&this[0][t]},removeProp:function(t){return t=N[t]||t,this.each((function(){delete this[t]}))},data:function(t,n){var r="data-"+t.replace(b,"-$1").toLowerCase(),i=1 in arguments?this.attr(r,n):this.attr(r);return null!==i?K(i):e},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each((function(e){this.value=U(this,t,e,this.value)}))):this[0]&&(this[0].multiple?r(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each((function(t){var n=r(this),i=U(this,e,t,n.offset()),o=n.offsetParent().offset(),a={top:i.top-o.top,left:i.left-o.left};"static"==n.css("position")&&(a.position="relative"),n.css(a)}));if(!this.length)return null;if(f.documentElement!==this[0]&&!r.contains(f.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+t.pageXOffset,top:n.top+t.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(t,e){if(arguments.length<2){var i=this[0];if("string"==typeof t){if(!i)return;return i.style[o(t)]||getComputedStyle(i,"").getPropertyValue(t)}if(L(t)){if(!i)return;var a={},s=getComputedStyle(i,"");return r.each(t,(function(t,e){a[e]=i.style[o(e)]||s.getPropertyValue(e)})),a}}var u="";if("string"==M(t))e||0===e?u=F(t)+":"+R(t,e):this.each((function(){this.style.removeProperty(F(t))}));else for(n in t)t[n]||0===t[n]?u+=F(n)+":"+R(n,t[n])+";":this.each((function(){this.style.removeProperty(F(n))}));return this.each((function(){this.style.cssText+=";"+u}))},index:function(t){return t?this.indexOf(r(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&s.some.call(this,(function(t){return this.test(Z(t))}),H(t))},addClass:function(t){return t?this.each((function(e){if("className"in this){i=[];var n=Z(this);U(this,t,e,n).split(/\s+/g).forEach((function(t){r(this).hasClass(t)||i.push(t)}),this),i.length&&Z(this,n+(n?" ":"")+i.join(" "))}})):this},removeClass:function(t){return this.each((function(n){if("className"in this){if(t===e)return Z(this,"");i=Z(this),U(this,t,n,i).split(/\s+/g).forEach((function(t){i=i.replace(H(t)," ")})),Z(this,i.trim())}}))},toggleClass:function(t,n){return t?this.each((function(i){var o=r(this);U(this,t,i,Z(this)).split(/\s+/g).forEach((function(t){(n===e?!o.hasClass(t):n)?o.addClass(t):o.removeClass(t)}))})):this},scrollTop:function(t){if(this.length){var n="scrollTop"in this[0];return t===e?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var n="scrollLeft"in this[0];return t===e?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),i=y.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(r(t).css("margin-top"))||0,n.left-=parseFloat(r(t).css("margin-left"))||0,i.top+=parseFloat(r(e[0]).css("border-top-width"))||0,i.left+=parseFloat(r(e[0]).css("border-left-width"))||0,{top:n.top-i.top,left:n.left-i.left}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent||f.body;t&&!y.test(t.nodeName)&&"static"==r(t).css("position");)t=t.offsetParent;return t}))}},r.fn.detach=r.fn.remove,["width","height"].forEach((function(t){var n=t.replace(/./,(function(t){return t[0].toUpperCase()}));r.fn[t]=function(i){var o,a=this[0];return i===e?A(a)?a["inner"+n]:P(a)?a.documentElement["scroll"+n]:(o=this.offset())&&o[t]:this.each((function(e){(a=r(this)).css(t,U(this,i,e,a[t]()))}))}})),["after","prepend","before","append"].forEach((function(n,i){var o=i%2;r.fn[n]=function(){var n,a,s=r.map(arguments,(function(t){var i=[];return"array"==(n=M(t))?(t.forEach((function(t){return t.nodeType!==e?i.push(t):r.zepto.isZ(t)?i=i.concat(t.get()):void(i=i.concat(_.fragment(t)))})),i):"object"==n||null==t?t:_.fragment(t)})),u=this.length>1;return s.length<1?this:this.each((function(e,n){a=o?n:n.parentNode,n=0==i?n.nextSibling:1==i?n.firstChild:2==i?n:null;var c=r.contains(f.documentElement,a);s.forEach((function(e){if(u)e=e.cloneNode(!0);else if(!a)return r(e).remove();a.insertBefore(e,n),c&&J(e,(function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}}))}))}))},r.fn[o?n+"To":"insert"+(i?"Before":"After")]=function(t){return r(t)[n](this),this}})),_.Z.prototype=Y.prototype=r.fn,_.uniq=a,_.deserializeValue=K,r.zepto=_,r}();return t.Zepto=e,void 0===t.$&&(t.$=e),function(e){var n,r=1,i=Array.prototype.slice,o=e.isFunction,a=function(t){return"string"==typeof t},s={},u={},c="onfocusin"in t,l={focus:"focusin",blur:"focusout"},f={mouseenter:"mouseover",mouseleave:"mouseout"};function p(t){return t._zid||(t._zid=r++)}function d(t,e,n,r){if((e=h(e)).ns)var i=(o=e.ns,new RegExp("(?:^| )"+o.replace(" "," .* ?")+"(?: |$)"));var o;return(s[p(t)]||[]).filter((function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||i.test(t.ns))&&(!n||p(t.fn)===p(n))&&(!r||t.sel==r)}))}function h(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function m(t,e){return t.del&&!c&&t.e in l||!!e}function v(t){return f[t]||c&&l[t]||t}function g(t,r,i,o,a,u,c){var l=p(t),d=s[l]||(s[l]=[]);r.split(/\s/).forEach((function(r){if("ready"==r)return e(document).ready(i);var s=h(r);s.fn=i,s.sel=a,s.e in f&&(i=function(t){var n=t.relatedTarget;if(!n||n!==this&&!e.contains(this,n))return s.fn.apply(this,arguments)}),s.del=u;var l=u||i;s.proxy=function(e){if(!(e=T(e)).isImmediatePropagationStopped()){e.data=o;var r=l.apply(t,e._args==n?[e]:[e].concat(e._args));return!1===r&&(e.preventDefault(),e.stopPropagation()),r}},s.i=d.length,d.push(s),"addEventListener"in t&&t.addEventListener(v(s.e),s.proxy,m(s,c))}))}function y(t,e,n,r,i){var o=p(t);(e||"").split(/\s/).forEach((function(e){d(t,e,n,r).forEach((function(e){delete s[o][e.i],"removeEventListener"in t&&t.removeEventListener(v(e.e),e.proxy,m(e,i))}))}))}u.click=u.mousedown=u.mouseup=u.mousemove="MouseEvents",e.event={add:g,remove:y},e.proxy=function(t,n){var r=2 in arguments&&i.call(arguments,2);if(o(t)){var s=function(){return t.apply(n,r?r.concat(i.call(arguments)):arguments)};return s._zid=p(t),s}if(a(n))return r?(r.unshift(t[n],t),e.proxy.apply(null,r)):e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var b=function(){return!0},w=function(){return!1},x=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,E={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};function T(t,r){return!r&&t.isDefaultPrevented||(r||(r=t),e.each(E,(function(e,n){var i=r[e];t[e]=function(){return this[n]=b,i&&i.apply(r,arguments)},t[n]=w})),t.timeStamp||(t.timeStamp=Date.now()),(r.defaultPrevented!==n?r.defaultPrevented:"returnValue"in r?!1===r.returnValue:r.getPreventDefault&&r.getPreventDefault())&&(t.isDefaultPrevented=b)),t}function k(t){var e,r={originalEvent:t};for(e in t)x.test(e)||t[e]===n||(r[e]=t[e]);return T(r,t)}e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,r,s,u,c){var l,f,p=this;return t&&!a(t)?(e.each(t,(function(t,e){p.on(t,r,s,e,c)})),p):(a(r)||o(u)||!1===u||(u=s,s=r,r=n),u!==n&&!1!==s||(u=s,s=n),!1===u&&(u=w),p.each((function(n,o){c&&(l=function(t){return y(o,t.type,u),u.apply(this,arguments)}),r&&(f=function(t){var n,a=e(t.target).closest(r,o).get(0);if(a&&a!==o)return n=e.extend(k(t),{currentTarget:a,liveFired:o}),(l||u).apply(a,[n].concat(i.call(arguments,1)))}),g(o,t,u,s,r,f||l)})))},e.fn.off=function(t,r,i){var s=this;return t&&!a(t)?(e.each(t,(function(t,e){s.off(t,r,e)})),s):(a(r)||o(i)||!1===i||(i=r,r=n),!1===i&&(i=w),s.each((function(){y(this,t,i,r)})))},e.fn.trigger=function(t,n){return(t=a(t)||e.isPlainObject(t)?e.Event(t):T(t))._args=n,this.each((function(){t.type in l&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)}))},e.fn.triggerHandler=function(t,n){var r,i;return this.each((function(o,s){(r=k(a(t)?e.Event(t):t))._args=n,r.target=s,e.each(d(s,t.type||t),(function(t,e){if(i=e.proxy(r),r.isImmediatePropagationStopped())return!1}))})),i},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach((function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}})),e.Event=function(t,e){a(t)||(t=(e=t).type);var n=document.createEvent(u[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),T(n)}}(e),function(e){var n,r,i=+new Date,o=t.document,a=/)<[^<]*)*<\/script>/gi,s=/^(?:text|application)\/javascript/i,u=/^(?:text|application)\/xml/i,c="application/json",l="text/html",f=/^\s*$/,p=o.createElement("a");function d(t,n,r,i){if(t.global)return function(t,n,r){var i=e.Event(n);return e(t).trigger(i,r),!i.isDefaultPrevented()}(n||o,r,i)}function h(t,e){var n=e.context;if(!1===e.beforeSend.call(n,t,e)||!1===d(e,n,"ajaxBeforeSend",[t,e]))return!1;d(e,n,"ajaxSend",[t,e])}function m(t,e,n,r){var i=n.context;n.success.call(i,t,"success",e),r&&r.resolveWith(i,[t,"success",e]),d(n,i,"ajaxSuccess",[e,n,t]),g("success",e,n)}function v(t,e,n,r,i){var o=r.context;r.error.call(o,n,e,t),i&&i.rejectWith(o,[n,e,t]),d(r,o,"ajaxError",[n,r,t||e]),g(e,n,r)}function g(t,n,r){var i=r.context;r.complete.call(i,n,t),d(r,i,"ajaxComplete",[n,r]),function(t){t.global&&!--e.active&&d(t,null,"ajaxStop")}(r)}function y(){}function b(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function w(t,n,r,i){return e.isFunction(n)&&(i=r,r=n,n=void 0),e.isFunction(r)||(i=r,r=void 0),{url:t,data:n,success:r,dataType:i}}p.href=t.location.href,e.active=0,e.ajaxJSONP=function(n,r){if(!("type"in n))return e.ajax(n);var a,s,u=n.jsonpCallback,c=(e.isFunction(u)?u():u)||"Zepto"+i++,l=o.createElement("script"),f=t[c],p=function(t){e(l).triggerHandler("error",t||"abort")},d={abort:p};return r&&r.promise(d),e(l).on("load error",(function(i,o){clearTimeout(s),e(l).off().remove(),"error"!=i.type&&a?m(a[0],d,n,r):v(null,o||"error",d,n,r),t[c]=f,a&&e.isFunction(f)&&f(a[0]),f=a=void 0})),!1===h(d,n)?(p("abort"),d):(t[c]=function(){a=arguments},l.src=n.url.replace(/\?(.+)=\?/,"?$1="+c),o.head.appendChild(l),n.timeout>0&&(s=setTimeout((function(){p("timeout")}),n.timeout)),d)},e.ajaxSettings={type:"GET",beforeSend:y,success:y,error:y,complete:y,context:null,global:!0,xhr:function(){return new t.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:c,xml:"application/xml, text/xml",html:l,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:y},e.ajax=function(i){var a,g,w=e.extend({},i||{}),x=e.Deferred&&e.Deferred();for(n in e.ajaxSettings)void 0===w[n]&&(w[n]=e.ajaxSettings[n]);!function(t){t.global&&0==e.active++&&d(t,null,"ajaxStart")}(w),w.crossDomain||((a=o.createElement("a")).href=w.url,a.href=a.href,w.crossDomain=p.protocol+"//"+p.host!=a.protocol+"//"+a.host),w.url||(w.url=t.location.toString()),(g=w.url.indexOf("#"))>-1&&(w.url=w.url.slice(0,g)),function(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=b(t.url,t.data),t.data=void 0)}(w);var E=w.dataType,T=/\?.+=\?/.test(w.url);if(T&&(E="jsonp"),!1!==w.cache&&(i&&!0===i.cache||"script"!=E&&"jsonp"!=E)||(w.url=b(w.url,"_="+Date.now())),"jsonp"==E)return T||(w.url=b(w.url,w.jsonp?w.jsonp+"=?":!1===w.jsonp?"":"callback=?")),e.ajaxJSONP(w,x);var k,O=w.accepts[E],S={},C=function(t,e){S[t.toLowerCase()]=[t,e]},_=/^([\w-]+:)\/\//.test(w.url)?RegExp.$1:t.location.protocol,j=w.xhr(),N=j.setRequestHeader;if(x&&x.promise(j),w.crossDomain||C("X-Requested-With","XMLHttpRequest"),C("Accept",O||"*/*"),(O=w.mimeType||O)&&(O.indexOf(",")>-1&&(O=O.split(",",2)[0]),j.overrideMimeType&&j.overrideMimeType(O)),(w.contentType||!1!==w.contentType&&w.data&&"GET"!=w.type.toUpperCase())&&C("Content-Type",w.contentType||"application/x-www-form-urlencoded"),w.headers)for(r in w.headers)C(r,w.headers[r]);if(j.setRequestHeader=C,j.onreadystatechange=function(){if(4==j.readyState){j.onreadystatechange=y,clearTimeout(k);var t,n=!1;if(j.status>=200&&j.status<300||304==j.status||0==j.status&&"file:"==_){if(E=E||function(t){return t&&(t=t.split(";",2)[0]),t&&(t==l?"html":t==c?"json":s.test(t)?"script":u.test(t)&&"xml")||"text"}(w.mimeType||j.getResponseHeader("content-type")),"arraybuffer"==j.responseType||"blob"==j.responseType)t=j.response;else{t=j.responseText;try{t=function(t,e,n){if(n.dataFilter==y)return t;var r=n.context;return n.dataFilter.call(r,t,e)}(t,E,w),"script"==E?(0,eval)(t):"xml"==E?t=j.responseXML:"json"==E&&(t=f.test(t)?null:e.parseJSON(t))}catch(t){n=t}if(n)return v(n,"parsererror",j,w,x)}m(t,j,w,x)}else v(j.statusText||null,j.status?"error":"abort",j,w,x)}},!1===h(j,w))return j.abort(),v(null,"abort",j,w,x),j;var L=!("async"in w)||w.async;if(j.open(w.type,w.url,L,w.username,w.password),w.xhrFields)for(r in w.xhrFields)j[r]=w.xhrFields[r];for(r in S)N.apply(j,S[r]);return w.timeout>0&&(k=setTimeout((function(){j.onreadystatechange=y,j.abort(),v(null,"timeout",j,w,x)}),w.timeout)),j.send(w.data?w.data:null),j},e.get=function(){return e.ajax(w.apply(null,arguments))},e.post=function(){var t=w.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=w.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,n,r){if(!this.length)return this;var i,o=this,s=t.split(/\s/),u=w(t,n,r),c=u.success;return s.length>1&&(u.url=s[0],i=s[1]),u.success=function(t){o.html(i?e("
").html(t.replace(a,"")).find(i):t),c&&c.apply(o,arguments)},e.ajax(u),this};var x=encodeURIComponent;e.param=function(t,n){var r=[];return r.add=function(t,n){e.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(x(t)+"="+x(n))},function t(n,r,i,o){var a,s=e.isArray(r),u=e.isPlainObject(r);e.each(r,(function(r,c){a=e.type(c),o&&(r=i?o:o+"["+(u||"object"==a||"array"==a?r:"")+"]"),!o&&s?n.add(c.name,c.value):"array"==a||!i&&"object"==a?t(n,c,i,r):n.add(r,c)}))}(r,t,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[];return this[0]&&t.each(this[0].elements,(function(i,o){n=o.type,(e=o.name)&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&function t(n){if(n.forEach)return n.forEach(t);r.push({name:e,value:n})}(t(o).val())})),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach((function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))})),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(n){var e=getComputedStyle;t.getComputedStyle=function(t,n){try{return e(t,n)}catch(t){return null}}}}(),e}(i)}.call(e,n,e,t))||(t.exports=r)}).call(window)},function(t,e,n){(function(e){t.exports=e.moment=n(31)}).call(this,n(1))},function(t,e,n){(function(e){t.exports=e.dayjs=n(32)}).call(this,n(1))},function(t,e,n){t.exports=function(){"use strict";var t="millisecond",e="second",n="minute",r="hour",i="day",o="week",a="month",s="quarter",u="year",c=/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,l=/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},p={s:f,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+f(r,2,"0")+":"+f(i,2,"0")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,a),i=e-r<0,o=t.clone().add(n+(i?-1:1),a);return Number(-(n+(e-r)/(i?r-o:o-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(c){return{M:a,y:u,w:o,d:i,h:r,m:n,s:e,ms:t,Q:s}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},d={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},h="en",m={};m[h]=d;var v=function(t){return t instanceof w},g=function(t,e,n){var r;if(!t)return h;if("string"==typeof t)m[t]&&(r=t),e&&(m[t]=e,r=t);else{var i=t.name;m[i]=t,r=i}return n||(h=r),r},y=function(t,e,n){if(v(t))return t.clone();var r=e?"string"==typeof e?{format:e,pl:n}:e:{};return r.date=t,new w(r)},b=p;b.l=g,b.i=v,b.w=function(t,e){return y(t,{locale:e.$L,utc:e.$u})};var w=function(){function f(t){this.$L=this.$L||g(t.locale,null,!0),this.parse(t)}var p=f.prototype;return p.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(c);if(r)return n?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(e)}(t),this.init()},p.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},p.$utils=function(){return b},p.isValid=function(){return!("Invalid Date"===this.$d.toString())},p.isSame=function(t,e){var n=y(t);return this.startOf(e)<=n&&n<=this.endOf(e)},p.isAfter=function(t,e){return y(t)1)for(var n=1;n'+e.children+"",a=a.firstChild):a.innerHTML=e.children,e.dom=a.firstChild,e.domSize=a.childNodes.length,e.instance=[];for(var s,u=n.createDocumentFragment();s=a.firstChild;)e.instance.push(s),u.appendChild(s);b(t,u,i)}function d(t,e,n,r,i,o){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)c(t,n,0,n.length,r,i,o);else if(null==n||0===n.length)x(t,e,0,e.length);else{var a=null!=e[0]&&null!=e[0].key,s=null!=n[0]&&null!=n[0].key,u=0,f=0;if(!a)for(;f=f&&O>=u&&(b=e[k],w=n[O],b.key===w.key);)b!==w&&h(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),k--,O--;for(;k>=f&&O>=u&&(p=e[f],d=n[u],p.key===d.key);)f++,u++,p!==d&&h(t,p,d,r,g(e,f,i),o);for(;k>=f&&O>=u&&u!==O&&p.key===w.key&&b.key===d.key;)y(t,b,T=g(e,f,i)),b!==d&&h(t,b,d,r,T,o),++u<=--O&&y(t,p,i),p!==w&&h(t,p,w,r,i,o),null!=w.dom&&(i=w.dom),f++,b=e[--k],w=n[O],p=e[f],d=n[u];for(;k>=f&&O>=u&&b.key===w.key;)b!==w&&h(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),O--,b=e[--k],w=n[O];if(u>O)x(t,e,f,k+1);else if(f>k)c(t,n,u,O+1,r,i,o);else{var S,C,_=i,j=O-u+1,N=new Array(j),L=0,M=0,$=2147483647,A=0;for(M=0;M=u;M--){null==S&&(S=m(e,f,k+1));var P=S[(w=n[M]).key];null!=P&&($=P<$?P:-1,N[M-u]=P,b=e[P],e[P]=null,b!==w&&h(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),A++)}if(i=_,A!==k-f+1&&x(t,e,f,k+1),0===A)c(t,n,u,O+1,r,i,o);else if(-1===$)for(L=(C=function(t){var e=[0],n=0,r=0,i=0,o=v.length=t.length;for(i=0;i>>1)+(r>>>1)+(n&r&1);t[e[s]]0&&(v[i]=e[n-1]),e[n]=i)}}n=e.length,r=e[n-1];for(;n-- >0;)e[n]=r,r=v[r];return v.length=0,e}(N)).length-1,M=O;M>=u;M--)d=n[M],-1===N[M-u]?l(t,d,r,o,i):C[L]===M-u?L--:y(t,d,i),null!=d.dom&&(i=n[M].dom);else for(M=O;M>=u;M--)d=n[M],-1===N[M-u]&&l(t,d,r,o,i),null!=d.dom&&(i=n[M].dom)}}else{var D=e.lengthD&&x(t,e,u,e.length),n.length>D&&c(t,n,u,n.length,r,i,o)}}}function h(t,e,n,i,a,u){var c=e.tag;if(c===n.tag){if(n.state=e.state,n.events=e.events,function(t,e){do{var n;if(null!=t.attrs&&"function"==typeof t.attrs.onbeforeupdate)if(void 0!==(n=s.call(t.attrs.onbeforeupdate,t,e))&&!n)break;if("string"!=typeof t.tag&&"function"==typeof t.state.onbeforeupdate)if(void 0!==(n=s.call(t.state.onbeforeupdate,t,e))&&!n)break;return!1}while(0);return t.dom=e.dom,t.domSize=e.domSize,t.instance=e.instance,t.attrs=e.attrs,t.children=e.children,t.text=e.text,!0}(n,e))return;if("string"==typeof c)switch(null!=n.attrs&&I(n.attrs,n,i),c){case"#":!function(t,e){t.children.toString()!==e.children.toString()&&(t.dom.nodeValue=e.children);e.dom=t.dom}(e,n);break;case"<":!function(t,e,n,r,i){e.children!==n.children?(T(t,e),p(t,n,r,i)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,u,a);break;case"[":!function(t,e,n,r,i,o){d(t,e.children,n.children,r,i,o);var a=0,s=n.children;if(n.dom=null,null!=s){for(var u=0;u-1||null!=t.attrs&&t.attrs.is||"href"!==e&&"list"!==e&&"form"!==e&&"width"!==e&&"height"!==e)&&e in t.dom}var N=/[A-Z]/g;function L(t){return"-"+t.toLowerCase()}function M(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(N,L)}function $(t,e,n){if(e===n);else if(null==n)t.style.cssText="";else if("object"!=typeof n)t.style.cssText=n;else if(null==e||"object"!=typeof e)for(var r in t.style.cssText="",n){null!=(i=n[r])&&t.style.setProperty(M(r),String(i))}else{for(var r in n){var i;null!=(i=n[r])&&(i=String(i))!==String(e[r])&&t.style.setProperty(M(r),i)}for(var r in e)null!=e[r]&&null==n[r]&&t.style.removeProperty(M(r))}}function A(){this._=e}function P(t,e,n){if(null!=t.events){if(t.events[e]===n)return;null==n||"function"!=typeof n&&"object"!=typeof n?(null!=t.events[e]&&t.dom.removeEventListener(e.slice(2),t.events,!1),t.events[e]=void 0):(null==t.events[e]&&t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}else null==n||"function"!=typeof n&&"object"!=typeof n||(t.events=new A,t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}function D(t,e,n){"function"==typeof t.oninit&&s.call(t.oninit,e),"function"==typeof t.oncreate&&n.push(s.bind(t.oncreate,e))}function I(t,e,n){"function"==typeof t.onupdate&&n.push(s.bind(t.onupdate,e))}return A.prototype=Object.create(null),A.prototype.handleEvent=function(t){var e,n=this["on"+t.type];"function"==typeof n?e=n.call(t.currentTarget,t):"function"==typeof n.handleEvent&&n.handleEvent(t),this._&&!1!==t.redraw&&(0,this._)(),!1===e&&(t.preventDefault(),t.stopPropagation())},function(t,n,i){if(!t)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o=[],a=u(),s=t.namespaceURI;null==t.vnodes&&(t.textContent=""),n=r.normalizeChildren(Array.isArray(n)?n:[n]);var c=e;try{e="function"==typeof i?i:void 0,d(t,t.vnodes,n,o,null,"http://www.w3.org/1999/xhtml"===s?void 0:s)}finally{e=c}t.vnodes=n,null!=a&&u()!==a&&"function"==typeof a.focus&&a.focus();for(var l=0;l=0&&(i.splice(o,2),t(e,[],u)),null!=n&&(i.push(e,n),t(e,r(n),u))},redraw:u}}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e,n){var i=0;function o(t){return new e(t)}function a(t){return function(i,a){"string"!=typeof i?(a=i,i=i.url):null==a&&(a={});var s=new e((function(e,n){t(r(i,a.params),a,(function(t){if("function"==typeof a.type)if(Array.isArray(t))for(var n=0;n=200&&t.target.status<300||304===t.target.status||/^file:\/\//i.test(e),s=t.target.response;if("json"===l?t.target.responseType||"function"==typeof n.extract||(s=JSON.parse(t.target.responseText)):l&&"text"!==l||null==s&&(s=t.target.responseText),"function"==typeof n.extract?(s=n.extract(t.target,n),a=!0):"function"==typeof n.deserialize&&(s=n.deserialize(s)),a)r(s);else{try{o=t.target.responseText}catch(t){o=s}var u=new Error(o);u.code=t.target.status,u.response=s,i(u)}}catch(t){i(t)}},"function"==typeof n.config&&(f=n.config(f,n,e)||f)!==d&&(o=f.abort,f.abort=function(){p=!0,o.call(this)}),null==u?f.send():"function"==typeof n.serialize?f.send(n.serialize(u)):u instanceof t.FormData?f.send(u):f.send(JSON.stringify(u))})),jsonp:a((function(e,n,r,o){var a=n.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+i++,s=t.document.createElement("script");t[a]=function(e){delete t[a],s.parentNode.removeChild(s),r(e)},s.onerror=function(){delete t[a],s.parentNode.removeChild(s),o(new Error("JSONP request failed"))},s.src=e+(e.indexOf("?")<0?"?":"&")+encodeURIComponent(n.callbackKey||"callback")+"="+encodeURIComponent(a),t.document.documentElement.appendChild(s)}))}}},function(t,e,n){"use strict";var r=n(3);t.exports=n(45)(window,r)},function(t,e,n){"use strict";(function(e){var r=n(2),i=n(6),o=n(8),a=n(4),s=n(5),u=n(46),c=n(13),l={};t.exports=function(t,n){var f;function p(e,n,r){if(e=a(e,n),null!=f){f();var i=r?r.state:null,o=r?r.title:null;r&&r.replace?t.history.replaceState(i,o,b.prefix+e):t.history.pushState(i,o,b.prefix+e)}else t.location.href=b.prefix+e}var d,h,m,v,g=l,y=b.SKIP={};function b(i,a,w){if(null==i)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var x,E=0,T=Object.keys(w).map((function(t){if("/"!==t[0])throw new SyntaxError("Routes must start with a `/`");if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Route parameter names must be separated with either `/`, `.`, or `-`");return{route:t,component:w[t],check:u(t)}})),k="function"==typeof e?e:setTimeout,O=o.resolve(),S=!1;if(f=null,null!=a){var C=s(a);if(!T.some((function(t){return t.check(C)})))throw new ReferenceError("Default route doesn't match any known routes")}function _(){S=!1;var e=t.location.hash;"#"!==b.prefix[0]&&(e=t.location.search+e,"?"!==b.prefix[0]&&"/"!==(e=t.location.pathname+e)[0]&&(e="/"+e));var r=e.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(b.prefix.length),i=s(r);function o(){if(r===a)throw new Error("Could not resolve default route "+a);p(a,null,{replace:!0})}c(i.params,t.history.state),function t(e){for(;e":".","?":"/","|":"\\"},f={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p=1;p<20;++p)u[111+p]="f"+p;for(p=0;p<=9;++p)u[p+96]=p.toString();y.prototype.bind=function(t,e,n){return t=t instanceof Array?t:[t],this._bindMultiple.call(this,t,e,n),this},y.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},y.prototype.trigger=function(t,e){return this._directMap[t+":"+e]&&this._directMap[t+":"+e]({},t),this},y.prototype.reset=function(){return this._callbacks={},this._directMap={},this},y.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(function t(e,n){return null!==e&&e!==o&&(e===n||t(e.parentNode,n))}(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var n=t.composedPath()[0];n!==t.target&&(e=n)}return"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},y.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},y.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(u[e]=t[e]);s=null},y.init=function(){var t=y(o);for(var e in t)"_"!==e.charAt(0)&&(y[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},y.init(),i.Mousetrap=y,t.exports&&(t.exports=y),void 0===(r=function(){return y}.call(e,n,e,t))||(t.exports=r)}function d(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)}function h(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return u[t.which]?u[t.which]:c[t.which]?c[t.which]:String.fromCharCode(t.which).toLowerCase()}function m(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function v(t,e,n){return n||(n=function(){if(!s)for(var t in s={},u)t>95&&t<112||u.hasOwnProperty(t)&&(s[u[t]]=t);return s}()[t]?"keydown":"keypress"),"keypress"==n&&e.length&&(n="keydown"),n}function g(t,e){var n,r,i,o=[];for(n=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),i=0;i1?p(t,s,n,r):(a=g(t,r),e._callbacks[a.key]=e._callbacks[a.key]||[],c(a.key,a.modifiers,{type:a.action},i,t,o),e._callbacks[a.key][i?"unshift":"push"]({callback:n,modifiers:a.modifiers,action:a.action,seq:i,level:o,combo:t}))}e._handleKey=function(t,e,n){var r,i=c(t,e,n),o={},f=0,p=!1;for(r=0;r=0){i=1;break}var a=n&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),i))}};function s(t){return t&&"[object Function]"==={}.toString.call(t)}function u(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function l(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function c(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=u(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?t:c(l(t))}var f=n&&!(!window.MSInputMethodContext||!document.documentMode),p=n&&/MSIE 10/.test(navigator.userAgent);function d(t){return 11===t?f:10===t?p:f||p}function h(t){if(!t)return document.documentElement;for(var e=d(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===u(n,"position")?h(n):n:t?t.ownerDocument.documentElement:document.documentElement}function m(t){return null!==t.parentNode?m(t.parentNode):t}function v(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?t:e,i=n?e:t,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a,s,u=o.commonAncestorContainer;if(t!==u&&e!==u||r.contains(i))return"BODY"===(s=(a=u).nodeName)||"HTML"!==s&&h(a.firstElementChild)!==a?h(u):u;var l=m(t);return l.host?v(l.host,e):v(t,m(e).host)}function g(t){var e="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"===n||"HTML"===n){var r=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||r)[e]}return t[e]}function y(t,e){var n="x"===e?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"],10)+parseFloat(t["border"+r+"Width"],10)}function b(t,e,n,r){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],d(10)?parseInt(n["offset"+t])+parseInt(r["margin"+("Height"===t?"Top":"Left")])+parseInt(r["margin"+("Height"===t?"Bottom":"Right")]):0)}function w(t){var e=t.body,n=t.documentElement,r=d(10)&&getComputedStyle(n);return{height:b("Height",e,n,r),width:b("Width",e,n,r)}}var x=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},E=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=d(10),i="HTML"===e.nodeName,o=S(t),a=S(e),s=c(t),l=u(e),f=parseFloat(l.borderTopWidth,10),p=parseFloat(l.borderLeftWidth,10);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var h=O({top:o.top-a.top-f,left:o.left-a.left-p,width:o.width,height:o.height});if(h.marginTop=0,h.marginLeft=0,!r&&i){var m=parseFloat(l.marginTop,10),v=parseFloat(l.marginLeft,10);h.top-=f-m,h.bottom-=f-m,h.left-=p-v,h.right-=p-v,h.marginTop=m,h.marginLeft=v}return(r&&!n?e.contains(s):e===s&&"BODY"!==s.nodeName)&&(h=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=g(e,"top"),i=g(e,"left"),o=n?-1:1;return t.top+=r*o,t.bottom+=r*o,t.left+=i*o,t.right+=i*o,t}(h,e)),h}function _(t){if(!t||!t.parentElement||d())return document.documentElement;for(var e=t.parentElement;e&&"none"===u(e,"transform");)e=e.parentElement;return e||document.documentElement}function j(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?_(t):v(t,e);if("viewport"===r)o=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,r=C(t,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:g(n),s=e?0:g(n,"left");return O({top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o})}(a,i);else{var s=void 0;"scrollParent"===r?"BODY"===(s=c(l(e))).nodeName&&(s=t.ownerDocument.documentElement):s="window"===r?t.ownerDocument.documentElement:r;var f=C(s,a,i);if("HTML"!==s.nodeName||function t(e){var n=e.nodeName;if("BODY"===n||"HTML"===n)return!1;if("fixed"===u(e,"position"))return!0;var r=l(e);return!!r&&t(r)}(a))o=f;else{var p=w(t.ownerDocument),d=p.height,h=p.width;o.top+=f.top-f.marginTop,o.bottom=d+f.top,o.left+=f.left-f.marginLeft,o.right=h+f.left}}var m="number"==typeof(n=n||0);return o.left+=m?n:n.left||0,o.top+=m?n:n.top||0,o.right-=m?n:n.right||0,o.bottom-=m?n:n.bottom||0,o}function N(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=j(n,r,o,i),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},u=Object.keys(s).map((function(t){return k({key:t},s[t],{area:(e=s[t],e.width*e.height)});var e})).sort((function(t,e){return e.area-t.area})),l=u.filter((function(t){var e=t.width,r=t.height;return e>=n.clientWidth&&r>=n.clientHeight})),c=l.length>0?l[0].key:u[0].key,f=t.split("-")[1];return c+(f?"-"+f:"")}function L(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return C(n,r?_(e):v(e,n),r)}function M(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),r=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+r,height:t.offsetHeight+n}}function $(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function A(t,e,n){n=n.split("-")[0];var r=M(t),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",u=o?"height":"width",l=o?"width":"height";return i[a]=e[a]+e[u]/2-r[u]/2,i[s]=n===s?e[s]-r[l]:e[$(s)],i}function P(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function D(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===n}));var r=P(t,(function(t){return t[e]===n}));return t.indexOf(r)}(t,"name",n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&s(n)&&(e.offsets.popper=O(e.offsets.popper),e.offsets.reference=O(e.offsets.reference),e=n(e,t))})),e}function I(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=L(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=N(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=A(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=D(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function z(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function F(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=J.indexOf(t),r=J.slice(n+1).concat(J.slice(0,n));return e?r.reverse():r}var Q={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function G(t,e,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=t.split(/(\+|\-)/).map((function(t){return t.trim()})),s=a.indexOf(P(a,(function(t){return-1!==t.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,l=-1!==s?[a.slice(0,s).concat([a[s].split(u)[0]]),[a[s].split(u)[1]].concat(a.slice(s+1))]:[a];return(l=l.map((function(t,r){var i=(1===r?!o:o)?"height":"width",a=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,r){var i=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return t;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return O(s)[e]/100*o}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o}return o}(t,i,e,n)}))}))).forEach((function(t,e){t.forEach((function(n,r){W(n)&&(i[e]+=n*("-"===t[r-1]?-1:1))}))})),i}var tt={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],r=e.split("-")[1];if(r){var i=t.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),u=s?"left":"top",l=s?"width":"height",c={start:T({},u,o[u]),end:T({},u,o[u]+o[l]-a[l])};t.offsets.popper=k({},a,c[r])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,r=t.placement,i=t.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],u=void 0;return u=W(+n)?[+n,0]:G(n,o,a,s),"left"===s?(o.top+=u[0],o.left-=u[1]):"right"===s?(o.top+=u[0],o.left+=u[1]):"top"===s?(o.left+=u[0],o.top-=u[1]):"bottom"===s&&(o.left+=u[0],o.top+=u[1]),t.popper=o,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||h(t.instance.popper);t.instance.reference===n&&(n=h(n));var r=F("transform"),i=t.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var u=j(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);i.top=o,i.left=a,i[r]=s,e.boundaries=u;var l=e.priority,c=t.offsets.popper,f={primary:function(t){var n=c[t];return c[t]u[t]&&!e.escapeWithReference&&(r=Math.min(c[n],u[t]-("right"===t?c.width:c.height))),T({},n,r)}};return l.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";c=k({},c,f[e](t))})),t.offsets.popper=c,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,r=e.reference,i=t.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",u=a?"left":"top",l=a?"width":"height";return n[s]o(r[s])&&(t.offsets.popper[u]=o(r[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!Z(t.instance.modifiers,"arrow","keepTogether"))return t;var r=e.element;if("string"==typeof r){if(!(r=t.instance.popper.querySelector(r)))return t}else if(!t.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var i=t.placement.split("-")[0],o=t.offsets,a=o.popper,s=o.reference,l=-1!==["left","right"].indexOf(i),c=l?"height":"width",f=l?"Top":"Left",p=f.toLowerCase(),d=l?"left":"top",h=l?"bottom":"right",m=M(r)[c];s[h]-ma[h]&&(t.offsets.popper[p]+=s[p]+m-a[h]),t.offsets.popper=O(t.offsets.popper);var v=s[p]+s[c]/2-m/2,g=u(t.instance.popper),y=parseFloat(g["margin"+f],10),b=parseFloat(g["border"+f+"Width"],10),w=v-t.offsets.popper[p]-y-b;return w=Math.max(Math.min(a[c]-m,w),0),t.arrowElement=r,t.offsets.arrow=(T(n={},p,Math.round(w)),T(n,d,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(z(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=j(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),r=t.placement.split("-")[0],i=$(r),o=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case Q.FLIP:a=[r,i];break;case Q.CLOCKWISE:a=X(r);break;case Q.COUNTERCLOCKWISE:a=X(r,!0);break;default:a=e.behavior}return a.forEach((function(s,u){if(r!==s||a.length===u+1)return t;r=t.placement.split("-")[0],i=$(r);var l=t.offsets.popper,c=t.offsets.reference,f=Math.floor,p="left"===r&&f(l.right)>f(c.left)||"right"===r&&f(l.left)f(c.top)||"bottom"===r&&f(l.top)f(n.right),m=f(l.top)f(n.bottom),g="left"===r&&d||"right"===r&&h||"top"===r&&m||"bottom"===r&&v,y=-1!==["top","bottom"].indexOf(r),b=!!e.flipVariations&&(y&&"start"===o&&d||y&&"end"===o&&h||!y&&"start"===o&&m||!y&&"end"===o&&v),w=!!e.flipVariationsByContent&&(y&&"start"===o&&h||y&&"end"===o&&d||!y&&"start"===o&&v||!y&&"end"===o&&m),x=b||w;(p||g||x)&&(t.flipped=!0,(p||g)&&(r=a[u+1]),x&&(o=function(t){return"end"===t?"start":"start"===t?"end":t}(o)),t.placement=r+(o?"-"+o:""),t.offsets.popper=k({},t.offsets.popper,A(t.instance.popper,t.offsets.reference,t.placement)),t=D(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],r=t.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),t.placement=$(e),t.offsets.popper=O(i),t}},hide:{order:800,enabled:!0,fn:function(t){if(!Z(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=P(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottomn.right||e.top>n.bottom||e.right2&&void 0!==arguments[2]?arguments[2]:{};x(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=a(this.update.bind(this)),this.options=k({},t.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(k({},t.Defaults.modifiers,i.modifiers)).forEach((function(e){r.options.modifiers[e]=k({},t.Defaults.modifiers[e]||{},i.modifiers?i.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return k({name:t},r.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&s(t.onLoad)&&t.onLoad(r.reference,r.popper,r.options,t,r.state)})),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return E(t,[{key:"update",value:function(){return I.call(this)}},{key:"destroy",value:function(){return H.call(this)}},{key:"enableEventListeners",value:function(){return Y.call(this)}},{key:"disableEventListeners",value:function(){return B.call(this)}}]),t}();et.Utils=("undefined"!=typeof window?window:t).PopperUtils,et.placements=K,et.Defaults=tt,e.a=et}).call(this,n(1))},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){var r=e.prototype;n.en.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"};var i=function(t,e,r,i){for(var o,a,s=r.$locale().relativeTime,u=[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],l=u.length,c=0;c0&&(f=u[c-1]),a=s[f.l].replace("%d",p);break}}return e?a:(o>0?s.future:s.past).replace("%s",a)};r.to=function(t,e){return i(t,e,this,!0)},r.from=function(t,e){return i(t,e,this)};var o=function(t){return t.$u?n.utc():n()};r.toNow=function(t){return this.to(o(this),t)},r.fromNow=function(t){return this.from(o(this),t)}}}()},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){var r=e.prototype,i=r.format,o={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};n.en.formats=o,r.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var e=this.$locale().formats,n=void 0===e?{}:e,r=t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,e,r){var i=r&&r.toUpperCase();return e||n[r]||o[r]||n[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}));return i.call(this,r)}}}()},function(t,e,n){"use strict";t.exports=n(62)},,,,,,,function(t,e,n){(function(e){t.exports=e.jQuery=n(29)}).call(this,n(1))},function(t,e,n){var r;(function(){var i;i=this,void 0===(r=function(){return function(t){var e=function(){var e,n,r,i,o,a,s=[],u=s.concat,l=s.filter,c=s.slice,f=t.document,p={},d={},h={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},m=/^\s*<(\w+|!)[^>]*>/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,g=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,y=/^(?:body|html)$/i,b=/([A-Z])/g,w=["val","css","html","text","data","width","height","offset"],x=f.createElement("table"),E=f.createElement("tr"),T={tr:f.createElement("tbody"),tbody:x,thead:x,tfoot:x,td:E,th:E,"*":f.createElement("div")},k=/complete|loaded|interactive/,O=/^[\w-]*$/,S={},C=S.toString,_={},j=f.createElement("div"),N={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},L=Array.isArray||function(t){return t instanceof Array};function M(t){return null==t?String(t):S[C.call(t)]||"object"}function $(t){return"function"==M(t)}function A(t){return null!=t&&t==t.window}function P(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function D(t){return"object"==M(t)}function I(t){return D(t)&&!A(t)&&Object.getPrototypeOf(t)==Object.prototype}function z(t){var e=!!t&&"length"in t&&t.length,n=r.type(t);return"function"!=n&&!A(t)&&("array"==n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function F(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function H(t){return t in d?d[t]:d[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function R(t,e){return"number"!=typeof e||h[F(t)]?e:e+"px"}function q(t){return"children"in t?c.call(t.children):r.map(t.childNodes,(function(t){if(1==t.nodeType)return t}))}function Y(t,e){var n,r=t?t.length:0;for(n=0;n")),n===e&&(n=m.test(t)&&RegExp.$1),n in T||(n="*"),(s=T[n]).innerHTML=""+t,o=r.each(c.call(s.childNodes),(function(){s.removeChild(this)}))),I(i)&&(a=r(o),r.each(i,(function(t,e){w.indexOf(t)>-1?a[t](e):a.attr(t,e)}))),o},_.Z=function(t,e){return new Y(t,e)},_.isZ=function(t){return t instanceof _.Z},_.init=function(t,n){var i,o;if(!t)return _.Z();if("string"==typeof t)if("<"==(t=t.trim())[0]&&m.test(t))i=_.fragment(t,RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);i=_.qsa(f,t)}else{if($(t))return r(f).ready(t);if(_.isZ(t))return t;if(L(t))o=t,i=l.call(o,(function(t){return null!=t}));else if(D(t))i=[t],t=null;else if(m.test(t))i=_.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);i=_.qsa(f,t)}}return _.Z(i,t)},(r=function(t,e){return _.init(t,e)}).extend=function(t){var e,n=c.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach((function(n){B(t,n,e)})),t},_.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,a=O.test(o);return t.getElementById&&a&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:c.call(a&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},r.contains=f.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},r.type=M,r.isFunction=$,r.isWindow=A,r.isArray=L,r.isPlainObject=I,r.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},r.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},r.inArray=function(t,e,n){return s.indexOf.call(e,t,n)},r.camelCase=o,r.trim=function(t){return null==t?"":String.prototype.trim.call(t)},r.uuid=0,r.support={},r.expr={},r.noop=function(){},r.map=function(t,e){var n,i,o,a,s=[];if(z(t))for(i=0;i0?r.fn.concat.apply([],a):a},r.each=function(t,e){var n,r;if(z(t)){for(n=0;n=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each((function(){null!=this.parentNode&&this.parentNode.removeChild(this)}))},each:function(t){return s.every.call(this,(function(e,n){return!1!==t.call(e,n,e)})),this},filter:function(t){return $(t)?this.not(this.not(t)):r(l.call(this,(function(e){return _.matches(e,t)})))},add:function(t,e){return r(a(this.concat(r(t,e))))},is:function(t){return this.length>0&&_.matches(this[0],t)},not:function(t){var n=[];if($(t)&&t.call!==e)this.each((function(e){t.call(this,e)||n.push(this)}));else{var i="string"==typeof t?this.filter(t):z(t)&&$(t.item)?c.call(t):r(t);this.forEach((function(t){i.indexOf(t)<0&&n.push(t)}))}return r(n)},has:function(t){return this.filter((function(){return D(t)?r.contains(this,t):r(this).find(t).size()}))},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!D(t)?t:r(t)},last:function(){var t=this[this.length-1];return t&&!D(t)?t:r(t)},find:function(t){var e=this;return t?"object"==typeof t?r(t).filter((function(){var t=this;return s.some.call(e,(function(e){return r.contains(e,t)}))})):1==this.length?r(_.qsa(this[0],t)):this.map((function(){return _.qsa(this,t)})):r()},closest:function(t,e){var n=[],i="object"==typeof t&&r(t);return this.each((function(r,o){for(;o&&!(i?i.indexOf(o)>=0:_.matches(o,t));)o=o!==e&&!P(o)&&o.parentNode;o&&n.indexOf(o)<0&&n.push(o)})),r(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=r.map(n,(function(t){if((t=t.parentNode)&&!P(t)&&e.indexOf(t)<0)return e.push(t),t}));return W(e,t)},parent:function(t){return W(a(this.pluck("parentNode")),t)},children:function(t){return W(this.map((function(){return q(this)})),t)},contents:function(){return this.map((function(){return this.contentDocument||c.call(this.childNodes)}))},siblings:function(t){return W(this.map((function(t,e){return l.call(q(e.parentNode),(function(t){return t!==e}))})),t)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(t){return r.map(this,(function(e){return e[t]}))},show:function(){return this.each((function(){var t,e,n;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(t=this.nodeName,p[t]||(e=f.createElement(t),f.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),p[t]=n),p[t]))}))},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=$(t);if(this[0]&&!e)var n=r(t).get(0),i=n.parentNode||this.length>1;return this.each((function(o){r(this).wrapAll(e?t.call(this,o):i?n.cloneNode(!0):n)}))},wrapAll:function(t){if(this[0]){var e;for(r(this[0]).before(t=r(t));(e=t.children()).length;)t=e.first();r(t).append(this)}return this},wrapInner:function(t){var e=$(t);return this.each((function(n){var i=r(this),o=i.contents(),a=e?t.call(this,n):t;o.length?o.wrapAll(a):i.append(a)}))},unwrap:function(){return this.parent().each((function(){r(this).replaceWith(r(this).children())})),this},clone:function(){return this.map((function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(t){return this.each((function(){var n=r(this);(t===e?"none"==n.css("display"):t)?n.show():n.hide()}))},prev:function(t){return r(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return r(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each((function(e){var n=this.innerHTML;r(this).empty().append(U(this,t,e,n))})):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each((function(e){var n=U(this,t,e,this.textContent);this.textContent=null==n?"":""+n})):0 in this?this.pluck("textContent").join(""):null},attr:function(t,r){var i;return"string"!=typeof t||1 in arguments?this.each((function(e){if(1===this.nodeType)if(D(t))for(n in t)V(this,n,t[n]);else V(this,t,U(this,r,e,this.getAttribute(t)))})):0 in this&&1==this[0].nodeType&&null!=(i=this[0].getAttribute(t))?i:e},removeAttr:function(t){return this.each((function(){1===this.nodeType&&t.split(" ").forEach((function(t){V(this,t)}),this)}))},prop:function(t,e){return t=N[t]||t,1 in arguments?this.each((function(n){this[t]=U(this,e,n,this[t])})):this[0]&&this[0][t]},removeProp:function(t){return t=N[t]||t,this.each((function(){delete this[t]}))},data:function(t,n){var r="data-"+t.replace(b,"-$1").toLowerCase(),i=1 in arguments?this.attr(r,n):this.attr(r);return null!==i?K(i):e},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each((function(e){this.value=U(this,t,e,this.value)}))):this[0]&&(this[0].multiple?r(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each((function(t){var n=r(this),i=U(this,e,t,n.offset()),o=n.offsetParent().offset(),a={top:i.top-o.top,left:i.left-o.left};"static"==n.css("position")&&(a.position="relative"),n.css(a)}));if(!this.length)return null;if(f.documentElement!==this[0]&&!r.contains(f.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+t.pageXOffset,top:n.top+t.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(t,e){if(arguments.length<2){var i=this[0];if("string"==typeof t){if(!i)return;return i.style[o(t)]||getComputedStyle(i,"").getPropertyValue(t)}if(L(t)){if(!i)return;var a={},s=getComputedStyle(i,"");return r.each(t,(function(t,e){a[e]=i.style[o(e)]||s.getPropertyValue(e)})),a}}var u="";if("string"==M(t))e||0===e?u=F(t)+":"+R(t,e):this.each((function(){this.style.removeProperty(F(t))}));else for(n in t)t[n]||0===t[n]?u+=F(n)+":"+R(n,t[n])+";":this.each((function(){this.style.removeProperty(F(n))}));return this.each((function(){this.style.cssText+=";"+u}))},index:function(t){return t?this.indexOf(r(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&s.some.call(this,(function(t){return this.test(Z(t))}),H(t))},addClass:function(t){return t?this.each((function(e){if("className"in this){i=[];var n=Z(this);U(this,t,e,n).split(/\s+/g).forEach((function(t){r(this).hasClass(t)||i.push(t)}),this),i.length&&Z(this,n+(n?" ":"")+i.join(" "))}})):this},removeClass:function(t){return this.each((function(n){if("className"in this){if(t===e)return Z(this,"");i=Z(this),U(this,t,n,i).split(/\s+/g).forEach((function(t){i=i.replace(H(t)," ")})),Z(this,i.trim())}}))},toggleClass:function(t,n){return t?this.each((function(i){var o=r(this);U(this,t,i,Z(this)).split(/\s+/g).forEach((function(t){(n===e?!o.hasClass(t):n)?o.addClass(t):o.removeClass(t)}))})):this},scrollTop:function(t){if(this.length){var n="scrollTop"in this[0];return t===e?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var n="scrollLeft"in this[0];return t===e?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),i=y.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(r(t).css("margin-top"))||0,n.left-=parseFloat(r(t).css("margin-left"))||0,i.top+=parseFloat(r(e[0]).css("border-top-width"))||0,i.left+=parseFloat(r(e[0]).css("border-left-width"))||0,{top:n.top-i.top,left:n.left-i.left}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent||f.body;t&&!y.test(t.nodeName)&&"static"==r(t).css("position");)t=t.offsetParent;return t}))}},r.fn.detach=r.fn.remove,["width","height"].forEach((function(t){var n=t.replace(/./,(function(t){return t[0].toUpperCase()}));r.fn[t]=function(i){var o,a=this[0];return i===e?A(a)?a["inner"+n]:P(a)?a.documentElement["scroll"+n]:(o=this.offset())&&o[t]:this.each((function(e){(a=r(this)).css(t,U(this,i,e,a[t]()))}))}})),["after","prepend","before","append"].forEach((function(n,i){var o=i%2;r.fn[n]=function(){var n,a,s=r.map(arguments,(function(t){var i=[];return"array"==(n=M(t))?(t.forEach((function(t){return t.nodeType!==e?i.push(t):r.zepto.isZ(t)?i=i.concat(t.get()):void(i=i.concat(_.fragment(t)))})),i):"object"==n||null==t?t:_.fragment(t)})),u=this.length>1;return s.length<1?this:this.each((function(e,n){a=o?n:n.parentNode,n=0==i?n.nextSibling:1==i?n.firstChild:2==i?n:null;var l=r.contains(f.documentElement,a);s.forEach((function(e){if(u)e=e.cloneNode(!0);else if(!a)return r(e).remove();a.insertBefore(e,n),l&&J(e,(function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}}))}))}))},r.fn[o?n+"To":"insert"+(i?"Before":"After")]=function(t){return r(t)[n](this),this}})),_.Z.prototype=Y.prototype=r.fn,_.uniq=a,_.deserializeValue=K,r.zepto=_,r}();return t.Zepto=e,void 0===t.$&&(t.$=e),function(e){var n,r=1,i=Array.prototype.slice,o=e.isFunction,a=function(t){return"string"==typeof t},s={},u={},l="onfocusin"in t,c={focus:"focusin",blur:"focusout"},f={mouseenter:"mouseover",mouseleave:"mouseout"};function p(t){return t._zid||(t._zid=r++)}function d(t,e,n,r){if((e=h(e)).ns)var i=(o=e.ns,new RegExp("(?:^| )"+o.replace(" "," .* ?")+"(?: |$)"));var o;return(s[p(t)]||[]).filter((function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||i.test(t.ns))&&(!n||p(t.fn)===p(n))&&(!r||t.sel==r)}))}function h(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function m(t,e){return t.del&&!l&&t.e in c||!!e}function v(t){return f[t]||l&&c[t]||t}function g(t,r,i,o,a,u,l){var c=p(t),d=s[c]||(s[c]=[]);r.split(/\s/).forEach((function(r){if("ready"==r)return e(document).ready(i);var s=h(r);s.fn=i,s.sel=a,s.e in f&&(i=function(t){var n=t.relatedTarget;if(!n||n!==this&&!e.contains(this,n))return s.fn.apply(this,arguments)}),s.del=u;var c=u||i;s.proxy=function(e){if(!(e=T(e)).isImmediatePropagationStopped()){e.data=o;var r=c.apply(t,e._args==n?[e]:[e].concat(e._args));return!1===r&&(e.preventDefault(),e.stopPropagation()),r}},s.i=d.length,d.push(s),"addEventListener"in t&&t.addEventListener(v(s.e),s.proxy,m(s,l))}))}function y(t,e,n,r,i){var o=p(t);(e||"").split(/\s/).forEach((function(e){d(t,e,n,r).forEach((function(e){delete s[o][e.i],"removeEventListener"in t&&t.removeEventListener(v(e.e),e.proxy,m(e,i))}))}))}u.click=u.mousedown=u.mouseup=u.mousemove="MouseEvents",e.event={add:g,remove:y},e.proxy=function(t,n){var r=2 in arguments&&i.call(arguments,2);if(o(t)){var s=function(){return t.apply(n,r?r.concat(i.call(arguments)):arguments)};return s._zid=p(t),s}if(a(n))return r?(r.unshift(t[n],t),e.proxy.apply(null,r)):e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var b=function(){return!0},w=function(){return!1},x=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,E={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};function T(t,r){return!r&&t.isDefaultPrevented||(r||(r=t),e.each(E,(function(e,n){var i=r[e];t[e]=function(){return this[n]=b,i&&i.apply(r,arguments)},t[n]=w})),t.timeStamp||(t.timeStamp=Date.now()),(r.defaultPrevented!==n?r.defaultPrevented:"returnValue"in r?!1===r.returnValue:r.getPreventDefault&&r.getPreventDefault())&&(t.isDefaultPrevented=b)),t}function k(t){var e,r={originalEvent:t};for(e in t)x.test(e)||t[e]===n||(r[e]=t[e]);return T(r,t)}e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,r,s,u,l){var c,f,p=this;return t&&!a(t)?(e.each(t,(function(t,e){p.on(t,r,s,e,l)})),p):(a(r)||o(u)||!1===u||(u=s,s=r,r=n),u!==n&&!1!==s||(u=s,s=n),!1===u&&(u=w),p.each((function(n,o){l&&(c=function(t){return y(o,t.type,u),u.apply(this,arguments)}),r&&(f=function(t){var n,a=e(t.target).closest(r,o).get(0);if(a&&a!==o)return n=e.extend(k(t),{currentTarget:a,liveFired:o}),(c||u).apply(a,[n].concat(i.call(arguments,1)))}),g(o,t,u,s,r,f||c)})))},e.fn.off=function(t,r,i){var s=this;return t&&!a(t)?(e.each(t,(function(t,e){s.off(t,r,e)})),s):(a(r)||o(i)||!1===i||(i=r,r=n),!1===i&&(i=w),s.each((function(){y(this,t,i,r)})))},e.fn.trigger=function(t,n){return(t=a(t)||e.isPlainObject(t)?e.Event(t):T(t))._args=n,this.each((function(){t.type in c&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)}))},e.fn.triggerHandler=function(t,n){var r,i;return this.each((function(o,s){(r=k(a(t)?e.Event(t):t))._args=n,r.target=s,e.each(d(s,t.type||t),(function(t,e){if(i=e.proxy(r),r.isImmediatePropagationStopped())return!1}))})),i},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach((function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}})),e.Event=function(t,e){a(t)||(t=(e=t).type);var n=document.createEvent(u[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),T(n)}}(e),function(e){var n,r,i=+new Date,o=t.document,a=/)<[^<]*)*<\/script>/gi,s=/^(?:text|application)\/javascript/i,u=/^(?:text|application)\/xml/i,l="application/json",c="text/html",f=/^\s*$/,p=o.createElement("a");function d(t,n,r,i){if(t.global)return function(t,n,r){var i=e.Event(n);return e(t).trigger(i,r),!i.isDefaultPrevented()}(n||o,r,i)}function h(t,e){var n=e.context;if(!1===e.beforeSend.call(n,t,e)||!1===d(e,n,"ajaxBeforeSend",[t,e]))return!1;d(e,n,"ajaxSend",[t,e])}function m(t,e,n,r){var i=n.context;n.success.call(i,t,"success",e),r&&r.resolveWith(i,[t,"success",e]),d(n,i,"ajaxSuccess",[e,n,t]),g("success",e,n)}function v(t,e,n,r,i){var o=r.context;r.error.call(o,n,e,t),i&&i.rejectWith(o,[n,e,t]),d(r,o,"ajaxError",[n,r,t||e]),g(e,n,r)}function g(t,n,r){var i=r.context;r.complete.call(i,n,t),d(r,i,"ajaxComplete",[n,r]),function(t){t.global&&!--e.active&&d(t,null,"ajaxStop")}(r)}function y(){}function b(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function w(t,n,r,i){return e.isFunction(n)&&(i=r,r=n,n=void 0),e.isFunction(r)||(i=r,r=void 0),{url:t,data:n,success:r,dataType:i}}p.href=t.location.href,e.active=0,e.ajaxJSONP=function(n,r){if(!("type"in n))return e.ajax(n);var a,s,u=n.jsonpCallback,l=(e.isFunction(u)?u():u)||"Zepto"+i++,c=o.createElement("script"),f=t[l],p=function(t){e(c).triggerHandler("error",t||"abort")},d={abort:p};return r&&r.promise(d),e(c).on("load error",(function(i,o){clearTimeout(s),e(c).off().remove(),"error"!=i.type&&a?m(a[0],d,n,r):v(null,o||"error",d,n,r),t[l]=f,a&&e.isFunction(f)&&f(a[0]),f=a=void 0})),!1===h(d,n)?(p("abort"),d):(t[l]=function(){a=arguments},c.src=n.url.replace(/\?(.+)=\?/,"?$1="+l),o.head.appendChild(c),n.timeout>0&&(s=setTimeout((function(){p("timeout")}),n.timeout)),d)},e.ajaxSettings={type:"GET",beforeSend:y,success:y,error:y,complete:y,context:null,global:!0,xhr:function(){return new t.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:l,xml:"application/xml, text/xml",html:c,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:y},e.ajax=function(i){var a,g,w=e.extend({},i||{}),x=e.Deferred&&e.Deferred();for(n in e.ajaxSettings)void 0===w[n]&&(w[n]=e.ajaxSettings[n]);!function(t){t.global&&0==e.active++&&d(t,null,"ajaxStart")}(w),w.crossDomain||((a=o.createElement("a")).href=w.url,a.href=a.href,w.crossDomain=p.protocol+"//"+p.host!=a.protocol+"//"+a.host),w.url||(w.url=t.location.toString()),(g=w.url.indexOf("#"))>-1&&(w.url=w.url.slice(0,g)),function(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=b(t.url,t.data),t.data=void 0)}(w);var E=w.dataType,T=/\?.+=\?/.test(w.url);if(T&&(E="jsonp"),!1!==w.cache&&(i&&!0===i.cache||"script"!=E&&"jsonp"!=E)||(w.url=b(w.url,"_="+Date.now())),"jsonp"==E)return T||(w.url=b(w.url,w.jsonp?w.jsonp+"=?":!1===w.jsonp?"":"callback=?")),e.ajaxJSONP(w,x);var k,O=w.accepts[E],S={},C=function(t,e){S[t.toLowerCase()]=[t,e]},_=/^([\w-]+:)\/\//.test(w.url)?RegExp.$1:t.location.protocol,j=w.xhr(),N=j.setRequestHeader;if(x&&x.promise(j),w.crossDomain||C("X-Requested-With","XMLHttpRequest"),C("Accept",O||"*/*"),(O=w.mimeType||O)&&(O.indexOf(",")>-1&&(O=O.split(",",2)[0]),j.overrideMimeType&&j.overrideMimeType(O)),(w.contentType||!1!==w.contentType&&w.data&&"GET"!=w.type.toUpperCase())&&C("Content-Type",w.contentType||"application/x-www-form-urlencoded"),w.headers)for(r in w.headers)C(r,w.headers[r]);if(j.setRequestHeader=C,j.onreadystatechange=function(){if(4==j.readyState){j.onreadystatechange=y,clearTimeout(k);var t,n=!1;if(j.status>=200&&j.status<300||304==j.status||0==j.status&&"file:"==_){if(E=E||function(t){return t&&(t=t.split(";",2)[0]),t&&(t==c?"html":t==l?"json":s.test(t)?"script":u.test(t)&&"xml")||"text"}(w.mimeType||j.getResponseHeader("content-type")),"arraybuffer"==j.responseType||"blob"==j.responseType)t=j.response;else{t=j.responseText;try{t=function(t,e,n){if(n.dataFilter==y)return t;var r=n.context;return n.dataFilter.call(r,t,e)}(t,E,w),"script"==E?(0,eval)(t):"xml"==E?t=j.responseXML:"json"==E&&(t=f.test(t)?null:e.parseJSON(t))}catch(t){n=t}if(n)return v(n,"parsererror",j,w,x)}m(t,j,w,x)}else v(j.statusText||null,j.status?"error":"abort",j,w,x)}},!1===h(j,w))return j.abort(),v(null,"abort",j,w,x),j;var L=!("async"in w)||w.async;if(j.open(w.type,w.url,L,w.username,w.password),w.xhrFields)for(r in w.xhrFields)j[r]=w.xhrFields[r];for(r in S)N.apply(j,S[r]);return w.timeout>0&&(k=setTimeout((function(){j.onreadystatechange=y,j.abort(),v(null,"timeout",j,w,x)}),w.timeout)),j.send(w.data?w.data:null),j},e.get=function(){return e.ajax(w.apply(null,arguments))},e.post=function(){var t=w.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=w.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,n,r){if(!this.length)return this;var i,o=this,s=t.split(/\s/),u=w(t,n,r),l=u.success;return s.length>1&&(u.url=s[0],i=s[1]),u.success=function(t){o.html(i?e("
").html(t.replace(a,"")).find(i):t),l&&l.apply(o,arguments)},e.ajax(u),this};var x=encodeURIComponent;e.param=function(t,n){var r=[];return r.add=function(t,n){e.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(x(t)+"="+x(n))},function t(n,r,i,o){var a,s=e.isArray(r),u=e.isPlainObject(r);e.each(r,(function(r,l){a=e.type(l),o&&(r=i?o:o+"["+(u||"object"==a||"array"==a?r:"")+"]"),!o&&s?n.add(l.name,l.value):"array"==a||!i&&"object"==a?t(n,l,i,r):n.add(r,l)}))}(r,t,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[];return this[0]&&t.each(this[0].elements,(function(i,o){n=o.type,(e=o.name)&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&function t(n){if(n.forEach)return n.forEach(t);r.push({name:e,value:n})}(t(o).val())})),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach((function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))})),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(n){var e=getComputedStyle;t.getComputedStyle=function(t,n){try{return e(t,n)}catch(t){return null}}}}(),e}(i)}.call(e,n,e,t))||(t.exports=r)}).call(window)},function(t,e,n){(function(e){t.exports=e.moment=n(31)}).call(this,n(1))},function(t,e,n){(function(e){t.exports=e.dayjs=n(32)}).call(this,n(1))},function(t,e,n){t.exports=function(){"use strict";var t="millisecond",e="second",n="minute",r="hour",i="day",o="week",a="month",s="quarter",u="year",l=/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,c=/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},p={s:f,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+f(r,2,"0")+":"+f(i,2,"0")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,a),i=e-r<0,o=t.clone().add(n+(i?-1:1),a);return Number(-(n+(e-r)/(i?r-o:o-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(l){return{M:a,y:u,w:o,d:i,h:r,m:n,s:e,ms:t,Q:s}[l]||String(l||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},d={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},h="en",m={};m[h]=d;var v=function(t){return t instanceof w},g=function(t,e,n){var r;if(!t)return h;if("string"==typeof t)m[t]&&(r=t),e&&(m[t]=e,r=t);else{var i=t.name;m[i]=t,r=i}return n||(h=r),r},y=function(t,e,n){if(v(t))return t.clone();var r=e?"string"==typeof e?{format:e,pl:n}:e:{};return r.date=t,new w(r)},b=p;b.l=g,b.i=v,b.w=function(t,e){return y(t,{locale:e.$L,utc:e.$u})};var w=function(){function f(t){this.$L=this.$L||g(t.locale,null,!0),this.parse(t)}var p=f.prototype;return p.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r)return n?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(e)}(t),this.init()},p.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},p.$utils=function(){return b},p.isValid=function(){return!("Invalid Date"===this.$d.toString())},p.isSame=function(t,e){var n=y(t);return this.startOf(e)<=n&&n<=this.endOf(e)},p.isAfter=function(t,e){return y(t)1)for(var n=1;n'+e.children+"",a=a.firstChild):a.innerHTML=e.children,e.dom=a.firstChild,e.domSize=a.childNodes.length,e.instance=[];for(var s,u=n.createDocumentFragment();s=a.firstChild;)e.instance.push(s),u.appendChild(s);b(t,u,i)}function d(t,e,n,r,i,o){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)l(t,n,0,n.length,r,i,o);else if(null==n||0===n.length)x(t,e,0,e.length);else{var a=null!=e[0]&&null!=e[0].key,s=null!=n[0]&&null!=n[0].key,u=0,f=0;if(!a)for(;f=f&&O>=u&&(b=e[k],w=n[O],b.key===w.key);)b!==w&&h(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),k--,O--;for(;k>=f&&O>=u&&(p=e[f],d=n[u],p.key===d.key);)f++,u++,p!==d&&h(t,p,d,r,g(e,f,i),o);for(;k>=f&&O>=u&&u!==O&&p.key===w.key&&b.key===d.key;)y(t,b,T=g(e,f,i)),b!==d&&h(t,b,d,r,T,o),++u<=--O&&y(t,p,i),p!==w&&h(t,p,w,r,i,o),null!=w.dom&&(i=w.dom),f++,b=e[--k],w=n[O],p=e[f],d=n[u];for(;k>=f&&O>=u&&b.key===w.key;)b!==w&&h(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),O--,b=e[--k],w=n[O];if(u>O)x(t,e,f,k+1);else if(f>k)l(t,n,u,O+1,r,i,o);else{var S,C,_=i,j=O-u+1,N=new Array(j),L=0,M=0,$=2147483647,A=0;for(M=0;M=u;M--){null==S&&(S=m(e,f,k+1));var P=S[(w=n[M]).key];null!=P&&($=P<$?P:-1,N[M-u]=P,b=e[P],e[P]=null,b!==w&&h(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),A++)}if(i=_,A!==k-f+1&&x(t,e,f,k+1),0===A)l(t,n,u,O+1,r,i,o);else if(-1===$)for(L=(C=function(t){var e=[0],n=0,r=0,i=0,o=v.length=t.length;for(i=0;i>>1)+(r>>>1)+(n&r&1);t[e[s]]0&&(v[i]=e[n-1]),e[n]=i)}}n=e.length,r=e[n-1];for(;n-- >0;)e[n]=r,r=v[r];return v.length=0,e}(N)).length-1,M=O;M>=u;M--)d=n[M],-1===N[M-u]?c(t,d,r,o,i):C[L]===M-u?L--:y(t,d,i),null!=d.dom&&(i=n[M].dom);else for(M=O;M>=u;M--)d=n[M],-1===N[M-u]&&c(t,d,r,o,i),null!=d.dom&&(i=n[M].dom)}}else{var D=e.lengthD&&x(t,e,u,e.length),n.length>D&&l(t,n,u,n.length,r,i,o)}}}function h(t,e,n,i,a,u){var l=e.tag;if(l===n.tag){if(n.state=e.state,n.events=e.events,function(t,e){do{var n;if(null!=t.attrs&&"function"==typeof t.attrs.onbeforeupdate)if(void 0!==(n=s.call(t.attrs.onbeforeupdate,t,e))&&!n)break;if("string"!=typeof t.tag&&"function"==typeof t.state.onbeforeupdate)if(void 0!==(n=s.call(t.state.onbeforeupdate,t,e))&&!n)break;return!1}while(0);return t.dom=e.dom,t.domSize=e.domSize,t.instance=e.instance,t.attrs=e.attrs,t.children=e.children,t.text=e.text,!0}(n,e))return;if("string"==typeof l)switch(null!=n.attrs&&I(n.attrs,n,i),l){case"#":!function(t,e){t.children.toString()!==e.children.toString()&&(t.dom.nodeValue=e.children);e.dom=t.dom}(e,n);break;case"<":!function(t,e,n,r,i){e.children!==n.children?(T(t,e),p(t,n,r,i)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,u,a);break;case"[":!function(t,e,n,r,i,o){d(t,e.children,n.children,r,i,o);var a=0,s=n.children;if(n.dom=null,null!=s){for(var u=0;u-1||null!=t.attrs&&t.attrs.is||"href"!==e&&"list"!==e&&"form"!==e&&"width"!==e&&"height"!==e)&&e in t.dom}var N=/[A-Z]/g;function L(t){return"-"+t.toLowerCase()}function M(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(N,L)}function $(t,e,n){if(e===n);else if(null==n)t.style.cssText="";else if("object"!=typeof n)t.style.cssText=n;else if(null==e||"object"!=typeof e)for(var r in t.style.cssText="",n){null!=(i=n[r])&&t.style.setProperty(M(r),String(i))}else{for(var r in n){var i;null!=(i=n[r])&&(i=String(i))!==String(e[r])&&t.style.setProperty(M(r),i)}for(var r in e)null!=e[r]&&null==n[r]&&t.style.removeProperty(M(r))}}function A(){this._=e}function P(t,e,n){if(null!=t.events){if(t.events[e]===n)return;null==n||"function"!=typeof n&&"object"!=typeof n?(null!=t.events[e]&&t.dom.removeEventListener(e.slice(2),t.events,!1),t.events[e]=void 0):(null==t.events[e]&&t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}else null==n||"function"!=typeof n&&"object"!=typeof n||(t.events=new A,t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}function D(t,e,n){"function"==typeof t.oninit&&s.call(t.oninit,e),"function"==typeof t.oncreate&&n.push(s.bind(t.oncreate,e))}function I(t,e,n){"function"==typeof t.onupdate&&n.push(s.bind(t.onupdate,e))}return A.prototype=Object.create(null),A.prototype.handleEvent=function(t){var e,n=this["on"+t.type];"function"==typeof n?e=n.call(t.currentTarget,t):"function"==typeof n.handleEvent&&n.handleEvent(t),this._&&!1!==t.redraw&&(0,this._)(),!1===e&&(t.preventDefault(),t.stopPropagation())},function(t,n,i){if(!t)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o=[],a=u(),s=t.namespaceURI;null==t.vnodes&&(t.textContent=""),n=r.normalizeChildren(Array.isArray(n)?n:[n]);var l=e;try{e="function"==typeof i?i:void 0,d(t,t.vnodes,n,o,null,"http://www.w3.org/1999/xhtml"===s?void 0:s)}finally{e=l}t.vnodes=n,null!=a&&u()!==a&&"function"==typeof a.focus&&a.focus();for(var c=0;c=0&&(i.splice(o,2),t(e,[],u)),null!=n&&(i.push(e,n),t(e,r(n),u))},redraw:u}}},function(t,e,n){"use strict";var r=n(5);t.exports=function(t,e,n){var i=0;function o(t){return new e(t)}function a(t){return function(i,a){"string"!=typeof i?(a=i,i=i.url):null==a&&(a={});var s=new e((function(e,n){t(r(i,a.params),a,(function(t){if("function"==typeof a.type)if(Array.isArray(t))for(var n=0;n=200&&t.target.status<300||304===t.target.status||/^file:\/\//i.test(e),s=t.target.response;if("json"===c?t.target.responseType||"function"==typeof n.extract||(s=JSON.parse(t.target.responseText)):c&&"text"!==c||null==s&&(s=t.target.responseText),"function"==typeof n.extract?(s=n.extract(t.target,n),a=!0):"function"==typeof n.deserialize&&(s=n.deserialize(s)),a)r(s);else{try{o=t.target.responseText}catch(t){o=s}var u=new Error(o);u.code=t.target.status,u.response=s,i(u)}}catch(t){i(t)}},"function"==typeof n.config&&(f=n.config(f,n,e)||f)!==d&&(o=f.abort,f.abort=function(){p=!0,o.call(this)}),null==u?f.send():"function"==typeof n.serialize?f.send(n.serialize(u)):u instanceof t.FormData?f.send(u):f.send(JSON.stringify(u))})),jsonp:a((function(e,n,r,o){var a=n.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+i++,s=t.document.createElement("script");t[a]=function(e){delete t[a],s.parentNode.removeChild(s),r(e)},s.onerror=function(){delete t[a],s.parentNode.removeChild(s),o(new Error("JSONP request failed"))},s.src=e+(e.indexOf("?")<0?"?":"&")+encodeURIComponent(n.callbackKey||"callback")+"="+encodeURIComponent(a),t.document.documentElement.appendChild(s)}))}}},function(t,e,n){"use strict";var r=n(4);t.exports=n(45)(window,r)},function(t,e,n){"use strict";(function(e){var r=n(2),i=n(7),o=n(9),a=n(5),s=n(6),u=n(46),l=n(14),c={};t.exports=function(t,n){var f;function p(e,n,r){if(e=a(e,n),null!=f){f();var i=r?r.state:null,o=r?r.title:null;r&&r.replace?t.history.replaceState(i,o,b.prefix+e):t.history.pushState(i,o,b.prefix+e)}else t.location.href=b.prefix+e}var d,h,m,v,g=c,y=b.SKIP={};function b(i,a,w){if(null==i)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var x,E=0,T=Object.keys(w).map((function(t){if("/"!==t[0])throw new SyntaxError("Routes must start with a `/`");if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Route parameter names must be separated with either `/`, `.`, or `-`");return{route:t,component:w[t],check:u(t)}})),k="function"==typeof e?e:setTimeout,O=o.resolve(),S=!1;if(f=null,null!=a){var C=s(a);if(!T.some((function(t){return t.check(C)})))throw new ReferenceError("Default route doesn't match any known routes")}function _(){S=!1;var e=t.location.hash;"#"!==b.prefix[0]&&(e=t.location.search+e,"?"!==b.prefix[0]&&"/"!==(e=t.location.pathname+e)[0]&&(e="/"+e));var r=e.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(b.prefix.length),i=s(r);function o(){if(r===a)throw new Error("Could not resolve default route "+a);p(a,null,{replace:!0})}l(i.params,t.history.state),function t(e){for(;e":".","?":"/","|":"\\"},f={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p=1;p<20;++p)u[111+p]="f"+p;for(p=0;p<=9;++p)u[p+96]=p.toString();y.prototype.bind=function(t,e,n){return t=t instanceof Array?t:[t],this._bindMultiple.call(this,t,e,n),this},y.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},y.prototype.trigger=function(t,e){return this._directMap[t+":"+e]&&this._directMap[t+":"+e]({},t),this},y.prototype.reset=function(){return this._callbacks={},this._directMap={},this},y.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(function t(e,n){return null!==e&&e!==o&&(e===n||t(e.parentNode,n))}(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var n=t.composedPath()[0];n!==t.target&&(e=n)}return"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},y.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},y.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(u[e]=t[e]);s=null},y.init=function(){var t=y(o);for(var e in t)"_"!==e.charAt(0)&&(y[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},y.init(),i.Mousetrap=y,t.exports&&(t.exports=y),void 0===(r=function(){return y}.call(e,n,e,t))||(t.exports=r)}function d(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)}function h(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return u[t.which]?u[t.which]:l[t.which]?l[t.which]:String.fromCharCode(t.which).toLowerCase()}function m(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function v(t,e,n){return n||(n=function(){if(!s)for(var t in s={},u)t>95&&t<112||u.hasOwnProperty(t)&&(s[u[t]]=t);return s}()[t]?"keydown":"keypress"),"keypress"==n&&e.length&&(n="keydown"),n}function g(t,e){var n,r,i,o=[];for(n=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),i=0;i1?p(t,s,n,r):(a=g(t,r),e._callbacks[a.key]=e._callbacks[a.key]||[],l(a.key,a.modifiers,{type:a.action},i,t,o),e._callbacks[a.key][i?"unshift":"push"]({callback:n,modifiers:a.modifiers,action:a.action,seq:i,level:o,combo:t}))}e._handleKey=function(t,e,n){var r,i=l(t,e,n),o={},f=0,p=!1;for(r=0;r-1)return this},has:function(t,n,r){if(e.qsa(this,r).length)return this}},a=new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),s=/^\s*>/,u="Zepto"+ +new Date;function c(t,e){t=t.replace(/=#\]/g,'="#"]');var n,r,i=a.exec(t);if(i&&i[2]in o&&(n=o[i[2]],r=i[3],t=i[1],r)){var s=Number(r);r=isNaN(s)?r.replace(/^["']|["']$/g,""):s}return e(t,n,r)}e.qsa=function(r,i){return c(i,(function(o,a,c){try{var l;!o&&a?o="*":s.test(o)&&(l=t(r).addClass(u),o="."+u+" "+o);var f=n(r,o)}catch(t){throw console.error("error performing selector: %o",i),t}finally{l&&l.removeClass(u)}return a?e.uniq(t.map(f,(function(t,e){return a.call(t,e,f,c)}))):f}))},e.matches=function(t,e){return c(e,(function(e,n,i){return(!e||r(t,e))&&(!n||n.call(t,null,i)===t)}))}}(Zepto)},function(t,e){!function(t){var e={},n=t.fn.data,r=t.camelCase,i=t.expando="Zepto"+ +new Date,o=[];function a(n,a,s){var u=n[i]||(n[i]=++t.uuid),c=e[u]||(e[u]=function(e){var n={};return t.each(e.attributes||o,(function(e,i){0==i.name.indexOf("data-")&&(n[r(i.name.replace("data-",""))]=t.zepto.deserializeValue(i.value))})),n}(n));return void 0!==a&&(c[r(a)]=s),c}t.fn.data=function(o,s){return void 0===s?t.isPlainObject(o)?this.each((function(e,n){t.each(o,(function(t,e){a(n,t,e)}))})):0 in this?function(o,s){var u=o[i],c=u&&e[u];if(void 0===s)return c||a(o);if(c){if(s in c)return c[s];var l=r(s);if(l in c)return c[l]}return n.call(t(o),s)}(this[0],o):void 0:this.each((function(){a(this,o,s)}))},t.data=function(e,n,r){return t(e).data(n,r)},t.hasData=function(n){var r=n[i],o=r&&e[r];return!!o&&!t.isEmptyObject(o)},t.fn.removeData=function(n){return"string"==typeof n&&(n=n.split(/\s+/)),this.each((function(){var o=this[i],a=o&&e[o];a&&t.each(n||a,(function(t){delete a[n?r(this):t]}))}))},["remove","empty"].forEach((function(e){var n=t.fn[e];t.fn[e]=function(){var t=this.find("*");return"remove"===e&&(t=t.add(this)),t.removeData(),n.call(this)}}))}(Zepto)},function(t,e){!function(t,e){var n,r,i,o,a,s,u,c,l,f,p="",d=document.createElement("div"),h=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,m={};function v(t){return n?n+t:t.toLowerCase()}void 0===d.style.transform&&t.each({Webkit:"webkit",Moz:"",O:"o"},(function(t,e){if(void 0!==d.style[t+"TransitionProperty"])return p="-"+t.toLowerCase()+"-",n=e,!1})),r=p+"transform",m[i=p+"transition-property"]=m[o=p+"transition-duration"]=m[s=p+"transition-delay"]=m[a=p+"transition-timing-function"]=m[u=p+"animation-name"]=m[c=p+"animation-duration"]=m[f=p+"animation-delay"]=m[l=p+"animation-timing-function"]="",t.fx={off:void 0===n&&void 0===d.style.transitionProperty,speeds:{_default:400,fast:200,slow:600},cssPrefix:p,transitionEnd:v("TransitionEnd"),animationEnd:v("AnimationEnd")},t.fn.animate=function(e,n,r,i,o){return t.isFunction(n)&&(i=n,r=void 0,n=void 0),t.isFunction(r)&&(i=r,r=void 0),t.isPlainObject(n)&&(r=n.easing,i=n.complete,o=n.delay,n=n.duration),n&&(n=("number"==typeof n?n:t.fx.speeds[n]||t.fx.speeds._default)/1e3),o&&(o=parseFloat(o)/1e3),this.anim(e,n,r,i,o)},t.fn.anim=function(e,n,p,d,v){var g,y,b,w={},x="",E=this,T=t.fx.transitionEnd,k=!1;if(void 0===n&&(n=t.fx.speeds._default/1e3),void 0===v&&(v=0),t.fx.off&&(n=0),"string"==typeof e)w[u]=e,w[c]=n+"s",w[f]=v+"s",w[l]=p||"linear",T=t.fx.animationEnd;else{for(g in y=[],e)h.test(g)?x+=g+"("+e[g]+") ":(w[g]=e[g],y.push(g.replace(/([A-Z])/g,"-$1").toLowerCase()));x&&(w[r]=x,y.push(r)),n>0&&"object"==typeof e&&(w[i]=y.join(", "),w[o]=n+"s",w[s]=v+"s",w[a]=p||"linear")}return b=function(e){if(void 0!==e){if(e.target!==e.currentTarget)return;t(e.target).unbind(T,b)}else t(this).unbind(T,b);k=!0,t(this).css(m),d&&d.call(this)},n>0&&(this.bind(T,b),setTimeout((function(){k||b.call(E)}),1e3*(n+v)+25)),this.size()&&this.get(0).clientLeft,this.css(w),n<=0&&setTimeout((function(){E.each((function(){b.call(this)}))}),0),this},d=null}(Zepto)},function(t,e){!function(t,e){window.document.documentElement;var n=t.fn.show,r=t.fn.hide,i=t.fn.toggle;function o(n,r,i,o,a){"function"!=typeof r||a||(a=r,r=e);var s={opacity:i};return o&&(s.scale=o,n.css(t.fx.cssPrefix+"transform-origin","0 0")),n.animate(s,r,null,a)}function a(e,n,i,a){return o(e,n,0,i,(function(){r.call(t(this)),a&&a.call(this)}))}t.fn.show=function(t,r){return n.call(this),t===e?t=0:this.css("opacity",0),o(this,t,1,"1,1",r)},t.fn.hide=function(t,n){return t===e?r.call(this):a(this,t,"0,0",n)},t.fn.toggle=function(n,r){return n===e||"boolean"==typeof n?i.call(this,n):this.each((function(){var e=t(this);e["none"==e.css("display")?"show":"hide"](n,r)}))},t.fn.fadeTo=function(t,e,n){return o(this,t,e,null,n)},t.fn.fadeIn=function(t,e){var r=this.css("opacity");return r>0?this.css("opacity",0):r=1,n.call(this).fadeTo(t,r,e)},t.fn.fadeOut=function(t,e){return a(this,t,null,e)},t.fn.fadeToggle=function(e,n){return this.each((function(){var r=t(this);r[0==r.css("opacity")||"none"==r.css("display")?"fadeIn":"fadeOut"](e,n)}))}}(Zepto)},function(t,e,n){"use strict";(function(t){var e=n(0); +*/!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var t=[],e=0;e-1)return this},has:function(t,n,r){if(e.qsa(this,r).length)return this}},a=new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),s=/^\s*>/,u="Zepto"+ +new Date;function l(t,e){t=t.replace(/=#\]/g,'="#"]');var n,r,i=a.exec(t);if(i&&i[2]in o&&(n=o[i[2]],r=i[3],t=i[1],r)){var s=Number(r);r=isNaN(s)?r.replace(/^["']|["']$/g,""):s}return e(t,n,r)}e.qsa=function(r,i){return l(i,(function(o,a,l){try{var c;!o&&a?o="*":s.test(o)&&(c=t(r).addClass(u),o="."+u+" "+o);var f=n(r,o)}catch(t){throw console.error("error performing selector: %o",i),t}finally{c&&c.removeClass(u)}return a?e.uniq(t.map(f,(function(t,e){return a.call(t,e,f,l)}))):f}))},e.matches=function(t,e){return l(e,(function(e,n,i){return(!e||r(t,e))&&(!n||n.call(t,null,i)===t)}))}}(Zepto)},function(t,e){!function(t){var e={},n=t.fn.data,r=t.camelCase,i=t.expando="Zepto"+ +new Date,o=[];function a(n,a,s){var u=n[i]||(n[i]=++t.uuid),l=e[u]||(e[u]=function(e){var n={};return t.each(e.attributes||o,(function(e,i){0==i.name.indexOf("data-")&&(n[r(i.name.replace("data-",""))]=t.zepto.deserializeValue(i.value))})),n}(n));return void 0!==a&&(l[r(a)]=s),l}t.fn.data=function(o,s){return void 0===s?t.isPlainObject(o)?this.each((function(e,n){t.each(o,(function(t,e){a(n,t,e)}))})):0 in this?function(o,s){var u=o[i],l=u&&e[u];if(void 0===s)return l||a(o);if(l){if(s in l)return l[s];var c=r(s);if(c in l)return l[c]}return n.call(t(o),s)}(this[0],o):void 0:this.each((function(){a(this,o,s)}))},t.data=function(e,n,r){return t(e).data(n,r)},t.hasData=function(n){var r=n[i],o=r&&e[r];return!!o&&!t.isEmptyObject(o)},t.fn.removeData=function(n){return"string"==typeof n&&(n=n.split(/\s+/)),this.each((function(){var o=this[i],a=o&&e[o];a&&t.each(n||a,(function(t){delete a[n?r(this):t]}))}))},["remove","empty"].forEach((function(e){var n=t.fn[e];t.fn[e]=function(){var t=this.find("*");return"remove"===e&&(t=t.add(this)),t.removeData(),n.call(this)}}))}(Zepto)},function(t,e){!function(t,e){var n,r,i,o,a,s,u,l,c,f,p="",d=document.createElement("div"),h=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,m={};function v(t){return n?n+t:t.toLowerCase()}void 0===d.style.transform&&t.each({Webkit:"webkit",Moz:"",O:"o"},(function(t,e){if(void 0!==d.style[t+"TransitionProperty"])return p="-"+t.toLowerCase()+"-",n=e,!1})),r=p+"transform",m[i=p+"transition-property"]=m[o=p+"transition-duration"]=m[s=p+"transition-delay"]=m[a=p+"transition-timing-function"]=m[u=p+"animation-name"]=m[l=p+"animation-duration"]=m[f=p+"animation-delay"]=m[c=p+"animation-timing-function"]="",t.fx={off:void 0===n&&void 0===d.style.transitionProperty,speeds:{_default:400,fast:200,slow:600},cssPrefix:p,transitionEnd:v("TransitionEnd"),animationEnd:v("AnimationEnd")},t.fn.animate=function(e,n,r,i,o){return t.isFunction(n)&&(i=n,r=void 0,n=void 0),t.isFunction(r)&&(i=r,r=void 0),t.isPlainObject(n)&&(r=n.easing,i=n.complete,o=n.delay,n=n.duration),n&&(n=("number"==typeof n?n:t.fx.speeds[n]||t.fx.speeds._default)/1e3),o&&(o=parseFloat(o)/1e3),this.anim(e,n,r,i,o)},t.fn.anim=function(e,n,p,d,v){var g,y,b,w={},x="",E=this,T=t.fx.transitionEnd,k=!1;if(void 0===n&&(n=t.fx.speeds._default/1e3),void 0===v&&(v=0),t.fx.off&&(n=0),"string"==typeof e)w[u]=e,w[l]=n+"s",w[f]=v+"s",w[c]=p||"linear",T=t.fx.animationEnd;else{for(g in y=[],e)h.test(g)?x+=g+"("+e[g]+") ":(w[g]=e[g],y.push(g.replace(/([A-Z])/g,"-$1").toLowerCase()));x&&(w[r]=x,y.push(r)),n>0&&"object"==typeof e&&(w[i]=y.join(", "),w[o]=n+"s",w[s]=v+"s",w[a]=p||"linear")}return b=function(e){if(void 0!==e){if(e.target!==e.currentTarget)return;t(e.target).unbind(T,b)}else t(this).unbind(T,b);k=!0,t(this).css(m),d&&d.call(this)},n>0&&(this.bind(T,b),setTimeout((function(){k||b.call(E)}),1e3*(n+v)+25)),this.size()&&this.get(0).clientLeft,this.css(w),n<=0&&setTimeout((function(){E.each((function(){b.call(this)}))}),0),this},d=null}(Zepto)},function(t,e){!function(t,e){window.document.documentElement;var n=t.fn.show,r=t.fn.hide,i=t.fn.toggle;function o(n,r,i,o,a){"function"!=typeof r||a||(a=r,r=e);var s={opacity:i};return o&&(s.scale=o,n.css(t.fx.cssPrefix+"transform-origin","0 0")),n.animate(s,r,null,a)}function a(e,n,i,a){return o(e,n,0,i,(function(){r.call(t(this)),a&&a.call(this)}))}t.fn.show=function(t,r){return n.call(this),t===e?t=0:this.css("opacity",0),o(this,t,1,"1,1",r)},t.fn.hide=function(t,n){return t===e?r.call(this):a(this,t,"0,0",n)},t.fn.toggle=function(n,r){return n===e||"boolean"==typeof n?i.call(this,n):this.each((function(){var e=t(this);e["none"==e.css("display")?"show":"hide"](n,r)}))},t.fn.fadeTo=function(t,e,n){return o(this,t,e,null,n)},t.fn.fadeIn=function(t,e){var r=this.css("opacity");return r>0?this.css("opacity",0):r=1,n.call(this).fadeTo(t,r,e)},t.fn.fadeOut=function(t,e){return a(this,t,null,e)},t.fn.fadeToggle=function(e,n){return this.each((function(){var r=t(this);r[0==r.css("opacity")||"none"==r.css("display")?"fadeIn":"fadeOut"](e,n)}))}}(Zepto)},function(t,e,n){"use strict";(function(t){var e=n(0); /*! * HC-Sticky * ========= @@ -68,5 +68,5 @@ var n="undefined"!=typeof window&&"undefined"!=typeof document,r=["Edge","Triden * Plugin URL: https://github.com/somewebmedia/hc-sticky * Description: Cross-browser plugin that makes any element on your page visible while you scroll * License: MIT - */!function(e,r){if("object"==typeof t.exports){if(!e.document)throw new Error("HC-Sticky requires a browser to run.");t.exports=r(e)}else"function"==typeof define&&n(60)?define("hcSticky",[],r(e)):r(e)}("undefined"!=typeof window?window:void 0,(function(t){var n={top:0,bottom:0,bottomEnd:0,innerTop:0,innerSticker:null,stickyClass:"sticky",stickTo:null,followScroll:!0,responsive:null,mobileFirst:!1,onStart:null,onStop:null,onBeforeResize:null,onResize:null,resizeDebounce:100,disable:!1,queries:null,queryFlow:"down"},r=function(t,e,n){console.log("%c! HC Sticky:%c "+t+"%c "+n+" is now deprecated and will be removed. Use%c "+e+"%c instead.","color: red","color: darkviolet","color: black","color: darkviolet","color: black")},i=t.document,o=function o(a,s){var u=this;if("string"==typeof a&&(a=i.querySelector(a)),!a)return!1;s.queries&&r("queries","responsive","option"),s.queryFlow&&r("queryFlow","mobileFirst","option");var c={},l=o.Helpers,f=a.parentNode;"static"===l.getStyle(f,"position")&&(f.style.position="relative");var p=function(){var t=0>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(10&&u--,40==e.which&&u-1&&(e=t[i][1](e,n()))})),e}),n);return i(e),i},n["fantasy-land/of"]=n;var e=!1;function n(t){var e,i=[],a=[];function s(e){return arguments.length&&e!==n.SKIP&&(t=e,o(s)&&(s._changing(),s._state="active",i.forEach((function(e,n){e(a[n](t))})))),t}return s.constructor=n,s._state=arguments.length&&t!==n.SKIP?"active":"pending",s._parents=[],s._changing=function(){o(s)&&(s._state="changing"),i.forEach((function(t){t._changing()}))},s._map=function(e,r){var o=r?n():n(e(t));return o._parents.push(s),i.push(o),a.push(e),o},s.map=function(t){return s._map(t,"active"!==s._state)},s.toJSON=function(){return null!=t&&"function"==typeof t.toJSON?t.toJSON():t},s["fantasy-land/map"]=s.map,s["fantasy-land/ap"]=function(t){return r((function(t,e){return t()(e())}),[t,s])},s._unregisterChild=function(t){var e=i.indexOf(t);-1!==e&&(i.splice(e,1),a.splice(e,1))},Object.defineProperty(s,"end",{get:function(){return e||((e=n()).map((function(t){return!0===t&&(s._parents.forEach((function(t){t._unregisterChild(s)})),s._state="ended",s._parents.length=i.length=a.length=0),t})),e)}}),s}function r(t,e){var r=e.every((function(t){if(t.constructor!==n)throw new Error("Ensure that each item passed to stream.combine/stream.merge/lift is a stream");return"active"===t._state})),i=r?n(t.apply(null,e.concat([e]))):n(),o=[],a=e.map((function(n){return n._map((function(a){return o.push(n),(r||e.every((function(t){return"pending"!==t._state})))&&(r=!0,i(t.apply(null,e.concat([o]))),o=[]),a}),!0)})),s=i.end.map((function(t){!0===t&&(a.forEach((function(t){t.end(!0)})),s.end(!0))}));return i}function i(t){return r((function(){return t.map((function(t){return t()}))}),t)}function o(t){return"pending"===t._state||"active"===t._state||"changing"===t._state}Object.defineProperty(n,"HALT",{get:function(){return e||console.log("HALT is deprecated and has been renamed to SKIP"),e=!0,n.SKIP}}),t.exports=n}()},,,,,,,,,,,,,,function(t,e){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.r(e);n(16);var r=n(77);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i)}]); + */!function(e,r){if("object"==typeof t.exports){if(!e.document)throw new Error("HC-Sticky requires a browser to run.");t.exports=r(e)}else"function"==typeof define&&n(59)?define("hcSticky",[],r(e)):r(e)}("undefined"!=typeof window?window:void 0,(function(t){var n={top:0,bottom:0,bottomEnd:0,innerTop:0,innerSticker:null,stickyClass:"sticky",stickTo:null,followScroll:!0,responsive:null,mobileFirst:!1,onStart:null,onStop:null,onBeforeResize:null,onResize:null,resizeDebounce:100,disable:!1,queries:null,queryFlow:"down"},r=function(t,e,n){console.log("%c! HC Sticky:%c "+t+"%c "+n+" is now deprecated and will be removed. Use%c "+e+"%c instead.","color: red","color: darkviolet","color: black","color: darkviolet","color: black")},i=t.document,o=function o(a,s){var u=this;if("string"==typeof a&&(a=i.querySelector(a)),!a)return!1;s.queries&&r("queries","responsive","option"),s.queryFlow&&r("queryFlow","mobileFirst","option");var l={},c=o.Helpers,f=a.parentNode;"static"===c.getStyle(f,"position")&&(f.style.position="relative");var p=function(){var t=0>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(10&&u--,40==e.which&&u-1&&(e=t[i][1](e,n()))})),e}),n);return i(e),i},n["fantasy-land/of"]=n;var e=!1;function n(t){var e,i=[],a=[];function s(e){return arguments.length&&e!==n.SKIP&&(t=e,o(s)&&(s._changing(),s._state="active",i.forEach((function(e,n){e(a[n](t))})))),t}return s.constructor=n,s._state=arguments.length&&t!==n.SKIP?"active":"pending",s._parents=[],s._changing=function(){o(s)&&(s._state="changing"),i.forEach((function(t){t._changing()}))},s._map=function(e,r){var o=r?n():n(e(t));return o._parents.push(s),i.push(o),a.push(e),o},s.map=function(t){return s._map(t,"active"!==s._state)},s.toJSON=function(){return null!=t&&"function"==typeof t.toJSON?t.toJSON():t},s["fantasy-land/map"]=s.map,s["fantasy-land/ap"]=function(t){return r((function(t,e){return t()(e())}),[t,s])},s._unregisterChild=function(t){var e=i.indexOf(t);-1!==e&&(i.splice(e,1),a.splice(e,1))},Object.defineProperty(s,"end",{get:function(){return e||((e=n()).map((function(t){return!0===t&&(s._parents.forEach((function(t){t._unregisterChild(s)})),s._state="ended",s._parents.length=i.length=a.length=0),t})),e)}}),s}function r(t,e){var r=e.every((function(t){if(t.constructor!==n)throw new Error("Ensure that each item passed to stream.combine/stream.merge/lift is a stream");return"active"===t._state})),i=r?n(t.apply(null,e.concat([e]))):n(),o=[],a=e.map((function(n){return n._map((function(a){return o.push(n),(r||e.every((function(t){return"pending"!==t._state})))&&(r=!0,i(t.apply(null,e.concat([o]))),o=[]),a}),!0)})),s=i.end.map((function(t){!0===t&&(a.forEach((function(t){t.end(!0)})),s.end(!0))}));return i}function i(t){return r((function(){return t.map((function(t){return t()}))}),t)}function o(t){return"pending"===t._state||"active"===t._state||"changing"===t._state}Object.defineProperty(n,"HALT",{get:function(){return e||console.log("HALT is deprecated and has been renamed to SKIP"),e=!0,n.SKIP}}),t.exports=n}()},,,,,,,,,,,,,,function(t,e){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.r(e);n(17);var r=n(76);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i)}]); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index f16e0034e..c93c77773 100644 --- a/js/dist/admin.js.map +++ b/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@flarum/core/webpack/bootstrap","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/core/(webpack)/buildin/global.js","webpack://@flarum/core/./node_modules/mithril/render/vnode.js","webpack://@flarum/core/./node_modules/mithril/mount-redraw.js","webpack://@flarum/core/./node_modules/mithril/pathname/build.js","webpack://@flarum/core/./node_modules/mithril/pathname/parse.js","webpack://@flarum/core/./node_modules/mithril/render/hyperscript.js","webpack://@flarum/core/./node_modules/mithril/render/hyperscriptVnode.js","webpack://@flarum/core/./node_modules/mithril/promise/promise.js","webpack://@flarum/core/./node_modules/mithril/promise/polyfill.js","webpack://@flarum/core/./node_modules/timers-browserify/main.js","webpack://@flarum/core/./node_modules/mithril/render.js","webpack://@flarum/core/./node_modules/mithril/querystring/build.js","webpack://@flarum/core/./node_modules/mithril/pathname/assign.js","webpack://@flarum/core/./node_modules/mithril/querystring/parse.js","webpack://@flarum/core/./node_modules/jump.js/dist/jump.module.js","webpack://@flarum/core/../../src/index.js","webpack://@flarum/core/../../../popper/src/utils/isFunction.js","webpack://@flarum/core/./src/common/utils/patchZepto.ts","webpack://@flarum/core/./src/common/index.ts","webpack://@flarum/core/../../src/utils/debounce.js","webpack://@flarum/core/../../src/utils/isBrowser.js","webpack://@flarum/core/../../src/utils/isFunction.js","webpack://@flarum/core/../../src/utils/getStyleComputedProperty.js","webpack://@flarum/core/../../src/utils/getParentNode.js","webpack://@flarum/core/../../src/utils/getScrollParent.js","webpack://@flarum/core/../../src/utils/isIE.js","webpack://@flarum/core/../../src/utils/getOffsetParent.js","webpack://@flarum/core/../../src/utils/getRoot.js","webpack://@flarum/core/../../src/utils/findCommonOffsetParent.js","webpack://@flarum/core/../../src/utils/isOffsetContainer.js","webpack://@flarum/core/../../src/utils/getScroll.js","webpack://@flarum/core/../../src/utils/getBordersSize.js","webpack://@flarum/core/../../src/utils/getWindowSizes.js","webpack://@flarum/core/../../src/utils/getClientRect.js","webpack://@flarum/core/../../src/utils/getBoundingClientRect.js","webpack://@flarum/core/../../src/utils/getOffsetRectRelativeToArbitraryNode.js","webpack://@flarum/core/../../src/utils/includeScroll.js","webpack://@flarum/core/../../src/utils/getFixedPositionOffsetParent.js","webpack://@flarum/core/../../src/utils/getBoundaries.js","webpack://@flarum/core/../../src/utils/getViewportOffsetRectRelativeToArtbitraryNode.js","webpack://@flarum/core/../../src/utils/isFixed.js","webpack://@flarum/core/../../src/utils/computeAutoPlacement.js","webpack://@flarum/core/../../src/utils/getReferenceOffsets.js","webpack://@flarum/core/../../src/utils/getOuterSizes.js","webpack://@flarum/core/../../src/utils/getOppositePlacement.js","webpack://@flarum/core/../../src/utils/getPopperOffsets.js","webpack://@flarum/core/../../src/utils/find.js","webpack://@flarum/core/../../src/utils/runModifiers.js","webpack://@flarum/core/../../src/utils/findIndex.js","webpack://@flarum/core/../../src/methods/update.js","webpack://@flarum/core/../../src/utils/isModifierEnabled.js","webpack://@flarum/core/../../src/utils/getSupportedPropertyName.js","webpack://@flarum/core/../../src/methods/destroy.js","webpack://@flarum/core/../../src/utils/getWindow.js","webpack://@flarum/core/../../src/utils/setupEventListeners.js","webpack://@flarum/core/../../src/methods/enableEventListeners.js","webpack://@flarum/core/../../src/methods/disableEventListeners.js","webpack://@flarum/core/../../src/utils/removeEventListeners.js","webpack://@flarum/core/../../src/utils/isNumeric.js","webpack://@flarum/core/../../src/utils/setStyles.js","webpack://@flarum/core/../../src/modifiers/computeStyle.js","webpack://@flarum/core/../../src/utils/isModifierRequired.js","webpack://@flarum/core/../../src/methods/placements.js","webpack://@flarum/core/../../src/utils/clockwise.js","webpack://@flarum/core/../../src/modifiers/flip.js","webpack://@flarum/core/../../src/modifiers/offset.js","webpack://@flarum/core/../../src/modifiers/index.js","webpack://@flarum/core/../../src/methods/defaults.js","webpack://@flarum/core/../../src/modifiers/shift.js","webpack://@flarum/core/../../src/modifiers/preventOverflow.js","webpack://@flarum/core/../../src/modifiers/keepTogether.js","webpack://@flarum/core/../../src/modifiers/arrow.js","webpack://@flarum/core/../../src/utils/getOppositeVariation.js","webpack://@flarum/core/../../src/modifiers/inner.js","webpack://@flarum/core/../../src/modifiers/hide.js","webpack://@flarum/core/../../src/utils/getRoundedOffsets.js","webpack://@flarum/core/../../src/modifiers/applyStyle.js","webpack://@flarum/core/../../src/utils/setAttributes.js","webpack://@flarum/core/./node_modules/dayjs/plugin/relativeTime.js","webpack://@flarum/core/./node_modules/dayjs/plugin/localizedFormat.js","webpack://@flarum/core/./src/common/utils/patchMithril.ts","webpack://@flarum/core/./node_modules/mithril/stream.js","webpack://@flarum/core/./node_modules/zepto/dist/zepto.js-exposed","webpack://@flarum/core/./node_modules/zepto/dist/zepto.js","webpack://@flarum/core/./node_modules/dayjs/dayjs.min.js-exposed?da0f","webpack://@flarum/core/./node_modules/dayjs/dayjs.min.js-exposed","webpack://@flarum/core/./node_modules/dayjs/dayjs.min.js","webpack://@flarum/core/./node_modules/mithril/index.js-exposed","webpack://@flarum/core/./node_modules/mithril/index.js","webpack://@flarum/core/./node_modules/mithril/hyperscript.js","webpack://@flarum/core/./node_modules/mithril/render/trust.js","webpack://@flarum/core/./node_modules/mithril/render/fragment.js","webpack://@flarum/core/./node_modules/mithril/request.js","webpack://@flarum/core/./node_modules/setimmediate/setImmediate.js","webpack://@flarum/core/./node_modules/process/browser.js","webpack://@flarum/core/./node_modules/mithril/render/render.js","webpack://@flarum/core/./node_modules/mithril/api/mount-redraw.js","webpack://@flarum/core/./node_modules/mithril/request/request.js","webpack://@flarum/core/./node_modules/mithril/route.js","webpack://@flarum/core/./node_modules/mithril/api/router.js","webpack://@flarum/core/./node_modules/mithril/pathname/compileTemplate.js","webpack://@flarum/core/./node_modules/m.attrs.bidi/bidi.js-exposed","webpack://@flarum/core/./node_modules/m.attrs.bidi/bidi.js","webpack://@flarum/core/external \"m\"","webpack://@flarum/core/./node_modules/mousetrap/mousetrap.js-exposed","webpack://@flarum/core/./node_modules/mousetrap/mousetrap.js","webpack://@flarum/core/./node_modules/classNames/index.js-exposed","webpack://@flarum/core/./node_modules/classNames/index.js","webpack://@flarum/core/./node_modules/zepto/src/selector.js","webpack://@flarum/core/./node_modules/zepto/src/data.js","webpack://@flarum/core/./node_modules/zepto/src/fx.js","webpack://@flarum/core/./node_modules/zepto/src/fx_methods.js","webpack://@flarum/core/./node_modules/hc-sticky/dist/hc-sticky.js","webpack://@flarum/core/(webpack)/buildin/harmony-module.js","webpack://@flarum/core/(webpack)/buildin/amd-options.js","webpack://@flarum/core/./node_modules/bootstrap/js/dropdown.js","webpack://@flarum/core/./node_modules/bootstrap/js/transition.js","webpack://@flarum/core/./node_modules/mithril/stream/stream.js","webpack://@flarum/core/./admin.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","_extends","assign","target","arguments","length","source","apply","this","g","Function","e","window","Vnode","tag","attrs","children","text","dom","domSize","undefined","state","events","instance","normalize","node","Array","isArray","normalizeChildren","String","input","isKeyed","TypeError","render","require","requestAnimationFrame","console","buildQueryString","template","params","test","SyntaxError","queryIndex","indexOf","hashIndex","queryEnd","pathEnd","path","slice","query","resolved","replace","variadic","encodeURIComponent","newQueryIndex","newHashIndex","newQueryEnd","newPathEnd","result","querystring","parseQueryString","url","hyperscriptVnode","selectorParser","selectorCache","hasOwn","isEmpty","selector","view","Error","vnode","hasClass","className","class","newAttrs","execSelector","match","classes","exec","type","id","push","attrValue","join","compileSelector","start","PromisePolyfill","Promise","finally","global","executor","self","resolvers","rejectors","resolveCurrent","handler","rejectCurrent","_instance","callAsync","setImmediate","setTimeout","list","shouldAbsorb","execute","then","error","retry","executeOnce","runs","run","fn","onerror","onFulfilled","onRejection","resolveNext","rejectNext","handle","callback","next","promise","resolve","reject","catch","reason","all","total","count","values","consume","race","scope","Timeout","clearFn","_id","_clearFn","clearTimeout","setInterval","clearInterval","timeout","close","unref","ref","enroll","item","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","active","_onTimeout","clearImmediate","toString","args","destructure","keys","forEach","string","charAt","entries","split","counters","data","entry","decodeURIComponent","levels","cursor","pop","j","level","nextLevel","isNumber","isNaN","parseInt","desc","getOwnPropertyDescriptor","easeInOutQuad","b","_typeof","iterator","obj","constructor","singleton","element","stop","offset","easing","a11y","distance","duration","timeStart","timeElapsed","top","getBoundingClientRect","loop","timeCurrent","scrollTo","setAttribute","focus","done","options","scrollY","pageYOffset","document","querySelector","jumper","DEFAULT_OPTIONS","Tooltip","reference","title","allowHtml","tooltipGenerator","tooltipNode","Math","titleNode","functionToCheck","getType","titleText","container","placement","arrowSelector","boundariesElement","func","event","directEvents","oppositeEvents","evt","popper","delay","computedDelay","lastTitle","show","hide","dispose","toggle","updateTitleContent","_events","_setTooltipNodeEvent","relatedreference","relatedreference2","evt2","$","tooltip","option","each","$this","attr","removeAttr","includes","dimension","Dimension","toUpperCase","margin","elem","size","side","css","expr","tagName","hover","leave","on","animatedScrollTop","to","fx","speeds","_default","jump","extend","special","bindBeforeSpecialEvents","eventName","el","specialEvent","_init","originalHandler","$target","trigger","setup","dayjs","relativeTime","localizedFormat","patchMithril","longerTimeoutBrowsers","timeoutDuration","isBrowser","navigator","called","scheduled","isFunction","getStyleComputedProperty","getParentNode","getScrollParent","overflow","overflowX","overflowY","isIE11","isIE10","isIE","version","getOffsetParent","noOffsetParent","offsetParent","nodeName","getRoot","findCommonOffsetParent","element1","element2","order","Node","end","range","commonAncestorContainer","element1root","getScroll","upperSide","html","getBordersSize","styles","axis","sideA","sideB","parseFloat","getSize","body","computedStyle","getWindowSizes","getComputedStyle","getClientRect","offsets","height","rect","scrollTop","scrollLeft","sizes","width","horizScrollbar","vertScrollbar","getOffsetRectRelativeToArbitraryNode","parent","fixedPosition","runIsIE","isHTML","childrenRect","parentRect","scrollParent","borderTopWidth","borderLeftWidth","marginTop","marginLeft","subtract","modifier","includeScroll","getFixedPositionOffsetParent","getBoundaries","boundaries","left","excludeScroll","relativeOffset","getViewportOffsetRectRelativeToArtbitraryNode","boundariesNode","isFixed","parentNode","isPaddingNumber","padding","computeAutoPlacement","rects","refRect","bottom","sortedAreas","getArea","a","filteredAreas","filter","computedPlacement","variation","getReferenceOffsets","getOuterSizes","x","y","getOppositePlacement","hash","right","matched","getPopperOffsets","referenceOffsets","popperRect","popperOffsets","isHoriz","mainSide","secondarySide","measurement","secondaryMeasurement","find","arr","check","runModifiers","modifiers","ends","prop","findIndex","cur","update","flip","positionFixed","isModifierEnabled","modifierName","some","getSupportedPropertyName","prefixes","upperProp","prefix","toCheck","destroy","getWindow","ownerDocument","setupEventListeners","passive","scrollElement","attachToScrollParents","scrollParents","isBody","enableEventListeners","disableEventListeners","removeEventListeners","isNumeric","isFinite","setStyles","unit","isFirefox","isModifierRequired","requesting","isRequired","requested","validPlacements","placements","clockwise","counter","index","BEHAVIORS","parseOffset","useHeight","basePlacement","fragments","map","frag","divider","splitRegex","ops","mergeWithPrevious","op","str","toValue","index2","shiftvariation","isVertical","shiftOffsets","transformProp","popperStyles","transform","floor","opSide","arrowElement","len","sideCapitalized","altSide","arrowElementSize","center","popperMarginSide","popperBorderSide","sideValue","placementOpposite","flipOrder","refOffsets","overlapsRef","overflowsLeft","overflowsRight","overflowsTop","overflowsBottom","overflowsBoundaries","flippedVariationByRef","flippedVariationByContent","flippedVariation","getOppositeVariation","subtractLength","bound","legacyGpuAccelerationOption","gpuAcceleration","offsetParentRect","position","shouldRound","round","noRound","v","referenceWidth","popperWidth","isVariation","horizontalToInteger","verticalToInteger","bothOddWidth","getRoundedOffsets","prefixedProperty","invertTop","invertLeft","attributes","Popper","debounce","modifierOptions","eventsEnabled","Utils","PopperUtils","Defaults","en","future","past","mm","h","hh","dd","M","MM","yy","u","$locale","f","diff","abs","from","$u","utc","toNow","fromNow","format","LTS","LT","L","LL","LLL","LLLL","formats","mo","comp","bidi","route","href","Link","withAttr","cb","getAttribute","define","Zepto","classList","camelize","uniq","emptyArray","concat","elementDisplay","classCache","cssNumber","fragmentRE","singleTagRE","tagExpanderRE","rootNodeRE","capitalRE","methodAttributes","table","createElement","tableRow","containers","readyRE","simpleSelectorRE","class2type","zepto","tempParent","propMap","isWindow","isDocument","nodeType","DOCUMENT_NODE","isObject","isPlainObject","getPrototypeOf","likeArray","dasherize","toLowerCase","classRE","RegExp","maybeAddPx","childNodes","Z","deep","filtered","nodes","funcArg","context","arg","idx","payload","removeAttribute","klass","svg","baseVal","deserializeValue","parseJSON","traverseNode","fun","matches","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","temp","appendChild","qsa","removeChild","chr","array","fragment","properties","$1","innerHTML","isZ","init","trim","ready","shift","found","maybeID","maybeClass","nameOnly","isSimple","getElementById","getElementsByClassName","getElementsByTagName","querySelectorAll","contains","documentElement","isEmptyObject","val","num","Number","inArray","camelCase","uuid","support","noop","elements","grep","JSON","parse","reduce","sort","splice","toArray","readyState","addEventListener","remove","every","not","add","is","excludes","has","eq","first","last","closest","collection","_","parents","ancestors","pluck","contents","contentDocument","siblings","child","empty","display","style","getPropertyValue","replaceWith","newContent","before","wrap","structure","clone","wrapAll","cloneNode","append","wrapInner","unwrap","setting","prev","originHtml","newText","textContent","attribute","removeProp","attrName","multiple","selected","coordinates","coords","parentOffset","props","pageXOffset","removeProperty","cssText","addClass","cls","removeClass","toggleClass","when","hasScrollTop","scrollX","hasScrollLeft","detach","dimensionProperty","operator","operatorIndex","inside","argType","copyByClone","nextSibling","firstChild","parentInDocument","insertBefore","src","defaultView","_zid","isString","handlers","specialEvents","focusinSupported","blur","mouseenter","mouseleave","zid","findHandlers","matcher","sel","parts","eventCapture","captureSetting","del","realEvent","delegator","capture","set","related","relatedTarget","proxy","compatible","isImmediatePropagationStopped","_args","preventDefault","stopPropagation","removeEventListener","click","mousedown","mouseup","mousemove","proxyFn","unshift","unbind","off","one","returnTrue","returnFalse","ignoreProperties","eventMethods","stopImmediatePropagation","isDefaultPrevented","predicate","sourceMethod","timeStamp","Date","now","defaultPrevented","returnValue","getPreventDefault","createProxy","originalEvent","delegate","undelegate","live","die","autoRemove","currentTarget","liveFired","Event","dispatchEvent","triggerHandler","createEvent","bubbles","initEvent","jsonpID","rscript","scriptTypeRE","xmlTypeRE","jsonType","htmlType","blankRE","originAnchor","triggerGlobal","settings","triggerAndReturn","ajaxBeforeSend","xhr","beforeSend","ajaxSuccess","deferred","success","resolveWith","ajaxComplete","ajaxError","rejectWith","status","complete","ajaxStop","appendQuery","parseArguments","dataType","location","ajaxJSONP","ajax","responseData","abortTimeout","_callbackName","jsonpCallback","callbackName","script","originalCallback","abort","errorType","head","ajaxSettings","XMLHttpRequest","accepts","json","xml","crossDomain","processData","cache","dataFilter","urlAnchor","Deferred","ajaxStart","protocol","host","param","traditional","serializeData","hasPlaceholder","jsonp","mime","headers","setHeader","nativeSetHeader","setRequestHeader","mimeType","overrideMimeType","contentType","onreadystatechange","mimeToDataType","getResponseHeader","responseType","response","responseText","ajaxDataFilter","eval","responseXML","statusText","async","open","username","password","xhrFields","send","post","getJSON","load","escape","serialize","serializeArray","field","disabled","checked","elm","submit","nativeGetComputedStyle","pseudoElement","factory","z","utcOffset","year","month","ceil","w","ms","Q","weekdays","months","pl","date","D","locale","$L","$d","NaN","UTC","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","isSame","startOf","endOf","isAfter","isBefore","$g","day","hour","minute","second","millisecond","unix","valueOf","getTime","toDate","weekStart","$set","min","daysInMonth","substr","meridiem","YY","YYYY","MMM","monthsShort","MMMM","DD","weekdaysMin","ddd","weekdaysShort","dddd","H","HH","A","ss","SSS","getTimezoneOffset","toJSON","toISOString","toUTCString","isDayjs","Ls","hyperscript","request","mountRedraw","trust","mount","redraw","parsePathname","buildPathname","registerImmediate","channel","messagePrefix","onGlobalMessage","nextHandle","tasksByHandle","currentlyRunningATask","doc","attachTo","process","nextTick","runIfPresent","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","onmessage","canUsePostMessage","MessageChannel","port1","port2","random","attachEvent","task","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","marker","runClearTimeout","Item","browser","env","argv","versions","addListener","once","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","$window","currentRedraw","$doc","nameSpace","math","getNameSpace","xmlns","checkState","original","callHook","activeElement","createNodes","vnodes","hooks","createNode","initLifecycle","createTextNode","insertNode","createText","createHTML","createDocumentFragment","createFragment","createElementNS","setAttr","setAttrs","maybeSetContentEditable","selectedIndex","normalized","setLateSelectAttrs","sentinel","$$reentrantLock$$","initComponent","createComponent","possibleParents","caption","thead","tbody","tfoot","tr","th","td","colgroup","col","updateNodes","old","removeNodes","isOldKeyed","oldStart","oe","ve","topSibling","oldEnd","updateNode","getNextSibling","moveNodes","lisIndices","originalNextSibling","vnodesLength","oldIndices","li","pos","getKeyMap","oldIndex","il","lisTemp","makeLisIndices","commonLength","removeNode","oldTag","force","onbeforeupdate","shouldNotUpdate","updateLifecycle","nodeValue","updateText","removeHTML","updateHTML","updateFragment","updateAttrs","updateElement","updateComponent","moveChildToFrag","contenteditable","contentEditable","content","stateResult","attrsResult","mask","onbeforeremove","reallyRemove","onremove","isLifecycleMethod","isFormAttribute","updateEvent","setAttributeNS","updateStyle","hasPropertyKey","nsLastIndex","uppercaseRegex","capital","normalizeKey","setProperty","EventDict","oninit","oncreate","onupdate","handleEvent","ev","namespace","namespaceURI","prevRedraw","schedule","subscriptions","rendering","pending","sync","root","component","oncompletion","callbackCount","PromiseProxy","makeRequest","background","hasHeader","__proto__","replacedAbort","method","assumeJSON","FormData","extract","aborted","user","deserialize","withCredentials","message","code","config","stringify","callbackKey","compileTemplate","fireAsync","setPath","history","replaceState","pushState","currentPath","lastUpdate","currentResolver","SKIP","defaultRoute","routes","compiled","defaultData","ReferenceError","resolveRoute","search","pathname","fail","matchedRoute","localComp","onmatch","onclick","Boolean","button","which","ctrlKey","metaKey","shiftKey","altKey","templateData","templateKeys","regexp","extra","k","multi","onchange","selectedOptions","oninput","ctrl","_REVERSE_MAP","_MAP","8","9","13","16","17","18","20","27","32","33","34","35","36","37","38","39","40","45","46","91","93","224","_KEYCODE_MAP","106","107","109","110","111","186","187","188","189","190","191","192","219","220","221","222","_SHIFT_MAP","_SPECIAL_ALIASES","platform","Mousetrap","action","_bindMultiple","_directMap","reset","_callbacks","stopCallback","_belongsTo","ancestor","composedPath","initialEventTarget","isContentEditable","handleKey","_handleKey","addKeycodes","documentMousetrap","_addEvent","_characterFromEvent","character","fromCharCode","_isModifier","_pickBestAction","_getReverseMap","_getKeyInfo","combination","_keysFromString","targetElement","_resetTimer","_sequenceLevels","_ignoreNextKeyup","_ignoreNextKeypress","_nextExpectedAction","_resetSequences","doNotReset","activeSequences","_getMatches","sequenceName","modifiers1","modifiers2","seq","deleteCombo","combo","deleteSequence","_fireCallback","sequence","srcElement","_preventDefault","cancelBubble","_stopPropagation","_handleKeyEvent","keyCode","_eventModifiers","_bindSequence","_increaseSequence","nextAction","_callbackAndReset","wrappedCallback","_bindSingle","info","callbacks","maxLevel","processedSequenceCallback","max","ignoreThisKeypress","combinations","classNames","inner","default","oldQsa","oldMatches","visible","filters","hidden","filterRe","childRe","classTag","taggedParent","dataAttr","exp","expando","setData","store","attributeData","camelName","getData","hasData","removeData","names","methodName","origFn","eventPrefix","transitionProperty","transitionDuration","transitionTiming","transitionDelay","animationName","animationDuration","animationTiming","animationDelay","testEl","supportedTransforms","cssReset","normalizeEvent","Webkit","Moz","O","vendor","fast","slow","cssPrefix","transitionEnd","animationEnd","animate","ease","anim","cssProperties","cssValues","transforms","that","endEvent","fired","clientLeft","origShow","origHide","origToggle","speed","opacity","scale","fadeTo","fadeIn","fadeOut","fadeToggle","U","Y","bottomEnd","innerTop","innerSticker","stickyClass","stickTo","followScroll","responsive","mobileFirst","onStart","onStop","onBeforeResize","onResize","resizeDebounce","disable","queries","queryFlow","log","X","Helpers","getStyle","innerWidth","stick","isAttached","attach","offsetLeft","release","positionLeft","S","E","T","C","N","R","offsetHeight","B","I","q","getCascadedStyle","verticalAlign","boxSizing","marginRight","marginBottom","paddingLeft","paddingRight","float","cssFloat","MozBoxSizing","offsetWidth","HTMLDocument","Document","clientHeight","scrollHeight","innerHeight","offsetTop","F","P","W","V","refresh","triggerMethod","reinit","jQuery","hcSticky","writable","configurable","detachEvent","currentStyle","originalModule","webpackPolyfill","__webpack_amd_options__","backdrop","Dropdown","getParent","$parent","clearMenus","VERSION","isActive","insertAfter","keydown","$items","dropdown","Constructor","noConflict","emulateTransitionEnd","$el","transition","transEndEventNames","WebkitTransition","MozTransition","OTransition","bsTransitionEnd","bindType","delegateType","handleObj","Stream","lift","merge","streams","scan","acc","origin","stream","combine","scanMerge","tuples","seed","tuple","changed","warnedHalt","dependentStreams","dependentFns","_changing","_state","_parents","_map","ignoreInitial","s1","s2","_unregisterChild","childIndex","mappers","endStream","mapper"],"mappings":"wBACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EA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q6B,MACtCH,IAECa,EAAU,GAEVa,EAAUvB,EAAQphC,KAAI,SAAS5b,GAClC,OAAOA,EAAEi+C,MAAK,SAAS/+C,GAOtB,OANAw+C,EAAQz4C,KAAKjF,IACTgnB,GAASg2B,EAAQ/zB,OAAM,SAASjpB,GAAK,MAAoB,YAAbA,EAAE+9C,aACjD/2B,GAAQ,EACRo2B,EAAOt2C,EAAGvG,MAAM,KAAMy8C,EAAQr6B,OAAO,CAAC+6B,MACtCA,EAAU,IAEJx+C,KACL,MAGAs/C,EAAYpB,EAAO9pC,IAAIsI,KAAI,SAAS1c,IACzB,IAAVA,IACHq/C,EAAQ30C,SAAQ,SAAS60C,GAAUA,EAAOnrC,KAAI,MAC9CkrC,EAAUlrC,KAAI,OAKhB,OAAO8pC,EAGR,SAASL,EAAMC,GACd,OAAOK,GAAQ,WAAa,OAAOL,EAAQphC,KAAI,SAAS5b,GAAK,OAAOA,SAAUg9C,GAuC/E,SAAStmB,EAAK12B,GACb,MAAoB,YAAbA,EAAE+9C,QAAqC,WAAb/9C,EAAE+9C,QAAoC,aAAb/9C,EAAE+9C,OA9J7Dp/C,OAAOC,eAAei+C,EAAQ,OAAQ,CACrC/9C,IAAK,WAGJ,OAFA6+C,GAAcv7C,QAAQ21C,IAAI,mDAC1B4F,GAAa,EACNd,EAAO/S,QA6JmB9rC,EAAM,QAAc6+C,EA7KrD,I,2HCDF","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 143);\n","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","\"use strict\"\n\nfunction Vnode(tag, key, attrs, children, text, dom) {\n\treturn {tag: tag, key: key, attrs: attrs, children: children, text: text, dom: dom, domSize: undefined, state: undefined, events: undefined, instance: undefined}\n}\nVnode.normalize = function(node) {\n\tif (Array.isArray(node)) return Vnode(\"[\", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined)\n\tif (node == null || typeof node === \"boolean\") return null\n\tif (typeof node === \"object\") return node\n\treturn Vnode(\"#\", undefined, undefined, String(node), undefined, undefined)\n}\nVnode.normalizeChildren = function(input) {\n\tvar children = []\n\tif (input.length) {\n\t\tvar isKeyed = input[0] != null && input[0].key != null\n\t\t// Note: this is a *very* perf-sensitive check.\n\t\t// Fun fact: merging the loop like this is somehow faster than splitting\n\t\t// it, noticeably so.\n\t\tfor (var i = 1; i < input.length; i++) {\n\t\t\tif ((input[i] != null && input[i].key != null) !== isKeyed) {\n\t\t\t\tthrow new TypeError(\"Vnodes must either always have keys or never have keys!\")\n\t\t\t}\n\t\t}\n\t\tfor (var i = 0; i < input.length; i++) {\n\t\t\tchildren[i] = Vnode.normalize(input[i])\n\t\t}\n\t}\n\treturn children\n}\n\nmodule.exports = Vnode\n","\"use strict\"\n\nvar render = require(\"./render\")\n\nmodule.exports = require(\"./api/mount-redraw\")(render, requestAnimationFrame, console)\n","\"use strict\"\n\nvar buildQueryString = require(\"../querystring/build\")\nvar assign = require(\"./assign\")\n\n// Returns `path` from `template` + `params`\nmodule.exports = function(template, params) {\n\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(template)) {\n\t\tthrow new SyntaxError(\"Template parameter names *must* be separated\")\n\t}\n\tif (params == null) return template\n\tvar queryIndex = template.indexOf(\"?\")\n\tvar hashIndex = template.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? template.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = template.slice(0, pathEnd)\n\tvar query = {}\n\n\tassign(query, params)\n\n\tvar resolved = path.replace(/:([^\\/\\.-]+)(\\.{3})?/g, function(m, key, variadic) {\n\t\tdelete query[key]\n\t\t// If no such parameter exists, don't interpolate it.\n\t\tif (params[key] == null) return m\n\t\t// Escape normal parameters, but not variadic ones.\n\t\treturn variadic ? params[key] : encodeURIComponent(String(params[key]))\n\t})\n\n\t// In case the template substitution adds new query/hash parameters.\n\tvar newQueryIndex = resolved.indexOf(\"?\")\n\tvar newHashIndex = resolved.indexOf(\"#\")\n\tvar newQueryEnd = newHashIndex < 0 ? resolved.length : newHashIndex\n\tvar newPathEnd = newQueryIndex < 0 ? newQueryEnd : newQueryIndex\n\tvar result = resolved.slice(0, newPathEnd)\n\n\tif (queryIndex >= 0) result += template.slice(queryIndex, queryEnd)\n\tif (newQueryIndex >= 0) result += (queryIndex < 0 ? \"?\" : \"&\") + resolved.slice(newQueryIndex, newQueryEnd)\n\tvar querystring = buildQueryString(query)\n\tif (querystring) result += (queryIndex < 0 && newQueryIndex < 0 ? \"?\" : \"&\") + querystring\n\tif (hashIndex >= 0) result += template.slice(hashIndex)\n\tif (newHashIndex >= 0) result += (hashIndex < 0 ? \"\" : \"&\") + resolved.slice(newHashIndex)\n\treturn result\n}\n","\"use strict\"\n\nvar parseQueryString = require(\"../querystring/parse\")\n\n// Returns `{path, params}` from `url`\nmodule.exports = function(url) {\n\tvar queryIndex = url.indexOf(\"?\")\n\tvar hashIndex = url.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? url.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = url.slice(0, pathEnd).replace(/\\/{2,}/g, \"/\")\n\n\tif (!path) path = \"/\"\n\telse {\n\t\tif (path[0] !== \"/\") path = \"/\" + path\n\t\tif (path.length > 1 && path[path.length - 1] === \"/\") path = path.slice(0, -1)\n\t}\n\treturn {\n\t\tpath: path,\n\t\tparams: queryIndex < 0\n\t\t\t? {}\n\t\t\t: parseQueryString(url.slice(queryIndex + 1, queryEnd)),\n\t}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nvar selectorParser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[(.+?)(?:\\s*=\\s*(\"|'|)((?:\\\\[\"'\\]]|.)*?)\\5)?\\])/g\nvar selectorCache = {}\nvar hasOwn = {}.hasOwnProperty\n\nfunction isEmpty(object) {\n\tfor (var key in object) if (hasOwn.call(object, key)) return false\n\treturn true\n}\n\nfunction compileSelector(selector) {\n\tvar match, tag = \"div\", classes = [], attrs = {}\n\twhile (match = selectorParser.exec(selector)) {\n\t\tvar type = match[1], value = match[2]\n\t\tif (type === \"\" && value !== \"\") tag = value\n\t\telse if (type === \"#\") attrs.id = value\n\t\telse if (type === \".\") classes.push(value)\n\t\telse if (match[3][0] === \"[\") {\n\t\t\tvar attrValue = match[6]\n\t\t\tif (attrValue) attrValue = attrValue.replace(/\\\\([\"'])/g, \"$1\").replace(/\\\\\\\\/g, \"\\\\\")\n\t\t\tif (match[4] === \"class\") classes.push(attrValue)\n\t\t\telse attrs[match[4]] = attrValue === \"\" ? attrValue : attrValue || true\n\t\t}\n\t}\n\tif (classes.length > 0) attrs.className = classes.join(\" \")\n\treturn selectorCache[selector] = {tag: tag, attrs: attrs}\n}\n\nfunction execSelector(state, vnode) {\n\tvar attrs = vnode.attrs\n\tvar children = Vnode.normalizeChildren(vnode.children)\n\tvar hasClass = hasOwn.call(attrs, \"class\")\n\tvar className = hasClass ? attrs.class : attrs.className\n\n\tvnode.tag = state.tag\n\tvnode.attrs = null\n\tvnode.children = undefined\n\n\tif (!isEmpty(state.attrs) && !isEmpty(attrs)) {\n\t\tvar newAttrs = {}\n\n\t\tfor (var key in attrs) {\n\t\t\tif (hasOwn.call(attrs, key)) newAttrs[key] = attrs[key]\n\t\t}\n\n\t\tattrs = newAttrs\n\t}\n\n\tfor (var key in state.attrs) {\n\t\tif (hasOwn.call(state.attrs, key) && key !== \"className\" && !hasOwn.call(attrs, key)){\n\t\t\tattrs[key] = state.attrs[key]\n\t\t}\n\t}\n\tif (className != null || state.attrs.className != null) attrs.className =\n\t\tclassName != null\n\t\t\t? state.attrs.className != null\n\t\t\t\t? String(state.attrs.className) + \" \" + String(className)\n\t\t\t\t: className\n\t\t\t: state.attrs.className != null\n\t\t\t\t? state.attrs.className\n\t\t\t\t: null\n\n\tif (hasClass) attrs.class = null\n\n\tfor (var key in attrs) {\n\t\tif (hasOwn.call(attrs, key) && key !== \"key\") {\n\t\t\tvnode.attrs = attrs\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif (Array.isArray(children) && children.length === 1 && children[0] != null && children[0].tag === \"#\") {\n\t\tvnode.text = children[0].children\n\t} else {\n\t\tvnode.children = children\n\t}\n\n\treturn vnode\n}\n\nfunction hyperscript(selector) {\n\tif (selector == null || typeof selector !== \"string\" && typeof selector !== \"function\" && typeof selector.view !== \"function\") {\n\t\tthrow Error(\"The selector must be either a string or a component.\");\n\t}\n\n\tvar vnode = hyperscriptVnode.apply(1, arguments)\n\n\tif (typeof selector === \"string\") {\n\t\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\t\tif (selector !== \"[\") return execSelector(selectorCache[selector] || compileSelector(selector), vnode)\n\t}\n\n\tvnode.tag = selector\n\treturn vnode\n}\n\nmodule.exports = hyperscript\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\n// Call via `hyperscriptVnode.apply(startOffset, arguments)`\n//\n// The reason I do it this way, forwarding the arguments and passing the start\n// offset in `this`, is so I don't have to create a temporary array in a\n// performance-critical path.\n//\n// In native ES6, I'd instead add a final `...args` parameter to the\n// `hyperscript` and `fragment` factories and define this as\n// `hyperscriptVnode(...args)`, since modern engines do optimize that away. But\n// ES5 (what Mithril requires thanks to IE support) doesn't give me that luxury,\n// and engines aren't nearly intelligent enough to do either of these:\n//\n// 1. Elide the allocation for `[].slice.call(arguments, 1)` when it's passed to\n// another function only to be indexed.\n// 2. Elide an `arguments` allocation when it's passed to any function other\n// than `Function.prototype.apply` or `Reflect.apply`.\n//\n// In ES6, it'd probably look closer to this (I'd need to profile it, though):\n// module.exports = function(attrs, ...children) {\n// if (attrs == null || typeof attrs === \"object\" && attrs.tag == null && !Array.isArray(attrs)) {\n// if (children.length === 1 && Array.isArray(children[0])) children = children[0]\n// } else {\n// children = children.length === 0 && Array.isArray(attrs) ? attrs : [attrs, ...children]\n// attrs = undefined\n// }\n//\n// if (attrs == null) attrs = {}\n// return Vnode(\"\", attrs.key, attrs, children)\n// }\nmodule.exports = function() {\n\tvar attrs = arguments[this], start = this + 1, children\n\n\tif (attrs == null) {\n\t\tattrs = {}\n\t} else if (typeof attrs !== \"object\" || attrs.tag != null || Array.isArray(attrs)) {\n\t\tattrs = {}\n\t\tstart = this\n\t}\n\n\tif (arguments.length === start + 1) {\n\t\tchildren = arguments[start]\n\t\tif (!Array.isArray(children)) children = [children]\n\t} else {\n\t\tchildren = []\n\t\twhile (start < arguments.length) children.push(arguments[start++])\n\t}\n\n\treturn Vnode(\"\", attrs.key, attrs, children)\n}\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./polyfill\")\n\nif (typeof window !== \"undefined\") {\n\tif (typeof window.Promise === \"undefined\") {\n\t\twindow.Promise = PromisePolyfill\n\t} else if (!window.Promise.prototype.finally) {\n\t\twindow.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = window.Promise\n} else if (typeof global !== \"undefined\") {\n\tif (typeof global.Promise === \"undefined\") {\n\t\tglobal.Promise = PromisePolyfill\n\t} else if (!global.Promise.prototype.finally) {\n\t\tglobal.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = global.Promise\n} else {\n\tmodule.exports = PromisePolyfill\n}\n","\"use strict\"\n/** @constructor */\nvar PromisePolyfill = function(executor) {\n\tif (!(this instanceof PromisePolyfill)) throw new Error(\"Promise must be called with `new`\")\n\tif (typeof executor !== \"function\") throw new TypeError(\"executor must be a function\")\n\n\tvar self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false)\n\tvar instance = self._instance = {resolvers: resolvers, rejectors: rejectors}\n\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\tfunction handler(list, shouldAbsorb) {\n\t\treturn function execute(value) {\n\t\t\tvar then\n\t\t\ttry {\n\t\t\t\tif (shouldAbsorb && value != null && (typeof value === \"object\" || typeof value === \"function\") && typeof (then = value.then) === \"function\") {\n\t\t\t\t\tif (value === self) throw new TypeError(\"Promise can't be resolved w/ itself\")\n\t\t\t\t\texecuteOnce(then.bind(value))\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcallAsync(function() {\n\t\t\t\t\t\tif (!shouldAbsorb && list.length === 0) console.error(\"Possible unhandled promise rejection:\", value)\n\t\t\t\t\t\tfor (var i = 0; i < list.length; i++) list[i](value)\n\t\t\t\t\t\tresolvers.length = 0, rejectors.length = 0\n\t\t\t\t\t\tinstance.state = shouldAbsorb\n\t\t\t\t\t\tinstance.retry = function() {execute(value)}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\trejectCurrent(e)\n\t\t\t}\n\t\t}\n\t}\n\tfunction executeOnce(then) {\n\t\tvar runs = 0\n\t\tfunction run(fn) {\n\t\t\treturn function(value) {\n\t\t\t\tif (runs++ > 0) return\n\t\t\t\tfn(value)\n\t\t\t}\n\t\t}\n\t\tvar onerror = run(rejectCurrent)\n\t\ttry {then(run(resolveCurrent), onerror)} catch (e) {onerror(e)}\n\t}\n\n\texecuteOnce(executor)\n}\nPromisePolyfill.prototype.then = function(onFulfilled, onRejection) {\n\tvar self = this, instance = self._instance\n\tfunction handle(callback, list, next, state) {\n\t\tlist.push(function(value) {\n\t\t\tif (typeof callback !== \"function\") next(value)\n\t\t\telse try {resolveNext(callback(value))} catch (e) {if (rejectNext) rejectNext(e)}\n\t\t})\n\t\tif (typeof instance.retry === \"function\" && state === instance.state) instance.retry()\n\t}\n\tvar resolveNext, rejectNext\n\tvar promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject})\n\thandle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false)\n\treturn promise\n}\nPromisePolyfill.prototype.catch = function(onRejection) {\n\treturn this.then(null, onRejection)\n}\nPromisePolyfill.prototype.finally = function(callback) {\n\treturn this.then(\n\t\tfunction(value) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn value\n\t\t\t})\n\t\t},\n\t\tfunction(reason) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn PromisePolyfill.reject(reason);\n\t\t\t})\n\t\t}\n\t)\n}\nPromisePolyfill.resolve = function(value) {\n\tif (value instanceof PromisePolyfill) return value\n\treturn new PromisePolyfill(function(resolve) {resolve(value)})\n}\nPromisePolyfill.reject = function(value) {\n\treturn new PromisePolyfill(function(resolve, reject) {reject(value)})\n}\nPromisePolyfill.all = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tvar total = list.length, count = 0, values = []\n\t\tif (list.length === 0) resolve([])\n\t\telse for (var i = 0; i < list.length; i++) {\n\t\t\t(function(i) {\n\t\t\t\tfunction consume(value) {\n\t\t\t\t\tcount++\n\t\t\t\t\tvalues[i] = value\n\t\t\t\t\tif (count === total) resolve(values)\n\t\t\t\t}\n\t\t\t\tif (list[i] != null && (typeof list[i] === \"object\" || typeof list[i] === \"function\") && typeof list[i].then === \"function\") {\n\t\t\t\t\tlist[i].then(consume, reject)\n\t\t\t\t}\n\t\t\t\telse consume(list[i])\n\t\t\t})(i)\n\t\t}\n\t})\n}\nPromisePolyfill.race = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tfor (var i = 0; i < list.length; i++) {\n\t\t\tlist[i].then(resolve, reject)\n\t\t}\n\t})\n}\n\nmodule.exports = PromisePolyfill\n","var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n","\"use strict\"\n\nmodule.exports = require(\"./render/render\")(window)\n","\"use strict\"\n\nmodule.exports = function(object) {\n\tif (Object.prototype.toString.call(object) !== \"[object Object]\") return \"\"\n\n\tvar args = []\n\tfor (var key in object) {\n\t\tdestructure(key, object[key])\n\t}\n\n\treturn args.join(\"&\")\n\n\tfunction destructure(key, value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tfor (var i = 0; i < value.length; i++) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse if (Object.prototype.toString.call(value) === \"[object Object]\") {\n\t\t\tfor (var i in value) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse args.push(encodeURIComponent(key) + (value != null && value !== \"\" ? \"=\" + encodeURIComponent(value) : \"\"))\n\t}\n}\n","\"use strict\"\n\nmodule.exports = Object.assign || function(target, source) {\n\tif(source) Object.keys(source).forEach(function(key) { target[key] = source[key] })\n}\n","\"use strict\"\n\nmodule.exports = function(string) {\n\tif (string === \"\" || string == null) return {}\n\tif (string.charAt(0) === \"?\") string = string.slice(1)\n\n\tvar entries = string.split(\"&\"), counters = {}, data = {}\n\tfor (var i = 0; i < entries.length; i++) {\n\t\tvar entry = entries[i].split(\"=\")\n\t\tvar key = decodeURIComponent(entry[0])\n\t\tvar value = entry.length === 2 ? decodeURIComponent(entry[1]) : \"\"\n\n\t\tif (value === \"true\") value = true\n\t\telse if (value === \"false\") value = false\n\n\t\tvar levels = key.split(/\\]\\[?|\\[/)\n\t\tvar cursor = data\n\t\tif (key.indexOf(\"[\") > -1) levels.pop()\n\t\tfor (var j = 0; j < levels.length; j++) {\n\t\t\tvar level = levels[j], nextLevel = levels[j + 1]\n\t\t\tvar isNumber = nextLevel == \"\" || !isNaN(parseInt(nextLevel, 10))\n\t\t\tif (level === \"\") {\n\t\t\t\tvar key = levels.slice(0, j).join()\n\t\t\t\tif (counters[key] == null) {\n\t\t\t\t\tcounters[key] = Array.isArray(cursor) ? cursor.length : 0\n\t\t\t\t}\n\t\t\t\tlevel = counters[key]++\n\t\t\t}\n\t\t\t// Disallow direct prototype pollution\n\t\t\telse if (level === \"__proto__\") break\n\t\t\tif (j === levels.length - 1) cursor[level] = value\n\t\t\telse {\n\t\t\t\t// Read own properties exclusively to disallow indirect\n\t\t\t\t// prototype pollution\n\t\t\t\tvar desc = Object.getOwnPropertyDescriptor(cursor, level)\n\t\t\t\tif (desc != null) desc = desc.value\n\t\t\t\tif (desc == null) cursor[level] = desc = isNumber ? [] : {}\n\t\t\t\tcursor = desc\n\t\t\t}\n\t\t}\n\t}\n\treturn data\n}\n","// Robert Penner's easeInOutQuad\n\n// find the rest of his easing functions here: http://robertpenner.com/easing/\n// find them exported for ES6 consumption here: https://github.com/jaxgeller/ez.js\n\nvar easeInOutQuad = function easeInOutQuad(t, b, c, d) {\n t /= d / 2;\n if (t < 1) return c / 2 * t * t + b;\n t--;\n return -c / 2 * (t * (t - 2) - 1) + b;\n};\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar jumper = function jumper() {\n // private variable cache\n // no variables are created during a jump, preventing memory leaks\n\n var element = void 0; // element to scroll to (node)\n\n var start = void 0; // where scroll starts (px)\n var stop = void 0; // where scroll stops (px)\n\n var offset = void 0; // adjustment from the stop position (px)\n var easing = void 0; // easing function (function)\n var a11y = void 0; // accessibility support flag (boolean)\n\n var distance = void 0; // distance of scroll (px)\n var duration = void 0; // scroll duration (ms)\n\n var timeStart = void 0; // time scroll started (ms)\n var timeElapsed = void 0; // time spent scrolling thus far (ms)\n\n var next = void 0; // next scroll position (px)\n\n var callback = void 0; // to call when done scrolling (function)\n\n // scroll position helper\n\n function location() {\n return window.scrollY || window.pageYOffset;\n }\n\n // element offset helper\n\n function top(element) {\n return element.getBoundingClientRect().top + start;\n }\n\n // rAF loop helper\n\n function loop(timeCurrent) {\n // store time scroll started, if not started already\n if (!timeStart) {\n timeStart = timeCurrent;\n }\n\n // determine time spent scrolling so far\n timeElapsed = timeCurrent - timeStart;\n\n // calculate next scroll position\n next = easing(timeElapsed, start, distance, duration);\n\n // scroll to it\n window.scrollTo(0, next);\n\n // check progress\n timeElapsed < duration ? window.requestAnimationFrame(loop) // continue scroll loop\n : done(); // scrolling is done\n }\n\n // scroll finished helper\n\n function done() {\n // account for rAF time rounding inaccuracies\n window.scrollTo(0, start + distance);\n\n // if scrolling to an element, and accessibility is enabled\n if (element && a11y) {\n // add tabindex indicating programmatic focus\n element.setAttribute('tabindex', '-1');\n\n // focus the element\n element.focus();\n }\n\n // if it exists, fire the callback\n if (typeof callback === 'function') {\n callback();\n }\n\n // reset time for next jump\n timeStart = false;\n }\n\n // API\n\n function jump(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // resolve options, or use defaults\n duration = options.duration || 1000;\n offset = options.offset || 0;\n callback = options.callback; // \"undefined\" is a suitable default, and won't be called\n easing = options.easing || easeInOutQuad;\n a11y = options.a11y || false;\n\n // cache starting position\n start = location();\n\n // resolve target\n switch (typeof target === 'undefined' ? 'undefined' : _typeof(target)) {\n // scroll from current position\n case 'number':\n element = undefined; // no element to scroll to\n a11y = false; // make sure accessibility is off\n stop = start + target;\n break;\n\n // scroll to element (node)\n // bounding rect is relative to the viewport\n case 'object':\n element = target;\n stop = top(element);\n break;\n\n // scroll to element (selector)\n // bounding rect is relative to the viewport\n case 'string':\n element = document.querySelector(target);\n stop = top(element);\n break;\n }\n\n // resolve scroll distance, accounting for offset\n distance = stop - start + offset;\n\n // resolve duration\n switch (_typeof(options.duration)) {\n // number in ms\n case 'number':\n duration = options.duration;\n break;\n\n // function passed the distance of the scroll\n case 'function':\n duration = options.duration(distance);\n break;\n }\n\n // start the loop\n window.requestAnimationFrame(loop);\n }\n\n // expose only the jump method\n return jump;\n};\n\n// export singleton\n\nvar singleton = jumper();\n\nexport default singleton;\n","// Utils\nimport debounce from './utils/debounce';\nimport isFunction from './utils/isFunction';\n\n// Methods\nimport update from './methods/update';\nimport destroy from './methods/destroy';\nimport enableEventListeners from './methods/enableEventListeners';\nimport disableEventListeners from './methods/disableEventListeners';\nimport Defaults from './methods/defaults';\nimport placements from './methods/placements';\n\nexport default class Popper {\n /**\n * Creates a new Popper.js instance.\n * @class Popper\n * @param {Element|referenceObject} reference - The reference element used to position the popper\n * @param {Element} popper - The HTML / XML element used as the popper\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n constructor(reference, popper, options = {}) {\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = { ...Popper.Defaults, ...options };\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: [],\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys({\n ...Popper.Defaults.modifiers,\n ...options.modifiers,\n }).forEach(name => {\n this.options.modifiers[name] = {\n // If it's a built-in modifier, use it as base\n ...(Popper.Defaults.modifiers[name] || {}),\n // If there are custom options, override and merge with default ones\n ...(options.modifiers ? options.modifiers[name] : {}),\n };\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers)\n .map(name => ({\n name,\n ...this.options.modifiers[name],\n }))\n // sort the modifiers by order\n .sort((a, b) => a.order - b.order);\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(modifierOptions => {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(\n this.reference,\n this.popper,\n this.options,\n modifierOptions,\n this.state\n );\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n\n const eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n update() {\n return update.call(this);\n }\n destroy() {\n return destroy.call(this);\n }\n enableEventListeners() {\n return enableEventListeners.call(this);\n }\n disableEventListeners() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedules an update. It will run on the next UI update available.\n * @method scheduleUpdate\n * @memberof Popper\n */\n scheduleUpdate = () => requestAnimationFrame(this.update);\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n static Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\n\n static placements = placements;\n\n static Defaults = Defaults;\n}\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.
\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n","/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nexport default function isFunction(functionToCheck) {\n const getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","import jump from 'jump.js';\nimport Tooltip from 'tooltip.js';\n\n// add $.fn.tooltip\n$.fn.tooltip = function (option) {\n return this.each(function () {\n const $this = $(this);\n let data = $this.data('bs.tooltip');\n const options = typeof option === 'object' && option || {};\n\n if ($this.attr('title')) {\n options.title = $this.attr('title');\n $this.removeAttr('title');\n $this.attr('data-original-title', options.title);\n }\n\n if (option === 'destroy') option = 'dispose';\n\n if (!data && ['dispose', 'hide'].includes(option)) return;\n\n if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)));\n if (typeof option === 'string' && data[option]) data[option]();\n });\n};\n\n// add $.fn.outerWidth and $.fn.outerHeight\n['width', 'height'].forEach(function(dimension) {\n const Dimension = dimension.replace(/./, function (m) {\n return m[0].toUpperCase()\n });\n\n $.fn[`outer${Dimension}`] = function(margin) {\n const elem = this;\n\n if (elem) {\n const sides = {'width': ['left', 'right'], 'height': ['top', 'bottom']};\n let size = elem[dimension]();\n\n sides[dimension].forEach(function(side) {\n if (margin) size += parseInt(elem.css('margin-' + side), 10);\n });\n\n return size;\n } else {\n return null;\n }\n };\n});\n\n// allow use of $(':input')\n// @ts-ignore\n$.expr[':']['input'] = function() {\n if (('disabled' in this) || ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON'].includes(this.tagName)) return this;\n};\n\n// add $().hover() method\n$.fn.hover = function(hover, leave) {\n return this\n .on('mouseenter', hover)\n .on('mouseleave', leave || hover);\n};\n\n// add animated scroll\n$.fn.animatedScrollTop = function (to, duration = $.fx.speeds._default, callback) {\n if (typeof to === 'number') to -= (window.scrollY || window.pageYOffset);\n\n jump(to, {\n duration: $.fx.speeds[duration] || duration,\n callback\n });\n\n return this;\n};\n\n// required for compatibility with jquery plugins\n// ex: bootstrap plugins\n$.fn.extend = $.extend.bind($);\n\n/**\n * Enable special events on Zepto\n * @license Original Copyright 2013 Enideo. Released under dual MIT and GPL licenses.\n */\n// @ts-ignore\n$.event.special = $.event.special || {};\n\nconst bindBeforeSpecialEvents = $.fn.bind;\n\n$.fn.bind = function(eventName, data, callback) {\n const el = this;\n\n if (!callback){\n callback = data;\n data = null;\n }\n\n $.each(eventName.split(/\\s/), (key: string, value: any) : boolean => {\n value = value.split(/\\./)[0];\n\n if(value in $.event.special){\n let specialEvent = $.event.special[value];\n\n /// init enable special events on Zepto\n if(!specialEvent._init) {\n specialEvent._init = true;\n\n /// intercept and replace the special event handler to add functionality\n specialEvent.originalHandler = specialEvent.handler;\n specialEvent.handler = function(){\n\n /// make event argument writable, like on jQuery\n const args = Array.prototype.slice.call(arguments);\n\n args[0] = $.extend({},args[0]);\n\n /// define the event handle, $.event.dispatch is only for newer versions of jQuery\n $.event.handle = function(){\n\n /// make context of trigger the event element\n const args = Array.prototype.slice.call(arguments);\n const event = args[0];\n const $target = $(event.target);\n\n $target.trigger.apply( $target, arguments );\n };\n\n specialEvent.originalHandler.apply(this,args);\n }\n }\n\n /// setup special events on Zepto\n specialEvent.setup.apply(el, [data]);\n }\n\n return true;\n });\n\n return bindBeforeSpecialEvents.apply(this, [eventName, callback]);\n};\n","import 'expose-loader?jQuery!zepto';\nimport 'expose-loader?moment!expose-loader?dayjs!dayjs';\nimport 'expose-loader?m!mithril';\nimport 'expose-loader?m.bidi!m.attrs.bidi';\nimport 'expose-loader?Mousetrap!mousetrap';\nimport 'expose-loader?classNames!classNames';\n\nimport 'zepto/src/selector';\nimport 'zepto/src/data';\nimport 'zepto/src/fx';\nimport 'zepto/src/fx_methods';\n\nimport './utils/patchZepto';\n\nimport 'hc-sticky';\nimport 'bootstrap/js/dropdown';\nimport 'bootstrap/js/transition';\n\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport localizedFormat from 'dayjs/plugin/localizedFormat';\n\ndayjs.extend(relativeTime);\ndayjs.extend(localizedFormat);\n\nimport patchMithril from './utils/patchMithril';\n\npatchMithril();\n\n// import * as Extend from './extend/index';\n\n// export { Extend };\n","import isBrowser from './isBrowser';\n\nconst longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\nlet timeoutDuration = 0;\nfor (let i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n timeoutDuration = 1;\n break;\n }\n}\n\nexport function microtaskDebounce(fn) {\n let called = false\n return () => {\n if (called) {\n return\n }\n called = true\n window.Promise.resolve().then(() => {\n called = false\n fn()\n })\n }\n}\n\nexport function taskDebounce(fn) {\n let scheduled = false;\n return () => {\n if (!scheduled) {\n scheduled = true;\n setTimeout(() => {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nconst supportsMicroTasks = isBrowser && window.Promise\n\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nexport default (supportsMicroTasks\n ? microtaskDebounce\n : taskDebounce);\n","export default typeof window !== 'undefined' && typeof document !== 'undefined';\n","/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nexport default function isFunction(functionToCheck) {\n const getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nexport default function getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n const window = element.ownerDocument.defaultView;\n const css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n","/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nexport default function getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nexport default function getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body\n case '#document':\n return element.body\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n const { overflow, overflowX, overflowY } = getStyleComputedProperty(element);\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n","import isBrowser from './isBrowser';\n\nconst isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nconst isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nexport default function isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nexport default function getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n const noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n let offsetParent = element.offsetParent || null;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n const nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (\n ['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 &&\n getStyleComputedProperty(offsetParent, 'position') === 'static'\n ) {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n","/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nexport default function getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n","import isOffsetContainer from './isOffsetContainer';\nimport getRoot from './getRoot';\nimport getOffsetParent from './getOffsetParent';\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nexport default function findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n const order =\n element1.compareDocumentPosition(element2) &\n Node.DOCUMENT_POSITION_FOLLOWING;\n const start = order ? element1 : element2;\n const end = order ? element2 : element1;\n\n // Get common ancestor container\n const range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n const { commonAncestorContainer } = range;\n\n // Both nodes are inside #document\n if (\n (element1 !== commonAncestorContainer &&\n element2 !== commonAncestorContainer) ||\n start.contains(end)\n ) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n const element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n","import getOffsetParent from './getOffsetParent';\n\nexport default function isOffsetContainer(element) {\n const { nodeName } = element;\n if (nodeName === 'BODY') {\n return false;\n }\n return (\n nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element\n );\n}\n","/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nexport default function getScroll(element, side = 'top') {\n const upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n const nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n const html = element.ownerDocument.documentElement;\n const scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n","/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nexport default function getBordersSize(styles, axis) {\n const sideA = axis === 'x' ? 'Left' : 'Top';\n const sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return (\n parseFloat(styles[`border${sideA}Width`], 10) +\n parseFloat(styles[`border${sideB}Width`], 10)\n );\n}\n","import isIE from './isIE';\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(\n body[`offset${axis}`],\n body[`scroll${axis}`],\n html[`client${axis}`],\n html[`offset${axis}`],\n html[`scroll${axis}`],\n isIE(10)\n ? (parseInt(html[`offset${axis}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Top' : 'Left'}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Bottom' : 'Right'}`]))\n : 0 \n );\n}\n\nexport default function getWindowSizes(document) {\n const body = document.body;\n const html = document.documentElement;\n const computedStyle = isIE(10) && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle),\n };\n}\n","/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nexport default function getClientRect(offsets) {\n return {\n ...offsets,\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height,\n };\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getBordersSize from './getBordersSize';\nimport getWindowSizes from './getWindowSizes';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\nimport isIE from './isIE';\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nexport default function getBoundingClientRect(element) {\n let rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n }\n else {\n rect = element.getBoundingClientRect();\n }\n }\n catch(e){}\n\n const result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top,\n };\n\n // subtract scrollbar size from sizes\n const sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n const width =\n sizes.width || element.clientWidth || result.right - result.left;\n const height =\n sizes.height || element.clientHeight || result.bottom - result.top;\n\n let horizScrollbar = element.offsetWidth - width;\n let vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n const styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport includeScroll from './includeScroll';\nimport getScrollParent from './getScrollParent';\nimport getBoundingClientRect from './getBoundingClientRect';\nimport runIsIE from './isIE';\nimport getClientRect from './getClientRect';\n\nexport default function getOffsetRectRelativeToArbitraryNode(children, parent, fixedPosition = false) {\n const isIE10 = runIsIE(10);\n const isHTML = parent.nodeName === 'HTML';\n const childrenRect = getBoundingClientRect(children);\n const parentRect = getBoundingClientRect(parent);\n const scrollParent = getScrollParent(children);\n\n const styles = getStyleComputedProperty(parent);\n const borderTopWidth = parseFloat(styles.borderTopWidth, 10);\n const borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if(fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n let offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height,\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n const marginTop = parseFloat(styles.marginTop, 10);\n const marginLeft = parseFloat(styles.marginLeft, 10);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (\n isIE10 && !fixedPosition\n ? parent.contains(scrollParent)\n : parent === scrollParent && scrollParent.nodeName !== 'BODY'\n ) {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n","import getScroll from './getScroll';\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nexport default function includeScroll(rect, element, subtract = false) {\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n const modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nexport default function getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n let el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n\n}\n","import getScrollParent from './getScrollParent';\nimport getParentNode from './getParentNode';\nimport findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getViewportOffsetRectRelativeToArtbitraryNode from './getViewportOffsetRectRelativeToArtbitraryNode';\nimport getWindowSizes from './getWindowSizes';\nimport isFixed from './isFixed';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nexport default function getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement,\n fixedPosition = false\n) {\n // NOTE: 1 DOM access here\n\n let boundaries = { top: 0, left: 0 };\n const offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);\n\n // Handle viewport case\n if (boundariesElement === 'viewport' ) {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n }\n\n else {\n // Handle other cases based on DOM element used as boundaries\n let boundariesNode;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n const offsets = getOffsetRectRelativeToArbitraryNode(\n boundariesNode,\n offsetParent,\n fixedPosition\n );\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n const { height, width } = getWindowSizes(popper.ownerDocument);\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n padding = padding || 0;\n const isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0; \n boundaries.top += isPaddingNumber ? padding : padding.top || 0; \n boundaries.right -= isPaddingNumber ? padding : padding.right || 0; \n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0; \n\n return boundaries;\n}\n","import getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\n\nexport default function getViewportOffsetRectRelativeToArtbitraryNode(element, excludeScroll = false) {\n const html = element.ownerDocument.documentElement;\n const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n const width = Math.max(html.clientWidth, window.innerWidth || 0);\n const height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n const scrollTop = !excludeScroll ? getScroll(html) : 0;\n const scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n const offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width,\n height,\n };\n\n return getClientRect(offset);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nexport default function isFixed(element) {\n const nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n const parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n","import getBoundaries from '../utils/getBoundaries';\n\nfunction getArea({ width, height }) {\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeAutoPlacement(\n placement,\n refRect,\n popper,\n reference,\n boundariesElement,\n padding = 0\n) {\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n const boundaries = getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement\n );\n\n const rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top,\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height,\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom,\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height,\n },\n };\n\n const sortedAreas = Object.keys(rects)\n .map(key => ({\n key,\n ...rects[key],\n area: getArea(rects[key]),\n }))\n .sort((a, b) => b.area - a.area);\n\n const filteredAreas = sortedAreas.filter(\n ({ width, height }) =>\n width >= popper.clientWidth && height >= popper.clientHeight\n );\n\n const computedPlacement = filteredAreas.length > 0\n ? filteredAreas[0].key\n : sortedAreas[0].key;\n\n const variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? `-${variation}` : '');\n}\n","import findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nexport default function getReferenceOffsets(state, popper, reference, fixedPosition = null) {\n const commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n","/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nexport default function getOuterSizes(element) {\n const window = element.ownerDocument.defaultView;\n const styles = window.getComputedStyle(element);\n const x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n const y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n const result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x,\n };\n return result;\n}\n","/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nexport default function getOppositePlacement(placement) {\n const hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, matched => hash[matched]);\n}\n","import getOuterSizes from './getOuterSizes';\nimport getOppositePlacement from './getOppositePlacement';\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nexport default function getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n const popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n const popperOffsets = {\n width: popperRect.width,\n height: popperRect.height,\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n const isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n const mainSide = isHoriz ? 'top' : 'left';\n const secondarySide = isHoriz ? 'left' : 'top';\n const measurement = isHoriz ? 'height' : 'width';\n const secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] =\n referenceOffsets[mainSide] +\n referenceOffsets[measurement] / 2 -\n popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] =\n referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] =\n referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n","/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n","import isFunction from './isFunction';\nimport findIndex from './findIndex';\nimport getClientRect from '../utils/getClientRect';\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nexport default function runModifiers(modifiers, data, ends) {\n const modifiersToRun = ends === undefined\n ? modifiers\n : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(modifier => {\n if (modifier['function']) { // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n const fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n","import find from './find';\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(cur => cur[prop] === value);\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n const match = find(arr, obj => obj[prop] === value);\n return arr.indexOf(match);\n}\n","import computeAutoPlacement from '../utils/computeAutoPlacement';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.
\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nexport default function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n let data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {},\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(\n this.state,\n this.popper,\n this.reference,\n this.options.positionFixed\n );\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(\n this.options.placement,\n data.offsets.reference,\n this.popper,\n this.reference,\n this.options.modifiers.flip.boundariesElement,\n this.options.modifiers.flip.padding\n );\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(\n this.popper,\n data.offsets.reference,\n data.placement\n );\n\n data.offsets.popper.position = this.options.positionFixed\n ? 'fixed'\n : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n","/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nexport default function isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(\n ({ name, enabled }) => enabled && name === modifierName\n );\n}\n","/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nexport default function getSupportedPropertyName(property) {\n const prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n const upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (let i = 0; i < prefixes.length; i++) {\n const prefix = prefixes[i];\n const toCheck = prefix ? `${prefix}${upperProp}` : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n","import isModifierEnabled from '../utils/isModifierEnabled';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nexport default function destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicity asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n","/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nexport default function getWindow(element) {\n const ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n","import getScrollParent from './getScrollParent';\nimport getWindow from './getWindow';\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n const isBody = scrollParent.nodeName === 'BODY';\n const target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(\n getScrollParent(target.parentNode),\n event,\n callback,\n scrollParents\n );\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function setupEventListeners(\n reference,\n options,\n state,\n updateBound\n) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n const scrollElement = getScrollParent(reference);\n attachToScrollParents(\n scrollElement,\n 'scroll',\n state.updateBound,\n state.scrollParents\n );\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n","import setupEventListeners from '../utils/setupEventListeners';\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nexport default function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(\n this.reference,\n this.options,\n this.state,\n this.scheduleUpdate\n );\n }\n}\n","import removeEventListeners from '../utils/removeEventListeners';\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nexport default function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n","import getWindow from './getWindow';\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(target => {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n","/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nexport default function isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n","import isNumeric from './isNumeric';\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setStyles(element, styles) {\n Object.keys(styles).forEach(prop => {\n let unit = '';\n // add unit if the value is numeric and is one of the following\n if (\n ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !==\n -1 &&\n isNumeric(styles[prop])\n ) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n","import getSupportedPropertyName from '../utils/getSupportedPropertyName';\nimport find from '../utils/find';\nimport getOffsetParent from '../utils/getOffsetParent';\nimport getBoundingClientRect from '../utils/getBoundingClientRect';\nimport getRoundedOffsets from '../utils/getRoundedOffsets';\nimport isBrowser from '../utils/isBrowser';\n\nconst isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeStyle(data, options) {\n const { x, y } = options;\n const { popper } = data.offsets;\n\n // Remove this legacy support in Popper.js v2\n const legacyGpuAccelerationOption = find(\n data.instance.modifiers,\n modifier => modifier.name === 'applyStyle'\n ).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn(\n 'WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'\n );\n }\n const gpuAcceleration =\n legacyGpuAccelerationOption !== undefined\n ? legacyGpuAccelerationOption\n : options.gpuAcceleration;\n\n const offsetParent = getOffsetParent(data.instance.popper);\n const offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n const styles = {\n position: popper.position,\n };\n\n const offsets = getRoundedOffsets(\n data,\n window.devicePixelRatio < 2 || !isFirefox\n );\n\n const sideA = x === 'bottom' ? 'top' : 'bottom';\n const sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n const prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n let left, top;\n if (sideA === 'bottom') {\n // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = `translate3d(${left}px, ${top}px, 0)`;\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n const invertTop = sideA === 'bottom' ? -1 : 1;\n const invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = `${sideA}, ${sideB}`;\n }\n\n // Attributes\n const attributes = {\n 'x-placement': data.placement,\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = { ...attributes, ...data.attributes };\n data.styles = { ...styles, ...data.styles };\n data.arrowStyles = { ...data.offsets.arrow, ...data.arrowStyles };\n\n return data;\n}\n","import find from './find';\n\n/**\n * Helper used to know if the given modifier depends from another one.
\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nexport default function isModifierRequired(\n modifiers,\n requestingName,\n requestedName\n) {\n const requesting = find(modifiers, ({ name }) => name === requestingName);\n\n const isRequired =\n !!requesting &&\n modifiers.some(modifier => {\n return (\n modifier.name === requestedName &&\n modifier.enabled &&\n modifier.order < requesting.order\n );\n });\n\n if (!isRequired) {\n const requesting = `\\`${requestingName}\\``;\n const requested = `\\`${requestedName}\\``;\n console.warn(\n `${requested} modifier is required by ${requesting} modifier in order to work, be sure to include it before ${requesting}!`\n );\n }\n return isRequired;\n}\n","/**\n * List of accepted placements to use as values of the `placement` option.
\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.
\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nexport default [\n 'auto-start',\n 'auto',\n 'auto-end',\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n];\n","import placements from '../methods/placements';\n\n// Get rid of `auto` `auto-start` and `auto-end`\nconst validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nexport default function clockwise(placement, counter = false) {\n const index = validPlacements.indexOf(placement);\n const arr = validPlacements\n .slice(index + 1)\n .concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n","import getOppositePlacement from '../utils/getOppositePlacement';\nimport getOppositeVariation from '../utils/getOppositeVariation';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\nimport getBoundaries from '../utils/getBoundaries';\nimport isModifierEnabled from '../utils/isModifierEnabled';\nimport clockwise from '../utils/clockwise';\n\nconst BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise',\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n options.boundariesElement,\n data.positionFixed\n );\n\n let placement = data.placement.split('-')[0];\n let placementOpposite = getOppositePlacement(placement);\n let variation = data.placement.split('-')[1] || '';\n\n let flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach((step, index) => {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n const popperOffsets = data.offsets.popper;\n const refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n const floor = Math.floor;\n const overlapsRef =\n (placement === 'left' &&\n floor(popperOffsets.right) > floor(refOffsets.left)) ||\n (placement === 'right' &&\n floor(popperOffsets.left) < floor(refOffsets.right)) ||\n (placement === 'top' &&\n floor(popperOffsets.bottom) > floor(refOffsets.top)) ||\n (placement === 'bottom' &&\n floor(popperOffsets.top) < floor(refOffsets.bottom));\n\n const overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n const overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n const overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n const overflowsBottom =\n floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n const overflowsBoundaries =\n (placement === 'left' && overflowsLeft) ||\n (placement === 'right' && overflowsRight) ||\n (placement === 'top' && overflowsTop) ||\n (placement === 'bottom' && overflowsBottom);\n\n // flip the variation if required\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n // flips variation if reference element overflows boundaries\n const flippedVariationByRef =\n !!options.flipVariations &&\n ((isVertical && variation === 'start' && overflowsLeft) ||\n (isVertical && variation === 'end' && overflowsRight) ||\n (!isVertical && variation === 'start' && overflowsTop) ||\n (!isVertical && variation === 'end' && overflowsBottom));\n\n // flips variation if popper content overflows boundaries\n const flippedVariationByContent =\n !!options.flipVariationsByContent &&\n ((isVertical && variation === 'start' && overflowsRight) ||\n (isVertical && variation === 'end' && overflowsLeft) ||\n (!isVertical && variation === 'start' && overflowsBottom) ||\n (!isVertical && variation === 'end' && overflowsTop));\n\n const flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = {\n ...data.offsets.popper,\n ...getPopperOffsets(\n data.instance.popper,\n data.offsets.reference,\n data.placement\n ),\n };\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n","import isNumeric from '../utils/isNumeric';\nimport getClientRect from '../utils/getClientRect';\nimport find from '../utils/find';\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nexport function toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n const split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n const value = +split[1];\n const unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n let element;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n const rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n let size;\n if (unit === 'vh') {\n size = Math.max(\n document.documentElement.clientHeight,\n window.innerHeight || 0\n );\n } else {\n size = Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n );\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nexport function parseOffset(\n offset,\n popperOffsets,\n referenceOffsets,\n basePlacement\n) {\n const offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n const useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n const fragments = offset.split(/(\\+|\\-)/).map(frag => frag.trim());\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n const divider = fragments.indexOf(\n find(fragments, frag => frag.search(/,|\\s/) !== -1)\n );\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn(\n 'Offsets separated by white space(s) are deprecated, use a comma (,) instead.'\n );\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n const splitRegex = /\\s*,\\s*|\\s+/;\n let ops = divider !== -1\n ? [\n fragments\n .slice(0, divider)\n .concat([fragments[divider].split(splitRegex)[0]]),\n [fragments[divider].split(splitRegex)[1]].concat(\n fragments.slice(divider + 1)\n ),\n ]\n : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map((op, index) => {\n // Most of the units rely on the orientation of the popper\n const measurement = (index === 1 ? !useHeight : useHeight)\n ? 'height'\n : 'width';\n let mergeWithPrevious = false;\n return (\n op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce((a, b) => {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(str => toValue(str, measurement, popperOffsets, referenceOffsets))\n );\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach((op, index) => {\n op.forEach((frag, index2) => {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nexport default function offset(data, { offset }) {\n const { placement, offsets: { popper, reference } } = data;\n const basePlacement = placement.split('-')[0];\n\n let offsets;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n","import applyStyle, { applyStyleOnLoad } from './applyStyle';\nimport computeStyle from './computeStyle';\nimport arrow from './arrow';\nimport flip from './flip';\nimport keepTogether from './keepTogether';\nimport offset from './offset';\nimport preventOverflow from './preventOverflow';\nimport shift from './shift';\nimport hide from './hide';\nimport inner from './inner';\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.
\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.
\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nexport default {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.
\n * It will read the variation of the `placement` property.
\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift,\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.
\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.
\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.
\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0,\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries.
\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".
\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent',\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether,\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]',\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false,\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner,\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide,\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right',\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined,\n },\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n","import modifiers from '../modifiers/index';\n\n/**\n * Default options provided to Popper.js constructor.
\n * These can be overridden using the `options` argument of Popper.js.
\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nexport default {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: () => {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: () => {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers,\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function shift(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n const { reference, popper } = data.offsets;\n const isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n const side = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n const shiftOffsets = {\n start: { [side]: reference[side] },\n end: {\n [side]: reference[side] + reference[measurement] - popper[measurement],\n },\n };\n\n data.offsets.popper = { ...popper, ...shiftOffsets[shiftvariation] };\n }\n\n return data;\n}\n","import getOffsetParent from '../utils/getOffsetParent';\nimport getBoundaries from '../utils/getBoundaries';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function preventOverflow(data, options) {\n let boundariesElement =\n options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n const transformProp = getSupportedPropertyName('transform');\n const popperStyles = data.instance.popper.style; // assignment to help minification\n const { top, left, [transformProp]: transform } = popperStyles;\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n boundariesElement,\n data.positionFixed\n );\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n\n options.boundaries = boundaries;\n\n const order = options.priority;\n let popper = data.offsets.popper;\n\n const check = {\n primary(placement) {\n let value = popper[placement];\n if (\n popper[placement] < boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return { [placement]: value };\n },\n secondary(placement) {\n const mainSide = placement === 'right' ? 'left' : 'top';\n let value = popper[mainSide];\n if (\n popper[placement] > boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.min(\n popper[mainSide],\n boundaries[placement] -\n (placement === 'right' ? popper.width : popper.height)\n );\n }\n return { [mainSide]: value };\n },\n };\n\n order.forEach(placement => {\n const side =\n ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = { ...popper, ...check[side](placement) };\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function keepTogether(data) {\n const { popper, reference } = data.offsets;\n const placement = data.placement.split('-')[0];\n const floor = Math.floor;\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n const side = isVertical ? 'right' : 'bottom';\n const opSide = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] =\n floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOuterSizes from '../utils/getOuterSizes';\nimport isModifierRequired from '../utils/isModifierRequired';\nimport getStyleComputedProperty from '../utils/getStyleComputedProperty';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function arrow(data, options) {\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n let arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn(\n 'WARNING: `arrow.element` must be child of its popper element!'\n );\n return data;\n }\n }\n\n const placement = data.placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n const len = isVertical ? 'height' : 'width';\n const sideCapitalized = isVertical ? 'Top' : 'Left';\n const side = sideCapitalized.toLowerCase();\n const altSide = isVertical ? 'left' : 'top';\n const opSide = isVertical ? 'bottom' : 'right';\n const arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -=\n popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] +=\n reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n const center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n const css = getStyleComputedProperty(data.instance.popper);\n const popperMarginSide = parseFloat(css[`margin${sideCapitalized}`], 10);\n const popperBorderSide = parseFloat(css[`border${sideCapitalized}Width`], 10);\n let sideValue =\n center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = {\n [side]: Math.round(sideValue),\n [altSide]: '', // make sure to unset any eventual altSide value from the DOM node\n };\n\n return data;\n}\n","/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nexport default function getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOppositePlacement from '../utils/getOppositePlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function inner(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n const subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] =\n reference[basePlacement] -\n (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n","import isModifierRequired from '../utils/isModifierRequired';\nimport find from '../utils/find';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n const refRect = data.offsets.reference;\n const bound = find(\n data.instance.modifiers,\n modifier => modifier.name === 'preventOverflow'\n ).boundaries;\n\n if (\n refRect.bottom < bound.top ||\n refRect.left > bound.right ||\n refRect.top > bound.bottom ||\n refRect.right < bound.left\n ) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n","/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nexport default function getRoundedOffsets(data, shouldRound) {\n const { popper, reference } = data.offsets;\n const { round, floor } = Math;\n const noRound = v => v;\n \n const referenceWidth = round(reference.width);\n const popperWidth = round(popper.width);\n \n const isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n const isVariation = data.placement.indexOf('-') !== -1;\n const sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n const bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n const horizontalToInteger = !shouldRound\n ? noRound\n : isVertical || isVariation || sameWidthParity\n ? round\n : floor;\n const verticalToInteger = !shouldRound ? noRound : round;\n\n return {\n left: horizontalToInteger(\n bothOddWidth && !isVariation && shouldRound\n ? popper.left - 1\n : popper.left\n ),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right),\n };\n}\n","import setStyles from '../utils/setStyles';\nimport setAttributes from '../utils/setAttributes';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport computeAutoPlacement from '../utils/computeAutoPlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nexport default function applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nexport function applyStyleOnLoad(\n reference,\n popper,\n options,\n modifierOptions,\n state\n) {\n // compute reference element offsets\n const referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n const placement = computeAutoPlacement(\n options.placement,\n referenceOffsets,\n popper,\n reference,\n options.modifiers.flip.boundariesElement,\n options.modifiers.flip.padding\n );\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n return options;\n}\n","/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function(prop) {\n const value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n","!function(r,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):r.dayjs_plugin_relativeTime=t()}(this,function(){\"use strict\";return function(r,t,e){var n=t.prototype;e.en.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\"};var o=function(r,t,n,o){for(var d,i,u=n.$locale().relativeTime,a=[{l:\"s\",r:44,d:\"second\"},{l:\"m\",r:89},{l:\"mm\",r:44,d:\"minute\"},{l:\"h\",r:89},{l:\"hh\",r:21,d:\"hour\"},{l:\"d\",r:35},{l:\"dd\",r:25,d:\"day\"},{l:\"M\",r:45},{l:\"MM\",r:10,d:\"month\"},{l:\"y\",r:17},{l:\"yy\",d:\"year\"}],f=a.length,s=0;s0&&(l=a[s-1]),i=u[l.l].replace(\"%d\",h);break}}return t?i:(d>0?u.future:u.past).replace(\"%s\",i)};n.to=function(r,t){return o(r,t,this,!0)},n.from=function(r,t){return o(r,t,this)};var d=function(r){return r.$u?e.utc():e()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}});\n","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):e.dayjs_plugin_localizedFormat=t()}(this,function(){\"use strict\";return function(e,t,o){var n=t.prototype,r=n.format,M={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"};o.en.formats=M;n.format=function(e){void 0===e&&(e=\"YYYY-MM-DDTHH:mm:ssZ\");var t=this.$locale().formats,o=void 0===t?{}:t,n=e.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,t,n){var r=n&&n.toUpperCase();return t||o[n]||M[n]||o[r].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,o){return t||o.slice(1)})});return r.call(this,n)}}});\n","import prop from 'mithril/stream';\r\n\r\nexport default () => {\r\n const mo = global.m;\r\n\r\n const m = function (comp, ...args) {\r\n const node = mo.apply(this, arguments);\r\n\r\n if (!node.attrs) node.attrs = {};\r\n\r\n if (node.attrs.bidi) {\r\n m.bidi(node, node.attrs.bidi);\r\n }\r\n\r\n if (node.attrs.route) {\r\n node.attrs.href = node.attrs.route;\r\n node.attrs.tag = m.route.Link;\r\n\r\n delete node.attrs.route;\r\n }\r\n\r\n return node;\r\n };\r\n\r\n Object.keys(mo).forEach(key => m[key] = mo[key]);\r\n\r\n m.withAttr = (key: string, cb: Function) => function () {\r\n cb(this.getAttribute(key) || this[key]);\r\n };\r\n\r\n m.prop = prop;\r\n\r\n global.m = m;\r\n}\r\n","\"use strict\"\n\nmodule.exports = require(\"./stream/stream\")\n","module.exports = global[\"jQuery\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\imports-loader\\\\index.js?this=>window!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\zepto.js\");","/*** IMPORTS FROM imports-loader ***/\n(function() {\n\n/* Zepto v1.2.0 - zepto event ajax form ie - zeptojs.com/license */\n(function(global, factory) {\n if (typeof define === 'function' && define.amd)\n define(function() { return factory(global) })\n else\n factory(global)\n}(this, function(window) {\n var Zepto = (function() {\n var undefined, key, $, classList, emptyArray = [], concat = emptyArray.concat, filter = emptyArray.filter, slice = emptyArray.slice,\n document = window.document,\n elementDisplay = {}, classCache = {},\n cssNumber = { 'column-count': 1, 'columns': 1, 'font-weight': 1, 'line-height': 1,'opacity': 1, 'z-index': 1, 'zoom': 1 },\n fragmentRE = /^\\s*<(\\w+|!)[^>]*>/,\n singleTagRE = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,\n tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/ig,\n rootNodeRE = /^(?:body|html)$/i,\n capitalRE = /([A-Z])/g,\n\n // special attributes that should be get/set via method calls\n methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'],\n\n adjacencyOperators = [ 'after', 'prepend', 'before', 'append' ],\n table = document.createElement('table'),\n tableRow = document.createElement('tr'),\n containers = {\n 'tr': document.createElement('tbody'),\n 'tbody': table, 'thead': table, 'tfoot': table,\n 'td': tableRow, 'th': tableRow,\n '*': document.createElement('div')\n },\n readyRE = /complete|loaded|interactive/,\n simpleSelectorRE = /^[\\w-]*$/,\n class2type = {},\n toString = class2type.toString,\n zepto = {},\n camelize, uniq,\n tempParent = document.createElement('div'),\n propMap = {\n 'tabindex': 'tabIndex',\n 'readonly': 'readOnly',\n 'for': 'htmlFor',\n 'class': 'className',\n 'maxlength': 'maxLength',\n 'cellspacing': 'cellSpacing',\n 'cellpadding': 'cellPadding',\n 'rowspan': 'rowSpan',\n 'colspan': 'colSpan',\n 'usemap': 'useMap',\n 'frameborder': 'frameBorder',\n 'contenteditable': 'contentEditable'\n },\n isArray = Array.isArray ||\n function(object){ return object instanceof Array }\n\n zepto.matches = function(element, selector) {\n if (!selector || !element || element.nodeType !== 1) return false\n var matchesSelector = element.matches || element.webkitMatchesSelector ||\n element.mozMatchesSelector || element.oMatchesSelector ||\n element.matchesSelector\n if (matchesSelector) return matchesSelector.call(element, selector)\n // fall back to performing a selector:\n var match, parent = element.parentNode, temp = !parent\n if (temp) (parent = tempParent).appendChild(element)\n match = ~zepto.qsa(parent, selector).indexOf(element)\n temp && tempParent.removeChild(element)\n return match\n }\n\n function type(obj) {\n return obj == null ? String(obj) :\n class2type[toString.call(obj)] || \"object\"\n }\n\n function isFunction(value) { return type(value) == \"function\" }\n function isWindow(obj) { return obj != null && obj == obj.window }\n function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE }\n function isObject(obj) { return type(obj) == \"object\" }\n function isPlainObject(obj) {\n return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype\n }\n\n function likeArray(obj) {\n var length = !!obj && 'length' in obj && obj.length,\n type = $.type(obj)\n\n return 'function' != type && !isWindow(obj) && (\n 'array' == type || length === 0 ||\n (typeof length == 'number' && length > 0 && (length - 1) in obj)\n )\n }\n\n function compact(array) { return filter.call(array, function(item){ return item != null }) }\n function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array }\n camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : '' }) }\n function dasherize(str) {\n return str.replace(/::/g, '/')\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')\n .replace(/([a-z\\d])([A-Z])/g, '$1_$2')\n .replace(/_/g, '-')\n .toLowerCase()\n }\n uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) }\n\n function classRE(name) {\n return name in classCache ?\n classCache[name] : (classCache[name] = new RegExp('(^|\\\\s)' + name + '(\\\\s|$)'))\n }\n\n function maybeAddPx(name, value) {\n return (typeof value == \"number\" && !cssNumber[dasherize(name)]) ? value + \"px\" : value\n }\n\n function defaultDisplay(nodeName) {\n var element, display\n if (!elementDisplay[nodeName]) {\n element = document.createElement(nodeName)\n document.body.appendChild(element)\n display = getComputedStyle(element, '').getPropertyValue(\"display\")\n element.parentNode.removeChild(element)\n display == \"none\" && (display = \"block\")\n elementDisplay[nodeName] = display\n }\n return elementDisplay[nodeName]\n }\n\n function children(element) {\n return 'children' in element ?\n slice.call(element.children) :\n $.map(element.childNodes, function(node){ if (node.nodeType == 1) return node })\n }\n\n function Z(dom, selector) {\n var i, len = dom ? dom.length : 0\n for (i = 0; i < len; i++) this[i] = dom[i]\n this.length = len\n this.selector = selector || ''\n }\n\n // `$.zepto.fragment` takes a html string and an optional tag name\n // to generate DOM nodes from the given html string.\n // The generated DOM nodes are returned as an array.\n // This function can be overridden in plugins for example to make\n // it compatible with browsers that don't support the DOM fully.\n zepto.fragment = function(html, name, properties) {\n var dom, nodes, container\n\n // A special case optimization for a single tag\n if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1))\n\n if (!dom) {\n if (html.replace) html = html.replace(tagExpanderRE, \"<$1>\")\n if (name === undefined) name = fragmentRE.test(html) && RegExp.$1\n if (!(name in containers)) name = '*'\n\n container = containers[name]\n container.innerHTML = '' + html\n dom = $.each(slice.call(container.childNodes), function(){\n container.removeChild(this)\n })\n }\n\n if (isPlainObject(properties)) {\n nodes = $(dom)\n $.each(properties, function(key, value) {\n if (methodAttributes.indexOf(key) > -1) nodes[key](value)\n else nodes.attr(key, value)\n })\n }\n\n return dom\n }\n\n // `$.zepto.Z` swaps out the prototype of the given `dom` array\n // of nodes with `$.fn` and thus supplying all the Zepto functions\n // to the array. This method can be overridden in plugins.\n zepto.Z = function(dom, selector) {\n return new Z(dom, selector)\n }\n\n // `$.zepto.isZ` should return `true` if the given object is a Zepto\n // collection. This method can be overridden in plugins.\n zepto.isZ = function(object) {\n return object instanceof zepto.Z\n }\n\n // `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and\n // takes a CSS selector and an optional context (and handles various\n // special cases).\n // This method can be overridden in plugins.\n zepto.init = function(selector, context) {\n var dom\n // If nothing given, return an empty Zepto collection\n if (!selector) return zepto.Z()\n // Optimize for string selectors\n else if (typeof selector == 'string') {\n selector = selector.trim()\n // If it's a html fragment, create nodes from it\n // Note: In both Chrome 21 and Firefox 15, DOM error 12\n // is thrown if the fragment doesn't begin with <\n if (selector[0] == '<' && fragmentRE.test(selector))\n dom = zepto.fragment(selector, RegExp.$1, context), selector = null\n // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // If it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // If a function is given, call it when the DOM is ready\n else if (isFunction(selector)) return $(document).ready(selector)\n // If a Zepto collection is given, just return it\n else if (zepto.isZ(selector)) return selector\n else {\n // normalize array if an array of nodes is given\n if (isArray(selector)) dom = compact(selector)\n // Wrap DOM nodes.\n else if (isObject(selector))\n dom = [selector], selector = null\n // If it's a html fragment, create nodes from it\n else if (fragmentRE.test(selector))\n dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null\n // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // And last but no least, if it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // create a new Zepto collection from the nodes found\n return zepto.Z(dom, selector)\n }\n\n // `$` will be the base `Zepto` object. When calling this\n // function just call `$.zepto.init, which makes the implementation\n // details of selecting nodes and creating Zepto collections\n // patchable in plugins.\n $ = function(selector, context){\n return zepto.init(selector, context)\n }\n\n function extend(target, source, deep) {\n for (key in source)\n if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {\n if (isPlainObject(source[key]) && !isPlainObject(target[key]))\n target[key] = {}\n if (isArray(source[key]) && !isArray(target[key]))\n target[key] = []\n extend(target[key], source[key], deep)\n }\n else if (source[key] !== undefined) target[key] = source[key]\n }\n\n // Copy all but undefined properties from one or more\n // objects to the `target` object.\n $.extend = function(target){\n var deep, args = slice.call(arguments, 1)\n if (typeof target == 'boolean') {\n deep = target\n target = args.shift()\n }\n args.forEach(function(arg){ extend(target, arg, deep) })\n return target\n }\n\n // `$.zepto.qsa` is Zepto's CSS selector implementation which\n // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`.\n // This method can be overridden in plugins.\n zepto.qsa = function(element, selector){\n var found,\n maybeID = selector[0] == '#',\n maybeClass = !maybeID && selector[0] == '.',\n nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, // Ensure that a 1 char tag name still gets checked\n isSimple = simpleSelectorRE.test(nameOnly)\n return (element.getElementById && isSimple && maybeID) ? // Safari DocumentFragment doesn't have getElementById\n ( (found = element.getElementById(nameOnly)) ? [found] : [] ) :\n (element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11) ? [] :\n slice.call(\n isSimple && !maybeID && element.getElementsByClassName ? // DocumentFragment doesn't have getElementsByClassName/TagName\n maybeClass ? element.getElementsByClassName(nameOnly) : // If it's simple, it could be a class\n element.getElementsByTagName(selector) : // Or a tag\n element.querySelectorAll(selector) // Or it's not simple, and we need to query all\n )\n }\n\n function filtered(nodes, selector) {\n return selector == null ? $(nodes) : $(nodes).filter(selector)\n }\n\n $.contains = document.documentElement.contains ?\n function(parent, node) {\n return parent !== node && parent.contains(node)\n } :\n function(parent, node) {\n while (node && (node = node.parentNode))\n if (node === parent) return true\n return false\n }\n\n function funcArg(context, arg, idx, payload) {\n return isFunction(arg) ? arg.call(context, idx, payload) : arg\n }\n\n function setAttribute(node, name, value) {\n value == null ? node.removeAttribute(name) : node.setAttribute(name, value)\n }\n\n // access className property while respecting SVGAnimatedString\n function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }\n\n // \"true\" => true\n // \"false\" => false\n // \"null\" => null\n // \"42\" => 42\n // \"42.5\" => 42.5\n // \"08\" => \"08\"\n // JSON => parse if valid\n // String => self\n function deserializeValue(value) {\n try {\n return value ?\n value == \"true\" ||\n ( value == \"false\" ? false :\n value == \"null\" ? null :\n +value + \"\" == value ? +value :\n /^[\\[\\{]/.test(value) ? $.parseJSON(value) :\n value )\n : value\n } catch(e) {\n return value\n }\n }\n\n $.type = type\n $.isFunction = isFunction\n $.isWindow = isWindow\n $.isArray = isArray\n $.isPlainObject = isPlainObject\n\n $.isEmptyObject = function(obj) {\n var name\n for (name in obj) return false\n return true\n }\n\n $.isNumeric = function(val) {\n var num = Number(val), type = typeof val\n return val != null && type != 'boolean' &&\n (type != 'string' || val.length) &&\n !isNaN(num) && isFinite(num) || false\n }\n\n $.inArray = function(elem, array, i){\n return emptyArray.indexOf.call(array, elem, i)\n }\n\n $.camelCase = camelize\n $.trim = function(str) {\n return str == null ? \"\" : String.prototype.trim.call(str)\n }\n\n // plugin compatibility\n $.uuid = 0\n $.support = { }\n $.expr = { }\n $.noop = function() {}\n\n $.map = function(elements, callback){\n var value, values = [], i, key\n if (likeArray(elements))\n for (i = 0; i < elements.length; i++) {\n value = callback(elements[i], i)\n if (value != null) values.push(value)\n }\n else\n for (key in elements) {\n value = callback(elements[key], key)\n if (value != null) values.push(value)\n }\n return flatten(values)\n }\n\n $.each = function(elements, callback){\n var i, key\n if (likeArray(elements)) {\n for (i = 0; i < elements.length; i++)\n if (callback.call(elements[i], i, elements[i]) === false) return elements\n } else {\n for (key in elements)\n if (callback.call(elements[key], key, elements[key]) === false) return elements\n }\n\n return elements\n }\n\n $.grep = function(elements, callback){\n return filter.call(elements, callback)\n }\n\n if (window.JSON) $.parseJSON = JSON.parse\n\n // Populate the class2type map\n $.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), function(i, name) {\n class2type[ \"[object \" + name + \"]\" ] = name.toLowerCase()\n })\n\n // Define methods that will be available on all\n // Zepto collections\n $.fn = {\n constructor: zepto.Z,\n length: 0,\n\n // Because a collection acts like an array\n // copy over these useful array functions.\n forEach: emptyArray.forEach,\n reduce: emptyArray.reduce,\n push: emptyArray.push,\n sort: emptyArray.sort,\n splice: emptyArray.splice,\n indexOf: emptyArray.indexOf,\n concat: function(){\n var i, value, args = []\n for (i = 0; i < arguments.length; i++) {\n value = arguments[i]\n args[i] = zepto.isZ(value) ? value.toArray() : value\n }\n return concat.apply(zepto.isZ(this) ? this.toArray() : this, args)\n },\n\n // `map` and `slice` in the jQuery API work differently\n // from their array counterparts\n map: function(fn){\n return $($.map(this, function(el, i){ return fn.call(el, i, el) }))\n },\n slice: function(){\n return $(slice.apply(this, arguments))\n },\n\n ready: function(callback){\n // need to check if document.body exists for IE as that browser reports\n // document ready when it hasn't yet created the body element\n if (readyRE.test(document.readyState) && document.body) callback($)\n else document.addEventListener('DOMContentLoaded', function(){ callback($) }, false)\n return this\n },\n get: function(idx){\n return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length]\n },\n toArray: function(){ return this.get() },\n size: function(){\n return this.length\n },\n remove: function(){\n return this.each(function(){\n if (this.parentNode != null)\n this.parentNode.removeChild(this)\n })\n },\n each: function(callback){\n emptyArray.every.call(this, function(el, idx){\n return callback.call(el, idx, el) !== false\n })\n return this\n },\n filter: function(selector){\n if (isFunction(selector)) return this.not(this.not(selector))\n return $(filter.call(this, function(element){\n return zepto.matches(element, selector)\n }))\n },\n add: function(selector,context){\n return $(uniq(this.concat($(selector,context))))\n },\n is: function(selector){\n return this.length > 0 && zepto.matches(this[0], selector)\n },\n not: function(selector){\n var nodes=[]\n if (isFunction(selector) && selector.call !== undefined)\n this.each(function(idx){\n if (!selector.call(this,idx)) nodes.push(this)\n })\n else {\n var excludes = typeof selector == 'string' ? this.filter(selector) :\n (likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector)\n this.forEach(function(el){\n if (excludes.indexOf(el) < 0) nodes.push(el)\n })\n }\n return $(nodes)\n },\n has: function(selector){\n return this.filter(function(){\n return isObject(selector) ?\n $.contains(this, selector) :\n $(this).find(selector).size()\n })\n },\n eq: function(idx){\n return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1)\n },\n first: function(){\n var el = this[0]\n return el && !isObject(el) ? el : $(el)\n },\n last: function(){\n var el = this[this.length - 1]\n return el && !isObject(el) ? el : $(el)\n },\n find: function(selector){\n var result, $this = this\n if (!selector) result = $()\n else if (typeof selector == 'object')\n result = $(selector).filter(function(){\n var node = this\n return emptyArray.some.call($this, function(parent){\n return $.contains(parent, node)\n })\n })\n else if (this.length == 1) result = $(zepto.qsa(this[0], selector))\n else result = this.map(function(){ return zepto.qsa(this, selector) })\n return result\n },\n closest: function(selector, context){\n var nodes = [], collection = typeof selector == 'object' && $(selector)\n this.each(function(_, node){\n while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector)))\n node = node !== context && !isDocument(node) && node.parentNode\n if (node && nodes.indexOf(node) < 0) nodes.push(node)\n })\n return $(nodes)\n },\n parents: function(selector){\n var ancestors = [], nodes = this\n while (nodes.length > 0)\n nodes = $.map(nodes, function(node){\n if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) {\n ancestors.push(node)\n return node\n }\n })\n return filtered(ancestors, selector)\n },\n parent: function(selector){\n return filtered(uniq(this.pluck('parentNode')), selector)\n },\n children: function(selector){\n return filtered(this.map(function(){ return children(this) }), selector)\n },\n contents: function() {\n return this.map(function() { return this.contentDocument || slice.call(this.childNodes) })\n },\n siblings: function(selector){\n return filtered(this.map(function(i, el){\n return filter.call(children(el.parentNode), function(child){ return child!==el })\n }), selector)\n },\n empty: function(){\n return this.each(function(){ this.innerHTML = '' })\n },\n // `pluck` is borrowed from Prototype.js\n pluck: function(property){\n return $.map(this, function(el){ return el[property] })\n },\n show: function(){\n return this.each(function(){\n this.style.display == \"none\" && (this.style.display = '')\n if (getComputedStyle(this, '').getPropertyValue(\"display\") == \"none\")\n this.style.display = defaultDisplay(this.nodeName)\n })\n },\n replaceWith: function(newContent){\n return this.before(newContent).remove()\n },\n wrap: function(structure){\n var func = isFunction(structure)\n if (this[0] && !func)\n var dom = $(structure).get(0),\n clone = dom.parentNode || this.length > 1\n\n return this.each(function(index){\n $(this).wrapAll(\n func ? structure.call(this, index) :\n clone ? dom.cloneNode(true) : dom\n )\n })\n },\n wrapAll: function(structure){\n if (this[0]) {\n $(this[0]).before(structure = $(structure))\n var children\n // drill down to the inmost element\n while ((children = structure.children()).length) structure = children.first()\n $(structure).append(this)\n }\n return this\n },\n wrapInner: function(structure){\n var func = isFunction(structure)\n return this.each(function(index){\n var self = $(this), contents = self.contents(),\n dom = func ? structure.call(this, index) : structure\n contents.length ? contents.wrapAll(dom) : self.append(dom)\n })\n },\n unwrap: function(){\n this.parent().each(function(){\n $(this).replaceWith($(this).children())\n })\n return this\n },\n clone: function(){\n return this.map(function(){ return this.cloneNode(true) })\n },\n hide: function(){\n return this.css(\"display\", \"none\")\n },\n toggle: function(setting){\n return this.each(function(){\n var el = $(this)\n ;(setting === undefined ? el.css(\"display\") == \"none\" : setting) ? el.show() : el.hide()\n })\n },\n prev: function(selector){ return $(this.pluck('previousElementSibling')).filter(selector || '*') },\n next: function(selector){ return $(this.pluck('nextElementSibling')).filter(selector || '*') },\n html: function(html){\n return 0 in arguments ?\n this.each(function(idx){\n var originHtml = this.innerHTML\n $(this).empty().append( funcArg(this, html, idx, originHtml) )\n }) :\n (0 in this ? this[0].innerHTML : null)\n },\n text: function(text){\n return 0 in arguments ?\n this.each(function(idx){\n var newText = funcArg(this, text, idx, this.textContent)\n this.textContent = newText == null ? '' : ''+newText\n }) :\n (0 in this ? this.pluck('textContent').join(\"\") : null)\n },\n attr: function(name, value){\n var result\n return (typeof name == 'string' && !(1 in arguments)) ?\n (0 in this && this[0].nodeType == 1 && (result = this[0].getAttribute(name)) != null ? result : undefined) :\n this.each(function(idx){\n if (this.nodeType !== 1) return\n if (isObject(name)) for (key in name) setAttribute(this, key, name[key])\n else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name)))\n })\n },\n removeAttr: function(name){\n return this.each(function(){ this.nodeType === 1 && name.split(' ').forEach(function(attribute){\n setAttribute(this, attribute)\n }, this)})\n },\n prop: function(name, value){\n name = propMap[name] || name\n return (1 in arguments) ?\n this.each(function(idx){\n this[name] = funcArg(this, value, idx, this[name])\n }) :\n (this[0] && this[0][name])\n },\n removeProp: function(name){\n name = propMap[name] || name\n return this.each(function(){ delete this[name] })\n },\n data: function(name, value){\n var attrName = 'data-' + name.replace(capitalRE, '-$1').toLowerCase()\n\n var data = (1 in arguments) ?\n this.attr(attrName, value) :\n this.attr(attrName)\n\n return data !== null ? deserializeValue(data) : undefined\n },\n val: function(value){\n if (0 in arguments) {\n if (value == null) value = \"\"\n return this.each(function(idx){\n this.value = funcArg(this, value, idx, this.value)\n })\n } else {\n return this[0] && (this[0].multiple ?\n $(this[0]).find('option').filter(function(){ return this.selected }).pluck('value') :\n this[0].value)\n }\n },\n offset: function(coordinates){\n if (coordinates) return this.each(function(index){\n var $this = $(this),\n coords = funcArg(this, coordinates, index, $this.offset()),\n parentOffset = $this.offsetParent().offset(),\n props = {\n top: coords.top - parentOffset.top,\n left: coords.left - parentOffset.left\n }\n\n if ($this.css('position') == 'static') props['position'] = 'relative'\n $this.css(props)\n })\n if (!this.length) return null\n if (document.documentElement !== this[0] && !$.contains(document.documentElement, this[0]))\n return {top: 0, left: 0}\n var obj = this[0].getBoundingClientRect()\n return {\n left: obj.left + window.pageXOffset,\n top: obj.top + window.pageYOffset,\n width: Math.round(obj.width),\n height: Math.round(obj.height)\n }\n },\n css: function(property, value){\n if (arguments.length < 2) {\n var element = this[0]\n if (typeof property == 'string') {\n if (!element) return\n return element.style[camelize(property)] || getComputedStyle(element, '').getPropertyValue(property)\n } else if (isArray(property)) {\n if (!element) return\n var props = {}\n var computedStyle = getComputedStyle(element, '')\n $.each(property, function(_, prop){\n props[prop] = (element.style[camelize(prop)] || computedStyle.getPropertyValue(prop))\n })\n return props\n }\n }\n\n var css = ''\n if (type(property) == 'string') {\n if (!value && value !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(property)) })\n else\n css = dasherize(property) + \":\" + maybeAddPx(property, value)\n } else {\n for (key in property)\n if (!property[key] && property[key] !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(key)) })\n else\n css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';'\n }\n\n return this.each(function(){ this.style.cssText += ';' + css })\n },\n index: function(element){\n return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0])\n },\n hasClass: function(name){\n if (!name) return false\n return emptyArray.some.call(this, function(el){\n return this.test(className(el))\n }, classRE(name))\n },\n addClass: function(name){\n if (!name) return this\n return this.each(function(idx){\n if (!('className' in this)) return\n classList = []\n var cls = className(this), newName = funcArg(this, name, idx, cls)\n newName.split(/\\s+/g).forEach(function(klass){\n if (!$(this).hasClass(klass)) classList.push(klass)\n }, this)\n classList.length && className(this, cls + (cls ? \" \" : \"\") + classList.join(\" \"))\n })\n },\n removeClass: function(name){\n return this.each(function(idx){\n if (!('className' in this)) return\n if (name === undefined) return className(this, '')\n classList = className(this)\n funcArg(this, name, idx, classList).split(/\\s+/g).forEach(function(klass){\n classList = classList.replace(classRE(klass), \" \")\n })\n className(this, classList.trim())\n })\n },\n toggleClass: function(name, when){\n if (!name) return this\n return this.each(function(idx){\n var $this = $(this), names = funcArg(this, name, idx, className(this))\n names.split(/\\s+/g).forEach(function(klass){\n (when === undefined ? !$this.hasClass(klass) : when) ?\n $this.addClass(klass) : $this.removeClass(klass)\n })\n })\n },\n scrollTop: function(value){\n if (!this.length) return\n var hasScrollTop = 'scrollTop' in this[0]\n if (value === undefined) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset\n return this.each(hasScrollTop ?\n function(){ this.scrollTop = value } :\n function(){ this.scrollTo(this.scrollX, value) })\n },\n scrollLeft: function(value){\n if (!this.length) return\n var hasScrollLeft = 'scrollLeft' in this[0]\n if (value === undefined) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset\n return this.each(hasScrollLeft ?\n function(){ this.scrollLeft = value } :\n function(){ this.scrollTo(value, this.scrollY) })\n },\n position: function() {\n if (!this.length) return\n\n var elem = this[0],\n // Get *real* offsetParent\n offsetParent = this.offsetParent(),\n // Get correct offsets\n offset = this.offset(),\n parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset()\n\n // Subtract element margins\n // note: when an element has margin: auto the offsetLeft and marginLeft\n // are the same in Safari causing offset.left to incorrectly be 0\n offset.top -= parseFloat( $(elem).css('margin-top') ) || 0\n offset.left -= parseFloat( $(elem).css('margin-left') ) || 0\n\n // Add offsetParent borders\n parentOffset.top += parseFloat( $(offsetParent[0]).css('border-top-width') ) || 0\n parentOffset.left += parseFloat( $(offsetParent[0]).css('border-left-width') ) || 0\n\n // Subtract the two offsets\n return {\n top: offset.top - parentOffset.top,\n left: offset.left - parentOffset.left\n }\n },\n offsetParent: function() {\n return this.map(function(){\n var parent = this.offsetParent || document.body\n while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css(\"position\") == \"static\")\n parent = parent.offsetParent\n return parent\n })\n }\n }\n\n // for now\n $.fn.detach = $.fn.remove\n\n // Generate the `width` and `height` functions\n ;['width', 'height'].forEach(function(dimension){\n var dimensionProperty =\n dimension.replace(/./, function(m){ return m[0].toUpperCase() })\n\n $.fn[dimension] = function(value){\n var offset, el = this[0]\n if (value === undefined) return isWindow(el) ? el['inner' + dimensionProperty] :\n isDocument(el) ? el.documentElement['scroll' + dimensionProperty] :\n (offset = this.offset()) && offset[dimension]\n else return this.each(function(idx){\n el = $(this)\n el.css(dimension, funcArg(this, value, idx, el[dimension]()))\n })\n }\n })\n\n function traverseNode(node, fun) {\n fun(node)\n for (var i = 0, len = node.childNodes.length; i < len; i++)\n traverseNode(node.childNodes[i], fun)\n }\n\n // Generate the `after`, `prepend`, `before`, `append`,\n // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods.\n adjacencyOperators.forEach(function(operator, operatorIndex) {\n var inside = operatorIndex % 2 //=> prepend, append\n\n $.fn[operator] = function(){\n // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings\n var argType, nodes = $.map(arguments, function(arg) {\n var arr = []\n argType = type(arg)\n if (argType == \"array\") {\n arg.forEach(function(el) {\n if (el.nodeType !== undefined) return arr.push(el)\n else if ($.zepto.isZ(el)) return arr = arr.concat(el.get())\n arr = arr.concat(zepto.fragment(el))\n })\n return arr\n }\n return argType == \"object\" || arg == null ?\n arg : zepto.fragment(arg)\n }),\n parent, copyByClone = this.length > 1\n if (nodes.length < 1) return this\n\n return this.each(function(_, target){\n parent = inside ? target : target.parentNode\n\n // convert all methods to a \"before\" operation\n target = operatorIndex == 0 ? target.nextSibling :\n operatorIndex == 1 ? target.firstChild :\n operatorIndex == 2 ? target :\n null\n\n var parentInDocument = $.contains(document.documentElement, parent)\n\n nodes.forEach(function(node){\n if (copyByClone) node = node.cloneNode(true)\n else if (!parent) return $(node).remove()\n\n parent.insertBefore(node, target)\n if (parentInDocument) traverseNode(node, function(el){\n if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' &&\n (!el.type || el.type === 'text/javascript') && !el.src){\n var target = el.ownerDocument ? el.ownerDocument.defaultView : window\n target['eval'].call(target, el.innerHTML)\n }\n })\n })\n })\n }\n\n // after => insertAfter\n // prepend => prependTo\n // before => insertBefore\n // append => appendTo\n $.fn[inside ? operator+'To' : 'insert'+(operatorIndex ? 'Before' : 'After')] = function(html){\n $(html)[operator](this)\n return this\n }\n })\n\n zepto.Z.prototype = Z.prototype = $.fn\n\n // Export internal API functions in the `$.zepto` namespace\n zepto.uniq = uniq\n zepto.deserializeValue = deserializeValue\n $.zepto = zepto\n\n return $\n})()\n\nwindow.Zepto = Zepto\nwindow.$ === undefined && (window.$ = Zepto)\n\n;(function($){\n var _zid = 1, undefined,\n slice = Array.prototype.slice,\n isFunction = $.isFunction,\n isString = function(obj){ return typeof obj == 'string' },\n handlers = {},\n specialEvents={},\n focusinSupported = 'onfocusin' in window,\n focus = { focus: 'focusin', blur: 'focusout' },\n hover = { mouseenter: 'mouseover', mouseleave: 'mouseout' }\n\n specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents'\n\n function zid(element) {\n return element._zid || (element._zid = _zid++)\n }\n function findHandlers(element, event, fn, selector) {\n event = parse(event)\n if (event.ns) var matcher = matcherFor(event.ns)\n return (handlers[zid(element)] || []).filter(function(handler) {\n return handler\n && (!event.e || handler.e == event.e)\n && (!event.ns || matcher.test(handler.ns))\n && (!fn || zid(handler.fn) === zid(fn))\n && (!selector || handler.sel == selector)\n })\n }\n function parse(event) {\n var parts = ('' + event).split('.')\n return {e: parts[0], ns: parts.slice(1).sort().join(' ')}\n }\n function matcherFor(ns) {\n return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)')\n }\n\n function eventCapture(handler, captureSetting) {\n return handler.del &&\n (!focusinSupported && (handler.e in focus)) ||\n !!captureSetting\n }\n\n function realEvent(type) {\n return hover[type] || (focusinSupported && focus[type]) || type\n }\n\n function add(element, events, fn, data, selector, delegator, capture){\n var id = zid(element), set = (handlers[id] || (handlers[id] = []))\n events.split(/\\s/).forEach(function(event){\n if (event == 'ready') return $(document).ready(fn)\n var handler = parse(event)\n handler.fn = fn\n handler.sel = selector\n // emulate mouseenter, mouseleave\n if (handler.e in hover) fn = function(e){\n var related = e.relatedTarget\n if (!related || (related !== this && !$.contains(this, related)))\n return handler.fn.apply(this, arguments)\n }\n handler.del = delegator\n var callback = delegator || fn\n handler.proxy = function(e){\n e = compatible(e)\n if (e.isImmediatePropagationStopped()) return\n e.data = data\n var result = callback.apply(element, e._args == undefined ? [e] : [e].concat(e._args))\n if (result === false) e.preventDefault(), e.stopPropagation()\n return result\n }\n handler.i = set.length\n set.push(handler)\n if ('addEventListener' in element)\n element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n }\n function remove(element, events, fn, selector, capture){\n var id = zid(element)\n ;(events || '').split(/\\s/).forEach(function(event){\n findHandlers(element, event, fn, selector).forEach(function(handler){\n delete handlers[id][handler.i]\n if ('removeEventListener' in element)\n element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n })\n }\n\n $.event = { add: add, remove: remove }\n\n $.proxy = function(fn, context) {\n var args = (2 in arguments) && slice.call(arguments, 2)\n if (isFunction(fn)) {\n var proxyFn = function(){ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments) }\n proxyFn._zid = zid(fn)\n return proxyFn\n } else if (isString(context)) {\n if (args) {\n args.unshift(fn[context], fn)\n return $.proxy.apply(null, args)\n } else {\n return $.proxy(fn[context], fn)\n }\n } else {\n throw new TypeError(\"expected function\")\n }\n }\n\n $.fn.bind = function(event, data, callback){\n return this.on(event, data, callback)\n }\n $.fn.unbind = function(event, callback){\n return this.off(event, callback)\n }\n $.fn.one = function(event, selector, data, callback){\n return this.on(event, selector, data, callback, 1)\n }\n\n var returnTrue = function(){return true},\n returnFalse = function(){return false},\n ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,\n eventMethods = {\n preventDefault: 'isDefaultPrevented',\n stopImmediatePropagation: 'isImmediatePropagationStopped',\n stopPropagation: 'isPropagationStopped'\n }\n\n function compatible(event, source) {\n if (source || !event.isDefaultPrevented) {\n source || (source = event)\n\n $.each(eventMethods, function(name, predicate) {\n var sourceMethod = source[name]\n event[name] = function(){\n this[predicate] = returnTrue\n return sourceMethod && sourceMethod.apply(source, arguments)\n }\n event[predicate] = returnFalse\n })\n\n event.timeStamp || (event.timeStamp = Date.now())\n\n if (source.defaultPrevented !== undefined ? source.defaultPrevented :\n 'returnValue' in source ? source.returnValue === false :\n source.getPreventDefault && source.getPreventDefault())\n event.isDefaultPrevented = returnTrue\n }\n return event\n }\n\n function createProxy(event) {\n var key, proxy = { originalEvent: event }\n for (key in event)\n if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key]\n\n return compatible(proxy, event)\n }\n\n $.fn.delegate = function(selector, event, callback){\n return this.on(event, selector, callback)\n }\n $.fn.undelegate = function(selector, event, callback){\n return this.off(event, selector, callback)\n }\n\n $.fn.live = function(event, callback){\n $(document.body).delegate(this.selector, event, callback)\n return this\n }\n $.fn.die = function(event, callback){\n $(document.body).undelegate(this.selector, event, callback)\n return this\n }\n\n $.fn.on = function(event, selector, data, callback, one){\n var autoRemove, delegator, $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.on(type, selector, data, fn, one)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = data, data = selector, selector = undefined\n if (callback === undefined || data === false)\n callback = data, data = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(_, element){\n if (one) autoRemove = function(e){\n remove(element, e.type, callback)\n return callback.apply(this, arguments)\n }\n\n if (selector) delegator = function(e){\n var evt, match = $(e.target).closest(selector, element).get(0)\n if (match && match !== element) {\n evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element})\n return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1)))\n }\n }\n\n add(element, event, callback, data, selector, delegator || autoRemove)\n })\n }\n $.fn.off = function(event, selector, callback){\n var $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.off(type, selector, fn)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = selector, selector = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(){\n remove(this, event, callback, selector)\n })\n }\n\n $.fn.trigger = function(event, args){\n event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event)\n event._args = args\n return this.each(function(){\n // handle focus(), blur() by calling them directly\n if (event.type in focus && typeof this[event.type] == \"function\") this[event.type]()\n // items in the collection might not be DOM elements\n else if ('dispatchEvent' in this) this.dispatchEvent(event)\n else $(this).triggerHandler(event, args)\n })\n }\n\n // triggers event handlers on current element just as if an event occurred,\n // doesn't trigger an actual event, doesn't bubble\n $.fn.triggerHandler = function(event, args){\n var e, result\n this.each(function(i, element){\n e = createProxy(isString(event) ? $.Event(event) : event)\n e._args = args\n e.target = element\n $.each(findHandlers(element, event.type || event), function(i, handler){\n result = handler.proxy(e)\n if (e.isImmediatePropagationStopped()) return false\n })\n })\n return result\n }\n\n // shortcut methods for `.bind(event, fn)` for each event type\n ;('focusin focusout focus blur load resize scroll unload click dblclick '+\n 'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+\n 'change select keydown keypress keyup error').split(' ').forEach(function(event) {\n $.fn[event] = function(callback) {\n return (0 in arguments) ?\n this.bind(event, callback) :\n this.trigger(event)\n }\n })\n\n $.Event = function(type, props) {\n if (!isString(type)) props = type, type = props.type\n var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true\n if (props) for (var name in props) (name == 'bubbles') ? (bubbles = !!props[name]) : (event[name] = props[name])\n event.initEvent(type, bubbles, true)\n return compatible(event)\n }\n\n})(Zepto)\n\n;(function($){\n var jsonpID = +new Date(),\n document = window.document,\n key,\n name,\n rscript = /)<[^<]*)*<\\/script>/gi,\n scriptTypeRE = /^(?:text|application)\\/javascript/i,\n xmlTypeRE = /^(?:text|application)\\/xml/i,\n jsonType = 'application/json',\n htmlType = 'text/html',\n blankRE = /^\\s*$/,\n originAnchor = document.createElement('a')\n\n originAnchor.href = window.location.href\n\n // trigger a custom event and return false if it was cancelled\n function triggerAndReturn(context, eventName, data) {\n var event = $.Event(eventName)\n $(context).trigger(event, data)\n return !event.isDefaultPrevented()\n }\n\n // trigger an Ajax \"global\" event\n function triggerGlobal(settings, context, eventName, data) {\n if (settings.global) return triggerAndReturn(context || document, eventName, data)\n }\n\n // Number of active Ajax requests\n $.active = 0\n\n function ajaxStart(settings) {\n if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart')\n }\n function ajaxStop(settings) {\n if (settings.global && !(--$.active)) triggerGlobal(settings, null, 'ajaxStop')\n }\n\n // triggers an extra global event \"ajaxBeforeSend\" that's like \"ajaxSend\" but cancelable\n function ajaxBeforeSend(xhr, settings) {\n var context = settings.context\n if (settings.beforeSend.call(context, xhr, settings) === false ||\n triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false)\n return false\n\n triggerGlobal(settings, context, 'ajaxSend', [xhr, settings])\n }\n function ajaxSuccess(data, xhr, settings, deferred) {\n var context = settings.context, status = 'success'\n settings.success.call(context, data, status, xhr)\n if (deferred) deferred.resolveWith(context, [data, status, xhr])\n triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data])\n ajaxComplete(status, xhr, settings)\n }\n // type: \"timeout\", \"error\", \"abort\", \"parsererror\"\n function ajaxError(error, type, xhr, settings, deferred) {\n var context = settings.context\n settings.error.call(context, xhr, type, error)\n if (deferred) deferred.rejectWith(context, [xhr, type, error])\n triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error || type])\n ajaxComplete(type, xhr, settings)\n }\n // status: \"success\", \"notmodified\", \"error\", \"timeout\", \"abort\", \"parsererror\"\n function ajaxComplete(status, xhr, settings) {\n var context = settings.context\n settings.complete.call(context, xhr, status)\n triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings])\n ajaxStop(settings)\n }\n\n function ajaxDataFilter(data, type, settings) {\n if (settings.dataFilter == empty) return data\n var context = settings.context\n return settings.dataFilter.call(context, data, type)\n }\n\n // Empty function, used as default callback\n function empty() {}\n\n $.ajaxJSONP = function(options, deferred){\n if (!('type' in options)) return $.ajax(options)\n\n var _callbackName = options.jsonpCallback,\n callbackName = ($.isFunction(_callbackName) ?\n _callbackName() : _callbackName) || ('Zepto' + (jsonpID++)),\n script = document.createElement('script'),\n originalCallback = window[callbackName],\n responseData,\n abort = function(errorType) {\n $(script).triggerHandler('error', errorType || 'abort')\n },\n xhr = { abort: abort }, abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n $(script).on('load error', function(e, errorType){\n clearTimeout(abortTimeout)\n $(script).off().remove()\n\n if (e.type == 'error' || !responseData) {\n ajaxError(null, errorType || 'error', xhr, options, deferred)\n } else {\n ajaxSuccess(responseData[0], xhr, options, deferred)\n }\n\n window[callbackName] = originalCallback\n if (responseData && $.isFunction(originalCallback))\n originalCallback(responseData[0])\n\n originalCallback = responseData = undefined\n })\n\n if (ajaxBeforeSend(xhr, options) === false) {\n abort('abort')\n return xhr\n }\n\n window[callbackName] = function(){\n responseData = arguments\n }\n\n script.src = options.url.replace(/\\?(.+)=\\?/, '?$1=' + callbackName)\n document.head.appendChild(script)\n\n if (options.timeout > 0) abortTimeout = setTimeout(function(){\n abort('timeout')\n }, options.timeout)\n\n return xhr\n }\n\n $.ajaxSettings = {\n // Default type of request\n type: 'GET',\n // Callback that is executed before request\n beforeSend: empty,\n // Callback that is executed if the request succeeds\n success: empty,\n // Callback that is executed the the server drops error\n error: empty,\n // Callback that is executed on request complete (both: error and success)\n complete: empty,\n // The context for the callbacks\n context: null,\n // Whether to trigger \"global\" Ajax events\n global: true,\n // Transport\n xhr: function () {\n return new window.XMLHttpRequest()\n },\n // MIME types mapping\n // IIS returns Javascript as \"application/x-javascript\"\n accepts: {\n script: 'text/javascript, application/javascript, application/x-javascript',\n json: jsonType,\n xml: 'application/xml, text/xml',\n html: htmlType,\n text: 'text/plain'\n },\n // Whether the request is to another domain\n crossDomain: false,\n // Default timeout\n timeout: 0,\n // Whether data should be serialized to string\n processData: true,\n // Whether the browser should be allowed to cache GET responses\n cache: true,\n //Used to handle the raw response data of XMLHttpRequest.\n //This is a pre-filtering function to sanitize the response.\n //The sanitized response should be returned\n dataFilter: empty\n }\n\n function mimeToDataType(mime) {\n if (mime) mime = mime.split(';', 2)[0]\n return mime && ( mime == htmlType ? 'html' :\n mime == jsonType ? 'json' :\n scriptTypeRE.test(mime) ? 'script' :\n xmlTypeRE.test(mime) && 'xml' ) || 'text'\n }\n\n function appendQuery(url, query) {\n if (query == '') return url\n return (url + '&' + query).replace(/[&?]{1,2}/, '?')\n }\n\n // serialize payload and append it to the URL for GET requests\n function serializeData(options) {\n if (options.processData && options.data && $.type(options.data) != \"string\")\n options.data = $.param(options.data, options.traditional)\n if (options.data && (!options.type || options.type.toUpperCase() == 'GET' || 'jsonp' == options.dataType))\n options.url = appendQuery(options.url, options.data), options.data = undefined\n }\n\n $.ajax = function(options){\n var settings = $.extend({}, options || {}),\n deferred = $.Deferred && $.Deferred(),\n urlAnchor, hashIndex\n for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key]\n\n ajaxStart(settings)\n\n if (!settings.crossDomain) {\n urlAnchor = document.createElement('a')\n urlAnchor.href = settings.url\n // cleans up URL for .href (IE only), see https://github.com/madrobby/zepto/pull/1049\n urlAnchor.href = urlAnchor.href\n settings.crossDomain = (originAnchor.protocol + '//' + originAnchor.host) !== (urlAnchor.protocol + '//' + urlAnchor.host)\n }\n\n if (!settings.url) settings.url = window.location.toString()\n if ((hashIndex = settings.url.indexOf('#')) > -1) settings.url = settings.url.slice(0, hashIndex)\n serializeData(settings)\n\n var dataType = settings.dataType, hasPlaceholder = /\\?.+=\\?/.test(settings.url)\n if (hasPlaceholder) dataType = 'jsonp'\n\n if (settings.cache === false || (\n (!options || options.cache !== true) &&\n ('script' == dataType || 'jsonp' == dataType)\n ))\n settings.url = appendQuery(settings.url, '_=' + Date.now())\n\n if ('jsonp' == dataType) {\n if (!hasPlaceholder)\n settings.url = appendQuery(settings.url,\n settings.jsonp ? (settings.jsonp + '=?') : settings.jsonp === false ? '' : 'callback=?')\n return $.ajaxJSONP(settings, deferred)\n }\n\n var mime = settings.accepts[dataType],\n headers = { },\n setHeader = function(name, value) { headers[name.toLowerCase()] = [name, value] },\n protocol = /^([\\w-]+:)\\/\\//.test(settings.url) ? RegExp.$1 : window.location.protocol,\n xhr = settings.xhr(),\n nativeSetHeader = xhr.setRequestHeader,\n abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n if (!settings.crossDomain) setHeader('X-Requested-With', 'XMLHttpRequest')\n setHeader('Accept', mime || '*/*')\n if (mime = settings.mimeType || mime) {\n if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0]\n xhr.overrideMimeType && xhr.overrideMimeType(mime)\n }\n if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET'))\n setHeader('Content-Type', settings.contentType || 'application/x-www-form-urlencoded')\n\n if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name])\n xhr.setRequestHeader = setHeader\n\n xhr.onreadystatechange = function(){\n if (xhr.readyState == 4) {\n xhr.onreadystatechange = empty\n clearTimeout(abortTimeout)\n var result, error = false\n if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) {\n dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader('content-type'))\n\n if (xhr.responseType == 'arraybuffer' || xhr.responseType == 'blob')\n result = xhr.response\n else {\n result = xhr.responseText\n\n try {\n // http://perfectionkills.com/global-eval-what-are-the-options/\n // sanitize response accordingly if data filter callback provided\n result = ajaxDataFilter(result, dataType, settings)\n if (dataType == 'script') (1,eval)(result)\n else if (dataType == 'xml') result = xhr.responseXML\n else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result)\n } catch (e) { error = e }\n\n if (error) return ajaxError(error, 'parsererror', xhr, settings, deferred)\n }\n\n ajaxSuccess(result, xhr, settings, deferred)\n } else {\n ajaxError(xhr.statusText || null, xhr.status ? 'error' : 'abort', xhr, settings, deferred)\n }\n }\n }\n\n if (ajaxBeforeSend(xhr, settings) === false) {\n xhr.abort()\n ajaxError(null, 'abort', xhr, settings, deferred)\n return xhr\n }\n\n var async = 'async' in settings ? settings.async : true\n xhr.open(settings.type, settings.url, async, settings.username, settings.password)\n\n if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name]\n\n for (name in headers) nativeSetHeader.apply(xhr, headers[name])\n\n if (settings.timeout > 0) abortTimeout = setTimeout(function(){\n xhr.onreadystatechange = empty\n xhr.abort()\n ajaxError(null, 'timeout', xhr, settings, deferred)\n }, settings.timeout)\n\n // avoid sending empty string (#319)\n xhr.send(settings.data ? settings.data : null)\n return xhr\n }\n\n // handle optional data/success arguments\n function parseArguments(url, data, success, dataType) {\n if ($.isFunction(data)) dataType = success, success = data, data = undefined\n if (!$.isFunction(success)) dataType = success, success = undefined\n return {\n url: url\n , data: data\n , success: success\n , dataType: dataType\n }\n }\n\n $.get = function(/* url, data, success, dataType */){\n return $.ajax(parseArguments.apply(null, arguments))\n }\n\n $.post = function(/* url, data, success, dataType */){\n var options = parseArguments.apply(null, arguments)\n options.type = 'POST'\n return $.ajax(options)\n }\n\n $.getJSON = function(/* url, data, success */){\n var options = parseArguments.apply(null, arguments)\n options.dataType = 'json'\n return $.ajax(options)\n }\n\n $.fn.load = function(url, data, success){\n if (!this.length) return this\n var self = this, parts = url.split(/\\s/), selector,\n options = parseArguments(url, data, success),\n callback = options.success\n if (parts.length > 1) options.url = parts[0], selector = parts[1]\n options.success = function(response){\n self.html(selector ?\n $('
').html(response.replace(rscript, \"\")).find(selector)\n : response)\n callback && callback.apply(self, arguments)\n }\n $.ajax(options)\n return this\n }\n\n var escape = encodeURIComponent\n\n function serialize(params, obj, traditional, scope){\n var type, array = $.isArray(obj), hash = $.isPlainObject(obj)\n $.each(obj, function(key, value) {\n type = $.type(value)\n if (scope) key = traditional ? scope :\n scope + '[' + (hash || type == 'object' || type == 'array' ? key : '') + ']'\n // handle data in serializeArray() format\n if (!scope && array) params.add(value.name, value.value)\n // recurse into nested objects\n else if (type == \"array\" || (!traditional && type == \"object\"))\n serialize(params, value, traditional, key)\n else params.add(key, value)\n })\n }\n\n $.param = function(obj, traditional){\n var params = []\n params.add = function(key, value) {\n if ($.isFunction(value)) value = value()\n if (value == null) value = \"\"\n this.push(escape(key) + '=' + escape(value))\n }\n serialize(params, obj, traditional)\n return params.join('&').replace(/%20/g, '+')\n }\n})(Zepto)\n\n;(function($){\n $.fn.serializeArray = function() {\n var name, type, result = [],\n add = function(value) {\n if (value.forEach) return value.forEach(add)\n result.push({ name: name, value: value })\n }\n if (this[0]) $.each(this[0].elements, function(_, field){\n type = field.type, name = field.name\n if (name && field.nodeName.toLowerCase() != 'fieldset' &&\n !field.disabled && type != 'submit' && type != 'reset' && type != 'button' && type != 'file' &&\n ((type != 'radio' && type != 'checkbox') || field.checked))\n add($(field).val())\n })\n return result\n }\n\n $.fn.serialize = function(){\n var result = []\n this.serializeArray().forEach(function(elm){\n result.push(encodeURIComponent(elm.name) + '=' + encodeURIComponent(elm.value))\n })\n return result.join('&')\n }\n\n $.fn.submit = function(callback) {\n if (0 in arguments) this.bind('submit', callback)\n else if (this.length) {\n var event = $.Event('submit')\n this.eq(0).trigger(event)\n if (!event.isDefaultPrevented()) this.get(0).submit()\n }\n return this\n }\n\n})(Zepto)\n\n;(function(){\n // getComputedStyle shouldn't freak out when called\n // without a valid element as argument\n try {\n getComputedStyle(undefined)\n } catch(e) {\n var nativeGetComputedStyle = getComputedStyle\n window.getComputedStyle = function(element, pseudoElement){\n try {\n return nativeGetComputedStyle(element, pseudoElement)\n } catch(e) {\n return null\n }\n }\n }\n})()\n return Zepto\n}))\n\n}.call(window));","module.exports = global[\"moment\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\expose-loader\\\\index.js?dayjs!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\dayjs.min.js\");","module.exports = global[\"dayjs\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\dayjs.min.js\");","!function(t,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=n():\"function\"==typeof define&&define.amd?define(n):t.dayjs=n()}(this,function(){\"use strict\";var t=\"millisecond\",n=\"second\",e=\"minute\",r=\"hour\",i=\"day\",s=\"week\",u=\"month\",a=\"quarter\",o=\"year\",h=/^(\\d{4})-?(\\d{1,2})-?(\\d{0,2})[^0-9]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?.?(\\d{1,3})?$/,f=/\\[([^\\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,c=function(t,n,e){var r=String(t);return!r||r.length>=n?t:\"\"+Array(n+1-r.length).join(e)+t},d={s:c,z:function(t){var n=-t.utcOffset(),e=Math.abs(n),r=Math.floor(e/60),i=e%60;return(n<=0?\"+\":\"-\")+c(r,2,\"0\")+\":\"+c(i,2,\"0\")},m:function(t,n){var e=12*(n.year()-t.year())+(n.month()-t.month()),r=t.clone().add(e,u),i=n-r<0,s=t.clone().add(e+(i?-1:1),u);return Number(-(e+(n-r)/(i?r-s:s-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(h){return{M:u,y:o,w:s,d:i,h:r,m:e,s:n,ms:t,Q:a}[h]||String(h||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},$={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\")},l=\"en\",m={};m[l]=$;var y=function(t){return t instanceof v},M=function(t,n,e){var r;if(!t)return l;if(\"string\"==typeof t)m[t]&&(r=t),n&&(m[t]=n,r=t);else{var i=t.name;m[i]=t,r=i}return e||(l=r),r},g=function(t,n,e){if(y(t))return t.clone();var r=n?\"string\"==typeof n?{format:n,pl:e}:n:{};return r.date=t,new v(r)},D=d;D.l=M,D.i=y,D.w=function(t,n){return g(t,{locale:n.$L,utc:n.$u})};var v=function(){function c(t){this.$L=this.$L||M(t.locale,null,!0),this.parse(t)}var d=c.prototype;return d.parse=function(t){this.$d=function(t){var n=t.date,e=t.utc;if(null===n)return new Date(NaN);if(D.u(n))return new Date;if(n instanceof Date)return new Date(n);if(\"string\"==typeof n&&!/Z$/i.test(n)){var r=n.match(h);if(r)return e?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(n)}(t),this.init()},d.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},d.$utils=function(){return D},d.isValid=function(){return!(\"Invalid Date\"===this.$d.toString())},d.isSame=function(t,n){var e=g(t);return this.startOf(n)<=e&&e<=this.endOf(n)},d.isAfter=function(t,n){return g(t) element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function($window) {\n\tvar $doc = $window && $window.document\n\tvar currentRedraw\n\n\tvar nameSpace = {\n\t\tsvg: \"http://www.w3.org/2000/svg\",\n\t\tmath: \"http://www.w3.org/1998/Math/MathML\"\n\t}\n\n\tfunction getNameSpace(vnode) {\n\t\treturn vnode.attrs && vnode.attrs.xmlns || nameSpace[vnode.tag]\n\t}\n\n\t//sanity check to discourage people from doing `vnode.state = ...`\n\tfunction checkState(vnode, original) {\n\t\tif (vnode.state !== original) throw new Error(\"`vnode.state` must not be modified\")\n\t}\n\n\t//Note: the hook is passed as the `this` argument to allow proxying the\n\t//arguments without requiring a full array allocation to do so. It also\n\t//takes advantage of the fact the current `vnode` is the first argument in\n\t//all lifecycle methods.\n\tfunction callHook(vnode) {\n\t\tvar original = vnode.state\n\t\ttry {\n\t\t\treturn this.apply(original, arguments)\n\t\t} finally {\n\t\t\tcheckState(vnode, original)\n\t\t}\n\t}\n\n\t// IE11 (at least) throws an UnspecifiedError when accessing document.activeElement when\n\t// inside an iframe. Catch and swallow this error, and heavy-handidly return null.\n\tfunction activeElement() {\n\t\ttry {\n\t\t\treturn $doc.activeElement\n\t\t} catch (e) {\n\t\t\treturn null\n\t\t}\n\t}\n\t//create\n\tfunction createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) {\n\t\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t}\n\tfunction createNode(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tif (typeof tag === \"string\") {\n\t\t\tvnode.state = {}\n\t\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\t\tswitch (tag) {\n\t\t\t\tcase \"#\": createText(parent, vnode, nextSibling); break\n\t\t\t\tcase \"<\": createHTML(parent, vnode, ns, nextSibling); break\n\t\t\t\tcase \"[\": createFragment(parent, vnode, hooks, ns, nextSibling); break\n\t\t\t\tdefault: createElement(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t\telse createComponent(parent, vnode, hooks, ns, nextSibling)\n\t}\n\tfunction createText(parent, vnode, nextSibling) {\n\t\tvnode.dom = $doc.createTextNode(vnode.children)\n\t\tinsertNode(parent, vnode.dom, nextSibling)\n\t}\n\tvar possibleParents = {caption: \"table\", thead: \"table\", tbody: \"table\", tfoot: \"table\", tr: \"tbody\", th: \"tr\", td: \"tr\", colgroup: \"table\", col: \"colgroup\"}\n\tfunction createHTML(parent, vnode, ns, nextSibling) {\n\t\tvar match = vnode.children.match(/^\\s*?<(\\w+)/im) || []\n\t\t// not using the proper parent makes the child element(s) vanish.\n\t\t// var div = document.createElement(\"div\")\n\t\t// div.innerHTML = \"ij\"\n\t\t// console.log(div.innerHTML)\n\t\t// --> \"ij\", no in sight.\n\t\tvar temp = $doc.createElement(possibleParents[match[1]] || \"div\")\n\t\tif (ns === \"http://www.w3.org/2000/svg\") {\n\t\t\ttemp.innerHTML = \"\" + vnode.children + \"\"\n\t\t\ttemp = temp.firstChild\n\t\t} else {\n\t\t\ttemp.innerHTML = vnode.children\n\t\t}\n\t\tvnode.dom = temp.firstChild\n\t\tvnode.domSize = temp.childNodes.length\n\t\t// Capture nodes to remove, so we don't confuse them.\n\t\tvnode.instance = []\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tvar child\n\t\twhile (child = temp.firstChild) {\n\t\t\tvnode.instance.push(child)\n\t\t\tfragment.appendChild(child)\n\t\t}\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createFragment(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tif (vnode.children != null) {\n\t\t\tvar children = vnode.children\n\t\t\tcreateNodes(fragment, children, 0, children.length, hooks, null, ns)\n\t\t}\n\t\tvnode.dom = fragment.firstChild\n\t\tvnode.domSize = fragment.childNodes.length\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createElement(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tvar attrs = vnode.attrs\n\t\tvar is = attrs && attrs.is\n\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tvar element = ns ?\n\t\t\tis ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :\n\t\t\tis ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)\n\t\tvnode.dom = element\n\n\t\tif (attrs != null) {\n\t\t\tsetAttrs(vnode, attrs, ns)\n\t\t}\n\n\t\tinsertNode(parent, element, nextSibling)\n\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (vnode.text != null) {\n\t\t\t\tif (vnode.text !== \"\") element.textContent = vnode.text\n\t\t\t\telse vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t}\n\t\t\tif (vnode.children != null) {\n\t\t\t\tvar children = vnode.children\n\t\t\t\tcreateNodes(element, children, 0, children.length, hooks, null, ns)\n\t\t\t\tif (vnode.tag === \"select\" && attrs != null) setLateSelectAttrs(vnode, attrs)\n\t\t\t}\n\t\t}\n\t}\n\tfunction initComponent(vnode, hooks) {\n\t\tvar sentinel\n\t\tif (typeof vnode.tag.view === \"function\") {\n\t\t\tvnode.state = Object.create(vnode.tag)\n\t\t\tsentinel = vnode.state.view\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t} else {\n\t\t\tvnode.state = void 0\n\t\t\tsentinel = vnode.tag\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t\tvnode.state = (vnode.tag.prototype != null && typeof vnode.tag.prototype.view === \"function\") ? new vnode.tag(vnode) : vnode.tag(vnode)\n\t\t}\n\t\tinitLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tsentinel.$$reentrantLock$$ = null\n\t}\n\tfunction createComponent(parent, vnode, hooks, ns, nextSibling) {\n\t\tinitComponent(vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tcreateNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0\n\t\t}\n\t\telse {\n\t\t\tvnode.domSize = 0\n\t\t}\n\t}\n\n\t//update\n\t/**\n\t * @param {Element|Fragment} parent - the parent element\n\t * @param {Vnode[] | null} old - the list of vnodes of the last `render()` call for\n\t * this part of the tree\n\t * @param {Vnode[] | null} vnodes - as above, but for the current `render()` call.\n\t * @param {Function[]} hooks - an accumulator of post-render hooks (oncreate/onupdate)\n\t * @param {Element | null} nextSibling - the next DOM node if we're dealing with a\n\t * fragment that is not the last item in its\n\t * parent\n\t * @param {'svg' | 'math' | String | null} ns) - the current XML namespace, if any\n\t * @returns void\n\t */\n\t// This function diffs and patches lists of vnodes, both keyed and unkeyed.\n\t//\n\t// We will:\n\t//\n\t// 1. describe its general structure\n\t// 2. focus on the diff algorithm optimizations\n\t// 3. discuss DOM node operations.\n\n\t// ## Overview:\n\t//\n\t// The updateNodes() function:\n\t// - deals with trivial cases\n\t// - determines whether the lists are keyed or unkeyed based on the first non-null node\n\t// of each list.\n\t// - diffs them and patches the DOM if needed (that's the brunt of the code)\n\t// - manages the leftovers: after diffing, are there:\n\t// - old nodes left to remove?\n\t// \t - new nodes to insert?\n\t// \t deal with them!\n\t//\n\t// The lists are only iterated over once, with an exception for the nodes in `old` that\n\t// are visited in the fourth part of the diff and in the `removeNodes` loop.\n\n\t// ## Diffing\n\t//\n\t// Reading https://github.com/localvoid/ivi/blob/ddc09d06abaef45248e6133f7040d00d3c6be853/packages/ivi/src/vdom/implementation.ts#L617-L837\n\t// may be good for context on longest increasing subsequence-based logic for moving nodes.\n\t//\n\t// In order to diff keyed lists, one has to\n\t//\n\t// 1) match nodes in both lists, per key, and update them accordingly\n\t// 2) create the nodes present in the new list, but absent in the old one\n\t// 3) remove the nodes present in the old list, but absent in the new one\n\t// 4) figure out what nodes in 1) to move in order to minimize the DOM operations.\n\t//\n\t// To achieve 1) one can create a dictionary of keys => index (for the old list), then iterate\n\t// over the new list and for each new vnode, find the corresponding vnode in the old list using\n\t// the map.\n\t// 2) is achieved in the same step: if a new node has no corresponding entry in the map, it is new\n\t// and must be created.\n\t// For the removals, we actually remove the nodes that have been updated from the old list.\n\t// The nodes that remain in that list after 1) and 2) have been performed can be safely removed.\n\t// The fourth step is a bit more complex and relies on the longest increasing subsequence (LIS)\n\t// algorithm.\n\t//\n\t// the longest increasing subsequence is the list of nodes that can remain in place. Imagine going\n\t// from `1,2,3,4,5` to `4,5,1,2,3` where the numbers are not necessarily the keys, but the indices\n\t// corresponding to the keyed nodes in the old list (keyed nodes `e,d,c,b,a` => `b,a,e,d,c` would\n\t// match the above lists, for example).\n\t//\n\t// In there are two increasing subsequences: `4,5` and `1,2,3`, the latter being the longest. We\n\t// can update those nodes without moving them, and only call `insertNode` on `4` and `5`.\n\t//\n\t// @localvoid adapted the algo to also support node deletions and insertions (the `lis` is actually\n\t// the longest increasing subsequence *of old nodes still present in the new list*).\n\t//\n\t// It is a general algorithm that is fireproof in all circumstances, but it requires the allocation\n\t// and the construction of a `key => oldIndex` map, and three arrays (one with `newIndex => oldIndex`,\n\t// the `LIS` and a temporary one to create the LIS).\n\t//\n\t// So we cheat where we can: if the tails of the lists are identical, they are guaranteed to be part of\n\t// the LIS and can be updated without moving them.\n\t//\n\t// If two nodes are swapped, they are guaranteed not to be part of the LIS, and must be moved (with\n\t// the exception of the last node if the list is fully reversed).\n\t//\n\t// ## Finding the next sibling.\n\t//\n\t// `updateNode()` and `createNode()` expect a nextSibling parameter to perform DOM operations.\n\t// When the list is being traversed top-down, at any index, the DOM nodes up to the previous\n\t// vnode reflect the content of the new list, whereas the rest of the DOM nodes reflect the old\n\t// list. The next sibling must be looked for in the old list using `getNextSibling(... oldStart + 1 ...)`.\n\t//\n\t// In the other scenarios (swaps, upwards traversal, map-based diff),\n\t// the new vnodes list is traversed upwards. The DOM nodes at the bottom of the list reflect the\n\t// bottom part of the new vnodes list, and we can use the `v.dom` value of the previous node\n\t// as the next sibling (cached in the `nextSibling` variable).\n\n\n\t// ## DOM node moves\n\t//\n\t// In most scenarios `updateNode()` and `createNode()` perform the DOM operations. However,\n\t// this is not the case if the node moved (second and fourth part of the diff algo). We move\n\t// the old DOM nodes before updateNode runs because it enables us to use the cached `nextSibling`\n\t// variable rather than fetching it using `getNextSibling()`.\n\t//\n\t// The fourth part of the diff currently inserts nodes unconditionally, leading to issues\n\t// like #1791 and #1999. We need to be smarter about those situations where adjascent old\n\t// nodes remain together in the new list in a way that isn't covered by parts one and\n\t// three of the diff algo.\n\n\tfunction updateNodes(parent, old, vnodes, hooks, nextSibling, ns) {\n\t\tif (old === vnodes || old == null && vnodes == null) return\n\t\telse if (old == null || old.length === 0) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, ns)\n\t\telse if (vnodes == null || vnodes.length === 0) removeNodes(parent, old, 0, old.length)\n\t\telse {\n\t\t\tvar isOldKeyed = old[0] != null && old[0].key != null\n\t\t\tvar isKeyed = vnodes[0] != null && vnodes[0].key != null\n\t\t\tvar start = 0, oldStart = 0\n\t\t\tif (!isOldKeyed) while (oldStart < old.length && old[oldStart] == null) oldStart++\n\t\t\tif (!isKeyed) while (start < vnodes.length && vnodes[start] == null) start++\n\t\t\tif (isKeyed === null && isOldKeyed == null) return // both lists are full of nulls\n\t\t\tif (isOldKeyed !== isKeyed) {\n\t\t\t\tremoveNodes(parent, old, oldStart, old.length)\n\t\t\t\tcreateNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else if (!isKeyed) {\n\t\t\t\t// Don't index past the end of either list (causes deopts).\n\t\t\t\tvar commonLength = old.length < vnodes.length ? old.length : vnodes.length\n\t\t\t\t// Rewind if necessary to the first non-null index on either side.\n\t\t\t\t// We could alternatively either explicitly create or remove nodes when `start !== oldStart`\n\t\t\t\t// but that would be optimizing for sparse lists which are more rare than dense ones.\n\t\t\t\tstart = start < oldStart ? start : oldStart\n\t\t\t\tfor (; start < commonLength; start++) {\n\t\t\t\t\to = old[start]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o === v || o == null && v == null) continue\n\t\t\t\t\telse if (o == null) createNode(parent, v, hooks, ns, getNextSibling(old, start + 1, nextSibling))\n\t\t\t\t\telse if (v == null) removeNode(parent, o)\n\t\t\t\t\telse updateNode(parent, o, v, hooks, getNextSibling(old, start + 1, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\tif (old.length > commonLength) removeNodes(parent, old, start, old.length)\n\t\t\t\tif (vnodes.length > commonLength) createNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else {\n\t\t\t\t// keyed diff\n\t\t\t\tvar oldEnd = old.length - 1, end = vnodes.length - 1, map, o, v, oe, ve, topSibling\n\n\t\t\t\t// bottom-up\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t}\n\t\t\t\t// top-down\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o.key !== v.key) break\n\t\t\t\t\toldStart++, start++\n\t\t\t\t\tif (o !== v) updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\t// swaps and list reversals\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (start === end) break\n\t\t\t\t\tif (o.key !== ve.key || oe.key !== v.key) break\n\t\t\t\t\ttopSibling = getNextSibling(old, oldStart, nextSibling)\n\t\t\t\t\tmoveNodes(parent, oe, topSibling)\n\t\t\t\t\tif (oe !== v) updateNode(parent, oe, v, hooks, topSibling, ns)\n\t\t\t\t\tif (++start <= --end) moveNodes(parent, o, nextSibling)\n\t\t\t\t\tif (o !== ve) updateNode(parent, o, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldStart++; oldEnd--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t}\n\t\t\t\t// bottom up once again\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t}\n\t\t\t\tif (start > end) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\telse if (oldStart > oldEnd) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\telse {\n\t\t\t\t\t// inspired by ivi https://github.com/ivijs/ivi/ by Boris Kaul\n\t\t\t\t\tvar originalNextSibling = nextSibling, vnodesLength = end - start + 1, oldIndices = new Array(vnodesLength), li=0, i=0, pos = 2147483647, matched = 0, map, lisIndices\n\t\t\t\t\tfor (i = 0; i < vnodesLength; i++) oldIndices[i] = -1\n\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\tif (map == null) map = getKeyMap(old, oldStart, oldEnd + 1)\n\t\t\t\t\t\tve = vnodes[i]\n\t\t\t\t\t\tvar oldIndex = map[ve.key]\n\t\t\t\t\t\tif (oldIndex != null) {\n\t\t\t\t\t\t\tpos = (oldIndex < pos) ? oldIndex : -1 // becomes -1 if nodes were re-ordered\n\t\t\t\t\t\t\toldIndices[i-start] = oldIndex\n\t\t\t\t\t\t\toe = old[oldIndex]\n\t\t\t\t\t\t\told[oldIndex] = null\n\t\t\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\t\t\tmatched++\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnextSibling = originalNextSibling\n\t\t\t\t\tif (matched !== oldEnd - oldStart + 1) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\t\tif (matched === 0) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (pos === -1) {\n\t\t\t\t\t\t\t// the indices of the indices of the items that are part of the\n\t\t\t\t\t\t\t// longest increasing subsequence in the oldIndices list\n\t\t\t\t\t\t\tlisIndices = makeLisIndices(oldIndices)\n\t\t\t\t\t\t\tli = lisIndices.length - 1\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tif (lisIndices[li] === i - start) li--\n\t\t\t\t\t\t\t\t\telse moveNodes(parent, v, nextSibling)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateNode(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvar oldTag = old.tag, tag = vnode.tag\n\t\tif (oldTag === tag) {\n\t\t\tvnode.state = old.state\n\t\t\tvnode.events = old.events\n\t\t\tif (shouldNotUpdate(vnode, old)) return\n\t\t\tif (typeof oldTag === \"string\") {\n\t\t\t\tif (vnode.attrs != null) {\n\t\t\t\t\tupdateLifecycle(vnode.attrs, vnode, hooks)\n\t\t\t\t}\n\t\t\t\tswitch (oldTag) {\n\t\t\t\t\tcase \"#\": updateText(old, vnode); break\n\t\t\t\t\tcase \"<\": updateHTML(parent, old, vnode, ns, nextSibling); break\n\t\t\t\t\tcase \"[\": updateFragment(parent, old, vnode, hooks, nextSibling, ns); break\n\t\t\t\t\tdefault: updateElement(old, vnode, hooks, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t\telse updateComponent(parent, old, vnode, hooks, nextSibling, ns)\n\t\t}\n\t\telse {\n\t\t\tremoveNode(parent, old)\n\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t}\n\t}\n\tfunction updateText(old, vnode) {\n\t\tif (old.children.toString() !== vnode.children.toString()) {\n\t\t\told.dom.nodeValue = vnode.children\n\t\t}\n\t\tvnode.dom = old.dom\n\t}\n\tfunction updateHTML(parent, old, vnode, ns, nextSibling) {\n\t\tif (old.children !== vnode.children) {\n\t\t\tremoveHTML(parent, old)\n\t\t\tcreateHTML(parent, vnode, ns, nextSibling)\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t\tvnode.instance = old.instance\n\t\t}\n\t}\n\tfunction updateFragment(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tupdateNodes(parent, old.children, vnode.children, hooks, nextSibling, ns)\n\t\tvar domSize = 0, children = vnode.children\n\t\tvnode.dom = null\n\t\tif (children != null) {\n\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\tvar child = children[i]\n\t\t\t\tif (child != null && child.dom != null) {\n\t\t\t\t\tif (vnode.dom == null) vnode.dom = child.dom\n\t\t\t\t\tdomSize += child.domSize || 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (domSize !== 1) vnode.domSize = domSize\n\t\t}\n\t}\n\tfunction updateElement(old, vnode, hooks, ns) {\n\t\tvar element = vnode.dom = old.dom\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tif (vnode.tag === \"textarea\") {\n\t\t\tif (vnode.attrs == null) vnode.attrs = {}\n\t\t\tif (vnode.text != null) {\n\t\t\t\tvnode.attrs.value = vnode.text //FIXME handle multiple children\n\t\t\t\tvnode.text = undefined\n\t\t\t}\n\t\t}\n\t\tupdateAttrs(vnode, old.attrs, vnode.attrs, ns)\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (old.text != null && vnode.text != null && vnode.text !== \"\") {\n\t\t\t\tif (old.text.toString() !== vnode.text.toString()) old.dom.firstChild.nodeValue = vnode.text\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (old.text != null) old.children = [Vnode(\"#\", undefined, undefined, old.text, undefined, old.dom.firstChild)]\n\t\t\t\tif (vnode.text != null) vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t\tupdateNodes(element, old.children, vnode.children, hooks, null, ns)\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateComponent(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tupdateLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) updateLifecycle(vnode.attrs, vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tif (old.instance == null) createNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\telse updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, ns)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.instance.domSize\n\t\t}\n\t\telse if (old.instance != null) {\n\t\t\tremoveNode(parent, old.instance)\n\t\t\tvnode.dom = undefined\n\t\t\tvnode.domSize = 0\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t}\n\t}\n\tfunction getKeyMap(vnodes, start, end) {\n\t\tvar map = Object.create(null)\n\t\tfor (; start < end; start++) {\n\t\t\tvar vnode = vnodes[start]\n\t\t\tif (vnode != null) {\n\t\t\t\tvar key = vnode.key\n\t\t\t\tif (key != null) map[key] = start\n\t\t\t}\n\t\t}\n\t\treturn map\n\t}\n\t// Lifted from ivi https://github.com/ivijs/ivi/\n\t// takes a list of unique numbers (-1 is special and can\n\t// occur multiple times) and returns an array with the indices\n\t// of the items that are part of the longest increasing\n\t// subsequece\n\tvar lisTemp = []\n\tfunction makeLisIndices(a) {\n\t\tvar result = [0]\n\t\tvar u = 0, v = 0, i = 0\n\t\tvar il = lisTemp.length = a.length\n\t\tfor (var i = 0; i < il; i++) lisTemp[i] = a[i]\n\t\tfor (var i = 0; i < il; ++i) {\n\t\t\tif (a[i] === -1) continue\n\t\t\tvar j = result[result.length - 1]\n\t\t\tif (a[j] < a[i]) {\n\t\t\t\tlisTemp[i] = j\n\t\t\t\tresult.push(i)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tu = 0\n\t\t\tv = result.length - 1\n\t\t\twhile (u < v) {\n\t\t\t\t// Fast integer average without overflow.\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tvar c = (u >>> 1) + (v >>> 1) + (u & v & 1)\n\t\t\t\tif (a[result[c]] < a[i]) {\n\t\t\t\t\tu = c + 1\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tv = c\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (a[i] < a[result[u]]) {\n\t\t\t\tif (u > 0) lisTemp[i] = result[u - 1]\n\t\t\t\tresult[u] = i\n\t\t\t}\n\t\t}\n\t\tu = result.length\n\t\tv = result[u - 1]\n\t\twhile (u-- > 0) {\n\t\t\tresult[u] = v\n\t\t\tv = lisTemp[v]\n\t\t}\n\t\tlisTemp.length = 0\n\t\treturn result\n\t}\n\n\tfunction getNextSibling(vnodes, i, nextSibling) {\n\t\tfor (; i < vnodes.length; i++) {\n\t\t\tif (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom\n\t\t}\n\t\treturn nextSibling\n\t}\n\n\t// This covers a really specific edge case:\n\t// - Parent node is keyed and contains child\n\t// - Child is removed, returns unresolved promise in `onbeforeremove`\n\t// - Parent node is moved in keyed diff\n\t// - Remaining children still need moved appropriately\n\t//\n\t// Ideally, I'd track removed nodes as well, but that introduces a lot more\n\t// complexity and I'm not exactly interested in doing that.\n\tfunction moveNodes(parent, vnode, nextSibling) {\n\t\tvar frag = $doc.createDocumentFragment()\n\t\tmoveChildToFrag(parent, frag, vnode)\n\t\tinsertNode(parent, frag, nextSibling)\n\t}\n\tfunction moveChildToFrag(parent, frag, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\t\t\tfrag.appendChild(vnode.instance[i])\n\t\t\t\t}\n\t\t\t} else if (vnode.tag !== \"[\") {\n\t\t\t\t// Don't recurse for text nodes *or* elements, just fragments\n\t\t\t\tfrag.appendChild(vnode.dom)\n\t\t\t} else if (vnode.children.length === 1) {\n\t\t\t\tvnode = vnode.children[0]\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else {\n\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\tif (child != null) moveChildToFrag(parent, frag, child)\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\n\tfunction insertNode(parent, dom, nextSibling) {\n\t\tif (nextSibling != null) parent.insertBefore(dom, nextSibling)\n\t\telse parent.appendChild(dom)\n\t}\n\n\tfunction maybeSetContentEditable(vnode) {\n\t\tif (vnode.attrs == null || (\n\t\t\tvnode.attrs.contenteditable == null && // attribute\n\t\t\tvnode.attrs.contentEditable == null // property\n\t\t)) return false\n\t\tvar children = vnode.children\n\t\tif (children != null && children.length === 1 && children[0].tag === \"<\") {\n\t\t\tvar content = children[0].children\n\t\t\tif (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content\n\t\t}\n\t\telse if (vnode.text != null || children != null && children.length !== 0) throw new Error(\"Child node of a contenteditable must be trusted\")\n\t\treturn true\n\t}\n\n\t//remove\n\tfunction removeNodes(parent, vnodes, start, end) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) removeNode(parent, vnode)\n\t\t}\n\t}\n\tfunction removeNode(parent, vnode) {\n\t\tvar mask = 0\n\t\tvar original = vnode.state\n\t\tvar stateResult, attrsResult\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.state.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\tmask = 1\n\t\t\t\tstateResult = result\n\t\t\t}\n\t\t}\n\t\tif (vnode.attrs && typeof vnode.attrs.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.attrs.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tmask |= 2\n\t\t\t\tattrsResult = result\n\t\t\t}\n\t\t}\n\t\tcheckState(vnode, original)\n\n\t\t// If we can, try to fast-path it and avoid all the overhead of awaiting\n\t\tif (!mask) {\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t} else {\n\t\t\tif (stateResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 1) { mask &= 2; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tstateResult.then(next, next)\n\t\t\t}\n\t\t\tif (attrsResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 2) { mask &= 1; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tattrsResult.then(next, next)\n\t\t\t}\n\t\t}\n\n\t\tfunction reallyRemove() {\n\t\t\tcheckState(vnode, original)\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t}\n\t}\n\tfunction removeHTML(parent, vnode) {\n\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\tparent.removeChild(vnode.instance[i])\n\t\t}\n\t}\n\tfunction removeChild(parent, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tremoveHTML(parent, vnode)\n\t\t\t} else {\n\t\t\t\tif (vnode.tag !== \"[\") {\n\t\t\t\t\tparent.removeChild(vnode.dom)\n\t\t\t\t\tif (!Array.isArray(vnode.children)) break\n\t\t\t\t}\n\t\t\t\tif (vnode.children.length === 1) {\n\t\t\t\t\tvnode = vnode.children[0]\n\t\t\t\t\tif (vnode != null) continue\n\t\t\t\t} else {\n\t\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\t\tif (child != null) removeChild(parent, child)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\tfunction onremove(vnode) {\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onremove === \"function\") callHook.call(vnode.state.onremove, vnode)\n\t\tif (vnode.attrs && typeof vnode.attrs.onremove === \"function\") callHook.call(vnode.attrs.onremove, vnode)\n\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\tif (vnode.instance != null) onremove(vnode.instance)\n\t\t} else {\n\t\t\tvar children = vnode.children\n\t\t\tif (Array.isArray(children)) {\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\tvar child = children[i]\n\t\t\t\t\tif (child != null) onremove(child)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t//attrs\n\tfunction setAttrs(vnode, attrs, ns) {\n\t\tfor (var key in attrs) {\n\t\t\tsetAttr(vnode, key, null, attrs[key], ns)\n\t\t}\n\t}\n\tfunction setAttr(vnode, key, old, value, ns) {\n\t\tif (key === \"key\" || key === \"is\" || value == null || isLifecycleMethod(key) || (old === value && !isFormAttribute(vnode, key)) && typeof value !== \"object\") return\n\t\tif (key[0] === \"o\" && key[1] === \"n\") return updateEvent(vnode, key, value)\n\t\tif (key.slice(0, 6) === \"xlink:\") vnode.dom.setAttributeNS(\"http://www.w3.org/1999/xlink\", key.slice(6), value)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, value)\n\t\telse if (hasPropertyKey(vnode, key, ns)) {\n\t\t\tif (key === \"value\") {\n\t\t\t\t// Only do the coercion if we're actually going to check the value.\n\t\t\t\t/* eslint-disable no-implicit-coercion */\n\t\t\t\t//setting input[value] to same value by typing on focused element moves cursor to end in Chrome\n\t\t\t\tif ((vnode.tag === \"input\" || vnode.tag === \"textarea\") && vnode.dom.value === \"\" + value && vnode.dom === activeElement()) return\n\t\t\t\t//setting select[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"select\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t//setting option[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"option\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t/* eslint-enable no-implicit-coercion */\n\t\t\t}\n\t\t\t// If you assign an input type that is not supported by IE 11 with an assignment expression, an error will occur.\n\t\t\tif (vnode.tag === \"input\" && key === \"type\") vnode.dom.setAttribute(key, value)\n\t\t\telse vnode.dom[key] = value\n\t\t} else {\n\t\t\tif (typeof value === \"boolean\") {\n\t\t\t\tif (value) vnode.dom.setAttribute(key, \"\")\n\t\t\t\telse vnode.dom.removeAttribute(key)\n\t\t\t}\n\t\t\telse vnode.dom.setAttribute(key === \"className\" ? \"class\" : key, value)\n\t\t}\n\t}\n\tfunction removeAttr(vnode, key, old, ns) {\n\t\tif (key === \"key\" || key === \"is\" || old == null || isLifecycleMethod(key)) return\n\t\tif (key[0] === \"o\" && key[1] === \"n\" && !isLifecycleMethod(key)) updateEvent(vnode, key, undefined)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, null)\n\t\telse if (\n\t\t\thasPropertyKey(vnode, key, ns)\n\t\t\t&& key !== \"className\"\n\t\t\t&& !(key === \"value\" && (\n\t\t\t\tvnode.tag === \"option\"\n\t\t\t\t|| vnode.tag === \"select\" && vnode.dom.selectedIndex === -1 && vnode.dom === activeElement()\n\t\t\t))\n\t\t\t&& !(vnode.tag === \"input\" && key === \"type\")\n\t\t) {\n\t\t\tvnode.dom[key] = null\n\t\t} else {\n\t\t\tvar nsLastIndex = key.indexOf(\":\")\n\t\t\tif (nsLastIndex !== -1) key = key.slice(nsLastIndex + 1)\n\t\t\tif (old !== false) vnode.dom.removeAttribute(key === \"className\" ? \"class\" : key)\n\t\t}\n\t}\n\tfunction setLateSelectAttrs(vnode, attrs) {\n\t\tif (\"value\" in attrs) {\n\t\t\tif(attrs.value === null) {\n\t\t\t\tif (vnode.dom.selectedIndex !== -1) vnode.dom.value = null\n\t\t\t} else {\n\t\t\t\tvar normalized = \"\" + attrs.value // eslint-disable-line no-implicit-coercion\n\t\t\t\tif (vnode.dom.value !== normalized || vnode.dom.selectedIndex === -1) {\n\t\t\t\t\tvnode.dom.value = normalized\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (\"selectedIndex\" in attrs) setAttr(vnode, \"selectedIndex\", null, attrs.selectedIndex, undefined)\n\t}\n\tfunction updateAttrs(vnode, old, attrs, ns) {\n\t\tif (attrs != null) {\n\t\t\tfor (var key in attrs) {\n\t\t\t\tsetAttr(vnode, key, old && old[key], attrs[key], ns)\n\t\t\t}\n\t\t}\n\t\tvar val\n\t\tif (old != null) {\n\t\t\tfor (var key in old) {\n\t\t\t\tif (((val = old[key]) != null) && (attrs == null || attrs[key] == null)) {\n\t\t\t\t\tremoveAttr(vnode, key, val, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction isFormAttribute(vnode, attr) {\n\t\treturn attr === \"value\" || attr === \"checked\" || attr === \"selectedIndex\" || attr === \"selected\" && vnode.dom === activeElement() || vnode.tag === \"option\" && vnode.dom.parentNode === $doc.activeElement\n\t}\n\tfunction isLifecycleMethod(attr) {\n\t\treturn attr === \"oninit\" || attr === \"oncreate\" || attr === \"onupdate\" || attr === \"onremove\" || attr === \"onbeforeremove\" || attr === \"onbeforeupdate\"\n\t}\n\tfunction hasPropertyKey(vnode, key, ns) {\n\t\t// Filter out namespaced keys\n\t\treturn ns === undefined && (\n\t\t\t// If it's a custom element, just keep it.\n\t\t\tvnode.tag.indexOf(\"-\") > -1 || vnode.attrs != null && vnode.attrs.is ||\n\t\t\t// If it's a normal element, let's try to avoid a few browser bugs.\n\t\t\tkey !== \"href\" && key !== \"list\" && key !== \"form\" && key !== \"width\" && key !== \"height\"// && key !== \"type\"\n\t\t\t// Defer the property check until *after* we check everything.\n\t\t) && key in vnode.dom\n\t}\n\n\t//style\n\tvar uppercaseRegex = /[A-Z]/g\n\tfunction toLowerCase(capital) { return \"-\" + capital.toLowerCase() }\n\tfunction normalizeKey(key) {\n\t\treturn key[0] === \"-\" && key[1] === \"-\" ? key :\n\t\t\tkey === \"cssFloat\" ? \"float\" :\n\t\t\t\tkey.replace(uppercaseRegex, toLowerCase)\n\t}\n\tfunction updateStyle(element, old, style) {\n\t\tif (old === style) {\n\t\t\t// Styles are equivalent, do nothing.\n\t\t} else if (style == null) {\n\t\t\t// New style is missing, just clear it.\n\t\t\telement.style.cssText = \"\"\n\t\t} else if (typeof style !== \"object\") {\n\t\t\t// New style is a string, let engine deal with patching.\n\t\t\telement.style.cssText = style\n\t\t} else if (old == null || typeof old !== \"object\") {\n\t\t\t// `old` is missing or a string, `style` is an object.\n\t\t\telement.style.cssText = \"\"\n\t\t\t// Add new style properties\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null) element.style.setProperty(normalizeKey(key), String(value))\n\t\t\t}\n\t\t} else {\n\t\t\t// Both old & new are (different) objects.\n\t\t\t// Update style properties that have changed\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null && (value = String(value)) !== String(old[key])) {\n\t\t\t\t\telement.style.setProperty(normalizeKey(key), value)\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Remove style properties that no longer exist\n\t\t\tfor (var key in old) {\n\t\t\t\tif (old[key] != null && style[key] == null) {\n\t\t\t\t\telement.style.removeProperty(normalizeKey(key))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Here's an explanation of how this works:\n\t// 1. The event names are always (by design) prefixed by `on`.\n\t// 2. The EventListener interface accepts either a function or an object\n\t// with a `handleEvent` method.\n\t// 3. The object does not inherit from `Object.prototype`, to avoid\n\t// any potential interference with that (e.g. setters).\n\t// 4. The event name is remapped to the handler before calling it.\n\t// 5. In function-based event handlers, `ev.target === this`. We replicate\n\t// that below.\n\t// 6. In function-based event handlers, `return false` prevents the default\n\t// action and stops event propagation. We replicate that below.\n\tfunction EventDict() {\n\t\t// Save this, so the current redraw is correctly tracked.\n\t\tthis._ = currentRedraw\n\t}\n\tEventDict.prototype = Object.create(null)\n\tEventDict.prototype.handleEvent = function (ev) {\n\t\tvar handler = this[\"on\" + ev.type]\n\t\tvar result\n\t\tif (typeof handler === \"function\") result = handler.call(ev.currentTarget, ev)\n\t\telse if (typeof handler.handleEvent === \"function\") handler.handleEvent(ev)\n\t\tif (this._ && ev.redraw !== false) (0, this._)()\n\t\tif (result === false) {\n\t\t\tev.preventDefault()\n\t\t\tev.stopPropagation()\n\t\t}\n\t}\n\n\t//event\n\tfunction updateEvent(vnode, key, value) {\n\t\tif (vnode.events != null) {\n\t\t\tif (vnode.events[key] === value) return\n\t\t\tif (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\t\tif (vnode.events[key] == null) vnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = value\n\t\t\t} else {\n\t\t\t\tif (vnode.events[key] != null) vnode.dom.removeEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = undefined\n\t\t\t}\n\t\t} else if (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\tvnode.events = new EventDict()\n\t\t\tvnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\tvnode.events[key] = value\n\t\t}\n\t}\n\n\t//lifecycle\n\tfunction initLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.oninit === \"function\") callHook.call(source.oninit, vnode)\n\t\tif (typeof source.oncreate === \"function\") hooks.push(callHook.bind(source.oncreate, vnode))\n\t}\n\tfunction updateLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.onupdate === \"function\") hooks.push(callHook.bind(source.onupdate, vnode))\n\t}\n\tfunction shouldNotUpdate(vnode, old) {\n\t\tdo {\n\t\t\tif (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.attrs.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.state.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\treturn false\n\t\t} while (false); // eslint-disable-line no-constant-condition\n\t\tvnode.dom = old.dom\n\t\tvnode.domSize = old.domSize\n\t\tvnode.instance = old.instance\n\t\t// One would think having the actual latest attributes would be ideal,\n\t\t// but it doesn't let us properly diff based on our current internal\n\t\t// representation. We have to save not only the old DOM info, but also\n\t\t// the attributes used to create it, as we diff *that*, not against the\n\t\t// DOM directly (with a few exceptions in `setAttr`). And, of course, we\n\t\t// need to save the children and text as they are conceptually not\n\t\t// unlike special \"attributes\" internally.\n\t\tvnode.attrs = old.attrs\n\t\tvnode.children = old.children\n\t\tvnode.text = old.text\n\t\treturn true\n\t}\n\n\treturn function(dom, vnodes, redraw) {\n\t\tif (!dom) throw new TypeError(\"Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.\")\n\t\tvar hooks = []\n\t\tvar active = activeElement()\n\t\tvar namespace = dom.namespaceURI\n\n\t\t// First time rendering into a node clears it out\n\t\tif (dom.vnodes == null) dom.textContent = \"\"\n\n\t\tvnodes = Vnode.normalizeChildren(Array.isArray(vnodes) ? vnodes : [vnodes])\n\t\tvar prevRedraw = currentRedraw\n\t\ttry {\n\t\t\tcurrentRedraw = typeof redraw === \"function\" ? redraw : undefined\n\t\t\tupdateNodes(dom, dom.vnodes, vnodes, hooks, null, namespace === \"http://www.w3.org/1999/xhtml\" ? undefined : namespace)\n\t\t} finally {\n\t\t\tcurrentRedraw = prevRedraw\n\t\t}\n\t\tdom.vnodes = vnodes\n\t\t// `document.activeElement` can return null: https://html.spec.whatwg.org/multipage/interaction.html#dom-document-activeelement\n\t\tif (active != null && activeElement() !== active && typeof active.focus === \"function\") active.focus()\n\t\tfor (var i = 0; i < hooks.length; i++) hooks[i]()\n\t}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(render, schedule, console) {\n\tvar subscriptions = []\n\tvar rendering = false\n\tvar pending = false\n\n\tfunction sync() {\n\t\tif (rendering) throw new Error(\"Nested m.redraw.sync() call\")\n\t\trendering = true\n\t\tfor (var i = 0; i < subscriptions.length; i += 2) {\n\t\t\ttry { render(subscriptions[i], Vnode(subscriptions[i + 1]), redraw) }\n\t\t\tcatch (e) { console.error(e) }\n\t\t}\n\t\trendering = false\n\t}\n\n\tfunction redraw() {\n\t\tif (!pending) {\n\t\t\tpending = true\n\t\t\tschedule(function() {\n\t\t\t\tpending = false\n\t\t\t\tsync()\n\t\t\t})\n\t\t}\n\t}\n\n\tredraw.sync = sync\n\n\tfunction mount(root, component) {\n\t\tif (component != null && component.view == null && typeof component !== \"function\") {\n\t\t\tthrow new TypeError(\"m.mount(element, component) expects a component, not a vnode\")\n\t\t}\n\n\t\tvar index = subscriptions.indexOf(root)\n\t\tif (index >= 0) {\n\t\t\tsubscriptions.splice(index, 2)\n\t\t\trender(root, [], redraw)\n\t\t}\n\n\t\tif (component != null) {\n\t\t\tsubscriptions.push(root, component)\n\t\t\trender(root, Vnode(component), redraw)\n\t\t}\n\t}\n\n\treturn {mount: mount, redraw: redraw}\n}\n","\"use strict\"\n\nvar buildPathname = require(\"../pathname/build\")\n\nmodule.exports = function($window, Promise, oncompletion) {\n\tvar callbackCount = 0\n\n\tfunction PromiseProxy(executor) {\n\t\treturn new Promise(executor)\n\t}\n\n\t// In case the global Promise is some userland library's where they rely on\n\t// `foo instanceof this.constructor`, `this.constructor.resolve(value)`, or\n\t// similar. Let's *not* break them.\n\tPromiseProxy.prototype = Promise.prototype\n\tPromiseProxy.__proto__ = Promise // eslint-disable-line no-proto\n\n\tfunction makeRequest(factory) {\n\t\treturn function(url, args) {\n\t\t\tif (typeof url !== \"string\") { args = url; url = url.url }\n\t\t\telse if (args == null) args = {}\n\t\t\tvar promise = new Promise(function(resolve, reject) {\n\t\t\t\tfactory(buildPathname(url, args.params), args, function (data) {\n\t\t\t\t\tif (typeof args.type === \"function\") {\n\t\t\t\t\t\tif (Array.isArray(data)) {\n\t\t\t\t\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tdata[i] = new args.type(data[i])\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse data = new args.type(data)\n\t\t\t\t\t}\n\t\t\t\t\tresolve(data)\n\t\t\t\t}, reject)\n\t\t\t})\n\t\t\tif (args.background === true) return promise\n\t\t\tvar count = 0\n\t\t\tfunction complete() {\n\t\t\t\tif (--count === 0 && typeof oncompletion === \"function\") oncompletion()\n\t\t\t}\n\n\t\t\treturn wrap(promise)\n\n\t\t\tfunction wrap(promise) {\n\t\t\t\tvar then = promise.then\n\t\t\t\t// Set the constructor, so engines know to not await or resolve\n\t\t\t\t// this as a native promise. At the time of writing, this is\n\t\t\t\t// only necessary for V8, but their behavior is the correct\n\t\t\t\t// behavior per spec. See this spec issue for more details:\n\t\t\t\t// https://github.com/tc39/ecma262/issues/1577. Also, see the\n\t\t\t\t// corresponding comment in `request/tests/test-request.js` for\n\t\t\t\t// a bit more background on the issue at hand.\n\t\t\t\tpromise.constructor = PromiseProxy\n\t\t\t\tpromise.then = function() {\n\t\t\t\t\tcount++\n\t\t\t\t\tvar next = then.apply(promise, arguments)\n\t\t\t\t\tnext.then(complete, function(e) {\n\t\t\t\t\t\tcomplete()\n\t\t\t\t\t\tif (count === 0) throw e\n\t\t\t\t\t})\n\t\t\t\t\treturn wrap(next)\n\t\t\t\t}\n\t\t\t\treturn promise\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction hasHeader(args, name) {\n\t\tfor (var key in args.headers) {\n\t\t\tif ({}.hasOwnProperty.call(args.headers, key) && name.test(key)) return true\n\t\t}\n\t\treturn false\n\t}\n\n\treturn {\n\t\trequest: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar method = args.method != null ? args.method.toUpperCase() : \"GET\"\n\t\t\tvar body = args.body\n\t\t\tvar assumeJSON = (args.serialize == null || args.serialize === JSON.serialize) && !(body instanceof $window.FormData)\n\t\t\tvar responseType = args.responseType || (typeof args.extract === \"function\" ? \"\" : \"json\")\n\n\t\t\tvar xhr = new $window.XMLHttpRequest(), aborted = false\n\t\t\tvar original = xhr, replacedAbort\n\t\t\tvar abort = xhr.abort\n\n\t\t\txhr.abort = function() {\n\t\t\t\taborted = true\n\t\t\t\tabort.call(this)\n\t\t\t}\n\n\t\t\txhr.open(method, url, args.async !== false, typeof args.user === \"string\" ? args.user : undefined, typeof args.password === \"string\" ? args.password : undefined)\n\n\t\t\tif (assumeJSON && body != null && !hasHeader(args, /^content-type$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\")\n\t\t\t}\n\t\t\tif (typeof args.deserialize !== \"function\" && !hasHeader(args, /^accept$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Accept\", \"application/json, text/*\")\n\t\t\t}\n\t\t\tif (args.withCredentials) xhr.withCredentials = args.withCredentials\n\t\t\tif (args.timeout) xhr.timeout = args.timeout\n\t\t\txhr.responseType = responseType\n\n\t\t\tfor (var key in args.headers) {\n\t\t\t\tif ({}.hasOwnProperty.call(args.headers, key)) {\n\t\t\t\t\txhr.setRequestHeader(key, args.headers[key])\n\t\t\t\t}\n\t\t\t}\n\n\t\t\txhr.onreadystatechange = function(ev) {\n\t\t\t\t// Don't throw errors on xhr.abort().\n\t\t\t\tif (aborted) return\n\n\t\t\t\tif (ev.target.readyState === 4) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar success = (ev.target.status >= 200 && ev.target.status < 300) || ev.target.status === 304 || (/^file:\\/\\//i).test(url)\n\t\t\t\t\t\t// When the response type isn't \"\" or \"text\",\n\t\t\t\t\t\t// `xhr.responseText` is the wrong thing to use.\n\t\t\t\t\t\t// Browsers do the right thing and throw here, and we\n\t\t\t\t\t\t// should honor that and do the right thing by\n\t\t\t\t\t\t// preferring `xhr.response` where possible/practical.\n\t\t\t\t\t\tvar response = ev.target.response, message\n\n\t\t\t\t\t\tif (responseType === \"json\") {\n\t\t\t\t\t\t\t// For IE and Edge, which don't implement\n\t\t\t\t\t\t\t// `responseType: \"json\"`.\n\t\t\t\t\t\t\tif (!ev.target.responseType && typeof args.extract !== \"function\") response = JSON.parse(ev.target.responseText)\n\t\t\t\t\t\t} else if (!responseType || responseType === \"text\") {\n\t\t\t\t\t\t\t// Only use this default if it's text. If a parsed\n\t\t\t\t\t\t\t// document is needed on old IE and friends (all\n\t\t\t\t\t\t\t// unsupported), the user should use a custom\n\t\t\t\t\t\t\t// `config` instead. They're already using this at\n\t\t\t\t\t\t\t// their own risk.\n\t\t\t\t\t\t\tif (response == null) response = ev.target.responseText\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof args.extract === \"function\") {\n\t\t\t\t\t\t\tresponse = args.extract(ev.target, args)\n\t\t\t\t\t\t\tsuccess = true\n\t\t\t\t\t\t} else if (typeof args.deserialize === \"function\") {\n\t\t\t\t\t\t\tresponse = args.deserialize(response)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (success) resolve(response)\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttry { message = ev.target.responseText }\n\t\t\t\t\t\t\tcatch (e) { message = response }\n\t\t\t\t\t\t\tvar error = new Error(message)\n\t\t\t\t\t\t\terror.code = ev.target.status\n\t\t\t\t\t\t\terror.response = response\n\t\t\t\t\t\t\treject(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\treject(e)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof args.config === \"function\") {\n\t\t\t\txhr = args.config(xhr, args, url) || xhr\n\n\t\t\t\t// Propagate the `abort` to any replacement XHR as well.\n\t\t\t\tif (xhr !== original) {\n\t\t\t\t\treplacedAbort = xhr.abort\n\t\t\t\t\txhr.abort = function() {\n\t\t\t\t\t\taborted = true\n\t\t\t\t\t\treplacedAbort.call(this)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (body == null) xhr.send()\n\t\t\telse if (typeof args.serialize === \"function\") xhr.send(args.serialize(body))\n\t\t\telse if (body instanceof $window.FormData) xhr.send(body)\n\t\t\telse xhr.send(JSON.stringify(body))\n\t\t}),\n\t\tjsonp: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar callbackName = args.callbackName || \"_mithril_\" + Math.round(Math.random() * 1e16) + \"_\" + callbackCount++\n\t\t\tvar script = $window.document.createElement(\"script\")\n\t\t\t$window[callbackName] = function(data) {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\tresolve(data)\n\t\t\t}\n\t\t\tscript.onerror = function() {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\treject(new Error(\"JSONP request failed\"))\n\t\t\t}\n\t\t\tscript.src = url + (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") +\n\t\t\t\tencodeURIComponent(args.callbackKey || \"callback\") + \"=\" +\n\t\t\t\tencodeURIComponent(callbackName)\n\t\t\t$window.document.documentElement.appendChild(script)\n\t\t}),\n\t}\n}\n","\"use strict\"\n\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./api/router\")(window, mountRedraw)\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar m = require(\"../render/hyperscript\")\nvar Promise = require(\"../promise/promise\")\n\nvar buildPathname = require(\"../pathname/build\")\nvar parsePathname = require(\"../pathname/parse\")\nvar compileTemplate = require(\"../pathname/compileTemplate\")\nvar assign = require(\"../pathname/assign\")\n\nvar sentinel = {}\n\nmodule.exports = function($window, mountRedraw) {\n\tvar fireAsync\n\n\tfunction setPath(path, data, options) {\n\t\tpath = buildPathname(path, data)\n\t\tif (fireAsync != null) {\n\t\t\tfireAsync()\n\t\t\tvar state = options ? options.state : null\n\t\t\tvar title = options ? options.title : null\n\t\t\tif (options && options.replace) $window.history.replaceState(state, title, route.prefix + path)\n\t\t\telse $window.history.pushState(state, title, route.prefix + path)\n\t\t}\n\t\telse {\n\t\t\t$window.location.href = route.prefix + path\n\t\t}\n\t}\n\n\tvar currentResolver = sentinel, component, attrs, currentPath, lastUpdate\n\n\tvar SKIP = route.SKIP = {}\n\n\tfunction route(root, defaultRoute, routes) {\n\t\tif (root == null) throw new Error(\"Ensure the DOM element that was passed to `m.route` is not undefined\")\n\t\t// 0 = start\n\t\t// 1 = init\n\t\t// 2 = ready\n\t\tvar state = 0\n\n\t\tvar compiled = Object.keys(routes).map(function(route) {\n\t\t\tif (route[0] !== \"/\") throw new SyntaxError(\"Routes must start with a `/`\")\n\t\t\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(route)) {\n\t\t\t\tthrow new SyntaxError(\"Route parameter names must be separated with either `/`, `.`, or `-`\")\n\t\t\t}\n\t\t\treturn {\n\t\t\t\troute: route,\n\t\t\t\tcomponent: routes[route],\n\t\t\t\tcheck: compileTemplate(route),\n\t\t\t}\n\t\t})\n\t\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\t\tvar p = Promise.resolve()\n\t\tvar scheduled = false\n\t\tvar onremove\n\n\t\tfireAsync = null\n\n\t\tif (defaultRoute != null) {\n\t\t\tvar defaultData = parsePathname(defaultRoute)\n\n\t\t\tif (!compiled.some(function (i) { return i.check(defaultData) })) {\n\t\t\t\tthrow new ReferenceError(\"Default route doesn't match any known routes\")\n\t\t\t}\n\t\t}\n\n\t\tfunction resolveRoute() {\n\t\t\tscheduled = false\n\t\t\t// Consider the pathname holistically. The prefix might even be invalid,\n\t\t\t// but that's not our problem.\n\t\t\tvar prefix = $window.location.hash\n\t\t\tif (route.prefix[0] !== \"#\") {\n\t\t\t\tprefix = $window.location.search + prefix\n\t\t\t\tif (route.prefix[0] !== \"?\") {\n\t\t\t\t\tprefix = $window.location.pathname + prefix\n\t\t\t\t\tif (prefix[0] !== \"/\") prefix = \"/\" + prefix\n\t\t\t\t}\n\t\t\t}\n\t\t\t// This seemingly useless `.concat()` speeds up the tests quite a bit,\n\t\t\t// since the representation is consistently a relatively poorly\n\t\t\t// optimized cons string.\n\t\t\tvar path = prefix.concat()\n\t\t\t\t.replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponent)\n\t\t\t\t.slice(route.prefix.length)\n\t\t\tvar data = parsePathname(path)\n\n\t\t\tassign(data.params, $window.history.state)\n\n\t\t\tfunction fail() {\n\t\t\t\tif (path === defaultRoute) throw new Error(\"Could not resolve default route \" + defaultRoute)\n\t\t\t\tsetPath(defaultRoute, null, {replace: true})\n\t\t\t}\n\n\t\t\tloop(0)\n\t\t\tfunction loop(i) {\n\t\t\t\t// 0 = init\n\t\t\t\t// 1 = scheduled\n\t\t\t\t// 2 = done\n\t\t\t\tfor (; i < compiled.length; i++) {\n\t\t\t\t\tif (compiled[i].check(data)) {\n\t\t\t\t\t\tvar payload = compiled[i].component\n\t\t\t\t\t\tvar matchedRoute = compiled[i].route\n\t\t\t\t\t\tvar localComp = payload\n\t\t\t\t\t\tvar update = lastUpdate = function(comp) {\n\t\t\t\t\t\t\tif (update !== lastUpdate) return\n\t\t\t\t\t\t\tif (comp === SKIP) return loop(i + 1)\n\t\t\t\t\t\t\tcomponent = comp != null && (typeof comp.view === \"function\" || typeof comp === \"function\")? comp : \"div\"\n\t\t\t\t\t\t\tattrs = data.params, currentPath = path, lastUpdate = null\n\t\t\t\t\t\t\tcurrentResolver = payload.render ? payload : null\n\t\t\t\t\t\t\tif (state === 2) mountRedraw.redraw()\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tstate = 2\n\t\t\t\t\t\t\t\tmountRedraw.redraw.sync()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// There's no understating how much I *wish* I could\n\t\t\t\t\t\t// use `async`/`await` here...\n\t\t\t\t\t\tif (payload.view || typeof payload === \"function\") {\n\t\t\t\t\t\t\tpayload = {}\n\t\t\t\t\t\t\tupdate(localComp)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (payload.onmatch) {\n\t\t\t\t\t\t\tp.then(function () {\n\t\t\t\t\t\t\t\treturn payload.onmatch(data.params, path, matchedRoute)\n\t\t\t\t\t\t\t}).then(update, fail)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse update(\"div\")\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfail()\n\t\t\t}\n\t\t}\n\n\t\t// Set it unconditionally so `m.route.set` and `m.route.Link` both work,\n\t\t// even if neither `pushState` nor `hashchange` are supported. It's\n\t\t// cleared if `hashchange` is used, since that makes it automatically\n\t\t// async.\n\t\tfireAsync = function() {\n\t\t\tif (!scheduled) {\n\t\t\t\tscheduled = true\n\t\t\t\tcallAsync(resolveRoute)\n\t\t\t}\n\t\t}\n\n\t\tif (typeof $window.history.pushState === \"function\") {\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"popstate\", fireAsync, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"popstate\", fireAsync, false)\n\t\t} else if (route.prefix[0] === \"#\") {\n\t\t\tfireAsync = null\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"hashchange\", resolveRoute, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"hashchange\", resolveRoute, false)\n\t\t}\n\n\t\treturn mountRedraw.mount(root, {\n\t\t\tonbeforeupdate: function() {\n\t\t\t\tstate = state ? 2 : 1\n\t\t\t\treturn !(!state || sentinel === currentResolver)\n\t\t\t},\n\t\t\toncreate: resolveRoute,\n\t\t\tonremove: onremove,\n\t\t\tview: function() {\n\t\t\t\tif (!state || sentinel === currentResolver) return\n\t\t\t\t// Wrap in a fragment to preserve existing key semantics\n\t\t\t\tvar vnode = [Vnode(component, attrs.key, attrs)]\n\t\t\t\tif (currentResolver) vnode = currentResolver.render(vnode[0])\n\t\t\t\treturn vnode\n\t\t\t},\n\t\t})\n\t}\n\troute.set = function(path, data, options) {\n\t\tif (lastUpdate != null) {\n\t\t\toptions = options || {}\n\t\t\toptions.replace = true\n\t\t}\n\t\tlastUpdate = null\n\t\tsetPath(path, data, options)\n\t}\n\troute.get = function() {return currentPath}\n\troute.prefix = \"#!\"\n\troute.Link = {\n\t\tview: function(vnode) {\n\t\t\tvar options = vnode.attrs.options\n\t\t\t// Remove these so they don't get overwritten\n\t\t\tvar attrs = {}, onclick, href\n\t\t\tassign(attrs, vnode.attrs)\n\t\t\t// The first two are internal, but the rest are magic attributes\n\t\t\t// that need censored to not screw up rendering.\n\t\t\tattrs.selector = attrs.options = attrs.key = attrs.oninit =\n\t\t\tattrs.oncreate = attrs.onbeforeupdate = attrs.onupdate =\n\t\t\tattrs.onbeforeremove = attrs.onremove = null\n\n\t\t\t// Do this now so we can get the most current `href` and `disabled`.\n\t\t\t// Those attributes may also be specified in the selector, and we\n\t\t\t// should honor that.\n\t\t\tvar child = m(vnode.attrs.selector || \"a\", attrs, vnode.children)\n\n\t\t\t// Let's provide a *right* way to disable a route link, rather than\n\t\t\t// letting people screw up accessibility on accident.\n\t\t\t//\n\t\t\t// The attribute is coerced so users don't get surprised over\n\t\t\t// `disabled: 0` resulting in a button that's somehow routable\n\t\t\t// despite being visibly disabled.\n\t\t\tif (child.attrs.disabled = Boolean(child.attrs.disabled)) {\n\t\t\t\tchild.attrs.href = null\n\t\t\t\tchild.attrs[\"aria-disabled\"] = \"true\"\n\t\t\t\t// If you *really* do want to do this on a disabled link, use\n\t\t\t\t// an `oncreate` hook to add it.\n\t\t\t\tchild.attrs.onclick = null\n\t\t\t} else {\n\t\t\t\tonclick = child.attrs.onclick\n\t\t\t\thref = child.attrs.href\n\t\t\t\tchild.attrs.href = route.prefix + href\n\t\t\t\tchild.attrs.onclick = function(e) {\n\t\t\t\t\tvar result\n\t\t\t\t\tif (typeof onclick === \"function\") {\n\t\t\t\t\t\tresult = onclick.call(e.currentTarget, e)\n\t\t\t\t\t} else if (onclick == null || typeof onclick !== \"object\") {\n\t\t\t\t\t\t// do nothing\n\t\t\t\t\t} else if (typeof onclick.handleEvent === \"function\") {\n\t\t\t\t\t\tonclick.handleEvent(e)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Adapted from React Router's implementation:\n\t\t\t\t\t// https://github.com/ReactTraining/react-router/blob/520a0acd48ae1b066eb0b07d6d4d1790a1d02482/packages/react-router-dom/modules/Link.js\n\t\t\t\t\t//\n\t\t\t\t\t// Try to be flexible and intuitive in how we handle links.\n\t\t\t\t\t// Fun fact: links aren't as obvious to get right as you\n\t\t\t\t\t// would expect. There's a lot more valid ways to click a\n\t\t\t\t\t// link than this, and one might want to not simply click a\n\t\t\t\t\t// link, but right click or command-click it to copy the\n\t\t\t\t\t// link target, etc. Nope, this isn't just for blind people.\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip if `onclick` prevented default\n\t\t\t\t\t\tresult !== false && !e.defaultPrevented &&\n\t\t\t\t\t\t// Ignore everything but left clicks\n\t\t\t\t\t\t(e.button === 0 || e.which === 0 || e.which === 1) &&\n\t\t\t\t\t\t// Let the browser handle `target=_blank`, etc.\n\t\t\t\t\t\t(!e.currentTarget.target || e.currentTarget.target === \"_self\") &&\n\t\t\t\t\t\t// No modifier keys\n\t\t\t\t\t\t!e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey\n\t\t\t\t\t) {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\te.redraw = false\n\t\t\t\t\t\troute.set(href, null, options)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn child\n\t\t},\n\t}\n\troute.param = function(key) {\n\t\treturn attrs && key != null ? attrs[key] : attrs\n\t}\n\n\treturn route\n}\n","\"use strict\"\n\nvar parsePathname = require(\"./parse\")\n\n// Compiles a template into a function that takes a resolved path (without query\n// strings) and returns an object containing the template parameters with their\n// parsed values. This expects the input of the compiled template to be the\n// output of `parsePathname`. Note that it does *not* remove query parameters\n// specified in the template.\nmodule.exports = function(template) {\n\tvar templateData = parsePathname(template)\n\tvar templateKeys = Object.keys(templateData.params)\n\tvar keys = []\n\tvar regexp = new RegExp(\"^\" + templateData.path.replace(\n\t\t// I escape literal text so people can use things like `:file.:ext` or\n\t\t// `:lang-:locale` in routes. This is all merged into one pass so I\n\t\t// don't also accidentally escape `-` and make it harder to detect it to\n\t\t// ban it from template parameters.\n\t\t/:([^\\/.-]+)(\\.{3}|\\.(?!\\.)|-)?|[\\\\^$*+.()|\\[\\]{}]/g,\n\t\tfunction(m, key, extra) {\n\t\t\tif (key == null) return \"\\\\\" + m\n\t\t\tkeys.push({k: key, r: extra === \"...\"})\n\t\t\tif (extra === \"...\") return \"(.*)\"\n\t\t\tif (extra === \".\") return \"([^/]+)\\\\.\"\n\t\t\treturn \"([^/]+)\" + (extra || \"\")\n\t\t}\n\t) + \"$\")\n\treturn function(data) {\n\t\t// First, check the params. Usually, there isn't any, and it's just\n\t\t// checking a static set.\n\t\tfor (var i = 0; i < templateKeys.length; i++) {\n\t\t\tif (templateData.params[templateKeys[i]] !== data.params[templateKeys[i]]) return false\n\t\t}\n\t\t// If no interpolations exist, let's skip all the ceremony\n\t\tif (!keys.length) return regexp.test(data.path)\n\t\tvar values = regexp.exec(data.path)\n\t\tif (values == null) return false\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tdata.params[keys[i].k] = keys[i].r ? values[i + 1] : decodeURIComponent(values[i + 1])\n\t\t}\n\t\treturn true\n\t}\n}\n","if(!global[\"m\"]) global[\"m\"] = {};\nmodule.exports = global[\"m\"][\"bidi\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\bidi.js\");","( function _package( factory ){\r\n\tif( typeof define === 'function' && define.amd ){\r\n\t\tdefine( [ 'mithril' ], factory )\r\n\t}\r\n\telse if( typeof exports === 'object' ){\r\n\t\tmodule.exports = factory( require( 'mithril' ) )\r\n\t}\r\n\telse{\r\n\t\tfactory( m )\r\n\t}\r\n}( function define( m ){\r\n\tfunction bidi( node, prop ){\r\n\t\tvar type = node.tag === 'select'\r\n\t\t\t? node.attrs.multi\r\n\t\t\t\t? 'multi'\r\n\t\t\t\t: 'select'\r\n\t\t\t: node.attrs.type\r\n\r\n\t\t// Setup: bind listeners\r\n\t\tif( type === 'multi' ){\r\n\t\t\tnode.attrs.onchange = function(){\r\n\t\t\t\tprop( [].slice.call( this.selectedOptions, function( x ){\r\n\t\t\t\t\treturn x.value\r\n\t\t\t\t} ) )\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if( type === 'select' ){\r\n\t\t\tnode.attrs.onchange = function( e ){\r\n\t\t\t\tprop( this.selectedOptions[ 0 ].value )\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if( type === 'checkbox' ){\r\n\t\t\tnode.attrs.onchange = function( e ){\r\n\t\t\t\tprop( this.checked )\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.attrs.onchange = node.attrs.oninput = function( e ){\r\n\t\t\t\tprop( this.value )\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif( node.tag === 'select' ){\r\n\t\t\tnode.children.forEach( function( option ){\r\n\t\t\t\tif( option.attrs.value === prop() || option.children[ 0 ] === prop() ){\r\n\t\t\t\t\toption.attrs.selected = true\r\n\t\t\t\t}\r\n\t\t\t} )\r\n\t\t}\r\n\t\telse if( type === 'checkbox' ){\r\n\t\t\tnode.attrs.checked = prop()\r\n\t\t}\r\n\t\telse if( type === 'radio' ){\r\n\t\t\tnode.attrs.checked = prop() === node.attrs.value\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.attrs.value = prop()\r\n\t\t}\r\n\r\n\t\treturn node\r\n\t}\r\n\r\n\tbidi.view = function( ctrl, node, prop ){\r\n\t return bidi( node, node.attrs.bidi )\r\n\t}\r\n\r\n\tif( m.attrs ) m.attrs.bidi = bidi\r\n\t\r\n\tm.bidi = bidi\r\n\r\n\treturn bidi\r\n} ) )\r\n","module.exports = m;","module.exports = global[\"Mousetrap\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\mousetrap.js\");","/*global define:false */\n/**\n * Copyright 2012-2017 Craig Campbell\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * Mousetrap is a simple keyboard shortcut library for Javascript with\n * no external dependencies\n *\n * @version 1.6.3\n * @url craig.is/killing/mice\n */\n(function(window, document, undefined) {\n\n // Check if mousetrap is used inside browser, if not, return\n if (!window) {\n return;\n }\n\n /**\n * mapping of special keycodes to their corresponding keys\n *\n * everything in this dictionary cannot use keypress events\n * so it has to be here to map to the correct keycodes for\n * keyup/keydown events\n *\n * @type {Object}\n */\n var _MAP = {\n 8: 'backspace',\n 9: 'tab',\n 13: 'enter',\n 16: 'shift',\n 17: 'ctrl',\n 18: 'alt',\n 20: 'capslock',\n 27: 'esc',\n 32: 'space',\n 33: 'pageup',\n 34: 'pagedown',\n 35: 'end',\n 36: 'home',\n 37: 'left',\n 38: 'up',\n 39: 'right',\n 40: 'down',\n 45: 'ins',\n 46: 'del',\n 91: 'meta',\n 93: 'meta',\n 224: 'meta'\n };\n\n /**\n * mapping for special characters so they can support\n *\n * this dictionary is only used incase you want to bind a\n * keyup or keydown event to one of these keys\n *\n * @type {Object}\n */\n var _KEYCODE_MAP = {\n 106: '*',\n 107: '+',\n 109: '-',\n 110: '.',\n 111 : '/',\n 186: ';',\n 187: '=',\n 188: ',',\n 189: '-',\n 190: '.',\n 191: '/',\n 192: '`',\n 219: '[',\n 220: '\\\\',\n 221: ']',\n 222: '\\''\n };\n\n /**\n * this is a mapping of keys that require shift on a US keypad\n * back to the non shift equivelents\n *\n * this is so you can use keyup events with these keys\n *\n * note that this will only work reliably on US keyboards\n *\n * @type {Object}\n */\n var _SHIFT_MAP = {\n '~': '`',\n '!': '1',\n '@': '2',\n '#': '3',\n '$': '4',\n '%': '5',\n '^': '6',\n '&': '7',\n '*': '8',\n '(': '9',\n ')': '0',\n '_': '-',\n '+': '=',\n ':': ';',\n '\\\"': '\\'',\n '<': ',',\n '>': '.',\n '?': '/',\n '|': '\\\\'\n };\n\n /**\n * this is a list of special strings you can use to map\n * to modifier keys when you specify your keyboard shortcuts\n *\n * @type {Object}\n */\n var _SPECIAL_ALIASES = {\n 'option': 'alt',\n 'command': 'meta',\n 'return': 'enter',\n 'escape': 'esc',\n 'plus': '+',\n 'mod': /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? 'meta' : 'ctrl'\n };\n\n /**\n * variable to store the flipped version of _MAP from above\n * needed to check if we should use keypress or not when no action\n * is specified\n *\n * @type {Object|undefined}\n */\n var _REVERSE_MAP;\n\n /**\n * loop through the f keys, f1 to f19 and add them to the map\n * programatically\n */\n for (var i = 1; i < 20; ++i) {\n _MAP[111 + i] = 'f' + i;\n }\n\n /**\n * loop through to map numbers on the numeric keypad\n */\n for (i = 0; i <= 9; ++i) {\n\n // This needs to use a string cause otherwise since 0 is falsey\n // mousetrap will never fire for numpad 0 pressed as part of a keydown\n // event.\n //\n // @see https://github.com/ccampbell/mousetrap/pull/258\n _MAP[i + 96] = i.toString();\n }\n\n /**\n * cross browser add event method\n *\n * @param {Element|HTMLDocument} object\n * @param {string} type\n * @param {Function} callback\n * @returns void\n */\n function _addEvent(object, type, callback) {\n if (object.addEventListener) {\n object.addEventListener(type, callback, false);\n return;\n }\n\n object.attachEvent('on' + type, callback);\n }\n\n /**\n * takes the event and returns the key character\n *\n * @param {Event} e\n * @return {string}\n */\n function _characterFromEvent(e) {\n\n // for keypress events we should return the character as is\n if (e.type == 'keypress') {\n var character = String.fromCharCode(e.which);\n\n // if the shift key is not pressed then it is safe to assume\n // that we want the character to be lowercase. this means if\n // you accidentally have caps lock on then your key bindings\n // will continue to work\n //\n // the only side effect that might not be desired is if you\n // bind something like 'A' cause you want to trigger an\n // event when capital A is pressed caps lock will no longer\n // trigger the event. shift+a will though.\n if (!e.shiftKey) {\n character = character.toLowerCase();\n }\n\n return character;\n }\n\n // for non keypress events the special maps are needed\n if (_MAP[e.which]) {\n return _MAP[e.which];\n }\n\n if (_KEYCODE_MAP[e.which]) {\n return _KEYCODE_MAP[e.which];\n }\n\n // if it is not in the special map\n\n // with keydown and keyup events the character seems to always\n // come in as an uppercase character whether you are pressing shift\n // or not. we should make sure it is always lowercase for comparisons\n return String.fromCharCode(e.which).toLowerCase();\n }\n\n /**\n * checks if two arrays are equal\n *\n * @param {Array} modifiers1\n * @param {Array} modifiers2\n * @returns {boolean}\n */\n function _modifiersMatch(modifiers1, modifiers2) {\n return modifiers1.sort().join(',') === modifiers2.sort().join(',');\n }\n\n /**\n * takes a key event and figures out what the modifiers are\n *\n * @param {Event} e\n * @returns {Array}\n */\n function _eventModifiers(e) {\n var modifiers = [];\n\n if (e.shiftKey) {\n modifiers.push('shift');\n }\n\n if (e.altKey) {\n modifiers.push('alt');\n }\n\n if (e.ctrlKey) {\n modifiers.push('ctrl');\n }\n\n if (e.metaKey) {\n modifiers.push('meta');\n }\n\n return modifiers;\n }\n\n /**\n * prevents default for this event\n *\n * @param {Event} e\n * @returns void\n */\n function _preventDefault(e) {\n if (e.preventDefault) {\n e.preventDefault();\n return;\n }\n\n e.returnValue = false;\n }\n\n /**\n * stops propogation for this event\n *\n * @param {Event} e\n * @returns void\n */\n function _stopPropagation(e) {\n if (e.stopPropagation) {\n e.stopPropagation();\n return;\n }\n\n e.cancelBubble = true;\n }\n\n /**\n * determines if the keycode specified is a modifier key or not\n *\n * @param {string} key\n * @returns {boolean}\n */\n function _isModifier(key) {\n return key == 'shift' || key == 'ctrl' || key == 'alt' || key == 'meta';\n }\n\n /**\n * reverses the map lookup so that we can look for specific keys\n * to see what can and can't use keypress\n *\n * @return {Object}\n */\n function _getReverseMap() {\n if (!_REVERSE_MAP) {\n _REVERSE_MAP = {};\n for (var key in _MAP) {\n\n // pull out the numeric keypad from here cause keypress should\n // be able to detect the keys from the character\n if (key > 95 && key < 112) {\n continue;\n }\n\n if (_MAP.hasOwnProperty(key)) {\n _REVERSE_MAP[_MAP[key]] = key;\n }\n }\n }\n return _REVERSE_MAP;\n }\n\n /**\n * picks the best action based on the key combination\n *\n * @param {string} key - character for key\n * @param {Array} modifiers\n * @param {string=} action passed in\n */\n function _pickBestAction(key, modifiers, action) {\n\n // if no action was picked in we should try to pick the one\n // that we think would work best for this key\n if (!action) {\n action = _getReverseMap()[key] ? 'keydown' : 'keypress';\n }\n\n // modifier keys don't work as expected with keypress,\n // switch to keydown\n if (action == 'keypress' && modifiers.length) {\n action = 'keydown';\n }\n\n return action;\n }\n\n /**\n * Converts from a string key combination to an array\n *\n * @param {string} combination like \"command+shift+l\"\n * @return {Array}\n */\n function _keysFromString(combination) {\n if (combination === '+') {\n return ['+'];\n }\n\n combination = combination.replace(/\\+{2}/g, '+plus');\n return combination.split('+');\n }\n\n /**\n * Gets info for a specific key combination\n *\n * @param {string} combination key combination (\"command+s\" or \"a\" or \"*\")\n * @param {string=} action\n * @returns {Object}\n */\n function _getKeyInfo(combination, action) {\n var keys;\n var key;\n var i;\n var modifiers = [];\n\n // take the keys from this pattern and figure out what the actual\n // pattern is all about\n keys = _keysFromString(combination);\n\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n\n // normalize key names\n if (_SPECIAL_ALIASES[key]) {\n key = _SPECIAL_ALIASES[key];\n }\n\n // if this is not a keypress event then we should\n // be smart about using shift keys\n // this will only work for US keyboards however\n if (action && action != 'keypress' && _SHIFT_MAP[key]) {\n key = _SHIFT_MAP[key];\n modifiers.push('shift');\n }\n\n // if this key is a modifier then add it to the list of modifiers\n if (_isModifier(key)) {\n modifiers.push(key);\n }\n }\n\n // depending on what the key combination is\n // we will try to pick the best event for it\n action = _pickBestAction(key, modifiers, action);\n\n return {\n key: key,\n modifiers: modifiers,\n action: action\n };\n }\n\n function _belongsTo(element, ancestor) {\n if (element === null || element === document) {\n return false;\n }\n\n if (element === ancestor) {\n return true;\n }\n\n return _belongsTo(element.parentNode, ancestor);\n }\n\n function Mousetrap(targetElement) {\n var self = this;\n\n targetElement = targetElement || document;\n\n if (!(self instanceof Mousetrap)) {\n return new Mousetrap(targetElement);\n }\n\n /**\n * element to attach key events to\n *\n * @type {Element}\n */\n self.target = targetElement;\n\n /**\n * a list of all the callbacks setup via Mousetrap.bind()\n *\n * @type {Object}\n */\n self._callbacks = {};\n\n /**\n * direct map of string combinations to callbacks used for trigger()\n *\n * @type {Object}\n */\n self._directMap = {};\n\n /**\n * keeps track of what level each sequence is at since multiple\n * sequences can start out with the same sequence\n *\n * @type {Object}\n */\n var _sequenceLevels = {};\n\n /**\n * variable to store the setTimeout call\n *\n * @type {null|number}\n */\n var _resetTimer;\n\n /**\n * temporary state where we will ignore the next keyup\n *\n * @type {boolean|string}\n */\n var _ignoreNextKeyup = false;\n\n /**\n * temporary state where we will ignore the next keypress\n *\n * @type {boolean}\n */\n var _ignoreNextKeypress = false;\n\n /**\n * are we currently inside of a sequence?\n * type of action (\"keyup\" or \"keydown\" or \"keypress\") or false\n *\n * @type {boolean|string}\n */\n var _nextExpectedAction = false;\n\n /**\n * resets all sequence counters except for the ones passed in\n *\n * @param {Object} doNotReset\n * @returns void\n */\n function _resetSequences(doNotReset) {\n doNotReset = doNotReset || {};\n\n var activeSequences = false,\n key;\n\n for (key in _sequenceLevels) {\n if (doNotReset[key]) {\n activeSequences = true;\n continue;\n }\n _sequenceLevels[key] = 0;\n }\n\n if (!activeSequences) {\n _nextExpectedAction = false;\n }\n }\n\n /**\n * finds all callbacks that match based on the keycode, modifiers,\n * and action\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event|Object} e\n * @param {string=} sequenceName - name of the sequence we are looking for\n * @param {string=} combination\n * @param {number=} level\n * @returns {Array}\n */\n function _getMatches(character, modifiers, e, sequenceName, combination, level) {\n var i;\n var callback;\n var matches = [];\n var action = e.type;\n\n // if there are no events related to this keycode\n if (!self._callbacks[character]) {\n return [];\n }\n\n // if a modifier key is coming up on its own we should allow it\n if (action == 'keyup' && _isModifier(character)) {\n modifiers = [character];\n }\n\n // loop through all callbacks for the key that was pressed\n // and see if any of them match\n for (i = 0; i < self._callbacks[character].length; ++i) {\n callback = self._callbacks[character][i];\n\n // if a sequence name is not specified, but this is a sequence at\n // the wrong level then move onto the next match\n if (!sequenceName && callback.seq && _sequenceLevels[callback.seq] != callback.level) {\n continue;\n }\n\n // if the action we are looking for doesn't match the action we got\n // then we should keep going\n if (action != callback.action) {\n continue;\n }\n\n // if this is a keypress event and the meta key and control key\n // are not pressed that means that we need to only look at the\n // character, otherwise check the modifiers as well\n //\n // chrome will not fire a keypress if meta or control is down\n // safari will fire a keypress if meta or meta+shift is down\n // firefox will fire a keypress if meta or control is down\n if ((action == 'keypress' && !e.metaKey && !e.ctrlKey) || _modifiersMatch(modifiers, callback.modifiers)) {\n\n // when you bind a combination or sequence a second time it\n // should overwrite the first one. if a sequenceName or\n // combination is specified in this call it does just that\n //\n // @todo make deleting its own method?\n var deleteCombo = !sequenceName && callback.combo == combination;\n var deleteSequence = sequenceName && callback.seq == sequenceName && callback.level == level;\n if (deleteCombo || deleteSequence) {\n self._callbacks[character].splice(i, 1);\n }\n\n matches.push(callback);\n }\n }\n\n return matches;\n }\n\n /**\n * actually calls the callback function\n *\n * if your callback function returns false this will use the jquery\n * convention - prevent default and stop propogation on the event\n *\n * @param {Function} callback\n * @param {Event} e\n * @returns void\n */\n function _fireCallback(callback, e, combo, sequence) {\n\n // if this event should not happen stop here\n if (self.stopCallback(e, e.target || e.srcElement, combo, sequence)) {\n return;\n }\n\n if (callback(e, combo) === false) {\n _preventDefault(e);\n _stopPropagation(e);\n }\n }\n\n /**\n * handles a character key event\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event} e\n * @returns void\n */\n self._handleKey = function(character, modifiers, e) {\n var callbacks = _getMatches(character, modifiers, e);\n var i;\n var doNotReset = {};\n var maxLevel = 0;\n var processedSequenceCallback = false;\n\n // Calculate the maxLevel for sequences so we can only execute the longest callback sequence\n for (i = 0; i < callbacks.length; ++i) {\n if (callbacks[i].seq) {\n maxLevel = Math.max(maxLevel, callbacks[i].level);\n }\n }\n\n // loop through matching callbacks for this key event\n for (i = 0; i < callbacks.length; ++i) {\n\n // fire for all sequence callbacks\n // this is because if for example you have multiple sequences\n // bound such as \"g i\" and \"g t\" they both need to fire the\n // callback for matching g cause otherwise you can only ever\n // match the first one\n if (callbacks[i].seq) {\n\n // only fire callbacks for the maxLevel to prevent\n // subsequences from also firing\n //\n // for example 'a option b' should not cause 'option b' to fire\n // even though 'option b' is part of the other sequence\n //\n // any sequences that do not match here will be discarded\n // below by the _resetSequences call\n if (callbacks[i].level != maxLevel) {\n continue;\n }\n\n processedSequenceCallback = true;\n\n // keep a list of which sequences were matches for later\n doNotReset[callbacks[i].seq] = 1;\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo, callbacks[i].seq);\n continue;\n }\n\n // if there were no sequence matches but we are still here\n // that means this is a regular match so we should fire that\n if (!processedSequenceCallback) {\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo);\n }\n }\n\n // if the key you pressed matches the type of sequence without\n // being a modifier (ie \"keyup\" or \"keypress\") then we should\n // reset all sequences that were not matched by this event\n //\n // this is so, for example, if you have the sequence \"h a t\" and you\n // type \"h e a r t\" it does not match. in this case the \"e\" will\n // cause the sequence to reset\n //\n // modifier keys are ignored because you can have a sequence\n // that contains modifiers such as \"enter ctrl+space\" and in most\n // cases the modifier key will be pressed before the next key\n //\n // also if you have a sequence such as \"ctrl+b a\" then pressing the\n // \"b\" key will trigger a \"keypress\" and a \"keydown\"\n //\n // the \"keydown\" is expected when there is a modifier, but the\n // \"keypress\" ends up matching the _nextExpectedAction since it occurs\n // after and that causes the sequence to reset\n //\n // we ignore keypresses in a sequence that directly follow a keydown\n // for the same character\n var ignoreThisKeypress = e.type == 'keypress' && _ignoreNextKeypress;\n if (e.type == _nextExpectedAction && !_isModifier(character) && !ignoreThisKeypress) {\n _resetSequences(doNotReset);\n }\n\n _ignoreNextKeypress = processedSequenceCallback && e.type == 'keydown';\n };\n\n /**\n * handles a keydown event\n *\n * @param {Event} e\n * @returns void\n */\n function _handleKeyEvent(e) {\n\n // normalize e.which for key events\n // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion\n if (typeof e.which !== 'number') {\n e.which = e.keyCode;\n }\n\n var character = _characterFromEvent(e);\n\n // no character found then stop\n if (!character) {\n return;\n }\n\n // need to use === for the character check because the character can be 0\n if (e.type == 'keyup' && _ignoreNextKeyup === character) {\n _ignoreNextKeyup = false;\n return;\n }\n\n self.handleKey(character, _eventModifiers(e), e);\n }\n\n /**\n * called to set a 1 second timeout on the specified sequence\n *\n * this is so after each key press in the sequence you have 1 second\n * to press the next key before you have to start over\n *\n * @returns void\n */\n function _resetSequenceTimer() {\n clearTimeout(_resetTimer);\n _resetTimer = setTimeout(_resetSequences, 1000);\n }\n\n /**\n * binds a key sequence to an event\n *\n * @param {string} combo - combo specified in bind call\n * @param {Array} keys\n * @param {Function} callback\n * @param {string=} action\n * @returns void\n */\n function _bindSequence(combo, keys, callback, action) {\n\n // start off by adding a sequence level record for this combination\n // and setting the level to 0\n _sequenceLevels[combo] = 0;\n\n /**\n * callback to increase the sequence level for this sequence and reset\n * all other sequences that were active\n *\n * @param {string} nextAction\n * @returns {Function}\n */\n function _increaseSequence(nextAction) {\n return function() {\n _nextExpectedAction = nextAction;\n ++_sequenceLevels[combo];\n _resetSequenceTimer();\n };\n }\n\n /**\n * wraps the specified callback inside of another function in order\n * to reset all sequence counters as soon as this sequence is done\n *\n * @param {Event} e\n * @returns void\n */\n function _callbackAndReset(e) {\n _fireCallback(callback, e, combo);\n\n // we should ignore the next key up if the action is key down\n // or keypress. this is so if you finish a sequence and\n // release the key the final key will not trigger a keyup\n if (action !== 'keyup') {\n _ignoreNextKeyup = _characterFromEvent(e);\n }\n\n // weird race condition if a sequence ends with the key\n // another sequence begins with\n setTimeout(_resetSequences, 10);\n }\n\n // loop through keys one at a time and bind the appropriate callback\n // function. for any key leading up to the final one it should\n // increase the sequence. after the final, it should reset all sequences\n //\n // if an action is specified in the original bind call then that will\n // be used throughout. otherwise we will pass the action that the\n // next key in the sequence should match. this allows a sequence\n // to mix and match keypress and keydown events depending on which\n // ones are better suited to the key provided\n for (var i = 0; i < keys.length; ++i) {\n var isFinal = i + 1 === keys.length;\n var wrappedCallback = isFinal ? _callbackAndReset : _increaseSequence(action || _getKeyInfo(keys[i + 1]).action);\n _bindSingle(keys[i], wrappedCallback, action, combo, i);\n }\n }\n\n /**\n * binds a single keyboard combination\n *\n * @param {string} combination\n * @param {Function} callback\n * @param {string=} action\n * @param {string=} sequenceName - name of sequence if part of sequence\n * @param {number=} level - what part of the sequence the command is\n * @returns void\n */\n function _bindSingle(combination, callback, action, sequenceName, level) {\n\n // store a direct mapped reference for use with Mousetrap.trigger\n self._directMap[combination + ':' + action] = callback;\n\n // make sure multiple spaces in a row become a single space\n combination = combination.replace(/\\s+/g, ' ');\n\n var sequence = combination.split(' ');\n var info;\n\n // if this pattern is a sequence of keys then run through this method\n // to reprocess each pattern one key at a time\n if (sequence.length > 1) {\n _bindSequence(combination, sequence, callback, action);\n return;\n }\n\n info = _getKeyInfo(combination, action);\n\n // make sure to initialize array if this is the first time\n // a callback is added for this key\n self._callbacks[info.key] = self._callbacks[info.key] || [];\n\n // remove an existing match if there is one\n _getMatches(info.key, info.modifiers, {type: info.action}, sequenceName, combination, level);\n\n // add this call back to the array\n // if it is a sequence put it at the beginning\n // if not put it at the end\n //\n // this is important because the way these are processed expects\n // the sequence ones to come first\n self._callbacks[info.key][sequenceName ? 'unshift' : 'push']({\n callback: callback,\n modifiers: info.modifiers,\n action: info.action,\n seq: sequenceName,\n level: level,\n combo: combination\n });\n }\n\n /**\n * binds multiple combinations to the same callback\n *\n * @param {Array} combinations\n * @param {Function} callback\n * @param {string|undefined} action\n * @returns void\n */\n self._bindMultiple = function(combinations, callback, action) {\n for (var i = 0; i < combinations.length; ++i) {\n _bindSingle(combinations[i], callback, action);\n }\n };\n\n // start!\n _addEvent(targetElement, 'keypress', _handleKeyEvent);\n _addEvent(targetElement, 'keydown', _handleKeyEvent);\n _addEvent(targetElement, 'keyup', _handleKeyEvent);\n }\n\n /**\n * binds an event to mousetrap\n *\n * can be a single key, a combination of keys separated with +,\n * an array of keys, or a sequence of keys separated by spaces\n *\n * be sure to list the modifier keys first to make sure that the\n * correct key ends up getting bound (the last key in the pattern)\n *\n * @param {string|Array} keys\n * @param {Function} callback\n * @param {string=} action - 'keypress', 'keydown', or 'keyup'\n * @returns void\n */\n Mousetrap.prototype.bind = function(keys, callback, action) {\n var self = this;\n keys = keys instanceof Array ? keys : [keys];\n self._bindMultiple.call(self, keys, callback, action);\n return self;\n };\n\n /**\n * unbinds an event to mousetrap\n *\n * the unbinding sets the callback function of the specified key combo\n * to an empty function and deletes the corresponding key in the\n * _directMap dict.\n *\n * TODO: actually remove this from the _callbacks dictionary instead\n * of binding an empty function\n *\n * the keycombo+action has to be exactly the same as\n * it was defined in the bind method\n *\n * @param {string|Array} keys\n * @param {string} action\n * @returns void\n */\n Mousetrap.prototype.unbind = function(keys, action) {\n var self = this;\n return self.bind.call(self, keys, function() {}, action);\n };\n\n /**\n * triggers an event that has already been bound\n *\n * @param {string} keys\n * @param {string=} action\n * @returns void\n */\n Mousetrap.prototype.trigger = function(keys, action) {\n var self = this;\n if (self._directMap[keys + ':' + action]) {\n self._directMap[keys + ':' + action]({}, keys);\n }\n return self;\n };\n\n /**\n * resets the library back to its initial state. this is useful\n * if you want to clear out the current keyboard shortcuts and bind\n * new ones - for example if you switch to another page\n *\n * @returns void\n */\n Mousetrap.prototype.reset = function() {\n var self = this;\n self._callbacks = {};\n self._directMap = {};\n return self;\n };\n\n /**\n * should we stop this event before firing off callbacks\n *\n * @param {Event} e\n * @param {Element} element\n * @return {boolean}\n */\n Mousetrap.prototype.stopCallback = function(e, element) {\n var self = this;\n\n // if the element has the class \"mousetrap\" then no need to stop\n if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {\n return false;\n }\n\n if (_belongsTo(element, self.target)) {\n return false;\n }\n\n // Events originating from a shadow DOM are re-targetted and `e.target` is the shadow host,\n // not the initial event target in the shadow tree. Note that not all events cross the\n // shadow boundary.\n // For shadow trees with `mode: 'open'`, the initial event target is the first element in\n // the event’s composed path. For shadow trees with `mode: 'closed'`, the initial event\n // target cannot be obtained.\n if ('composedPath' in e && typeof e.composedPath === 'function') {\n // For open shadow trees, update `element` so that the following check works.\n var initialEventTarget = e.composedPath()[0];\n if (initialEventTarget !== e.target) {\n element = initialEventTarget;\n }\n }\n\n // stop for input, select, and textarea\n return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable;\n };\n\n /**\n * exposes _handleKey publicly so it can be overwritten by extensions\n */\n Mousetrap.prototype.handleKey = function() {\n var self = this;\n return self._handleKey.apply(self, arguments);\n };\n\n /**\n * allow custom key mappings\n */\n Mousetrap.addKeycodes = function(object) {\n for (var key in object) {\n if (object.hasOwnProperty(key)) {\n _MAP[key] = object[key];\n }\n }\n _REVERSE_MAP = null;\n };\n\n /**\n * Init the global mousetrap functions\n *\n * This method is needed to allow the global mousetrap functions to work\n * now that mousetrap is a constructor function.\n */\n Mousetrap.init = function() {\n var documentMousetrap = Mousetrap(document);\n for (var method in documentMousetrap) {\n if (method.charAt(0) !== '_') {\n Mousetrap[method] = (function(method) {\n return function() {\n return documentMousetrap[method].apply(documentMousetrap, arguments);\n };\n } (method));\n }\n }\n };\n\n Mousetrap.init();\n\n // expose mousetrap to the global object\n window.Mousetrap = Mousetrap;\n\n // expose as a common js module\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = Mousetrap;\n }\n\n // expose mousetrap as an AMD module\n if (typeof define === 'function' && define.amd) {\n define(function() {\n return Mousetrap;\n });\n }\n}) (typeof window !== 'undefined' ? window : null, typeof window !== 'undefined' ? document : null);\n","module.exports = global[\"classNames\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\index.js\");","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n;(function($){\n var zepto = $.zepto, oldQsa = zepto.qsa, oldMatches = zepto.matches\n\n function visible(elem){\n elem = $(elem)\n return !!(elem.width() || elem.height()) && elem.css(\"display\") !== \"none\"\n }\n\n // Implements a subset from:\n // http://api.jquery.com/category/selectors/jquery-selector-extensions/\n //\n // Each filter function receives the current index, all nodes in the\n // considered set, and a value if there were parentheses. The value\n // of `this` is the node currently being considered. The function returns the\n // resulting node(s), null, or undefined.\n //\n // Complex selectors are not supported:\n // li:has(label:contains(\"foo\")) + li:has(label:contains(\"bar\"))\n // ul.inner:first > li\n var filters = $.expr[':'] = {\n visible: function(){ if (visible(this)) return this },\n hidden: function(){ if (!visible(this)) return this },\n selected: function(){ if (this.selected) return this },\n checked: function(){ if (this.checked) return this },\n parent: function(){ return this.parentNode },\n first: function(idx){ if (idx === 0) return this },\n last: function(idx, nodes){ if (idx === nodes.length - 1) return this },\n eq: function(idx, _, value){ if (idx === value) return this },\n contains: function(idx, _, text){ if ($(this).text().indexOf(text) > -1) return this },\n has: function(idx, _, sel){ if (zepto.qsa(this, sel).length) return this }\n }\n\n var filterRe = new RegExp('(.*):(\\\\w+)(?:\\\\(([^)]+)\\\\))?$\\\\s*'),\n childRe = /^\\s*>/,\n classTag = 'Zepto' + (+new Date())\n\n function process(sel, fn) {\n // quote the hash in `a[href^=#]` expression\n sel = sel.replace(/=#\\]/g, '=\"#\"]')\n var filter, arg, match = filterRe.exec(sel)\n if (match && match[2] in filters) {\n filter = filters[match[2]], arg = match[3]\n sel = match[1]\n if (arg) {\n var num = Number(arg)\n if (isNaN(num)) arg = arg.replace(/^[\"']|[\"']$/g, '')\n else arg = num\n }\n }\n return fn(sel, filter, arg)\n }\n\n zepto.qsa = function(node, selector) {\n return process(selector, function(sel, filter, arg){\n try {\n var taggedParent\n if (!sel && filter) sel = '*'\n else if (childRe.test(sel))\n // support \"> *\" child queries by tagging the parent node with a\n // unique class and prepending that classname onto the selector\n taggedParent = $(node).addClass(classTag), sel = '.'+classTag+' '+sel\n\n var nodes = oldQsa(node, sel)\n } catch(e) {\n console.error('error performing selector: %o', selector)\n throw e\n } finally {\n if (taggedParent) taggedParent.removeClass(classTag)\n }\n return !filter ? nodes :\n zepto.uniq($.map(nodes, function(n, i){ return filter.call(n, i, nodes, arg) }))\n })\n }\n\n zepto.matches = function(node, selector){\n return process(selector, function(sel, filter, arg){\n return (!sel || oldMatches(node, sel)) &&\n (!filter || filter.call(node, null, arg) === node)\n })\n }\n})(Zepto)\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n// The following code is heavily inspired by jQuery's $.fn.data()\n\n;(function($){\n var data = {}, dataAttr = $.fn.data, camelize = $.camelCase,\n exp = $.expando = 'Zepto' + (+new Date()), emptyArray = []\n\n // Get value from node:\n // 1. first try key as given,\n // 2. then try camelized key,\n // 3. fall back to reading \"data-*\" attribute.\n function getData(node, name) {\n var id = node[exp], store = id && data[id]\n if (name === undefined) return store || setData(node)\n else {\n if (store) {\n if (name in store) return store[name]\n var camelName = camelize(name)\n if (camelName in store) return store[camelName]\n }\n return dataAttr.call($(node), name)\n }\n }\n\n // Store value under camelized key on node\n function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }\n\n // Read all \"data-*\" attributes from a node\n function attributeData(node) {\n var store = {}\n $.each(node.attributes || emptyArray, function(i, attr){\n if (attr.name.indexOf('data-') == 0)\n store[camelize(attr.name.replace('data-', ''))] =\n $.zepto.deserializeValue(attr.value)\n })\n return store\n }\n\n $.fn.data = function(name, value) {\n return value === undefined ?\n // set multiple values via object\n $.isPlainObject(name) ?\n this.each(function(i, node){\n $.each(name, function(key, value){ setData(node, key, value) })\n }) :\n // get value from first element\n (0 in this ? getData(this[0], name) : undefined) :\n // set value on all elements\n this.each(function(){ setData(this, name, value) })\n }\n\n $.data = function(elem, name, value) {\n return $(elem).data(name, value)\n }\n\n $.hasData = function(elem) {\n var id = elem[exp], store = id && data[id]\n return store ? !$.isEmptyObject(store) : false\n }\n\n $.fn.removeData = function(names) {\n if (typeof names == 'string') names = names.split(/\\s+/)\n return this.each(function(){\n var id = this[exp], store = id && data[id]\n if (store) $.each(names || store, function(key){\n delete store[names ? camelize(this) : key]\n })\n })\n }\n\n // Generate extended `remove` and `empty` functions\n ;['remove', 'empty'].forEach(function(methodName){\n var origFn = $.fn[methodName]\n $.fn[methodName] = function() {\n var elements = this.find('*')\n if (methodName === 'remove') elements = elements.add(this)\n elements.removeData()\n return origFn.call(this)\n }\n })\n})(Zepto)\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n;(function($, undefined){\n var prefix = '', eventPrefix,\n vendors = { Webkit: 'webkit', Moz: '', O: 'o' },\n testEl = document.createElement('div'),\n supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,\n transform,\n transitionProperty, transitionDuration, transitionTiming, transitionDelay,\n animationName, animationDuration, animationTiming, animationDelay,\n cssReset = {}\n\n function dasherize(str) { return str.replace(/([A-Z])/g, '-$1').toLowerCase() }\n function normalizeEvent(name) { return eventPrefix ? eventPrefix + name : name.toLowerCase() }\n\n if (testEl.style.transform === undefined) $.each(vendors, function(vendor, event){\n if (testEl.style[vendor + 'TransitionProperty'] !== undefined) {\n prefix = '-' + vendor.toLowerCase() + '-'\n eventPrefix = event\n return false\n }\n })\n\n transform = prefix + 'transform'\n cssReset[transitionProperty = prefix + 'transition-property'] =\n cssReset[transitionDuration = prefix + 'transition-duration'] =\n cssReset[transitionDelay = prefix + 'transition-delay'] =\n cssReset[transitionTiming = prefix + 'transition-timing-function'] =\n cssReset[animationName = prefix + 'animation-name'] =\n cssReset[animationDuration = prefix + 'animation-duration'] =\n cssReset[animationDelay = prefix + 'animation-delay'] =\n cssReset[animationTiming = prefix + 'animation-timing-function'] = ''\n\n $.fx = {\n off: (eventPrefix === undefined && testEl.style.transitionProperty === undefined),\n speeds: { _default: 400, fast: 200, slow: 600 },\n cssPrefix: prefix,\n transitionEnd: normalizeEvent('TransitionEnd'),\n animationEnd: normalizeEvent('AnimationEnd')\n }\n\n $.fn.animate = function(properties, duration, ease, callback, delay){\n if ($.isFunction(duration))\n callback = duration, ease = undefined, duration = undefined\n if ($.isFunction(ease))\n callback = ease, ease = undefined\n if ($.isPlainObject(duration))\n ease = duration.easing, callback = duration.complete, delay = duration.delay, duration = duration.duration\n if (duration) duration = (typeof duration == 'number' ? duration :\n ($.fx.speeds[duration] || $.fx.speeds._default)) / 1000\n if (delay) delay = parseFloat(delay) / 1000\n return this.anim(properties, duration, ease, callback, delay)\n }\n\n $.fn.anim = function(properties, duration, ease, callback, delay){\n var key, cssValues = {}, cssProperties, transforms = '',\n that = this, wrappedCallback, endEvent = $.fx.transitionEnd,\n fired = false\n\n if (duration === undefined) duration = $.fx.speeds._default / 1000\n if (delay === undefined) delay = 0\n if ($.fx.off) duration = 0\n\n if (typeof properties == 'string') {\n // keyframe animation\n cssValues[animationName] = properties\n cssValues[animationDuration] = duration + 's'\n cssValues[animationDelay] = delay + 's'\n cssValues[animationTiming] = (ease || 'linear')\n endEvent = $.fx.animationEnd\n } else {\n cssProperties = []\n // CSS transitions\n for (key in properties)\n if (supportedTransforms.test(key)) transforms += key + '(' + properties[key] + ') '\n else cssValues[key] = properties[key], cssProperties.push(dasherize(key))\n\n if (transforms) cssValues[transform] = transforms, cssProperties.push(transform)\n if (duration > 0 && typeof properties === 'object') {\n cssValues[transitionProperty] = cssProperties.join(', ')\n cssValues[transitionDuration] = duration + 's'\n cssValues[transitionDelay] = delay + 's'\n cssValues[transitionTiming] = (ease || 'linear')\n }\n }\n\n wrappedCallback = function(event){\n if (typeof event !== 'undefined') {\n if (event.target !== event.currentTarget) return // makes sure the event didn't bubble from \"below\"\n $(event.target).unbind(endEvent, wrappedCallback)\n } else\n $(this).unbind(endEvent, wrappedCallback) // triggered by setTimeout\n\n fired = true\n $(this).css(cssReset)\n callback && callback.call(this)\n }\n if (duration > 0){\n this.bind(endEvent, wrappedCallback)\n // transitionEnd is not always firing on older Android phones\n // so make sure it gets fired\n setTimeout(function(){\n if (fired) return\n wrappedCallback.call(that)\n }, ((duration + delay) * 1000) + 25)\n }\n\n // trigger page reflow so new elements can animate\n this.size() && this.get(0).clientLeft\n\n this.css(cssValues)\n\n if (duration <= 0) setTimeout(function() {\n that.each(function(){ wrappedCallback.call(this) })\n }, 0)\n\n return this\n }\n\n testEl = null\n})(Zepto)\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n;(function($, undefined){\n var document = window.document, docElem = document.documentElement,\n origShow = $.fn.show, origHide = $.fn.hide, origToggle = $.fn.toggle\n\n function anim(el, speed, opacity, scale, callback) {\n if (typeof speed == 'function' && !callback) callback = speed, speed = undefined\n var props = { opacity: opacity }\n if (scale) {\n props.scale = scale\n el.css($.fx.cssPrefix + 'transform-origin', '0 0')\n }\n return el.animate(props, speed, null, callback)\n }\n\n function hide(el, speed, scale, callback) {\n return anim(el, speed, 0, scale, function(){\n origHide.call($(this))\n callback && callback.call(this)\n })\n }\n\n $.fn.show = function(speed, callback) {\n origShow.call(this)\n if (speed === undefined) speed = 0\n else this.css('opacity', 0)\n return anim(this, speed, 1, '1,1', callback)\n }\n\n $.fn.hide = function(speed, callback) {\n if (speed === undefined) return origHide.call(this)\n else return hide(this, speed, '0,0', callback)\n }\n\n $.fn.toggle = function(speed, callback) {\n if (speed === undefined || typeof speed == 'boolean')\n return origToggle.call(this, speed)\n else return this.each(function(){\n var el = $(this)\n el[el.css('display') == 'none' ? 'show' : 'hide'](speed, callback)\n })\n }\n\n $.fn.fadeTo = function(speed, opacity, callback) {\n return anim(this, speed, opacity, null, callback)\n }\n\n $.fn.fadeIn = function(speed, callback) {\n var target = this.css('opacity')\n if (target > 0) this.css('opacity', 0)\n else target = 1\n return origShow.call(this).fadeTo(speed, target, callback)\n }\n\n $.fn.fadeOut = function(speed, callback) {\n return hide(this, speed, null, callback)\n }\n\n $.fn.fadeToggle = function(speed, callback) {\n return this.each(function(){\n var el = $(this)\n el[\n (el.css('opacity') == 0 || el.css('display') == 'none') ? 'fadeIn' : 'fadeOut'\n ](speed, callback)\n })\n }\n\n})(Zepto)\n","/*!\n * HC-Sticky\n * =========\n * Version: 2.2.3\n * Author: Some Web Media\n * Author URL: http://somewebmedia.com\n * Plugin URL: https://github.com/somewebmedia/hc-sticky\n * Description: Cross-browser plugin that makes any element on your page visible while you scroll\n * License: MIT\n */\n!function(t,e){\"use strict\";if(\"object\"==typeof module&&\"object\"==typeof module.exports){if(!t.document)throw new Error(\"HC-Sticky requires a browser to run.\");module.exports=e(t)}else\"function\"==typeof define&&define.amd?define(\"hcSticky\",[],e(t)):e(t)}(\"undefined\"!=typeof window?window:this,function(U){\"use strict\";var Y={top:0,bottom:0,bottomEnd:0,innerTop:0,innerSticker:null,stickyClass:\"sticky\",stickTo:null,followScroll:!0,responsive:null,mobileFirst:!1,onStart:null,onStop:null,onBeforeResize:null,onResize:null,resizeDebounce:100,disable:!1,queries:null,queryFlow:\"down\"},$=function(t,e,o){console.log(\"%c! HC Sticky:%c \"+t+\"%c \"+o+\" is now deprecated and will be removed. Use%c \"+e+\"%c instead.\",\"color: red\",\"color: darkviolet\",\"color: black\",\"color: darkviolet\",\"color: black\")},Q=U.document,X=function(n,f){var o=this;if(\"string\"==typeof n&&(n=Q.querySelector(n)),!n)return!1;f.queries&&$(\"queries\",\"responsive\",\"option\"),f.queryFlow&&$(\"queryFlow\",\"mobileFirst\",\"option\");var p={},d=X.Helpers,s=n.parentNode;\"static\"===d.getStyle(s,\"position\")&&(s.style.position=\"relative\");var u=function(){var t=0>>0;if(\"function\"!=typeof t)throw new TypeError(t+\" is not a function\");for(1 0) index-- // up\n if (e.which == 40 && index < $items.length - 1) index++ // down\n if (!~index) index = 0\n\n $items.eq(index).trigger('focus')\n }\n\n\n // DROPDOWN PLUGIN DEFINITION\n // ==========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.dropdown')\n\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n if (typeof option == 'string') data[option].call($this)\n })\n }\n\n var old = $.fn.dropdown\n\n $.fn.dropdown = Plugin\n $.fn.dropdown.Constructor = Dropdown\n\n\n // DROPDOWN NO CONFLICT\n // ====================\n\n $.fn.dropdown.noConflict = function () {\n $.fn.dropdown = old\n return this\n }\n\n\n // APPLY TO STANDARD DROPDOWN ELEMENTS\n // ===================================\n\n $(document)\n .on('click.bs.dropdown.data-api', clearMenus)\n .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\n .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)\n .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)\n .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)\n\n}(jQuery);\n","/* ========================================================================\n * Bootstrap: transition.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#transitions\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)\n // ============================================================\n\n function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n WebkitTransition : 'webkitTransitionEnd',\n MozTransition : 'transitionend',\n OTransition : 'oTransitionEnd otransitionend',\n transition : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n\n return false // explicit for ie8 ( ._.)\n }\n\n // https://blog.alexmaccaw.com/css-transitions\n $.fn.emulateTransitionEnd = function (duration) {\n var called = false\n var $el = this\n $(this).one('bsTransitionEnd', function () { called = true })\n var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\n setTimeout(callback, duration)\n return this\n }\n\n $(function () {\n $.support.transition = transitionEnd()\n\n if (!$.support.transition) return\n\n $.event.special.bsTransitionEnd = {\n bindType: $.support.transition.end,\n delegateType: $.support.transition.end,\n handle: function (e) {\n if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)\n }\n }\n })\n\n}(jQuery);\n","/* eslint-disable */\n;(function() {\n\"use strict\"\n/* eslint-enable */\nStream.SKIP = {}\nStream.lift = lift\nStream.scan = scan\nStream.merge = merge\nStream.combine = combine\nStream.scanMerge = scanMerge\nStream[\"fantasy-land/of\"] = Stream\n\nvar warnedHalt = false\nObject.defineProperty(Stream, \"HALT\", {\n\tget: function() {\n\t\twarnedHalt || console.log(\"HALT is deprecated and has been renamed to SKIP\");\n\t\twarnedHalt = true\n\t\treturn Stream.SKIP\n\t}\n})\n\nfunction Stream(value) {\n\tvar dependentStreams = []\n\tvar dependentFns = []\n\n\tfunction stream(v) {\n\t\tif (arguments.length && v !== Stream.SKIP) {\n\t\t\tvalue = v\n\t\t\tif (open(stream)) {\n\t\t\t\tstream._changing()\n\t\t\t\tstream._state = \"active\"\n\t\t\t\tdependentStreams.forEach(function(s, i) { s(dependentFns[i](value)) })\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n\tstream.constructor = Stream\n\tstream._state = arguments.length && value !== Stream.SKIP ? \"active\" : \"pending\"\n\tstream._parents = []\n\n\tstream._changing = function() {\n\t\tif (open(stream)) stream._state = \"changing\"\n\t\tdependentStreams.forEach(function(s) {\n\t\t\ts._changing()\n\t\t})\n\t}\n\n\tstream._map = function(fn, ignoreInitial) {\n\t\tvar target = ignoreInitial ? Stream() : Stream(fn(value))\n\t\ttarget._parents.push(stream)\n\t\tdependentStreams.push(target)\n\t\tdependentFns.push(fn)\n\t\treturn target\n\t}\n\n\tstream.map = function(fn) {\n\t\treturn stream._map(fn, stream._state !== \"active\")\n\t}\n\n\tvar end\n\tfunction createEnd() {\n\t\tend = Stream()\n\t\tend.map(function(value) {\n\t\t\tif (value === true) {\n\t\t\t\tstream._parents.forEach(function (p) {p._unregisterChild(stream)})\n\t\t\t\tstream._state = \"ended\"\n\t\t\t\tstream._parents.length = dependentStreams.length = dependentFns.length = 0\n\t\t\t}\n\t\t\treturn value\n\t\t})\n\t\treturn end\n\t}\n\n\tstream.toJSON = function() { return value != null && typeof value.toJSON === \"function\" ? value.toJSON() : value }\n\n\tstream[\"fantasy-land/map\"] = stream.map\n\tstream[\"fantasy-land/ap\"] = function(x) { return combine(function(s1, s2) { return s1()(s2()) }, [x, stream]) }\n\n\tstream._unregisterChild = function(child) {\n\t\tvar childIndex = dependentStreams.indexOf(child)\n\t\tif (childIndex !== -1) {\n\t\t\tdependentStreams.splice(childIndex, 1)\n\t\t\tdependentFns.splice(childIndex, 1)\n\t\t}\n\t}\n\n\tObject.defineProperty(stream, \"end\", {\n\t\tget: function() { return end || createEnd() }\n\t})\n\n\treturn stream\n}\n\nfunction combine(fn, streams) {\n\tvar ready = streams.every(function(s) {\n\t\tif (s.constructor !== Stream)\n\t\t\tthrow new Error(\"Ensure that each item passed to stream.combine/stream.merge/lift is a stream\")\n\t\treturn s._state === \"active\"\n\t})\n\tvar stream = ready\n\t\t? Stream(fn.apply(null, streams.concat([streams])))\n\t\t: Stream()\n\n\tvar changed = []\n\n\tvar mappers = streams.map(function(s) {\n\t\treturn s._map(function(value) {\n\t\t\tchanged.push(s)\n\t\t\tif (ready || streams.every(function(s) { return s._state !== \"pending\" })) {\n\t\t\t\tready = true\n\t\t\t\tstream(fn.apply(null, streams.concat([changed])))\n\t\t\t\tchanged = []\n\t\t\t}\n\t\t\treturn value\n\t\t}, true)\n\t})\n\n\tvar endStream = stream.end.map(function(value) {\n\t\tif (value === true) {\n\t\t\tmappers.forEach(function(mapper) { mapper.end(true) })\n\t\t\tendStream.end(true)\n\t\t}\n\t\treturn undefined\n\t})\n\n\treturn stream\n}\n\nfunction merge(streams) {\n\treturn combine(function() { return streams.map(function(s) { return s() }) }, streams)\n}\n\nfunction scan(fn, acc, origin) {\n\tvar stream = origin.map(function(v) {\n\t\tvar next = fn(acc, v)\n\t\tif (next !== Stream.SKIP) acc = next\n\t\treturn next\n\t})\n\tstream(acc)\n\treturn stream\n}\n\nfunction scanMerge(tuples, seed) {\n\tvar streams = tuples.map(function(tuple) { return tuple[0] })\n\n\tvar stream = combine(function() {\n\t\tvar changed = arguments[arguments.length - 1]\n\t\tstreams.forEach(function(stream, i) {\n\t\t\tif (changed.indexOf(stream) > -1)\n\t\t\t\tseed = tuples[i][1](seed, stream())\n\t\t})\n\n\t\treturn seed\n\t}, streams)\n\n\tstream(seed)\n\n\treturn stream\n}\n\nfunction lift() {\n\tvar fn = arguments[0]\n\tvar streams = Array.prototype.slice.call(arguments, 1)\n\treturn merge(streams).map(function(streams) {\n\t\treturn fn.apply(undefined, streams)\n\t})\n}\n\nfunction open(s) {\n\treturn s._state === \"pending\" || s._state === \"active\" || s._state === \"changing\"\n}\n\nif (typeof module !== \"undefined\") module[\"exports\"] = Stream\nelse if (typeof window.m === \"function\" && !(\"stream\" in window.m)) window.m.stream = Stream\nelse window.m = {stream : Stream}\n\n}());\n","/*\r\n * This file is part of Flarum.\r\n *\r\n * (c) Toby Zerner \r\n *\r\n * For the full copyright and license information, please view the LICENSE\r\n * file that was distributed with this source code.\r\n */\r\n\r\nexport * from './src/common';\r\nexport * from './src/admin';"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@flarum/core/webpack/bootstrap","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/core/(webpack)/buildin/global.js","webpack://@flarum/core/./node_modules/mithril/render/vnode.js","webpack://@flarum/core/external \"m\"","webpack://@flarum/core/./node_modules/mithril/mount-redraw.js","webpack://@flarum/core/./node_modules/mithril/pathname/build.js","webpack://@flarum/core/./node_modules/mithril/pathname/parse.js","webpack://@flarum/core/./node_modules/mithril/render/hyperscript.js","webpack://@flarum/core/./node_modules/mithril/render/hyperscriptVnode.js","webpack://@flarum/core/./node_modules/mithril/promise/promise.js","webpack://@flarum/core/./node_modules/mithril/promise/polyfill.js","webpack://@flarum/core/./node_modules/timers-browserify/main.js","webpack://@flarum/core/./node_modules/mithril/render.js","webpack://@flarum/core/./node_modules/mithril/querystring/build.js","webpack://@flarum/core/./node_modules/mithril/pathname/assign.js","webpack://@flarum/core/./node_modules/mithril/querystring/parse.js","webpack://@flarum/core/./node_modules/jump.js/dist/jump.module.js","webpack://@flarum/core/../../src/index.js","webpack://@flarum/core/../../../popper/src/utils/isFunction.js","webpack://@flarum/core/./src/common/utils/patchZepto.ts","webpack://@flarum/core/./src/common/utils/patchMithril.ts","webpack://@flarum/core/./src/common/index.ts","webpack://@flarum/core/../../src/utils/debounce.js","webpack://@flarum/core/../../src/utils/isBrowser.js","webpack://@flarum/core/../../src/utils/isFunction.js","webpack://@flarum/core/../../src/utils/getStyleComputedProperty.js","webpack://@flarum/core/../../src/utils/getParentNode.js","webpack://@flarum/core/../../src/utils/getScrollParent.js","webpack://@flarum/core/../../src/utils/isIE.js","webpack://@flarum/core/../../src/utils/getOffsetParent.js","webpack://@flarum/core/../../src/utils/getRoot.js","webpack://@flarum/core/../../src/utils/findCommonOffsetParent.js","webpack://@flarum/core/../../src/utils/isOffsetContainer.js","webpack://@flarum/core/../../src/utils/getScroll.js","webpack://@flarum/core/../../src/utils/getBordersSize.js","webpack://@flarum/core/../../src/utils/getWindowSizes.js","webpack://@flarum/core/../../src/utils/getClientRect.js","webpack://@flarum/core/../../src/utils/getBoundingClientRect.js","webpack://@flarum/core/../../src/utils/getOffsetRectRelativeToArbitraryNode.js","webpack://@flarum/core/../../src/utils/includeScroll.js","webpack://@flarum/core/../../src/utils/getFixedPositionOffsetParent.js","webpack://@flarum/core/../../src/utils/getBoundaries.js","webpack://@flarum/core/../../src/utils/getViewportOffsetRectRelativeToArtbitraryNode.js","webpack://@flarum/core/../../src/utils/isFixed.js","webpack://@flarum/core/../../src/utils/computeAutoPlacement.js","webpack://@flarum/core/../../src/utils/getReferenceOffsets.js","webpack://@flarum/core/../../src/utils/getOuterSizes.js","webpack://@flarum/core/../../src/utils/getOppositePlacement.js","webpack://@flarum/core/../../src/utils/getPopperOffsets.js","webpack://@flarum/core/../../src/utils/find.js","webpack://@flarum/core/../../src/utils/runModifiers.js","webpack://@flarum/core/../../src/utils/findIndex.js","webpack://@flarum/core/../../src/methods/update.js","webpack://@flarum/core/../../src/utils/isModifierEnabled.js","webpack://@flarum/core/../../src/utils/getSupportedPropertyName.js","webpack://@flarum/core/../../src/methods/destroy.js","webpack://@flarum/core/../../src/utils/getWindow.js","webpack://@flarum/core/../../src/utils/setupEventListeners.js","webpack://@flarum/core/../../src/methods/enableEventListeners.js","webpack://@flarum/core/../../src/methods/disableEventListeners.js","webpack://@flarum/core/../../src/utils/removeEventListeners.js","webpack://@flarum/core/../../src/utils/isNumeric.js","webpack://@flarum/core/../../src/utils/setStyles.js","webpack://@flarum/core/../../src/modifiers/computeStyle.js","webpack://@flarum/core/../../src/utils/isModifierRequired.js","webpack://@flarum/core/../../src/methods/placements.js","webpack://@flarum/core/../../src/utils/clockwise.js","webpack://@flarum/core/../../src/modifiers/flip.js","webpack://@flarum/core/../../src/modifiers/offset.js","webpack://@flarum/core/../../src/modifiers/index.js","webpack://@flarum/core/../../src/methods/defaults.js","webpack://@flarum/core/../../src/modifiers/shift.js","webpack://@flarum/core/../../src/modifiers/preventOverflow.js","webpack://@flarum/core/../../src/modifiers/keepTogether.js","webpack://@flarum/core/../../src/modifiers/arrow.js","webpack://@flarum/core/../../src/utils/getOppositeVariation.js","webpack://@flarum/core/../../src/modifiers/inner.js","webpack://@flarum/core/../../src/modifiers/hide.js","webpack://@flarum/core/../../src/utils/getRoundedOffsets.js","webpack://@flarum/core/../../src/modifiers/applyStyle.js","webpack://@flarum/core/../../src/utils/setAttributes.js","webpack://@flarum/core/./node_modules/dayjs/plugin/relativeTime.js","webpack://@flarum/core/./node_modules/dayjs/plugin/localizedFormat.js","webpack://@flarum/core/./node_modules/mithril/stream.js","webpack://@flarum/core/./node_modules/zepto/dist/zepto.js-exposed","webpack://@flarum/core/./node_modules/zepto/dist/zepto.js","webpack://@flarum/core/./node_modules/dayjs/dayjs.min.js-exposed?da0f","webpack://@flarum/core/./node_modules/dayjs/dayjs.min.js-exposed","webpack://@flarum/core/./node_modules/dayjs/dayjs.min.js","webpack://@flarum/core/./node_modules/mithril/index.js-exposed","webpack://@flarum/core/./node_modules/mithril/index.js","webpack://@flarum/core/./node_modules/mithril/hyperscript.js","webpack://@flarum/core/./node_modules/mithril/render/trust.js","webpack://@flarum/core/./node_modules/mithril/render/fragment.js","webpack://@flarum/core/./node_modules/mithril/request.js","webpack://@flarum/core/./node_modules/setimmediate/setImmediate.js","webpack://@flarum/core/./node_modules/process/browser.js","webpack://@flarum/core/./node_modules/mithril/render/render.js","webpack://@flarum/core/./node_modules/mithril/api/mount-redraw.js","webpack://@flarum/core/./node_modules/mithril/request/request.js","webpack://@flarum/core/./node_modules/mithril/route.js","webpack://@flarum/core/./node_modules/mithril/api/router.js","webpack://@flarum/core/./node_modules/mithril/pathname/compileTemplate.js","webpack://@flarum/core/./node_modules/m.attrs.bidi/bidi.js-exposed","webpack://@flarum/core/./node_modules/m.attrs.bidi/bidi.js","webpack://@flarum/core/./node_modules/mousetrap/mousetrap.js-exposed","webpack://@flarum/core/./node_modules/mousetrap/mousetrap.js","webpack://@flarum/core/./node_modules/classNames/index.js-exposed","webpack://@flarum/core/./node_modules/classNames/index.js","webpack://@flarum/core/./node_modules/zepto/src/selector.js","webpack://@flarum/core/./node_modules/zepto/src/data.js","webpack://@flarum/core/./node_modules/zepto/src/fx.js","webpack://@flarum/core/./node_modules/zepto/src/fx_methods.js","webpack://@flarum/core/./node_modules/hc-sticky/dist/hc-sticky.js","webpack://@flarum/core/(webpack)/buildin/harmony-module.js","webpack://@flarum/core/(webpack)/buildin/amd-options.js","webpack://@flarum/core/./node_modules/bootstrap/js/dropdown.js","webpack://@flarum/core/./node_modules/bootstrap/js/transition.js","webpack://@flarum/core/./node_modules/mithril/stream/stream.js","webpack://@flarum/core/./admin.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","_extends","assign","target","arguments","length","source","apply","this","g","Function","e","window","Vnode","tag","attrs","children","text","dom","domSize","undefined","state","events","instance","normalize","node","Array","isArray","normalizeChildren","String","input","isKeyed","TypeError","render","require","requestAnimationFrame","console","buildQueryString","template","params","test","SyntaxError","queryIndex","indexOf","hashIndex","queryEnd","pathEnd","path","slice","query","resolved","replace","variadic","encodeURIComponent","newQueryIndex","newHashIndex","newQueryEnd","newPathEnd","result","querystring","parseQueryString","url","hyperscriptVnode","selectorParser","selectorCache","hasOwn","isEmpty","selector","view","Error","vnode","hasClass","className","class","newAttrs","execSelector","match","classes","exec","type","id","push","attrValue","join","compileSelector","start","PromisePolyfill","Promise","finally","global","executor","self","resolvers","rejectors","resolveCurrent","handler","rejectCurrent","_instance","callAsync","setImmediate","setTimeout","list","shouldAbsorb","execute","then","error","retry","executeOnce","runs","run","fn","onerror","onFulfilled","onRejection","resolveNext","rejectNext","handle","callback","next","promise","resolve","reject","catch","reason","all","total","count","values","consume","race","scope","Timeout","clearFn","_id","_clearFn","clearTimeout","setInterval","clearInterval","timeout","close","unref","ref","enroll","item","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","active","_onTimeout","clearImmediate","toString","args","destructure","keys","forEach","string","charAt","entries","split","counters","data","entry","decodeURIComponent","levels","cursor","pop","j","level","nextLevel","isNumber","isNaN","parseInt","desc","getOwnPropertyDescriptor","easeInOutQuad","b","_typeof","iterator","obj","constructor","singleton","element","stop","offset","easing","a11y","distance","duration","timeStart","timeElapsed","top","getBoundingClientRect","loop","timeCurrent","scrollTo","setAttribute","focus","done","options","scrollY","pageYOffset","document","querySelector","jumper","DEFAULT_OPTIONS","Tooltip","reference","title","allowHtml","tooltipGenerator","tooltipNode","Math","titleNode","functionToCheck","getType","titleText","container","placement","arrowSelector","boundariesElement","func","event","directEvents","oppositeEvents","evt","popper","delay","computedDelay","lastTitle","show","hide","dispose","toggle","updateTitleContent","_events","_setTooltipNodeEvent","relatedreference","relatedreference2","evt2","$","tooltip","option","each","$this","attr","removeAttr","includes","dimension","Dimension","toUpperCase","margin","elem","size","side","css","expr","tagName","hover","leave","on","animatedScrollTop","to","fx","speeds","_default","jump","extend","special","bindBeforeSpecialEvents","eventName","el","specialEvent","_init","originalHandler","$target","trigger","setup","mo","_m","dayjs","relativeTime","localizedFormat","comp","bidi","route","href","Link","withAttr","cb","getAttribute","prop","longerTimeoutBrowsers","timeoutDuration","isBrowser","navigator","called","scheduled","isFunction","getStyleComputedProperty","getParentNode","getScrollParent","overflow","overflowX","overflowY","isIE11","isIE10","isIE","version","getOffsetParent","noOffsetParent","offsetParent","nodeName","getRoot","findCommonOffsetParent","element1","element2","order","Node","end","range","commonAncestorContainer","element1root","getScroll","upperSide","html","getBordersSize","styles","axis","sideA","sideB","parseFloat","getSize","body","computedStyle","getWindowSizes","getComputedStyle","getClientRect","offsets","height","rect","scrollTop","scrollLeft","sizes","width","horizScrollbar","vertScrollbar","getOffsetRectRelativeToArbitraryNode","parent","fixedPosition","runIsIE","isHTML","childrenRect","parentRect","scrollParent","borderTopWidth","borderLeftWidth","marginTop","marginLeft","subtract","modifier","includeScroll","getFixedPositionOffsetParent","getBoundaries","boundaries","left","excludeScroll","relativeOffset","getViewportOffsetRectRelativeToArtbitraryNode","boundariesNode","isFixed","parentNode","isPaddingNumber","padding","computeAutoPlacement","rects","refRect","bottom","sortedAreas","getArea","a","filteredAreas","filter","computedPlacement","variation","getReferenceOffsets","getOuterSizes","x","y","getOppositePlacement","hash","right","matched","getPopperOffsets","referenceOffsets","popperRect","popperOffsets","isHoriz","mainSide","secondarySide","measurement","secondaryMeasurement","find","arr","check","runModifiers","modifiers","ends","findIndex","cur","update","flip","positionFixed","isModifierEnabled","modifierName","some","getSupportedPropertyName","prefixes","upperProp","prefix","toCheck","destroy","getWindow","ownerDocument","setupEventListeners","passive","scrollElement","attachToScrollParents","scrollParents","isBody","enableEventListeners","disableEventListeners","removeEventListeners","isNumeric","isFinite","setStyles","unit","isFirefox","isModifierRequired","requesting","isRequired","requested","validPlacements","placements","clockwise","counter","index","BEHAVIORS","parseOffset","useHeight","basePlacement","fragments","map","frag","divider","splitRegex","ops","mergeWithPrevious","op","str","toValue","index2","shiftvariation","isVertical","shiftOffsets","transformProp","popperStyles","transform","floor","opSide","arrowElement","len","sideCapitalized","altSide","arrowElementSize","center","popperMarginSide","popperBorderSide","sideValue","placementOpposite","flipOrder","refOffsets","overlapsRef","overflowsLeft","overflowsRight","overflowsTop","overflowsBottom","overflowsBoundaries","flippedVariationByRef","flippedVariationByContent","flippedVariation","getOppositeVariation","subtractLength","bound","legacyGpuAccelerationOption","gpuAcceleration","offsetParentRect","position","shouldRound","round","noRound","v","referenceWidth","popperWidth","isVariation","horizontalToInteger","verticalToInteger","bothOddWidth","getRoundedOffsets","prefixedProperty","invertTop","invertLeft","attributes","Popper","debounce","modifierOptions","eventsEnabled","Utils","PopperUtils","Defaults","en","future","past","mm","h","hh","dd","M","MM","yy","u","$locale","f","diff","abs","from","$u","utc","toNow","fromNow","format","LTS","LT","L","LL","LLL","LLLL","formats","define","Zepto","classList","camelize","uniq","emptyArray","concat","elementDisplay","classCache","cssNumber","fragmentRE","singleTagRE","tagExpanderRE","rootNodeRE","capitalRE","methodAttributes","table","createElement","tableRow","containers","readyRE","simpleSelectorRE","class2type","zepto","tempParent","propMap","isWindow","isDocument","nodeType","DOCUMENT_NODE","isObject","isPlainObject","getPrototypeOf","likeArray","dasherize","toLowerCase","classRE","RegExp","maybeAddPx","childNodes","Z","deep","filtered","nodes","funcArg","context","arg","idx","payload","removeAttribute","klass","svg","baseVal","deserializeValue","parseJSON","traverseNode","fun","matches","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","temp","appendChild","qsa","removeChild","chr","array","fragment","properties","$1","innerHTML","isZ","init","trim","ready","shift","found","maybeID","maybeClass","nameOnly","isSimple","getElementById","getElementsByClassName","getElementsByTagName","querySelectorAll","contains","documentElement","isEmptyObject","val","num","Number","inArray","camelCase","uuid","support","noop","elements","grep","JSON","parse","reduce","sort","splice","toArray","readyState","addEventListener","remove","every","not","add","is","excludes","has","eq","first","last","closest","collection","_","parents","ancestors","pluck","contents","contentDocument","siblings","child","empty","display","style","getPropertyValue","replaceWith","newContent","before","wrap","structure","clone","wrapAll","cloneNode","append","wrapInner","unwrap","setting","prev","originHtml","newText","textContent","attribute","removeProp","attrName","multiple","selected","coordinates","coords","parentOffset","props","pageXOffset","removeProperty","cssText","addClass","cls","removeClass","toggleClass","when","hasScrollTop","scrollX","hasScrollLeft","detach","dimensionProperty","operator","operatorIndex","inside","argType","copyByClone","nextSibling","firstChild","parentInDocument","insertBefore","src","defaultView","_zid","isString","handlers","specialEvents","focusinSupported","blur","mouseenter","mouseleave","zid","findHandlers","matcher","sel","parts","eventCapture","captureSetting","del","realEvent","delegator","capture","set","related","relatedTarget","proxy","compatible","isImmediatePropagationStopped","_args","preventDefault","stopPropagation","removeEventListener","click","mousedown","mouseup","mousemove","proxyFn","unshift","unbind","off","one","returnTrue","returnFalse","ignoreProperties","eventMethods","stopImmediatePropagation","isDefaultPrevented","predicate","sourceMethod","timeStamp","Date","now","defaultPrevented","returnValue","getPreventDefault","createProxy","originalEvent","delegate","undelegate","live","die","autoRemove","currentTarget","liveFired","Event","dispatchEvent","triggerHandler","createEvent","bubbles","initEvent","jsonpID","rscript","scriptTypeRE","xmlTypeRE","jsonType","htmlType","blankRE","originAnchor","triggerGlobal","settings","triggerAndReturn","ajaxBeforeSend","xhr","beforeSend","ajaxSuccess","deferred","success","resolveWith","ajaxComplete","ajaxError","rejectWith","status","complete","ajaxStop","appendQuery","parseArguments","dataType","location","ajaxJSONP","ajax","responseData","abortTimeout","_callbackName","jsonpCallback","callbackName","script","originalCallback","abort","errorType","head","ajaxSettings","XMLHttpRequest","accepts","json","xml","crossDomain","processData","cache","dataFilter","urlAnchor","Deferred","ajaxStart","protocol","host","param","traditional","serializeData","hasPlaceholder","jsonp","mime","headers","setHeader","nativeSetHeader","setRequestHeader","mimeType","overrideMimeType","contentType","onreadystatechange","mimeToDataType","getResponseHeader","responseType","response","responseText","ajaxDataFilter","eval","responseXML","statusText","async","open","username","password","xhrFields","send","post","getJSON","load","escape","serialize","serializeArray","field","disabled","checked","elm","submit","nativeGetComputedStyle","pseudoElement","factory","z","utcOffset","year","month","ceil","w","ms","Q","weekdays","months","pl","date","D","locale","$L","$d","NaN","UTC","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","isSame","startOf","endOf","isAfter","isBefore","$g","day","hour","minute","second","millisecond","unix","valueOf","getTime","toDate","weekStart","$set","min","daysInMonth","substr","meridiem","YY","YYYY","MMM","monthsShort","MMMM","DD","weekdaysMin","ddd","weekdaysShort","dddd","H","HH","A","ss","SSS","getTimezoneOffset","toJSON","toISOString","toUTCString","isDayjs","Ls","hyperscript","request","mountRedraw","trust","mount","redraw","parsePathname","buildPathname","registerImmediate","channel","messagePrefix","onGlobalMessage","nextHandle","tasksByHandle","currentlyRunningATask","doc","attachTo","process","nextTick","runIfPresent","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","onmessage","canUsePostMessage","MessageChannel","port1","port2","random","attachEvent","task","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","marker","runClearTimeout","Item","browser","env","argv","versions","addListener","once","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","$window","currentRedraw","$doc","nameSpace","math","getNameSpace","xmlns","checkState","original","callHook","activeElement","createNodes","vnodes","hooks","createNode","initLifecycle","createTextNode","insertNode","createText","createHTML","createDocumentFragment","createFragment","createElementNS","setAttr","setAttrs","maybeSetContentEditable","selectedIndex","normalized","setLateSelectAttrs","sentinel","$$reentrantLock$$","initComponent","createComponent","possibleParents","caption","thead","tbody","tfoot","tr","th","td","colgroup","col","updateNodes","old","removeNodes","isOldKeyed","oldStart","oe","ve","topSibling","oldEnd","updateNode","getNextSibling","moveNodes","lisIndices","originalNextSibling","vnodesLength","oldIndices","li","pos","getKeyMap","oldIndex","il","lisTemp","makeLisIndices","commonLength","removeNode","oldTag","force","onbeforeupdate","shouldNotUpdate","updateLifecycle","nodeValue","updateText","removeHTML","updateHTML","updateFragment","updateAttrs","updateElement","updateComponent","moveChildToFrag","contenteditable","contentEditable","content","stateResult","attrsResult","mask","onbeforeremove","reallyRemove","onremove","isLifecycleMethod","isFormAttribute","updateEvent","setAttributeNS","updateStyle","hasPropertyKey","nsLastIndex","uppercaseRegex","capital","normalizeKey","setProperty","EventDict","oninit","oncreate","onupdate","handleEvent","ev","namespace","namespaceURI","prevRedraw","schedule","subscriptions","rendering","pending","sync","root","component","oncompletion","callbackCount","PromiseProxy","makeRequest","background","hasHeader","__proto__","replacedAbort","method","assumeJSON","FormData","extract","aborted","user","deserialize","withCredentials","message","code","config","stringify","callbackKey","compileTemplate","fireAsync","setPath","history","replaceState","pushState","currentPath","lastUpdate","currentResolver","SKIP","defaultRoute","routes","compiled","defaultData","ReferenceError","resolveRoute","search","pathname","fail","matchedRoute","localComp","onmatch","onclick","Boolean","button","which","ctrlKey","metaKey","shiftKey","altKey","templateData","templateKeys","regexp","extra","k","multi","onchange","selectedOptions","oninput","ctrl","_REVERSE_MAP","_MAP","8","9","13","16","17","18","20","27","32","33","34","35","36","37","38","39","40","45","46","91","93","224","_KEYCODE_MAP","106","107","109","110","111","186","187","188","189","190","191","192","219","220","221","222","_SHIFT_MAP","_SPECIAL_ALIASES","platform","Mousetrap","action","_bindMultiple","_directMap","reset","_callbacks","stopCallback","_belongsTo","ancestor","composedPath","initialEventTarget","isContentEditable","handleKey","_handleKey","addKeycodes","documentMousetrap","_addEvent","_characterFromEvent","character","fromCharCode","_isModifier","_pickBestAction","_getReverseMap","_getKeyInfo","combination","_keysFromString","targetElement","_resetTimer","_sequenceLevels","_ignoreNextKeyup","_ignoreNextKeypress","_nextExpectedAction","_resetSequences","doNotReset","activeSequences","_getMatches","sequenceName","modifiers1","modifiers2","seq","deleteCombo","combo","deleteSequence","_fireCallback","sequence","srcElement","_preventDefault","cancelBubble","_stopPropagation","_handleKeyEvent","keyCode","_eventModifiers","_bindSequence","_increaseSequence","nextAction","_callbackAndReset","wrappedCallback","_bindSingle","info","callbacks","maxLevel","processedSequenceCallback","max","ignoreThisKeypress","combinations","classNames","inner","default","oldQsa","oldMatches","visible","filters","hidden","filterRe","childRe","classTag","taggedParent","dataAttr","exp","expando","setData","store","attributeData","camelName","getData","hasData","removeData","names","methodName","origFn","eventPrefix","transitionProperty","transitionDuration","transitionTiming","transitionDelay","animationName","animationDuration","animationTiming","animationDelay","testEl","supportedTransforms","cssReset","normalizeEvent","Webkit","Moz","O","vendor","fast","slow","cssPrefix","transitionEnd","animationEnd","animate","ease","anim","cssProperties","cssValues","transforms","that","endEvent","fired","clientLeft","origShow","origHide","origToggle","speed","opacity","scale","fadeTo","fadeIn","fadeOut","fadeToggle","U","Y","bottomEnd","innerTop","innerSticker","stickyClass","stickTo","followScroll","responsive","mobileFirst","onStart","onStop","onBeforeResize","onResize","resizeDebounce","disable","queries","queryFlow","log","X","Helpers","getStyle","innerWidth","stick","isAttached","attach","offsetLeft","release","positionLeft","S","E","T","C","N","R","offsetHeight","B","I","q","getCascadedStyle","verticalAlign","boxSizing","marginRight","marginBottom","paddingLeft","paddingRight","float","cssFloat","MozBoxSizing","offsetWidth","HTMLDocument","Document","clientHeight","scrollHeight","innerHeight","offsetTop","F","P","W","V","refresh","triggerMethod","reinit","jQuery","hcSticky","writable","configurable","detachEvent","currentStyle","originalModule","webpackPolyfill","__webpack_amd_options__","backdrop","Dropdown","getParent","$parent","clearMenus","VERSION","isActive","insertAfter","keydown","$items","dropdown","Constructor","noConflict","emulateTransitionEnd","$el","transition","transEndEventNames","WebkitTransition","MozTransition","OTransition","bsTransitionEnd","bindType","delegateType","handleObj","Stream","lift","merge","streams","scan","acc","origin","stream","combine","scanMerge","tuples","seed","tuple","changed","warnedHalt","dependentStreams","dependentFns","_changing","_state","_parents","_map","ignoreInitial","s1","s2","_unregisterChild","childIndex","mappers","endStream","mapper"],"mappings":"wBACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxB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EAAYpB,EAAOppC,IAAIqI,KAAI,SAASnd,IACzB,IAAVA,IACHq/C,EAAQ30C,SAAQ,SAAS60C,GAAUA,EAAOzqC,KAAI,MAC9CwqC,EAAUxqC,KAAI,OAKhB,OAAOopC,EAGR,SAASL,EAAMC,GACd,OAAOK,GAAQ,WAAa,OAAOL,EAAQ3gC,KAAI,SAASrc,GAAK,OAAOA,SAAUg9C,GAuC/E,SAAStmB,EAAK12B,GACb,MAAoB,YAAbA,EAAE+9C,QAAqC,WAAb/9C,EAAE+9C,QAAoC,aAAb/9C,EAAE+9C,OA9J7Dp/C,OAAOC,eAAei+C,EAAQ,OAAQ,CACrC/9C,IAAK,WAGJ,OAFA6+C,GAAcv7C,QAAQ21C,IAAI,mDAC1B4F,GAAa,EACNd,EAAO/S,QA6JmB9rC,EAAM,QAAc6+C,EA7KrD,I,2HCDF","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 142);\n","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","\"use strict\"\n\nfunction Vnode(tag, key, attrs, children, text, dom) {\n\treturn {tag: tag, key: key, attrs: attrs, children: children, text: text, dom: dom, domSize: undefined, state: undefined, events: undefined, instance: undefined}\n}\nVnode.normalize = function(node) {\n\tif (Array.isArray(node)) return Vnode(\"[\", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined)\n\tif (node == null || typeof node === \"boolean\") return null\n\tif (typeof node === \"object\") return node\n\treturn Vnode(\"#\", undefined, undefined, String(node), undefined, undefined)\n}\nVnode.normalizeChildren = function(input) {\n\tvar children = []\n\tif (input.length) {\n\t\tvar isKeyed = input[0] != null && input[0].key != null\n\t\t// Note: this is a *very* perf-sensitive check.\n\t\t// Fun fact: merging the loop like this is somehow faster than splitting\n\t\t// it, noticeably so.\n\t\tfor (var i = 1; i < input.length; i++) {\n\t\t\tif ((input[i] != null && input[i].key != null) !== isKeyed) {\n\t\t\t\tthrow new TypeError(\"Vnodes must either always have keys or never have keys!\")\n\t\t\t}\n\t\t}\n\t\tfor (var i = 0; i < input.length; i++) {\n\t\t\tchildren[i] = Vnode.normalize(input[i])\n\t\t}\n\t}\n\treturn children\n}\n\nmodule.exports = Vnode\n","module.exports = m;","\"use strict\"\n\nvar render = require(\"./render\")\n\nmodule.exports = require(\"./api/mount-redraw\")(render, requestAnimationFrame, console)\n","\"use strict\"\n\nvar buildQueryString = require(\"../querystring/build\")\nvar assign = require(\"./assign\")\n\n// Returns `path` from `template` + `params`\nmodule.exports = function(template, params) {\n\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(template)) {\n\t\tthrow new SyntaxError(\"Template parameter names *must* be separated\")\n\t}\n\tif (params == null) return template\n\tvar queryIndex = template.indexOf(\"?\")\n\tvar hashIndex = template.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? template.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = template.slice(0, pathEnd)\n\tvar query = {}\n\n\tassign(query, params)\n\n\tvar resolved = path.replace(/:([^\\/\\.-]+)(\\.{3})?/g, function(m, key, variadic) {\n\t\tdelete query[key]\n\t\t// If no such parameter exists, don't interpolate it.\n\t\tif (params[key] == null) return m\n\t\t// Escape normal parameters, but not variadic ones.\n\t\treturn variadic ? params[key] : encodeURIComponent(String(params[key]))\n\t})\n\n\t// In case the template substitution adds new query/hash parameters.\n\tvar newQueryIndex = resolved.indexOf(\"?\")\n\tvar newHashIndex = resolved.indexOf(\"#\")\n\tvar newQueryEnd = newHashIndex < 0 ? resolved.length : newHashIndex\n\tvar newPathEnd = newQueryIndex < 0 ? newQueryEnd : newQueryIndex\n\tvar result = resolved.slice(0, newPathEnd)\n\n\tif (queryIndex >= 0) result += template.slice(queryIndex, queryEnd)\n\tif (newQueryIndex >= 0) result += (queryIndex < 0 ? \"?\" : \"&\") + resolved.slice(newQueryIndex, newQueryEnd)\n\tvar querystring = buildQueryString(query)\n\tif (querystring) result += (queryIndex < 0 && newQueryIndex < 0 ? \"?\" : \"&\") + querystring\n\tif (hashIndex >= 0) result += template.slice(hashIndex)\n\tif (newHashIndex >= 0) result += (hashIndex < 0 ? \"\" : \"&\") + resolved.slice(newHashIndex)\n\treturn result\n}\n","\"use strict\"\n\nvar parseQueryString = require(\"../querystring/parse\")\n\n// Returns `{path, params}` from `url`\nmodule.exports = function(url) {\n\tvar queryIndex = url.indexOf(\"?\")\n\tvar hashIndex = url.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? url.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = url.slice(0, pathEnd).replace(/\\/{2,}/g, \"/\")\n\n\tif (!path) path = \"/\"\n\telse {\n\t\tif (path[0] !== \"/\") path = \"/\" + path\n\t\tif (path.length > 1 && path[path.length - 1] === \"/\") path = path.slice(0, -1)\n\t}\n\treturn {\n\t\tpath: path,\n\t\tparams: queryIndex < 0\n\t\t\t? {}\n\t\t\t: parseQueryString(url.slice(queryIndex + 1, queryEnd)),\n\t}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nvar selectorParser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[(.+?)(?:\\s*=\\s*(\"|'|)((?:\\\\[\"'\\]]|.)*?)\\5)?\\])/g\nvar selectorCache = {}\nvar hasOwn = {}.hasOwnProperty\n\nfunction isEmpty(object) {\n\tfor (var key in object) if (hasOwn.call(object, key)) return false\n\treturn true\n}\n\nfunction compileSelector(selector) {\n\tvar match, tag = \"div\", classes = [], attrs = {}\n\twhile (match = selectorParser.exec(selector)) {\n\t\tvar type = match[1], value = match[2]\n\t\tif (type === \"\" && value !== \"\") tag = value\n\t\telse if (type === \"#\") attrs.id = value\n\t\telse if (type === \".\") classes.push(value)\n\t\telse if (match[3][0] === \"[\") {\n\t\t\tvar attrValue = match[6]\n\t\t\tif (attrValue) attrValue = attrValue.replace(/\\\\([\"'])/g, \"$1\").replace(/\\\\\\\\/g, \"\\\\\")\n\t\t\tif (match[4] === \"class\") classes.push(attrValue)\n\t\t\telse attrs[match[4]] = attrValue === \"\" ? attrValue : attrValue || true\n\t\t}\n\t}\n\tif (classes.length > 0) attrs.className = classes.join(\" \")\n\treturn selectorCache[selector] = {tag: tag, attrs: attrs}\n}\n\nfunction execSelector(state, vnode) {\n\tvar attrs = vnode.attrs\n\tvar children = Vnode.normalizeChildren(vnode.children)\n\tvar hasClass = hasOwn.call(attrs, \"class\")\n\tvar className = hasClass ? attrs.class : attrs.className\n\n\tvnode.tag = state.tag\n\tvnode.attrs = null\n\tvnode.children = undefined\n\n\tif (!isEmpty(state.attrs) && !isEmpty(attrs)) {\n\t\tvar newAttrs = {}\n\n\t\tfor (var key in attrs) {\n\t\t\tif (hasOwn.call(attrs, key)) newAttrs[key] = attrs[key]\n\t\t}\n\n\t\tattrs = newAttrs\n\t}\n\n\tfor (var key in state.attrs) {\n\t\tif (hasOwn.call(state.attrs, key) && key !== \"className\" && !hasOwn.call(attrs, key)){\n\t\t\tattrs[key] = state.attrs[key]\n\t\t}\n\t}\n\tif (className != null || state.attrs.className != null) attrs.className =\n\t\tclassName != null\n\t\t\t? state.attrs.className != null\n\t\t\t\t? String(state.attrs.className) + \" \" + String(className)\n\t\t\t\t: className\n\t\t\t: state.attrs.className != null\n\t\t\t\t? state.attrs.className\n\t\t\t\t: null\n\n\tif (hasClass) attrs.class = null\n\n\tfor (var key in attrs) {\n\t\tif (hasOwn.call(attrs, key) && key !== \"key\") {\n\t\t\tvnode.attrs = attrs\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif (Array.isArray(children) && children.length === 1 && children[0] != null && children[0].tag === \"#\") {\n\t\tvnode.text = children[0].children\n\t} else {\n\t\tvnode.children = children\n\t}\n\n\treturn vnode\n}\n\nfunction hyperscript(selector) {\n\tif (selector == null || typeof selector !== \"string\" && typeof selector !== \"function\" && typeof selector.view !== \"function\") {\n\t\tthrow Error(\"The selector must be either a string or a component.\");\n\t}\n\n\tvar vnode = hyperscriptVnode.apply(1, arguments)\n\n\tif (typeof selector === \"string\") {\n\t\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\t\tif (selector !== \"[\") return execSelector(selectorCache[selector] || compileSelector(selector), vnode)\n\t}\n\n\tvnode.tag = selector\n\treturn vnode\n}\n\nmodule.exports = hyperscript\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\n// Call via `hyperscriptVnode.apply(startOffset, arguments)`\n//\n// The reason I do it this way, forwarding the arguments and passing the start\n// offset in `this`, is so I don't have to create a temporary array in a\n// performance-critical path.\n//\n// In native ES6, I'd instead add a final `...args` parameter to the\n// `hyperscript` and `fragment` factories and define this as\n// `hyperscriptVnode(...args)`, since modern engines do optimize that away. But\n// ES5 (what Mithril requires thanks to IE support) doesn't give me that luxury,\n// and engines aren't nearly intelligent enough to do either of these:\n//\n// 1. Elide the allocation for `[].slice.call(arguments, 1)` when it's passed to\n// another function only to be indexed.\n// 2. Elide an `arguments` allocation when it's passed to any function other\n// than `Function.prototype.apply` or `Reflect.apply`.\n//\n// In ES6, it'd probably look closer to this (I'd need to profile it, though):\n// module.exports = function(attrs, ...children) {\n// if (attrs == null || typeof attrs === \"object\" && attrs.tag == null && !Array.isArray(attrs)) {\n// if (children.length === 1 && Array.isArray(children[0])) children = children[0]\n// } else {\n// children = children.length === 0 && Array.isArray(attrs) ? attrs : [attrs, ...children]\n// attrs = undefined\n// }\n//\n// if (attrs == null) attrs = {}\n// return Vnode(\"\", attrs.key, attrs, children)\n// }\nmodule.exports = function() {\n\tvar attrs = arguments[this], start = this + 1, children\n\n\tif (attrs == null) {\n\t\tattrs = {}\n\t} else if (typeof attrs !== \"object\" || attrs.tag != null || Array.isArray(attrs)) {\n\t\tattrs = {}\n\t\tstart = this\n\t}\n\n\tif (arguments.length === start + 1) {\n\t\tchildren = arguments[start]\n\t\tif (!Array.isArray(children)) children = [children]\n\t} else {\n\t\tchildren = []\n\t\twhile (start < arguments.length) children.push(arguments[start++])\n\t}\n\n\treturn Vnode(\"\", attrs.key, attrs, children)\n}\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./polyfill\")\n\nif (typeof window !== \"undefined\") {\n\tif (typeof window.Promise === \"undefined\") {\n\t\twindow.Promise = PromisePolyfill\n\t} else if (!window.Promise.prototype.finally) {\n\t\twindow.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = window.Promise\n} else if (typeof global !== \"undefined\") {\n\tif (typeof global.Promise === \"undefined\") {\n\t\tglobal.Promise = PromisePolyfill\n\t} else if (!global.Promise.prototype.finally) {\n\t\tglobal.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = global.Promise\n} else {\n\tmodule.exports = PromisePolyfill\n}\n","\"use strict\"\n/** @constructor */\nvar PromisePolyfill = function(executor) {\n\tif (!(this instanceof PromisePolyfill)) throw new Error(\"Promise must be called with `new`\")\n\tif (typeof executor !== \"function\") throw new TypeError(\"executor must be a function\")\n\n\tvar self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false)\n\tvar instance = self._instance = {resolvers: resolvers, rejectors: rejectors}\n\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\tfunction handler(list, shouldAbsorb) {\n\t\treturn function execute(value) {\n\t\t\tvar then\n\t\t\ttry {\n\t\t\t\tif (shouldAbsorb && value != null && (typeof value === \"object\" || typeof value === \"function\") && typeof (then = value.then) === \"function\") {\n\t\t\t\t\tif (value === self) throw new TypeError(\"Promise can't be resolved w/ itself\")\n\t\t\t\t\texecuteOnce(then.bind(value))\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcallAsync(function() {\n\t\t\t\t\t\tif (!shouldAbsorb && list.length === 0) console.error(\"Possible unhandled promise rejection:\", value)\n\t\t\t\t\t\tfor (var i = 0; i < list.length; i++) list[i](value)\n\t\t\t\t\t\tresolvers.length = 0, rejectors.length = 0\n\t\t\t\t\t\tinstance.state = shouldAbsorb\n\t\t\t\t\t\tinstance.retry = function() {execute(value)}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\trejectCurrent(e)\n\t\t\t}\n\t\t}\n\t}\n\tfunction executeOnce(then) {\n\t\tvar runs = 0\n\t\tfunction run(fn) {\n\t\t\treturn function(value) {\n\t\t\t\tif (runs++ > 0) return\n\t\t\t\tfn(value)\n\t\t\t}\n\t\t}\n\t\tvar onerror = run(rejectCurrent)\n\t\ttry {then(run(resolveCurrent), onerror)} catch (e) {onerror(e)}\n\t}\n\n\texecuteOnce(executor)\n}\nPromisePolyfill.prototype.then = function(onFulfilled, onRejection) {\n\tvar self = this, instance = self._instance\n\tfunction handle(callback, list, next, state) {\n\t\tlist.push(function(value) {\n\t\t\tif (typeof callback !== \"function\") next(value)\n\t\t\telse try {resolveNext(callback(value))} catch (e) {if (rejectNext) rejectNext(e)}\n\t\t})\n\t\tif (typeof instance.retry === \"function\" && state === instance.state) instance.retry()\n\t}\n\tvar resolveNext, rejectNext\n\tvar promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject})\n\thandle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false)\n\treturn promise\n}\nPromisePolyfill.prototype.catch = function(onRejection) {\n\treturn this.then(null, onRejection)\n}\nPromisePolyfill.prototype.finally = function(callback) {\n\treturn this.then(\n\t\tfunction(value) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn value\n\t\t\t})\n\t\t},\n\t\tfunction(reason) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn PromisePolyfill.reject(reason);\n\t\t\t})\n\t\t}\n\t)\n}\nPromisePolyfill.resolve = function(value) {\n\tif (value instanceof PromisePolyfill) return value\n\treturn new PromisePolyfill(function(resolve) {resolve(value)})\n}\nPromisePolyfill.reject = function(value) {\n\treturn new PromisePolyfill(function(resolve, reject) {reject(value)})\n}\nPromisePolyfill.all = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tvar total = list.length, count = 0, values = []\n\t\tif (list.length === 0) resolve([])\n\t\telse for (var i = 0; i < list.length; i++) {\n\t\t\t(function(i) {\n\t\t\t\tfunction consume(value) {\n\t\t\t\t\tcount++\n\t\t\t\t\tvalues[i] = value\n\t\t\t\t\tif (count === total) resolve(values)\n\t\t\t\t}\n\t\t\t\tif (list[i] != null && (typeof list[i] === \"object\" || typeof list[i] === \"function\") && typeof list[i].then === \"function\") {\n\t\t\t\t\tlist[i].then(consume, reject)\n\t\t\t\t}\n\t\t\t\telse consume(list[i])\n\t\t\t})(i)\n\t\t}\n\t})\n}\nPromisePolyfill.race = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tfor (var i = 0; i < list.length; i++) {\n\t\t\tlist[i].then(resolve, reject)\n\t\t}\n\t})\n}\n\nmodule.exports = PromisePolyfill\n","var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n","\"use strict\"\n\nmodule.exports = require(\"./render/render\")(window)\n","\"use strict\"\n\nmodule.exports = function(object) {\n\tif (Object.prototype.toString.call(object) !== \"[object Object]\") return \"\"\n\n\tvar args = []\n\tfor (var key in object) {\n\t\tdestructure(key, object[key])\n\t}\n\n\treturn args.join(\"&\")\n\n\tfunction destructure(key, value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tfor (var i = 0; i < value.length; i++) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse if (Object.prototype.toString.call(value) === \"[object Object]\") {\n\t\t\tfor (var i in value) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse args.push(encodeURIComponent(key) + (value != null && value !== \"\" ? \"=\" + encodeURIComponent(value) : \"\"))\n\t}\n}\n","\"use strict\"\n\nmodule.exports = Object.assign || function(target, source) {\n\tif(source) Object.keys(source).forEach(function(key) { target[key] = source[key] })\n}\n","\"use strict\"\n\nmodule.exports = function(string) {\n\tif (string === \"\" || string == null) return {}\n\tif (string.charAt(0) === \"?\") string = string.slice(1)\n\n\tvar entries = string.split(\"&\"), counters = {}, data = {}\n\tfor (var i = 0; i < entries.length; i++) {\n\t\tvar entry = entries[i].split(\"=\")\n\t\tvar key = decodeURIComponent(entry[0])\n\t\tvar value = entry.length === 2 ? decodeURIComponent(entry[1]) : \"\"\n\n\t\tif (value === \"true\") value = true\n\t\telse if (value === \"false\") value = false\n\n\t\tvar levels = key.split(/\\]\\[?|\\[/)\n\t\tvar cursor = data\n\t\tif (key.indexOf(\"[\") > -1) levels.pop()\n\t\tfor (var j = 0; j < levels.length; j++) {\n\t\t\tvar level = levels[j], nextLevel = levels[j + 1]\n\t\t\tvar isNumber = nextLevel == \"\" || !isNaN(parseInt(nextLevel, 10))\n\t\t\tif (level === \"\") {\n\t\t\t\tvar key = levels.slice(0, j).join()\n\t\t\t\tif (counters[key] == null) {\n\t\t\t\t\tcounters[key] = Array.isArray(cursor) ? cursor.length : 0\n\t\t\t\t}\n\t\t\t\tlevel = counters[key]++\n\t\t\t}\n\t\t\t// Disallow direct prototype pollution\n\t\t\telse if (level === \"__proto__\") break\n\t\t\tif (j === levels.length - 1) cursor[level] = value\n\t\t\telse {\n\t\t\t\t// Read own properties exclusively to disallow indirect\n\t\t\t\t// prototype pollution\n\t\t\t\tvar desc = Object.getOwnPropertyDescriptor(cursor, level)\n\t\t\t\tif (desc != null) desc = desc.value\n\t\t\t\tif (desc == null) cursor[level] = desc = isNumber ? [] : {}\n\t\t\t\tcursor = desc\n\t\t\t}\n\t\t}\n\t}\n\treturn data\n}\n","// Robert Penner's easeInOutQuad\n\n// find the rest of his easing functions here: http://robertpenner.com/easing/\n// find them exported for ES6 consumption here: https://github.com/jaxgeller/ez.js\n\nvar easeInOutQuad = function easeInOutQuad(t, b, c, d) {\n t /= d / 2;\n if (t < 1) return c / 2 * t * t + b;\n t--;\n return -c / 2 * (t * (t - 2) - 1) + b;\n};\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar jumper = function jumper() {\n // private variable cache\n // no variables are created during a jump, preventing memory leaks\n\n var element = void 0; // element to scroll to (node)\n\n var start = void 0; // where scroll starts (px)\n var stop = void 0; // where scroll stops (px)\n\n var offset = void 0; // adjustment from the stop position (px)\n var easing = void 0; // easing function (function)\n var a11y = void 0; // accessibility support flag (boolean)\n\n var distance = void 0; // distance of scroll (px)\n var duration = void 0; // scroll duration (ms)\n\n var timeStart = void 0; // time scroll started (ms)\n var timeElapsed = void 0; // time spent scrolling thus far (ms)\n\n var next = void 0; // next scroll position (px)\n\n var callback = void 0; // to call when done scrolling (function)\n\n // scroll position helper\n\n function location() {\n return window.scrollY || window.pageYOffset;\n }\n\n // element offset helper\n\n function top(element) {\n return element.getBoundingClientRect().top + start;\n }\n\n // rAF loop helper\n\n function loop(timeCurrent) {\n // store time scroll started, if not started already\n if (!timeStart) {\n timeStart = timeCurrent;\n }\n\n // determine time spent scrolling so far\n timeElapsed = timeCurrent - timeStart;\n\n // calculate next scroll position\n next = easing(timeElapsed, start, distance, duration);\n\n // scroll to it\n window.scrollTo(0, next);\n\n // check progress\n timeElapsed < duration ? window.requestAnimationFrame(loop) // continue scroll loop\n : done(); // scrolling is done\n }\n\n // scroll finished helper\n\n function done() {\n // account for rAF time rounding inaccuracies\n window.scrollTo(0, start + distance);\n\n // if scrolling to an element, and accessibility is enabled\n if (element && a11y) {\n // add tabindex indicating programmatic focus\n element.setAttribute('tabindex', '-1');\n\n // focus the element\n element.focus();\n }\n\n // if it exists, fire the callback\n if (typeof callback === 'function') {\n callback();\n }\n\n // reset time for next jump\n timeStart = false;\n }\n\n // API\n\n function jump(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // resolve options, or use defaults\n duration = options.duration || 1000;\n offset = options.offset || 0;\n callback = options.callback; // \"undefined\" is a suitable default, and won't be called\n easing = options.easing || easeInOutQuad;\n a11y = options.a11y || false;\n\n // cache starting position\n start = location();\n\n // resolve target\n switch (typeof target === 'undefined' ? 'undefined' : _typeof(target)) {\n // scroll from current position\n case 'number':\n element = undefined; // no element to scroll to\n a11y = false; // make sure accessibility is off\n stop = start + target;\n break;\n\n // scroll to element (node)\n // bounding rect is relative to the viewport\n case 'object':\n element = target;\n stop = top(element);\n break;\n\n // scroll to element (selector)\n // bounding rect is relative to the viewport\n case 'string':\n element = document.querySelector(target);\n stop = top(element);\n break;\n }\n\n // resolve scroll distance, accounting for offset\n distance = stop - start + offset;\n\n // resolve duration\n switch (_typeof(options.duration)) {\n // number in ms\n case 'number':\n duration = options.duration;\n break;\n\n // function passed the distance of the scroll\n case 'function':\n duration = options.duration(distance);\n break;\n }\n\n // start the loop\n window.requestAnimationFrame(loop);\n }\n\n // expose only the jump method\n return jump;\n};\n\n// export singleton\n\nvar singleton = jumper();\n\nexport default singleton;\n","// Utils\nimport debounce from './utils/debounce';\nimport isFunction from './utils/isFunction';\n\n// Methods\nimport update from './methods/update';\nimport destroy from './methods/destroy';\nimport enableEventListeners from './methods/enableEventListeners';\nimport disableEventListeners from './methods/disableEventListeners';\nimport Defaults from './methods/defaults';\nimport placements from './methods/placements';\n\nexport default class Popper {\n /**\n * Creates a new Popper.js instance.\n * @class Popper\n * @param {Element|referenceObject} reference - The reference element used to position the popper\n * @param {Element} popper - The HTML / XML element used as the popper\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n constructor(reference, popper, options = {}) {\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = { ...Popper.Defaults, ...options };\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: [],\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys({\n ...Popper.Defaults.modifiers,\n ...options.modifiers,\n }).forEach(name => {\n this.options.modifiers[name] = {\n // If it's a built-in modifier, use it as base\n ...(Popper.Defaults.modifiers[name] || {}),\n // If there are custom options, override and merge with default ones\n ...(options.modifiers ? options.modifiers[name] : {}),\n };\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers)\n .map(name => ({\n name,\n ...this.options.modifiers[name],\n }))\n // sort the modifiers by order\n .sort((a, b) => a.order - b.order);\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(modifierOptions => {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(\n this.reference,\n this.popper,\n this.options,\n modifierOptions,\n this.state\n );\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n\n const eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n update() {\n return update.call(this);\n }\n destroy() {\n return destroy.call(this);\n }\n enableEventListeners() {\n return enableEventListeners.call(this);\n }\n disableEventListeners() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedules an update. It will run on the next UI update available.\n * @method scheduleUpdate\n * @memberof Popper\n */\n scheduleUpdate = () => requestAnimationFrame(this.update);\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n static Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\n\n static placements = placements;\n\n static Defaults = Defaults;\n}\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.
\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n","/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nexport default function isFunction(functionToCheck) {\n const getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","import jump from 'jump.js';\r\nimport Tooltip from 'tooltip.js';\r\n\r\n// add $.fn.tooltip\r\n$.fn.tooltip = function (option) {\r\n return this.each(function () {\r\n const $this = $(this);\r\n let data = $this.data('bs.tooltip');\r\n const options = typeof option === 'object' && option || {};\r\n\r\n if ($this.attr('title')) {\r\n options.title = $this.attr('title');\r\n $this.removeAttr('title');\r\n $this.attr('data-original-title', options.title);\r\n }\r\n\r\n if (option === 'destroy') option = 'dispose';\r\n\r\n if (!data && ['dispose', 'hide'].includes(option)) return;\r\n\r\n if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)));\r\n if (typeof option === 'string' && data[option]) data[option]();\r\n });\r\n};\r\n\r\n// add $.fn.outerWidth and $.fn.outerHeight\r\n['width', 'height'].forEach(function(dimension) {\r\n const Dimension = dimension.replace(/./, function (m) {\r\n return m[0].toUpperCase()\r\n });\r\n\r\n $.fn[`outer${Dimension}`] = function(margin) {\r\n const elem = this;\r\n\r\n if (elem) {\r\n const sides = {'width': ['left', 'right'], 'height': ['top', 'bottom']};\r\n let size = elem[dimension]();\r\n\r\n sides[dimension].forEach(function(side) {\r\n if (margin) size += parseInt(elem.css('margin-' + side), 10);\r\n });\r\n\r\n return size;\r\n } else {\r\n return null;\r\n }\r\n };\r\n});\r\n\r\n// allow use of $(':input')\r\n// @ts-ignore\r\n$.expr[':']['input'] = function() {\r\n if (('disabled' in this) || ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON'].includes(this.tagName)) return this;\r\n};\r\n\r\n// add $().hover() method\r\n$.fn.hover = function(hover, leave) {\r\n return this\r\n .on('mouseenter', hover)\r\n .on('mouseleave', leave || hover);\r\n};\r\n\r\n// add animated scroll\r\n$.fn.animatedScrollTop = function (to, duration = $.fx.speeds._default, callback) {\r\n if (typeof to === 'number') to -= (window.scrollY || window.pageYOffset);\r\n\r\n jump(to, {\r\n duration: $.fx.speeds[duration] || duration,\r\n callback\r\n });\r\n\r\n return this;\r\n};\r\n\r\n// required for compatibility with jquery plugins\r\n// ex: bootstrap plugins\r\n$.fn.extend = $.extend.bind($);\r\n\r\n/**\r\n * Enable special events on Zepto\r\n * @license Original Copyright 2013 Enideo. Released under dual MIT and GPL licenses.\r\n */\r\n// @ts-ignore\r\n$.event.special = $.event.special || {};\r\n\r\nconst bindBeforeSpecialEvents = $.fn.bind;\r\n\r\n$.fn.bind = function(eventName, data, callback) {\r\n const el = this;\r\n\r\n if (!callback){\r\n callback = data;\r\n data = null;\r\n }\r\n\r\n $.each(eventName.split(/\\s/), (key: string, value: any) : boolean => {\r\n value = value.split(/\\./)[0];\r\n\r\n if(value in $.event.special){\r\n let specialEvent = $.event.special[value];\r\n\r\n /// init enable special events on Zepto\r\n if(!specialEvent._init) {\r\n specialEvent._init = true;\r\n\r\n /// intercept and replace the special event handler to add functionality\r\n specialEvent.originalHandler = specialEvent.handler;\r\n specialEvent.handler = function(){\r\n\r\n /// make event argument writable, like on jQuery\r\n const args = Array.prototype.slice.call(arguments);\r\n\r\n args[0] = $.extend({},args[0]);\r\n\r\n /// define the event handle, $.event.dispatch is only for newer versions of jQuery\r\n $.event.handle = function(){\r\n\r\n /// make context of trigger the event element\r\n const args = Array.prototype.slice.call(arguments);\r\n const event = args[0];\r\n const $target = $(event.target);\r\n\r\n $target.trigger.apply( $target, arguments );\r\n };\r\n\r\n specialEvent.originalHandler.apply(this,args);\r\n }\r\n }\r\n\r\n /// setup special events on Zepto\r\n specialEvent.setup.apply(el, [data]);\r\n }\r\n\r\n return true;\r\n });\r\n\r\n return bindBeforeSpecialEvents.apply(this, [eventName, callback]);\r\n};\r\n","import m from 'mithril';\nimport prop from 'mithril/stream';\n\nexport default () => {\n const mo = window['m'];\n\n const _m = function (comp, ...args) {\n const node = mo.apply(this, arguments);\n\n if (!node.attrs) node.attrs = {};\n\n if (node.attrs.bidi) {\n m.bidi(node, node.attrs.bidi);\n }\n\n if (node.attrs.route) {\n node.attrs.href = node.attrs.route;\n node.attrs.tag = m.route.Link;\n\n delete node.attrs.route;\n }\n\n return node;\n };\n\n Object.keys(mo).forEach(key => _m[key] = mo[key]);\n\n _m.withAttr = (key: string, cb: Function) => function () {\n cb(this.getAttribute(key) || this[key]);\n };\n\n _m.prop = prop;\n\n window['m'] = _m;\n}\n","import 'expose-loader?jQuery!zepto';\r\nimport 'expose-loader?moment!expose-loader?dayjs!dayjs';\r\nimport 'expose-loader?m!mithril';\r\nimport 'expose-loader?m.bidi!m.attrs.bidi';\r\nimport 'expose-loader?Mousetrap!mousetrap';\r\nimport 'expose-loader?classNames!classNames';\r\n\r\nimport 'zepto/src/selector';\r\nimport 'zepto/src/data';\r\nimport 'zepto/src/fx';\r\nimport 'zepto/src/fx_methods';\r\n\r\nimport './utils/patchZepto';\r\n\r\nimport 'hc-sticky';\r\nimport 'bootstrap/js/dropdown';\r\nimport 'bootstrap/js/transition';\r\n\r\nimport relativeTime from 'dayjs/plugin/relativeTime';\r\nimport localizedFormat from 'dayjs/plugin/localizedFormat';\r\n\r\ndayjs.extend(relativeTime);\r\ndayjs.extend(localizedFormat);\r\n\r\nimport patchMithril from './utils/patchMithril';\r\n\r\npatchMithril();\r\n\r\n// import * as Extend from './extend/index';\r\n\r\n// export { Extend };\r\n","import isBrowser from './isBrowser';\n\nconst longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\nlet timeoutDuration = 0;\nfor (let i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n timeoutDuration = 1;\n break;\n }\n}\n\nexport function microtaskDebounce(fn) {\n let called = false\n return () => {\n if (called) {\n return\n }\n called = true\n window.Promise.resolve().then(() => {\n called = false\n fn()\n })\n }\n}\n\nexport function taskDebounce(fn) {\n let scheduled = false;\n return () => {\n if (!scheduled) {\n scheduled = true;\n setTimeout(() => {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nconst supportsMicroTasks = isBrowser && window.Promise\n\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nexport default (supportsMicroTasks\n ? microtaskDebounce\n : taskDebounce);\n","export default typeof window !== 'undefined' && typeof document !== 'undefined';\n","/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nexport default function isFunction(functionToCheck) {\n const getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nexport default function getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n const window = element.ownerDocument.defaultView;\n const css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n","/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nexport default function getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nexport default function getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body\n case '#document':\n return element.body\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n const { overflow, overflowX, overflowY } = getStyleComputedProperty(element);\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n","import isBrowser from './isBrowser';\n\nconst isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nconst isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nexport default function isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nexport default function getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n const noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n let offsetParent = element.offsetParent || null;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n const nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (\n ['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 &&\n getStyleComputedProperty(offsetParent, 'position') === 'static'\n ) {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n","/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nexport default function getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n","import isOffsetContainer from './isOffsetContainer';\nimport getRoot from './getRoot';\nimport getOffsetParent from './getOffsetParent';\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nexport default function findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n const order =\n element1.compareDocumentPosition(element2) &\n Node.DOCUMENT_POSITION_FOLLOWING;\n const start = order ? element1 : element2;\n const end = order ? element2 : element1;\n\n // Get common ancestor container\n const range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n const { commonAncestorContainer } = range;\n\n // Both nodes are inside #document\n if (\n (element1 !== commonAncestorContainer &&\n element2 !== commonAncestorContainer) ||\n start.contains(end)\n ) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n const element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n","import getOffsetParent from './getOffsetParent';\n\nexport default function isOffsetContainer(element) {\n const { nodeName } = element;\n if (nodeName === 'BODY') {\n return false;\n }\n return (\n nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element\n );\n}\n","/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nexport default function getScroll(element, side = 'top') {\n const upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n const nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n const html = element.ownerDocument.documentElement;\n const scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n","/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nexport default function getBordersSize(styles, axis) {\n const sideA = axis === 'x' ? 'Left' : 'Top';\n const sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return (\n parseFloat(styles[`border${sideA}Width`], 10) +\n parseFloat(styles[`border${sideB}Width`], 10)\n );\n}\n","import isIE from './isIE';\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(\n body[`offset${axis}`],\n body[`scroll${axis}`],\n html[`client${axis}`],\n html[`offset${axis}`],\n html[`scroll${axis}`],\n isIE(10)\n ? (parseInt(html[`offset${axis}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Top' : 'Left'}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Bottom' : 'Right'}`]))\n : 0 \n );\n}\n\nexport default function getWindowSizes(document) {\n const body = document.body;\n const html = document.documentElement;\n const computedStyle = isIE(10) && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle),\n };\n}\n","/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nexport default function getClientRect(offsets) {\n return {\n ...offsets,\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height,\n };\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getBordersSize from './getBordersSize';\nimport getWindowSizes from './getWindowSizes';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\nimport isIE from './isIE';\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nexport default function getBoundingClientRect(element) {\n let rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n }\n else {\n rect = element.getBoundingClientRect();\n }\n }\n catch(e){}\n\n const result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top,\n };\n\n // subtract scrollbar size from sizes\n const sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n const width =\n sizes.width || element.clientWidth || result.right - result.left;\n const height =\n sizes.height || element.clientHeight || result.bottom - result.top;\n\n let horizScrollbar = element.offsetWidth - width;\n let vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n const styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport includeScroll from './includeScroll';\nimport getScrollParent from './getScrollParent';\nimport getBoundingClientRect from './getBoundingClientRect';\nimport runIsIE from './isIE';\nimport getClientRect from './getClientRect';\n\nexport default function getOffsetRectRelativeToArbitraryNode(children, parent, fixedPosition = false) {\n const isIE10 = runIsIE(10);\n const isHTML = parent.nodeName === 'HTML';\n const childrenRect = getBoundingClientRect(children);\n const parentRect = getBoundingClientRect(parent);\n const scrollParent = getScrollParent(children);\n\n const styles = getStyleComputedProperty(parent);\n const borderTopWidth = parseFloat(styles.borderTopWidth, 10);\n const borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if(fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n let offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height,\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n const marginTop = parseFloat(styles.marginTop, 10);\n const marginLeft = parseFloat(styles.marginLeft, 10);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (\n isIE10 && !fixedPosition\n ? parent.contains(scrollParent)\n : parent === scrollParent && scrollParent.nodeName !== 'BODY'\n ) {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n","import getScroll from './getScroll';\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nexport default function includeScroll(rect, element, subtract = false) {\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n const modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nexport default function getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n let el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n\n}\n","import getScrollParent from './getScrollParent';\nimport getParentNode from './getParentNode';\nimport findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getViewportOffsetRectRelativeToArtbitraryNode from './getViewportOffsetRectRelativeToArtbitraryNode';\nimport getWindowSizes from './getWindowSizes';\nimport isFixed from './isFixed';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nexport default function getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement,\n fixedPosition = false\n) {\n // NOTE: 1 DOM access here\n\n let boundaries = { top: 0, left: 0 };\n const offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);\n\n // Handle viewport case\n if (boundariesElement === 'viewport' ) {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n }\n\n else {\n // Handle other cases based on DOM element used as boundaries\n let boundariesNode;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n const offsets = getOffsetRectRelativeToArbitraryNode(\n boundariesNode,\n offsetParent,\n fixedPosition\n );\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n const { height, width } = getWindowSizes(popper.ownerDocument);\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n padding = padding || 0;\n const isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0; \n boundaries.top += isPaddingNumber ? padding : padding.top || 0; \n boundaries.right -= isPaddingNumber ? padding : padding.right || 0; \n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0; \n\n return boundaries;\n}\n","import getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\n\nexport default function getViewportOffsetRectRelativeToArtbitraryNode(element, excludeScroll = false) {\n const html = element.ownerDocument.documentElement;\n const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n const width = Math.max(html.clientWidth, window.innerWidth || 0);\n const height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n const scrollTop = !excludeScroll ? getScroll(html) : 0;\n const scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n const offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width,\n height,\n };\n\n return getClientRect(offset);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nexport default function isFixed(element) {\n const nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n const parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n","import getBoundaries from '../utils/getBoundaries';\n\nfunction getArea({ width, height }) {\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeAutoPlacement(\n placement,\n refRect,\n popper,\n reference,\n boundariesElement,\n padding = 0\n) {\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n const boundaries = getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement\n );\n\n const rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top,\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height,\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom,\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height,\n },\n };\n\n const sortedAreas = Object.keys(rects)\n .map(key => ({\n key,\n ...rects[key],\n area: getArea(rects[key]),\n }))\n .sort((a, b) => b.area - a.area);\n\n const filteredAreas = sortedAreas.filter(\n ({ width, height }) =>\n width >= popper.clientWidth && height >= popper.clientHeight\n );\n\n const computedPlacement = filteredAreas.length > 0\n ? filteredAreas[0].key\n : sortedAreas[0].key;\n\n const variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? `-${variation}` : '');\n}\n","import findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nexport default function getReferenceOffsets(state, popper, reference, fixedPosition = null) {\n const commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n","/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nexport default function getOuterSizes(element) {\n const window = element.ownerDocument.defaultView;\n const styles = window.getComputedStyle(element);\n const x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n const y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n const result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x,\n };\n return result;\n}\n","/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nexport default function getOppositePlacement(placement) {\n const hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, matched => hash[matched]);\n}\n","import getOuterSizes from './getOuterSizes';\nimport getOppositePlacement from './getOppositePlacement';\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nexport default function getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n const popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n const popperOffsets = {\n width: popperRect.width,\n height: popperRect.height,\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n const isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n const mainSide = isHoriz ? 'top' : 'left';\n const secondarySide = isHoriz ? 'left' : 'top';\n const measurement = isHoriz ? 'height' : 'width';\n const secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] =\n referenceOffsets[mainSide] +\n referenceOffsets[measurement] / 2 -\n popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] =\n referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] =\n referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n","/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n","import isFunction from './isFunction';\nimport findIndex from './findIndex';\nimport getClientRect from '../utils/getClientRect';\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nexport default function runModifiers(modifiers, data, ends) {\n const modifiersToRun = ends === undefined\n ? modifiers\n : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(modifier => {\n if (modifier['function']) { // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n const fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n","import find from './find';\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(cur => cur[prop] === value);\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n const match = find(arr, obj => obj[prop] === value);\n return arr.indexOf(match);\n}\n","import computeAutoPlacement from '../utils/computeAutoPlacement';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.
\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nexport default function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n let data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {},\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(\n this.state,\n this.popper,\n this.reference,\n this.options.positionFixed\n );\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(\n this.options.placement,\n data.offsets.reference,\n this.popper,\n this.reference,\n this.options.modifiers.flip.boundariesElement,\n this.options.modifiers.flip.padding\n );\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(\n this.popper,\n data.offsets.reference,\n data.placement\n );\n\n data.offsets.popper.position = this.options.positionFixed\n ? 'fixed'\n : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n","/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nexport default function isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(\n ({ name, enabled }) => enabled && name === modifierName\n );\n}\n","/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nexport default function getSupportedPropertyName(property) {\n const prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n const upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (let i = 0; i < prefixes.length; i++) {\n const prefix = prefixes[i];\n const toCheck = prefix ? `${prefix}${upperProp}` : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n","import isModifierEnabled from '../utils/isModifierEnabled';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nexport default function destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicity asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n","/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nexport default function getWindow(element) {\n const ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n","import getScrollParent from './getScrollParent';\nimport getWindow from './getWindow';\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n const isBody = scrollParent.nodeName === 'BODY';\n const target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(\n getScrollParent(target.parentNode),\n event,\n callback,\n scrollParents\n );\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function setupEventListeners(\n reference,\n options,\n state,\n updateBound\n) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n const scrollElement = getScrollParent(reference);\n attachToScrollParents(\n scrollElement,\n 'scroll',\n state.updateBound,\n state.scrollParents\n );\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n","import setupEventListeners from '../utils/setupEventListeners';\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nexport default function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(\n this.reference,\n this.options,\n this.state,\n this.scheduleUpdate\n );\n }\n}\n","import removeEventListeners from '../utils/removeEventListeners';\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nexport default function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n","import getWindow from './getWindow';\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(target => {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n","/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nexport default function isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n","import isNumeric from './isNumeric';\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setStyles(element, styles) {\n Object.keys(styles).forEach(prop => {\n let unit = '';\n // add unit if the value is numeric and is one of the following\n if (\n ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !==\n -1 &&\n isNumeric(styles[prop])\n ) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n","import getSupportedPropertyName from '../utils/getSupportedPropertyName';\nimport find from '../utils/find';\nimport getOffsetParent from '../utils/getOffsetParent';\nimport getBoundingClientRect from '../utils/getBoundingClientRect';\nimport getRoundedOffsets from '../utils/getRoundedOffsets';\nimport isBrowser from '../utils/isBrowser';\n\nconst isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeStyle(data, options) {\n const { x, y } = options;\n const { popper } = data.offsets;\n\n // Remove this legacy support in Popper.js v2\n const legacyGpuAccelerationOption = find(\n data.instance.modifiers,\n modifier => modifier.name === 'applyStyle'\n ).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn(\n 'WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'\n );\n }\n const gpuAcceleration =\n legacyGpuAccelerationOption !== undefined\n ? legacyGpuAccelerationOption\n : options.gpuAcceleration;\n\n const offsetParent = getOffsetParent(data.instance.popper);\n const offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n const styles = {\n position: popper.position,\n };\n\n const offsets = getRoundedOffsets(\n data,\n window.devicePixelRatio < 2 || !isFirefox\n );\n\n const sideA = x === 'bottom' ? 'top' : 'bottom';\n const sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n const prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n let left, top;\n if (sideA === 'bottom') {\n // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = `translate3d(${left}px, ${top}px, 0)`;\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n const invertTop = sideA === 'bottom' ? -1 : 1;\n const invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = `${sideA}, ${sideB}`;\n }\n\n // Attributes\n const attributes = {\n 'x-placement': data.placement,\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = { ...attributes, ...data.attributes };\n data.styles = { ...styles, ...data.styles };\n data.arrowStyles = { ...data.offsets.arrow, ...data.arrowStyles };\n\n return data;\n}\n","import find from './find';\n\n/**\n * Helper used to know if the given modifier depends from another one.
\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nexport default function isModifierRequired(\n modifiers,\n requestingName,\n requestedName\n) {\n const requesting = find(modifiers, ({ name }) => name === requestingName);\n\n const isRequired =\n !!requesting &&\n modifiers.some(modifier => {\n return (\n modifier.name === requestedName &&\n modifier.enabled &&\n modifier.order < requesting.order\n );\n });\n\n if (!isRequired) {\n const requesting = `\\`${requestingName}\\``;\n const requested = `\\`${requestedName}\\``;\n console.warn(\n `${requested} modifier is required by ${requesting} modifier in order to work, be sure to include it before ${requesting}!`\n );\n }\n return isRequired;\n}\n","/**\n * List of accepted placements to use as values of the `placement` option.
\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.
\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nexport default [\n 'auto-start',\n 'auto',\n 'auto-end',\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n];\n","import placements from '../methods/placements';\n\n// Get rid of `auto` `auto-start` and `auto-end`\nconst validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nexport default function clockwise(placement, counter = false) {\n const index = validPlacements.indexOf(placement);\n const arr = validPlacements\n .slice(index + 1)\n .concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n","import getOppositePlacement from '../utils/getOppositePlacement';\nimport getOppositeVariation from '../utils/getOppositeVariation';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\nimport getBoundaries from '../utils/getBoundaries';\nimport isModifierEnabled from '../utils/isModifierEnabled';\nimport clockwise from '../utils/clockwise';\n\nconst BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise',\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n options.boundariesElement,\n data.positionFixed\n );\n\n let placement = data.placement.split('-')[0];\n let placementOpposite = getOppositePlacement(placement);\n let variation = data.placement.split('-')[1] || '';\n\n let flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach((step, index) => {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n const popperOffsets = data.offsets.popper;\n const refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n const floor = Math.floor;\n const overlapsRef =\n (placement === 'left' &&\n floor(popperOffsets.right) > floor(refOffsets.left)) ||\n (placement === 'right' &&\n floor(popperOffsets.left) < floor(refOffsets.right)) ||\n (placement === 'top' &&\n floor(popperOffsets.bottom) > floor(refOffsets.top)) ||\n (placement === 'bottom' &&\n floor(popperOffsets.top) < floor(refOffsets.bottom));\n\n const overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n const overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n const overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n const overflowsBottom =\n floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n const overflowsBoundaries =\n (placement === 'left' && overflowsLeft) ||\n (placement === 'right' && overflowsRight) ||\n (placement === 'top' && overflowsTop) ||\n (placement === 'bottom' && overflowsBottom);\n\n // flip the variation if required\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n // flips variation if reference element overflows boundaries\n const flippedVariationByRef =\n !!options.flipVariations &&\n ((isVertical && variation === 'start' && overflowsLeft) ||\n (isVertical && variation === 'end' && overflowsRight) ||\n (!isVertical && variation === 'start' && overflowsTop) ||\n (!isVertical && variation === 'end' && overflowsBottom));\n\n // flips variation if popper content overflows boundaries\n const flippedVariationByContent =\n !!options.flipVariationsByContent &&\n ((isVertical && variation === 'start' && overflowsRight) ||\n (isVertical && variation === 'end' && overflowsLeft) ||\n (!isVertical && variation === 'start' && overflowsBottom) ||\n (!isVertical && variation === 'end' && overflowsTop));\n\n const flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = {\n ...data.offsets.popper,\n ...getPopperOffsets(\n data.instance.popper,\n data.offsets.reference,\n data.placement\n ),\n };\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n","import isNumeric from '../utils/isNumeric';\nimport getClientRect from '../utils/getClientRect';\nimport find from '../utils/find';\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nexport function toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n const split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n const value = +split[1];\n const unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n let element;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n const rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n let size;\n if (unit === 'vh') {\n size = Math.max(\n document.documentElement.clientHeight,\n window.innerHeight || 0\n );\n } else {\n size = Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n );\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nexport function parseOffset(\n offset,\n popperOffsets,\n referenceOffsets,\n basePlacement\n) {\n const offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n const useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n const fragments = offset.split(/(\\+|\\-)/).map(frag => frag.trim());\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n const divider = fragments.indexOf(\n find(fragments, frag => frag.search(/,|\\s/) !== -1)\n );\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn(\n 'Offsets separated by white space(s) are deprecated, use a comma (,) instead.'\n );\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n const splitRegex = /\\s*,\\s*|\\s+/;\n let ops = divider !== -1\n ? [\n fragments\n .slice(0, divider)\n .concat([fragments[divider].split(splitRegex)[0]]),\n [fragments[divider].split(splitRegex)[1]].concat(\n fragments.slice(divider + 1)\n ),\n ]\n : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map((op, index) => {\n // Most of the units rely on the orientation of the popper\n const measurement = (index === 1 ? !useHeight : useHeight)\n ? 'height'\n : 'width';\n let mergeWithPrevious = false;\n return (\n op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce((a, b) => {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(str => toValue(str, measurement, popperOffsets, referenceOffsets))\n );\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach((op, index) => {\n op.forEach((frag, index2) => {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nexport default function offset(data, { offset }) {\n const { placement, offsets: { popper, reference } } = data;\n const basePlacement = placement.split('-')[0];\n\n let offsets;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n","import applyStyle, { applyStyleOnLoad } from './applyStyle';\nimport computeStyle from './computeStyle';\nimport arrow from './arrow';\nimport flip from './flip';\nimport keepTogether from './keepTogether';\nimport offset from './offset';\nimport preventOverflow from './preventOverflow';\nimport shift from './shift';\nimport hide from './hide';\nimport inner from './inner';\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.
\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.
\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nexport default {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.
\n * It will read the variation of the `placement` property.
\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift,\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.
\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.
\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.
\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0,\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries.
\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".
\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent',\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether,\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]',\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false,\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner,\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide,\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right',\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined,\n },\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n","import modifiers from '../modifiers/index';\n\n/**\n * Default options provided to Popper.js constructor.
\n * These can be overridden using the `options` argument of Popper.js.
\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nexport default {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: () => {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: () => {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers,\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function shift(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n const { reference, popper } = data.offsets;\n const isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n const side = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n const shiftOffsets = {\n start: { [side]: reference[side] },\n end: {\n [side]: reference[side] + reference[measurement] - popper[measurement],\n },\n };\n\n data.offsets.popper = { ...popper, ...shiftOffsets[shiftvariation] };\n }\n\n return data;\n}\n","import getOffsetParent from '../utils/getOffsetParent';\nimport getBoundaries from '../utils/getBoundaries';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function preventOverflow(data, options) {\n let boundariesElement =\n options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n const transformProp = getSupportedPropertyName('transform');\n const popperStyles = data.instance.popper.style; // assignment to help minification\n const { top, left, [transformProp]: transform } = popperStyles;\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n boundariesElement,\n data.positionFixed\n );\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n\n options.boundaries = boundaries;\n\n const order = options.priority;\n let popper = data.offsets.popper;\n\n const check = {\n primary(placement) {\n let value = popper[placement];\n if (\n popper[placement] < boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return { [placement]: value };\n },\n secondary(placement) {\n const mainSide = placement === 'right' ? 'left' : 'top';\n let value = popper[mainSide];\n if (\n popper[placement] > boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.min(\n popper[mainSide],\n boundaries[placement] -\n (placement === 'right' ? popper.width : popper.height)\n );\n }\n return { [mainSide]: value };\n },\n };\n\n order.forEach(placement => {\n const side =\n ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = { ...popper, ...check[side](placement) };\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function keepTogether(data) {\n const { popper, reference } = data.offsets;\n const placement = data.placement.split('-')[0];\n const floor = Math.floor;\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n const side = isVertical ? 'right' : 'bottom';\n const opSide = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] =\n floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOuterSizes from '../utils/getOuterSizes';\nimport isModifierRequired from '../utils/isModifierRequired';\nimport getStyleComputedProperty from '../utils/getStyleComputedProperty';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function arrow(data, options) {\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n let arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn(\n 'WARNING: `arrow.element` must be child of its popper element!'\n );\n return data;\n }\n }\n\n const placement = data.placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n const len = isVertical ? 'height' : 'width';\n const sideCapitalized = isVertical ? 'Top' : 'Left';\n const side = sideCapitalized.toLowerCase();\n const altSide = isVertical ? 'left' : 'top';\n const opSide = isVertical ? 'bottom' : 'right';\n const arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -=\n popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] +=\n reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n const center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n const css = getStyleComputedProperty(data.instance.popper);\n const popperMarginSide = parseFloat(css[`margin${sideCapitalized}`], 10);\n const popperBorderSide = parseFloat(css[`border${sideCapitalized}Width`], 10);\n let sideValue =\n center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = {\n [side]: Math.round(sideValue),\n [altSide]: '', // make sure to unset any eventual altSide value from the DOM node\n };\n\n return data;\n}\n","/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nexport default function getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOppositePlacement from '../utils/getOppositePlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function inner(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n const subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] =\n reference[basePlacement] -\n (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n","import isModifierRequired from '../utils/isModifierRequired';\nimport find from '../utils/find';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n const refRect = data.offsets.reference;\n const bound = find(\n data.instance.modifiers,\n modifier => modifier.name === 'preventOverflow'\n ).boundaries;\n\n if (\n refRect.bottom < bound.top ||\n refRect.left > bound.right ||\n refRect.top > bound.bottom ||\n refRect.right < bound.left\n ) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n","/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nexport default function getRoundedOffsets(data, shouldRound) {\n const { popper, reference } = data.offsets;\n const { round, floor } = Math;\n const noRound = v => v;\n \n const referenceWidth = round(reference.width);\n const popperWidth = round(popper.width);\n \n const isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n const isVariation = data.placement.indexOf('-') !== -1;\n const sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n const bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n const horizontalToInteger = !shouldRound\n ? noRound\n : isVertical || isVariation || sameWidthParity\n ? round\n : floor;\n const verticalToInteger = !shouldRound ? noRound : round;\n\n return {\n left: horizontalToInteger(\n bothOddWidth && !isVariation && shouldRound\n ? popper.left - 1\n : popper.left\n ),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right),\n };\n}\n","import setStyles from '../utils/setStyles';\nimport setAttributes from '../utils/setAttributes';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport computeAutoPlacement from '../utils/computeAutoPlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nexport default function applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nexport function applyStyleOnLoad(\n reference,\n popper,\n options,\n modifierOptions,\n state\n) {\n // compute reference element offsets\n const referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n const placement = computeAutoPlacement(\n options.placement,\n referenceOffsets,\n popper,\n reference,\n options.modifiers.flip.boundariesElement,\n options.modifiers.flip.padding\n );\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n return options;\n}\n","/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function(prop) {\n const value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n","!function(r,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):r.dayjs_plugin_relativeTime=t()}(this,function(){\"use strict\";return function(r,t,e){var n=t.prototype;e.en.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\"};var o=function(r,t,n,o){for(var d,i,u=n.$locale().relativeTime,a=[{l:\"s\",r:44,d:\"second\"},{l:\"m\",r:89},{l:\"mm\",r:44,d:\"minute\"},{l:\"h\",r:89},{l:\"hh\",r:21,d:\"hour\"},{l:\"d\",r:35},{l:\"dd\",r:25,d:\"day\"},{l:\"M\",r:45},{l:\"MM\",r:10,d:\"month\"},{l:\"y\",r:17},{l:\"yy\",d:\"year\"}],f=a.length,s=0;s0&&(l=a[s-1]),i=u[l.l].replace(\"%d\",h);break}}return t?i:(d>0?u.future:u.past).replace(\"%s\",i)};n.to=function(r,t){return o(r,t,this,!0)},n.from=function(r,t){return o(r,t,this)};var d=function(r){return r.$u?e.utc():e()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}});\n","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):e.dayjs_plugin_localizedFormat=t()}(this,function(){\"use strict\";return function(e,t,o){var n=t.prototype,r=n.format,M={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"};o.en.formats=M;n.format=function(e){void 0===e&&(e=\"YYYY-MM-DDTHH:mm:ssZ\");var t=this.$locale().formats,o=void 0===t?{}:t,n=e.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,t,n){var r=n&&n.toUpperCase();return t||o[n]||M[n]||o[r].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,o){return t||o.slice(1)})});return r.call(this,n)}}});\n","\"use strict\"\n\nmodule.exports = require(\"./stream/stream\")\n","module.exports = global[\"jQuery\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\imports-loader\\\\index.js?this=>window!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\zepto.js\");","/*** IMPORTS FROM imports-loader ***/\n(function() {\n\n/* Zepto v1.2.0 - zepto event ajax form ie - zeptojs.com/license */\n(function(global, factory) {\n if (typeof define === 'function' && define.amd)\n define(function() { return factory(global) })\n else\n factory(global)\n}(this, function(window) {\n var Zepto = (function() {\n var undefined, key, $, classList, emptyArray = [], concat = emptyArray.concat, filter = emptyArray.filter, slice = emptyArray.slice,\n document = window.document,\n elementDisplay = {}, classCache = {},\n cssNumber = { 'column-count': 1, 'columns': 1, 'font-weight': 1, 'line-height': 1,'opacity': 1, 'z-index': 1, 'zoom': 1 },\n fragmentRE = /^\\s*<(\\w+|!)[^>]*>/,\n singleTagRE = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,\n tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/ig,\n rootNodeRE = /^(?:body|html)$/i,\n capitalRE = /([A-Z])/g,\n\n // special attributes that should be get/set via method calls\n methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'],\n\n adjacencyOperators = [ 'after', 'prepend', 'before', 'append' ],\n table = document.createElement('table'),\n tableRow = document.createElement('tr'),\n containers = {\n 'tr': document.createElement('tbody'),\n 'tbody': table, 'thead': table, 'tfoot': table,\n 'td': tableRow, 'th': tableRow,\n '*': document.createElement('div')\n },\n readyRE = /complete|loaded|interactive/,\n simpleSelectorRE = /^[\\w-]*$/,\n class2type = {},\n toString = class2type.toString,\n zepto = {},\n camelize, uniq,\n tempParent = document.createElement('div'),\n propMap = {\n 'tabindex': 'tabIndex',\n 'readonly': 'readOnly',\n 'for': 'htmlFor',\n 'class': 'className',\n 'maxlength': 'maxLength',\n 'cellspacing': 'cellSpacing',\n 'cellpadding': 'cellPadding',\n 'rowspan': 'rowSpan',\n 'colspan': 'colSpan',\n 'usemap': 'useMap',\n 'frameborder': 'frameBorder',\n 'contenteditable': 'contentEditable'\n },\n isArray = Array.isArray ||\n function(object){ return object instanceof Array }\n\n zepto.matches = function(element, selector) {\n if (!selector || !element || element.nodeType !== 1) return false\n var matchesSelector = element.matches || element.webkitMatchesSelector ||\n element.mozMatchesSelector || element.oMatchesSelector ||\n element.matchesSelector\n if (matchesSelector) return matchesSelector.call(element, selector)\n // fall back to performing a selector:\n var match, parent = element.parentNode, temp = !parent\n if (temp) (parent = tempParent).appendChild(element)\n match = ~zepto.qsa(parent, selector).indexOf(element)\n temp && tempParent.removeChild(element)\n return match\n }\n\n function type(obj) {\n return obj == null ? String(obj) :\n class2type[toString.call(obj)] || \"object\"\n }\n\n function isFunction(value) { return type(value) == \"function\" }\n function isWindow(obj) { return obj != null && obj == obj.window }\n function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE }\n function isObject(obj) { return type(obj) == \"object\" }\n function isPlainObject(obj) {\n return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype\n }\n\n function likeArray(obj) {\n var length = !!obj && 'length' in obj && obj.length,\n type = $.type(obj)\n\n return 'function' != type && !isWindow(obj) && (\n 'array' == type || length === 0 ||\n (typeof length == 'number' && length > 0 && (length - 1) in obj)\n )\n }\n\n function compact(array) { return filter.call(array, function(item){ return item != null }) }\n function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array }\n camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : '' }) }\n function dasherize(str) {\n return str.replace(/::/g, '/')\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')\n .replace(/([a-z\\d])([A-Z])/g, '$1_$2')\n .replace(/_/g, '-')\n .toLowerCase()\n }\n uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) }\n\n function classRE(name) {\n return name in classCache ?\n classCache[name] : (classCache[name] = new RegExp('(^|\\\\s)' + name + '(\\\\s|$)'))\n }\n\n function maybeAddPx(name, value) {\n return (typeof value == \"number\" && !cssNumber[dasherize(name)]) ? value + \"px\" : value\n }\n\n function defaultDisplay(nodeName) {\n var element, display\n if (!elementDisplay[nodeName]) {\n element = document.createElement(nodeName)\n document.body.appendChild(element)\n display = getComputedStyle(element, '').getPropertyValue(\"display\")\n element.parentNode.removeChild(element)\n display == \"none\" && (display = \"block\")\n elementDisplay[nodeName] = display\n }\n return elementDisplay[nodeName]\n }\n\n function children(element) {\n return 'children' in element ?\n slice.call(element.children) :\n $.map(element.childNodes, function(node){ if (node.nodeType == 1) return node })\n }\n\n function Z(dom, selector) {\n var i, len = dom ? dom.length : 0\n for (i = 0; i < len; i++) this[i] = dom[i]\n this.length = len\n this.selector = selector || ''\n }\n\n // `$.zepto.fragment` takes a html string and an optional tag name\n // to generate DOM nodes from the given html string.\n // The generated DOM nodes are returned as an array.\n // This function can be overridden in plugins for example to make\n // it compatible with browsers that don't support the DOM fully.\n zepto.fragment = function(html, name, properties) {\n var dom, nodes, container\n\n // A special case optimization for a single tag\n if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1))\n\n if (!dom) {\n if (html.replace) html = html.replace(tagExpanderRE, \"<$1>\")\n if (name === undefined) name = fragmentRE.test(html) && RegExp.$1\n if (!(name in containers)) name = '*'\n\n container = containers[name]\n container.innerHTML = '' + html\n dom = $.each(slice.call(container.childNodes), function(){\n container.removeChild(this)\n })\n }\n\n if (isPlainObject(properties)) {\n nodes = $(dom)\n $.each(properties, function(key, value) {\n if (methodAttributes.indexOf(key) > -1) nodes[key](value)\n else nodes.attr(key, value)\n })\n }\n\n return dom\n }\n\n // `$.zepto.Z` swaps out the prototype of the given `dom` array\n // of nodes with `$.fn` and thus supplying all the Zepto functions\n // to the array. This method can be overridden in plugins.\n zepto.Z = function(dom, selector) {\n return new Z(dom, selector)\n }\n\n // `$.zepto.isZ` should return `true` if the given object is a Zepto\n // collection. This method can be overridden in plugins.\n zepto.isZ = function(object) {\n return object instanceof zepto.Z\n }\n\n // `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and\n // takes a CSS selector and an optional context (and handles various\n // special cases).\n // This method can be overridden in plugins.\n zepto.init = function(selector, context) {\n var dom\n // If nothing given, return an empty Zepto collection\n if (!selector) return zepto.Z()\n // Optimize for string selectors\n else if (typeof selector == 'string') {\n selector = selector.trim()\n // If it's a html fragment, create nodes from it\n // Note: In both Chrome 21 and Firefox 15, DOM error 12\n // is thrown if the fragment doesn't begin with <\n if (selector[0] == '<' && fragmentRE.test(selector))\n dom = zepto.fragment(selector, RegExp.$1, context), selector = null\n // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // If it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // If a function is given, call it when the DOM is ready\n else if (isFunction(selector)) return $(document).ready(selector)\n // If a Zepto collection is given, just return it\n else if (zepto.isZ(selector)) return selector\n else {\n // normalize array if an array of nodes is given\n if (isArray(selector)) dom = compact(selector)\n // Wrap DOM nodes.\n else if (isObject(selector))\n dom = [selector], selector = null\n // If it's a html fragment, create nodes from it\n else if (fragmentRE.test(selector))\n dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null\n // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // And last but no least, if it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // create a new Zepto collection from the nodes found\n return zepto.Z(dom, selector)\n }\n\n // `$` will be the base `Zepto` object. When calling this\n // function just call `$.zepto.init, which makes the implementation\n // details of selecting nodes and creating Zepto collections\n // patchable in plugins.\n $ = function(selector, context){\n return zepto.init(selector, context)\n }\n\n function extend(target, source, deep) {\n for (key in source)\n if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {\n if (isPlainObject(source[key]) && !isPlainObject(target[key]))\n target[key] = {}\n if (isArray(source[key]) && !isArray(target[key]))\n target[key] = []\n extend(target[key], source[key], deep)\n }\n else if (source[key] !== undefined) target[key] = source[key]\n }\n\n // Copy all but undefined properties from one or more\n // objects to the `target` object.\n $.extend = function(target){\n var deep, args = slice.call(arguments, 1)\n if (typeof target == 'boolean') {\n deep = target\n target = args.shift()\n }\n args.forEach(function(arg){ extend(target, arg, deep) })\n return target\n }\n\n // `$.zepto.qsa` is Zepto's CSS selector implementation which\n // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`.\n // This method can be overridden in plugins.\n zepto.qsa = function(element, selector){\n var found,\n maybeID = selector[0] == '#',\n maybeClass = !maybeID && selector[0] == '.',\n nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, // Ensure that a 1 char tag name still gets checked\n isSimple = simpleSelectorRE.test(nameOnly)\n return (element.getElementById && isSimple && maybeID) ? // Safari DocumentFragment doesn't have getElementById\n ( (found = element.getElementById(nameOnly)) ? [found] : [] ) :\n (element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11) ? [] :\n slice.call(\n isSimple && !maybeID && element.getElementsByClassName ? // DocumentFragment doesn't have getElementsByClassName/TagName\n maybeClass ? element.getElementsByClassName(nameOnly) : // If it's simple, it could be a class\n element.getElementsByTagName(selector) : // Or a tag\n element.querySelectorAll(selector) // Or it's not simple, and we need to query all\n )\n }\n\n function filtered(nodes, selector) {\n return selector == null ? $(nodes) : $(nodes).filter(selector)\n }\n\n $.contains = document.documentElement.contains ?\n function(parent, node) {\n return parent !== node && parent.contains(node)\n } :\n function(parent, node) {\n while (node && (node = node.parentNode))\n if (node === parent) return true\n return false\n }\n\n function funcArg(context, arg, idx, payload) {\n return isFunction(arg) ? arg.call(context, idx, payload) : arg\n }\n\n function setAttribute(node, name, value) {\n value == null ? node.removeAttribute(name) : node.setAttribute(name, value)\n }\n\n // access className property while respecting SVGAnimatedString\n function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }\n\n // \"true\" => true\n // \"false\" => false\n // \"null\" => null\n // \"42\" => 42\n // \"42.5\" => 42.5\n // \"08\" => \"08\"\n // JSON => parse if valid\n // String => self\n function deserializeValue(value) {\n try {\n return value ?\n value == \"true\" ||\n ( value == \"false\" ? false :\n value == \"null\" ? null :\n +value + \"\" == value ? +value :\n /^[\\[\\{]/.test(value) ? $.parseJSON(value) :\n value )\n : value\n } catch(e) {\n return value\n }\n }\n\n $.type = type\n $.isFunction = isFunction\n $.isWindow = isWindow\n $.isArray = isArray\n $.isPlainObject = isPlainObject\n\n $.isEmptyObject = function(obj) {\n var name\n for (name in obj) return false\n return true\n }\n\n $.isNumeric = function(val) {\n var num = Number(val), type = typeof val\n return val != null && type != 'boolean' &&\n (type != 'string' || val.length) &&\n !isNaN(num) && isFinite(num) || false\n }\n\n $.inArray = function(elem, array, i){\n return emptyArray.indexOf.call(array, elem, i)\n }\n\n $.camelCase = camelize\n $.trim = function(str) {\n return str == null ? \"\" : String.prototype.trim.call(str)\n }\n\n // plugin compatibility\n $.uuid = 0\n $.support = { }\n $.expr = { }\n $.noop = function() {}\n\n $.map = function(elements, callback){\n var value, values = [], i, key\n if (likeArray(elements))\n for (i = 0; i < elements.length; i++) {\n value = callback(elements[i], i)\n if (value != null) values.push(value)\n }\n else\n for (key in elements) {\n value = callback(elements[key], key)\n if (value != null) values.push(value)\n }\n return flatten(values)\n }\n\n $.each = function(elements, callback){\n var i, key\n if (likeArray(elements)) {\n for (i = 0; i < elements.length; i++)\n if (callback.call(elements[i], i, elements[i]) === false) return elements\n } else {\n for (key in elements)\n if (callback.call(elements[key], key, elements[key]) === false) return elements\n }\n\n return elements\n }\n\n $.grep = function(elements, callback){\n return filter.call(elements, callback)\n }\n\n if (window.JSON) $.parseJSON = JSON.parse\n\n // Populate the class2type map\n $.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), function(i, name) {\n class2type[ \"[object \" + name + \"]\" ] = name.toLowerCase()\n })\n\n // Define methods that will be available on all\n // Zepto collections\n $.fn = {\n constructor: zepto.Z,\n length: 0,\n\n // Because a collection acts like an array\n // copy over these useful array functions.\n forEach: emptyArray.forEach,\n reduce: emptyArray.reduce,\n push: emptyArray.push,\n sort: emptyArray.sort,\n splice: emptyArray.splice,\n indexOf: emptyArray.indexOf,\n concat: function(){\n var i, value, args = []\n for (i = 0; i < arguments.length; i++) {\n value = arguments[i]\n args[i] = zepto.isZ(value) ? value.toArray() : value\n }\n return concat.apply(zepto.isZ(this) ? this.toArray() : this, args)\n },\n\n // `map` and `slice` in the jQuery API work differently\n // from their array counterparts\n map: function(fn){\n return $($.map(this, function(el, i){ return fn.call(el, i, el) }))\n },\n slice: function(){\n return $(slice.apply(this, arguments))\n },\n\n ready: function(callback){\n // need to check if document.body exists for IE as that browser reports\n // document ready when it hasn't yet created the body element\n if (readyRE.test(document.readyState) && document.body) callback($)\n else document.addEventListener('DOMContentLoaded', function(){ callback($) }, false)\n return this\n },\n get: function(idx){\n return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length]\n },\n toArray: function(){ return this.get() },\n size: function(){\n return this.length\n },\n remove: function(){\n return this.each(function(){\n if (this.parentNode != null)\n this.parentNode.removeChild(this)\n })\n },\n each: function(callback){\n emptyArray.every.call(this, function(el, idx){\n return callback.call(el, idx, el) !== false\n })\n return this\n },\n filter: function(selector){\n if (isFunction(selector)) return this.not(this.not(selector))\n return $(filter.call(this, function(element){\n return zepto.matches(element, selector)\n }))\n },\n add: function(selector,context){\n return $(uniq(this.concat($(selector,context))))\n },\n is: function(selector){\n return this.length > 0 && zepto.matches(this[0], selector)\n },\n not: function(selector){\n var nodes=[]\n if (isFunction(selector) && selector.call !== undefined)\n this.each(function(idx){\n if (!selector.call(this,idx)) nodes.push(this)\n })\n else {\n var excludes = typeof selector == 'string' ? this.filter(selector) :\n (likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector)\n this.forEach(function(el){\n if (excludes.indexOf(el) < 0) nodes.push(el)\n })\n }\n return $(nodes)\n },\n has: function(selector){\n return this.filter(function(){\n return isObject(selector) ?\n $.contains(this, selector) :\n $(this).find(selector).size()\n })\n },\n eq: function(idx){\n return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1)\n },\n first: function(){\n var el = this[0]\n return el && !isObject(el) ? el : $(el)\n },\n last: function(){\n var el = this[this.length - 1]\n return el && !isObject(el) ? el : $(el)\n },\n find: function(selector){\n var result, $this = this\n if (!selector) result = $()\n else if (typeof selector == 'object')\n result = $(selector).filter(function(){\n var node = this\n return emptyArray.some.call($this, function(parent){\n return $.contains(parent, node)\n })\n })\n else if (this.length == 1) result = $(zepto.qsa(this[0], selector))\n else result = this.map(function(){ return zepto.qsa(this, selector) })\n return result\n },\n closest: function(selector, context){\n var nodes = [], collection = typeof selector == 'object' && $(selector)\n this.each(function(_, node){\n while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector)))\n node = node !== context && !isDocument(node) && node.parentNode\n if (node && nodes.indexOf(node) < 0) nodes.push(node)\n })\n return $(nodes)\n },\n parents: function(selector){\n var ancestors = [], nodes = this\n while (nodes.length > 0)\n nodes = $.map(nodes, function(node){\n if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) {\n ancestors.push(node)\n return node\n }\n })\n return filtered(ancestors, selector)\n },\n parent: function(selector){\n return filtered(uniq(this.pluck('parentNode')), selector)\n },\n children: function(selector){\n return filtered(this.map(function(){ return children(this) }), selector)\n },\n contents: function() {\n return this.map(function() { return this.contentDocument || slice.call(this.childNodes) })\n },\n siblings: function(selector){\n return filtered(this.map(function(i, el){\n return filter.call(children(el.parentNode), function(child){ return child!==el })\n }), selector)\n },\n empty: function(){\n return this.each(function(){ this.innerHTML = '' })\n },\n // `pluck` is borrowed from Prototype.js\n pluck: function(property){\n return $.map(this, function(el){ return el[property] })\n },\n show: function(){\n return this.each(function(){\n this.style.display == \"none\" && (this.style.display = '')\n if (getComputedStyle(this, '').getPropertyValue(\"display\") == \"none\")\n this.style.display = defaultDisplay(this.nodeName)\n })\n },\n replaceWith: function(newContent){\n return this.before(newContent).remove()\n },\n wrap: function(structure){\n var func = isFunction(structure)\n if (this[0] && !func)\n var dom = $(structure).get(0),\n clone = dom.parentNode || this.length > 1\n\n return this.each(function(index){\n $(this).wrapAll(\n func ? structure.call(this, index) :\n clone ? dom.cloneNode(true) : dom\n )\n })\n },\n wrapAll: function(structure){\n if (this[0]) {\n $(this[0]).before(structure = $(structure))\n var children\n // drill down to the inmost element\n while ((children = structure.children()).length) structure = children.first()\n $(structure).append(this)\n }\n return this\n },\n wrapInner: function(structure){\n var func = isFunction(structure)\n return this.each(function(index){\n var self = $(this), contents = self.contents(),\n dom = func ? structure.call(this, index) : structure\n contents.length ? contents.wrapAll(dom) : self.append(dom)\n })\n },\n unwrap: function(){\n this.parent().each(function(){\n $(this).replaceWith($(this).children())\n })\n return this\n },\n clone: function(){\n return this.map(function(){ return this.cloneNode(true) })\n },\n hide: function(){\n return this.css(\"display\", \"none\")\n },\n toggle: function(setting){\n return this.each(function(){\n var el = $(this)\n ;(setting === undefined ? el.css(\"display\") == \"none\" : setting) ? el.show() : el.hide()\n })\n },\n prev: function(selector){ return $(this.pluck('previousElementSibling')).filter(selector || '*') },\n next: function(selector){ return $(this.pluck('nextElementSibling')).filter(selector || '*') },\n html: function(html){\n return 0 in arguments ?\n this.each(function(idx){\n var originHtml = this.innerHTML\n $(this).empty().append( funcArg(this, html, idx, originHtml) )\n }) :\n (0 in this ? this[0].innerHTML : null)\n },\n text: function(text){\n return 0 in arguments ?\n this.each(function(idx){\n var newText = funcArg(this, text, idx, this.textContent)\n this.textContent = newText == null ? '' : ''+newText\n }) :\n (0 in this ? this.pluck('textContent').join(\"\") : null)\n },\n attr: function(name, value){\n var result\n return (typeof name == 'string' && !(1 in arguments)) ?\n (0 in this && this[0].nodeType == 1 && (result = this[0].getAttribute(name)) != null ? result : undefined) :\n this.each(function(idx){\n if (this.nodeType !== 1) return\n if (isObject(name)) for (key in name) setAttribute(this, key, name[key])\n else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name)))\n })\n },\n removeAttr: function(name){\n return this.each(function(){ this.nodeType === 1 && name.split(' ').forEach(function(attribute){\n setAttribute(this, attribute)\n }, this)})\n },\n prop: function(name, value){\n name = propMap[name] || name\n return (1 in arguments) ?\n this.each(function(idx){\n this[name] = funcArg(this, value, idx, this[name])\n }) :\n (this[0] && this[0][name])\n },\n removeProp: function(name){\n name = propMap[name] || name\n return this.each(function(){ delete this[name] })\n },\n data: function(name, value){\n var attrName = 'data-' + name.replace(capitalRE, '-$1').toLowerCase()\n\n var data = (1 in arguments) ?\n this.attr(attrName, value) :\n this.attr(attrName)\n\n return data !== null ? deserializeValue(data) : undefined\n },\n val: function(value){\n if (0 in arguments) {\n if (value == null) value = \"\"\n return this.each(function(idx){\n this.value = funcArg(this, value, idx, this.value)\n })\n } else {\n return this[0] && (this[0].multiple ?\n $(this[0]).find('option').filter(function(){ return this.selected }).pluck('value') :\n this[0].value)\n }\n },\n offset: function(coordinates){\n if (coordinates) return this.each(function(index){\n var $this = $(this),\n coords = funcArg(this, coordinates, index, $this.offset()),\n parentOffset = $this.offsetParent().offset(),\n props = {\n top: coords.top - parentOffset.top,\n left: coords.left - parentOffset.left\n }\n\n if ($this.css('position') == 'static') props['position'] = 'relative'\n $this.css(props)\n })\n if (!this.length) return null\n if (document.documentElement !== this[0] && !$.contains(document.documentElement, this[0]))\n return {top: 0, left: 0}\n var obj = this[0].getBoundingClientRect()\n return {\n left: obj.left + window.pageXOffset,\n top: obj.top + window.pageYOffset,\n width: Math.round(obj.width),\n height: Math.round(obj.height)\n }\n },\n css: function(property, value){\n if (arguments.length < 2) {\n var element = this[0]\n if (typeof property == 'string') {\n if (!element) return\n return element.style[camelize(property)] || getComputedStyle(element, '').getPropertyValue(property)\n } else if (isArray(property)) {\n if (!element) return\n var props = {}\n var computedStyle = getComputedStyle(element, '')\n $.each(property, function(_, prop){\n props[prop] = (element.style[camelize(prop)] || computedStyle.getPropertyValue(prop))\n })\n return props\n }\n }\n\n var css = ''\n if (type(property) == 'string') {\n if (!value && value !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(property)) })\n else\n css = dasherize(property) + \":\" + maybeAddPx(property, value)\n } else {\n for (key in property)\n if (!property[key] && property[key] !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(key)) })\n else\n css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';'\n }\n\n return this.each(function(){ this.style.cssText += ';' + css })\n },\n index: function(element){\n return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0])\n },\n hasClass: function(name){\n if (!name) return false\n return emptyArray.some.call(this, function(el){\n return this.test(className(el))\n }, classRE(name))\n },\n addClass: function(name){\n if (!name) return this\n return this.each(function(idx){\n if (!('className' in this)) return\n classList = []\n var cls = className(this), newName = funcArg(this, name, idx, cls)\n newName.split(/\\s+/g).forEach(function(klass){\n if (!$(this).hasClass(klass)) classList.push(klass)\n }, this)\n classList.length && className(this, cls + (cls ? \" \" : \"\") + classList.join(\" \"))\n })\n },\n removeClass: function(name){\n return this.each(function(idx){\n if (!('className' in this)) return\n if (name === undefined) return className(this, '')\n classList = className(this)\n funcArg(this, name, idx, classList).split(/\\s+/g).forEach(function(klass){\n classList = classList.replace(classRE(klass), \" \")\n })\n className(this, classList.trim())\n })\n },\n toggleClass: function(name, when){\n if (!name) return this\n return this.each(function(idx){\n var $this = $(this), names = funcArg(this, name, idx, className(this))\n names.split(/\\s+/g).forEach(function(klass){\n (when === undefined ? !$this.hasClass(klass) : when) ?\n $this.addClass(klass) : $this.removeClass(klass)\n })\n })\n },\n scrollTop: function(value){\n if (!this.length) return\n var hasScrollTop = 'scrollTop' in this[0]\n if (value === undefined) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset\n return this.each(hasScrollTop ?\n function(){ this.scrollTop = value } :\n function(){ this.scrollTo(this.scrollX, value) })\n },\n scrollLeft: function(value){\n if (!this.length) return\n var hasScrollLeft = 'scrollLeft' in this[0]\n if (value === undefined) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset\n return this.each(hasScrollLeft ?\n function(){ this.scrollLeft = value } :\n function(){ this.scrollTo(value, this.scrollY) })\n },\n position: function() {\n if (!this.length) return\n\n var elem = this[0],\n // Get *real* offsetParent\n offsetParent = this.offsetParent(),\n // Get correct offsets\n offset = this.offset(),\n parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset()\n\n // Subtract element margins\n // note: when an element has margin: auto the offsetLeft and marginLeft\n // are the same in Safari causing offset.left to incorrectly be 0\n offset.top -= parseFloat( $(elem).css('margin-top') ) || 0\n offset.left -= parseFloat( $(elem).css('margin-left') ) || 0\n\n // Add offsetParent borders\n parentOffset.top += parseFloat( $(offsetParent[0]).css('border-top-width') ) || 0\n parentOffset.left += parseFloat( $(offsetParent[0]).css('border-left-width') ) || 0\n\n // Subtract the two offsets\n return {\n top: offset.top - parentOffset.top,\n left: offset.left - parentOffset.left\n }\n },\n offsetParent: function() {\n return this.map(function(){\n var parent = this.offsetParent || document.body\n while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css(\"position\") == \"static\")\n parent = parent.offsetParent\n return parent\n })\n }\n }\n\n // for now\n $.fn.detach = $.fn.remove\n\n // Generate the `width` and `height` functions\n ;['width', 'height'].forEach(function(dimension){\n var dimensionProperty =\n dimension.replace(/./, function(m){ return m[0].toUpperCase() })\n\n $.fn[dimension] = function(value){\n var offset, el = this[0]\n if (value === undefined) return isWindow(el) ? el['inner' + dimensionProperty] :\n isDocument(el) ? el.documentElement['scroll' + dimensionProperty] :\n (offset = this.offset()) && offset[dimension]\n else return this.each(function(idx){\n el = $(this)\n el.css(dimension, funcArg(this, value, idx, el[dimension]()))\n })\n }\n })\n\n function traverseNode(node, fun) {\n fun(node)\n for (var i = 0, len = node.childNodes.length; i < len; i++)\n traverseNode(node.childNodes[i], fun)\n }\n\n // Generate the `after`, `prepend`, `before`, `append`,\n // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods.\n adjacencyOperators.forEach(function(operator, operatorIndex) {\n var inside = operatorIndex % 2 //=> prepend, append\n\n $.fn[operator] = function(){\n // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings\n var argType, nodes = $.map(arguments, function(arg) {\n var arr = []\n argType = type(arg)\n if (argType == \"array\") {\n arg.forEach(function(el) {\n if (el.nodeType !== undefined) return arr.push(el)\n else if ($.zepto.isZ(el)) return arr = arr.concat(el.get())\n arr = arr.concat(zepto.fragment(el))\n })\n return arr\n }\n return argType == \"object\" || arg == null ?\n arg : zepto.fragment(arg)\n }),\n parent, copyByClone = this.length > 1\n if (nodes.length < 1) return this\n\n return this.each(function(_, target){\n parent = inside ? target : target.parentNode\n\n // convert all methods to a \"before\" operation\n target = operatorIndex == 0 ? target.nextSibling :\n operatorIndex == 1 ? target.firstChild :\n operatorIndex == 2 ? target :\n null\n\n var parentInDocument = $.contains(document.documentElement, parent)\n\n nodes.forEach(function(node){\n if (copyByClone) node = node.cloneNode(true)\n else if (!parent) return $(node).remove()\n\n parent.insertBefore(node, target)\n if (parentInDocument) traverseNode(node, function(el){\n if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' &&\n (!el.type || el.type === 'text/javascript') && !el.src){\n var target = el.ownerDocument ? el.ownerDocument.defaultView : window\n target['eval'].call(target, el.innerHTML)\n }\n })\n })\n })\n }\n\n // after => insertAfter\n // prepend => prependTo\n // before => insertBefore\n // append => appendTo\n $.fn[inside ? operator+'To' : 'insert'+(operatorIndex ? 'Before' : 'After')] = function(html){\n $(html)[operator](this)\n return this\n }\n })\n\n zepto.Z.prototype = Z.prototype = $.fn\n\n // Export internal API functions in the `$.zepto` namespace\n zepto.uniq = uniq\n zepto.deserializeValue = deserializeValue\n $.zepto = zepto\n\n return $\n})()\n\nwindow.Zepto = Zepto\nwindow.$ === undefined && (window.$ = Zepto)\n\n;(function($){\n var _zid = 1, undefined,\n slice = Array.prototype.slice,\n isFunction = $.isFunction,\n isString = function(obj){ return typeof obj == 'string' },\n handlers = {},\n specialEvents={},\n focusinSupported = 'onfocusin' in window,\n focus = { focus: 'focusin', blur: 'focusout' },\n hover = { mouseenter: 'mouseover', mouseleave: 'mouseout' }\n\n specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents'\n\n function zid(element) {\n return element._zid || (element._zid = _zid++)\n }\n function findHandlers(element, event, fn, selector) {\n event = parse(event)\n if (event.ns) var matcher = matcherFor(event.ns)\n return (handlers[zid(element)] || []).filter(function(handler) {\n return handler\n && (!event.e || handler.e == event.e)\n && (!event.ns || matcher.test(handler.ns))\n && (!fn || zid(handler.fn) === zid(fn))\n && (!selector || handler.sel == selector)\n })\n }\n function parse(event) {\n var parts = ('' + event).split('.')\n return {e: parts[0], ns: parts.slice(1).sort().join(' ')}\n }\n function matcherFor(ns) {\n return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)')\n }\n\n function eventCapture(handler, captureSetting) {\n return handler.del &&\n (!focusinSupported && (handler.e in focus)) ||\n !!captureSetting\n }\n\n function realEvent(type) {\n return hover[type] || (focusinSupported && focus[type]) || type\n }\n\n function add(element, events, fn, data, selector, delegator, capture){\n var id = zid(element), set = (handlers[id] || (handlers[id] = []))\n events.split(/\\s/).forEach(function(event){\n if (event == 'ready') return $(document).ready(fn)\n var handler = parse(event)\n handler.fn = fn\n handler.sel = selector\n // emulate mouseenter, mouseleave\n if (handler.e in hover) fn = function(e){\n var related = e.relatedTarget\n if (!related || (related !== this && !$.contains(this, related)))\n return handler.fn.apply(this, arguments)\n }\n handler.del = delegator\n var callback = delegator || fn\n handler.proxy = function(e){\n e = compatible(e)\n if (e.isImmediatePropagationStopped()) return\n e.data = data\n var result = callback.apply(element, e._args == undefined ? [e] : [e].concat(e._args))\n if (result === false) e.preventDefault(), e.stopPropagation()\n return result\n }\n handler.i = set.length\n set.push(handler)\n if ('addEventListener' in element)\n element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n }\n function remove(element, events, fn, selector, capture){\n var id = zid(element)\n ;(events || '').split(/\\s/).forEach(function(event){\n findHandlers(element, event, fn, selector).forEach(function(handler){\n delete handlers[id][handler.i]\n if ('removeEventListener' in element)\n element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n })\n }\n\n $.event = { add: add, remove: remove }\n\n $.proxy = function(fn, context) {\n var args = (2 in arguments) && slice.call(arguments, 2)\n if (isFunction(fn)) {\n var proxyFn = function(){ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments) }\n proxyFn._zid = zid(fn)\n return proxyFn\n } else if (isString(context)) {\n if (args) {\n args.unshift(fn[context], fn)\n return $.proxy.apply(null, args)\n } else {\n return $.proxy(fn[context], fn)\n }\n } else {\n throw new TypeError(\"expected function\")\n }\n }\n\n $.fn.bind = function(event, data, callback){\n return this.on(event, data, callback)\n }\n $.fn.unbind = function(event, callback){\n return this.off(event, callback)\n }\n $.fn.one = function(event, selector, data, callback){\n return this.on(event, selector, data, callback, 1)\n }\n\n var returnTrue = function(){return true},\n returnFalse = function(){return false},\n ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,\n eventMethods = {\n preventDefault: 'isDefaultPrevented',\n stopImmediatePropagation: 'isImmediatePropagationStopped',\n stopPropagation: 'isPropagationStopped'\n }\n\n function compatible(event, source) {\n if (source || !event.isDefaultPrevented) {\n source || (source = event)\n\n $.each(eventMethods, function(name, predicate) {\n var sourceMethod = source[name]\n event[name] = function(){\n this[predicate] = returnTrue\n return sourceMethod && sourceMethod.apply(source, arguments)\n }\n event[predicate] = returnFalse\n })\n\n event.timeStamp || (event.timeStamp = Date.now())\n\n if (source.defaultPrevented !== undefined ? source.defaultPrevented :\n 'returnValue' in source ? source.returnValue === false :\n source.getPreventDefault && source.getPreventDefault())\n event.isDefaultPrevented = returnTrue\n }\n return event\n }\n\n function createProxy(event) {\n var key, proxy = { originalEvent: event }\n for (key in event)\n if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key]\n\n return compatible(proxy, event)\n }\n\n $.fn.delegate = function(selector, event, callback){\n return this.on(event, selector, callback)\n }\n $.fn.undelegate = function(selector, event, callback){\n return this.off(event, selector, callback)\n }\n\n $.fn.live = function(event, callback){\n $(document.body).delegate(this.selector, event, callback)\n return this\n }\n $.fn.die = function(event, callback){\n $(document.body).undelegate(this.selector, event, callback)\n return this\n }\n\n $.fn.on = function(event, selector, data, callback, one){\n var autoRemove, delegator, $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.on(type, selector, data, fn, one)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = data, data = selector, selector = undefined\n if (callback === undefined || data === false)\n callback = data, data = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(_, element){\n if (one) autoRemove = function(e){\n remove(element, e.type, callback)\n return callback.apply(this, arguments)\n }\n\n if (selector) delegator = function(e){\n var evt, match = $(e.target).closest(selector, element).get(0)\n if (match && match !== element) {\n evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element})\n return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1)))\n }\n }\n\n add(element, event, callback, data, selector, delegator || autoRemove)\n })\n }\n $.fn.off = function(event, selector, callback){\n var $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.off(type, selector, fn)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = selector, selector = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(){\n remove(this, event, callback, selector)\n })\n }\n\n $.fn.trigger = function(event, args){\n event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event)\n event._args = args\n return this.each(function(){\n // handle focus(), blur() by calling them directly\n if (event.type in focus && typeof this[event.type] == \"function\") this[event.type]()\n // items in the collection might not be DOM elements\n else if ('dispatchEvent' in this) this.dispatchEvent(event)\n else $(this).triggerHandler(event, args)\n })\n }\n\n // triggers event handlers on current element just as if an event occurred,\n // doesn't trigger an actual event, doesn't bubble\n $.fn.triggerHandler = function(event, args){\n var e, result\n this.each(function(i, element){\n e = createProxy(isString(event) ? $.Event(event) : event)\n e._args = args\n e.target = element\n $.each(findHandlers(element, event.type || event), function(i, handler){\n result = handler.proxy(e)\n if (e.isImmediatePropagationStopped()) return false\n })\n })\n return result\n }\n\n // shortcut methods for `.bind(event, fn)` for each event type\n ;('focusin focusout focus blur load resize scroll unload click dblclick '+\n 'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+\n 'change select keydown keypress keyup error').split(' ').forEach(function(event) {\n $.fn[event] = function(callback) {\n return (0 in arguments) ?\n this.bind(event, callback) :\n this.trigger(event)\n }\n })\n\n $.Event = function(type, props) {\n if (!isString(type)) props = type, type = props.type\n var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true\n if (props) for (var name in props) (name == 'bubbles') ? (bubbles = !!props[name]) : (event[name] = props[name])\n event.initEvent(type, bubbles, true)\n return compatible(event)\n }\n\n})(Zepto)\n\n;(function($){\n var jsonpID = +new Date(),\n document = window.document,\n key,\n name,\n rscript = /)<[^<]*)*<\\/script>/gi,\n scriptTypeRE = /^(?:text|application)\\/javascript/i,\n xmlTypeRE = /^(?:text|application)\\/xml/i,\n jsonType = 'application/json',\n htmlType = 'text/html',\n blankRE = /^\\s*$/,\n originAnchor = document.createElement('a')\n\n originAnchor.href = window.location.href\n\n // trigger a custom event and return false if it was cancelled\n function triggerAndReturn(context, eventName, data) {\n var event = $.Event(eventName)\n $(context).trigger(event, data)\n return !event.isDefaultPrevented()\n }\n\n // trigger an Ajax \"global\" event\n function triggerGlobal(settings, context, eventName, data) {\n if (settings.global) return triggerAndReturn(context || document, eventName, data)\n }\n\n // Number of active Ajax requests\n $.active = 0\n\n function ajaxStart(settings) {\n if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart')\n }\n function ajaxStop(settings) {\n if (settings.global && !(--$.active)) triggerGlobal(settings, null, 'ajaxStop')\n }\n\n // triggers an extra global event \"ajaxBeforeSend\" that's like \"ajaxSend\" but cancelable\n function ajaxBeforeSend(xhr, settings) {\n var context = settings.context\n if (settings.beforeSend.call(context, xhr, settings) === false ||\n triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false)\n return false\n\n triggerGlobal(settings, context, 'ajaxSend', [xhr, settings])\n }\n function ajaxSuccess(data, xhr, settings, deferred) {\n var context = settings.context, status = 'success'\n settings.success.call(context, data, status, xhr)\n if (deferred) deferred.resolveWith(context, [data, status, xhr])\n triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data])\n ajaxComplete(status, xhr, settings)\n }\n // type: \"timeout\", \"error\", \"abort\", \"parsererror\"\n function ajaxError(error, type, xhr, settings, deferred) {\n var context = settings.context\n settings.error.call(context, xhr, type, error)\n if (deferred) deferred.rejectWith(context, [xhr, type, error])\n triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error || type])\n ajaxComplete(type, xhr, settings)\n }\n // status: \"success\", \"notmodified\", \"error\", \"timeout\", \"abort\", \"parsererror\"\n function ajaxComplete(status, xhr, settings) {\n var context = settings.context\n settings.complete.call(context, xhr, status)\n triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings])\n ajaxStop(settings)\n }\n\n function ajaxDataFilter(data, type, settings) {\n if (settings.dataFilter == empty) return data\n var context = settings.context\n return settings.dataFilter.call(context, data, type)\n }\n\n // Empty function, used as default callback\n function empty() {}\n\n $.ajaxJSONP = function(options, deferred){\n if (!('type' in options)) return $.ajax(options)\n\n var _callbackName = options.jsonpCallback,\n callbackName = ($.isFunction(_callbackName) ?\n _callbackName() : _callbackName) || ('Zepto' + (jsonpID++)),\n script = document.createElement('script'),\n originalCallback = window[callbackName],\n responseData,\n abort = function(errorType) {\n $(script).triggerHandler('error', errorType || 'abort')\n },\n xhr = { abort: abort }, abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n $(script).on('load error', function(e, errorType){\n clearTimeout(abortTimeout)\n $(script).off().remove()\n\n if (e.type == 'error' || !responseData) {\n ajaxError(null, errorType || 'error', xhr, options, deferred)\n } else {\n ajaxSuccess(responseData[0], xhr, options, deferred)\n }\n\n window[callbackName] = originalCallback\n if (responseData && $.isFunction(originalCallback))\n originalCallback(responseData[0])\n\n originalCallback = responseData = undefined\n })\n\n if (ajaxBeforeSend(xhr, options) === false) {\n abort('abort')\n return xhr\n }\n\n window[callbackName] = function(){\n responseData = arguments\n }\n\n script.src = options.url.replace(/\\?(.+)=\\?/, '?$1=' + callbackName)\n document.head.appendChild(script)\n\n if (options.timeout > 0) abortTimeout = setTimeout(function(){\n abort('timeout')\n }, options.timeout)\n\n return xhr\n }\n\n $.ajaxSettings = {\n // Default type of request\n type: 'GET',\n // Callback that is executed before request\n beforeSend: empty,\n // Callback that is executed if the request succeeds\n success: empty,\n // Callback that is executed the the server drops error\n error: empty,\n // Callback that is executed on request complete (both: error and success)\n complete: empty,\n // The context for the callbacks\n context: null,\n // Whether to trigger \"global\" Ajax events\n global: true,\n // Transport\n xhr: function () {\n return new window.XMLHttpRequest()\n },\n // MIME types mapping\n // IIS returns Javascript as \"application/x-javascript\"\n accepts: {\n script: 'text/javascript, application/javascript, application/x-javascript',\n json: jsonType,\n xml: 'application/xml, text/xml',\n html: htmlType,\n text: 'text/plain'\n },\n // Whether the request is to another domain\n crossDomain: false,\n // Default timeout\n timeout: 0,\n // Whether data should be serialized to string\n processData: true,\n // Whether the browser should be allowed to cache GET responses\n cache: true,\n //Used to handle the raw response data of XMLHttpRequest.\n //This is a pre-filtering function to sanitize the response.\n //The sanitized response should be returned\n dataFilter: empty\n }\n\n function mimeToDataType(mime) {\n if (mime) mime = mime.split(';', 2)[0]\n return mime && ( mime == htmlType ? 'html' :\n mime == jsonType ? 'json' :\n scriptTypeRE.test(mime) ? 'script' :\n xmlTypeRE.test(mime) && 'xml' ) || 'text'\n }\n\n function appendQuery(url, query) {\n if (query == '') return url\n return (url + '&' + query).replace(/[&?]{1,2}/, '?')\n }\n\n // serialize payload and append it to the URL for GET requests\n function serializeData(options) {\n if (options.processData && options.data && $.type(options.data) != \"string\")\n options.data = $.param(options.data, options.traditional)\n if (options.data && (!options.type || options.type.toUpperCase() == 'GET' || 'jsonp' == options.dataType))\n options.url = appendQuery(options.url, options.data), options.data = undefined\n }\n\n $.ajax = function(options){\n var settings = $.extend({}, options || {}),\n deferred = $.Deferred && $.Deferred(),\n urlAnchor, hashIndex\n for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key]\n\n ajaxStart(settings)\n\n if (!settings.crossDomain) {\n urlAnchor = document.createElement('a')\n urlAnchor.href = settings.url\n // cleans up URL for .href (IE only), see https://github.com/madrobby/zepto/pull/1049\n urlAnchor.href = urlAnchor.href\n settings.crossDomain = (originAnchor.protocol + '//' + originAnchor.host) !== (urlAnchor.protocol + '//' + urlAnchor.host)\n }\n\n if (!settings.url) settings.url = window.location.toString()\n if ((hashIndex = settings.url.indexOf('#')) > -1) settings.url = settings.url.slice(0, hashIndex)\n serializeData(settings)\n\n var dataType = settings.dataType, hasPlaceholder = /\\?.+=\\?/.test(settings.url)\n if (hasPlaceholder) dataType = 'jsonp'\n\n if (settings.cache === false || (\n (!options || options.cache !== true) &&\n ('script' == dataType || 'jsonp' == dataType)\n ))\n settings.url = appendQuery(settings.url, '_=' + Date.now())\n\n if ('jsonp' == dataType) {\n if (!hasPlaceholder)\n settings.url = appendQuery(settings.url,\n settings.jsonp ? (settings.jsonp + '=?') : settings.jsonp === false ? '' : 'callback=?')\n return $.ajaxJSONP(settings, deferred)\n }\n\n var mime = settings.accepts[dataType],\n headers = { },\n setHeader = function(name, value) { headers[name.toLowerCase()] = [name, value] },\n protocol = /^([\\w-]+:)\\/\\//.test(settings.url) ? RegExp.$1 : window.location.protocol,\n xhr = settings.xhr(),\n nativeSetHeader = xhr.setRequestHeader,\n abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n if (!settings.crossDomain) setHeader('X-Requested-With', 'XMLHttpRequest')\n setHeader('Accept', mime || '*/*')\n if (mime = settings.mimeType || mime) {\n if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0]\n xhr.overrideMimeType && xhr.overrideMimeType(mime)\n }\n if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET'))\n setHeader('Content-Type', settings.contentType || 'application/x-www-form-urlencoded')\n\n if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name])\n xhr.setRequestHeader = setHeader\n\n xhr.onreadystatechange = function(){\n if (xhr.readyState == 4) {\n xhr.onreadystatechange = empty\n clearTimeout(abortTimeout)\n var result, error = false\n if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) {\n dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader('content-type'))\n\n if (xhr.responseType == 'arraybuffer' || xhr.responseType == 'blob')\n result = xhr.response\n else {\n result = xhr.responseText\n\n try {\n // http://perfectionkills.com/global-eval-what-are-the-options/\n // sanitize response accordingly if data filter callback provided\n result = ajaxDataFilter(result, dataType, settings)\n if (dataType == 'script') (1,eval)(result)\n else if (dataType == 'xml') result = xhr.responseXML\n else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result)\n } catch (e) { error = e }\n\n if (error) return ajaxError(error, 'parsererror', xhr, settings, deferred)\n }\n\n ajaxSuccess(result, xhr, settings, deferred)\n } else {\n ajaxError(xhr.statusText || null, xhr.status ? 'error' : 'abort', xhr, settings, deferred)\n }\n }\n }\n\n if (ajaxBeforeSend(xhr, settings) === false) {\n xhr.abort()\n ajaxError(null, 'abort', xhr, settings, deferred)\n return xhr\n }\n\n var async = 'async' in settings ? settings.async : true\n xhr.open(settings.type, settings.url, async, settings.username, settings.password)\n\n if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name]\n\n for (name in headers) nativeSetHeader.apply(xhr, headers[name])\n\n if (settings.timeout > 0) abortTimeout = setTimeout(function(){\n xhr.onreadystatechange = empty\n xhr.abort()\n ajaxError(null, 'timeout', xhr, settings, deferred)\n }, settings.timeout)\n\n // avoid sending empty string (#319)\n xhr.send(settings.data ? settings.data : null)\n return xhr\n }\n\n // handle optional data/success arguments\n function parseArguments(url, data, success, dataType) {\n if ($.isFunction(data)) dataType = success, success = data, data = undefined\n if (!$.isFunction(success)) dataType = success, success = undefined\n return {\n url: url\n , data: data\n , success: success\n , dataType: dataType\n }\n }\n\n $.get = function(/* url, data, success, dataType */){\n return $.ajax(parseArguments.apply(null, arguments))\n }\n\n $.post = function(/* url, data, success, dataType */){\n var options = parseArguments.apply(null, arguments)\n options.type = 'POST'\n return $.ajax(options)\n }\n\n $.getJSON = function(/* url, data, success */){\n var options = parseArguments.apply(null, arguments)\n options.dataType = 'json'\n return $.ajax(options)\n }\n\n $.fn.load = function(url, data, success){\n if (!this.length) return this\n var self = this, parts = url.split(/\\s/), selector,\n options = parseArguments(url, data, success),\n callback = options.success\n if (parts.length > 1) options.url = parts[0], selector = parts[1]\n options.success = function(response){\n self.html(selector ?\n $('
').html(response.replace(rscript, \"\")).find(selector)\n : response)\n callback && callback.apply(self, arguments)\n }\n $.ajax(options)\n return this\n }\n\n var escape = encodeURIComponent\n\n function serialize(params, obj, traditional, scope){\n var type, array = $.isArray(obj), hash = $.isPlainObject(obj)\n $.each(obj, function(key, value) {\n type = $.type(value)\n if (scope) key = traditional ? scope :\n scope + '[' + (hash || type == 'object' || type == 'array' ? key : '') + ']'\n // handle data in serializeArray() format\n if (!scope && array) params.add(value.name, value.value)\n // recurse into nested objects\n else if (type == \"array\" || (!traditional && type == \"object\"))\n serialize(params, value, traditional, key)\n else params.add(key, value)\n })\n }\n\n $.param = function(obj, traditional){\n var params = []\n params.add = function(key, value) {\n if ($.isFunction(value)) value = value()\n if (value == null) value = \"\"\n this.push(escape(key) + '=' + escape(value))\n }\n serialize(params, obj, traditional)\n return params.join('&').replace(/%20/g, '+')\n }\n})(Zepto)\n\n;(function($){\n $.fn.serializeArray = function() {\n var name, type, result = [],\n add = function(value) {\n if (value.forEach) return value.forEach(add)\n result.push({ name: name, value: value })\n }\n if (this[0]) $.each(this[0].elements, function(_, field){\n type = field.type, name = field.name\n if (name && field.nodeName.toLowerCase() != 'fieldset' &&\n !field.disabled && type != 'submit' && type != 'reset' && type != 'button' && type != 'file' &&\n ((type != 'radio' && type != 'checkbox') || field.checked))\n add($(field).val())\n })\n return result\n }\n\n $.fn.serialize = function(){\n var result = []\n this.serializeArray().forEach(function(elm){\n result.push(encodeURIComponent(elm.name) + '=' + encodeURIComponent(elm.value))\n })\n return result.join('&')\n }\n\n $.fn.submit = function(callback) {\n if (0 in arguments) this.bind('submit', callback)\n else if (this.length) {\n var event = $.Event('submit')\n this.eq(0).trigger(event)\n if (!event.isDefaultPrevented()) this.get(0).submit()\n }\n return this\n }\n\n})(Zepto)\n\n;(function(){\n // getComputedStyle shouldn't freak out when called\n // without a valid element as argument\n try {\n getComputedStyle(undefined)\n } catch(e) {\n var nativeGetComputedStyle = getComputedStyle\n window.getComputedStyle = function(element, pseudoElement){\n try {\n return nativeGetComputedStyle(element, pseudoElement)\n } catch(e) {\n return null\n }\n }\n }\n})()\n return Zepto\n}))\n\n}.call(window));","module.exports = global[\"moment\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\expose-loader\\\\index.js?dayjs!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\dayjs.min.js\");","module.exports = global[\"dayjs\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\dayjs.min.js\");","!function(t,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=n():\"function\"==typeof define&&define.amd?define(n):t.dayjs=n()}(this,function(){\"use strict\";var t=\"millisecond\",n=\"second\",e=\"minute\",r=\"hour\",i=\"day\",s=\"week\",u=\"month\",a=\"quarter\",o=\"year\",h=/^(\\d{4})-?(\\d{1,2})-?(\\d{0,2})[^0-9]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?.?(\\d{1,3})?$/,f=/\\[([^\\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,c=function(t,n,e){var r=String(t);return!r||r.length>=n?t:\"\"+Array(n+1-r.length).join(e)+t},d={s:c,z:function(t){var n=-t.utcOffset(),e=Math.abs(n),r=Math.floor(e/60),i=e%60;return(n<=0?\"+\":\"-\")+c(r,2,\"0\")+\":\"+c(i,2,\"0\")},m:function(t,n){var e=12*(n.year()-t.year())+(n.month()-t.month()),r=t.clone().add(e,u),i=n-r<0,s=t.clone().add(e+(i?-1:1),u);return Number(-(e+(n-r)/(i?r-s:s-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(h){return{M:u,y:o,w:s,d:i,h:r,m:e,s:n,ms:t,Q:a}[h]||String(h||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},$={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\")},l=\"en\",m={};m[l]=$;var y=function(t){return t instanceof v},M=function(t,n,e){var r;if(!t)return l;if(\"string\"==typeof t)m[t]&&(r=t),n&&(m[t]=n,r=t);else{var i=t.name;m[i]=t,r=i}return e||(l=r),r},g=function(t,n,e){if(y(t))return t.clone();var r=n?\"string\"==typeof n?{format:n,pl:e}:n:{};return r.date=t,new v(r)},D=d;D.l=M,D.i=y,D.w=function(t,n){return g(t,{locale:n.$L,utc:n.$u})};var v=function(){function c(t){this.$L=this.$L||M(t.locale,null,!0),this.parse(t)}var d=c.prototype;return d.parse=function(t){this.$d=function(t){var n=t.date,e=t.utc;if(null===n)return new Date(NaN);if(D.u(n))return new Date;if(n instanceof Date)return new Date(n);if(\"string\"==typeof n&&!/Z$/i.test(n)){var r=n.match(h);if(r)return e?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(n)}(t),this.init()},d.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},d.$utils=function(){return D},d.isValid=function(){return!(\"Invalid Date\"===this.$d.toString())},d.isSame=function(t,n){var e=g(t);return this.startOf(n)<=e&&e<=this.endOf(n)},d.isAfter=function(t,n){return g(t) element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function($window) {\n\tvar $doc = $window && $window.document\n\tvar currentRedraw\n\n\tvar nameSpace = {\n\t\tsvg: \"http://www.w3.org/2000/svg\",\n\t\tmath: \"http://www.w3.org/1998/Math/MathML\"\n\t}\n\n\tfunction getNameSpace(vnode) {\n\t\treturn vnode.attrs && vnode.attrs.xmlns || nameSpace[vnode.tag]\n\t}\n\n\t//sanity check to discourage people from doing `vnode.state = ...`\n\tfunction checkState(vnode, original) {\n\t\tif (vnode.state !== original) throw new Error(\"`vnode.state` must not be modified\")\n\t}\n\n\t//Note: the hook is passed as the `this` argument to allow proxying the\n\t//arguments without requiring a full array allocation to do so. It also\n\t//takes advantage of the fact the current `vnode` is the first argument in\n\t//all lifecycle methods.\n\tfunction callHook(vnode) {\n\t\tvar original = vnode.state\n\t\ttry {\n\t\t\treturn this.apply(original, arguments)\n\t\t} finally {\n\t\t\tcheckState(vnode, original)\n\t\t}\n\t}\n\n\t// IE11 (at least) throws an UnspecifiedError when accessing document.activeElement when\n\t// inside an iframe. Catch and swallow this error, and heavy-handidly return null.\n\tfunction activeElement() {\n\t\ttry {\n\t\t\treturn $doc.activeElement\n\t\t} catch (e) {\n\t\t\treturn null\n\t\t}\n\t}\n\t//create\n\tfunction createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) {\n\t\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t}\n\tfunction createNode(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tif (typeof tag === \"string\") {\n\t\t\tvnode.state = {}\n\t\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\t\tswitch (tag) {\n\t\t\t\tcase \"#\": createText(parent, vnode, nextSibling); break\n\t\t\t\tcase \"<\": createHTML(parent, vnode, ns, nextSibling); break\n\t\t\t\tcase \"[\": createFragment(parent, vnode, hooks, ns, nextSibling); break\n\t\t\t\tdefault: createElement(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t\telse createComponent(parent, vnode, hooks, ns, nextSibling)\n\t}\n\tfunction createText(parent, vnode, nextSibling) {\n\t\tvnode.dom = $doc.createTextNode(vnode.children)\n\t\tinsertNode(parent, vnode.dom, nextSibling)\n\t}\n\tvar possibleParents = {caption: \"table\", thead: \"table\", tbody: \"table\", tfoot: \"table\", tr: \"tbody\", th: \"tr\", td: \"tr\", colgroup: \"table\", col: \"colgroup\"}\n\tfunction createHTML(parent, vnode, ns, nextSibling) {\n\t\tvar match = vnode.children.match(/^\\s*?<(\\w+)/im) || []\n\t\t// not using the proper parent makes the child element(s) vanish.\n\t\t// var div = document.createElement(\"div\")\n\t\t// div.innerHTML = \"ij\"\n\t\t// console.log(div.innerHTML)\n\t\t// --> \"ij\", no in sight.\n\t\tvar temp = $doc.createElement(possibleParents[match[1]] || \"div\")\n\t\tif (ns === \"http://www.w3.org/2000/svg\") {\n\t\t\ttemp.innerHTML = \"\" + vnode.children + \"\"\n\t\t\ttemp = temp.firstChild\n\t\t} else {\n\t\t\ttemp.innerHTML = vnode.children\n\t\t}\n\t\tvnode.dom = temp.firstChild\n\t\tvnode.domSize = temp.childNodes.length\n\t\t// Capture nodes to remove, so we don't confuse them.\n\t\tvnode.instance = []\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tvar child\n\t\twhile (child = temp.firstChild) {\n\t\t\tvnode.instance.push(child)\n\t\t\tfragment.appendChild(child)\n\t\t}\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createFragment(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tif (vnode.children != null) {\n\t\t\tvar children = vnode.children\n\t\t\tcreateNodes(fragment, children, 0, children.length, hooks, null, ns)\n\t\t}\n\t\tvnode.dom = fragment.firstChild\n\t\tvnode.domSize = fragment.childNodes.length\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createElement(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tvar attrs = vnode.attrs\n\t\tvar is = attrs && attrs.is\n\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tvar element = ns ?\n\t\t\tis ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :\n\t\t\tis ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)\n\t\tvnode.dom = element\n\n\t\tif (attrs != null) {\n\t\t\tsetAttrs(vnode, attrs, ns)\n\t\t}\n\n\t\tinsertNode(parent, element, nextSibling)\n\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (vnode.text != null) {\n\t\t\t\tif (vnode.text !== \"\") element.textContent = vnode.text\n\t\t\t\telse vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t}\n\t\t\tif (vnode.children != null) {\n\t\t\t\tvar children = vnode.children\n\t\t\t\tcreateNodes(element, children, 0, children.length, hooks, null, ns)\n\t\t\t\tif (vnode.tag === \"select\" && attrs != null) setLateSelectAttrs(vnode, attrs)\n\t\t\t}\n\t\t}\n\t}\n\tfunction initComponent(vnode, hooks) {\n\t\tvar sentinel\n\t\tif (typeof vnode.tag.view === \"function\") {\n\t\t\tvnode.state = Object.create(vnode.tag)\n\t\t\tsentinel = vnode.state.view\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t} else {\n\t\t\tvnode.state = void 0\n\t\t\tsentinel = vnode.tag\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t\tvnode.state = (vnode.tag.prototype != null && typeof vnode.tag.prototype.view === \"function\") ? new vnode.tag(vnode) : vnode.tag(vnode)\n\t\t}\n\t\tinitLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tsentinel.$$reentrantLock$$ = null\n\t}\n\tfunction createComponent(parent, vnode, hooks, ns, nextSibling) {\n\t\tinitComponent(vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tcreateNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0\n\t\t}\n\t\telse {\n\t\t\tvnode.domSize = 0\n\t\t}\n\t}\n\n\t//update\n\t/**\n\t * @param {Element|Fragment} parent - the parent element\n\t * @param {Vnode[] | null} old - the list of vnodes of the last `render()` call for\n\t * this part of the tree\n\t * @param {Vnode[] | null} vnodes - as above, but for the current `render()` call.\n\t * @param {Function[]} hooks - an accumulator of post-render hooks (oncreate/onupdate)\n\t * @param {Element | null} nextSibling - the next DOM node if we're dealing with a\n\t * fragment that is not the last item in its\n\t * parent\n\t * @param {'svg' | 'math' | String | null} ns) - the current XML namespace, if any\n\t * @returns void\n\t */\n\t// This function diffs and patches lists of vnodes, both keyed and unkeyed.\n\t//\n\t// We will:\n\t//\n\t// 1. describe its general structure\n\t// 2. focus on the diff algorithm optimizations\n\t// 3. discuss DOM node operations.\n\n\t// ## Overview:\n\t//\n\t// The updateNodes() function:\n\t// - deals with trivial cases\n\t// - determines whether the lists are keyed or unkeyed based on the first non-null node\n\t// of each list.\n\t// - diffs them and patches the DOM if needed (that's the brunt of the code)\n\t// - manages the leftovers: after diffing, are there:\n\t// - old nodes left to remove?\n\t// \t - new nodes to insert?\n\t// \t deal with them!\n\t//\n\t// The lists are only iterated over once, with an exception for the nodes in `old` that\n\t// are visited in the fourth part of the diff and in the `removeNodes` loop.\n\n\t// ## Diffing\n\t//\n\t// Reading https://github.com/localvoid/ivi/blob/ddc09d06abaef45248e6133f7040d00d3c6be853/packages/ivi/src/vdom/implementation.ts#L617-L837\n\t// may be good for context on longest increasing subsequence-based logic for moving nodes.\n\t//\n\t// In order to diff keyed lists, one has to\n\t//\n\t// 1) match nodes in both lists, per key, and update them accordingly\n\t// 2) create the nodes present in the new list, but absent in the old one\n\t// 3) remove the nodes present in the old list, but absent in the new one\n\t// 4) figure out what nodes in 1) to move in order to minimize the DOM operations.\n\t//\n\t// To achieve 1) one can create a dictionary of keys => index (for the old list), then iterate\n\t// over the new list and for each new vnode, find the corresponding vnode in the old list using\n\t// the map.\n\t// 2) is achieved in the same step: if a new node has no corresponding entry in the map, it is new\n\t// and must be created.\n\t// For the removals, we actually remove the nodes that have been updated from the old list.\n\t// The nodes that remain in that list after 1) and 2) have been performed can be safely removed.\n\t// The fourth step is a bit more complex and relies on the longest increasing subsequence (LIS)\n\t// algorithm.\n\t//\n\t// the longest increasing subsequence is the list of nodes that can remain in place. Imagine going\n\t// from `1,2,3,4,5` to `4,5,1,2,3` where the numbers are not necessarily the keys, but the indices\n\t// corresponding to the keyed nodes in the old list (keyed nodes `e,d,c,b,a` => `b,a,e,d,c` would\n\t// match the above lists, for example).\n\t//\n\t// In there are two increasing subsequences: `4,5` and `1,2,3`, the latter being the longest. We\n\t// can update those nodes without moving them, and only call `insertNode` on `4` and `5`.\n\t//\n\t// @localvoid adapted the algo to also support node deletions and insertions (the `lis` is actually\n\t// the longest increasing subsequence *of old nodes still present in the new list*).\n\t//\n\t// It is a general algorithm that is fireproof in all circumstances, but it requires the allocation\n\t// and the construction of a `key => oldIndex` map, and three arrays (one with `newIndex => oldIndex`,\n\t// the `LIS` and a temporary one to create the LIS).\n\t//\n\t// So we cheat where we can: if the tails of the lists are identical, they are guaranteed to be part of\n\t// the LIS and can be updated without moving them.\n\t//\n\t// If two nodes are swapped, they are guaranteed not to be part of the LIS, and must be moved (with\n\t// the exception of the last node if the list is fully reversed).\n\t//\n\t// ## Finding the next sibling.\n\t//\n\t// `updateNode()` and `createNode()` expect a nextSibling parameter to perform DOM operations.\n\t// When the list is being traversed top-down, at any index, the DOM nodes up to the previous\n\t// vnode reflect the content of the new list, whereas the rest of the DOM nodes reflect the old\n\t// list. The next sibling must be looked for in the old list using `getNextSibling(... oldStart + 1 ...)`.\n\t//\n\t// In the other scenarios (swaps, upwards traversal, map-based diff),\n\t// the new vnodes list is traversed upwards. The DOM nodes at the bottom of the list reflect the\n\t// bottom part of the new vnodes list, and we can use the `v.dom` value of the previous node\n\t// as the next sibling (cached in the `nextSibling` variable).\n\n\n\t// ## DOM node moves\n\t//\n\t// In most scenarios `updateNode()` and `createNode()` perform the DOM operations. However,\n\t// this is not the case if the node moved (second and fourth part of the diff algo). We move\n\t// the old DOM nodes before updateNode runs because it enables us to use the cached `nextSibling`\n\t// variable rather than fetching it using `getNextSibling()`.\n\t//\n\t// The fourth part of the diff currently inserts nodes unconditionally, leading to issues\n\t// like #1791 and #1999. We need to be smarter about those situations where adjascent old\n\t// nodes remain together in the new list in a way that isn't covered by parts one and\n\t// three of the diff algo.\n\n\tfunction updateNodes(parent, old, vnodes, hooks, nextSibling, ns) {\n\t\tif (old === vnodes || old == null && vnodes == null) return\n\t\telse if (old == null || old.length === 0) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, ns)\n\t\telse if (vnodes == null || vnodes.length === 0) removeNodes(parent, old, 0, old.length)\n\t\telse {\n\t\t\tvar isOldKeyed = old[0] != null && old[0].key != null\n\t\t\tvar isKeyed = vnodes[0] != null && vnodes[0].key != null\n\t\t\tvar start = 0, oldStart = 0\n\t\t\tif (!isOldKeyed) while (oldStart < old.length && old[oldStart] == null) oldStart++\n\t\t\tif (!isKeyed) while (start < vnodes.length && vnodes[start] == null) start++\n\t\t\tif (isKeyed === null && isOldKeyed == null) return // both lists are full of nulls\n\t\t\tif (isOldKeyed !== isKeyed) {\n\t\t\t\tremoveNodes(parent, old, oldStart, old.length)\n\t\t\t\tcreateNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else if (!isKeyed) {\n\t\t\t\t// Don't index past the end of either list (causes deopts).\n\t\t\t\tvar commonLength = old.length < vnodes.length ? old.length : vnodes.length\n\t\t\t\t// Rewind if necessary to the first non-null index on either side.\n\t\t\t\t// We could alternatively either explicitly create or remove nodes when `start !== oldStart`\n\t\t\t\t// but that would be optimizing for sparse lists which are more rare than dense ones.\n\t\t\t\tstart = start < oldStart ? start : oldStart\n\t\t\t\tfor (; start < commonLength; start++) {\n\t\t\t\t\to = old[start]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o === v || o == null && v == null) continue\n\t\t\t\t\telse if (o == null) createNode(parent, v, hooks, ns, getNextSibling(old, start + 1, nextSibling))\n\t\t\t\t\telse if (v == null) removeNode(parent, o)\n\t\t\t\t\telse updateNode(parent, o, v, hooks, getNextSibling(old, start + 1, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\tif (old.length > commonLength) removeNodes(parent, old, start, old.length)\n\t\t\t\tif (vnodes.length > commonLength) createNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else {\n\t\t\t\t// keyed diff\n\t\t\t\tvar oldEnd = old.length - 1, end = vnodes.length - 1, map, o, v, oe, ve, topSibling\n\n\t\t\t\t// bottom-up\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t}\n\t\t\t\t// top-down\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o.key !== v.key) break\n\t\t\t\t\toldStart++, start++\n\t\t\t\t\tif (o !== v) updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\t// swaps and list reversals\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (start === end) break\n\t\t\t\t\tif (o.key !== ve.key || oe.key !== v.key) break\n\t\t\t\t\ttopSibling = getNextSibling(old, oldStart, nextSibling)\n\t\t\t\t\tmoveNodes(parent, oe, topSibling)\n\t\t\t\t\tif (oe !== v) updateNode(parent, oe, v, hooks, topSibling, ns)\n\t\t\t\t\tif (++start <= --end) moveNodes(parent, o, nextSibling)\n\t\t\t\t\tif (o !== ve) updateNode(parent, o, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldStart++; oldEnd--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t}\n\t\t\t\t// bottom up once again\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t}\n\t\t\t\tif (start > end) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\telse if (oldStart > oldEnd) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\telse {\n\t\t\t\t\t// inspired by ivi https://github.com/ivijs/ivi/ by Boris Kaul\n\t\t\t\t\tvar originalNextSibling = nextSibling, vnodesLength = end - start + 1, oldIndices = new Array(vnodesLength), li=0, i=0, pos = 2147483647, matched = 0, map, lisIndices\n\t\t\t\t\tfor (i = 0; i < vnodesLength; i++) oldIndices[i] = -1\n\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\tif (map == null) map = getKeyMap(old, oldStart, oldEnd + 1)\n\t\t\t\t\t\tve = vnodes[i]\n\t\t\t\t\t\tvar oldIndex = map[ve.key]\n\t\t\t\t\t\tif (oldIndex != null) {\n\t\t\t\t\t\t\tpos = (oldIndex < pos) ? oldIndex : -1 // becomes -1 if nodes were re-ordered\n\t\t\t\t\t\t\toldIndices[i-start] = oldIndex\n\t\t\t\t\t\t\toe = old[oldIndex]\n\t\t\t\t\t\t\told[oldIndex] = null\n\t\t\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\t\t\tmatched++\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnextSibling = originalNextSibling\n\t\t\t\t\tif (matched !== oldEnd - oldStart + 1) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\t\tif (matched === 0) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (pos === -1) {\n\t\t\t\t\t\t\t// the indices of the indices of the items that are part of the\n\t\t\t\t\t\t\t// longest increasing subsequence in the oldIndices list\n\t\t\t\t\t\t\tlisIndices = makeLisIndices(oldIndices)\n\t\t\t\t\t\t\tli = lisIndices.length - 1\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tif (lisIndices[li] === i - start) li--\n\t\t\t\t\t\t\t\t\telse moveNodes(parent, v, nextSibling)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateNode(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvar oldTag = old.tag, tag = vnode.tag\n\t\tif (oldTag === tag) {\n\t\t\tvnode.state = old.state\n\t\t\tvnode.events = old.events\n\t\t\tif (shouldNotUpdate(vnode, old)) return\n\t\t\tif (typeof oldTag === \"string\") {\n\t\t\t\tif (vnode.attrs != null) {\n\t\t\t\t\tupdateLifecycle(vnode.attrs, vnode, hooks)\n\t\t\t\t}\n\t\t\t\tswitch (oldTag) {\n\t\t\t\t\tcase \"#\": updateText(old, vnode); break\n\t\t\t\t\tcase \"<\": updateHTML(parent, old, vnode, ns, nextSibling); break\n\t\t\t\t\tcase \"[\": updateFragment(parent, old, vnode, hooks, nextSibling, ns); break\n\t\t\t\t\tdefault: updateElement(old, vnode, hooks, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t\telse updateComponent(parent, old, vnode, hooks, nextSibling, ns)\n\t\t}\n\t\telse {\n\t\t\tremoveNode(parent, old)\n\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t}\n\t}\n\tfunction updateText(old, vnode) {\n\t\tif (old.children.toString() !== vnode.children.toString()) {\n\t\t\told.dom.nodeValue = vnode.children\n\t\t}\n\t\tvnode.dom = old.dom\n\t}\n\tfunction updateHTML(parent, old, vnode, ns, nextSibling) {\n\t\tif (old.children !== vnode.children) {\n\t\t\tremoveHTML(parent, old)\n\t\t\tcreateHTML(parent, vnode, ns, nextSibling)\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t\tvnode.instance = old.instance\n\t\t}\n\t}\n\tfunction updateFragment(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tupdateNodes(parent, old.children, vnode.children, hooks, nextSibling, ns)\n\t\tvar domSize = 0, children = vnode.children\n\t\tvnode.dom = null\n\t\tif (children != null) {\n\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\tvar child = children[i]\n\t\t\t\tif (child != null && child.dom != null) {\n\t\t\t\t\tif (vnode.dom == null) vnode.dom = child.dom\n\t\t\t\t\tdomSize += child.domSize || 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (domSize !== 1) vnode.domSize = domSize\n\t\t}\n\t}\n\tfunction updateElement(old, vnode, hooks, ns) {\n\t\tvar element = vnode.dom = old.dom\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tif (vnode.tag === \"textarea\") {\n\t\t\tif (vnode.attrs == null) vnode.attrs = {}\n\t\t\tif (vnode.text != null) {\n\t\t\t\tvnode.attrs.value = vnode.text //FIXME handle multiple children\n\t\t\t\tvnode.text = undefined\n\t\t\t}\n\t\t}\n\t\tupdateAttrs(vnode, old.attrs, vnode.attrs, ns)\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (old.text != null && vnode.text != null && vnode.text !== \"\") {\n\t\t\t\tif (old.text.toString() !== vnode.text.toString()) old.dom.firstChild.nodeValue = vnode.text\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (old.text != null) old.children = [Vnode(\"#\", undefined, undefined, old.text, undefined, old.dom.firstChild)]\n\t\t\t\tif (vnode.text != null) vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t\tupdateNodes(element, old.children, vnode.children, hooks, null, ns)\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateComponent(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tupdateLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) updateLifecycle(vnode.attrs, vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tif (old.instance == null) createNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\telse updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, ns)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.instance.domSize\n\t\t}\n\t\telse if (old.instance != null) {\n\t\t\tremoveNode(parent, old.instance)\n\t\t\tvnode.dom = undefined\n\t\t\tvnode.domSize = 0\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t}\n\t}\n\tfunction getKeyMap(vnodes, start, end) {\n\t\tvar map = Object.create(null)\n\t\tfor (; start < end; start++) {\n\t\t\tvar vnode = vnodes[start]\n\t\t\tif (vnode != null) {\n\t\t\t\tvar key = vnode.key\n\t\t\t\tif (key != null) map[key] = start\n\t\t\t}\n\t\t}\n\t\treturn map\n\t}\n\t// Lifted from ivi https://github.com/ivijs/ivi/\n\t// takes a list of unique numbers (-1 is special and can\n\t// occur multiple times) and returns an array with the indices\n\t// of the items that are part of the longest increasing\n\t// subsequece\n\tvar lisTemp = []\n\tfunction makeLisIndices(a) {\n\t\tvar result = [0]\n\t\tvar u = 0, v = 0, i = 0\n\t\tvar il = lisTemp.length = a.length\n\t\tfor (var i = 0; i < il; i++) lisTemp[i] = a[i]\n\t\tfor (var i = 0; i < il; ++i) {\n\t\t\tif (a[i] === -1) continue\n\t\t\tvar j = result[result.length - 1]\n\t\t\tif (a[j] < a[i]) {\n\t\t\t\tlisTemp[i] = j\n\t\t\t\tresult.push(i)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tu = 0\n\t\t\tv = result.length - 1\n\t\t\twhile (u < v) {\n\t\t\t\t// Fast integer average without overflow.\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tvar c = (u >>> 1) + (v >>> 1) + (u & v & 1)\n\t\t\t\tif (a[result[c]] < a[i]) {\n\t\t\t\t\tu = c + 1\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tv = c\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (a[i] < a[result[u]]) {\n\t\t\t\tif (u > 0) lisTemp[i] = result[u - 1]\n\t\t\t\tresult[u] = i\n\t\t\t}\n\t\t}\n\t\tu = result.length\n\t\tv = result[u - 1]\n\t\twhile (u-- > 0) {\n\t\t\tresult[u] = v\n\t\t\tv = lisTemp[v]\n\t\t}\n\t\tlisTemp.length = 0\n\t\treturn result\n\t}\n\n\tfunction getNextSibling(vnodes, i, nextSibling) {\n\t\tfor (; i < vnodes.length; i++) {\n\t\t\tif (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom\n\t\t}\n\t\treturn nextSibling\n\t}\n\n\t// This covers a really specific edge case:\n\t// - Parent node is keyed and contains child\n\t// - Child is removed, returns unresolved promise in `onbeforeremove`\n\t// - Parent node is moved in keyed diff\n\t// - Remaining children still need moved appropriately\n\t//\n\t// Ideally, I'd track removed nodes as well, but that introduces a lot more\n\t// complexity and I'm not exactly interested in doing that.\n\tfunction moveNodes(parent, vnode, nextSibling) {\n\t\tvar frag = $doc.createDocumentFragment()\n\t\tmoveChildToFrag(parent, frag, vnode)\n\t\tinsertNode(parent, frag, nextSibling)\n\t}\n\tfunction moveChildToFrag(parent, frag, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\t\t\tfrag.appendChild(vnode.instance[i])\n\t\t\t\t}\n\t\t\t} else if (vnode.tag !== \"[\") {\n\t\t\t\t// Don't recurse for text nodes *or* elements, just fragments\n\t\t\t\tfrag.appendChild(vnode.dom)\n\t\t\t} else if (vnode.children.length === 1) {\n\t\t\t\tvnode = vnode.children[0]\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else {\n\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\tif (child != null) moveChildToFrag(parent, frag, child)\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\n\tfunction insertNode(parent, dom, nextSibling) {\n\t\tif (nextSibling != null) parent.insertBefore(dom, nextSibling)\n\t\telse parent.appendChild(dom)\n\t}\n\n\tfunction maybeSetContentEditable(vnode) {\n\t\tif (vnode.attrs == null || (\n\t\t\tvnode.attrs.contenteditable == null && // attribute\n\t\t\tvnode.attrs.contentEditable == null // property\n\t\t)) return false\n\t\tvar children = vnode.children\n\t\tif (children != null && children.length === 1 && children[0].tag === \"<\") {\n\t\t\tvar content = children[0].children\n\t\t\tif (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content\n\t\t}\n\t\telse if (vnode.text != null || children != null && children.length !== 0) throw new Error(\"Child node of a contenteditable must be trusted\")\n\t\treturn true\n\t}\n\n\t//remove\n\tfunction removeNodes(parent, vnodes, start, end) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) removeNode(parent, vnode)\n\t\t}\n\t}\n\tfunction removeNode(parent, vnode) {\n\t\tvar mask = 0\n\t\tvar original = vnode.state\n\t\tvar stateResult, attrsResult\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.state.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\tmask = 1\n\t\t\t\tstateResult = result\n\t\t\t}\n\t\t}\n\t\tif (vnode.attrs && typeof vnode.attrs.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.attrs.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tmask |= 2\n\t\t\t\tattrsResult = result\n\t\t\t}\n\t\t}\n\t\tcheckState(vnode, original)\n\n\t\t// If we can, try to fast-path it and avoid all the overhead of awaiting\n\t\tif (!mask) {\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t} else {\n\t\t\tif (stateResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 1) { mask &= 2; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tstateResult.then(next, next)\n\t\t\t}\n\t\t\tif (attrsResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 2) { mask &= 1; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tattrsResult.then(next, next)\n\t\t\t}\n\t\t}\n\n\t\tfunction reallyRemove() {\n\t\t\tcheckState(vnode, original)\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t}\n\t}\n\tfunction removeHTML(parent, vnode) {\n\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\tparent.removeChild(vnode.instance[i])\n\t\t}\n\t}\n\tfunction removeChild(parent, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tremoveHTML(parent, vnode)\n\t\t\t} else {\n\t\t\t\tif (vnode.tag !== \"[\") {\n\t\t\t\t\tparent.removeChild(vnode.dom)\n\t\t\t\t\tif (!Array.isArray(vnode.children)) break\n\t\t\t\t}\n\t\t\t\tif (vnode.children.length === 1) {\n\t\t\t\t\tvnode = vnode.children[0]\n\t\t\t\t\tif (vnode != null) continue\n\t\t\t\t} else {\n\t\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\t\tif (child != null) removeChild(parent, child)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\tfunction onremove(vnode) {\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onremove === \"function\") callHook.call(vnode.state.onremove, vnode)\n\t\tif (vnode.attrs && typeof vnode.attrs.onremove === \"function\") callHook.call(vnode.attrs.onremove, vnode)\n\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\tif (vnode.instance != null) onremove(vnode.instance)\n\t\t} else {\n\t\t\tvar children = vnode.children\n\t\t\tif (Array.isArray(children)) {\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\tvar child = children[i]\n\t\t\t\t\tif (child != null) onremove(child)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t//attrs\n\tfunction setAttrs(vnode, attrs, ns) {\n\t\tfor (var key in attrs) {\n\t\t\tsetAttr(vnode, key, null, attrs[key], ns)\n\t\t}\n\t}\n\tfunction setAttr(vnode, key, old, value, ns) {\n\t\tif (key === \"key\" || key === \"is\" || value == null || isLifecycleMethod(key) || (old === value && !isFormAttribute(vnode, key)) && typeof value !== \"object\") return\n\t\tif (key[0] === \"o\" && key[1] === \"n\") return updateEvent(vnode, key, value)\n\t\tif (key.slice(0, 6) === \"xlink:\") vnode.dom.setAttributeNS(\"http://www.w3.org/1999/xlink\", key.slice(6), value)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, value)\n\t\telse if (hasPropertyKey(vnode, key, ns)) {\n\t\t\tif (key === \"value\") {\n\t\t\t\t// Only do the coercion if we're actually going to check the value.\n\t\t\t\t/* eslint-disable no-implicit-coercion */\n\t\t\t\t//setting input[value] to same value by typing on focused element moves cursor to end in Chrome\n\t\t\t\tif ((vnode.tag === \"input\" || vnode.tag === \"textarea\") && vnode.dom.value === \"\" + value && vnode.dom === activeElement()) return\n\t\t\t\t//setting select[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"select\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t//setting option[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"option\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t/* eslint-enable no-implicit-coercion */\n\t\t\t}\n\t\t\t// If you assign an input type that is not supported by IE 11 with an assignment expression, an error will occur.\n\t\t\tif (vnode.tag === \"input\" && key === \"type\") vnode.dom.setAttribute(key, value)\n\t\t\telse vnode.dom[key] = value\n\t\t} else {\n\t\t\tif (typeof value === \"boolean\") {\n\t\t\t\tif (value) vnode.dom.setAttribute(key, \"\")\n\t\t\t\telse vnode.dom.removeAttribute(key)\n\t\t\t}\n\t\t\telse vnode.dom.setAttribute(key === \"className\" ? \"class\" : key, value)\n\t\t}\n\t}\n\tfunction removeAttr(vnode, key, old, ns) {\n\t\tif (key === \"key\" || key === \"is\" || old == null || isLifecycleMethod(key)) return\n\t\tif (key[0] === \"o\" && key[1] === \"n\" && !isLifecycleMethod(key)) updateEvent(vnode, key, undefined)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, null)\n\t\telse if (\n\t\t\thasPropertyKey(vnode, key, ns)\n\t\t\t&& key !== \"className\"\n\t\t\t&& !(key === \"value\" && (\n\t\t\t\tvnode.tag === \"option\"\n\t\t\t\t|| vnode.tag === \"select\" && vnode.dom.selectedIndex === -1 && vnode.dom === activeElement()\n\t\t\t))\n\t\t\t&& !(vnode.tag === \"input\" && key === \"type\")\n\t\t) {\n\t\t\tvnode.dom[key] = null\n\t\t} else {\n\t\t\tvar nsLastIndex = key.indexOf(\":\")\n\t\t\tif (nsLastIndex !== -1) key = key.slice(nsLastIndex + 1)\n\t\t\tif (old !== false) vnode.dom.removeAttribute(key === \"className\" ? \"class\" : key)\n\t\t}\n\t}\n\tfunction setLateSelectAttrs(vnode, attrs) {\n\t\tif (\"value\" in attrs) {\n\t\t\tif(attrs.value === null) {\n\t\t\t\tif (vnode.dom.selectedIndex !== -1) vnode.dom.value = null\n\t\t\t} else {\n\t\t\t\tvar normalized = \"\" + attrs.value // eslint-disable-line no-implicit-coercion\n\t\t\t\tif (vnode.dom.value !== normalized || vnode.dom.selectedIndex === -1) {\n\t\t\t\t\tvnode.dom.value = normalized\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (\"selectedIndex\" in attrs) setAttr(vnode, \"selectedIndex\", null, attrs.selectedIndex, undefined)\n\t}\n\tfunction updateAttrs(vnode, old, attrs, ns) {\n\t\tif (attrs != null) {\n\t\t\tfor (var key in attrs) {\n\t\t\t\tsetAttr(vnode, key, old && old[key], attrs[key], ns)\n\t\t\t}\n\t\t}\n\t\tvar val\n\t\tif (old != null) {\n\t\t\tfor (var key in old) {\n\t\t\t\tif (((val = old[key]) != null) && (attrs == null || attrs[key] == null)) {\n\t\t\t\t\tremoveAttr(vnode, key, val, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction isFormAttribute(vnode, attr) {\n\t\treturn attr === \"value\" || attr === \"checked\" || attr === \"selectedIndex\" || attr === \"selected\" && vnode.dom === activeElement() || vnode.tag === \"option\" && vnode.dom.parentNode === $doc.activeElement\n\t}\n\tfunction isLifecycleMethod(attr) {\n\t\treturn attr === \"oninit\" || attr === \"oncreate\" || attr === \"onupdate\" || attr === \"onremove\" || attr === \"onbeforeremove\" || attr === \"onbeforeupdate\"\n\t}\n\tfunction hasPropertyKey(vnode, key, ns) {\n\t\t// Filter out namespaced keys\n\t\treturn ns === undefined && (\n\t\t\t// If it's a custom element, just keep it.\n\t\t\tvnode.tag.indexOf(\"-\") > -1 || vnode.attrs != null && vnode.attrs.is ||\n\t\t\t// If it's a normal element, let's try to avoid a few browser bugs.\n\t\t\tkey !== \"href\" && key !== \"list\" && key !== \"form\" && key !== \"width\" && key !== \"height\"// && key !== \"type\"\n\t\t\t// Defer the property check until *after* we check everything.\n\t\t) && key in vnode.dom\n\t}\n\n\t//style\n\tvar uppercaseRegex = /[A-Z]/g\n\tfunction toLowerCase(capital) { return \"-\" + capital.toLowerCase() }\n\tfunction normalizeKey(key) {\n\t\treturn key[0] === \"-\" && key[1] === \"-\" ? key :\n\t\t\tkey === \"cssFloat\" ? \"float\" :\n\t\t\t\tkey.replace(uppercaseRegex, toLowerCase)\n\t}\n\tfunction updateStyle(element, old, style) {\n\t\tif (old === style) {\n\t\t\t// Styles are equivalent, do nothing.\n\t\t} else if (style == null) {\n\t\t\t// New style is missing, just clear it.\n\t\t\telement.style.cssText = \"\"\n\t\t} else if (typeof style !== \"object\") {\n\t\t\t// New style is a string, let engine deal with patching.\n\t\t\telement.style.cssText = style\n\t\t} else if (old == null || typeof old !== \"object\") {\n\t\t\t// `old` is missing or a string, `style` is an object.\n\t\t\telement.style.cssText = \"\"\n\t\t\t// Add new style properties\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null) element.style.setProperty(normalizeKey(key), String(value))\n\t\t\t}\n\t\t} else {\n\t\t\t// Both old & new are (different) objects.\n\t\t\t// Update style properties that have changed\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null && (value = String(value)) !== String(old[key])) {\n\t\t\t\t\telement.style.setProperty(normalizeKey(key), value)\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Remove style properties that no longer exist\n\t\t\tfor (var key in old) {\n\t\t\t\tif (old[key] != null && style[key] == null) {\n\t\t\t\t\telement.style.removeProperty(normalizeKey(key))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Here's an explanation of how this works:\n\t// 1. The event names are always (by design) prefixed by `on`.\n\t// 2. The EventListener interface accepts either a function or an object\n\t// with a `handleEvent` method.\n\t// 3. The object does not inherit from `Object.prototype`, to avoid\n\t// any potential interference with that (e.g. setters).\n\t// 4. The event name is remapped to the handler before calling it.\n\t// 5. In function-based event handlers, `ev.target === this`. We replicate\n\t// that below.\n\t// 6. In function-based event handlers, `return false` prevents the default\n\t// action and stops event propagation. We replicate that below.\n\tfunction EventDict() {\n\t\t// Save this, so the current redraw is correctly tracked.\n\t\tthis._ = currentRedraw\n\t}\n\tEventDict.prototype = Object.create(null)\n\tEventDict.prototype.handleEvent = function (ev) {\n\t\tvar handler = this[\"on\" + ev.type]\n\t\tvar result\n\t\tif (typeof handler === \"function\") result = handler.call(ev.currentTarget, ev)\n\t\telse if (typeof handler.handleEvent === \"function\") handler.handleEvent(ev)\n\t\tif (this._ && ev.redraw !== false) (0, this._)()\n\t\tif (result === false) {\n\t\t\tev.preventDefault()\n\t\t\tev.stopPropagation()\n\t\t}\n\t}\n\n\t//event\n\tfunction updateEvent(vnode, key, value) {\n\t\tif (vnode.events != null) {\n\t\t\tif (vnode.events[key] === value) return\n\t\t\tif (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\t\tif (vnode.events[key] == null) vnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = value\n\t\t\t} else {\n\t\t\t\tif (vnode.events[key] != null) vnode.dom.removeEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = undefined\n\t\t\t}\n\t\t} else if (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\tvnode.events = new EventDict()\n\t\t\tvnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\tvnode.events[key] = value\n\t\t}\n\t}\n\n\t//lifecycle\n\tfunction initLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.oninit === \"function\") callHook.call(source.oninit, vnode)\n\t\tif (typeof source.oncreate === \"function\") hooks.push(callHook.bind(source.oncreate, vnode))\n\t}\n\tfunction updateLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.onupdate === \"function\") hooks.push(callHook.bind(source.onupdate, vnode))\n\t}\n\tfunction shouldNotUpdate(vnode, old) {\n\t\tdo {\n\t\t\tif (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.attrs.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.state.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\treturn false\n\t\t} while (false); // eslint-disable-line no-constant-condition\n\t\tvnode.dom = old.dom\n\t\tvnode.domSize = old.domSize\n\t\tvnode.instance = old.instance\n\t\t// One would think having the actual latest attributes would be ideal,\n\t\t// but it doesn't let us properly diff based on our current internal\n\t\t// representation. We have to save not only the old DOM info, but also\n\t\t// the attributes used to create it, as we diff *that*, not against the\n\t\t// DOM directly (with a few exceptions in `setAttr`). And, of course, we\n\t\t// need to save the children and text as they are conceptually not\n\t\t// unlike special \"attributes\" internally.\n\t\tvnode.attrs = old.attrs\n\t\tvnode.children = old.children\n\t\tvnode.text = old.text\n\t\treturn true\n\t}\n\n\treturn function(dom, vnodes, redraw) {\n\t\tif (!dom) throw new TypeError(\"Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.\")\n\t\tvar hooks = []\n\t\tvar active = activeElement()\n\t\tvar namespace = dom.namespaceURI\n\n\t\t// First time rendering into a node clears it out\n\t\tif (dom.vnodes == null) dom.textContent = \"\"\n\n\t\tvnodes = Vnode.normalizeChildren(Array.isArray(vnodes) ? vnodes : [vnodes])\n\t\tvar prevRedraw = currentRedraw\n\t\ttry {\n\t\t\tcurrentRedraw = typeof redraw === \"function\" ? redraw : undefined\n\t\t\tupdateNodes(dom, dom.vnodes, vnodes, hooks, null, namespace === \"http://www.w3.org/1999/xhtml\" ? undefined : namespace)\n\t\t} finally {\n\t\t\tcurrentRedraw = prevRedraw\n\t\t}\n\t\tdom.vnodes = vnodes\n\t\t// `document.activeElement` can return null: https://html.spec.whatwg.org/multipage/interaction.html#dom-document-activeelement\n\t\tif (active != null && activeElement() !== active && typeof active.focus === \"function\") active.focus()\n\t\tfor (var i = 0; i < hooks.length; i++) hooks[i]()\n\t}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(render, schedule, console) {\n\tvar subscriptions = []\n\tvar rendering = false\n\tvar pending = false\n\n\tfunction sync() {\n\t\tif (rendering) throw new Error(\"Nested m.redraw.sync() call\")\n\t\trendering = true\n\t\tfor (var i = 0; i < subscriptions.length; i += 2) {\n\t\t\ttry { render(subscriptions[i], Vnode(subscriptions[i + 1]), redraw) }\n\t\t\tcatch (e) { console.error(e) }\n\t\t}\n\t\trendering = false\n\t}\n\n\tfunction redraw() {\n\t\tif (!pending) {\n\t\t\tpending = true\n\t\t\tschedule(function() {\n\t\t\t\tpending = false\n\t\t\t\tsync()\n\t\t\t})\n\t\t}\n\t}\n\n\tredraw.sync = sync\n\n\tfunction mount(root, component) {\n\t\tif (component != null && component.view == null && typeof component !== \"function\") {\n\t\t\tthrow new TypeError(\"m.mount(element, component) expects a component, not a vnode\")\n\t\t}\n\n\t\tvar index = subscriptions.indexOf(root)\n\t\tif (index >= 0) {\n\t\t\tsubscriptions.splice(index, 2)\n\t\t\trender(root, [], redraw)\n\t\t}\n\n\t\tif (component != null) {\n\t\t\tsubscriptions.push(root, component)\n\t\t\trender(root, Vnode(component), redraw)\n\t\t}\n\t}\n\n\treturn {mount: mount, redraw: redraw}\n}\n","\"use strict\"\n\nvar buildPathname = require(\"../pathname/build\")\n\nmodule.exports = function($window, Promise, oncompletion) {\n\tvar callbackCount = 0\n\n\tfunction PromiseProxy(executor) {\n\t\treturn new Promise(executor)\n\t}\n\n\t// In case the global Promise is some userland library's where they rely on\n\t// `foo instanceof this.constructor`, `this.constructor.resolve(value)`, or\n\t// similar. Let's *not* break them.\n\tPromiseProxy.prototype = Promise.prototype\n\tPromiseProxy.__proto__ = Promise // eslint-disable-line no-proto\n\n\tfunction makeRequest(factory) {\n\t\treturn function(url, args) {\n\t\t\tif (typeof url !== \"string\") { args = url; url = url.url }\n\t\t\telse if (args == null) args = {}\n\t\t\tvar promise = new Promise(function(resolve, reject) {\n\t\t\t\tfactory(buildPathname(url, args.params), args, function (data) {\n\t\t\t\t\tif (typeof args.type === \"function\") {\n\t\t\t\t\t\tif (Array.isArray(data)) {\n\t\t\t\t\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tdata[i] = new args.type(data[i])\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse data = new args.type(data)\n\t\t\t\t\t}\n\t\t\t\t\tresolve(data)\n\t\t\t\t}, reject)\n\t\t\t})\n\t\t\tif (args.background === true) return promise\n\t\t\tvar count = 0\n\t\t\tfunction complete() {\n\t\t\t\tif (--count === 0 && typeof oncompletion === \"function\") oncompletion()\n\t\t\t}\n\n\t\t\treturn wrap(promise)\n\n\t\t\tfunction wrap(promise) {\n\t\t\t\tvar then = promise.then\n\t\t\t\t// Set the constructor, so engines know to not await or resolve\n\t\t\t\t// this as a native promise. At the time of writing, this is\n\t\t\t\t// only necessary for V8, but their behavior is the correct\n\t\t\t\t// behavior per spec. See this spec issue for more details:\n\t\t\t\t// https://github.com/tc39/ecma262/issues/1577. Also, see the\n\t\t\t\t// corresponding comment in `request/tests/test-request.js` for\n\t\t\t\t// a bit more background on the issue at hand.\n\t\t\t\tpromise.constructor = PromiseProxy\n\t\t\t\tpromise.then = function() {\n\t\t\t\t\tcount++\n\t\t\t\t\tvar next = then.apply(promise, arguments)\n\t\t\t\t\tnext.then(complete, function(e) {\n\t\t\t\t\t\tcomplete()\n\t\t\t\t\t\tif (count === 0) throw e\n\t\t\t\t\t})\n\t\t\t\t\treturn wrap(next)\n\t\t\t\t}\n\t\t\t\treturn promise\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction hasHeader(args, name) {\n\t\tfor (var key in args.headers) {\n\t\t\tif ({}.hasOwnProperty.call(args.headers, key) && name.test(key)) return true\n\t\t}\n\t\treturn false\n\t}\n\n\treturn {\n\t\trequest: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar method = args.method != null ? args.method.toUpperCase() : \"GET\"\n\t\t\tvar body = args.body\n\t\t\tvar assumeJSON = (args.serialize == null || args.serialize === JSON.serialize) && !(body instanceof $window.FormData)\n\t\t\tvar responseType = args.responseType || (typeof args.extract === \"function\" ? \"\" : \"json\")\n\n\t\t\tvar xhr = new $window.XMLHttpRequest(), aborted = false\n\t\t\tvar original = xhr, replacedAbort\n\t\t\tvar abort = xhr.abort\n\n\t\t\txhr.abort = function() {\n\t\t\t\taborted = true\n\t\t\t\tabort.call(this)\n\t\t\t}\n\n\t\t\txhr.open(method, url, args.async !== false, typeof args.user === \"string\" ? args.user : undefined, typeof args.password === \"string\" ? args.password : undefined)\n\n\t\t\tif (assumeJSON && body != null && !hasHeader(args, /^content-type$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\")\n\t\t\t}\n\t\t\tif (typeof args.deserialize !== \"function\" && !hasHeader(args, /^accept$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Accept\", \"application/json, text/*\")\n\t\t\t}\n\t\t\tif (args.withCredentials) xhr.withCredentials = args.withCredentials\n\t\t\tif (args.timeout) xhr.timeout = args.timeout\n\t\t\txhr.responseType = responseType\n\n\t\t\tfor (var key in args.headers) {\n\t\t\t\tif ({}.hasOwnProperty.call(args.headers, key)) {\n\t\t\t\t\txhr.setRequestHeader(key, args.headers[key])\n\t\t\t\t}\n\t\t\t}\n\n\t\t\txhr.onreadystatechange = function(ev) {\n\t\t\t\t// Don't throw errors on xhr.abort().\n\t\t\t\tif (aborted) return\n\n\t\t\t\tif (ev.target.readyState === 4) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar success = (ev.target.status >= 200 && ev.target.status < 300) || ev.target.status === 304 || (/^file:\\/\\//i).test(url)\n\t\t\t\t\t\t// When the response type isn't \"\" or \"text\",\n\t\t\t\t\t\t// `xhr.responseText` is the wrong thing to use.\n\t\t\t\t\t\t// Browsers do the right thing and throw here, and we\n\t\t\t\t\t\t// should honor that and do the right thing by\n\t\t\t\t\t\t// preferring `xhr.response` where possible/practical.\n\t\t\t\t\t\tvar response = ev.target.response, message\n\n\t\t\t\t\t\tif (responseType === \"json\") {\n\t\t\t\t\t\t\t// For IE and Edge, which don't implement\n\t\t\t\t\t\t\t// `responseType: \"json\"`.\n\t\t\t\t\t\t\tif (!ev.target.responseType && typeof args.extract !== \"function\") response = JSON.parse(ev.target.responseText)\n\t\t\t\t\t\t} else if (!responseType || responseType === \"text\") {\n\t\t\t\t\t\t\t// Only use this default if it's text. If a parsed\n\t\t\t\t\t\t\t// document is needed on old IE and friends (all\n\t\t\t\t\t\t\t// unsupported), the user should use a custom\n\t\t\t\t\t\t\t// `config` instead. They're already using this at\n\t\t\t\t\t\t\t// their own risk.\n\t\t\t\t\t\t\tif (response == null) response = ev.target.responseText\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof args.extract === \"function\") {\n\t\t\t\t\t\t\tresponse = args.extract(ev.target, args)\n\t\t\t\t\t\t\tsuccess = true\n\t\t\t\t\t\t} else if (typeof args.deserialize === \"function\") {\n\t\t\t\t\t\t\tresponse = args.deserialize(response)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (success) resolve(response)\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttry { message = ev.target.responseText }\n\t\t\t\t\t\t\tcatch (e) { message = response }\n\t\t\t\t\t\t\tvar error = new Error(message)\n\t\t\t\t\t\t\terror.code = ev.target.status\n\t\t\t\t\t\t\terror.response = response\n\t\t\t\t\t\t\treject(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\treject(e)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof args.config === \"function\") {\n\t\t\t\txhr = args.config(xhr, args, url) || xhr\n\n\t\t\t\t// Propagate the `abort` to any replacement XHR as well.\n\t\t\t\tif (xhr !== original) {\n\t\t\t\t\treplacedAbort = xhr.abort\n\t\t\t\t\txhr.abort = function() {\n\t\t\t\t\t\taborted = true\n\t\t\t\t\t\treplacedAbort.call(this)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (body == null) xhr.send()\n\t\t\telse if (typeof args.serialize === \"function\") xhr.send(args.serialize(body))\n\t\t\telse if (body instanceof $window.FormData) xhr.send(body)\n\t\t\telse xhr.send(JSON.stringify(body))\n\t\t}),\n\t\tjsonp: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar callbackName = args.callbackName || \"_mithril_\" + Math.round(Math.random() * 1e16) + \"_\" + callbackCount++\n\t\t\tvar script = $window.document.createElement(\"script\")\n\t\t\t$window[callbackName] = function(data) {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\tresolve(data)\n\t\t\t}\n\t\t\tscript.onerror = function() {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\treject(new Error(\"JSONP request failed\"))\n\t\t\t}\n\t\t\tscript.src = url + (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") +\n\t\t\t\tencodeURIComponent(args.callbackKey || \"callback\") + \"=\" +\n\t\t\t\tencodeURIComponent(callbackName)\n\t\t\t$window.document.documentElement.appendChild(script)\n\t\t}),\n\t}\n}\n","\"use strict\"\n\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./api/router\")(window, mountRedraw)\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar m = require(\"../render/hyperscript\")\nvar Promise = require(\"../promise/promise\")\n\nvar buildPathname = require(\"../pathname/build\")\nvar parsePathname = require(\"../pathname/parse\")\nvar compileTemplate = require(\"../pathname/compileTemplate\")\nvar assign = require(\"../pathname/assign\")\n\nvar sentinel = {}\n\nmodule.exports = function($window, mountRedraw) {\n\tvar fireAsync\n\n\tfunction setPath(path, data, options) {\n\t\tpath = buildPathname(path, data)\n\t\tif (fireAsync != null) {\n\t\t\tfireAsync()\n\t\t\tvar state = options ? options.state : null\n\t\t\tvar title = options ? options.title : null\n\t\t\tif (options && options.replace) $window.history.replaceState(state, title, route.prefix + path)\n\t\t\telse $window.history.pushState(state, title, route.prefix + path)\n\t\t}\n\t\telse {\n\t\t\t$window.location.href = route.prefix + path\n\t\t}\n\t}\n\n\tvar currentResolver = sentinel, component, attrs, currentPath, lastUpdate\n\n\tvar SKIP = route.SKIP = {}\n\n\tfunction route(root, defaultRoute, routes) {\n\t\tif (root == null) throw new Error(\"Ensure the DOM element that was passed to `m.route` is not undefined\")\n\t\t// 0 = start\n\t\t// 1 = init\n\t\t// 2 = ready\n\t\tvar state = 0\n\n\t\tvar compiled = Object.keys(routes).map(function(route) {\n\t\t\tif (route[0] !== \"/\") throw new SyntaxError(\"Routes must start with a `/`\")\n\t\t\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(route)) {\n\t\t\t\tthrow new SyntaxError(\"Route parameter names must be separated with either `/`, `.`, or `-`\")\n\t\t\t}\n\t\t\treturn {\n\t\t\t\troute: route,\n\t\t\t\tcomponent: routes[route],\n\t\t\t\tcheck: compileTemplate(route),\n\t\t\t}\n\t\t})\n\t\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\t\tvar p = Promise.resolve()\n\t\tvar scheduled = false\n\t\tvar onremove\n\n\t\tfireAsync = null\n\n\t\tif (defaultRoute != null) {\n\t\t\tvar defaultData = parsePathname(defaultRoute)\n\n\t\t\tif (!compiled.some(function (i) { return i.check(defaultData) })) {\n\t\t\t\tthrow new ReferenceError(\"Default route doesn't match any known routes\")\n\t\t\t}\n\t\t}\n\n\t\tfunction resolveRoute() {\n\t\t\tscheduled = false\n\t\t\t// Consider the pathname holistically. The prefix might even be invalid,\n\t\t\t// but that's not our problem.\n\t\t\tvar prefix = $window.location.hash\n\t\t\tif (route.prefix[0] !== \"#\") {\n\t\t\t\tprefix = $window.location.search + prefix\n\t\t\t\tif (route.prefix[0] !== \"?\") {\n\t\t\t\t\tprefix = $window.location.pathname + prefix\n\t\t\t\t\tif (prefix[0] !== \"/\") prefix = \"/\" + prefix\n\t\t\t\t}\n\t\t\t}\n\t\t\t// This seemingly useless `.concat()` speeds up the tests quite a bit,\n\t\t\t// since the representation is consistently a relatively poorly\n\t\t\t// optimized cons string.\n\t\t\tvar path = prefix.concat()\n\t\t\t\t.replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponent)\n\t\t\t\t.slice(route.prefix.length)\n\t\t\tvar data = parsePathname(path)\n\n\t\t\tassign(data.params, $window.history.state)\n\n\t\t\tfunction fail() {\n\t\t\t\tif (path === defaultRoute) throw new Error(\"Could not resolve default route \" + defaultRoute)\n\t\t\t\tsetPath(defaultRoute, null, {replace: true})\n\t\t\t}\n\n\t\t\tloop(0)\n\t\t\tfunction loop(i) {\n\t\t\t\t// 0 = init\n\t\t\t\t// 1 = scheduled\n\t\t\t\t// 2 = done\n\t\t\t\tfor (; i < compiled.length; i++) {\n\t\t\t\t\tif (compiled[i].check(data)) {\n\t\t\t\t\t\tvar payload = compiled[i].component\n\t\t\t\t\t\tvar matchedRoute = compiled[i].route\n\t\t\t\t\t\tvar localComp = payload\n\t\t\t\t\t\tvar update = lastUpdate = function(comp) {\n\t\t\t\t\t\t\tif (update !== lastUpdate) return\n\t\t\t\t\t\t\tif (comp === SKIP) return loop(i + 1)\n\t\t\t\t\t\t\tcomponent = comp != null && (typeof comp.view === \"function\" || typeof comp === \"function\")? comp : \"div\"\n\t\t\t\t\t\t\tattrs = data.params, currentPath = path, lastUpdate = null\n\t\t\t\t\t\t\tcurrentResolver = payload.render ? payload : null\n\t\t\t\t\t\t\tif (state === 2) mountRedraw.redraw()\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tstate = 2\n\t\t\t\t\t\t\t\tmountRedraw.redraw.sync()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// There's no understating how much I *wish* I could\n\t\t\t\t\t\t// use `async`/`await` here...\n\t\t\t\t\t\tif (payload.view || typeof payload === \"function\") {\n\t\t\t\t\t\t\tpayload = {}\n\t\t\t\t\t\t\tupdate(localComp)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (payload.onmatch) {\n\t\t\t\t\t\t\tp.then(function () {\n\t\t\t\t\t\t\t\treturn payload.onmatch(data.params, path, matchedRoute)\n\t\t\t\t\t\t\t}).then(update, fail)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse update(\"div\")\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfail()\n\t\t\t}\n\t\t}\n\n\t\t// Set it unconditionally so `m.route.set` and `m.route.Link` both work,\n\t\t// even if neither `pushState` nor `hashchange` are supported. It's\n\t\t// cleared if `hashchange` is used, since that makes it automatically\n\t\t// async.\n\t\tfireAsync = function() {\n\t\t\tif (!scheduled) {\n\t\t\t\tscheduled = true\n\t\t\t\tcallAsync(resolveRoute)\n\t\t\t}\n\t\t}\n\n\t\tif (typeof $window.history.pushState === \"function\") {\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"popstate\", fireAsync, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"popstate\", fireAsync, false)\n\t\t} else if (route.prefix[0] === \"#\") {\n\t\t\tfireAsync = null\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"hashchange\", resolveRoute, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"hashchange\", resolveRoute, false)\n\t\t}\n\n\t\treturn mountRedraw.mount(root, {\n\t\t\tonbeforeupdate: function() {\n\t\t\t\tstate = state ? 2 : 1\n\t\t\t\treturn !(!state || sentinel === currentResolver)\n\t\t\t},\n\t\t\toncreate: resolveRoute,\n\t\t\tonremove: onremove,\n\t\t\tview: function() {\n\t\t\t\tif (!state || sentinel === currentResolver) return\n\t\t\t\t// Wrap in a fragment to preserve existing key semantics\n\t\t\t\tvar vnode = [Vnode(component, attrs.key, attrs)]\n\t\t\t\tif (currentResolver) vnode = currentResolver.render(vnode[0])\n\t\t\t\treturn vnode\n\t\t\t},\n\t\t})\n\t}\n\troute.set = function(path, data, options) {\n\t\tif (lastUpdate != null) {\n\t\t\toptions = options || {}\n\t\t\toptions.replace = true\n\t\t}\n\t\tlastUpdate = null\n\t\tsetPath(path, data, options)\n\t}\n\troute.get = function() {return currentPath}\n\troute.prefix = \"#!\"\n\troute.Link = {\n\t\tview: function(vnode) {\n\t\t\tvar options = vnode.attrs.options\n\t\t\t// Remove these so they don't get overwritten\n\t\t\tvar attrs = {}, onclick, href\n\t\t\tassign(attrs, vnode.attrs)\n\t\t\t// The first two are internal, but the rest are magic attributes\n\t\t\t// that need censored to not screw up rendering.\n\t\t\tattrs.selector = attrs.options = attrs.key = attrs.oninit =\n\t\t\tattrs.oncreate = attrs.onbeforeupdate = attrs.onupdate =\n\t\t\tattrs.onbeforeremove = attrs.onremove = null\n\n\t\t\t// Do this now so we can get the most current `href` and `disabled`.\n\t\t\t// Those attributes may also be specified in the selector, and we\n\t\t\t// should honor that.\n\t\t\tvar child = m(vnode.attrs.selector || \"a\", attrs, vnode.children)\n\n\t\t\t// Let's provide a *right* way to disable a route link, rather than\n\t\t\t// letting people screw up accessibility on accident.\n\t\t\t//\n\t\t\t// The attribute is coerced so users don't get surprised over\n\t\t\t// `disabled: 0` resulting in a button that's somehow routable\n\t\t\t// despite being visibly disabled.\n\t\t\tif (child.attrs.disabled = Boolean(child.attrs.disabled)) {\n\t\t\t\tchild.attrs.href = null\n\t\t\t\tchild.attrs[\"aria-disabled\"] = \"true\"\n\t\t\t\t// If you *really* do want to do this on a disabled link, use\n\t\t\t\t// an `oncreate` hook to add it.\n\t\t\t\tchild.attrs.onclick = null\n\t\t\t} else {\n\t\t\t\tonclick = child.attrs.onclick\n\t\t\t\thref = child.attrs.href\n\t\t\t\tchild.attrs.href = route.prefix + href\n\t\t\t\tchild.attrs.onclick = function(e) {\n\t\t\t\t\tvar result\n\t\t\t\t\tif (typeof onclick === \"function\") {\n\t\t\t\t\t\tresult = onclick.call(e.currentTarget, e)\n\t\t\t\t\t} else if (onclick == null || typeof onclick !== \"object\") {\n\t\t\t\t\t\t// do nothing\n\t\t\t\t\t} else if (typeof onclick.handleEvent === \"function\") {\n\t\t\t\t\t\tonclick.handleEvent(e)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Adapted from React Router's implementation:\n\t\t\t\t\t// https://github.com/ReactTraining/react-router/blob/520a0acd48ae1b066eb0b07d6d4d1790a1d02482/packages/react-router-dom/modules/Link.js\n\t\t\t\t\t//\n\t\t\t\t\t// Try to be flexible and intuitive in how we handle links.\n\t\t\t\t\t// Fun fact: links aren't as obvious to get right as you\n\t\t\t\t\t// would expect. There's a lot more valid ways to click a\n\t\t\t\t\t// link than this, and one might want to not simply click a\n\t\t\t\t\t// link, but right click or command-click it to copy the\n\t\t\t\t\t// link target, etc. Nope, this isn't just for blind people.\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip if `onclick` prevented default\n\t\t\t\t\t\tresult !== false && !e.defaultPrevented &&\n\t\t\t\t\t\t// Ignore everything but left clicks\n\t\t\t\t\t\t(e.button === 0 || e.which === 0 || e.which === 1) &&\n\t\t\t\t\t\t// Let the browser handle `target=_blank`, etc.\n\t\t\t\t\t\t(!e.currentTarget.target || e.currentTarget.target === \"_self\") &&\n\t\t\t\t\t\t// No modifier keys\n\t\t\t\t\t\t!e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey\n\t\t\t\t\t) {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\te.redraw = false\n\t\t\t\t\t\troute.set(href, null, options)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn child\n\t\t},\n\t}\n\troute.param = function(key) {\n\t\treturn attrs && key != null ? attrs[key] : attrs\n\t}\n\n\treturn route\n}\n","\"use strict\"\n\nvar parsePathname = require(\"./parse\")\n\n// Compiles a template into a function that takes a resolved path (without query\n// strings) and returns an object containing the template parameters with their\n// parsed values. This expects the input of the compiled template to be the\n// output of `parsePathname`. Note that it does *not* remove query parameters\n// specified in the template.\nmodule.exports = function(template) {\n\tvar templateData = parsePathname(template)\n\tvar templateKeys = Object.keys(templateData.params)\n\tvar keys = []\n\tvar regexp = new RegExp(\"^\" + templateData.path.replace(\n\t\t// I escape literal text so people can use things like `:file.:ext` or\n\t\t// `:lang-:locale` in routes. This is all merged into one pass so I\n\t\t// don't also accidentally escape `-` and make it harder to detect it to\n\t\t// ban it from template parameters.\n\t\t/:([^\\/.-]+)(\\.{3}|\\.(?!\\.)|-)?|[\\\\^$*+.()|\\[\\]{}]/g,\n\t\tfunction(m, key, extra) {\n\t\t\tif (key == null) return \"\\\\\" + m\n\t\t\tkeys.push({k: key, r: extra === \"...\"})\n\t\t\tif (extra === \"...\") return \"(.*)\"\n\t\t\tif (extra === \".\") return \"([^/]+)\\\\.\"\n\t\t\treturn \"([^/]+)\" + (extra || \"\")\n\t\t}\n\t) + \"$\")\n\treturn function(data) {\n\t\t// First, check the params. Usually, there isn't any, and it's just\n\t\t// checking a static set.\n\t\tfor (var i = 0; i < templateKeys.length; i++) {\n\t\t\tif (templateData.params[templateKeys[i]] !== data.params[templateKeys[i]]) return false\n\t\t}\n\t\t// If no interpolations exist, let's skip all the ceremony\n\t\tif (!keys.length) return regexp.test(data.path)\n\t\tvar values = regexp.exec(data.path)\n\t\tif (values == null) return false\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tdata.params[keys[i].k] = keys[i].r ? values[i + 1] : decodeURIComponent(values[i + 1])\n\t\t}\n\t\treturn true\n\t}\n}\n","if(!global[\"m\"]) global[\"m\"] = {};\nmodule.exports = global[\"m\"][\"bidi\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\bidi.js\");","( function _package( factory ){\r\n\tif( typeof define === 'function' && define.amd ){\r\n\t\tdefine( [ 'mithril' ], factory )\r\n\t}\r\n\telse if( typeof exports === 'object' ){\r\n\t\tmodule.exports = factory( require( 'mithril' ) )\r\n\t}\r\n\telse{\r\n\t\tfactory( m )\r\n\t}\r\n}( function define( m ){\r\n\tfunction bidi( node, prop ){\r\n\t\tvar type = node.tag === 'select'\r\n\t\t\t? node.attrs.multi\r\n\t\t\t\t? 'multi'\r\n\t\t\t\t: 'select'\r\n\t\t\t: node.attrs.type\r\n\r\n\t\t// Setup: bind listeners\r\n\t\tif( type === 'multi' ){\r\n\t\t\tnode.attrs.onchange = function(){\r\n\t\t\t\tprop( [].slice.call( this.selectedOptions, function( x ){\r\n\t\t\t\t\treturn x.value\r\n\t\t\t\t} ) )\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if( type === 'select' ){\r\n\t\t\tnode.attrs.onchange = function( e ){\r\n\t\t\t\tprop( this.selectedOptions[ 0 ].value )\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if( type === 'checkbox' ){\r\n\t\t\tnode.attrs.onchange = function( e ){\r\n\t\t\t\tprop( this.checked )\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.attrs.onchange = node.attrs.oninput = function( e ){\r\n\t\t\t\tprop( this.value )\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif( node.tag === 'select' ){\r\n\t\t\tnode.children.forEach( function( option ){\r\n\t\t\t\tif( option.attrs.value === prop() || option.children[ 0 ] === prop() ){\r\n\t\t\t\t\toption.attrs.selected = true\r\n\t\t\t\t}\r\n\t\t\t} )\r\n\t\t}\r\n\t\telse if( type === 'checkbox' ){\r\n\t\t\tnode.attrs.checked = prop()\r\n\t\t}\r\n\t\telse if( type === 'radio' ){\r\n\t\t\tnode.attrs.checked = prop() === node.attrs.value\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.attrs.value = prop()\r\n\t\t}\r\n\r\n\t\treturn node\r\n\t}\r\n\r\n\tbidi.view = function( ctrl, node, prop ){\r\n\t return bidi( node, node.attrs.bidi )\r\n\t}\r\n\r\n\tif( m.attrs ) m.attrs.bidi = bidi\r\n\t\r\n\tm.bidi = bidi\r\n\r\n\treturn bidi\r\n} ) )\r\n","module.exports = global[\"Mousetrap\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\mousetrap.js\");","/*global define:false */\n/**\n * Copyright 2012-2017 Craig Campbell\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * Mousetrap is a simple keyboard shortcut library for Javascript with\n * no external dependencies\n *\n * @version 1.6.3\n * @url craig.is/killing/mice\n */\n(function(window, document, undefined) {\n\n // Check if mousetrap is used inside browser, if not, return\n if (!window) {\n return;\n }\n\n /**\n * mapping of special keycodes to their corresponding keys\n *\n * everything in this dictionary cannot use keypress events\n * so it has to be here to map to the correct keycodes for\n * keyup/keydown events\n *\n * @type {Object}\n */\n var _MAP = {\n 8: 'backspace',\n 9: 'tab',\n 13: 'enter',\n 16: 'shift',\n 17: 'ctrl',\n 18: 'alt',\n 20: 'capslock',\n 27: 'esc',\n 32: 'space',\n 33: 'pageup',\n 34: 'pagedown',\n 35: 'end',\n 36: 'home',\n 37: 'left',\n 38: 'up',\n 39: 'right',\n 40: 'down',\n 45: 'ins',\n 46: 'del',\n 91: 'meta',\n 93: 'meta',\n 224: 'meta'\n };\n\n /**\n * mapping for special characters so they can support\n *\n * this dictionary is only used incase you want to bind a\n * keyup or keydown event to one of these keys\n *\n * @type {Object}\n */\n var _KEYCODE_MAP = {\n 106: '*',\n 107: '+',\n 109: '-',\n 110: '.',\n 111 : '/',\n 186: ';',\n 187: '=',\n 188: ',',\n 189: '-',\n 190: '.',\n 191: '/',\n 192: '`',\n 219: '[',\n 220: '\\\\',\n 221: ']',\n 222: '\\''\n };\n\n /**\n * this is a mapping of keys that require shift on a US keypad\n * back to the non shift equivelents\n *\n * this is so you can use keyup events with these keys\n *\n * note that this will only work reliably on US keyboards\n *\n * @type {Object}\n */\n var _SHIFT_MAP = {\n '~': '`',\n '!': '1',\n '@': '2',\n '#': '3',\n '$': '4',\n '%': '5',\n '^': '6',\n '&': '7',\n '*': '8',\n '(': '9',\n ')': '0',\n '_': '-',\n '+': '=',\n ':': ';',\n '\\\"': '\\'',\n '<': ',',\n '>': '.',\n '?': '/',\n '|': '\\\\'\n };\n\n /**\n * this is a list of special strings you can use to map\n * to modifier keys when you specify your keyboard shortcuts\n *\n * @type {Object}\n */\n var _SPECIAL_ALIASES = {\n 'option': 'alt',\n 'command': 'meta',\n 'return': 'enter',\n 'escape': 'esc',\n 'plus': '+',\n 'mod': /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? 'meta' : 'ctrl'\n };\n\n /**\n * variable to store the flipped version of _MAP from above\n * needed to check if we should use keypress or not when no action\n * is specified\n *\n * @type {Object|undefined}\n */\n var _REVERSE_MAP;\n\n /**\n * loop through the f keys, f1 to f19 and add them to the map\n * programatically\n */\n for (var i = 1; i < 20; ++i) {\n _MAP[111 + i] = 'f' + i;\n }\n\n /**\n * loop through to map numbers on the numeric keypad\n */\n for (i = 0; i <= 9; ++i) {\n\n // This needs to use a string cause otherwise since 0 is falsey\n // mousetrap will never fire for numpad 0 pressed as part of a keydown\n // event.\n //\n // @see https://github.com/ccampbell/mousetrap/pull/258\n _MAP[i + 96] = i.toString();\n }\n\n /**\n * cross browser add event method\n *\n * @param {Element|HTMLDocument} object\n * @param {string} type\n * @param {Function} callback\n * @returns void\n */\n function _addEvent(object, type, callback) {\n if (object.addEventListener) {\n object.addEventListener(type, callback, false);\n return;\n }\n\n object.attachEvent('on' + type, callback);\n }\n\n /**\n * takes the event and returns the key character\n *\n * @param {Event} e\n * @return {string}\n */\n function _characterFromEvent(e) {\n\n // for keypress events we should return the character as is\n if (e.type == 'keypress') {\n var character = String.fromCharCode(e.which);\n\n // if the shift key is not pressed then it is safe to assume\n // that we want the character to be lowercase. this means if\n // you accidentally have caps lock on then your key bindings\n // will continue to work\n //\n // the only side effect that might not be desired is if you\n // bind something like 'A' cause you want to trigger an\n // event when capital A is pressed caps lock will no longer\n // trigger the event. shift+a will though.\n if (!e.shiftKey) {\n character = character.toLowerCase();\n }\n\n return character;\n }\n\n // for non keypress events the special maps are needed\n if (_MAP[e.which]) {\n return _MAP[e.which];\n }\n\n if (_KEYCODE_MAP[e.which]) {\n return _KEYCODE_MAP[e.which];\n }\n\n // if it is not in the special map\n\n // with keydown and keyup events the character seems to always\n // come in as an uppercase character whether you are pressing shift\n // or not. we should make sure it is always lowercase for comparisons\n return String.fromCharCode(e.which).toLowerCase();\n }\n\n /**\n * checks if two arrays are equal\n *\n * @param {Array} modifiers1\n * @param {Array} modifiers2\n * @returns {boolean}\n */\n function _modifiersMatch(modifiers1, modifiers2) {\n return modifiers1.sort().join(',') === modifiers2.sort().join(',');\n }\n\n /**\n * takes a key event and figures out what the modifiers are\n *\n * @param {Event} e\n * @returns {Array}\n */\n function _eventModifiers(e) {\n var modifiers = [];\n\n if (e.shiftKey) {\n modifiers.push('shift');\n }\n\n if (e.altKey) {\n modifiers.push('alt');\n }\n\n if (e.ctrlKey) {\n modifiers.push('ctrl');\n }\n\n if (e.metaKey) {\n modifiers.push('meta');\n }\n\n return modifiers;\n }\n\n /**\n * prevents default for this event\n *\n * @param {Event} e\n * @returns void\n */\n function _preventDefault(e) {\n if (e.preventDefault) {\n e.preventDefault();\n return;\n }\n\n e.returnValue = false;\n }\n\n /**\n * stops propogation for this event\n *\n * @param {Event} e\n * @returns void\n */\n function _stopPropagation(e) {\n if (e.stopPropagation) {\n e.stopPropagation();\n return;\n }\n\n e.cancelBubble = true;\n }\n\n /**\n * determines if the keycode specified is a modifier key or not\n *\n * @param {string} key\n * @returns {boolean}\n */\n function _isModifier(key) {\n return key == 'shift' || key == 'ctrl' || key == 'alt' || key == 'meta';\n }\n\n /**\n * reverses the map lookup so that we can look for specific keys\n * to see what can and can't use keypress\n *\n * @return {Object}\n */\n function _getReverseMap() {\n if (!_REVERSE_MAP) {\n _REVERSE_MAP = {};\n for (var key in _MAP) {\n\n // pull out the numeric keypad from here cause keypress should\n // be able to detect the keys from the character\n if (key > 95 && key < 112) {\n continue;\n }\n\n if (_MAP.hasOwnProperty(key)) {\n _REVERSE_MAP[_MAP[key]] = key;\n }\n }\n }\n return _REVERSE_MAP;\n }\n\n /**\n * picks the best action based on the key combination\n *\n * @param {string} key - character for key\n * @param {Array} modifiers\n * @param {string=} action passed in\n */\n function _pickBestAction(key, modifiers, action) {\n\n // if no action was picked in we should try to pick the one\n // that we think would work best for this key\n if (!action) {\n action = _getReverseMap()[key] ? 'keydown' : 'keypress';\n }\n\n // modifier keys don't work as expected with keypress,\n // switch to keydown\n if (action == 'keypress' && modifiers.length) {\n action = 'keydown';\n }\n\n return action;\n }\n\n /**\n * Converts from a string key combination to an array\n *\n * @param {string} combination like \"command+shift+l\"\n * @return {Array}\n */\n function _keysFromString(combination) {\n if (combination === '+') {\n return ['+'];\n }\n\n combination = combination.replace(/\\+{2}/g, '+plus');\n return combination.split('+');\n }\n\n /**\n * Gets info for a specific key combination\n *\n * @param {string} combination key combination (\"command+s\" or \"a\" or \"*\")\n * @param {string=} action\n * @returns {Object}\n */\n function _getKeyInfo(combination, action) {\n var keys;\n var key;\n var i;\n var modifiers = [];\n\n // take the keys from this pattern and figure out what the actual\n // pattern is all about\n keys = _keysFromString(combination);\n\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n\n // normalize key names\n if (_SPECIAL_ALIASES[key]) {\n key = _SPECIAL_ALIASES[key];\n }\n\n // if this is not a keypress event then we should\n // be smart about using shift keys\n // this will only work for US keyboards however\n if (action && action != 'keypress' && _SHIFT_MAP[key]) {\n key = _SHIFT_MAP[key];\n modifiers.push('shift');\n }\n\n // if this key is a modifier then add it to the list of modifiers\n if (_isModifier(key)) {\n modifiers.push(key);\n }\n }\n\n // depending on what the key combination is\n // we will try to pick the best event for it\n action = _pickBestAction(key, modifiers, action);\n\n return {\n key: key,\n modifiers: modifiers,\n action: action\n };\n }\n\n function _belongsTo(element, ancestor) {\n if (element === null || element === document) {\n return false;\n }\n\n if (element === ancestor) {\n return true;\n }\n\n return _belongsTo(element.parentNode, ancestor);\n }\n\n function Mousetrap(targetElement) {\n var self = this;\n\n targetElement = targetElement || document;\n\n if (!(self instanceof Mousetrap)) {\n return new Mousetrap(targetElement);\n }\n\n /**\n * element to attach key events to\n *\n * @type {Element}\n */\n self.target = targetElement;\n\n /**\n * a list of all the callbacks setup via Mousetrap.bind()\n *\n * @type {Object}\n */\n self._callbacks = {};\n\n /**\n * direct map of string combinations to callbacks used for trigger()\n *\n * @type {Object}\n */\n self._directMap = {};\n\n /**\n * keeps track of what level each sequence is at since multiple\n * sequences can start out with the same sequence\n *\n * @type {Object}\n */\n var _sequenceLevels = {};\n\n /**\n * variable to store the setTimeout call\n *\n * @type {null|number}\n */\n var _resetTimer;\n\n /**\n * temporary state where we will ignore the next keyup\n *\n * @type {boolean|string}\n */\n var _ignoreNextKeyup = false;\n\n /**\n * temporary state where we will ignore the next keypress\n *\n * @type {boolean}\n */\n var _ignoreNextKeypress = false;\n\n /**\n * are we currently inside of a sequence?\n * type of action (\"keyup\" or \"keydown\" or \"keypress\") or false\n *\n * @type {boolean|string}\n */\n var _nextExpectedAction = false;\n\n /**\n * resets all sequence counters except for the ones passed in\n *\n * @param {Object} doNotReset\n * @returns void\n */\n function _resetSequences(doNotReset) {\n doNotReset = doNotReset || {};\n\n var activeSequences = false,\n key;\n\n for (key in _sequenceLevels) {\n if (doNotReset[key]) {\n activeSequences = true;\n continue;\n }\n _sequenceLevels[key] = 0;\n }\n\n if (!activeSequences) {\n _nextExpectedAction = false;\n }\n }\n\n /**\n * finds all callbacks that match based on the keycode, modifiers,\n * and action\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event|Object} e\n * @param {string=} sequenceName - name of the sequence we are looking for\n * @param {string=} combination\n * @param {number=} level\n * @returns {Array}\n */\n function _getMatches(character, modifiers, e, sequenceName, combination, level) {\n var i;\n var callback;\n var matches = [];\n var action = e.type;\n\n // if there are no events related to this keycode\n if (!self._callbacks[character]) {\n return [];\n }\n\n // if a modifier key is coming up on its own we should allow it\n if (action == 'keyup' && _isModifier(character)) {\n modifiers = [character];\n }\n\n // loop through all callbacks for the key that was pressed\n // and see if any of them match\n for (i = 0; i < self._callbacks[character].length; ++i) {\n callback = self._callbacks[character][i];\n\n // if a sequence name is not specified, but this is a sequence at\n // the wrong level then move onto the next match\n if (!sequenceName && callback.seq && _sequenceLevels[callback.seq] != callback.level) {\n continue;\n }\n\n // if the action we are looking for doesn't match the action we got\n // then we should keep going\n if (action != callback.action) {\n continue;\n }\n\n // if this is a keypress event and the meta key and control key\n // are not pressed that means that we need to only look at the\n // character, otherwise check the modifiers as well\n //\n // chrome will not fire a keypress if meta or control is down\n // safari will fire a keypress if meta or meta+shift is down\n // firefox will fire a keypress if meta or control is down\n if ((action == 'keypress' && !e.metaKey && !e.ctrlKey) || _modifiersMatch(modifiers, callback.modifiers)) {\n\n // when you bind a combination or sequence a second time it\n // should overwrite the first one. if a sequenceName or\n // combination is specified in this call it does just that\n //\n // @todo make deleting its own method?\n var deleteCombo = !sequenceName && callback.combo == combination;\n var deleteSequence = sequenceName && callback.seq == sequenceName && callback.level == level;\n if (deleteCombo || deleteSequence) {\n self._callbacks[character].splice(i, 1);\n }\n\n matches.push(callback);\n }\n }\n\n return matches;\n }\n\n /**\n * actually calls the callback function\n *\n * if your callback function returns false this will use the jquery\n * convention - prevent default and stop propogation on the event\n *\n * @param {Function} callback\n * @param {Event} e\n * @returns void\n */\n function _fireCallback(callback, e, combo, sequence) {\n\n // if this event should not happen stop here\n if (self.stopCallback(e, e.target || e.srcElement, combo, sequence)) {\n return;\n }\n\n if (callback(e, combo) === false) {\n _preventDefault(e);\n _stopPropagation(e);\n }\n }\n\n /**\n * handles a character key event\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event} e\n * @returns void\n */\n self._handleKey = function(character, modifiers, e) {\n var callbacks = _getMatches(character, modifiers, e);\n var i;\n var doNotReset = {};\n var maxLevel = 0;\n var processedSequenceCallback = false;\n\n // Calculate the maxLevel for sequences so we can only execute the longest callback sequence\n for (i = 0; i < callbacks.length; ++i) {\n if (callbacks[i].seq) {\n maxLevel = Math.max(maxLevel, callbacks[i].level);\n }\n }\n\n // loop through matching callbacks for this key event\n for (i = 0; i < callbacks.length; ++i) {\n\n // fire for all sequence callbacks\n // this is because if for example you have multiple sequences\n // bound such as \"g i\" and \"g t\" they both need to fire the\n // callback for matching g cause otherwise you can only ever\n // match the first one\n if (callbacks[i].seq) {\n\n // only fire callbacks for the maxLevel to prevent\n // subsequences from also firing\n //\n // for example 'a option b' should not cause 'option b' to fire\n // even though 'option b' is part of the other sequence\n //\n // any sequences that do not match here will be discarded\n // below by the _resetSequences call\n if (callbacks[i].level != maxLevel) {\n continue;\n }\n\n processedSequenceCallback = true;\n\n // keep a list of which sequences were matches for later\n doNotReset[callbacks[i].seq] = 1;\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo, callbacks[i].seq);\n continue;\n }\n\n // if there were no sequence matches but we are still here\n // that means this is a regular match so we should fire that\n if (!processedSequenceCallback) {\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo);\n }\n }\n\n // if the key you pressed matches the type of sequence without\n // being a modifier (ie \"keyup\" or \"keypress\") then we should\n // reset all sequences that were not matched by this event\n //\n // this is so, for example, if you have the sequence \"h a t\" and you\n // type \"h e a r t\" it does not match. in this case the \"e\" will\n // cause the sequence to reset\n //\n // modifier keys are ignored because you can have a sequence\n // that contains modifiers such as \"enter ctrl+space\" and in most\n // cases the modifier key will be pressed before the next key\n //\n // also if you have a sequence such as \"ctrl+b a\" then pressing the\n // \"b\" key will trigger a \"keypress\" and a \"keydown\"\n //\n // the \"keydown\" is expected when there is a modifier, but the\n // \"keypress\" ends up matching the _nextExpectedAction since it occurs\n // after and that causes the sequence to reset\n //\n // we ignore keypresses in a sequence that directly follow a keydown\n // for the same character\n var ignoreThisKeypress = e.type == 'keypress' && _ignoreNextKeypress;\n if (e.type == _nextExpectedAction && !_isModifier(character) && !ignoreThisKeypress) {\n _resetSequences(doNotReset);\n }\n\n _ignoreNextKeypress = processedSequenceCallback && e.type == 'keydown';\n };\n\n /**\n * handles a keydown event\n *\n * @param {Event} e\n * @returns void\n */\n function _handleKeyEvent(e) {\n\n // normalize e.which for key events\n // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion\n if (typeof e.which !== 'number') {\n e.which = e.keyCode;\n }\n\n var character = _characterFromEvent(e);\n\n // no character found then stop\n if (!character) {\n return;\n }\n\n // need to use === for the character check because the character can be 0\n if (e.type == 'keyup' && _ignoreNextKeyup === character) {\n _ignoreNextKeyup = false;\n return;\n }\n\n self.handleKey(character, _eventModifiers(e), e);\n }\n\n /**\n * called to set a 1 second timeout on the specified sequence\n *\n * this is so after each key press in the sequence you have 1 second\n * to press the next key before you have to start over\n *\n * @returns void\n */\n function _resetSequenceTimer() {\n clearTimeout(_resetTimer);\n _resetTimer = setTimeout(_resetSequences, 1000);\n }\n\n /**\n * binds a key sequence to an event\n *\n * @param {string} combo - combo specified in bind call\n * @param {Array} keys\n * @param {Function} callback\n * @param {string=} action\n * @returns void\n */\n function _bindSequence(combo, keys, callback, action) {\n\n // start off by adding a sequence level record for this combination\n // and setting the level to 0\n _sequenceLevels[combo] = 0;\n\n /**\n * callback to increase the sequence level for this sequence and reset\n * all other sequences that were active\n *\n * @param {string} nextAction\n * @returns {Function}\n */\n function _increaseSequence(nextAction) {\n return function() {\n _nextExpectedAction = nextAction;\n ++_sequenceLevels[combo];\n _resetSequenceTimer();\n };\n }\n\n /**\n * wraps the specified callback inside of another function in order\n * to reset all sequence counters as soon as this sequence is done\n *\n * @param {Event} e\n * @returns void\n */\n function _callbackAndReset(e) {\n _fireCallback(callback, e, combo);\n\n // we should ignore the next key up if the action is key down\n // or keypress. this is so if you finish a sequence and\n // release the key the final key will not trigger a keyup\n if (action !== 'keyup') {\n _ignoreNextKeyup = _characterFromEvent(e);\n }\n\n // weird race condition if a sequence ends with the key\n // another sequence begins with\n setTimeout(_resetSequences, 10);\n }\n\n // loop through keys one at a time and bind the appropriate callback\n // function. for any key leading up to the final one it should\n // increase the sequence. after the final, it should reset all sequences\n //\n // if an action is specified in the original bind call then that will\n // be used throughout. otherwise we will pass the action that the\n // next key in the sequence should match. this allows a sequence\n // to mix and match keypress and keydown events depending on which\n // ones are better suited to the key provided\n for (var i = 0; i < keys.length; ++i) {\n var isFinal = i + 1 === keys.length;\n var wrappedCallback = isFinal ? _callbackAndReset : _increaseSequence(action || _getKeyInfo(keys[i + 1]).action);\n _bindSingle(keys[i], wrappedCallback, action, combo, i);\n }\n }\n\n /**\n * binds a single keyboard combination\n *\n * @param {string} combination\n * @param {Function} callback\n * @param {string=} action\n * @param {string=} sequenceName - name of sequence if part of sequence\n * @param {number=} level - what part of the sequence the command is\n * @returns void\n */\n function _bindSingle(combination, callback, action, sequenceName, level) {\n\n // store a direct mapped reference for use with Mousetrap.trigger\n self._directMap[combination + ':' + action] = callback;\n\n // make sure multiple spaces in a row become a single space\n combination = combination.replace(/\\s+/g, ' ');\n\n var sequence = combination.split(' ');\n var info;\n\n // if this pattern is a sequence of keys then run through this method\n // to reprocess each pattern one key at a time\n if (sequence.length > 1) {\n _bindSequence(combination, sequence, callback, action);\n return;\n }\n\n info = _getKeyInfo(combination, action);\n\n // make sure to initialize array if this is the first time\n // a callback is added for this key\n self._callbacks[info.key] = self._callbacks[info.key] || [];\n\n // remove an existing match if there is one\n _getMatches(info.key, info.modifiers, {type: info.action}, sequenceName, combination, level);\n\n // add this call back to the array\n // if it is a sequence put it at the beginning\n // if not put it at the end\n //\n // this is important because the way these are processed expects\n // the sequence ones to come first\n self._callbacks[info.key][sequenceName ? 'unshift' : 'push']({\n callback: callback,\n modifiers: info.modifiers,\n action: info.action,\n seq: sequenceName,\n level: level,\n combo: combination\n });\n }\n\n /**\n * binds multiple combinations to the same callback\n *\n * @param {Array} combinations\n * @param {Function} callback\n * @param {string|undefined} action\n * @returns void\n */\n self._bindMultiple = function(combinations, callback, action) {\n for (var i = 0; i < combinations.length; ++i) {\n _bindSingle(combinations[i], callback, action);\n }\n };\n\n // start!\n _addEvent(targetElement, 'keypress', _handleKeyEvent);\n _addEvent(targetElement, 'keydown', _handleKeyEvent);\n _addEvent(targetElement, 'keyup', _handleKeyEvent);\n }\n\n /**\n * binds an event to mousetrap\n *\n * can be a single key, a combination of keys separated with +,\n * an array of keys, or a sequence of keys separated by spaces\n *\n * be sure to list the modifier keys first to make sure that the\n * correct key ends up getting bound (the last key in the pattern)\n *\n * @param {string|Array} keys\n * @param {Function} callback\n * @param {string=} action - 'keypress', 'keydown', or 'keyup'\n * @returns void\n */\n Mousetrap.prototype.bind = function(keys, callback, action) {\n var self = this;\n keys = keys instanceof Array ? keys : [keys];\n self._bindMultiple.call(self, keys, callback, action);\n return self;\n };\n\n /**\n * unbinds an event to mousetrap\n *\n * the unbinding sets the callback function of the specified key combo\n * to an empty function and deletes the corresponding key in the\n * _directMap dict.\n *\n * TODO: actually remove this from the _callbacks dictionary instead\n * of binding an empty function\n *\n * the keycombo+action has to be exactly the same as\n * it was defined in the bind method\n *\n * @param {string|Array} keys\n * @param {string} action\n * @returns void\n */\n Mousetrap.prototype.unbind = function(keys, action) {\n var self = this;\n return self.bind.call(self, keys, function() {}, action);\n };\n\n /**\n * triggers an event that has already been bound\n *\n * @param {string} keys\n * @param {string=} action\n * @returns void\n */\n Mousetrap.prototype.trigger = function(keys, action) {\n var self = this;\n if (self._directMap[keys + ':' + action]) {\n self._directMap[keys + ':' + action]({}, keys);\n }\n return self;\n };\n\n /**\n * resets the library back to its initial state. this is useful\n * if you want to clear out the current keyboard shortcuts and bind\n * new ones - for example if you switch to another page\n *\n * @returns void\n */\n Mousetrap.prototype.reset = function() {\n var self = this;\n self._callbacks = {};\n self._directMap = {};\n return self;\n };\n\n /**\n * should we stop this event before firing off callbacks\n *\n * @param {Event} e\n * @param {Element} element\n * @return {boolean}\n */\n Mousetrap.prototype.stopCallback = function(e, element) {\n var self = this;\n\n // if the element has the class \"mousetrap\" then no need to stop\n if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {\n return false;\n }\n\n if (_belongsTo(element, self.target)) {\n return false;\n }\n\n // Events originating from a shadow DOM are re-targetted and `e.target` is the shadow host,\n // not the initial event target in the shadow tree. Note that not all events cross the\n // shadow boundary.\n // For shadow trees with `mode: 'open'`, the initial event target is the first element in\n // the event’s composed path. For shadow trees with `mode: 'closed'`, the initial event\n // target cannot be obtained.\n if ('composedPath' in e && typeof e.composedPath === 'function') {\n // For open shadow trees, update `element` so that the following check works.\n var initialEventTarget = e.composedPath()[0];\n if (initialEventTarget !== e.target) {\n element = initialEventTarget;\n }\n }\n\n // stop for input, select, and textarea\n return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable;\n };\n\n /**\n * exposes _handleKey publicly so it can be overwritten by extensions\n */\n Mousetrap.prototype.handleKey = function() {\n var self = this;\n return self._handleKey.apply(self, arguments);\n };\n\n /**\n * allow custom key mappings\n */\n Mousetrap.addKeycodes = function(object) {\n for (var key in object) {\n if (object.hasOwnProperty(key)) {\n _MAP[key] = object[key];\n }\n }\n _REVERSE_MAP = null;\n };\n\n /**\n * Init the global mousetrap functions\n *\n * This method is needed to allow the global mousetrap functions to work\n * now that mousetrap is a constructor function.\n */\n Mousetrap.init = function() {\n var documentMousetrap = Mousetrap(document);\n for (var method in documentMousetrap) {\n if (method.charAt(0) !== '_') {\n Mousetrap[method] = (function(method) {\n return function() {\n return documentMousetrap[method].apply(documentMousetrap, arguments);\n };\n } (method));\n }\n }\n };\n\n Mousetrap.init();\n\n // expose mousetrap to the global object\n window.Mousetrap = Mousetrap;\n\n // expose as a common js module\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = Mousetrap;\n }\n\n // expose mousetrap as an AMD module\n if (typeof define === 'function' && define.amd) {\n define(function() {\n return Mousetrap;\n });\n }\n}) (typeof window !== 'undefined' ? window : null, typeof window !== 'undefined' ? document : null);\n","module.exports = global[\"classNames\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\index.js\");","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n;(function($){\n var zepto = $.zepto, oldQsa = zepto.qsa, oldMatches = zepto.matches\n\n function visible(elem){\n elem = $(elem)\n return !!(elem.width() || elem.height()) && elem.css(\"display\") !== \"none\"\n }\n\n // Implements a subset from:\n // http://api.jquery.com/category/selectors/jquery-selector-extensions/\n //\n // Each filter function receives the current index, all nodes in the\n // considered set, and a value if there were parentheses. The value\n // of `this` is the node currently being considered. The function returns the\n // resulting node(s), null, or undefined.\n //\n // Complex selectors are not supported:\n // li:has(label:contains(\"foo\")) + li:has(label:contains(\"bar\"))\n // ul.inner:first > li\n var filters = $.expr[':'] = {\n visible: function(){ if (visible(this)) return this },\n hidden: function(){ if (!visible(this)) return this },\n selected: function(){ if (this.selected) return this },\n checked: function(){ if (this.checked) return this },\n parent: function(){ return this.parentNode },\n first: function(idx){ if (idx === 0) return this },\n last: function(idx, nodes){ if (idx === nodes.length - 1) return this },\n eq: function(idx, _, value){ if (idx === value) return this },\n contains: function(idx, _, text){ if ($(this).text().indexOf(text) > -1) return this },\n has: function(idx, _, sel){ if (zepto.qsa(this, sel).length) return this }\n }\n\n var filterRe = new RegExp('(.*):(\\\\w+)(?:\\\\(([^)]+)\\\\))?$\\\\s*'),\n childRe = /^\\s*>/,\n classTag = 'Zepto' + (+new Date())\n\n function process(sel, fn) {\n // quote the hash in `a[href^=#]` expression\n sel = sel.replace(/=#\\]/g, '=\"#\"]')\n var filter, arg, match = filterRe.exec(sel)\n if (match && match[2] in filters) {\n filter = filters[match[2]], arg = match[3]\n sel = match[1]\n if (arg) {\n var num = Number(arg)\n if (isNaN(num)) arg = arg.replace(/^[\"']|[\"']$/g, '')\n else arg = num\n }\n }\n return fn(sel, filter, arg)\n }\n\n zepto.qsa = function(node, selector) {\n return process(selector, function(sel, filter, arg){\n try {\n var taggedParent\n if (!sel && filter) sel = '*'\n else if (childRe.test(sel))\n // support \"> *\" child queries by tagging the parent node with a\n // unique class and prepending that classname onto the selector\n taggedParent = $(node).addClass(classTag), sel = '.'+classTag+' '+sel\n\n var nodes = oldQsa(node, sel)\n } catch(e) {\n console.error('error performing selector: %o', selector)\n throw e\n } finally {\n if (taggedParent) taggedParent.removeClass(classTag)\n }\n return !filter ? nodes :\n zepto.uniq($.map(nodes, function(n, i){ return filter.call(n, i, nodes, arg) }))\n })\n }\n\n zepto.matches = function(node, selector){\n return process(selector, function(sel, filter, arg){\n return (!sel || oldMatches(node, sel)) &&\n (!filter || filter.call(node, null, arg) === node)\n })\n }\n})(Zepto)\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n// The following code is heavily inspired by jQuery's $.fn.data()\n\n;(function($){\n var data = {}, dataAttr = $.fn.data, camelize = $.camelCase,\n exp = $.expando = 'Zepto' + (+new Date()), emptyArray = []\n\n // Get value from node:\n // 1. first try key as given,\n // 2. then try camelized key,\n // 3. fall back to reading \"data-*\" attribute.\n function getData(node, name) {\n var id = node[exp], store = id && data[id]\n if (name === undefined) return store || setData(node)\n else {\n if (store) {\n if (name in store) return store[name]\n var camelName = camelize(name)\n if (camelName in store) return store[camelName]\n }\n return dataAttr.call($(node), name)\n }\n }\n\n // Store value under camelized key on node\n function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }\n\n // Read all \"data-*\" attributes from a node\n function attributeData(node) {\n var store = {}\n $.each(node.attributes || emptyArray, function(i, attr){\n if (attr.name.indexOf('data-') == 0)\n store[camelize(attr.name.replace('data-', ''))] =\n $.zepto.deserializeValue(attr.value)\n })\n return store\n }\n\n $.fn.data = function(name, value) {\n return value === undefined ?\n // set multiple values via object\n $.isPlainObject(name) ?\n this.each(function(i, node){\n $.each(name, function(key, value){ setData(node, key, value) })\n }) :\n // get value from first element\n (0 in this ? getData(this[0], name) : undefined) :\n // set value on all elements\n this.each(function(){ setData(this, name, value) })\n }\n\n $.data = function(elem, name, value) {\n return $(elem).data(name, value)\n }\n\n $.hasData = function(elem) {\n var id = elem[exp], store = id && data[id]\n return store ? !$.isEmptyObject(store) : false\n }\n\n $.fn.removeData = function(names) {\n if (typeof names == 'string') names = names.split(/\\s+/)\n return this.each(function(){\n var id = this[exp], store = id && data[id]\n if (store) $.each(names || store, function(key){\n delete store[names ? camelize(this) : key]\n })\n })\n }\n\n // Generate extended `remove` and `empty` functions\n ;['remove', 'empty'].forEach(function(methodName){\n var origFn = $.fn[methodName]\n $.fn[methodName] = function() {\n var elements = this.find('*')\n if (methodName === 'remove') elements = elements.add(this)\n elements.removeData()\n return origFn.call(this)\n }\n })\n})(Zepto)\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n;(function($, undefined){\n var prefix = '', eventPrefix,\n vendors = { Webkit: 'webkit', Moz: '', O: 'o' },\n testEl = document.createElement('div'),\n supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,\n transform,\n transitionProperty, transitionDuration, transitionTiming, transitionDelay,\n animationName, animationDuration, animationTiming, animationDelay,\n cssReset = {}\n\n function dasherize(str) { return str.replace(/([A-Z])/g, '-$1').toLowerCase() }\n function normalizeEvent(name) { return eventPrefix ? eventPrefix + name : name.toLowerCase() }\n\n if (testEl.style.transform === undefined) $.each(vendors, function(vendor, event){\n if (testEl.style[vendor + 'TransitionProperty'] !== undefined) {\n prefix = '-' + vendor.toLowerCase() + '-'\n eventPrefix = event\n return false\n }\n })\n\n transform = prefix + 'transform'\n cssReset[transitionProperty = prefix + 'transition-property'] =\n cssReset[transitionDuration = prefix + 'transition-duration'] =\n cssReset[transitionDelay = prefix + 'transition-delay'] =\n cssReset[transitionTiming = prefix + 'transition-timing-function'] =\n cssReset[animationName = prefix + 'animation-name'] =\n cssReset[animationDuration = prefix + 'animation-duration'] =\n cssReset[animationDelay = prefix + 'animation-delay'] =\n cssReset[animationTiming = prefix + 'animation-timing-function'] = ''\n\n $.fx = {\n off: (eventPrefix === undefined && testEl.style.transitionProperty === undefined),\n speeds: { _default: 400, fast: 200, slow: 600 },\n cssPrefix: prefix,\n transitionEnd: normalizeEvent('TransitionEnd'),\n animationEnd: normalizeEvent('AnimationEnd')\n }\n\n $.fn.animate = function(properties, duration, ease, callback, delay){\n if ($.isFunction(duration))\n callback = duration, ease = undefined, duration = undefined\n if ($.isFunction(ease))\n callback = ease, ease = undefined\n if ($.isPlainObject(duration))\n ease = duration.easing, callback = duration.complete, delay = duration.delay, duration = duration.duration\n if (duration) duration = (typeof duration == 'number' ? duration :\n ($.fx.speeds[duration] || $.fx.speeds._default)) / 1000\n if (delay) delay = parseFloat(delay) / 1000\n return this.anim(properties, duration, ease, callback, delay)\n }\n\n $.fn.anim = function(properties, duration, ease, callback, delay){\n var key, cssValues = {}, cssProperties, transforms = '',\n that = this, wrappedCallback, endEvent = $.fx.transitionEnd,\n fired = false\n\n if (duration === undefined) duration = $.fx.speeds._default / 1000\n if (delay === undefined) delay = 0\n if ($.fx.off) duration = 0\n\n if (typeof properties == 'string') {\n // keyframe animation\n cssValues[animationName] = properties\n cssValues[animationDuration] = duration + 's'\n cssValues[animationDelay] = delay + 's'\n cssValues[animationTiming] = (ease || 'linear')\n endEvent = $.fx.animationEnd\n } else {\n cssProperties = []\n // CSS transitions\n for (key in properties)\n if (supportedTransforms.test(key)) transforms += key + '(' + properties[key] + ') '\n else cssValues[key] = properties[key], cssProperties.push(dasherize(key))\n\n if (transforms) cssValues[transform] = transforms, cssProperties.push(transform)\n if (duration > 0 && typeof properties === 'object') {\n cssValues[transitionProperty] = cssProperties.join(', ')\n cssValues[transitionDuration] = duration + 's'\n cssValues[transitionDelay] = delay + 's'\n cssValues[transitionTiming] = (ease || 'linear')\n }\n }\n\n wrappedCallback = function(event){\n if (typeof event !== 'undefined') {\n if (event.target !== event.currentTarget) return // makes sure the event didn't bubble from \"below\"\n $(event.target).unbind(endEvent, wrappedCallback)\n } else\n $(this).unbind(endEvent, wrappedCallback) // triggered by setTimeout\n\n fired = true\n $(this).css(cssReset)\n callback && callback.call(this)\n }\n if (duration > 0){\n this.bind(endEvent, wrappedCallback)\n // transitionEnd is not always firing on older Android phones\n // so make sure it gets fired\n setTimeout(function(){\n if (fired) return\n wrappedCallback.call(that)\n }, ((duration + delay) * 1000) + 25)\n }\n\n // trigger page reflow so new elements can animate\n this.size() && this.get(0).clientLeft\n\n this.css(cssValues)\n\n if (duration <= 0) setTimeout(function() {\n that.each(function(){ wrappedCallback.call(this) })\n }, 0)\n\n return this\n }\n\n testEl = null\n})(Zepto)\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n;(function($, undefined){\n var document = window.document, docElem = document.documentElement,\n origShow = $.fn.show, origHide = $.fn.hide, origToggle = $.fn.toggle\n\n function anim(el, speed, opacity, scale, callback) {\n if (typeof speed == 'function' && !callback) callback = speed, speed = undefined\n var props = { opacity: opacity }\n if (scale) {\n props.scale = scale\n el.css($.fx.cssPrefix + 'transform-origin', '0 0')\n }\n return el.animate(props, speed, null, callback)\n }\n\n function hide(el, speed, scale, callback) {\n return anim(el, speed, 0, scale, function(){\n origHide.call($(this))\n callback && callback.call(this)\n })\n }\n\n $.fn.show = function(speed, callback) {\n origShow.call(this)\n if (speed === undefined) speed = 0\n else this.css('opacity', 0)\n return anim(this, speed, 1, '1,1', callback)\n }\n\n $.fn.hide = function(speed, callback) {\n if (speed === undefined) return origHide.call(this)\n else return hide(this, speed, '0,0', callback)\n }\n\n $.fn.toggle = function(speed, callback) {\n if (speed === undefined || typeof speed == 'boolean')\n return origToggle.call(this, speed)\n else return this.each(function(){\n var el = $(this)\n el[el.css('display') == 'none' ? 'show' : 'hide'](speed, callback)\n })\n }\n\n $.fn.fadeTo = function(speed, opacity, callback) {\n return anim(this, speed, opacity, null, callback)\n }\n\n $.fn.fadeIn = function(speed, callback) {\n var target = this.css('opacity')\n if (target > 0) this.css('opacity', 0)\n else target = 1\n return origShow.call(this).fadeTo(speed, target, callback)\n }\n\n $.fn.fadeOut = function(speed, callback) {\n return hide(this, speed, null, callback)\n }\n\n $.fn.fadeToggle = function(speed, callback) {\n return this.each(function(){\n var el = $(this)\n el[\n (el.css('opacity') == 0 || el.css('display') == 'none') ? 'fadeIn' : 'fadeOut'\n ](speed, callback)\n })\n }\n\n})(Zepto)\n","/*!\n * HC-Sticky\n * =========\n * Version: 2.2.3\n * Author: Some Web Media\n * Author URL: http://somewebmedia.com\n * Plugin URL: https://github.com/somewebmedia/hc-sticky\n * Description: Cross-browser plugin that makes any element on your page visible while you scroll\n * License: MIT\n */\n!function(t,e){\"use strict\";if(\"object\"==typeof module&&\"object\"==typeof module.exports){if(!t.document)throw new Error(\"HC-Sticky requires a browser to run.\");module.exports=e(t)}else\"function\"==typeof define&&define.amd?define(\"hcSticky\",[],e(t)):e(t)}(\"undefined\"!=typeof window?window:this,function(U){\"use strict\";var Y={top:0,bottom:0,bottomEnd:0,innerTop:0,innerSticker:null,stickyClass:\"sticky\",stickTo:null,followScroll:!0,responsive:null,mobileFirst:!1,onStart:null,onStop:null,onBeforeResize:null,onResize:null,resizeDebounce:100,disable:!1,queries:null,queryFlow:\"down\"},$=function(t,e,o){console.log(\"%c! HC Sticky:%c \"+t+\"%c \"+o+\" is now deprecated and will be removed. Use%c \"+e+\"%c instead.\",\"color: red\",\"color: darkviolet\",\"color: black\",\"color: darkviolet\",\"color: black\")},Q=U.document,X=function(n,f){var o=this;if(\"string\"==typeof n&&(n=Q.querySelector(n)),!n)return!1;f.queries&&$(\"queries\",\"responsive\",\"option\"),f.queryFlow&&$(\"queryFlow\",\"mobileFirst\",\"option\");var p={},d=X.Helpers,s=n.parentNode;\"static\"===d.getStyle(s,\"position\")&&(s.style.position=\"relative\");var u=function(){var t=0>>0;if(\"function\"!=typeof t)throw new TypeError(t+\" is not a function\");for(1 0) index-- // up\n if (e.which == 40 && index < $items.length - 1) index++ // down\n if (!~index) index = 0\n\n $items.eq(index).trigger('focus')\n }\n\n\n // DROPDOWN PLUGIN DEFINITION\n // ==========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.dropdown')\n\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n if (typeof option == 'string') data[option].call($this)\n })\n }\n\n var old = $.fn.dropdown\n\n $.fn.dropdown = Plugin\n $.fn.dropdown.Constructor = Dropdown\n\n\n // DROPDOWN NO CONFLICT\n // ====================\n\n $.fn.dropdown.noConflict = function () {\n $.fn.dropdown = old\n return this\n }\n\n\n // APPLY TO STANDARD DROPDOWN ELEMENTS\n // ===================================\n\n $(document)\n .on('click.bs.dropdown.data-api', clearMenus)\n .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\n .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)\n .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)\n .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)\n\n}(jQuery);\n","/* ========================================================================\n * Bootstrap: transition.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#transitions\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)\n // ============================================================\n\n function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n WebkitTransition : 'webkitTransitionEnd',\n MozTransition : 'transitionend',\n OTransition : 'oTransitionEnd otransitionend',\n transition : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n\n return false // explicit for ie8 ( ._.)\n }\n\n // https://blog.alexmaccaw.com/css-transitions\n $.fn.emulateTransitionEnd = function (duration) {\n var called = false\n var $el = this\n $(this).one('bsTransitionEnd', function () { called = true })\n var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\n setTimeout(callback, duration)\n return this\n }\n\n $(function () {\n $.support.transition = transitionEnd()\n\n if (!$.support.transition) return\n\n $.event.special.bsTransitionEnd = {\n bindType: $.support.transition.end,\n delegateType: $.support.transition.end,\n handle: function (e) {\n if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)\n }\n }\n })\n\n}(jQuery);\n","/* eslint-disable */\n;(function() {\n\"use strict\"\n/* eslint-enable */\nStream.SKIP = {}\nStream.lift = lift\nStream.scan = scan\nStream.merge = merge\nStream.combine = combine\nStream.scanMerge = scanMerge\nStream[\"fantasy-land/of\"] = Stream\n\nvar warnedHalt = false\nObject.defineProperty(Stream, \"HALT\", {\n\tget: function() {\n\t\twarnedHalt || console.log(\"HALT is deprecated and has been renamed to SKIP\");\n\t\twarnedHalt = true\n\t\treturn Stream.SKIP\n\t}\n})\n\nfunction Stream(value) {\n\tvar dependentStreams = []\n\tvar dependentFns = []\n\n\tfunction stream(v) {\n\t\tif (arguments.length && v !== Stream.SKIP) {\n\t\t\tvalue = v\n\t\t\tif (open(stream)) {\n\t\t\t\tstream._changing()\n\t\t\t\tstream._state = \"active\"\n\t\t\t\tdependentStreams.forEach(function(s, i) { s(dependentFns[i](value)) })\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n\tstream.constructor = Stream\n\tstream._state = arguments.length && value !== Stream.SKIP ? \"active\" : \"pending\"\n\tstream._parents = []\n\n\tstream._changing = function() {\n\t\tif (open(stream)) stream._state = \"changing\"\n\t\tdependentStreams.forEach(function(s) {\n\t\t\ts._changing()\n\t\t})\n\t}\n\n\tstream._map = function(fn, ignoreInitial) {\n\t\tvar target = ignoreInitial ? Stream() : Stream(fn(value))\n\t\ttarget._parents.push(stream)\n\t\tdependentStreams.push(target)\n\t\tdependentFns.push(fn)\n\t\treturn target\n\t}\n\n\tstream.map = function(fn) {\n\t\treturn stream._map(fn, stream._state !== \"active\")\n\t}\n\n\tvar end\n\tfunction createEnd() {\n\t\tend = Stream()\n\t\tend.map(function(value) {\n\t\t\tif (value === true) {\n\t\t\t\tstream._parents.forEach(function (p) {p._unregisterChild(stream)})\n\t\t\t\tstream._state = \"ended\"\n\t\t\t\tstream._parents.length = dependentStreams.length = dependentFns.length = 0\n\t\t\t}\n\t\t\treturn value\n\t\t})\n\t\treturn end\n\t}\n\n\tstream.toJSON = function() { return value != null && typeof value.toJSON === \"function\" ? value.toJSON() : value }\n\n\tstream[\"fantasy-land/map\"] = stream.map\n\tstream[\"fantasy-land/ap\"] = function(x) { return combine(function(s1, s2) { return s1()(s2()) }, [x, stream]) }\n\n\tstream._unregisterChild = function(child) {\n\t\tvar childIndex = dependentStreams.indexOf(child)\n\t\tif (childIndex !== -1) {\n\t\t\tdependentStreams.splice(childIndex, 1)\n\t\t\tdependentFns.splice(childIndex, 1)\n\t\t}\n\t}\n\n\tObject.defineProperty(stream, \"end\", {\n\t\tget: function() { return end || createEnd() }\n\t})\n\n\treturn stream\n}\n\nfunction combine(fn, streams) {\n\tvar ready = streams.every(function(s) {\n\t\tif (s.constructor !== Stream)\n\t\t\tthrow new Error(\"Ensure that each item passed to stream.combine/stream.merge/lift is a stream\")\n\t\treturn s._state === \"active\"\n\t})\n\tvar stream = ready\n\t\t? Stream(fn.apply(null, streams.concat([streams])))\n\t\t: Stream()\n\n\tvar changed = []\n\n\tvar mappers = streams.map(function(s) {\n\t\treturn s._map(function(value) {\n\t\t\tchanged.push(s)\n\t\t\tif (ready || streams.every(function(s) { return s._state !== \"pending\" })) {\n\t\t\t\tready = true\n\t\t\t\tstream(fn.apply(null, streams.concat([changed])))\n\t\t\t\tchanged = []\n\t\t\t}\n\t\t\treturn value\n\t\t}, true)\n\t})\n\n\tvar endStream = stream.end.map(function(value) {\n\t\tif (value === true) {\n\t\t\tmappers.forEach(function(mapper) { mapper.end(true) })\n\t\t\tendStream.end(true)\n\t\t}\n\t\treturn undefined\n\t})\n\n\treturn stream\n}\n\nfunction merge(streams) {\n\treturn combine(function() { return streams.map(function(s) { return s() }) }, streams)\n}\n\nfunction scan(fn, acc, origin) {\n\tvar stream = origin.map(function(v) {\n\t\tvar next = fn(acc, v)\n\t\tif (next !== Stream.SKIP) acc = next\n\t\treturn next\n\t})\n\tstream(acc)\n\treturn stream\n}\n\nfunction scanMerge(tuples, seed) {\n\tvar streams = tuples.map(function(tuple) { return tuple[0] })\n\n\tvar stream = combine(function() {\n\t\tvar changed = arguments[arguments.length - 1]\n\t\tstreams.forEach(function(stream, i) {\n\t\t\tif (changed.indexOf(stream) > -1)\n\t\t\t\tseed = tuples[i][1](seed, stream())\n\t\t})\n\n\t\treturn seed\n\t}, streams)\n\n\tstream(seed)\n\n\treturn stream\n}\n\nfunction lift() {\n\tvar fn = arguments[0]\n\tvar streams = Array.prototype.slice.call(arguments, 1)\n\treturn merge(streams).map(function(streams) {\n\t\treturn fn.apply(undefined, streams)\n\t})\n}\n\nfunction open(s) {\n\treturn s._state === \"pending\" || s._state === \"active\" || s._state === \"changing\"\n}\n\nif (typeof module !== \"undefined\") module[\"exports\"] = Stream\nelse if (typeof window.m === \"function\" && !(\"stream\" in window.m)) window.m.stream = Stream\nelse window.m = {stream : Stream}\n\n}());\n","/*\r\n * This file is part of Flarum.\r\n *\r\n * (c) Toby Zerner \r\n *\r\n * For the full copyright and license information, please view the LICENSE\r\n * file that was distributed with this source code.\r\n */\r\n\r\nexport * from './src/common';\r\nexport * from './src/admin';"],"sourceRoot":""} \ No newline at end of file diff --git a/js/dist/forum.js b/js/dist/forum.js index 8d0de42c5..c9175abaa 100644 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -1,4 +1,4 @@ -flarum.core=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=144)}([function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e=0&&(m+=t.slice(n,a)),f>=0&&(m+=(n<0?"?":"&")+l.slice(f,d));var v=r(c);return v&&(m+=(n<0&&f<0?"?":"&")+v),i>=0&&(m+=t.slice(i)),p>=0&&(m+=(i<0?"":"&")+l.slice(p)),m}},function(t,e,n){"use strict";var r=n(14);t.exports=function(t){var e=t.indexOf("?"),n=t.indexOf("#"),o=n<0?t.length:n,i=e<0?o:e,a=t.slice(0,i).replace(/\/{2,}/g,"/");return a?("/"!==a[0]&&(a="/"+a),a.length>1&&"/"===a[a.length-1]&&(a=a.slice(0,-1))):a="/",{path:a,params:e<0?{}:r(t.slice(e+1,o))}}},function(t,e,n){"use strict";var r=n(2),o=n(7),i=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,a={},s={}.hasOwnProperty;function u(t){for(var e in t)if(s.call(t,e))return!1;return!0}t.exports=function(t){if(null==t||"string"!=typeof t&&"function"!=typeof t&&"function"!=typeof t.view)throw Error("The selector must be either a string or a component.");var e=o.apply(1,arguments);return"string"==typeof t&&(e.children=r.normalizeChildren(e.children),"["!==t)?function(t,e){var n=e.attrs,o=r.normalizeChildren(e.children),i=s.call(n,"class"),a=i?n.class:n.className;if(e.tag=t.tag,e.attrs=null,e.children=void 0,!u(t.attrs)&&!u(n)){var c={};for(var l in n)s.call(n,l)&&(c[l]=n[l]);n=c}for(var l in t.attrs)s.call(t.attrs,l)&&"className"!==l&&!s.call(n,l)&&(n[l]=t.attrs[l]);for(var l in null==a&&null==t.attrs.className||(n.className=null!=a?null!=t.attrs.className?String(t.attrs.className)+" "+String(a):a:null!=t.attrs.className?t.attrs.className:null),i&&(n.class=null),n)if(s.call(n,l)&&"key"!==l){e.attrs=n;break}return Array.isArray(o)&&1===o.length&&null!=o[0]&&"#"===o[0].tag?e.text=o[0].children:e.children=o,e}(a[t]||function(t){for(var e,n="div",r=[],o={};e=i.exec(t);){var s=e[1],u=e[2];if(""===s&&""!==u)n=u;else if("#"===s)o.id=u;else if("."===s)r.push(u);else if("["===e[3][0]){var c=e[6];c&&(c=c.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===e[4]?r.push(c):o[e[4]]=""===c?c:c||!0}}return r.length>0&&(o.className=r.join(" ")),a[t]={tag:n,attrs:o}}(t),e):(e.tag=t,e)}},function(t,e,n){"use strict";var r=n(2);t.exports=function(){var t,e=arguments[this],n=this+1;if(null==e?e={}:("object"!=typeof e||null!=e.tag||Array.isArray(e))&&(e={},n=this),arguments.length===n+1)t=arguments[n],Array.isArray(t)||(t=[t]);else for(t=[];n0||t(n)}}var r=n(s);try{t(n(a),r)}catch(t){r(t)}}f(n)};n.prototype.then=function(t,e){var r,o,i=this._instance;function a(t,e,n,a){e.push((function(e){if("function"!=typeof t)n(e);else try{r(t(e))}catch(t){o&&o(t)}})),"function"==typeof i.retry&&a===i.state&&i.retry()}var s=new n((function(t,e){r=t,o=e}));return a(t,i.resolvers,r,!0),a(e,i.rejectors,o,!1),s},n.prototype.catch=function(t){return this.then(null,t)},n.prototype.finally=function(t){return this.then((function(e){return n.resolve(t()).then((function(){return e}))}),(function(e){return n.resolve(t()).then((function(){return n.reject(e)}))}))},n.resolve=function(t){return t instanceof n?t:new n((function(e){e(t)}))},n.reject=function(t){return new n((function(e,n){n(t)}))},n.all=function(t){return new n((function(e,n){var r=t.length,o=0,i=[];if(0===t.length)e([]);else for(var a=0;a=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(39),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(1))},function(t,e,n){"use strict";t.exports=n(41)(window)},function(t,e,n){"use strict";t.exports=function(t){if("[object Object]"!==Object.prototype.toString.call(t))return"";var e=[];for(var n in t)r(n,t[n]);return e.join("&");function r(t,n){if(Array.isArray(n))for(var o=0;o-1&&u.pop();for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:{};switch(c=f.duration||1e3,i=f.offset||0,d=f.callback,a=f.easing||r,s=f.a11y||!1,e=window.scrollY||window.pageYOffset,void 0===l?"undefined":o(l)){case"number":t=void 0,s=!1,n=e+l;break;case"object":n=h(t=l);break;case"string":t=document.querySelector(l),n=h(t)}switch(u=n-e+i,o(f.duration)){case"number":c=f.duration;break;case"function":c=f.duration(u)}window.requestAnimationFrame(m)}}(),a=n(17);var s=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},u=function(){function t(t,e){for(var n=0;n
',trigger:"hover focus",offset:0,arrowSelector:".tooltip-arrow, .tooltip__arrow",innerSelector:".tooltip-inner, .tooltip__inner"},f=function(){function t(e,n){s(this,t),p.call(this),n=c({},l,n),e.jquery&&(e=e[0]),this.reference=e,this.options=n;var r="string"==typeof n.trigger?n.trigger.split(" ").filter((function(t){return-1!==["click","hover","focus"].indexOf(t)})):[];this._isOpen=!1,this._popperOptions={},this._setEventListeners(e,r,n)}return u(t,[{key:"_create",value:function(t,e,n,r){var o=window.document.createElement("div");o.innerHTML=e.trim();var i=o.childNodes[0];i.id="tooltip_"+Math.random().toString(36).substr(2,10),i.setAttribute("aria-hidden","false");var a=o.querySelector(this.options.innerSelector);return this._addTitleContent(t,n,r,a),i}},{key:"_addTitleContent",value:function(t,e,n,r){if(1===e.nodeType||11===e.nodeType)n&&r.appendChild(e);else if((i=e)&&"[object Function]"==={}.toString.call(i)){var o=e.call(t);n?r.innerHTML=o:r.textContent=o}else n?r.innerHTML=e:r.textContent=e; +flarum.core=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=143)}([function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e=0&&(m+=t.slice(n,a)),f>=0&&(m+=(n<0?"?":"&")+l.slice(f,d));var v=r(c);return v&&(m+=(n<0&&f<0?"?":"&")+v),i>=0&&(m+=t.slice(i)),p>=0&&(m+=(i<0?"":"&")+l.slice(p)),m}},function(t,e,n){"use strict";var r=n(15);t.exports=function(t){var e=t.indexOf("?"),n=t.indexOf("#"),o=n<0?t.length:n,i=e<0?o:e,a=t.slice(0,i).replace(/\/{2,}/g,"/");return a?("/"!==a[0]&&(a="/"+a),a.length>1&&"/"===a[a.length-1]&&(a=a.slice(0,-1))):a="/",{path:a,params:e<0?{}:r(t.slice(e+1,o))}}},function(t,e,n){"use strict";var r=n(2),o=n(8),i=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,a={},s={}.hasOwnProperty;function u(t){for(var e in t)if(s.call(t,e))return!1;return!0}t.exports=function(t){if(null==t||"string"!=typeof t&&"function"!=typeof t&&"function"!=typeof t.view)throw Error("The selector must be either a string or a component.");var e=o.apply(1,arguments);return"string"==typeof t&&(e.children=r.normalizeChildren(e.children),"["!==t)?function(t,e){var n=e.attrs,o=r.normalizeChildren(e.children),i=s.call(n,"class"),a=i?n.class:n.className;if(e.tag=t.tag,e.attrs=null,e.children=void 0,!u(t.attrs)&&!u(n)){var c={};for(var l in n)s.call(n,l)&&(c[l]=n[l]);n=c}for(var l in t.attrs)s.call(t.attrs,l)&&"className"!==l&&!s.call(n,l)&&(n[l]=t.attrs[l]);for(var l in null==a&&null==t.attrs.className||(n.className=null!=a?null!=t.attrs.className?String(t.attrs.className)+" "+String(a):a:null!=t.attrs.className?t.attrs.className:null),i&&(n.class=null),n)if(s.call(n,l)&&"key"!==l){e.attrs=n;break}return Array.isArray(o)&&1===o.length&&null!=o[0]&&"#"===o[0].tag?e.text=o[0].children:e.children=o,e}(a[t]||function(t){for(var e,n="div",r=[],o={};e=i.exec(t);){var s=e[1],u=e[2];if(""===s&&""!==u)n=u;else if("#"===s)o.id=u;else if("."===s)r.push(u);else if("["===e[3][0]){var c=e[6];c&&(c=c.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===e[4]?r.push(c):o[e[4]]=""===c?c:c||!0}}return r.length>0&&(o.className=r.join(" ")),a[t]={tag:n,attrs:o}}(t),e):(e.tag=t,e)}},function(t,e,n){"use strict";var r=n(2);t.exports=function(){var t,e=arguments[this],n=this+1;if(null==e?e={}:("object"!=typeof e||null!=e.tag||Array.isArray(e))&&(e={},n=this),arguments.length===n+1)t=arguments[n],Array.isArray(t)||(t=[t]);else for(t=[];n0||t(n)}}var r=n(s);try{t(n(a),r)}catch(t){r(t)}}f(n)};n.prototype.then=function(t,e){var r,o,i=this._instance;function a(t,e,n,a){e.push((function(e){if("function"!=typeof t)n(e);else try{r(t(e))}catch(t){o&&o(t)}})),"function"==typeof i.retry&&a===i.state&&i.retry()}var s=new n((function(t,e){r=t,o=e}));return a(t,i.resolvers,r,!0),a(e,i.rejectors,o,!1),s},n.prototype.catch=function(t){return this.then(null,t)},n.prototype.finally=function(t){return this.then((function(e){return n.resolve(t()).then((function(){return e}))}),(function(e){return n.resolve(t()).then((function(){return n.reject(e)}))}))},n.resolve=function(t){return t instanceof n?t:new n((function(e){e(t)}))},n.reject=function(t){return new n((function(e,n){n(t)}))},n.all=function(t){return new n((function(e,n){var r=t.length,o=0,i=[];if(0===t.length)e([]);else for(var a=0;a=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(39),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(1))},function(t,e,n){"use strict";t.exports=n(41)(window)},function(t,e,n){"use strict";t.exports=function(t){if("[object Object]"!==Object.prototype.toString.call(t))return"";var e=[];for(var n in t)r(n,t[n]);return e.join("&");function r(t,n){if(Array.isArray(n))for(var o=0;o-1&&u.pop();for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:{};switch(c=f.duration||1e3,i=f.offset||0,d=f.callback,a=f.easing||r,s=f.a11y||!1,e=window.scrollY||window.pageYOffset,void 0===l?"undefined":o(l)){case"number":t=void 0,s=!1,n=e+l;break;case"object":n=h(t=l);break;case"string":t=document.querySelector(l),n=h(t)}switch(u=n-e+i,o(f.duration)){case"number":c=f.duration;break;case"function":c=f.duration(u)}window.requestAnimationFrame(m)}}(),a=n(18);var s=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},u=function(){function t(t,e){for(var n=0;n
',trigger:"hover focus",offset:0,arrowSelector:".tooltip-arrow, .tooltip__arrow",innerSelector:".tooltip-inner, .tooltip__inner"},f=function(){function t(e,n){s(this,t),p.call(this),n=c({},l,n),e.jquery&&(e=e[0]),this.reference=e,this.options=n;var r="string"==typeof n.trigger?n.trigger.split(" ").filter((function(t){return-1!==["click","hover","focus"].indexOf(t)})):[];this._isOpen=!1,this._popperOptions={},this._setEventListeners(e,r,n)}return u(t,[{key:"_create",value:function(t,e,n,r){var o=window.document.createElement("div");o.innerHTML=e.trim();var i=o.childNodes[0];i.id="tooltip_"+Math.random().toString(36).substr(2,10),i.setAttribute("aria-hidden","false");var a=o.querySelector(this.options.innerSelector);return this._addTitleContent(t,n,r,a),i}},{key:"_addTitleContent",value:function(t,e,n,r){if(1===e.nodeType||11===e.nodeType)n&&r.appendChild(e);else if((i=e)&&"[object Function]"==={}.toString.call(i)){var o=e.call(t);n?r.innerHTML=o:r.textContent=o}else n?r.innerHTML=e:r.textContent=e; /**! * @fileOverview Kickass library to create and place poppers near their reference elements. * @version 1.3.2 @@ -28,7 +28,7 @@ var i}},{key:"_show",value:function(t,e){if(this._isOpen&&!this._isOpening)retur * Enable special events on Zepto * @license Original Copyright 2013 Enideo. Released under dual MIT and GPL licenses. */ -$.event.special=$.event.special||{};var h=$.fn.bind;$.fn.bind=function(t,e,n){var r=this;return n||(n=e,e=null),$.each(t.split(/\s/),(function(t,n){if((n=n.split(/\./)[0])in $.event.special){var o=$.event.special[n];o._init||(o._init=!0,o.originalHandler=o.handler,o.handler=function(){var t=Array.prototype.slice.call(arguments);t[0]=$.extend({},t[0]),$.event.handle=function(){var t=Array.prototype.slice.call(arguments),e=t[0],n=$(e.target);n.trigger.apply(n,arguments)},o.originalHandler.apply(this,t)}),o.setup.apply(r,[e])}return!0})),h.apply(this,[t,n])};n(58),n(61),n(62);var m=n(18),v=n.n(m),g=n(19),y=n.n(g),b=n(20);dayjs.extend(v.a),dayjs.extend(y.a),Object(b.a)()},function(t,e,n){"use strict";(function(t){for( +$.event.special=$.event.special||{};var h=$.fn.bind;$.fn.bind=function(t,e,n){var r=this;return n||(n=e,e=null),$.each(t.split(/\s/),(function(t,n){if((n=n.split(/\./)[0])in $.event.special){var o=$.event.special[n];o._init||(o._init=!0,o.originalHandler=o.handler,o.handler=function(){var t=Array.prototype.slice.call(arguments);t[0]=$.extend({},t[0]),$.event.handle=function(){var t=Array.prototype.slice.call(arguments),e=t[0],n=$(e.target);n.trigger.apply(n,arguments)},o.originalHandler.apply(this,t)}),o.setup.apply(r,[e])}return!0})),h.apply(this,[t,n])};n(57),n(60),n(61);var m,v,g=n(19),y=n.n(g),b=n(20),w=n.n(b),x=n(3),k=n.n(x),E=n(21),N=n.n(E);dayjs.extend(y.a),dayjs.extend(w.a),m=window.m,v=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r=0){o=1;break}var a=n&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),o))}};function s(t){return t&&"[object Function]"==={}.toString.call(t)}function u(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function c(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function l(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=u(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?t:l(c(t))}var f=n&&!(!window.MSInputMethodContext||!document.documentMode),p=n&&/MSIE 10/.test(navigator.userAgent);function d(t){return 11===t?f:10===t?p:f||p}function h(t){if(!t)return document.documentElement;for(var e=d(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===u(n,"position")?h(n):n:t?t.ownerDocument.documentElement:document.documentElement}function m(t){return null!==t.parentNode?m(t.parentNode):t}function v(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?t:e,o=n?e:t,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a,s,u=i.commonAncestorContainer;if(t!==u&&e!==u||r.contains(o))return"BODY"===(s=(a=u).nodeName)||"HTML"!==s&&h(a.firstElementChild)!==a?h(u):u;var c=m(t);return c.host?v(c.host,e):v(t,m(e).host)}function g(t){var e="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"===n||"HTML"===n){var r=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||r)[e]}return t[e]}function y(t,e){var n="x"===e?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"],10)+parseFloat(t["border"+r+"Width"],10)}function b(t,e,n,r){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],d(10)?parseInt(n["offset"+t])+parseInt(r["margin"+("Height"===t?"Top":"Left")])+parseInt(r["margin"+("Height"===t?"Bottom":"Right")]):0)}function w(t){var e=t.body,n=t.documentElement,r=d(10)&&getComputedStyle(n);return{height:b("Height",e,n,r),width:b("Width",e,n,r)}}var x=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},k=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=d(10),o="HTML"===e.nodeName,i=O(t),a=O(e),s=l(t),c=u(e),f=parseFloat(c.borderTopWidth,10),p=parseFloat(c.borderLeftWidth,10);n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var h=C({top:i.top-a.top-f,left:i.left-a.left-p,width:i.width,height:i.height});if(h.marginTop=0,h.marginLeft=0,!r&&o){var m=parseFloat(c.marginTop,10),v=parseFloat(c.marginLeft,10);h.top-=f-m,h.bottom-=f-m,h.left-=p-v,h.right-=p-v,h.marginTop=m,h.marginLeft=v}return(r&&!n?e.contains(s):e===s&&"BODY"!==s.nodeName)&&(h=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=g(e,"top"),o=g(e,"left"),i=n?-1:1;return t.top+=r*i,t.bottom+=r*i,t.left+=o*i,t.right+=o*i,t}(h,e)),h}function _(t){if(!t||!t.parentElement||d())return document.documentElement;for(var e=t.parentElement;e&&"none"===u(e,"transform");)e=e.parentElement;return e||document.documentElement}function S(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=o?_(t):v(t,e);if("viewport"===r)i=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,r=T(t,n),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:g(n),s=e?0:g(n,"left");return C({top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:o,height:i})}(a,o);else{var s=void 0;"scrollParent"===r?"BODY"===(s=l(c(e))).nodeName&&(s=t.ownerDocument.documentElement):s="window"===r?t.ownerDocument.documentElement:r;var f=T(s,a,o);if("HTML"!==s.nodeName||function t(e){var n=e.nodeName;if("BODY"===n||"HTML"===n)return!1;if("fixed"===u(e,"position"))return!0;var r=c(e);return!!r&&t(r)}(a))i=f;else{var p=w(t.ownerDocument),d=p.height,h=p.width;i.top+=f.top-f.marginTop,i.bottom=d+f.top,i.left+=f.left-f.marginLeft,i.right=h+f.left}}var m="number"==typeof(n=n||0);return i.left+=m?n:n.left||0,i.top+=m?n:n.top||0,i.right-=m?n:n.right||0,i.bottom-=m?n:n.bottom||0,i}function A(t,e,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=S(n,r,i,o),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},u=Object.keys(s).map((function(t){return N({key:t},s[t],{area:(e=s[t],e.width*e.height)});var e})).sort((function(t,e){return e.area-t.area})),c=u.filter((function(t){var e=t.width,r=t.height;return e>=n.clientWidth&&r>=n.clientHeight})),l=c.length>0?c[0].key:u[0].key,f=t.split("-")[1];return l+(f?"-"+f:"")}function j(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return T(n,r?_(e):v(e,n),r)}function M(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),r=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+r,height:t.offsetHeight+n}}function D(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function P(t,e,n){n=n.split("-")[0];var r=M(t),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",u=i?"height":"width",c=i?"width":"height";return o[a]=e[a]+e[u]/2-r[u]/2,o[s]=n===s?e[s]-r[c]:e[D(s)],o}function L(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function $(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===n}));var r=L(t,(function(t){return t[e]===n}));return t.indexOf(r)}(t,"name",n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&s(n)&&(e.offsets.popper=C(e.offsets.popper),e.offsets.reference=C(e.offsets.reference),e=n(e,t))})),e}function I(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=j(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=A(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=P(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=$(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function R(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function B(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=J.indexOf(t),r=J.slice(n+1).concat(J.slice(0,n));return e?r.reverse():r}var X={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Q(t,e,n,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),a=t.split(/(\+|\-)/).map((function(t){return t.trim()})),s=a.indexOf(L(a,(function(t){return-1!==t.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(u)[0]]),[a[s].split(u)[1]].concat(a.slice(s+1))]:[a];return(c=c.map((function(t,r){var o=(1===r?!i:i)?"height":"width",a=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,r){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return t;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return C(s)[e]/100*i}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i}return i}(t,o,e,n)}))}))).forEach((function(t,e){t.forEach((function(n,r){Y(n)&&(o[e]+=n*("-"===t[r-1]?-1:1))}))})),o}var tt={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],r=e.split("-")[1];if(r){var o=t.offsets,i=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),u=s?"left":"top",c=s?"width":"height",l={start:E({},u,i[u]),end:E({},u,i[u]+i[c]-a[c])};t.offsets.popper=N({},a,l[r])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,r=t.placement,o=t.offsets,i=o.popper,a=o.reference,s=r.split("-")[0],u=void 0;return u=Y(+n)?[+n,0]:Q(n,i,a,s),"left"===s?(i.top+=u[0],i.left-=u[1]):"right"===s?(i.top+=u[0],i.left+=u[1]):"top"===s?(i.left+=u[0],i.top-=u[1]):"bottom"===s&&(i.left+=u[0],i.top+=u[1]),t.popper=i,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||h(t.instance.popper);t.instance.reference===n&&(n=h(n));var r=B("transform"),o=t.instance.popper.style,i=o.top,a=o.left,s=o[r];o.top="",o.left="",o[r]="";var u=S(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);o.top=i,o.left=a,o[r]=s,e.boundaries=u;var c=e.priority,l=t.offsets.popper,f={primary:function(t){var n=l[t];return l[t]u[t]&&!e.escapeWithReference&&(r=Math.min(l[n],u[t]-("right"===t?l.width:l.height))),E({},n,r)}};return c.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";l=N({},l,f[e](t))})),t.offsets.popper=l,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,r=e.reference,o=t.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",u=a?"left":"top",c=a?"width":"height";return n[s]i(r[s])&&(t.offsets.popper[u]=i(r[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!V(t.instance.modifiers,"arrow","keepTogether"))return t;var r=e.element;if("string"==typeof r){if(!(r=t.instance.popper.querySelector(r)))return t}else if(!t.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],i=t.offsets,a=i.popper,s=i.reference,c=-1!==["left","right"].indexOf(o),l=c?"height":"width",f=c?"Top":"Left",p=f.toLowerCase(),d=c?"left":"top",h=c?"bottom":"right",m=M(r)[l];s[h]-ma[h]&&(t.offsets.popper[p]+=s[p]+m-a[h]),t.offsets.popper=C(t.offsets.popper);var v=s[p]+s[l]/2-m/2,g=u(t.instance.popper),y=parseFloat(g["margin"+f],10),b=parseFloat(g["border"+f+"Width"],10),w=v-t.offsets.popper[p]-y-b;return w=Math.max(Math.min(a[l]-m,w),0),t.arrowElement=r,t.offsets.arrow=(E(n={},p,Math.round(w)),E(n,d,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(R(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=S(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),r=t.placement.split("-")[0],o=D(r),i=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case X.FLIP:a=[r,o];break;case X.CLOCKWISE:a=G(r);break;case X.COUNTERCLOCKWISE:a=G(r,!0);break;default:a=e.behavior}return a.forEach((function(s,u){if(r!==s||a.length===u+1)return t;r=t.placement.split("-")[0],o=D(r);var c=t.offsets.popper,l=t.offsets.reference,f=Math.floor,p="left"===r&&f(c.right)>f(l.left)||"right"===r&&f(c.left)f(l.top)||"bottom"===r&&f(c.top)f(n.right),m=f(c.top)f(n.bottom),g="left"===r&&d||"right"===r&&h||"top"===r&&m||"bottom"===r&&v,y=-1!==["top","bottom"].indexOf(r),b=!!e.flipVariations&&(y&&"start"===i&&d||y&&"end"===i&&h||!y&&"start"===i&&m||!y&&"end"===i&&v),w=!!e.flipVariationsByContent&&(y&&"start"===i&&h||y&&"end"===i&&d||!y&&"start"===i&&v||!y&&"end"===i&&m),x=b||w;(p||g||x)&&(t.flipped=!0,(p||g)&&(r=a[u+1]),x&&(i=function(t){return"end"===t?"start":"start"===t?"end":t}(i)),t.placement=r+(i?"-"+i:""),t.offsets.popper=N({},t.offsets.popper,P(t.instance.popper,t.offsets.reference,t.placement)),t=$(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],r=t.offsets,o=r.popper,i=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=i[n]-(s?o[a?"width":"height"]:0),t.placement=D(e),t.offsets.popper=C(o),t}},hide:{order:800,enabled:!0,fn:function(t){if(!V(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=L(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottomn.right||e.top>n.bottom||e.right2&&void 0!==arguments[2]?arguments[2]:{};x(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=a(this.update.bind(this)),this.options=N({},t.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(N({},t.Defaults.modifiers,o.modifiers)).forEach((function(e){r.options.modifiers[e]=N({},t.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return N({name:t},r.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&s(t.onLoad)&&t.onLoad(r.reference,r.popper,r.options,t,r.state)})),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return k(t,[{key:"update",value:function(){return I.call(this)}},{key:"destroy",value:function(){return F.call(this)}},{key:"enableEventListeners",value:function(){return H.call(this)}},{key:"disableEventListeners",value:function(){return q.call(this)}}]),t}();et.Utils=("undefined"!=typeof window?window:t).PopperUtils,et.placements=Z,et.Defaults=tt,e.a=et}).call(this,n(1))},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){var r=e.prototype;n.en.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"};var o=function(t,e,r,o){for(var i,a,s=r.$locale().relativeTime,u=[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],c=u.length,l=0;l0&&(f=u[l-1]),a=s[f.l].replace("%d",p);break}}return e?a:(i>0?s.future:s.past).replace("%s",a)};r.to=function(t,e){return o(t,e,this,!0)},r.from=function(t,e){return o(t,e,this)};var i=function(t){return t.$u?n.utc():n()};r.toNow=function(t){return this.to(i(this),t)},r.fromNow=function(t){return this.from(i(this),t)}}}()},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){var r=e.prototype,o=r.format,i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};n.en.formats=i,r.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var e=this.$locale().formats,n=void 0===e?{}:e,r=t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,e,r){var o=r&&r.toUpperCase();return e||n[r]||i[r]||n[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}));return o.call(this,r)}}}()},function(t,e,n){"use strict";(function(t){var r=n(21),o=n.n(r);e.a=function(){var e=t.m,n=function t(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i]*>/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,g=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,y=/^(?:body|html)$/i,b=/([A-Z])/g,w=["val","css","html","text","data","width","height","offset"],x=f.createElement("table"),k=f.createElement("tr"),E={tr:f.createElement("tbody"),tbody:x,thead:x,tfoot:x,td:k,th:k,"*":f.createElement("div")},N=/complete|loaded|interactive/,C=/^[\w-]*$/,O={},T=O.toString,_={},S=f.createElement("div"),A={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},j=Array.isArray||function(t){return t instanceof Array};function M(t){return null==t?String(t):O[T.call(t)]||"object"}function D(t){return"function"==M(t)}function P(t){return null!=t&&t==t.window}function L(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function $(t){return"object"==M(t)}function I(t){return $(t)&&!P(t)&&Object.getPrototypeOf(t)==Object.prototype}function R(t){var e=!!t&&"length"in t&&t.length,n=r.type(t);return"function"!=n&&!P(t)&&("array"==n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function B(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function F(t){return t in d?d[t]:d[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function z(t,e){return"number"!=typeof e||h[B(t)]?e:e+"px"}function U(t){return"children"in t?l.call(t.children):r.map(t.childNodes,(function(t){if(1==t.nodeType)return t}))}function H(t,e){var n,r=t?t.length:0;for(n=0;n")),n===e&&(n=m.test(t)&&RegExp.$1),n in E||(n="*"),(s=E[n]).innerHTML=""+t,i=r.each(l.call(s.childNodes),(function(){s.removeChild(this)}))),I(o)&&(a=r(i),r.each(o,(function(t,e){w.indexOf(t)>-1?a[t](e):a.attr(t,e)}))),i},_.Z=function(t,e){return new H(t,e)},_.isZ=function(t){return t instanceof _.Z},_.init=function(t,n){var o,i;if(!t)return _.Z();if("string"==typeof t)if("<"==(t=t.trim())[0]&&m.test(t))o=_.fragment(t,RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);o=_.qsa(f,t)}else{if(D(t))return r(f).ready(t);if(_.isZ(t))return t;if(j(t))i=t,o=c.call(i,(function(t){return null!=t}));else if($(t))o=[t],t=null;else if(m.test(t))o=_.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);o=_.qsa(f,t)}}return _.Z(o,t)},(r=function(t,e){return _.init(t,e)}).extend=function(t){var e,n=l.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach((function(n){q(t,n,e)})),t},_.qsa=function(t,e){var n,r="#"==e[0],o=!r&&"."==e[0],i=r||o?e.slice(1):e,a=C.test(i);return t.getElementById&&a&&r?(n=t.getElementById(i))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:l.call(a&&!r&&t.getElementsByClassName?o?t.getElementsByClassName(i):t.getElementsByTagName(e):t.querySelectorAll(e))},r.contains=f.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},r.type=M,r.isFunction=D,r.isWindow=P,r.isArray=j,r.isPlainObject=I,r.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},r.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},r.inArray=function(t,e,n){return s.indexOf.call(e,t,n)},r.camelCase=i,r.trim=function(t){return null==t?"":String.prototype.trim.call(t)},r.uuid=0,r.support={},r.expr={},r.noop=function(){},r.map=function(t,e){var n,o,i,a,s=[];if(R(t))for(o=0;o0?r.fn.concat.apply([],a):a},r.each=function(t,e){var n,r;if(R(t)){for(n=0;n=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each((function(){null!=this.parentNode&&this.parentNode.removeChild(this)}))},each:function(t){return s.every.call(this,(function(e,n){return!1!==t.call(e,n,e)})),this},filter:function(t){return D(t)?this.not(this.not(t)):r(c.call(this,(function(e){return _.matches(e,t)})))},add:function(t,e){return r(a(this.concat(r(t,e))))},is:function(t){return this.length>0&&_.matches(this[0],t)},not:function(t){var n=[];if(D(t)&&t.call!==e)this.each((function(e){t.call(this,e)||n.push(this)}));else{var o="string"==typeof t?this.filter(t):R(t)&&D(t.item)?l.call(t):r(t);this.forEach((function(t){o.indexOf(t)<0&&n.push(t)}))}return r(n)},has:function(t){return this.filter((function(){return $(t)?r.contains(this,t):r(this).find(t).size()}))},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!$(t)?t:r(t)},last:function(){var t=this[this.length-1];return t&&!$(t)?t:r(t)},find:function(t){var e=this;return t?"object"==typeof t?r(t).filter((function(){var t=this;return s.some.call(e,(function(e){return r.contains(e,t)}))})):1==this.length?r(_.qsa(this[0],t)):this.map((function(){return _.qsa(this,t)})):r()},closest:function(t,e){var n=[],o="object"==typeof t&&r(t);return this.each((function(r,i){for(;i&&!(o?o.indexOf(i)>=0:_.matches(i,t));)i=i!==e&&!L(i)&&i.parentNode;i&&n.indexOf(i)<0&&n.push(i)})),r(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=r.map(n,(function(t){if((t=t.parentNode)&&!L(t)&&e.indexOf(t)<0)return e.push(t),t}));return Y(e,t)},parent:function(t){return Y(a(this.pluck("parentNode")),t)},children:function(t){return Y(this.map((function(){return U(this)})),t)},contents:function(){return this.map((function(){return this.contentDocument||l.call(this.childNodes)}))},siblings:function(t){return Y(this.map((function(t,e){return c.call(U(e.parentNode),(function(t){return t!==e}))})),t)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(t){return r.map(this,(function(e){return e[t]}))},show:function(){return this.each((function(){var t,e,n;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(t=this.nodeName,p[t]||(e=f.createElement(t),f.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),p[t]=n),p[t]))}))},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=D(t);if(this[0]&&!e)var n=r(t).get(0),o=n.parentNode||this.length>1;return this.each((function(i){r(this).wrapAll(e?t.call(this,i):o?n.cloneNode(!0):n)}))},wrapAll:function(t){if(this[0]){var e;for(r(this[0]).before(t=r(t));(e=t.children()).length;)t=e.first();r(t).append(this)}return this},wrapInner:function(t){var e=D(t);return this.each((function(n){var o=r(this),i=o.contents(),a=e?t.call(this,n):t;i.length?i.wrapAll(a):o.append(a)}))},unwrap:function(){return this.parent().each((function(){r(this).replaceWith(r(this).children())})),this},clone:function(){return this.map((function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(t){return this.each((function(){var n=r(this);(t===e?"none"==n.css("display"):t)?n.show():n.hide()}))},prev:function(t){return r(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return r(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each((function(e){var n=this.innerHTML;r(this).empty().append(W(this,t,e,n))})):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each((function(e){var n=W(this,t,e,this.textContent);this.textContent=null==n?"":""+n})):0 in this?this.pluck("textContent").join(""):null},attr:function(t,r){var o;return"string"!=typeof t||1 in arguments?this.each((function(e){if(1===this.nodeType)if($(t))for(n in t)K(this,n,t[n]);else K(this,t,W(this,r,e,this.getAttribute(t)))})):0 in this&&1==this[0].nodeType&&null!=(o=this[0].getAttribute(t))?o:e},removeAttr:function(t){return this.each((function(){1===this.nodeType&&t.split(" ").forEach((function(t){K(this,t)}),this)}))},prop:function(t,e){return t=A[t]||t,1 in arguments?this.each((function(n){this[t]=W(this,e,n,this[t])})):this[0]&&this[0][t]},removeProp:function(t){return t=A[t]||t,this.each((function(){delete this[t]}))},data:function(t,n){var r="data-"+t.replace(b,"-$1").toLowerCase(),o=1 in arguments?this.attr(r,n):this.attr(r);return null!==o?Z(o):e},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each((function(e){this.value=W(this,t,e,this.value)}))):this[0]&&(this[0].multiple?r(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each((function(t){var n=r(this),o=W(this,e,t,n.offset()),i=n.offsetParent().offset(),a={top:o.top-i.top,left:o.left-i.left};"static"==n.css("position")&&(a.position="relative"),n.css(a)}));if(!this.length)return null;if(f.documentElement!==this[0]&&!r.contains(f.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+t.pageXOffset,top:n.top+t.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(t,e){if(arguments.length<2){var o=this[0];if("string"==typeof t){if(!o)return;return o.style[i(t)]||getComputedStyle(o,"").getPropertyValue(t)}if(j(t)){if(!o)return;var a={},s=getComputedStyle(o,"");return r.each(t,(function(t,e){a[e]=o.style[i(e)]||s.getPropertyValue(e)})),a}}var u="";if("string"==M(t))e||0===e?u=B(t)+":"+z(t,e):this.each((function(){this.style.removeProperty(B(t))}));else for(n in t)t[n]||0===t[n]?u+=B(n)+":"+z(n,t[n])+";":this.each((function(){this.style.removeProperty(B(n))}));return this.each((function(){this.style.cssText+=";"+u}))},index:function(t){return t?this.indexOf(r(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&s.some.call(this,(function(t){return this.test(V(t))}),F(t))},addClass:function(t){return t?this.each((function(e){if("className"in this){o=[];var n=V(this);W(this,t,e,n).split(/\s+/g).forEach((function(t){r(this).hasClass(t)||o.push(t)}),this),o.length&&V(this,n+(n?" ":"")+o.join(" "))}})):this},removeClass:function(t){return this.each((function(n){if("className"in this){if(t===e)return V(this,"");o=V(this),W(this,t,n,o).split(/\s+/g).forEach((function(t){o=o.replace(F(t)," ")})),V(this,o.trim())}}))},toggleClass:function(t,n){return t?this.each((function(o){var i=r(this);W(this,t,o,V(this)).split(/\s+/g).forEach((function(t){(n===e?!i.hasClass(t):n)?i.addClass(t):i.removeClass(t)}))})):this},scrollTop:function(t){if(this.length){var n="scrollTop"in this[0];return t===e?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var n="scrollLeft"in this[0];return t===e?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),o=y.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(r(t).css("margin-top"))||0,n.left-=parseFloat(r(t).css("margin-left"))||0,o.top+=parseFloat(r(e[0]).css("border-top-width"))||0,o.left+=parseFloat(r(e[0]).css("border-left-width"))||0,{top:n.top-o.top,left:n.left-o.left}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent||f.body;t&&!y.test(t.nodeName)&&"static"==r(t).css("position");)t=t.offsetParent;return t}))}},r.fn.detach=r.fn.remove,["width","height"].forEach((function(t){var n=t.replace(/./,(function(t){return t[0].toUpperCase()}));r.fn[t]=function(o){var i,a=this[0];return o===e?P(a)?a["inner"+n]:L(a)?a.documentElement["scroll"+n]:(i=this.offset())&&i[t]:this.each((function(e){(a=r(this)).css(t,W(this,o,e,a[t]()))}))}})),["after","prepend","before","append"].forEach((function(n,o){var i=o%2;r.fn[n]=function(){var n,a,s=r.map(arguments,(function(t){var o=[];return"array"==(n=M(t))?(t.forEach((function(t){return t.nodeType!==e?o.push(t):r.zepto.isZ(t)?o=o.concat(t.get()):void(o=o.concat(_.fragment(t)))})),o):"object"==n||null==t?t:_.fragment(t)})),u=this.length>1;return s.length<1?this:this.each((function(e,n){a=i?n:n.parentNode,n=0==o?n.nextSibling:1==o?n.firstChild:2==o?n:null;var c=r.contains(f.documentElement,a);s.forEach((function(e){if(u)e=e.cloneNode(!0);else if(!a)return r(e).remove();a.insertBefore(e,n),c&&J(e,(function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}}))}))}))},r.fn[i?n+"To":"insert"+(o?"Before":"After")]=function(t){return r(t)[n](this),this}})),_.Z.prototype=H.prototype=r.fn,_.uniq=a,_.deserializeValue=Z,r.zepto=_,r}();return t.Zepto=e,void 0===t.$&&(t.$=e),function(e){var n,r=1,o=Array.prototype.slice,i=e.isFunction,a=function(t){return"string"==typeof t},s={},u={},c="onfocusin"in t,l={focus:"focusin",blur:"focusout"},f={mouseenter:"mouseover",mouseleave:"mouseout"};function p(t){return t._zid||(t._zid=r++)}function d(t,e,n,r){if((e=h(e)).ns)var o=(i=e.ns,new RegExp("(?:^| )"+i.replace(" "," .* ?")+"(?: |$)"));var i;return(s[p(t)]||[]).filter((function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||o.test(t.ns))&&(!n||p(t.fn)===p(n))&&(!r||t.sel==r)}))}function h(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function m(t,e){return t.del&&!c&&t.e in l||!!e}function v(t){return f[t]||c&&l[t]||t}function g(t,r,o,i,a,u,c){var l=p(t),d=s[l]||(s[l]=[]);r.split(/\s/).forEach((function(r){if("ready"==r)return e(document).ready(o);var s=h(r);s.fn=o,s.sel=a,s.e in f&&(o=function(t){var n=t.relatedTarget;if(!n||n!==this&&!e.contains(this,n))return s.fn.apply(this,arguments)}),s.del=u;var l=u||o;s.proxy=function(e){if(!(e=E(e)).isImmediatePropagationStopped()){e.data=i;var r=l.apply(t,e._args==n?[e]:[e].concat(e._args));return!1===r&&(e.preventDefault(),e.stopPropagation()),r}},s.i=d.length,d.push(s),"addEventListener"in t&&t.addEventListener(v(s.e),s.proxy,m(s,c))}))}function y(t,e,n,r,o){var i=p(t);(e||"").split(/\s/).forEach((function(e){d(t,e,n,r).forEach((function(e){delete s[i][e.i],"removeEventListener"in t&&t.removeEventListener(v(e.e),e.proxy,m(e,o))}))}))}u.click=u.mousedown=u.mouseup=u.mousemove="MouseEvents",e.event={add:g,remove:y},e.proxy=function(t,n){var r=2 in arguments&&o.call(arguments,2);if(i(t)){var s=function(){return t.apply(n,r?r.concat(o.call(arguments)):arguments)};return s._zid=p(t),s}if(a(n))return r?(r.unshift(t[n],t),e.proxy.apply(null,r)):e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var b=function(){return!0},w=function(){return!1},x=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,k={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};function E(t,r){return!r&&t.isDefaultPrevented||(r||(r=t),e.each(k,(function(e,n){var o=r[e];t[e]=function(){return this[n]=b,o&&o.apply(r,arguments)},t[n]=w})),t.timeStamp||(t.timeStamp=Date.now()),(r.defaultPrevented!==n?r.defaultPrevented:"returnValue"in r?!1===r.returnValue:r.getPreventDefault&&r.getPreventDefault())&&(t.isDefaultPrevented=b)),t}function N(t){var e,r={originalEvent:t};for(e in t)x.test(e)||t[e]===n||(r[e]=t[e]);return E(r,t)}e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,r,s,u,c){var l,f,p=this;return t&&!a(t)?(e.each(t,(function(t,e){p.on(t,r,s,e,c)})),p):(a(r)||i(u)||!1===u||(u=s,s=r,r=n),u!==n&&!1!==s||(u=s,s=n),!1===u&&(u=w),p.each((function(n,i){c&&(l=function(t){return y(i,t.type,u),u.apply(this,arguments)}),r&&(f=function(t){var n,a=e(t.target).closest(r,i).get(0);if(a&&a!==i)return n=e.extend(N(t),{currentTarget:a,liveFired:i}),(l||u).apply(a,[n].concat(o.call(arguments,1)))}),g(i,t,u,s,r,f||l)})))},e.fn.off=function(t,r,o){var s=this;return t&&!a(t)?(e.each(t,(function(t,e){s.off(t,r,e)})),s):(a(r)||i(o)||!1===o||(o=r,r=n),!1===o&&(o=w),s.each((function(){y(this,t,o,r)})))},e.fn.trigger=function(t,n){return(t=a(t)||e.isPlainObject(t)?e.Event(t):E(t))._args=n,this.each((function(){t.type in l&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)}))},e.fn.triggerHandler=function(t,n){var r,o;return this.each((function(i,s){(r=N(a(t)?e.Event(t):t))._args=n,r.target=s,e.each(d(s,t.type||t),(function(t,e){if(o=e.proxy(r),r.isImmediatePropagationStopped())return!1}))})),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach((function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}})),e.Event=function(t,e){a(t)||(t=(e=t).type);var n=document.createEvent(u[t]||"Events"),r=!0;if(e)for(var o in e)"bubbles"==o?r=!!e[o]:n[o]=e[o];return n.initEvent(t,r,!0),E(n)}}(e),function(e){var n,r,o=+new Date,i=t.document,a=/)<[^<]*)*<\/script>/gi,s=/^(?:text|application)\/javascript/i,u=/^(?:text|application)\/xml/i,c="application/json",l="text/html",f=/^\s*$/,p=i.createElement("a");function d(t,n,r,o){if(t.global)return function(t,n,r){var o=e.Event(n);return e(t).trigger(o,r),!o.isDefaultPrevented()}(n||i,r,o)}function h(t,e){var n=e.context;if(!1===e.beforeSend.call(n,t,e)||!1===d(e,n,"ajaxBeforeSend",[t,e]))return!1;d(e,n,"ajaxSend",[t,e])}function m(t,e,n,r){var o=n.context;n.success.call(o,t,"success",e),r&&r.resolveWith(o,[t,"success",e]),d(n,o,"ajaxSuccess",[e,n,t]),g("success",e,n)}function v(t,e,n,r,o){var i=r.context;r.error.call(i,n,e,t),o&&o.rejectWith(i,[n,e,t]),d(r,i,"ajaxError",[n,r,t||e]),g(e,n,r)}function g(t,n,r){var o=r.context;r.complete.call(o,n,t),d(r,o,"ajaxComplete",[n,r]),function(t){t.global&&!--e.active&&d(t,null,"ajaxStop")}(r)}function y(){}function b(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function w(t,n,r,o){return e.isFunction(n)&&(o=r,r=n,n=void 0),e.isFunction(r)||(o=r,r=void 0),{url:t,data:n,success:r,dataType:o}}p.href=t.location.href,e.active=0,e.ajaxJSONP=function(n,r){if(!("type"in n))return e.ajax(n);var a,s,u=n.jsonpCallback,c=(e.isFunction(u)?u():u)||"Zepto"+o++,l=i.createElement("script"),f=t[c],p=function(t){e(l).triggerHandler("error",t||"abort")},d={abort:p};return r&&r.promise(d),e(l).on("load error",(function(o,i){clearTimeout(s),e(l).off().remove(),"error"!=o.type&&a?m(a[0],d,n,r):v(null,i||"error",d,n,r),t[c]=f,a&&e.isFunction(f)&&f(a[0]),f=a=void 0})),!1===h(d,n)?(p("abort"),d):(t[c]=function(){a=arguments},l.src=n.url.replace(/\?(.+)=\?/,"?$1="+c),i.head.appendChild(l),n.timeout>0&&(s=setTimeout((function(){p("timeout")}),n.timeout)),d)},e.ajaxSettings={type:"GET",beforeSend:y,success:y,error:y,complete:y,context:null,global:!0,xhr:function(){return new t.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:c,xml:"application/xml, text/xml",html:l,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:y},e.ajax=function(o){var a,g,w=e.extend({},o||{}),x=e.Deferred&&e.Deferred();for(n in e.ajaxSettings)void 0===w[n]&&(w[n]=e.ajaxSettings[n]);!function(t){t.global&&0==e.active++&&d(t,null,"ajaxStart")}(w),w.crossDomain||((a=i.createElement("a")).href=w.url,a.href=a.href,w.crossDomain=p.protocol+"//"+p.host!=a.protocol+"//"+a.host),w.url||(w.url=t.location.toString()),(g=w.url.indexOf("#"))>-1&&(w.url=w.url.slice(0,g)),function(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=b(t.url,t.data),t.data=void 0)}(w);var k=w.dataType,E=/\?.+=\?/.test(w.url);if(E&&(k="jsonp"),!1!==w.cache&&(o&&!0===o.cache||"script"!=k&&"jsonp"!=k)||(w.url=b(w.url,"_="+Date.now())),"jsonp"==k)return E||(w.url=b(w.url,w.jsonp?w.jsonp+"=?":!1===w.jsonp?"":"callback=?")),e.ajaxJSONP(w,x);var N,C=w.accepts[k],O={},T=function(t,e){O[t.toLowerCase()]=[t,e]},_=/^([\w-]+:)\/\//.test(w.url)?RegExp.$1:t.location.protocol,S=w.xhr(),A=S.setRequestHeader;if(x&&x.promise(S),w.crossDomain||T("X-Requested-With","XMLHttpRequest"),T("Accept",C||"*/*"),(C=w.mimeType||C)&&(C.indexOf(",")>-1&&(C=C.split(",",2)[0]),S.overrideMimeType&&S.overrideMimeType(C)),(w.contentType||!1!==w.contentType&&w.data&&"GET"!=w.type.toUpperCase())&&T("Content-Type",w.contentType||"application/x-www-form-urlencoded"),w.headers)for(r in w.headers)T(r,w.headers[r]);if(S.setRequestHeader=T,S.onreadystatechange=function(){if(4==S.readyState){S.onreadystatechange=y,clearTimeout(N);var t,n=!1;if(S.status>=200&&S.status<300||304==S.status||0==S.status&&"file:"==_){if(k=k||function(t){return t&&(t=t.split(";",2)[0]),t&&(t==l?"html":t==c?"json":s.test(t)?"script":u.test(t)&&"xml")||"text"}(w.mimeType||S.getResponseHeader("content-type")),"arraybuffer"==S.responseType||"blob"==S.responseType)t=S.response;else{t=S.responseText;try{t=function(t,e,n){if(n.dataFilter==y)return t;var r=n.context;return n.dataFilter.call(r,t,e)}(t,k,w),"script"==k?(0,eval)(t):"xml"==k?t=S.responseXML:"json"==k&&(t=f.test(t)?null:e.parseJSON(t))}catch(t){n=t}if(n)return v(n,"parsererror",S,w,x)}m(t,S,w,x)}else v(S.statusText||null,S.status?"error":"abort",S,w,x)}},!1===h(S,w))return S.abort(),v(null,"abort",S,w,x),S;var j=!("async"in w)||w.async;if(S.open(w.type,w.url,j,w.username,w.password),w.xhrFields)for(r in w.xhrFields)S[r]=w.xhrFields[r];for(r in O)A.apply(S,O[r]);return w.timeout>0&&(N=setTimeout((function(){S.onreadystatechange=y,S.abort(),v(null,"timeout",S,w,x)}),w.timeout)),S.send(w.data?w.data:null),S},e.get=function(){return e.ajax(w.apply(null,arguments))},e.post=function(){var t=w.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=w.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,n,r){if(!this.length)return this;var o,i=this,s=t.split(/\s/),u=w(t,n,r),c=u.success;return s.length>1&&(u.url=s[0],o=s[1]),u.success=function(t){i.html(o?e("
").html(t.replace(a,"")).find(o):t),c&&c.apply(i,arguments)},e.ajax(u),this};var x=encodeURIComponent;e.param=function(t,n){var r=[];return r.add=function(t,n){e.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(x(t)+"="+x(n))},function t(n,r,o,i){var a,s=e.isArray(r),u=e.isPlainObject(r);e.each(r,(function(r,c){a=e.type(c),i&&(r=o?i:i+"["+(u||"object"==a||"array"==a?r:"")+"]"),!i&&s?n.add(c.name,c.value):"array"==a||!o&&"object"==a?t(n,c,o,r):n.add(r,c)}))}(r,t,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[];return this[0]&&t.each(this[0].elements,(function(o,i){n=i.type,(e=i.name)&&"fieldset"!=i.nodeName.toLowerCase()&&!i.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||i.checked)&&function t(n){if(n.forEach)return n.forEach(t);r.push({name:e,value:n})}(t(i).val())})),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach((function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))})),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(n){var e=getComputedStyle;t.getComputedStyle=function(t,n){try{return e(t,n)}catch(t){return null}}}}(),e}(o)}.call(e,n,e,t))||(t.exports=r)}).call(window)},function(t,e,n){(function(e){t.exports=e.moment=n(31)}).call(this,n(1))},function(t,e,n){(function(e){t.exports=e.dayjs=n(32)}).call(this,n(1))},function(t,e,n){t.exports=function(){"use strict";var t="millisecond",e="second",n="minute",r="hour",o="day",i="week",a="month",s="quarter",u="year",c=/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,l=/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},p={s:f,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+f(r,2,"0")+":"+f(o,2,"0")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,a),o=e-r<0,i=t.clone().add(n+(o?-1:1),a);return Number(-(n+(e-r)/(o?r-i:i-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(c){return{M:a,y:u,w:i,d:o,h:r,m:n,s:e,ms:t,Q:s}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},d={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},h="en",m={};m[h]=d;var v=function(t){return t instanceof w},g=function(t,e,n){var r;if(!t)return h;if("string"==typeof t)m[t]&&(r=t),e&&(m[t]=e,r=t);else{var o=t.name;m[o]=t,r=o}return n||(h=r),r},y=function(t,e,n){if(v(t))return t.clone();var r=e?"string"==typeof e?{format:e,pl:n}:e:{};return r.date=t,new w(r)},b=p;b.l=g,b.i=v,b.w=function(t,e){return y(t,{locale:e.$L,utc:e.$u})};var w=function(){function f(t){this.$L=this.$L||g(t.locale,null,!0),this.parse(t)}var p=f.prototype;return p.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(c);if(r)return n?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(e)}(t),this.init()},p.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},p.$utils=function(){return b},p.isValid=function(){return!("Invalid Date"===this.$d.toString())},p.isSame=function(t,e){var n=y(t);return this.startOf(e)<=n&&n<=this.endOf(e)},p.isAfter=function(t,e){return y(t)1)for(var n=1;n'+e.children+"",a=a.firstChild):a.innerHTML=e.children,e.dom=a.firstChild,e.domSize=a.childNodes.length,e.instance=[];for(var s,u=n.createDocumentFragment();s=a.firstChild;)e.instance.push(s),u.appendChild(s);b(t,u,o)}function d(t,e,n,r,o,i){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)c(t,n,0,n.length,r,o,i);else if(null==n||0===n.length)x(t,e,0,e.length);else{var a=null!=e[0]&&null!=e[0].key,s=null!=n[0]&&null!=n[0].key,u=0,f=0;if(!a)for(;f=f&&C>=u&&(b=e[N],w=n[C],b.key===w.key);)b!==w&&h(t,b,w,r,o,i),null!=w.dom&&(o=w.dom),N--,C--;for(;N>=f&&C>=u&&(p=e[f],d=n[u],p.key===d.key);)f++,u++,p!==d&&h(t,p,d,r,g(e,f,o),i);for(;N>=f&&C>=u&&u!==C&&p.key===w.key&&b.key===d.key;)y(t,b,E=g(e,f,o)),b!==d&&h(t,b,d,r,E,i),++u<=--C&&y(t,p,o),p!==w&&h(t,p,w,r,o,i),null!=w.dom&&(o=w.dom),f++,b=e[--N],w=n[C],p=e[f],d=n[u];for(;N>=f&&C>=u&&b.key===w.key;)b!==w&&h(t,b,w,r,o,i),null!=w.dom&&(o=w.dom),C--,b=e[--N],w=n[C];if(u>C)x(t,e,f,N+1);else if(f>N)c(t,n,u,C+1,r,o,i);else{var O,T,_=o,S=C-u+1,A=new Array(S),j=0,M=0,D=2147483647,P=0;for(M=0;M=u;M--){null==O&&(O=m(e,f,N+1));var L=O[(w=n[M]).key];null!=L&&(D=L>>1)+(r>>>1)+(n&r&1);t[e[s]]0&&(v[o]=e[n-1]),e[n]=o)}}n=e.length,r=e[n-1];for(;n-- >0;)e[n]=r,r=v[r];return v.length=0,e}(A)).length-1,M=C;M>=u;M--)d=n[M],-1===A[M-u]?l(t,d,r,i,o):T[j]===M-u?j--:y(t,d,o),null!=d.dom&&(o=n[M].dom);else for(M=C;M>=u;M--)d=n[M],-1===A[M-u]&&l(t,d,r,i,o),null!=d.dom&&(o=n[M].dom)}}else{var $=e.length$&&x(t,e,u,e.length),n.length>$&&c(t,n,u,n.length,r,o,i)}}}function h(t,e,n,o,a,u){var c=e.tag;if(c===n.tag){if(n.state=e.state,n.events=e.events,function(t,e){do{var n;if(null!=t.attrs&&"function"==typeof t.attrs.onbeforeupdate)if(void 0!==(n=s.call(t.attrs.onbeforeupdate,t,e))&&!n)break;if("string"!=typeof t.tag&&"function"==typeof t.state.onbeforeupdate)if(void 0!==(n=s.call(t.state.onbeforeupdate,t,e))&&!n)break;return!1}while(0);return t.dom=e.dom,t.domSize=e.domSize,t.instance=e.instance,t.attrs=e.attrs,t.children=e.children,t.text=e.text,!0}(n,e))return;if("string"==typeof c)switch(null!=n.attrs&&I(n.attrs,n,o),c){case"#":!function(t,e){t.children.toString()!==e.children.toString()&&(t.dom.nodeValue=e.children);e.dom=t.dom}(e,n);break;case"<":!function(t,e,n,r,o){e.children!==n.children?(E(t,e),p(t,n,r,o)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,u,a);break;case"[":!function(t,e,n,r,o,i){d(t,e.children,n.children,r,o,i);var a=0,s=n.children;if(n.dom=null,null!=s){for(var u=0;u-1||null!=t.attrs&&t.attrs.is||"href"!==e&&"list"!==e&&"form"!==e&&"width"!==e&&"height"!==e)&&e in t.dom}var A=/[A-Z]/g;function j(t){return"-"+t.toLowerCase()}function M(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(A,j)}function D(t,e,n){if(e===n);else if(null==n)t.style.cssText="";else if("object"!=typeof n)t.style.cssText=n;else if(null==e||"object"!=typeof e)for(var r in t.style.cssText="",n){null!=(o=n[r])&&t.style.setProperty(M(r),String(o))}else{for(var r in n){var o;null!=(o=n[r])&&(o=String(o))!==String(e[r])&&t.style.setProperty(M(r),o)}for(var r in e)null!=e[r]&&null==n[r]&&t.style.removeProperty(M(r))}}function P(){this._=e}function L(t,e,n){if(null!=t.events){if(t.events[e]===n)return;null==n||"function"!=typeof n&&"object"!=typeof n?(null!=t.events[e]&&t.dom.removeEventListener(e.slice(2),t.events,!1),t.events[e]=void 0):(null==t.events[e]&&t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}else null==n||"function"!=typeof n&&"object"!=typeof n||(t.events=new P,t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}function $(t,e,n){"function"==typeof t.oninit&&s.call(t.oninit,e),"function"==typeof t.oncreate&&n.push(s.bind(t.oncreate,e))}function I(t,e,n){"function"==typeof t.onupdate&&n.push(s.bind(t.onupdate,e))}return P.prototype=Object.create(null),P.prototype.handleEvent=function(t){var e,n=this["on"+t.type];"function"==typeof n?e=n.call(t.currentTarget,t):"function"==typeof n.handleEvent&&n.handleEvent(t),this._&&!1!==t.redraw&&(0,this._)(),!1===e&&(t.preventDefault(),t.stopPropagation())},function(t,n,o){if(!t)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var i=[],a=u(),s=t.namespaceURI;null==t.vnodes&&(t.textContent=""),n=r.normalizeChildren(Array.isArray(n)?n:[n]);var c=e;try{e="function"==typeof o?o:void 0,d(t,t.vnodes,n,i,null,"http://www.w3.org/1999/xhtml"===s?void 0:s)}finally{e=c}t.vnodes=n,null!=a&&u()!==a&&"function"==typeof a.focus&&a.focus();for(var l=0;l=0&&(o.splice(i,2),t(e,[],u)),null!=n&&(o.push(e,n),t(e,r(n),u))},redraw:u}}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e,n){var o=0;function i(t){return new e(t)}function a(t){return function(o,a){"string"!=typeof o?(a=o,o=o.url):null==a&&(a={});var s=new e((function(e,n){t(r(o,a.params),a,(function(t){if("function"==typeof a.type)if(Array.isArray(t))for(var n=0;n=200&&t.target.status<300||304===t.target.status||/^file:\/\//i.test(e),s=t.target.response;if("json"===l?t.target.responseType||"function"==typeof n.extract||(s=JSON.parse(t.target.responseText)):l&&"text"!==l||null==s&&(s=t.target.responseText),"function"==typeof n.extract?(s=n.extract(t.target,n),a=!0):"function"==typeof n.deserialize&&(s=n.deserialize(s)),a)r(s);else{try{i=t.target.responseText}catch(t){i=s}var u=new Error(i);u.code=t.target.status,u.response=s,o(u)}}catch(t){o(t)}},"function"==typeof n.config&&(f=n.config(f,n,e)||f)!==d&&(i=f.abort,f.abort=function(){p=!0,i.call(this)}),null==u?f.send():"function"==typeof n.serialize?f.send(n.serialize(u)):u instanceof t.FormData?f.send(u):f.send(JSON.stringify(u))})),jsonp:a((function(e,n,r,i){var a=n.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+o++,s=t.document.createElement("script");t[a]=function(e){delete t[a],s.parentNode.removeChild(s),r(e)},s.onerror=function(){delete t[a],s.parentNode.removeChild(s),i(new Error("JSONP request failed"))},s.src=e+(e.indexOf("?")<0?"?":"&")+encodeURIComponent(n.callbackKey||"callback")+"="+encodeURIComponent(a),t.document.documentElement.appendChild(s)}))}}},function(t,e,n){"use strict";var r=n(3);t.exports=n(45)(window,r)},function(t,e,n){"use strict";(function(e){var r=n(2),o=n(6),i=n(8),a=n(4),s=n(5),u=n(46),c=n(13),l={};t.exports=function(t,n){var f;function p(e,n,r){if(e=a(e,n),null!=f){f();var o=r?r.state:null,i=r?r.title:null;r&&r.replace?t.history.replaceState(o,i,b.prefix+e):t.history.pushState(o,i,b.prefix+e)}else t.location.href=b.prefix+e}var d,h,m,v,g=l,y=b.SKIP={};function b(o,a,w){if(null==o)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var x,k=0,E=Object.keys(w).map((function(t){if("/"!==t[0])throw new SyntaxError("Routes must start with a `/`");if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Route parameter names must be separated with either `/`, `.`, or `-`");return{route:t,component:w[t],check:u(t)}})),N="function"==typeof e?e:setTimeout,C=i.resolve(),O=!1;if(f=null,null!=a){var T=s(a);if(!E.some((function(t){return t.check(T)})))throw new ReferenceError("Default route doesn't match any known routes")}function _(){O=!1;var e=t.location.hash;"#"!==b.prefix[0]&&(e=t.location.search+e,"?"!==b.prefix[0]&&"/"!==(e=t.location.pathname+e)[0]&&(e="/"+e));var r=e.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(b.prefix.length),o=s(r);function i(){if(r===a)throw new Error("Could not resolve default route "+a);p(a,null,{replace:!0})}c(o.params,t.history.state),function t(e){for(;e":".","?":"/","|":"\\"},f={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p=1;p<20;++p)u[111+p]="f"+p;for(p=0;p<=9;++p)u[p+96]=p.toString();y.prototype.bind=function(t,e,n){return t=t instanceof Array?t:[t],this._bindMultiple.call(this,t,e,n),this},y.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},y.prototype.trigger=function(t,e){return this._directMap[t+":"+e]&&this._directMap[t+":"+e]({},t),this},y.prototype.reset=function(){return this._callbacks={},this._directMap={},this},y.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(function t(e,n){return null!==e&&e!==i&&(e===n||t(e.parentNode,n))}(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var n=t.composedPath()[0];n!==t.target&&(e=n)}return"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},y.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},y.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(u[e]=t[e]);s=null},y.init=function(){var t=y(i);for(var e in t)"_"!==e.charAt(0)&&(y[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},y.init(),o.Mousetrap=y,t.exports&&(t.exports=y),void 0===(r=function(){return y}.call(e,n,e,t))||(t.exports=r)}function d(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)}function h(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return u[t.which]?u[t.which]:c[t.which]?c[t.which]:String.fromCharCode(t.which).toLowerCase()}function m(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function v(t,e,n){return n||(n=function(){if(!s)for(var t in s={},u)t>95&&t<112||u.hasOwnProperty(t)&&(s[u[t]]=t);return s}()[t]?"keydown":"keypress"),"keypress"==n&&e.length&&(n="keydown"),n}function g(t,e){var n,r,o,i=[];for(n=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),o=0;o1?p(t,s,n,r):(a=g(t,r),e._callbacks[a.key]=e._callbacks[a.key]||[],c(a.key,a.modifiers,{type:a.action},o,t,i),e._callbacks[a.key][o?"unshift":"push"]({callback:n,modifiers:a.modifiers,action:a.action,seq:o,level:i,combo:t}))}e._handleKey=function(t,e,n){var r,o=c(t,e,n),i={},f=0,p=!1;for(r=0;r=0){o=1;break}var a=n&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),o))}};function s(t){return t&&"[object Function]"==={}.toString.call(t)}function u(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function c(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function l(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=u(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?t:l(c(t))}var f=n&&!(!window.MSInputMethodContext||!document.documentMode),p=n&&/MSIE 10/.test(navigator.userAgent);function d(t){return 11===t?f:10===t?p:f||p}function h(t){if(!t)return document.documentElement;for(var e=d(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===u(n,"position")?h(n):n:t?t.ownerDocument.documentElement:document.documentElement}function m(t){return null!==t.parentNode?m(t.parentNode):t}function v(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?t:e,o=n?e:t,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a,s,u=i.commonAncestorContainer;if(t!==u&&e!==u||r.contains(o))return"BODY"===(s=(a=u).nodeName)||"HTML"!==s&&h(a.firstElementChild)!==a?h(u):u;var c=m(t);return c.host?v(c.host,e):v(t,m(e).host)}function g(t){var e="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"===n||"HTML"===n){var r=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||r)[e]}return t[e]}function y(t,e){var n="x"===e?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"],10)+parseFloat(t["border"+r+"Width"],10)}function b(t,e,n,r){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],d(10)?parseInt(n["offset"+t])+parseInt(r["margin"+("Height"===t?"Top":"Left")])+parseInt(r["margin"+("Height"===t?"Bottom":"Right")]):0)}function w(t){var e=t.body,n=t.documentElement,r=d(10)&&getComputedStyle(n);return{height:b("Height",e,n,r),width:b("Width",e,n,r)}}var x=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},k=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=d(10),o="HTML"===e.nodeName,i=C(t),a=C(e),s=l(t),c=u(e),f=parseFloat(c.borderTopWidth,10),p=parseFloat(c.borderLeftWidth,10);n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var h=T({top:i.top-a.top-f,left:i.left-a.left-p,width:i.width,height:i.height});if(h.marginTop=0,h.marginLeft=0,!r&&o){var m=parseFloat(c.marginTop,10),v=parseFloat(c.marginLeft,10);h.top-=f-m,h.bottom-=f-m,h.left-=p-v,h.right-=p-v,h.marginTop=m,h.marginLeft=v}return(r&&!n?e.contains(s):e===s&&"BODY"!==s.nodeName)&&(h=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=g(e,"top"),o=g(e,"left"),i=n?-1:1;return t.top+=r*i,t.bottom+=r*i,t.left+=o*i,t.right+=o*i,t}(h,e)),h}function _(t){if(!t||!t.parentElement||d())return document.documentElement;for(var e=t.parentElement;e&&"none"===u(e,"transform");)e=e.parentElement;return e||document.documentElement}function S(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=o?_(t):v(t,e);if("viewport"===r)i=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,r=O(t,n),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:g(n),s=e?0:g(n,"left");return T({top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:o,height:i})}(a,o);else{var s=void 0;"scrollParent"===r?"BODY"===(s=l(c(e))).nodeName&&(s=t.ownerDocument.documentElement):s="window"===r?t.ownerDocument.documentElement:r;var f=O(s,a,o);if("HTML"!==s.nodeName||function t(e){var n=e.nodeName;if("BODY"===n||"HTML"===n)return!1;if("fixed"===u(e,"position"))return!0;var r=c(e);return!!r&&t(r)}(a))i=f;else{var p=w(t.ownerDocument),d=p.height,h=p.width;i.top+=f.top-f.marginTop,i.bottom=d+f.top,i.left+=f.left-f.marginLeft,i.right=h+f.left}}var m="number"==typeof(n=n||0);return i.left+=m?n:n.left||0,i.top+=m?n:n.top||0,i.right-=m?n:n.right||0,i.bottom-=m?n:n.bottom||0,i}function A(t,e,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=S(n,r,i,o),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},u=Object.keys(s).map((function(t){return N({key:t},s[t],{area:(e=s[t],e.width*e.height)});var e})).sort((function(t,e){return e.area-t.area})),c=u.filter((function(t){var e=t.width,r=t.height;return e>=n.clientWidth&&r>=n.clientHeight})),l=c.length>0?c[0].key:u[0].key,f=t.split("-")[1];return l+(f?"-"+f:"")}function j(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return O(n,r?_(e):v(e,n),r)}function M(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),r=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+r,height:t.offsetHeight+n}}function D(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function P(t,e,n){n=n.split("-")[0];var r=M(t),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",u=i?"height":"width",c=i?"width":"height";return o[a]=e[a]+e[u]/2-r[u]/2,o[s]=n===s?e[s]-r[c]:e[D(s)],o}function L(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function $(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===n}));var r=L(t,(function(t){return t[e]===n}));return t.indexOf(r)}(t,"name",n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&s(n)&&(e.offsets.popper=T(e.offsets.popper),e.offsets.reference=T(e.offsets.reference),e=n(e,t))})),e}function I(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=j(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=A(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=P(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=$(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function R(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function B(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=J.indexOf(t),r=J.slice(n+1).concat(J.slice(0,n));return e?r.reverse():r}var X={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Q(t,e,n,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),a=t.split(/(\+|\-)/).map((function(t){return t.trim()})),s=a.indexOf(L(a,(function(t){return-1!==t.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(u)[0]]),[a[s].split(u)[1]].concat(a.slice(s+1))]:[a];return(c=c.map((function(t,r){var o=(1===r?!i:i)?"height":"width",a=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,r){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return t;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return T(s)[e]/100*i}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i}return i}(t,o,e,n)}))}))).forEach((function(t,e){t.forEach((function(n,r){Y(n)&&(o[e]+=n*("-"===t[r-1]?-1:1))}))})),o}var tt={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],r=e.split("-")[1];if(r){var o=t.offsets,i=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),u=s?"left":"top",c=s?"width":"height",l={start:E({},u,i[u]),end:E({},u,i[u]+i[c]-a[c])};t.offsets.popper=N({},a,l[r])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,r=t.placement,o=t.offsets,i=o.popper,a=o.reference,s=r.split("-")[0],u=void 0;return u=Y(+n)?[+n,0]:Q(n,i,a,s),"left"===s?(i.top+=u[0],i.left-=u[1]):"right"===s?(i.top+=u[0],i.left+=u[1]):"top"===s?(i.left+=u[0],i.top-=u[1]):"bottom"===s&&(i.left+=u[0],i.top+=u[1]),t.popper=i,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||h(t.instance.popper);t.instance.reference===n&&(n=h(n));var r=B("transform"),o=t.instance.popper.style,i=o.top,a=o.left,s=o[r];o.top="",o.left="",o[r]="";var u=S(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);o.top=i,o.left=a,o[r]=s,e.boundaries=u;var c=e.priority,l=t.offsets.popper,f={primary:function(t){var n=l[t];return l[t]u[t]&&!e.escapeWithReference&&(r=Math.min(l[n],u[t]-("right"===t?l.width:l.height))),E({},n,r)}};return c.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";l=N({},l,f[e](t))})),t.offsets.popper=l,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,r=e.reference,o=t.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",u=a?"left":"top",c=a?"width":"height";return n[s]i(r[s])&&(t.offsets.popper[u]=i(r[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!V(t.instance.modifiers,"arrow","keepTogether"))return t;var r=e.element;if("string"==typeof r){if(!(r=t.instance.popper.querySelector(r)))return t}else if(!t.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],i=t.offsets,a=i.popper,s=i.reference,c=-1!==["left","right"].indexOf(o),l=c?"height":"width",f=c?"Top":"Left",p=f.toLowerCase(),d=c?"left":"top",h=c?"bottom":"right",m=M(r)[l];s[h]-ma[h]&&(t.offsets.popper[p]+=s[p]+m-a[h]),t.offsets.popper=T(t.offsets.popper);var v=s[p]+s[l]/2-m/2,g=u(t.instance.popper),y=parseFloat(g["margin"+f],10),b=parseFloat(g["border"+f+"Width"],10),w=v-t.offsets.popper[p]-y-b;return w=Math.max(Math.min(a[l]-m,w),0),t.arrowElement=r,t.offsets.arrow=(E(n={},p,Math.round(w)),E(n,d,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(R(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=S(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),r=t.placement.split("-")[0],o=D(r),i=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case X.FLIP:a=[r,o];break;case X.CLOCKWISE:a=G(r);break;case X.COUNTERCLOCKWISE:a=G(r,!0);break;default:a=e.behavior}return a.forEach((function(s,u){if(r!==s||a.length===u+1)return t;r=t.placement.split("-")[0],o=D(r);var c=t.offsets.popper,l=t.offsets.reference,f=Math.floor,p="left"===r&&f(c.right)>f(l.left)||"right"===r&&f(c.left)f(l.top)||"bottom"===r&&f(c.top)f(n.right),m=f(c.top)f(n.bottom),g="left"===r&&d||"right"===r&&h||"top"===r&&m||"bottom"===r&&v,y=-1!==["top","bottom"].indexOf(r),b=!!e.flipVariations&&(y&&"start"===i&&d||y&&"end"===i&&h||!y&&"start"===i&&m||!y&&"end"===i&&v),w=!!e.flipVariationsByContent&&(y&&"start"===i&&h||y&&"end"===i&&d||!y&&"start"===i&&v||!y&&"end"===i&&m),x=b||w;(p||g||x)&&(t.flipped=!0,(p||g)&&(r=a[u+1]),x&&(i=function(t){return"end"===t?"start":"start"===t?"end":t}(i)),t.placement=r+(i?"-"+i:""),t.offsets.popper=N({},t.offsets.popper,P(t.instance.popper,t.offsets.reference,t.placement)),t=$(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],r=t.offsets,o=r.popper,i=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=i[n]-(s?o[a?"width":"height"]:0),t.placement=D(e),t.offsets.popper=T(o),t}},hide:{order:800,enabled:!0,fn:function(t){if(!V(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=L(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottomn.right||e.top>n.bottom||e.right2&&void 0!==arguments[2]?arguments[2]:{};x(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=a(this.update.bind(this)),this.options=N({},t.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(N({},t.Defaults.modifiers,o.modifiers)).forEach((function(e){r.options.modifiers[e]=N({},t.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return N({name:t},r.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&s(t.onLoad)&&t.onLoad(r.reference,r.popper,r.options,t,r.state)})),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return k(t,[{key:"update",value:function(){return I.call(this)}},{key:"destroy",value:function(){return F.call(this)}},{key:"enableEventListeners",value:function(){return H.call(this)}},{key:"disableEventListeners",value:function(){return q.call(this)}}]),t}();et.Utils=("undefined"!=typeof window?window:t).PopperUtils,et.placements=Z,et.Defaults=tt,e.a=et}).call(this,n(1))},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){var r=e.prototype;n.en.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"};var o=function(t,e,r,o){for(var i,a,s=r.$locale().relativeTime,u=[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],c=u.length,l=0;l0&&(f=u[l-1]),a=s[f.l].replace("%d",p);break}}return e?a:(i>0?s.future:s.past).replace("%s",a)};r.to=function(t,e){return o(t,e,this,!0)},r.from=function(t,e){return o(t,e,this)};var i=function(t){return t.$u?n.utc():n()};r.toNow=function(t){return this.to(i(this),t)},r.fromNow=function(t){return this.from(i(this),t)}}}()},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){var r=e.prototype,o=r.format,i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};n.en.formats=i,r.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var e=this.$locale().formats,n=void 0===e?{}:e,r=t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,e,r){var o=r&&r.toUpperCase();return e||n[r]||i[r]||n[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}));return o.call(this,r)}}}()},function(t,e,n){"use strict";t.exports=n(62)},function(t,e,n){var r=n(63),o=n(90),i=n(91),a="[object Null]",s="[object Undefined]",u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?s:a:u&&u in Object(t)?o(t):i(t)}},function(t,e,n){var r=n(67),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(66)(Object,"create");t.exports=r},function(t,e,n){var r=n(74);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(131);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){(function(e){t.exports=e.jQuery=n(29)}).call(this,n(1))},function(t,e,n){var r;(function(){var o;o=this,void 0===(r=function(){return function(t){var e=function(){var e,n,r,o,i,a,s=[],u=s.concat,c=s.filter,l=s.slice,f=t.document,p={},d={},h={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},m=/^\s*<(\w+|!)[^>]*>/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,g=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,y=/^(?:body|html)$/i,b=/([A-Z])/g,w=["val","css","html","text","data","width","height","offset"],x=f.createElement("table"),k=f.createElement("tr"),E={tr:f.createElement("tbody"),tbody:x,thead:x,tfoot:x,td:k,th:k,"*":f.createElement("div")},N=/complete|loaded|interactive/,T=/^[\w-]*$/,C={},O=C.toString,_={},S=f.createElement("div"),A={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},j=Array.isArray||function(t){return t instanceof Array};function M(t){return null==t?String(t):C[O.call(t)]||"object"}function D(t){return"function"==M(t)}function P(t){return null!=t&&t==t.window}function L(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function $(t){return"object"==M(t)}function I(t){return $(t)&&!P(t)&&Object.getPrototypeOf(t)==Object.prototype}function R(t){var e=!!t&&"length"in t&&t.length,n=r.type(t);return"function"!=n&&!P(t)&&("array"==n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function B(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function F(t){return t in d?d[t]:d[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function U(t,e){return"number"!=typeof e||h[B(t)]?e:e+"px"}function z(t){return"children"in t?l.call(t.children):r.map(t.childNodes,(function(t){if(1==t.nodeType)return t}))}function H(t,e){var n,r=t?t.length:0;for(n=0;n")),n===e&&(n=m.test(t)&&RegExp.$1),n in E||(n="*"),(s=E[n]).innerHTML=""+t,i=r.each(l.call(s.childNodes),(function(){s.removeChild(this)}))),I(o)&&(a=r(i),r.each(o,(function(t,e){w.indexOf(t)>-1?a[t](e):a.attr(t,e)}))),i},_.Z=function(t,e){return new H(t,e)},_.isZ=function(t){return t instanceof _.Z},_.init=function(t,n){var o,i;if(!t)return _.Z();if("string"==typeof t)if("<"==(t=t.trim())[0]&&m.test(t))o=_.fragment(t,RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);o=_.qsa(f,t)}else{if(D(t))return r(f).ready(t);if(_.isZ(t))return t;if(j(t))i=t,o=c.call(i,(function(t){return null!=t}));else if($(t))o=[t],t=null;else if(m.test(t))o=_.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);o=_.qsa(f,t)}}return _.Z(o,t)},(r=function(t,e){return _.init(t,e)}).extend=function(t){var e,n=l.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach((function(n){q(t,n,e)})),t},_.qsa=function(t,e){var n,r="#"==e[0],o=!r&&"."==e[0],i=r||o?e.slice(1):e,a=T.test(i);return t.getElementById&&a&&r?(n=t.getElementById(i))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:l.call(a&&!r&&t.getElementsByClassName?o?t.getElementsByClassName(i):t.getElementsByTagName(e):t.querySelectorAll(e))},r.contains=f.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},r.type=M,r.isFunction=D,r.isWindow=P,r.isArray=j,r.isPlainObject=I,r.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},r.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},r.inArray=function(t,e,n){return s.indexOf.call(e,t,n)},r.camelCase=i,r.trim=function(t){return null==t?"":String.prototype.trim.call(t)},r.uuid=0,r.support={},r.expr={},r.noop=function(){},r.map=function(t,e){var n,o,i,a,s=[];if(R(t))for(o=0;o0?r.fn.concat.apply([],a):a},r.each=function(t,e){var n,r;if(R(t)){for(n=0;n=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each((function(){null!=this.parentNode&&this.parentNode.removeChild(this)}))},each:function(t){return s.every.call(this,(function(e,n){return!1!==t.call(e,n,e)})),this},filter:function(t){return D(t)?this.not(this.not(t)):r(c.call(this,(function(e){return _.matches(e,t)})))},add:function(t,e){return r(a(this.concat(r(t,e))))},is:function(t){return this.length>0&&_.matches(this[0],t)},not:function(t){var n=[];if(D(t)&&t.call!==e)this.each((function(e){t.call(this,e)||n.push(this)}));else{var o="string"==typeof t?this.filter(t):R(t)&&D(t.item)?l.call(t):r(t);this.forEach((function(t){o.indexOf(t)<0&&n.push(t)}))}return r(n)},has:function(t){return this.filter((function(){return $(t)?r.contains(this,t):r(this).find(t).size()}))},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!$(t)?t:r(t)},last:function(){var t=this[this.length-1];return t&&!$(t)?t:r(t)},find:function(t){var e=this;return t?"object"==typeof t?r(t).filter((function(){var t=this;return s.some.call(e,(function(e){return r.contains(e,t)}))})):1==this.length?r(_.qsa(this[0],t)):this.map((function(){return _.qsa(this,t)})):r()},closest:function(t,e){var n=[],o="object"==typeof t&&r(t);return this.each((function(r,i){for(;i&&!(o?o.indexOf(i)>=0:_.matches(i,t));)i=i!==e&&!L(i)&&i.parentNode;i&&n.indexOf(i)<0&&n.push(i)})),r(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=r.map(n,(function(t){if((t=t.parentNode)&&!L(t)&&e.indexOf(t)<0)return e.push(t),t}));return Y(e,t)},parent:function(t){return Y(a(this.pluck("parentNode")),t)},children:function(t){return Y(this.map((function(){return z(this)})),t)},contents:function(){return this.map((function(){return this.contentDocument||l.call(this.childNodes)}))},siblings:function(t){return Y(this.map((function(t,e){return c.call(z(e.parentNode),(function(t){return t!==e}))})),t)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(t){return r.map(this,(function(e){return e[t]}))},show:function(){return this.each((function(){var t,e,n;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(t=this.nodeName,p[t]||(e=f.createElement(t),f.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),p[t]=n),p[t]))}))},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=D(t);if(this[0]&&!e)var n=r(t).get(0),o=n.parentNode||this.length>1;return this.each((function(i){r(this).wrapAll(e?t.call(this,i):o?n.cloneNode(!0):n)}))},wrapAll:function(t){if(this[0]){var e;for(r(this[0]).before(t=r(t));(e=t.children()).length;)t=e.first();r(t).append(this)}return this},wrapInner:function(t){var e=D(t);return this.each((function(n){var o=r(this),i=o.contents(),a=e?t.call(this,n):t;i.length?i.wrapAll(a):o.append(a)}))},unwrap:function(){return this.parent().each((function(){r(this).replaceWith(r(this).children())})),this},clone:function(){return this.map((function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(t){return this.each((function(){var n=r(this);(t===e?"none"==n.css("display"):t)?n.show():n.hide()}))},prev:function(t){return r(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return r(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each((function(e){var n=this.innerHTML;r(this).empty().append(W(this,t,e,n))})):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each((function(e){var n=W(this,t,e,this.textContent);this.textContent=null==n?"":""+n})):0 in this?this.pluck("textContent").join(""):null},attr:function(t,r){var o;return"string"!=typeof t||1 in arguments?this.each((function(e){if(1===this.nodeType)if($(t))for(n in t)K(this,n,t[n]);else K(this,t,W(this,r,e,this.getAttribute(t)))})):0 in this&&1==this[0].nodeType&&null!=(o=this[0].getAttribute(t))?o:e},removeAttr:function(t){return this.each((function(){1===this.nodeType&&t.split(" ").forEach((function(t){K(this,t)}),this)}))},prop:function(t,e){return t=A[t]||t,1 in arguments?this.each((function(n){this[t]=W(this,e,n,this[t])})):this[0]&&this[0][t]},removeProp:function(t){return t=A[t]||t,this.each((function(){delete this[t]}))},data:function(t,n){var r="data-"+t.replace(b,"-$1").toLowerCase(),o=1 in arguments?this.attr(r,n):this.attr(r);return null!==o?Z(o):e},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each((function(e){this.value=W(this,t,e,this.value)}))):this[0]&&(this[0].multiple?r(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each((function(t){var n=r(this),o=W(this,e,t,n.offset()),i=n.offsetParent().offset(),a={top:o.top-i.top,left:o.left-i.left};"static"==n.css("position")&&(a.position="relative"),n.css(a)}));if(!this.length)return null;if(f.documentElement!==this[0]&&!r.contains(f.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+t.pageXOffset,top:n.top+t.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(t,e){if(arguments.length<2){var o=this[0];if("string"==typeof t){if(!o)return;return o.style[i(t)]||getComputedStyle(o,"").getPropertyValue(t)}if(j(t)){if(!o)return;var a={},s=getComputedStyle(o,"");return r.each(t,(function(t,e){a[e]=o.style[i(e)]||s.getPropertyValue(e)})),a}}var u="";if("string"==M(t))e||0===e?u=B(t)+":"+U(t,e):this.each((function(){this.style.removeProperty(B(t))}));else for(n in t)t[n]||0===t[n]?u+=B(n)+":"+U(n,t[n])+";":this.each((function(){this.style.removeProperty(B(n))}));return this.each((function(){this.style.cssText+=";"+u}))},index:function(t){return t?this.indexOf(r(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&s.some.call(this,(function(t){return this.test(V(t))}),F(t))},addClass:function(t){return t?this.each((function(e){if("className"in this){o=[];var n=V(this);W(this,t,e,n).split(/\s+/g).forEach((function(t){r(this).hasClass(t)||o.push(t)}),this),o.length&&V(this,n+(n?" ":"")+o.join(" "))}})):this},removeClass:function(t){return this.each((function(n){if("className"in this){if(t===e)return V(this,"");o=V(this),W(this,t,n,o).split(/\s+/g).forEach((function(t){o=o.replace(F(t)," ")})),V(this,o.trim())}}))},toggleClass:function(t,n){return t?this.each((function(o){var i=r(this);W(this,t,o,V(this)).split(/\s+/g).forEach((function(t){(n===e?!i.hasClass(t):n)?i.addClass(t):i.removeClass(t)}))})):this},scrollTop:function(t){if(this.length){var n="scrollTop"in this[0];return t===e?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var n="scrollLeft"in this[0];return t===e?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),o=y.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(r(t).css("margin-top"))||0,n.left-=parseFloat(r(t).css("margin-left"))||0,o.top+=parseFloat(r(e[0]).css("border-top-width"))||0,o.left+=parseFloat(r(e[0]).css("border-left-width"))||0,{top:n.top-o.top,left:n.left-o.left}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent||f.body;t&&!y.test(t.nodeName)&&"static"==r(t).css("position");)t=t.offsetParent;return t}))}},r.fn.detach=r.fn.remove,["width","height"].forEach((function(t){var n=t.replace(/./,(function(t){return t[0].toUpperCase()}));r.fn[t]=function(o){var i,a=this[0];return o===e?P(a)?a["inner"+n]:L(a)?a.documentElement["scroll"+n]:(i=this.offset())&&i[t]:this.each((function(e){(a=r(this)).css(t,W(this,o,e,a[t]()))}))}})),["after","prepend","before","append"].forEach((function(n,o){var i=o%2;r.fn[n]=function(){var n,a,s=r.map(arguments,(function(t){var o=[];return"array"==(n=M(t))?(t.forEach((function(t){return t.nodeType!==e?o.push(t):r.zepto.isZ(t)?o=o.concat(t.get()):void(o=o.concat(_.fragment(t)))})),o):"object"==n||null==t?t:_.fragment(t)})),u=this.length>1;return s.length<1?this:this.each((function(e,n){a=i?n:n.parentNode,n=0==o?n.nextSibling:1==o?n.firstChild:2==o?n:null;var c=r.contains(f.documentElement,a);s.forEach((function(e){if(u)e=e.cloneNode(!0);else if(!a)return r(e).remove();a.insertBefore(e,n),c&&J(e,(function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}}))}))}))},r.fn[i?n+"To":"insert"+(o?"Before":"After")]=function(t){return r(t)[n](this),this}})),_.Z.prototype=H.prototype=r.fn,_.uniq=a,_.deserializeValue=Z,r.zepto=_,r}();return t.Zepto=e,void 0===t.$&&(t.$=e),function(e){var n,r=1,o=Array.prototype.slice,i=e.isFunction,a=function(t){return"string"==typeof t},s={},u={},c="onfocusin"in t,l={focus:"focusin",blur:"focusout"},f={mouseenter:"mouseover",mouseleave:"mouseout"};function p(t){return t._zid||(t._zid=r++)}function d(t,e,n,r){if((e=h(e)).ns)var o=(i=e.ns,new RegExp("(?:^| )"+i.replace(" "," .* ?")+"(?: |$)"));var i;return(s[p(t)]||[]).filter((function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||o.test(t.ns))&&(!n||p(t.fn)===p(n))&&(!r||t.sel==r)}))}function h(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function m(t,e){return t.del&&!c&&t.e in l||!!e}function v(t){return f[t]||c&&l[t]||t}function g(t,r,o,i,a,u,c){var l=p(t),d=s[l]||(s[l]=[]);r.split(/\s/).forEach((function(r){if("ready"==r)return e(document).ready(o);var s=h(r);s.fn=o,s.sel=a,s.e in f&&(o=function(t){var n=t.relatedTarget;if(!n||n!==this&&!e.contains(this,n))return s.fn.apply(this,arguments)}),s.del=u;var l=u||o;s.proxy=function(e){if(!(e=E(e)).isImmediatePropagationStopped()){e.data=i;var r=l.apply(t,e._args==n?[e]:[e].concat(e._args));return!1===r&&(e.preventDefault(),e.stopPropagation()),r}},s.i=d.length,d.push(s),"addEventListener"in t&&t.addEventListener(v(s.e),s.proxy,m(s,c))}))}function y(t,e,n,r,o){var i=p(t);(e||"").split(/\s/).forEach((function(e){d(t,e,n,r).forEach((function(e){delete s[i][e.i],"removeEventListener"in t&&t.removeEventListener(v(e.e),e.proxy,m(e,o))}))}))}u.click=u.mousedown=u.mouseup=u.mousemove="MouseEvents",e.event={add:g,remove:y},e.proxy=function(t,n){var r=2 in arguments&&o.call(arguments,2);if(i(t)){var s=function(){return t.apply(n,r?r.concat(o.call(arguments)):arguments)};return s._zid=p(t),s}if(a(n))return r?(r.unshift(t[n],t),e.proxy.apply(null,r)):e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var b=function(){return!0},w=function(){return!1},x=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,k={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};function E(t,r){return!r&&t.isDefaultPrevented||(r||(r=t),e.each(k,(function(e,n){var o=r[e];t[e]=function(){return this[n]=b,o&&o.apply(r,arguments)},t[n]=w})),t.timeStamp||(t.timeStamp=Date.now()),(r.defaultPrevented!==n?r.defaultPrevented:"returnValue"in r?!1===r.returnValue:r.getPreventDefault&&r.getPreventDefault())&&(t.isDefaultPrevented=b)),t}function N(t){var e,r={originalEvent:t};for(e in t)x.test(e)||t[e]===n||(r[e]=t[e]);return E(r,t)}e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,r,s,u,c){var l,f,p=this;return t&&!a(t)?(e.each(t,(function(t,e){p.on(t,r,s,e,c)})),p):(a(r)||i(u)||!1===u||(u=s,s=r,r=n),u!==n&&!1!==s||(u=s,s=n),!1===u&&(u=w),p.each((function(n,i){c&&(l=function(t){return y(i,t.type,u),u.apply(this,arguments)}),r&&(f=function(t){var n,a=e(t.target).closest(r,i).get(0);if(a&&a!==i)return n=e.extend(N(t),{currentTarget:a,liveFired:i}),(l||u).apply(a,[n].concat(o.call(arguments,1)))}),g(i,t,u,s,r,f||l)})))},e.fn.off=function(t,r,o){var s=this;return t&&!a(t)?(e.each(t,(function(t,e){s.off(t,r,e)})),s):(a(r)||i(o)||!1===o||(o=r,r=n),!1===o&&(o=w),s.each((function(){y(this,t,o,r)})))},e.fn.trigger=function(t,n){return(t=a(t)||e.isPlainObject(t)?e.Event(t):E(t))._args=n,this.each((function(){t.type in l&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)}))},e.fn.triggerHandler=function(t,n){var r,o;return this.each((function(i,s){(r=N(a(t)?e.Event(t):t))._args=n,r.target=s,e.each(d(s,t.type||t),(function(t,e){if(o=e.proxy(r),r.isImmediatePropagationStopped())return!1}))})),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach((function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}})),e.Event=function(t,e){a(t)||(t=(e=t).type);var n=document.createEvent(u[t]||"Events"),r=!0;if(e)for(var o in e)"bubbles"==o?r=!!e[o]:n[o]=e[o];return n.initEvent(t,r,!0),E(n)}}(e),function(e){var n,r,o=+new Date,i=t.document,a=/)<[^<]*)*<\/script>/gi,s=/^(?:text|application)\/javascript/i,u=/^(?:text|application)\/xml/i,c="application/json",l="text/html",f=/^\s*$/,p=i.createElement("a");function d(t,n,r,o){if(t.global)return function(t,n,r){var o=e.Event(n);return e(t).trigger(o,r),!o.isDefaultPrevented()}(n||i,r,o)}function h(t,e){var n=e.context;if(!1===e.beforeSend.call(n,t,e)||!1===d(e,n,"ajaxBeforeSend",[t,e]))return!1;d(e,n,"ajaxSend",[t,e])}function m(t,e,n,r){var o=n.context;n.success.call(o,t,"success",e),r&&r.resolveWith(o,[t,"success",e]),d(n,o,"ajaxSuccess",[e,n,t]),g("success",e,n)}function v(t,e,n,r,o){var i=r.context;r.error.call(i,n,e,t),o&&o.rejectWith(i,[n,e,t]),d(r,i,"ajaxError",[n,r,t||e]),g(e,n,r)}function g(t,n,r){var o=r.context;r.complete.call(o,n,t),d(r,o,"ajaxComplete",[n,r]),function(t){t.global&&!--e.active&&d(t,null,"ajaxStop")}(r)}function y(){}function b(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function w(t,n,r,o){return e.isFunction(n)&&(o=r,r=n,n=void 0),e.isFunction(r)||(o=r,r=void 0),{url:t,data:n,success:r,dataType:o}}p.href=t.location.href,e.active=0,e.ajaxJSONP=function(n,r){if(!("type"in n))return e.ajax(n);var a,s,u=n.jsonpCallback,c=(e.isFunction(u)?u():u)||"Zepto"+o++,l=i.createElement("script"),f=t[c],p=function(t){e(l).triggerHandler("error",t||"abort")},d={abort:p};return r&&r.promise(d),e(l).on("load error",(function(o,i){clearTimeout(s),e(l).off().remove(),"error"!=o.type&&a?m(a[0],d,n,r):v(null,i||"error",d,n,r),t[c]=f,a&&e.isFunction(f)&&f(a[0]),f=a=void 0})),!1===h(d,n)?(p("abort"),d):(t[c]=function(){a=arguments},l.src=n.url.replace(/\?(.+)=\?/,"?$1="+c),i.head.appendChild(l),n.timeout>0&&(s=setTimeout((function(){p("timeout")}),n.timeout)),d)},e.ajaxSettings={type:"GET",beforeSend:y,success:y,error:y,complete:y,context:null,global:!0,xhr:function(){return new t.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:c,xml:"application/xml, text/xml",html:l,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:y},e.ajax=function(o){var a,g,w=e.extend({},o||{}),x=e.Deferred&&e.Deferred();for(n in e.ajaxSettings)void 0===w[n]&&(w[n]=e.ajaxSettings[n]);!function(t){t.global&&0==e.active++&&d(t,null,"ajaxStart")}(w),w.crossDomain||((a=i.createElement("a")).href=w.url,a.href=a.href,w.crossDomain=p.protocol+"//"+p.host!=a.protocol+"//"+a.host),w.url||(w.url=t.location.toString()),(g=w.url.indexOf("#"))>-1&&(w.url=w.url.slice(0,g)),function(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=b(t.url,t.data),t.data=void 0)}(w);var k=w.dataType,E=/\?.+=\?/.test(w.url);if(E&&(k="jsonp"),!1!==w.cache&&(o&&!0===o.cache||"script"!=k&&"jsonp"!=k)||(w.url=b(w.url,"_="+Date.now())),"jsonp"==k)return E||(w.url=b(w.url,w.jsonp?w.jsonp+"=?":!1===w.jsonp?"":"callback=?")),e.ajaxJSONP(w,x);var N,T=w.accepts[k],C={},O=function(t,e){C[t.toLowerCase()]=[t,e]},_=/^([\w-]+:)\/\//.test(w.url)?RegExp.$1:t.location.protocol,S=w.xhr(),A=S.setRequestHeader;if(x&&x.promise(S),w.crossDomain||O("X-Requested-With","XMLHttpRequest"),O("Accept",T||"*/*"),(T=w.mimeType||T)&&(T.indexOf(",")>-1&&(T=T.split(",",2)[0]),S.overrideMimeType&&S.overrideMimeType(T)),(w.contentType||!1!==w.contentType&&w.data&&"GET"!=w.type.toUpperCase())&&O("Content-Type",w.contentType||"application/x-www-form-urlencoded"),w.headers)for(r in w.headers)O(r,w.headers[r]);if(S.setRequestHeader=O,S.onreadystatechange=function(){if(4==S.readyState){S.onreadystatechange=y,clearTimeout(N);var t,n=!1;if(S.status>=200&&S.status<300||304==S.status||0==S.status&&"file:"==_){if(k=k||function(t){return t&&(t=t.split(";",2)[0]),t&&(t==l?"html":t==c?"json":s.test(t)?"script":u.test(t)&&"xml")||"text"}(w.mimeType||S.getResponseHeader("content-type")),"arraybuffer"==S.responseType||"blob"==S.responseType)t=S.response;else{t=S.responseText;try{t=function(t,e,n){if(n.dataFilter==y)return t;var r=n.context;return n.dataFilter.call(r,t,e)}(t,k,w),"script"==k?(0,eval)(t):"xml"==k?t=S.responseXML:"json"==k&&(t=f.test(t)?null:e.parseJSON(t))}catch(t){n=t}if(n)return v(n,"parsererror",S,w,x)}m(t,S,w,x)}else v(S.statusText||null,S.status?"error":"abort",S,w,x)}},!1===h(S,w))return S.abort(),v(null,"abort",S,w,x),S;var j=!("async"in w)||w.async;if(S.open(w.type,w.url,j,w.username,w.password),w.xhrFields)for(r in w.xhrFields)S[r]=w.xhrFields[r];for(r in C)A.apply(S,C[r]);return w.timeout>0&&(N=setTimeout((function(){S.onreadystatechange=y,S.abort(),v(null,"timeout",S,w,x)}),w.timeout)),S.send(w.data?w.data:null),S},e.get=function(){return e.ajax(w.apply(null,arguments))},e.post=function(){var t=w.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=w.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,n,r){if(!this.length)return this;var o,i=this,s=t.split(/\s/),u=w(t,n,r),c=u.success;return s.length>1&&(u.url=s[0],o=s[1]),u.success=function(t){i.html(o?e("
").html(t.replace(a,"")).find(o):t),c&&c.apply(i,arguments)},e.ajax(u),this};var x=encodeURIComponent;e.param=function(t,n){var r=[];return r.add=function(t,n){e.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(x(t)+"="+x(n))},function t(n,r,o,i){var a,s=e.isArray(r),u=e.isPlainObject(r);e.each(r,(function(r,c){a=e.type(c),i&&(r=o?i:i+"["+(u||"object"==a||"array"==a?r:"")+"]"),!i&&s?n.add(c.name,c.value):"array"==a||!o&&"object"==a?t(n,c,o,r):n.add(r,c)}))}(r,t,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[];return this[0]&&t.each(this[0].elements,(function(o,i){n=i.type,(e=i.name)&&"fieldset"!=i.nodeName.toLowerCase()&&!i.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||i.checked)&&function t(n){if(n.forEach)return n.forEach(t);r.push({name:e,value:n})}(t(i).val())})),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach((function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))})),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(n){var e=getComputedStyle;t.getComputedStyle=function(t,n){try{return e(t,n)}catch(t){return null}}}}(),e}(o)}.call(e,n,e,t))||(t.exports=r)}).call(window)},function(t,e,n){(function(e){t.exports=e.moment=n(31)}).call(this,n(1))},function(t,e,n){(function(e){t.exports=e.dayjs=n(32)}).call(this,n(1))},function(t,e,n){t.exports=function(){"use strict";var t="millisecond",e="second",n="minute",r="hour",o="day",i="week",a="month",s="quarter",u="year",c=/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,l=/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},p={s:f,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+f(r,2,"0")+":"+f(o,2,"0")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,a),o=e-r<0,i=t.clone().add(n+(o?-1:1),a);return Number(-(n+(e-r)/(o?r-i:i-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(c){return{M:a,y:u,w:i,d:o,h:r,m:n,s:e,ms:t,Q:s}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},d={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},h="en",m={};m[h]=d;var v=function(t){return t instanceof w},g=function(t,e,n){var r;if(!t)return h;if("string"==typeof t)m[t]&&(r=t),e&&(m[t]=e,r=t);else{var o=t.name;m[o]=t,r=o}return n||(h=r),r},y=function(t,e,n){if(v(t))return t.clone();var r=e?"string"==typeof e?{format:e,pl:n}:e:{};return r.date=t,new w(r)},b=p;b.l=g,b.i=v,b.w=function(t,e){return y(t,{locale:e.$L,utc:e.$u})};var w=function(){function f(t){this.$L=this.$L||g(t.locale,null,!0),this.parse(t)}var p=f.prototype;return p.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(c);if(r)return n?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(e)}(t),this.init()},p.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},p.$utils=function(){return b},p.isValid=function(){return!("Invalid Date"===this.$d.toString())},p.isSame=function(t,e){var n=y(t);return this.startOf(e)<=n&&n<=this.endOf(e)},p.isAfter=function(t,e){return y(t)1)for(var n=1;n'+e.children+"",a=a.firstChild):a.innerHTML=e.children,e.dom=a.firstChild,e.domSize=a.childNodes.length,e.instance=[];for(var s,u=n.createDocumentFragment();s=a.firstChild;)e.instance.push(s),u.appendChild(s);b(t,u,o)}function d(t,e,n,r,o,i){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)c(t,n,0,n.length,r,o,i);else if(null==n||0===n.length)x(t,e,0,e.length);else{var a=null!=e[0]&&null!=e[0].key,s=null!=n[0]&&null!=n[0].key,u=0,f=0;if(!a)for(;f=f&&T>=u&&(b=e[N],w=n[T],b.key===w.key);)b!==w&&h(t,b,w,r,o,i),null!=w.dom&&(o=w.dom),N--,T--;for(;N>=f&&T>=u&&(p=e[f],d=n[u],p.key===d.key);)f++,u++,p!==d&&h(t,p,d,r,g(e,f,o),i);for(;N>=f&&T>=u&&u!==T&&p.key===w.key&&b.key===d.key;)y(t,b,E=g(e,f,o)),b!==d&&h(t,b,d,r,E,i),++u<=--T&&y(t,p,o),p!==w&&h(t,p,w,r,o,i),null!=w.dom&&(o=w.dom),f++,b=e[--N],w=n[T],p=e[f],d=n[u];for(;N>=f&&T>=u&&b.key===w.key;)b!==w&&h(t,b,w,r,o,i),null!=w.dom&&(o=w.dom),T--,b=e[--N],w=n[T];if(u>T)x(t,e,f,N+1);else if(f>N)c(t,n,u,T+1,r,o,i);else{var C,O,_=o,S=T-u+1,A=new Array(S),j=0,M=0,D=2147483647,P=0;for(M=0;M=u;M--){null==C&&(C=m(e,f,N+1));var L=C[(w=n[M]).key];null!=L&&(D=L>>1)+(r>>>1)+(n&r&1);t[e[s]]0&&(v[o]=e[n-1]),e[n]=o)}}n=e.length,r=e[n-1];for(;n-- >0;)e[n]=r,r=v[r];return v.length=0,e}(A)).length-1,M=T;M>=u;M--)d=n[M],-1===A[M-u]?l(t,d,r,i,o):O[j]===M-u?j--:y(t,d,o),null!=d.dom&&(o=n[M].dom);else for(M=T;M>=u;M--)d=n[M],-1===A[M-u]&&l(t,d,r,i,o),null!=d.dom&&(o=n[M].dom)}}else{var $=e.length$&&x(t,e,u,e.length),n.length>$&&c(t,n,u,n.length,r,o,i)}}}function h(t,e,n,o,a,u){var c=e.tag;if(c===n.tag){if(n.state=e.state,n.events=e.events,function(t,e){do{var n;if(null!=t.attrs&&"function"==typeof t.attrs.onbeforeupdate)if(void 0!==(n=s.call(t.attrs.onbeforeupdate,t,e))&&!n)break;if("string"!=typeof t.tag&&"function"==typeof t.state.onbeforeupdate)if(void 0!==(n=s.call(t.state.onbeforeupdate,t,e))&&!n)break;return!1}while(0);return t.dom=e.dom,t.domSize=e.domSize,t.instance=e.instance,t.attrs=e.attrs,t.children=e.children,t.text=e.text,!0}(n,e))return;if("string"==typeof c)switch(null!=n.attrs&&I(n.attrs,n,o),c){case"#":!function(t,e){t.children.toString()!==e.children.toString()&&(t.dom.nodeValue=e.children);e.dom=t.dom}(e,n);break;case"<":!function(t,e,n,r,o){e.children!==n.children?(E(t,e),p(t,n,r,o)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,u,a);break;case"[":!function(t,e,n,r,o,i){d(t,e.children,n.children,r,o,i);var a=0,s=n.children;if(n.dom=null,null!=s){for(var u=0;u-1||null!=t.attrs&&t.attrs.is||"href"!==e&&"list"!==e&&"form"!==e&&"width"!==e&&"height"!==e)&&e in t.dom}var A=/[A-Z]/g;function j(t){return"-"+t.toLowerCase()}function M(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(A,j)}function D(t,e,n){if(e===n);else if(null==n)t.style.cssText="";else if("object"!=typeof n)t.style.cssText=n;else if(null==e||"object"!=typeof e)for(var r in t.style.cssText="",n){null!=(o=n[r])&&t.style.setProperty(M(r),String(o))}else{for(var r in n){var o;null!=(o=n[r])&&(o=String(o))!==String(e[r])&&t.style.setProperty(M(r),o)}for(var r in e)null!=e[r]&&null==n[r]&&t.style.removeProperty(M(r))}}function P(){this._=e}function L(t,e,n){if(null!=t.events){if(t.events[e]===n)return;null==n||"function"!=typeof n&&"object"!=typeof n?(null!=t.events[e]&&t.dom.removeEventListener(e.slice(2),t.events,!1),t.events[e]=void 0):(null==t.events[e]&&t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}else null==n||"function"!=typeof n&&"object"!=typeof n||(t.events=new P,t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}function $(t,e,n){"function"==typeof t.oninit&&s.call(t.oninit,e),"function"==typeof t.oncreate&&n.push(s.bind(t.oncreate,e))}function I(t,e,n){"function"==typeof t.onupdate&&n.push(s.bind(t.onupdate,e))}return P.prototype=Object.create(null),P.prototype.handleEvent=function(t){var e,n=this["on"+t.type];"function"==typeof n?e=n.call(t.currentTarget,t):"function"==typeof n.handleEvent&&n.handleEvent(t),this._&&!1!==t.redraw&&(0,this._)(),!1===e&&(t.preventDefault(),t.stopPropagation())},function(t,n,o){if(!t)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var i=[],a=u(),s=t.namespaceURI;null==t.vnodes&&(t.textContent=""),n=r.normalizeChildren(Array.isArray(n)?n:[n]);var c=e;try{e="function"==typeof o?o:void 0,d(t,t.vnodes,n,i,null,"http://www.w3.org/1999/xhtml"===s?void 0:s)}finally{e=c}t.vnodes=n,null!=a&&u()!==a&&"function"==typeof a.focus&&a.focus();for(var l=0;l=0&&(o.splice(i,2),t(e,[],u)),null!=n&&(o.push(e,n),t(e,r(n),u))},redraw:u}}},function(t,e,n){"use strict";var r=n(5);t.exports=function(t,e,n){var o=0;function i(t){return new e(t)}function a(t){return function(o,a){"string"!=typeof o?(a=o,o=o.url):null==a&&(a={});var s=new e((function(e,n){t(r(o,a.params),a,(function(t){if("function"==typeof a.type)if(Array.isArray(t))for(var n=0;n=200&&t.target.status<300||304===t.target.status||/^file:\/\//i.test(e),s=t.target.response;if("json"===l?t.target.responseType||"function"==typeof n.extract||(s=JSON.parse(t.target.responseText)):l&&"text"!==l||null==s&&(s=t.target.responseText),"function"==typeof n.extract?(s=n.extract(t.target,n),a=!0):"function"==typeof n.deserialize&&(s=n.deserialize(s)),a)r(s);else{try{i=t.target.responseText}catch(t){i=s}var u=new Error(i);u.code=t.target.status,u.response=s,o(u)}}catch(t){o(t)}},"function"==typeof n.config&&(f=n.config(f,n,e)||f)!==d&&(i=f.abort,f.abort=function(){p=!0,i.call(this)}),null==u?f.send():"function"==typeof n.serialize?f.send(n.serialize(u)):u instanceof t.FormData?f.send(u):f.send(JSON.stringify(u))})),jsonp:a((function(e,n,r,i){var a=n.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+o++,s=t.document.createElement("script");t[a]=function(e){delete t[a],s.parentNode.removeChild(s),r(e)},s.onerror=function(){delete t[a],s.parentNode.removeChild(s),i(new Error("JSONP request failed"))},s.src=e+(e.indexOf("?")<0?"?":"&")+encodeURIComponent(n.callbackKey||"callback")+"="+encodeURIComponent(a),t.document.documentElement.appendChild(s)}))}}},function(t,e,n){"use strict";var r=n(4);t.exports=n(45)(window,r)},function(t,e,n){"use strict";(function(e){var r=n(2),o=n(7),i=n(9),a=n(5),s=n(6),u=n(46),c=n(14),l={};t.exports=function(t,n){var f;function p(e,n,r){if(e=a(e,n),null!=f){f();var o=r?r.state:null,i=r?r.title:null;r&&r.replace?t.history.replaceState(o,i,b.prefix+e):t.history.pushState(o,i,b.prefix+e)}else t.location.href=b.prefix+e}var d,h,m,v,g=l,y=b.SKIP={};function b(o,a,w){if(null==o)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var x,k=0,E=Object.keys(w).map((function(t){if("/"!==t[0])throw new SyntaxError("Routes must start with a `/`");if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Route parameter names must be separated with either `/`, `.`, or `-`");return{route:t,component:w[t],check:u(t)}})),N="function"==typeof e?e:setTimeout,T=i.resolve(),C=!1;if(f=null,null!=a){var O=s(a);if(!E.some((function(t){return t.check(O)})))throw new ReferenceError("Default route doesn't match any known routes")}function _(){C=!1;var e=t.location.hash;"#"!==b.prefix[0]&&(e=t.location.search+e,"?"!==b.prefix[0]&&"/"!==(e=t.location.pathname+e)[0]&&(e="/"+e));var r=e.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(b.prefix.length),o=s(r);function i(){if(r===a)throw new Error("Could not resolve default route "+a);p(a,null,{replace:!0})}c(o.params,t.history.state),function t(e){for(;e":".","?":"/","|":"\\"},f={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p=1;p<20;++p)u[111+p]="f"+p;for(p=0;p<=9;++p)u[p+96]=p.toString();y.prototype.bind=function(t,e,n){return t=t instanceof Array?t:[t],this._bindMultiple.call(this,t,e,n),this},y.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},y.prototype.trigger=function(t,e){return this._directMap[t+":"+e]&&this._directMap[t+":"+e]({},t),this},y.prototype.reset=function(){return this._callbacks={},this._directMap={},this},y.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(function t(e,n){return null!==e&&e!==i&&(e===n||t(e.parentNode,n))}(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var n=t.composedPath()[0];n!==t.target&&(e=n)}return"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},y.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},y.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(u[e]=t[e]);s=null},y.init=function(){var t=y(i);for(var e in t)"_"!==e.charAt(0)&&(y[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},y.init(),o.Mousetrap=y,t.exports&&(t.exports=y),void 0===(r=function(){return y}.call(e,n,e,t))||(t.exports=r)}function d(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)}function h(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return u[t.which]?u[t.which]:c[t.which]?c[t.which]:String.fromCharCode(t.which).toLowerCase()}function m(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function v(t,e,n){return n||(n=function(){if(!s)for(var t in s={},u)t>95&&t<112||u.hasOwnProperty(t)&&(s[u[t]]=t);return s}()[t]?"keydown":"keypress"),"keypress"==n&&e.length&&(n="keydown"),n}function g(t,e){var n,r,o,i=[];for(n=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),o=0;o1?p(t,s,n,r):(a=g(t,r),e._callbacks[a.key]=e._callbacks[a.key]||[],c(a.key,a.modifiers,{type:a.action},o,t,i),e._callbacks[a.key][o?"unshift":"push"]({callback:n,modifiers:a.modifiers,action:a.action,seq:o,level:i,combo:t}))}e._handleKey=function(t,e,n){var r,o=c(t,e,n),i={},f=0,p=!1;for(r=0;r>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(10&&u--,40==e.which&&u-1&&(e=t[o][1](e,n()))})),e}),n);return o(e),o},n["fantasy-land/of"]=n;var e=!1;function n(t){var e,o=[],a=[];function s(e){return arguments.length&&e!==n.SKIP&&(t=e,i(s)&&(s._changing(),s._state="active",o.forEach((function(e,n){e(a[n](t))})))),t}return s.constructor=n,s._state=arguments.length&&t!==n.SKIP?"active":"pending",s._parents=[],s._changing=function(){i(s)&&(s._state="changing"),o.forEach((function(t){t._changing()}))},s._map=function(e,r){var i=r?n():n(e(t));return i._parents.push(s),o.push(i),a.push(e),i},s.map=function(t){return s._map(t,"active"!==s._state)},s.toJSON=function(){return null!=t&&"function"==typeof t.toJSON?t.toJSON():t},s["fantasy-land/map"]=s.map,s["fantasy-land/ap"]=function(t){return r((function(t,e){return t()(e())}),[t,s])},s._unregisterChild=function(t){var e=o.indexOf(t);-1!==e&&(o.splice(e,1),a.splice(e,1))},Object.defineProperty(s,"end",{get:function(){return e||((e=n()).map((function(t){return!0===t&&(s._parents.forEach((function(t){t._unregisterChild(s)})),s._state="ended",s._parents.length=o.length=a.length=0),t})),e)}}),s}function r(t,e){var r=e.every((function(t){if(t.constructor!==n)throw new Error("Ensure that each item passed to stream.combine/stream.merge/lift is a stream");return"active"===t._state})),o=r?n(t.apply(null,e.concat([e]))):n(),i=[],a=e.map((function(n){return n._map((function(a){return i.push(n),(r||e.every((function(t){return"pending"!==t._state})))&&(r=!0,o(t.apply(null,e.concat([i]))),i=[]),a}),!0)})),s=o.end.map((function(t){!0===t&&(a.forEach((function(t){t.end(!0)})),s.end(!0))}));return o}function o(t){return r((function(){return t.map((function(t){return t()}))}),t)}function i(t){return"pending"===t._state||"active"===t._state||"changing"===t._state}Object.defineProperty(n,"HALT",{get:function(){return e||console.log("HALT is deprecated and has been renamed to SKIP"),e=!0,n.SKIP}}),t.exports=n}()},function(t,e,n){var r=n(23).Symbol;t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(22),o=n(24),i="[object Symbol]";t.exports=function(t){return"symbol"==typeof t||o(t)&&r(t)==i}},function(t,e,n){var r=n(115),o=n(119);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(1))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var o=typeof t;return!!(e=null==e?n:e)&&("number"==o||"symbol"!=o&&r.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=n}},function(t,e,n){var r=n(73),o=n(71);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,e,n){var r=n(22),o=n(65),i="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",u="[object Proxy]";t.exports=function(t){if(!o(t))return!1;var e=r(t);return e==a||e==s||e==i||e==u}},function(t,e,n){var r=n(15),o=n(107),i=n(108),a=n(136);t.exports=function(t,e){return r(t)?t:o(t,e)?[t]:i(a(t))}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(66),o=1/0;t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-o?"-0":e}},,function(t,e,n){var r=n(81),o=n(82),i=n(104),a=n(15);t.exports=function(t,e){return(a(t)?r:o)(t,i(e))}},function(t,e,n){var r=n(106);t.exports=function(t,e,n){var o=null==t?void 0:r(t,e);return void 0===o?n:o}},function(t,e,n){var r=n(139);t.exports=function(t,e,n){return null==t?t:r(t,e,n)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n-1}},function(t,e,n){var r=n(26);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(67)(n(23),"Map");t.exports=r},function(t,e,n){var r=n(27);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(27);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(27);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(27);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},function(t,e,n){var r=n(137);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(64),o=n(138),i=n(15),a=n(66),s=1/0,u=r?r.prototype:void 0,c=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(a(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-s?"-0":n}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n)","gi")),o=[],i=[o];return r.forEach((function(t){var n=t.match(new RegExp("{([a-z0-9_]+)}|<(/?)([a-z0-9_]+)>","i"));if(n){if(n[1])i[0].push(e[n[1]]);else if(n[3])if(n[2])i.shift();else{var r=e[n[3]]||{tag:n[3],children:[]};i[0].push(r),i.unshift(r.children||r)}}else i[0].push({tag:"span",text:t})})),o.filter((function(t){return t}))},t}(),y=function(){function t(t,e){this.user=void 0,this.csrfToken=void 0,this.user=t,this.csrfToken=e}var e=t.prototype;return e.login=function(t,e){return void 0===e&&(e={}),app.request(Object(i.a)({method:"POST",url:app.forum.attribute("baseUrl")+"/login",body:t},e))},e.logout=function(){window.location.href=app.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}(),b=function(){function t(t){this.data={},this.models=void 0,this.models=t}var e=t.prototype;return e.pushPayload=function(t){t.included&&t.included.map(this.pushObject.bind(this));var e=t.data instanceof Array?t.data.map(this.pushObject.bind(this)):this.pushObject(t.data);return e.payload=t,e},e.pushObject=function(t){if(!this.models[t.type])return null;var e=this.data[t.type]=this.data[t.type]||{};return e[t.id]?e[t.id].pushData(t):e[t.id]=this.createRecord(t.type,t),e[t.id].exists=!0,e[t.id]},e.find=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r={});var o=n,a=app.forum.attribute("apiUrl")+"/"+t;return e instanceof Array?a+="?filter[id]="+e.join(","):"object"==typeof e?o=e:e&&(a+="/"+e),app.request(Object(i.a)({method:"GET",url:a,body:o},r)).then(this.pushPayload.bind(this))},e.getById=function(t,e){return this.data[t]&&this.data[t][e]},e.getBy=function(t,e,n){return this.all(t).filter((function(t){return t[e]()===n}))[0]},e.all=function(t){var e=this.data[t];return e?Object.keys(e).map((function(t){return e[t]})):[]},e.remove=function(t){delete this.data[t.data.type][t.id()]},e.createRecord=function(t,e){return void 0===e&&(e={}),e.type=e.type||t,new this.models[t](e,this)},t}();var w=function(){function t(){var t=this;this.$backdrop=void 0,$("#content").click((function(e){t.isOpen()&&(e.preventDefault(),t.hide())}))}var e=t.prototype;return e.isOpen=function(){return $("#app").hasClass("drawerOpen")},e.hide=function(){$("#app").removeClass("drawerOpen"),this.$backdrop&&this.$backdrop.remove()},e.show=function(){var t=this;$("#app").addClass("drawerOpen"),this.$backdrop=$("
").addClass("drawer-backdrop fade").appendTo("body").click((function(){return t.hide()})),setTimeout((function(){return t.$backdrop.addClass("in")}))},t}();function x(t,e,n){var r=t[e];t[e]=function(){for(var e=arguments.length,o=new Array(e),i=0;ie.priority?-1:1})).map((function(t){return t.content}))},t}(),_=function(){function t(t){this.element=void 0,this.props={},this.setProps(t)}var e=t.prototype;return e.view=function(t){throw new Error("Component#view must be implemented by subclass")},e.oninit=function(t){this.setProps(t.attrs)},e.oncreate=function(t){this.setProps(t.attrs),this.element=t.dom},e.onbeforeupdate=function(t){this.setProps(t.attrs)},e.onupdate=function(t){this.setProps(t.attrs)},e.onbeforeremove=function(t){this.setProps(t.attrs)},e.onremove=function(t){this.setProps(t.attrs)},e.$=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e=$(this.element);return t?e.find(t):e})),t.component=function(t,e){void 0===t&&(t={});var n=Object(i.a)({},t);return e&&(n.children=e),m(this,n)},t.initProps=function(t){void 0===t&&(t={})},e.setProps=function(t){this.constructor.initProps(t),this.props=t},t}();function S(t,e){return void 0===e&&(e={}),e.className="icon "+t+" "+(e.className||""),m("i",e)}var A=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.view=function(t){var e=t.attrs,n=d(e,"type"),r=d(e,"icon");return e.className="Badge "+(n?"Badge--"+n:"")+" "+(e.className||""),e.title=d(e,"label")||"",m("span",e,r?S(r,{className:"Badge-icon"}):m.trust(" "))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.props.label&&this.$().tooltip({container:"body"})},e}(_),j=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;odayjs().subtract(5,"minutes").toDate()},n.badges=function(){var t=new T,e=this.groups();return e&&e.forEach((function(e){t.add("group"+e.id(),D.component({group:e}))})),t},n.calculateAvatarColor=function(){var t=new Image,e=this;t.onload=function(){var t=new ColorThief;e.avatarColor=t.getColor(this),e.freshness=new Date,m.redraw()},t.src=this.avatarUrl()},n.savePreferences=function(t){var e=this.preferences();return Object(i.a)(e,t),this.save({preferences:e})},e}(E);function L(t){var e=t.replace(/(<\/p>|
)/g,"$1  ").replace(/]*>/gi," "),n=$("
").html(e);return n.find(L.removeSelectors.join(",")).remove(),n.text().replace(/\s+/g," ").trim()}L.removeSelectors=["blockquote","script"];var I=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o0&&this.registerTriggers.apply(this,r),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var e=t.prototype;return e.registerTriggers=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r
'),!1},rt=function(t,e){if(function(t){t.length<=0&&(console.warn("MicroModal: ❗Please specify at least one %c'micromodal-trigger'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","data attribute."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",''))}(t),!e)return!0;for(var n in e)nt(n);return!0},{init:function(t){var e=Object(i.a)({},{openTrigger:"data-micromodal-trigger"},t),n=[].concat(document.querySelectorAll("["+e.openTrigger+"]")),r=function(t,e){var n=[];return t.forEach((function(t){var r=t.attributes[e].value;void 0===n[r]&&(n[r]=[]),n[r].push(t)})),n}(n,e.openTrigger);if(!0!==e.debugMode||!1!==rt(n,r))for(var o in r){var a=r[o];e.targetModal=o,e.triggers=[].concat(a),et=new tt(e)}},show:function(t,e){var n=e||{};n.targetModal=t,!0===n.debugMode&&!1===nt(t)||(et=new tt(n)).showModal()},close:function(t){t?et.closeModalById(t):et.closeModal()}}),at=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o").addClass("modal-backdrop").appendTo("body"),it.show("Modal",{awaitCloseAnimation:!0,onClose:function(){$(".modal-backdrop").fadeOut(200,(function(){this.remove()})),e.showing=!1}}),this.onready()},n.onclick=function(t){t.target===this.element&&this.close()},n.close=function(){this.showing&&(this.hideTimeout=setTimeout((function(){return it.close("Modal")})))},n.clear=function(){this.component&&this.component.onhide(),this.component=null,app.current.retain=!1,m.lazyRedraw()},n.onready=function(){this.component&&this.component.onready&&this.component.onready(this.$())},e}(_),ut=function(){function t(){this.forum=void 0,this.data=void 0,this.translator=new g,this.bus=new p,this.session=void 0,this.store=new b({forums:N,users:P,discussions:j,posts:I,groups:R,notifications:B}),this.drawer=new w,this.modal=void 0,this.cache={},this.routes={},this.title="",this.titleCount=0,this.requestError=null}var e=t.prototype;return e.mount=function(t){void 0===t&&(t=""),m.mount(document.getElementById("modal"),new st),m.route(document.getElementById("content"),t+"/",function(t,e){void 0===e&&(e="");var n={};for(var r in t){var o=t[r];o.component&&(o.component.attrs||(o.component.attrs={}),o.component.attrs.routeName=r),n[e+o.path]=o.component}return n}(this.routes,t))},e.boot=function(t){this.data=t,this.store.pushPayload({data:this.data.resources}),this.forum=this.store.getById("forums",1),this.session=new y(this.store.getById("users",this.data.session.userId),this.data.session.csrfToken),this.locale(),this.plugins(),this.setupRoutes(),this.mount(),this.bus.dispatch("app.booting")},e.locale=function(){this.translator.locale=this.data.locale,this.bus.dispatch("app.locale")},e.plugins=function(){this.bus.dispatch("app.plugins")},e.setupRoutes=function(){this.bus.dispatch("app.routes")},e.preloadedApiDocument=function(){if(this.data.apiDocument){var t=this.store.pushPayload(this.data.apiDocument);return this.data.apiDocument=null,t}return null},e.setTitle=function(t){this.title=t,this.updateTitle()},e.setTitleCount=function(t){this.titleCount=t,this.updateTitle()},e.updateTitle=function(){document.title=(this.titleCount?"("+this.titleCount+") ":"")+(this.title?this.title+" - ":"")+this.forum.attribute("title")},e.route=function(t,e){void 0===e&&(e={});var n=this.routes[t];if(!n)throw new Error("Route '"+t+"' does not exist");var r=n.path.replace(/:([^\/]+)/g,(function(t,n){return d(e,n)})),o=m.buildQueryString(e);return(""===m.route.prefix?this.forum.attribute("basePath"):"")+r+(o?"?"+o:"")},e.request=function(t){var e=this,n=Object(i.a)({},t);if(n.background=n.background||!0,x(n,"config",(function(t,n){return n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)})),"GET"!==n.method&&"POST"!==n.method){var r=n.method;x(n,"config",(function(t,e){return e.setRequestHeader("X-HTTP-Method-Override",r)})),n.method="POST"}n.deserialize=n.deserialize||function(t){return t},n.errorHandler=n.errorHandler||function(t){throw t};var o=n.extract;return n.extract=function(t){var e;e=o?o(t.responseText):t.responseText||null;var r=t.status;if(r<200||r>299)throw new F(r,e,n,t);if(t.getResponseHeader){var i=t.getResponseHeader("X-CSRF-Token");i&&(app.session.csrfToken=i)}try{return JSON.parse(e)}catch(r){throw new F(500,e,n,t)}},m.request(n).then((function(t){return t}),(function(t){var r;switch(e.requestError=t,t.status){case 422:r=t.response.errors.map((function(t){return[t.detail,m("br")]})).reduce((function(t,e){return t.concat(e)}),[]).slice(0,-1);break;case 401:case 403:r=e.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:r=e.translator.trans("core.lib.error.not_found_message");break;case 429:r=e.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:r=e.translator.trans("core.lib.error.generic_message")}t.alert=ot.component({type:"error",children:r});try{n.errorHandler(t)}catch(t){console.error(t)}return Promise.reject(t)}))},t}(),ct=function(){function t(){this.stack=[]}var e=t.prototype;return e.getCurrent=function(){return this.stack[this.stack.length-1]},e.getPrevious=function(){return this.stack[this.stack.length-2]},e.push=function(t,e,n){void 0===n&&(n=m.route.get());var r=this.stack[this.stack.length-2];r&&r.name===t&&this.stack.pop();var o=this.getCurrent();o&&o.name===t?Object(i.a)(o,{url:n,title:e}):this.stack.push({name:t,url:n,title:e})},e.canGoBack=function(){return this.stack.length>1},e.back=function(){if(!this.canGoBack())return this.home();this.stack.pop(),m.route.set(this.getCurrent().url)},e.backUrl=function(){return this.stack[this.stack.length-2].url},e.home=function(){this.stack.splice(0),m.route.set("/")},t}(),lt=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},X(this.items().toArray()))},n.items=function(){return new T},e}(_),ft=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o .Dropdown-toggle").dropdown(),this.element.addEventListener("shown.bs.dropdown",(function(){n.showing=!0,n.props.onshow&&n.props.onshow(),m.redraw();var t=n.$(".Dropdown-menu"),e=t.hasClass("Dropdown-menu--right");t.removeClass("Dropdown-menu--top Dropdown-menu--right"),t.toggleClass("Dropdown-menu--top",t.offset().top+t.height()>$(window).scrollTop()+$(window).height()),t.offset().top<0&&t.removeClass("Dropdown-menu--top"),t.toggleClass("Dropdown-menu--right",e||t.offset().left+t.width()>$(window).scrollLeft()+$(window).width())})),this.element.addEventListener("hidden.bs.dropdown",(function(){n.showing=!1,n.props.onhide&&n.props.onhide(),m.redraw()}))},n.getButton=function(){return m("button",{className:"Dropdown-toggle "+this.props.buttonClassName,"data-toggle":"dropdown",onclick:this.props.onclick},this.getButtonContent())},n.getButtonContent=function(){var t=this.props;return[t.icon?S(t.icon,{className:"Button-icon"}):"",m("span",{className:"Button-label"},t.label),t.caretIcon?S(t.caretIcon,{className:"Button-caret"}):""]},n.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu "+this.props.menuClassName},t)},e}(_),ht=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e.initProps=function(t){t.active=this.isActive(t),t.oncreate=t.oncreate},e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return n.tag=m.route.Link,n},e.isActive=function(t){return void 0!==t.active?t.active:m.route.get()===t.href},e}(Z),mt=function(t){function e(){return t.apply(this,arguments)||this}o(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className="SessionDropdown",e.buttonClassName="Button Button--user Button--flat",e.menuClassName="Dropdown-menu--right"};var n=e.prototype;return n.view=function(){return this.props.children=this.items().toArray(),t.prototype.view.call(this)},n.getButtonContent=function(){var t=app.session.user;return[pt(t)," ",m("span",{className:"Button-label"},v(t))]},n.items=function(){var t=new T,e=app.session.user;return t.add("profile",ht.component({icon:"fas fa-user",children:app.translator.trans("core.forum.header.profile_button"),href:app.route.user(e)}),100),app.forum.attribute("adminUrl")&&t.add("administration",ht.component({icon:"fas fa-wrench",children:app.translator.trans("core.forum.header.admin_button"),href:app.forum.attribute("adminUrl"),target:"_blank",config:function(){}}),0),t.add("separator",J.component(),-90),t.add("logOut",Z.component({icon:"fas fa-sign-out-alt",children:app.translator.trans("core.forum.header.log_out_button"),onclick:app.session.logout.bind(app.session)}),-100),t},e}(dt),vt=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e.initProps=function(e){e.caretIcon=void 0!==e.caretIcon?e.caretIcon:"fas fa-sort",t.initProps.call(this,e),e.className+=" Dropdown--select"},e.prototype.getButtonContent=function(){var t=this.props.children.filter((function(t){return t.attrs.active}))[0],e=t&&t.attrs.children||this.props.defaultLabel;return e instanceof Array&&(e=e[0]),[m("span",{className:"Button-label"},e),S(this.props.caretIcon,{className:"Button-caret"})]},e}(dt),gt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o=i+a&&n.loadMore()},o.on("scroll",this.scrollHandler)},n.onremove=function(e){t.prototype.onremove.call(this,e),this.$scrollParent.off("scroll",this.scrollHandler)},n.load=function(){app.session.user.newNotificationCount()&&delete app.cache.notifications,app.cache.notifications||(app.session.user.pushAttributes({newNotificationCount:0}),this.loadMore())},n.loadMore=function(){var t=this;this.loading=!0,m.redraw();var e=app.cache.notifications?{page:{offset:10*app.cache.notifications.length}}:null;return app.store.find("notifications",e).then(this.parseResults.bind(this)).catch((function(){})).then((function(){t.loading=!1,m.redraw()}))},n.parseResults=function(t){return app.cache.notifications=app.cache.notifications||[],t.length&&app.cache.notifications.push(t),this.moreResults=!!t.payload.links.next,t},n.markAllAsRead=function(){app.cache.notifications&&(app.session.user.pushAttributes({unreadNotificationCount:0}),app.cache.notifications.forEach((function(t){t.forEach((function(t){return t.pushAttributes({isRead:!0})}))})),app.request({url:app.forum.attribute("apiUrl")+"/notifications/read",method:"POST"}))},e}(_),yt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o0?"...":"")+t.substring(n,n+e)+(t.length>n+e?"...":"")}(o,n,i)),o=$("
").text(o).html(),e&&(o=o.replace(r,"$&")),m.trust(o)}var xt=function(){},kt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o li:not(.Dropdown-header)",(function(){r.setIndex(r.selectableItems().index(this))}));var o=this.$("input");this.navigator=new bt,this.navigator.onUp((function(){return n.setIndex(n.getCurrentNumericIndex()-1,!0)})).onDown((function(){return n.setIndex(n.getCurrentNumericIndex()+1,!0)})).onSelect(this.selectResult.bind(this)).onCancel(this.clear.bind(this)).bindTo(o),o.on("input focus",(function(){var t=this.value.toLowerCase();t&&(clearTimeout(r.searchTimeout),r.searchTimeout=setTimeout((function(){-1===r.searched.indexOf(t)&&(t.length>=3&&r.sources.map((function(e){e.search&&(r.loadingSources++,e.search(t).then((function(){r.loadingSources=Math.max(0,r.loadingSources-1),m.redraw()})))})),r.searched.push(t),m.redraw())}),250))})).on("focus",(function(){$(this).one("mouseup",(function(t){return t.preventDefault()})).select()}))},n.getCurrentSearch=function(){return app.current&&"function"==typeof app.current.searching&&app.current.searching()},n.selectResult=function(){clearTimeout(this.searchTimeout),this.loadingSources=0,this.value()?m.route.set(this.getItem(this.index).find("a").attr("href")):this.clear(),this.$("input").blur()},n.clear=function(){this.value(""),this.getCurrentSearch()?app.current.clearSearch():m.redraw()},n.sourceItems=function(){var t=new T;return app.forum.attribute("canViewDiscussions")&&t.add("discussions",new kt),app.forum.attribute("canViewUserList")&&t.add("users",new Et),t},n.selectableItems=function(){return this.$(".Search-results > li:not(.Dropdown-header)")},n.getCurrentNumericIndex=function(){return this.selectableItems().index(this.getItem(this.index))},n.getItem=function(t){var e=this.selectableItems(),n=e.filter('[data-index="'+t+'"]');return n.length||(n=e.eq(t)),n},n.setIndex=function(t,e){var n=this.selectableItems(),r=n.parent(),o=t;t<0?o=n.length-1:t>=n.length&&(o=0);var i=n.removeClass("active").eq(o).addClass("active");if(this.index=i.attr("data-index")||o,e){var a,s=r.scrollTop(),u=r.offset().top,c=u+r.outerHeight(),l=i.offset().top,f=l+i.outerHeight();lc&&(a=s-c+f+parseInt(r.css("padding-bottom"),10)),void 0!==a&&r.animate({scrollTop:a},100)}},e}(_),Ct=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},X(this.items().toArray()))},n.items=function(){var t=new T;if(t.add("search",Nt.component(),30),app.forum.attribute("showLanguageSelector")&&Object.keys(app.data.locales).length>1){var e=[],n=function(t){e.push(Z.component({active:app.data.locale===t,children:app.data.locales[t],icon:app.data.locale!==t||"fas fa-check",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 r in app.data.locales)n(r);t.add("locale",vt.component({children:e,buttonClassName:"Button Button--link"}),20)}return app.session.user?(t.add("notifications",yt.component(),10),t.add("session",mt.component(),0)):(app.forum.attribute("allowSignUp")&&t.add("signUp",Z.component({children:app.translator.trans("core.forum.header.sign_up_link"),className:"Button Button--link",onclick:function(){return app.modal.show(new SignUpModal)}}),10),t.add("logIn",Z.component({children:app.translator.trans("core.forum.header.log_in_link"),className:"Button Button--link",onclick:function(){return app.modal.show(new ft)}}),0)),t},e}(_),Ot=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.oninit=function(){console.log("IndexPage#oninit")},n.view=function(){return m("div",{class:"container"},m("h1",null,"hi"))},e}(_),Tt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o ul")[0];$(window).off(".affix"),new hcSticky(o,{stickTo:e,top:r.outerHeight(!0)+parseInt(n.css("margin-top"),10)})}function St(t){var e=dayjs(t),n=dayjs();e.isAfter(n)&&(e=n);return e.diff(dayjs())<-2592e6?e.year()===dayjs().year()?e.format("D MMM"):e.format("MMM 'YY"):e.fromNow()}var At={controls:function(t,e){var n=this,r=new T;return["user","moderation","destructive"].forEach((function(o){var i=n[o+"Controls"](t,e).toArray();i.length&&(i.forEach((function(t){return r.add(t.itemName,t)})),r.add(o+"Separator",J.component()))})),r},userControls:function(){return new T},moderationControls:function(t){var e=new T;return t.canEdit()&&e.add("edit",Z.component({icon:"fas fa-pencil-alt",children:app.translator.trans("core.forum.user_controls.edit_button"),onclick:this.editAction.bind(t)})),e},destructiveControls:function(t){var e=new T;return"1"!==t.id()&&t.canDelete()&&e.add("delete",Z.component({icon:"fas fa-times",children:app.translator.trans("core.forum.user_controls.delete_button"),onclick:this.deleteAction.bind(t)})),e},deleteAction:function(){var t=this;confirm(app.translator.trans("core.forum.user_controls.delete_confirmation"))&&this.delete().then((function(){app.current instanceof Dt&&app.current.user===t?app.history.back():window.location.reload()}))},editAction:function(){app.modal.show(new EditUserModal({user:this}))}},jt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o').appendTo("body").hide().click().on("change",(function(e){t.upload($(e.target)[0].files[0])}))}},n.upload=function(t){if(!this.loading){var e=this.props.user,n=new FormData;data.append("avatar",t),this.loading=!0,m.redraw(),app.request({method:"POST",url:app.forum.attribute("apiUrl")+"/users/"+e.id()+"/avatar",serialize:function(t){return t},body:n}).then(this.success.bind(this),this.failure.bind(this))}},n.remove=function(){var t=this.props.user;this.loading=!0,m.redraw(),app.request({method:"DELETE",url:app.forum.attribute("apiUrl")+"/users/"+t.id()+"/avatar"}).then(this.success.bind(this),this.failure.bind(this))},n.success=function(t){app.store.pushPayload(t),delete this.props.user.avatarColor,this.loading=!1,m.redraw()},n.failure=function(t){this.loading=!1,m.redraw()},e}(_),Mt=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.view=function(){var t=this.props.user,e=At.controls(t,this).toArray(),n=t.color(),r=t.badges().toArray();return m("div",{className:"UserCard "+(this.props.className||""),style:n?{backgroundColor:n}:""},m("div",{className:"darkenBackground"},m("div",{className:"container"},e.length?dt.component({children:e,className:"UserCard-controls App-primaryControl",menuClassName:"Dropdown-menu--right",buttonClassName:this.props.controlsButtonClassName,label:app.translator.trans("core.forum.user_controls.button"),icon:"fas fa-ellipsis-v"}):"",m("div",{className:"UserCard-profile"},m("h2",{className:"UserCard-identity"},this.props.editable?[jt.component({user:t,className:"UserCard-avatar"}),v(t)]:m(m.route.Link,{href:app.route.user(t)},m("div",{className:"UserCard-avatar"},pt(t)),v(t))),r.length?m("ul",{className:"UserCard-badges badges"},X(r)):"",m("ul",{className:"UserCard-info"},X(this.infoItems().toArray()))))))},n.infoItems=function(){var t=new T,e=this.props.user,n=e.lastSeenAt();if(n){var r=e.isOnline();t.add("lastSeen",m("span",{className:"UserCard-lastSeen"+(r?" online":"")},r?[S("fas fa-circle")," ",app.translator.trans("core.forum.user.online_text")]:[S("far fa-clock")," ",St(n)]))}return t.add("joined",app.translator.trans("core.forum.user.joined_date_text",{ago:St(e.joinTime())})),t},e}(_),Dt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o=this.loadLimit,m.redraw(),t},e}(Dt),Lt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(10&&u--,40==e.which&&u-1&&(e=t[o][1](e,n()))})),e}),n);return o(e),o},n["fantasy-land/of"]=n;var e=!1;function n(t){var e,o=[],a=[];function s(e){return arguments.length&&e!==n.SKIP&&(t=e,i(s)&&(s._changing(),s._state="active",o.forEach((function(e,n){e(a[n](t))})))),t}return s.constructor=n,s._state=arguments.length&&t!==n.SKIP?"active":"pending",s._parents=[],s._changing=function(){i(s)&&(s._state="changing"),o.forEach((function(t){t._changing()}))},s._map=function(e,r){var i=r?n():n(e(t));return i._parents.push(s),o.push(i),a.push(e),i},s.map=function(t){return s._map(t,"active"!==s._state)},s.toJSON=function(){return null!=t&&"function"==typeof t.toJSON?t.toJSON():t},s["fantasy-land/map"]=s.map,s["fantasy-land/ap"]=function(t){return r((function(t,e){return t()(e())}),[t,s])},s._unregisterChild=function(t){var e=o.indexOf(t);-1!==e&&(o.splice(e,1),a.splice(e,1))},Object.defineProperty(s,"end",{get:function(){return e||((e=n()).map((function(t){return!0===t&&(s._parents.forEach((function(t){t._unregisterChild(s)})),s._state="ended",s._parents.length=o.length=a.length=0),t})),e)}}),s}function r(t,e){var r=e.every((function(t){if(t.constructor!==n)throw new Error("Ensure that each item passed to stream.combine/stream.merge/lift is a stream");return"active"===t._state})),o=r?n(t.apply(null,e.concat([e]))):n(),i=[],a=e.map((function(n){return n._map((function(a){return i.push(n),(r||e.every((function(t){return"pending"!==t._state})))&&(r=!0,o(t.apply(null,e.concat([i]))),i=[]),a}),!0)})),s=o.end.map((function(t){!0===t&&(a.forEach((function(t){t.end(!0)})),s.end(!0))}));return o}function o(t){return r((function(){return t.map((function(t){return t()}))}),t)}function i(t){return"pending"===t._state||"active"===t._state||"changing"===t._state}Object.defineProperty(n,"HALT",{get:function(){return e||console.log("HALT is deprecated and has been renamed to SKIP"),e=!0,n.SKIP}}),t.exports=n}()},function(t,e,n){var r=n(23).Symbol;t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(22),o=n(24),i="[object Symbol]";t.exports=function(t){return"symbol"==typeof t||o(t)&&r(t)==i}},function(t,e,n){var r=n(114),o=n(118);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(1))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var o=typeof t;return!!(e=null==e?n:e)&&("number"==o||"symbol"!=o&&r.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=n}},function(t,e,n){var r=n(72),o=n(70);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,e,n){var r=n(22),o=n(64),i="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",u="[object Proxy]";t.exports=function(t){if(!o(t))return!1;var e=r(t);return e==a||e==s||e==i||e==u}},function(t,e,n){var r=n(16),o=n(106),i=n(107),a=n(135);t.exports=function(t,e){return r(t)?t:o(t,e)?[t]:i(a(t))}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(65),o=1/0;t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-o?"-0":e}},,function(t,e,n){var r=n(80),o=n(81),i=n(103),a=n(16);t.exports=function(t,e){return(a(t)?r:o)(t,i(e))}},function(t,e,n){var r=n(105);t.exports=function(t,e,n){var o=null==t?void 0:r(t,e);return void 0===o?n:o}},function(t,e,n){var r=n(138);t.exports=function(t,e,n){return null==t?t:r(t,e,n)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n-1}},function(t,e,n){var r=n(26);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(66)(n(23),"Map");t.exports=r},function(t,e,n){var r=n(27);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(27);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(27);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(27);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},function(t,e,n){var r=n(136);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(63),o=n(137),i=n(16),a=n(65),s=1/0,u=r?r.prototype:void 0,c=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(a(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-s?"-0":n}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n)","gi")),o=[],i=[o];return r.forEach((function(t){var n=t.match(new RegExp("{([a-z0-9_]+)}|<(/?)([a-z0-9_]+)>","i"));if(n){if(n[1])i[0].push(e[n[1]]);else if(n[3])if(n[2])i.shift();else{var r=e[n[3]]||{tag:n[3],children:[]};i[0].push(r),i.unshift(r.children||r)}}else i[0].push({tag:"span",text:t})})),o.filter((function(t){return t}))},t}(),y=function(){function t(t,e){this.user=void 0,this.csrfToken=void 0,this.user=t,this.csrfToken=e}var e=t.prototype;return e.login=function(t,e){return void 0===e&&(e={}),app.request(Object(i.a)({method:"POST",url:app.forum.attribute("baseUrl")+"/login",body:t},e))},e.logout=function(){window.location.href=app.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}(),b=function(){function t(t){this.data={},this.models=void 0,this.models=t}var e=t.prototype;return e.pushPayload=function(t){t.included&&t.included.map(this.pushObject.bind(this));var e=t.data instanceof Array?t.data.map(this.pushObject.bind(this)):this.pushObject(t.data);return e.payload=t,e},e.pushObject=function(t){if(!this.models[t.type])return null;var e=this.data[t.type]=this.data[t.type]||{};return e[t.id]?e[t.id].pushData(t):e[t.id]=this.createRecord(t.type,t),e[t.id].exists=!0,e[t.id]},e.find=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r={});var o=n,a=app.forum.attribute("apiUrl")+"/"+t;return e instanceof Array?a+="?filter[id]="+e.join(","):"object"==typeof e?o=e:e&&(a+="/"+e),app.request(Object(i.a)({method:"GET",url:a,body:o},r)).then(this.pushPayload.bind(this))},e.getById=function(t,e){return this.data[t]&&this.data[t][e]},e.getBy=function(t,e,n){return this.all(t).filter((function(t){return t[e]()===n}))[0]},e.all=function(t){var e=this.data[t];return e?Object.keys(e).map((function(t){return e[t]})):[]},e.remove=function(t){delete this.data[t.data.type][t.id()]},e.createRecord=function(t,e){return void 0===e&&(e={}),e.type=e.type||t,new this.models[t](e,this)},t}();var w=function(){function t(){var t=this;this.$backdrop=void 0,$("#content").click((function(e){t.isOpen()&&(e.preventDefault(),t.hide())}))}var e=t.prototype;return e.isOpen=function(){return $("#app").hasClass("drawerOpen")},e.hide=function(){$("#app").removeClass("drawerOpen"),this.$backdrop&&this.$backdrop.remove()},e.show=function(){var t=this;$("#app").addClass("drawerOpen"),this.$backdrop=$("
").addClass("drawer-backdrop fade").appendTo("body").click((function(){return t.hide()})),setTimeout((function(){return t.$backdrop.addClass("in")}))},t}();function x(t,e,n){var r=t[e];t[e]=function(){for(var e=arguments.length,o=new Array(e),i=0;ie.priority?-1:1})).map((function(t){return t.content}))},t}(),_=function(){function t(){this.element=void 0,this.props={}}var e=t.prototype;return e.view=function(t){throw new Error("Component#view must be implemented by subclass")},e.oninit=function(t){this.setProps(t.attrs)},e.oncreate=function(t){this.setProps(t.attrs),this.element=t.dom},e.onbeforeupdate=function(t){this.setProps(t.attrs)},e.onupdate=function(t){this.setProps(t.attrs)},e.onbeforeremove=function(t){this.setProps(t.attrs)},e.onremove=function(t){this.setProps(t.attrs)},e.$=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e=$(this.element);return t?e.find(t):e})),t.component=function(t,e){void 0===t&&(t={});var n=Object(i.a)({},t);return e&&(n.children=e),m(this,n)},t.initProps=function(t){void 0===t&&(t={})},e.setProps=function(t){this.constructor.initProps(t),this.props=t},t}();function S(t,e){return void 0===e&&(e={}),e.className="icon "+t+" "+(e.className||""),m("i",e)}var A=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.view=function(t){var e=t.attrs,n=d(e,"type"),r=d(e,"icon");return e.className="Badge "+(n?"Badge--"+n:"")+" "+(e.className||""),e.title=d(e,"label")||"",m("span",e,r?S(r,{className:"Badge-icon"}):m.trust(" "))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.props.label&&this.$().tooltip({container:"body"})},e}(_),j=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;odayjs().subtract(5,"minutes").toDate()},n.badges=function(){var t=new O,e=this.groups();return e&&e.forEach((function(e){t.add("group"+e.id(),D.component({group:e}))})),t},n.calculateAvatarColor=function(){var t=new Image,e=this;t.onload=function(){var t=new ColorThief;e.avatarColor=t.getColor(this),e.freshness=new Date,m.redraw()},t.src=this.avatarUrl()},n.savePreferences=function(t){var e=this.preferences();return Object(i.a)(e,t),this.save({preferences:e})},e}(E);function L(t){var e=t.replace(/(<\/p>|
)/g,"$1  ").replace(/]*>/gi," "),n=$("
").html(e);return n.find(L.removeSelectors.join(",")).remove(),n.text().replace(/\s+/g," ").trim()}L.removeSelectors=["blockquote","script"];var I=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o0&&this.registerTriggers.apply(this,r),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var e=t.prototype;return e.registerTriggers=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r
'),!1},rt=function(t,e){if(function(t){t.length<=0&&(console.warn("MicroModal: ❗Please specify at least one %c'micromodal-trigger'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","data attribute."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",''))}(t),!e)return!0;for(var n in e)nt(n);return!0},{init:function(t){var e=Object(i.a)({},{openTrigger:"data-micromodal-trigger"},t),n=[].concat(document.querySelectorAll("["+e.openTrigger+"]")),r=function(t,e){var n=[];return t.forEach((function(t){var r=t.attributes[e].value;void 0===n[r]&&(n[r]=[]),n[r].push(t)})),n}(n,e.openTrigger);if(!0!==e.debugMode||!1!==rt(n,r))for(var o in r){var a=r[o];e.targetModal=o,e.triggers=[].concat(a),et=new tt(e)}},show:function(t,e){var n=e||{};n.targetModal=t,!0===n.debugMode&&!1===nt(t)||(et=new tt(n)).showModal()},close:function(t){t?et.closeModalById(t):et.closeModal()}}),at=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o").addClass("modal-backdrop").appendTo("body"),it.show("Modal",{awaitCloseAnimation:!0,onClose:function(){$(".modal-backdrop").fadeOut(200,(function(){this.remove()})),e.showing=!1}}),this.onready()},n.onclick=function(t){t.target===this.element&&this.close()},n.close=function(){this.showing&&(this.hideTimeout=setTimeout((function(){return it.close("Modal")})))},n.clear=function(){this.component&&this.component.onhide(),this.component=null,app.current.retain=!1,m.redraw()},n.onready=function(){this.component&&this.component.onready&&this.component.onready()},e}(_),ut=function(){function t(){this.forum=void 0,this.data=void 0,this.translator=new g,this.bus=new p,this.session=void 0,this.store=new b({forums:N,users:P,discussions:j,posts:I,groups:R,notifications:B}),this.drawer=new w,this.modal=void 0,this.cache={notifications:null},this.routes={},this.title="",this.titleCount=0,this.requestError=null}var e=t.prototype;return e.mount=function(t){void 0===t&&(t=""),m.mount(document.getElementById("modal"),new st),m.route(document.getElementById("content"),t+"/",function(t,e){void 0===e&&(e="");var n={};for(var r in t){var o=t[r];o.component&&(o.component.attrs||(o.component.attrs={}),o.component.attrs.routeName=r),n[e+o.path]=o.component}return n}(this.routes,t))},e.boot=function(t){this.data=t,this.store.pushPayload({data:this.data.resources}),this.forum=this.store.getById("forums",1),this.session=new y(this.store.getById("users",this.data.session.userId),this.data.session.csrfToken),this.locale(),this.plugins(),this.setupRoutes(),this.mount(),this.bus.dispatch("app.booting")},e.locale=function(){this.translator.locale=this.data.locale,this.bus.dispatch("app.locale")},e.plugins=function(){this.bus.dispatch("app.plugins")},e.setupRoutes=function(){this.bus.dispatch("app.routes")},e.preloadedApiDocument=function(){if(this.data.apiDocument){var t=this.store.pushPayload(this.data.apiDocument);return this.data.apiDocument=null,t}return null},e.setTitle=function(t){this.title=t,this.updateTitle()},e.setTitleCount=function(t){this.titleCount=t,this.updateTitle()},e.updateTitle=function(){document.title=(this.titleCount?"("+this.titleCount+") ":"")+(this.title?this.title+" - ":"")+this.forum.attribute("title")},e.route=function(t,e){void 0===e&&(e={});var n=this.routes[t];if(!n)throw new Error("Route '"+t+"' does not exist");var r=n.path.replace(/:([^\/]+)/g,(function(t,n){return d(e,n)})),o=m.buildQueryString(e);return(""===m.route.prefix?this.forum.attribute("basePath"):"")+r+(o?"?"+o:"")},e.request=function(t){var e=this,n=Object(i.a)({},t);if(n.background=n.background||!0,x(n,"config",(function(t,n){return n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)})),"GET"!==n.method&&"POST"!==n.method){var r=n.method;x(n,"config",(function(t,e){return e.setRequestHeader("X-HTTP-Method-Override",r)})),n.method="POST"}n.deserialize=n.deserialize||function(t){return t},n.errorHandler=n.errorHandler||function(t){throw t};var o=n.extract;return n.extract=function(t){var e;e=o?o(t.responseText):t.responseText||null;var r=t.status;if(r<200||r>299)throw new F(r,e,n,t);if(t.getResponseHeader){var i=t.getResponseHeader("X-CSRF-Token");i&&(app.session.csrfToken=i)}try{return JSON.parse(e)}catch(r){throw new F(500,e,n,t)}},m.request(n).then((function(t){return t}),(function(t){var r;switch(e.requestError=t,t.status){case 422:r=t.response.errors.map((function(t){return[t.detail,m("br")]})).reduce((function(t,e){return t.concat(e)}),[]).slice(0,-1);break;case 401:case 403:r=e.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:r=e.translator.trans("core.lib.error.not_found_message");break;case 429:r=e.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:r=e.translator.trans("core.lib.error.generic_message")}t.alert=ot.component({type:"error",children:r});try{n.errorHandler(t)}catch(t){console.error(t)}return Promise.reject(t)}))},t}(),ct=function(){function t(){this.stack=[]}var e=t.prototype;return e.getCurrent=function(){return this.stack[this.stack.length-1]},e.getPrevious=function(){return this.stack[this.stack.length-2]},e.push=function(t,e,n){void 0===n&&(n=m.route.get());var r=this.stack[this.stack.length-2];r&&r.name===t&&this.stack.pop();var o=this.getCurrent();o&&o.name===t?Object(i.a)(o,{url:n,title:e}):this.stack.push({name:t,url:n,title:e})},e.canGoBack=function(){return this.stack.length>1},e.back=function(){if(!this.canGoBack())return this.home();this.stack.pop(),m.route.set(this.getCurrent().url)},e.backUrl=function(){return this.stack[this.stack.length-2].url},e.home=function(){this.stack.splice(0),m.route.set("/")},t}(),lt=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},X(this.items().toArray()))},n.items=function(){return new O},e}(_),ft=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o .Dropdown-toggle").dropdown(),this.element.addEventListener("shown.bs.dropdown",(function(){n.showing=!0,n.props.onshow&&n.props.onshow(),m.redraw();var t=n.$(".Dropdown-menu"),e=t.hasClass("Dropdown-menu--right");t.removeClass("Dropdown-menu--top Dropdown-menu--right"),t.toggleClass("Dropdown-menu--top",t.offset().top+t.height()>$(window).scrollTop()+$(window).height()),t.offset().top<0&&t.removeClass("Dropdown-menu--top"),t.toggleClass("Dropdown-menu--right",e||t.offset().left+t.width()>$(window).scrollLeft()+$(window).width())})),this.element.addEventListener("hidden.bs.dropdown",(function(){n.showing=!1,n.props.onhide&&n.props.onhide(),m.redraw()}))},n.getButton=function(){return m("button",{className:"Dropdown-toggle "+this.props.buttonClassName,"data-toggle":"dropdown",onclick:this.props.onclick},this.getButtonContent())},n.getButtonContent=function(){var t=this.props;return[t.icon?S(t.icon,{className:"Button-icon"}):"",m("span",{className:"Button-label"},t.label),t.caretIcon?S(t.caretIcon,{className:"Button-caret"}):""]},n.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu "+this.props.menuClassName},t)},e}(_),ht=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e.initProps=function(t){t.active=this.isActive(t),t.oncreate=t.oncreate},e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return n.tag=m.route.Link,n},e.isActive=function(t){return void 0!==t.active?t.active:m.route.get()===t.href},e}(Z),mt=function(t){function e(){return t.apply(this,arguments)||this}o(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className="SessionDropdown",e.buttonClassName="Button Button--user Button--flat",e.menuClassName="Dropdown-menu--right"};var n=e.prototype;return n.view=function(){return this.props.children=this.items().toArray(),t.prototype.view.call(this)},n.getButtonContent=function(){var t=app.session.user;return[pt(t)," ",m("span",{className:"Button-label"},v(t))]},n.items=function(){var t=new O,e=app.session.user;return t.add("profile",ht.component({icon:"fas fa-user",children:app.translator.trans("core.forum.header.profile_button"),href:app.route.user(e)}),100),app.forum.attribute("adminUrl")&&t.add("administration",ht.component({icon:"fas fa-wrench",children:app.translator.trans("core.forum.header.admin_button"),href:app.forum.attribute("adminUrl"),target:"_blank",config:function(){}}),0),t.add("separator",J.component(),-90),t.add("logOut",Z.component({icon:"fas fa-sign-out-alt",children:app.translator.trans("core.forum.header.log_out_button"),onclick:app.session.logout.bind(app.session)}),-100),t},e}(dt),vt=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e.initProps=function(e){e.caretIcon=void 0!==e.caretIcon?e.caretIcon:"fas fa-sort",t.initProps.call(this,e),e.className+=" Dropdown--select"},e.prototype.getButtonContent=function(){var t=this.props.children.filter((function(t){return t.attrs.active}))[0],e=t&&t.attrs.children||this.props.defaultLabel;return e instanceof Array&&(e=e[0]),[m("span",{className:"Button-label"},e),S(this.props.caretIcon,{className:"Button-caret"})]},e}(dt),gt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o=i+a&&n.loadMore()},o.on("scroll",this.scrollHandler)},n.onremove=function(e){t.prototype.onremove.call(this,e),this.$scrollParent.off("scroll",this.scrollHandler)},n.load=function(){app.session.user.newNotificationCount()&&delete app.cache.notifications,app.cache.notifications||(app.session.user.pushAttributes({newNotificationCount:0}),this.loadMore())},n.loadMore=function(){var t=this;this.loading=!0,m.redraw();var e=app.cache.notifications?{page:{offset:10*app.cache.notifications.length}}:null;return app.store.find("notifications",e).then(this.parseResults.bind(this)).catch((function(){})).then((function(){t.loading=!1,m.redraw()}))},n.parseResults=function(t){return app.cache.notifications=app.cache.notifications||[],t.length&&app.cache.notifications.push(t),this.moreResults=!!t.payload.links.next,t},n.markAllAsRead=function(){app.cache.notifications&&(app.session.user.pushAttributes({unreadNotificationCount:0}),app.cache.notifications.forEach((function(t){t.forEach((function(t){return t.pushAttributes({isRead:!0})}))})),app.request({url:app.forum.attribute("apiUrl")+"/notifications/read",method:"POST"}))},e}(_),yt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o0?"...":"")+t.substring(n,n+e)+(t.length>n+e?"...":"")}(o,n,i)),o=$("
").text(o).html(),e&&(o=o.replace(r,"$&")),m.trust(o)}var xt=function(){},kt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o li:not(.Dropdown-header)",(function(){r.setIndex(r.selectableItems().index(this))}));var o=this.$("input");this.navigator=new bt,this.navigator.onUp((function(){return n.setIndex(n.getCurrentNumericIndex()-1,!0)})).onDown((function(){return n.setIndex(n.getCurrentNumericIndex()+1,!0)})).onSelect(this.selectResult.bind(this)).onCancel(this.clear.bind(this)).bindTo(o),o.on("input focus",(function(){var t=this.value.toLowerCase();t&&(clearTimeout(r.searchTimeout),r.searchTimeout=setTimeout((function(){-1===r.searched.indexOf(t)&&(t.length>=3&&r.sources.map((function(e){e.search&&(r.loadingSources++,e.search(t).then((function(){r.loadingSources=Math.max(0,r.loadingSources-1),m.redraw()})))})),r.searched.push(t),m.redraw())}),250))})).on("focus",(function(){$(this).one("mouseup",(function(t){return t.preventDefault()})).select()}))},n.getCurrentSearch=function(){return app.current&&"function"==typeof app.current.searching&&app.current.searching()},n.selectResult=function(){clearTimeout(this.searchTimeout),this.loadingSources=0,this.value()?m.route.set(this.getItem(this.index).find("a").attr("href")):this.clear(),this.$("input").blur()},n.clear=function(){this.value(""),this.getCurrentSearch()?app.current.clearSearch():m.redraw()},n.sourceItems=function(){var t=new O;return app.forum.attribute("canViewDiscussions")&&t.add("discussions",new kt),app.forum.attribute("canViewUserList")&&t.add("users",new Et),t},n.selectableItems=function(){return this.$(".Search-results > li:not(.Dropdown-header)")},n.getCurrentNumericIndex=function(){return this.selectableItems().index(this.getItem(this.index))},n.getItem=function(t){var e=this.selectableItems(),n=e.filter('[data-index="'+t+'"]');return n.length||(n=e.eq(t)),n},n.setIndex=function(t,e){var n=this.selectableItems(),r=n.parent(),o=t;t<0?o=n.length-1:t>=n.length&&(o=0);var i=n.removeClass("active").eq(o).addClass("active");if(this.index=i.attr("data-index")||o,e){var a,s=r.scrollTop(),u=r.offset().top,c=u+r.outerHeight(),l=i.offset().top,f=l+i.outerHeight();lc&&(a=s-c+f+parseInt(r.css("padding-bottom"),10)),void 0!==a&&r.animate({scrollTop:a},100)}},e}(_),Tt=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},X(this.items().toArray()))},n.items=function(){var t=new O;if(t.add("search",Nt.component(),30),app.forum.attribute("showLanguageSelector")&&Object.keys(app.data.locales).length>1){var e=[],n=function(t){e.push(Z.component({active:app.data.locale===t,children:app.data.locales[t],icon:app.data.locale!==t||"fas fa-check",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 r in app.data.locales)n(r);t.add("locale",vt.component({children:e,buttonClassName:"Button Button--link"}),20)}return app.session.user?(t.add("notifications",yt.component(),10),t.add("session",mt.component(),0)):(app.forum.attribute("allowSignUp")&&t.add("signUp",Z.component({children:app.translator.trans("core.forum.header.sign_up_link"),className:"Button Button--link",onclick:function(){return app.modal.show(new SignUpModal)}}),10),t.add("logIn",Z.component({children:app.translator.trans("core.forum.header.log_in_link"),className:"Button Button--link",onclick:function(){return app.modal.show(new ft)}}),0)),t},e}(_),Ct=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.oninit=function(){console.log("IndexPage#oninit")},n.view=function(){return m("div",{class:"container"},m("h1",null,"hi"))},e}(_),Ot=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o ul")[0];$(window).off(".affix"),new hcSticky(o,{stickTo:e,top:r.outerHeight(!0)+parseInt(n.css("margin-top"),10)})}function St(t){var e=dayjs(t),n=dayjs();e.isAfter(n)&&(e=n);return e.diff(dayjs())<-2592e6?e.year()===dayjs().year()?e.format("D MMM"):e.format("MMM 'YY"):e.fromNow()}var At={controls:function(t,e){var n=this,r=new O;return["user","moderation","destructive"].forEach((function(o){var i=n[o+"Controls"](t,e).toArray();i.length&&(i.forEach((function(t){return r.add(t.itemName,t)})),r.add(o+"Separator",J.component()))})),r},userControls:function(){return new O},moderationControls:function(t){var e=new O;return t.canEdit()&&e.add("edit",Z.component({icon:"fas fa-pencil-alt",children:app.translator.trans("core.forum.user_controls.edit_button"),onclick:this.editAction.bind(t)})),e},destructiveControls:function(t){var e=new O;return"1"!==t.id()&&t.canDelete()&&e.add("delete",Z.component({icon:"fas fa-times",children:app.translator.trans("core.forum.user_controls.delete_button"),onclick:this.deleteAction.bind(t)})),e},deleteAction:function(){var t=this;confirm(app.translator.transText("core.forum.user_controls.delete_confirmation"))&&this.delete().then((function(){app.current instanceof Dt&&app.current.user===t?app.history.back():window.location.reload()}))},editAction:function(){app.modal.show(new EditUserModal({user:this}))}},jt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o').appendTo("body").hide().click().on("change",(function(e){t.upload($(e.target)[0].files[0])}))}},n.upload=function(t){if(!this.loading){var e=this.props.user,n=new FormData;data.append("avatar",t),this.loading=!0,m.redraw(),app.request({method:"POST",url:app.forum.attribute("apiUrl")+"/users/"+e.id()+"/avatar",serialize:function(t){return t},body:n}).then(this.success.bind(this),this.failure.bind(this))}},n.remove=function(){var t=this.props.user;this.loading=!0,m.redraw(),app.request({method:"DELETE",url:app.forum.attribute("apiUrl")+"/users/"+t.id()+"/avatar"}).then(this.success.bind(this),this.failure.bind(this))},n.success=function(t){app.store.pushPayload(t),delete this.props.user.avatarColor,this.loading=!1,m.redraw()},n.failure=function(t){this.loading=!1,m.redraw()},e}(_),Mt=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.view=function(){var t=this.props.user,e=At.controls(t,this).toArray(),n=t.color(),r=t.badges().toArray();return m("div",{className:"UserCard "+(this.props.className||""),style:n?{backgroundColor:n}:""},m("div",{className:"darkenBackground"},m("div",{className:"container"},e.length?dt.component({children:e,className:"UserCard-controls App-primaryControl",menuClassName:"Dropdown-menu--right",buttonClassName:this.props.controlsButtonClassName,label:app.translator.trans("core.forum.user_controls.button"),icon:"fas fa-ellipsis-v"}):"",m("div",{className:"UserCard-profile"},m("h2",{className:"UserCard-identity"},this.props.editable?[jt.component({user:t,className:"UserCard-avatar"}),v(t)]:m(m.route.Link,{href:app.route.user(t)},m("div",{className:"UserCard-avatar"},pt(t)),v(t))),r.length?m("ul",{className:"UserCard-badges badges"},X(r)):"",m("ul",{className:"UserCard-info"},X(this.infoItems().toArray()))))))},n.infoItems=function(){var t=new O,e=this.props.user,n=e.lastSeenAt();if(n){var r=e.isOnline();t.add("lastSeen",m("span",{className:"UserCard-lastSeen"+(r?" online":"")},r?[S("fas fa-circle")," ",app.translator.trans("core.forum.user.online_text")]:[S("far fa-clock")," ",St(n)]))}return t.add("joined",app.translator.trans("core.forum.user.joined_date_text",{ago:St(e.joinTime())})),t},e}(_),Dt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o=this.loadLimit,m.redraw(),t},e}(Dt),Lt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o= 0) result += template.slice(queryIndex, queryEnd)\n\tif (newQueryIndex >= 0) result += (queryIndex < 0 ? \"?\" : \"&\") + resolved.slice(newQueryIndex, newQueryEnd)\n\tvar querystring = buildQueryString(query)\n\tif (querystring) result += (queryIndex < 0 && newQueryIndex < 0 ? \"?\" : \"&\") + querystring\n\tif (hashIndex >= 0) result += template.slice(hashIndex)\n\tif (newHashIndex >= 0) result += (hashIndex < 0 ? \"\" : \"&\") + resolved.slice(newHashIndex)\n\treturn result\n}\n","\"use strict\"\n\nvar parseQueryString = require(\"../querystring/parse\")\n\n// Returns `{path, params}` from `url`\nmodule.exports = function(url) {\n\tvar queryIndex = url.indexOf(\"?\")\n\tvar hashIndex = url.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? url.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = url.slice(0, pathEnd).replace(/\\/{2,}/g, \"/\")\n\n\tif (!path) path = \"/\"\n\telse {\n\t\tif (path[0] !== \"/\") path = \"/\" + path\n\t\tif (path.length > 1 && path[path.length - 1] === \"/\") path = path.slice(0, -1)\n\t}\n\treturn {\n\t\tpath: path,\n\t\tparams: queryIndex < 0\n\t\t\t? {}\n\t\t\t: parseQueryString(url.slice(queryIndex + 1, queryEnd)),\n\t}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nvar selectorParser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[(.+?)(?:\\s*=\\s*(\"|'|)((?:\\\\[\"'\\]]|.)*?)\\5)?\\])/g\nvar selectorCache = {}\nvar hasOwn = {}.hasOwnProperty\n\nfunction isEmpty(object) {\n\tfor (var key in object) if (hasOwn.call(object, key)) return false\n\treturn true\n}\n\nfunction compileSelector(selector) {\n\tvar match, tag = \"div\", classes = [], attrs = {}\n\twhile (match = selectorParser.exec(selector)) {\n\t\tvar type = match[1], value = match[2]\n\t\tif (type === \"\" && value !== \"\") tag = value\n\t\telse if (type === \"#\") attrs.id = value\n\t\telse if (type === \".\") classes.push(value)\n\t\telse if (match[3][0] === \"[\") {\n\t\t\tvar attrValue = match[6]\n\t\t\tif (attrValue) attrValue = attrValue.replace(/\\\\([\"'])/g, \"$1\").replace(/\\\\\\\\/g, \"\\\\\")\n\t\t\tif (match[4] === \"class\") classes.push(attrValue)\n\t\t\telse attrs[match[4]] = attrValue === \"\" ? attrValue : attrValue || true\n\t\t}\n\t}\n\tif (classes.length > 0) attrs.className = classes.join(\" \")\n\treturn selectorCache[selector] = {tag: tag, attrs: attrs}\n}\n\nfunction execSelector(state, vnode) {\n\tvar attrs = vnode.attrs\n\tvar children = Vnode.normalizeChildren(vnode.children)\n\tvar hasClass = hasOwn.call(attrs, \"class\")\n\tvar className = hasClass ? attrs.class : attrs.className\n\n\tvnode.tag = state.tag\n\tvnode.attrs = null\n\tvnode.children = undefined\n\n\tif (!isEmpty(state.attrs) && !isEmpty(attrs)) {\n\t\tvar newAttrs = {}\n\n\t\tfor (var key in attrs) {\n\t\t\tif (hasOwn.call(attrs, key)) newAttrs[key] = attrs[key]\n\t\t}\n\n\t\tattrs = newAttrs\n\t}\n\n\tfor (var key in state.attrs) {\n\t\tif (hasOwn.call(state.attrs, key) && key !== \"className\" && !hasOwn.call(attrs, key)){\n\t\t\tattrs[key] = state.attrs[key]\n\t\t}\n\t}\n\tif (className != null || state.attrs.className != null) attrs.className =\n\t\tclassName != null\n\t\t\t? state.attrs.className != null\n\t\t\t\t? String(state.attrs.className) + \" \" + String(className)\n\t\t\t\t: className\n\t\t\t: state.attrs.className != null\n\t\t\t\t? state.attrs.className\n\t\t\t\t: null\n\n\tif (hasClass) attrs.class = null\n\n\tfor (var key in attrs) {\n\t\tif (hasOwn.call(attrs, key) && key !== \"key\") {\n\t\t\tvnode.attrs = attrs\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif (Array.isArray(children) && children.length === 1 && children[0] != null && children[0].tag === \"#\") {\n\t\tvnode.text = children[0].children\n\t} else {\n\t\tvnode.children = children\n\t}\n\n\treturn vnode\n}\n\nfunction hyperscript(selector) {\n\tif (selector == null || typeof selector !== \"string\" && typeof selector !== \"function\" && typeof selector.view !== \"function\") {\n\t\tthrow Error(\"The selector must be either a string or a component.\");\n\t}\n\n\tvar vnode = hyperscriptVnode.apply(1, arguments)\n\n\tif (typeof selector === \"string\") {\n\t\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\t\tif (selector !== \"[\") return execSelector(selectorCache[selector] || compileSelector(selector), vnode)\n\t}\n\n\tvnode.tag = selector\n\treturn vnode\n}\n\nmodule.exports = hyperscript\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\n// Call via `hyperscriptVnode.apply(startOffset, arguments)`\n//\n// The reason I do it this way, forwarding the arguments and passing the start\n// offset in `this`, is so I don't have to create a temporary array in a\n// performance-critical path.\n//\n// In native ES6, I'd instead add a final `...args` parameter to the\n// `hyperscript` and `fragment` factories and define this as\n// `hyperscriptVnode(...args)`, since modern engines do optimize that away. But\n// ES5 (what Mithril requires thanks to IE support) doesn't give me that luxury,\n// and engines aren't nearly intelligent enough to do either of these:\n//\n// 1. Elide the allocation for `[].slice.call(arguments, 1)` when it's passed to\n// another function only to be indexed.\n// 2. Elide an `arguments` allocation when it's passed to any function other\n// than `Function.prototype.apply` or `Reflect.apply`.\n//\n// In ES6, it'd probably look closer to this (I'd need to profile it, though):\n// module.exports = function(attrs, ...children) {\n// if (attrs == null || typeof attrs === \"object\" && attrs.tag == null && !Array.isArray(attrs)) {\n// if (children.length === 1 && Array.isArray(children[0])) children = children[0]\n// } else {\n// children = children.length === 0 && Array.isArray(attrs) ? attrs : [attrs, ...children]\n// attrs = undefined\n// }\n//\n// if (attrs == null) attrs = {}\n// return Vnode(\"\", attrs.key, attrs, children)\n// }\nmodule.exports = function() {\n\tvar attrs = arguments[this], start = this + 1, children\n\n\tif (attrs == null) {\n\t\tattrs = {}\n\t} else if (typeof attrs !== \"object\" || attrs.tag != null || Array.isArray(attrs)) {\n\t\tattrs = {}\n\t\tstart = this\n\t}\n\n\tif (arguments.length === start + 1) {\n\t\tchildren = arguments[start]\n\t\tif (!Array.isArray(children)) children = [children]\n\t} else {\n\t\tchildren = []\n\t\twhile (start < arguments.length) children.push(arguments[start++])\n\t}\n\n\treturn Vnode(\"\", attrs.key, attrs, children)\n}\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./polyfill\")\n\nif (typeof window !== \"undefined\") {\n\tif (typeof window.Promise === \"undefined\") {\n\t\twindow.Promise = PromisePolyfill\n\t} else if (!window.Promise.prototype.finally) {\n\t\twindow.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = window.Promise\n} else if (typeof global !== \"undefined\") {\n\tif (typeof global.Promise === \"undefined\") {\n\t\tglobal.Promise = PromisePolyfill\n\t} else if (!global.Promise.prototype.finally) {\n\t\tglobal.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = global.Promise\n} else {\n\tmodule.exports = PromisePolyfill\n}\n","\"use strict\"\n/** @constructor */\nvar PromisePolyfill = function(executor) {\n\tif (!(this instanceof PromisePolyfill)) throw new Error(\"Promise must be called with `new`\")\n\tif (typeof executor !== \"function\") throw new TypeError(\"executor must be a function\")\n\n\tvar self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false)\n\tvar instance = self._instance = {resolvers: resolvers, rejectors: rejectors}\n\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\tfunction handler(list, shouldAbsorb) {\n\t\treturn function execute(value) {\n\t\t\tvar then\n\t\t\ttry {\n\t\t\t\tif (shouldAbsorb && value != null && (typeof value === \"object\" || typeof value === \"function\") && typeof (then = value.then) === \"function\") {\n\t\t\t\t\tif (value === self) throw new TypeError(\"Promise can't be resolved w/ itself\")\n\t\t\t\t\texecuteOnce(then.bind(value))\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcallAsync(function() {\n\t\t\t\t\t\tif (!shouldAbsorb && list.length === 0) console.error(\"Possible unhandled promise rejection:\", value)\n\t\t\t\t\t\tfor (var i = 0; i < list.length; i++) list[i](value)\n\t\t\t\t\t\tresolvers.length = 0, rejectors.length = 0\n\t\t\t\t\t\tinstance.state = shouldAbsorb\n\t\t\t\t\t\tinstance.retry = function() {execute(value)}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\trejectCurrent(e)\n\t\t\t}\n\t\t}\n\t}\n\tfunction executeOnce(then) {\n\t\tvar runs = 0\n\t\tfunction run(fn) {\n\t\t\treturn function(value) {\n\t\t\t\tif (runs++ > 0) return\n\t\t\t\tfn(value)\n\t\t\t}\n\t\t}\n\t\tvar onerror = run(rejectCurrent)\n\t\ttry {then(run(resolveCurrent), onerror)} catch (e) {onerror(e)}\n\t}\n\n\texecuteOnce(executor)\n}\nPromisePolyfill.prototype.then = function(onFulfilled, onRejection) {\n\tvar self = this, instance = self._instance\n\tfunction handle(callback, list, next, state) {\n\t\tlist.push(function(value) {\n\t\t\tif (typeof callback !== \"function\") next(value)\n\t\t\telse try {resolveNext(callback(value))} catch (e) {if (rejectNext) rejectNext(e)}\n\t\t})\n\t\tif (typeof instance.retry === \"function\" && state === instance.state) instance.retry()\n\t}\n\tvar resolveNext, rejectNext\n\tvar promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject})\n\thandle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false)\n\treturn promise\n}\nPromisePolyfill.prototype.catch = function(onRejection) {\n\treturn this.then(null, onRejection)\n}\nPromisePolyfill.prototype.finally = function(callback) {\n\treturn this.then(\n\t\tfunction(value) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn value\n\t\t\t})\n\t\t},\n\t\tfunction(reason) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn PromisePolyfill.reject(reason);\n\t\t\t})\n\t\t}\n\t)\n}\nPromisePolyfill.resolve = function(value) {\n\tif (value instanceof PromisePolyfill) return value\n\treturn new PromisePolyfill(function(resolve) {resolve(value)})\n}\nPromisePolyfill.reject = function(value) {\n\treturn new PromisePolyfill(function(resolve, reject) {reject(value)})\n}\nPromisePolyfill.all = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tvar total = list.length, count = 0, values = []\n\t\tif (list.length === 0) resolve([])\n\t\telse for (var i = 0; i < list.length; i++) {\n\t\t\t(function(i) {\n\t\t\t\tfunction consume(value) {\n\t\t\t\t\tcount++\n\t\t\t\t\tvalues[i] = value\n\t\t\t\t\tif (count === total) resolve(values)\n\t\t\t\t}\n\t\t\t\tif (list[i] != null && (typeof list[i] === \"object\" || typeof list[i] === \"function\") && typeof list[i].then === \"function\") {\n\t\t\t\t\tlist[i].then(consume, reject)\n\t\t\t\t}\n\t\t\t\telse consume(list[i])\n\t\t\t})(i)\n\t\t}\n\t})\n}\nPromisePolyfill.race = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tfor (var i = 0; i < list.length; i++) {\n\t\t\tlist[i].then(resolve, reject)\n\t\t}\n\t})\n}\n\nmodule.exports = PromisePolyfill\n","var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n","\"use strict\"\n\nmodule.exports = require(\"./render/render\")(window)\n","\"use strict\"\n\nmodule.exports = function(object) {\n\tif (Object.prototype.toString.call(object) !== \"[object Object]\") return \"\"\n\n\tvar args = []\n\tfor (var key in object) {\n\t\tdestructure(key, object[key])\n\t}\n\n\treturn args.join(\"&\")\n\n\tfunction destructure(key, value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tfor (var i = 0; i < value.length; i++) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse if (Object.prototype.toString.call(value) === \"[object Object]\") {\n\t\t\tfor (var i in value) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse args.push(encodeURIComponent(key) + (value != null && value !== \"\" ? \"=\" + encodeURIComponent(value) : \"\"))\n\t}\n}\n","\"use strict\"\n\nmodule.exports = Object.assign || function(target, source) {\n\tif(source) Object.keys(source).forEach(function(key) { target[key] = source[key] })\n}\n","\"use strict\"\n\nmodule.exports = function(string) {\n\tif (string === \"\" || string == null) return {}\n\tif (string.charAt(0) === \"?\") string = string.slice(1)\n\n\tvar entries = string.split(\"&\"), counters = {}, data = {}\n\tfor (var i = 0; i < entries.length; i++) {\n\t\tvar entry = entries[i].split(\"=\")\n\t\tvar key = decodeURIComponent(entry[0])\n\t\tvar value = entry.length === 2 ? decodeURIComponent(entry[1]) : \"\"\n\n\t\tif (value === \"true\") value = true\n\t\telse if (value === \"false\") value = false\n\n\t\tvar levels = key.split(/\\]\\[?|\\[/)\n\t\tvar cursor = data\n\t\tif (key.indexOf(\"[\") > -1) levels.pop()\n\t\tfor (var j = 0; j < levels.length; j++) {\n\t\t\tvar level = levels[j], nextLevel = levels[j + 1]\n\t\t\tvar isNumber = nextLevel == \"\" || !isNaN(parseInt(nextLevel, 10))\n\t\t\tif (level === \"\") {\n\t\t\t\tvar key = levels.slice(0, j).join()\n\t\t\t\tif (counters[key] == null) {\n\t\t\t\t\tcounters[key] = Array.isArray(cursor) ? cursor.length : 0\n\t\t\t\t}\n\t\t\t\tlevel = counters[key]++\n\t\t\t}\n\t\t\t// Disallow direct prototype pollution\n\t\t\telse if (level === \"__proto__\") break\n\t\t\tif (j === levels.length - 1) cursor[level] = value\n\t\t\telse {\n\t\t\t\t// Read own properties exclusively to disallow indirect\n\t\t\t\t// prototype pollution\n\t\t\t\tvar desc = Object.getOwnPropertyDescriptor(cursor, level)\n\t\t\t\tif (desc != null) desc = desc.value\n\t\t\t\tif (desc == null) cursor[level] = desc = isNumber ? [] : {}\n\t\t\t\tcursor = desc\n\t\t\t}\n\t\t}\n\t}\n\treturn data\n}\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","// Robert Penner's easeInOutQuad\n\n// find the rest of his easing functions here: http://robertpenner.com/easing/\n// find them exported for ES6 consumption here: https://github.com/jaxgeller/ez.js\n\nvar easeInOutQuad = function easeInOutQuad(t, b, c, d) {\n t /= d / 2;\n if (t < 1) return c / 2 * t * t + b;\n t--;\n return -c / 2 * (t * (t - 2) - 1) + b;\n};\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar jumper = function jumper() {\n // private variable cache\n // no variables are created during a jump, preventing memory leaks\n\n var element = void 0; // element to scroll to (node)\n\n var start = void 0; // where scroll starts (px)\n var stop = void 0; // where scroll stops (px)\n\n var offset = void 0; // adjustment from the stop position (px)\n var easing = void 0; // easing function (function)\n var a11y = void 0; // accessibility support flag (boolean)\n\n var distance = void 0; // distance of scroll (px)\n var duration = void 0; // scroll duration (ms)\n\n var timeStart = void 0; // time scroll started (ms)\n var timeElapsed = void 0; // time spent scrolling thus far (ms)\n\n var next = void 0; // next scroll position (px)\n\n var callback = void 0; // to call when done scrolling (function)\n\n // scroll position helper\n\n function location() {\n return window.scrollY || window.pageYOffset;\n }\n\n // element offset helper\n\n function top(element) {\n return element.getBoundingClientRect().top + start;\n }\n\n // rAF loop helper\n\n function loop(timeCurrent) {\n // store time scroll started, if not started already\n if (!timeStart) {\n timeStart = timeCurrent;\n }\n\n // determine time spent scrolling so far\n timeElapsed = timeCurrent - timeStart;\n\n // calculate next scroll position\n next = easing(timeElapsed, start, distance, duration);\n\n // scroll to it\n window.scrollTo(0, next);\n\n // check progress\n timeElapsed < duration ? window.requestAnimationFrame(loop) // continue scroll loop\n : done(); // scrolling is done\n }\n\n // scroll finished helper\n\n function done() {\n // account for rAF time rounding inaccuracies\n window.scrollTo(0, start + distance);\n\n // if scrolling to an element, and accessibility is enabled\n if (element && a11y) {\n // add tabindex indicating programmatic focus\n element.setAttribute('tabindex', '-1');\n\n // focus the element\n element.focus();\n }\n\n // if it exists, fire the callback\n if (typeof callback === 'function') {\n callback();\n }\n\n // reset time for next jump\n timeStart = false;\n }\n\n // API\n\n function jump(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // resolve options, or use defaults\n duration = options.duration || 1000;\n offset = options.offset || 0;\n callback = options.callback; // \"undefined\" is a suitable default, and won't be called\n easing = options.easing || easeInOutQuad;\n a11y = options.a11y || false;\n\n // cache starting position\n start = location();\n\n // resolve target\n switch (typeof target === 'undefined' ? 'undefined' : _typeof(target)) {\n // scroll from current position\n case 'number':\n element = undefined; // no element to scroll to\n a11y = false; // make sure accessibility is off\n stop = start + target;\n break;\n\n // scroll to element (node)\n // bounding rect is relative to the viewport\n case 'object':\n element = target;\n stop = top(element);\n break;\n\n // scroll to element (selector)\n // bounding rect is relative to the viewport\n case 'string':\n element = document.querySelector(target);\n stop = top(element);\n break;\n }\n\n // resolve scroll distance, accounting for offset\n distance = stop - start + offset;\n\n // resolve duration\n switch (_typeof(options.duration)) {\n // number in ms\n case 'number':\n duration = options.duration;\n break;\n\n // function passed the distance of the scroll\n case 'function':\n duration = options.duration(distance);\n break;\n }\n\n // start the loop\n window.requestAnimationFrame(loop);\n }\n\n // expose only the jump method\n return jump;\n};\n\n// export singleton\n\nvar singleton = jumper();\n\nexport default singleton;\n","// Utils\nimport debounce from './utils/debounce';\nimport isFunction from './utils/isFunction';\n\n// Methods\nimport update from './methods/update';\nimport destroy from './methods/destroy';\nimport enableEventListeners from './methods/enableEventListeners';\nimport disableEventListeners from './methods/disableEventListeners';\nimport Defaults from './methods/defaults';\nimport placements from './methods/placements';\n\nexport default class Popper {\n /**\n * Creates a new Popper.js instance.\n * @class Popper\n * @param {Element|referenceObject} reference - The reference element used to position the popper\n * @param {Element} popper - The HTML / XML element used as the popper\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n constructor(reference, popper, options = {}) {\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = { ...Popper.Defaults, ...options };\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: [],\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys({\n ...Popper.Defaults.modifiers,\n ...options.modifiers,\n }).forEach(name => {\n this.options.modifiers[name] = {\n // If it's a built-in modifier, use it as base\n ...(Popper.Defaults.modifiers[name] || {}),\n // If there are custom options, override and merge with default ones\n ...(options.modifiers ? options.modifiers[name] : {}),\n };\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers)\n .map(name => ({\n name,\n ...this.options.modifiers[name],\n }))\n // sort the modifiers by order\n .sort((a, b) => a.order - b.order);\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(modifierOptions => {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(\n this.reference,\n this.popper,\n this.options,\n modifierOptions,\n this.state\n );\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n\n const eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n update() {\n return update.call(this);\n }\n destroy() {\n return destroy.call(this);\n }\n enableEventListeners() {\n return enableEventListeners.call(this);\n }\n disableEventListeners() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedules an update. It will run on the next UI update available.\n * @method scheduleUpdate\n * @memberof Popper\n */\n scheduleUpdate = () => requestAnimationFrame(this.update);\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n static Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\n\n static placements = placements;\n\n static Defaults = Defaults;\n}\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.
\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n","/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nexport default function isFunction(functionToCheck) {\n const getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","import jump from 'jump.js';\nimport Tooltip from 'tooltip.js';\n\n// add $.fn.tooltip\n$.fn.tooltip = function (option) {\n return this.each(function () {\n const $this = $(this);\n let data = $this.data('bs.tooltip');\n const options = typeof option === 'object' && option || {};\n\n if ($this.attr('title')) {\n options.title = $this.attr('title');\n $this.removeAttr('title');\n $this.attr('data-original-title', options.title);\n }\n\n if (option === 'destroy') option = 'dispose';\n\n if (!data && ['dispose', 'hide'].includes(option)) return;\n\n if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)));\n if (typeof option === 'string' && data[option]) data[option]();\n });\n};\n\n// add $.fn.outerWidth and $.fn.outerHeight\n['width', 'height'].forEach(function(dimension) {\n const Dimension = dimension.replace(/./, function (m) {\n return m[0].toUpperCase()\n });\n\n $.fn[`outer${Dimension}`] = function(margin) {\n const elem = this;\n\n if (elem) {\n const sides = {'width': ['left', 'right'], 'height': ['top', 'bottom']};\n let size = elem[dimension]();\n\n sides[dimension].forEach(function(side) {\n if (margin) size += parseInt(elem.css('margin-' + side), 10);\n });\n\n return size;\n } else {\n return null;\n }\n };\n});\n\n// allow use of $(':input')\n// @ts-ignore\n$.expr[':']['input'] = function() {\n if (('disabled' in this) || ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON'].includes(this.tagName)) return this;\n};\n\n// add $().hover() method\n$.fn.hover = function(hover, leave) {\n return this\n .on('mouseenter', hover)\n .on('mouseleave', leave || hover);\n};\n\n// add animated scroll\n$.fn.animatedScrollTop = function (to, duration = $.fx.speeds._default, callback) {\n if (typeof to === 'number') to -= (window.scrollY || window.pageYOffset);\n\n jump(to, {\n duration: $.fx.speeds[duration] || duration,\n callback\n });\n\n return this;\n};\n\n// required for compatibility with jquery plugins\n// ex: bootstrap plugins\n$.fn.extend = $.extend.bind($);\n\n/**\n * Enable special events on Zepto\n * @license Original Copyright 2013 Enideo. Released under dual MIT and GPL licenses.\n */\n// @ts-ignore\n$.event.special = $.event.special || {};\n\nconst bindBeforeSpecialEvents = $.fn.bind;\n\n$.fn.bind = function(eventName, data, callback) {\n const el = this;\n\n if (!callback){\n callback = data;\n data = null;\n }\n\n $.each(eventName.split(/\\s/), (key: string, value: any) : boolean => {\n value = value.split(/\\./)[0];\n\n if(value in $.event.special){\n let specialEvent = $.event.special[value];\n\n /// init enable special events on Zepto\n if(!specialEvent._init) {\n specialEvent._init = true;\n\n /// intercept and replace the special event handler to add functionality\n specialEvent.originalHandler = specialEvent.handler;\n specialEvent.handler = function(){\n\n /// make event argument writable, like on jQuery\n const args = Array.prototype.slice.call(arguments);\n\n args[0] = $.extend({},args[0]);\n\n /// define the event handle, $.event.dispatch is only for newer versions of jQuery\n $.event.handle = function(){\n\n /// make context of trigger the event element\n const args = Array.prototype.slice.call(arguments);\n const event = args[0];\n const $target = $(event.target);\n\n $target.trigger.apply( $target, arguments );\n };\n\n specialEvent.originalHandler.apply(this,args);\n }\n }\n\n /// setup special events on Zepto\n specialEvent.setup.apply(el, [data]);\n }\n\n return true;\n });\n\n return bindBeforeSpecialEvents.apply(this, [eventName, callback]);\n};\n","import 'expose-loader?jQuery!zepto';\nimport 'expose-loader?moment!expose-loader?dayjs!dayjs';\nimport 'expose-loader?m!mithril';\nimport 'expose-loader?m.bidi!m.attrs.bidi';\nimport 'expose-loader?Mousetrap!mousetrap';\nimport 'expose-loader?classNames!classNames';\n\nimport 'zepto/src/selector';\nimport 'zepto/src/data';\nimport 'zepto/src/fx';\nimport 'zepto/src/fx_methods';\n\nimport './utils/patchZepto';\n\nimport 'hc-sticky';\nimport 'bootstrap/js/dropdown';\nimport 'bootstrap/js/transition';\n\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport localizedFormat from 'dayjs/plugin/localizedFormat';\n\ndayjs.extend(relativeTime);\ndayjs.extend(localizedFormat);\n\nimport patchMithril from './utils/patchMithril';\n\npatchMithril();\n\n// import * as Extend from './extend/index';\n\n// export { Extend };\n","import isBrowser from './isBrowser';\n\nconst longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\nlet timeoutDuration = 0;\nfor (let i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n timeoutDuration = 1;\n break;\n }\n}\n\nexport function microtaskDebounce(fn) {\n let called = false\n return () => {\n if (called) {\n return\n }\n called = true\n window.Promise.resolve().then(() => {\n called = false\n fn()\n })\n }\n}\n\nexport function taskDebounce(fn) {\n let scheduled = false;\n return () => {\n if (!scheduled) {\n scheduled = true;\n setTimeout(() => {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nconst supportsMicroTasks = isBrowser && window.Promise\n\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nexport default (supportsMicroTasks\n ? microtaskDebounce\n : taskDebounce);\n","export default typeof window !== 'undefined' && typeof document !== 'undefined';\n","/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nexport default function isFunction(functionToCheck) {\n const getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nexport default function getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n const window = element.ownerDocument.defaultView;\n const css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n","/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nexport default function getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nexport default function getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body\n case '#document':\n return element.body\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n const { overflow, overflowX, overflowY } = getStyleComputedProperty(element);\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n","import isBrowser from './isBrowser';\n\nconst isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nconst isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nexport default function isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nexport default function getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n const noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n let offsetParent = element.offsetParent || null;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n const nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (\n ['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 &&\n getStyleComputedProperty(offsetParent, 'position') === 'static'\n ) {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n","/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nexport default function getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n","import isOffsetContainer from './isOffsetContainer';\nimport getRoot from './getRoot';\nimport getOffsetParent from './getOffsetParent';\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nexport default function findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n const order =\n element1.compareDocumentPosition(element2) &\n Node.DOCUMENT_POSITION_FOLLOWING;\n const start = order ? element1 : element2;\n const end = order ? element2 : element1;\n\n // Get common ancestor container\n const range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n const { commonAncestorContainer } = range;\n\n // Both nodes are inside #document\n if (\n (element1 !== commonAncestorContainer &&\n element2 !== commonAncestorContainer) ||\n start.contains(end)\n ) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n const element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n","import getOffsetParent from './getOffsetParent';\n\nexport default function isOffsetContainer(element) {\n const { nodeName } = element;\n if (nodeName === 'BODY') {\n return false;\n }\n return (\n nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element\n );\n}\n","/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nexport default function getScroll(element, side = 'top') {\n const upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n const nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n const html = element.ownerDocument.documentElement;\n const scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n","/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nexport default function getBordersSize(styles, axis) {\n const sideA = axis === 'x' ? 'Left' : 'Top';\n const sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return (\n parseFloat(styles[`border${sideA}Width`], 10) +\n parseFloat(styles[`border${sideB}Width`], 10)\n );\n}\n","import isIE from './isIE';\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(\n body[`offset${axis}`],\n body[`scroll${axis}`],\n html[`client${axis}`],\n html[`offset${axis}`],\n html[`scroll${axis}`],\n isIE(10)\n ? (parseInt(html[`offset${axis}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Top' : 'Left'}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Bottom' : 'Right'}`]))\n : 0 \n );\n}\n\nexport default function getWindowSizes(document) {\n const body = document.body;\n const html = document.documentElement;\n const computedStyle = isIE(10) && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle),\n };\n}\n","/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nexport default function getClientRect(offsets) {\n return {\n ...offsets,\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height,\n };\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getBordersSize from './getBordersSize';\nimport getWindowSizes from './getWindowSizes';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\nimport isIE from './isIE';\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nexport default function getBoundingClientRect(element) {\n let rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n }\n else {\n rect = element.getBoundingClientRect();\n }\n }\n catch(e){}\n\n const result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top,\n };\n\n // subtract scrollbar size from sizes\n const sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n const width =\n sizes.width || element.clientWidth || result.right - result.left;\n const height =\n sizes.height || element.clientHeight || result.bottom - result.top;\n\n let horizScrollbar = element.offsetWidth - width;\n let vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n const styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport includeScroll from './includeScroll';\nimport getScrollParent from './getScrollParent';\nimport getBoundingClientRect from './getBoundingClientRect';\nimport runIsIE from './isIE';\nimport getClientRect from './getClientRect';\n\nexport default function getOffsetRectRelativeToArbitraryNode(children, parent, fixedPosition = false) {\n const isIE10 = runIsIE(10);\n const isHTML = parent.nodeName === 'HTML';\n const childrenRect = getBoundingClientRect(children);\n const parentRect = getBoundingClientRect(parent);\n const scrollParent = getScrollParent(children);\n\n const styles = getStyleComputedProperty(parent);\n const borderTopWidth = parseFloat(styles.borderTopWidth, 10);\n const borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if(fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n let offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height,\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n const marginTop = parseFloat(styles.marginTop, 10);\n const marginLeft = parseFloat(styles.marginLeft, 10);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (\n isIE10 && !fixedPosition\n ? parent.contains(scrollParent)\n : parent === scrollParent && scrollParent.nodeName !== 'BODY'\n ) {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n","import getScroll from './getScroll';\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nexport default function includeScroll(rect, element, subtract = false) {\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n const modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nexport default function getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n let el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n\n}\n","import getScrollParent from './getScrollParent';\nimport getParentNode from './getParentNode';\nimport findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getViewportOffsetRectRelativeToArtbitraryNode from './getViewportOffsetRectRelativeToArtbitraryNode';\nimport getWindowSizes from './getWindowSizes';\nimport isFixed from './isFixed';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nexport default function getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement,\n fixedPosition = false\n) {\n // NOTE: 1 DOM access here\n\n let boundaries = { top: 0, left: 0 };\n const offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);\n\n // Handle viewport case\n if (boundariesElement === 'viewport' ) {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n }\n\n else {\n // Handle other cases based on DOM element used as boundaries\n let boundariesNode;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n const offsets = getOffsetRectRelativeToArbitraryNode(\n boundariesNode,\n offsetParent,\n fixedPosition\n );\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n const { height, width } = getWindowSizes(popper.ownerDocument);\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n padding = padding || 0;\n const isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0; \n boundaries.top += isPaddingNumber ? padding : padding.top || 0; \n boundaries.right -= isPaddingNumber ? padding : padding.right || 0; \n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0; \n\n return boundaries;\n}\n","import getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\n\nexport default function getViewportOffsetRectRelativeToArtbitraryNode(element, excludeScroll = false) {\n const html = element.ownerDocument.documentElement;\n const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n const width = Math.max(html.clientWidth, window.innerWidth || 0);\n const height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n const scrollTop = !excludeScroll ? getScroll(html) : 0;\n const scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n const offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width,\n height,\n };\n\n return getClientRect(offset);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nexport default function isFixed(element) {\n const nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n const parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n","import getBoundaries from '../utils/getBoundaries';\n\nfunction getArea({ width, height }) {\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeAutoPlacement(\n placement,\n refRect,\n popper,\n reference,\n boundariesElement,\n padding = 0\n) {\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n const boundaries = getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement\n );\n\n const rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top,\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height,\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom,\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height,\n },\n };\n\n const sortedAreas = Object.keys(rects)\n .map(key => ({\n key,\n ...rects[key],\n area: getArea(rects[key]),\n }))\n .sort((a, b) => b.area - a.area);\n\n const filteredAreas = sortedAreas.filter(\n ({ width, height }) =>\n width >= popper.clientWidth && height >= popper.clientHeight\n );\n\n const computedPlacement = filteredAreas.length > 0\n ? filteredAreas[0].key\n : sortedAreas[0].key;\n\n const variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? `-${variation}` : '');\n}\n","import findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nexport default function getReferenceOffsets(state, popper, reference, fixedPosition = null) {\n const commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n","/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nexport default function getOuterSizes(element) {\n const window = element.ownerDocument.defaultView;\n const styles = window.getComputedStyle(element);\n const x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n const y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n const result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x,\n };\n return result;\n}\n","/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nexport default function getOppositePlacement(placement) {\n const hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, matched => hash[matched]);\n}\n","import getOuterSizes from './getOuterSizes';\nimport getOppositePlacement from './getOppositePlacement';\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nexport default function getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n const popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n const popperOffsets = {\n width: popperRect.width,\n height: popperRect.height,\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n const isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n const mainSide = isHoriz ? 'top' : 'left';\n const secondarySide = isHoriz ? 'left' : 'top';\n const measurement = isHoriz ? 'height' : 'width';\n const secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] =\n referenceOffsets[mainSide] +\n referenceOffsets[measurement] / 2 -\n popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] =\n referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] =\n referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n","/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n","import isFunction from './isFunction';\nimport findIndex from './findIndex';\nimport getClientRect from '../utils/getClientRect';\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nexport default function runModifiers(modifiers, data, ends) {\n const modifiersToRun = ends === undefined\n ? modifiers\n : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(modifier => {\n if (modifier['function']) { // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n const fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n","import find from './find';\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(cur => cur[prop] === value);\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n const match = find(arr, obj => obj[prop] === value);\n return arr.indexOf(match);\n}\n","import computeAutoPlacement from '../utils/computeAutoPlacement';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.
\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nexport default function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n let data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {},\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(\n this.state,\n this.popper,\n this.reference,\n this.options.positionFixed\n );\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(\n this.options.placement,\n data.offsets.reference,\n this.popper,\n this.reference,\n this.options.modifiers.flip.boundariesElement,\n this.options.modifiers.flip.padding\n );\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(\n this.popper,\n data.offsets.reference,\n data.placement\n );\n\n data.offsets.popper.position = this.options.positionFixed\n ? 'fixed'\n : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n","/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nexport default function isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(\n ({ name, enabled }) => enabled && name === modifierName\n );\n}\n","/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nexport default function getSupportedPropertyName(property) {\n const prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n const upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (let i = 0; i < prefixes.length; i++) {\n const prefix = prefixes[i];\n const toCheck = prefix ? `${prefix}${upperProp}` : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n","import isModifierEnabled from '../utils/isModifierEnabled';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nexport default function destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicity asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n","/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nexport default function getWindow(element) {\n const ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n","import getScrollParent from './getScrollParent';\nimport getWindow from './getWindow';\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n const isBody = scrollParent.nodeName === 'BODY';\n const target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(\n getScrollParent(target.parentNode),\n event,\n callback,\n scrollParents\n );\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function setupEventListeners(\n reference,\n options,\n state,\n updateBound\n) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n const scrollElement = getScrollParent(reference);\n attachToScrollParents(\n scrollElement,\n 'scroll',\n state.updateBound,\n state.scrollParents\n );\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n","import setupEventListeners from '../utils/setupEventListeners';\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nexport default function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(\n this.reference,\n this.options,\n this.state,\n this.scheduleUpdate\n );\n }\n}\n","import removeEventListeners from '../utils/removeEventListeners';\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nexport default function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n","import getWindow from './getWindow';\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(target => {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n","/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nexport default function isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n","import isNumeric from './isNumeric';\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setStyles(element, styles) {\n Object.keys(styles).forEach(prop => {\n let unit = '';\n // add unit if the value is numeric and is one of the following\n if (\n ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !==\n -1 &&\n isNumeric(styles[prop])\n ) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n","import getSupportedPropertyName from '../utils/getSupportedPropertyName';\nimport find from '../utils/find';\nimport getOffsetParent from '../utils/getOffsetParent';\nimport getBoundingClientRect from '../utils/getBoundingClientRect';\nimport getRoundedOffsets from '../utils/getRoundedOffsets';\nimport isBrowser from '../utils/isBrowser';\n\nconst isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeStyle(data, options) {\n const { x, y } = options;\n const { popper } = data.offsets;\n\n // Remove this legacy support in Popper.js v2\n const legacyGpuAccelerationOption = find(\n data.instance.modifiers,\n modifier => modifier.name === 'applyStyle'\n ).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn(\n 'WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'\n );\n }\n const gpuAcceleration =\n legacyGpuAccelerationOption !== undefined\n ? legacyGpuAccelerationOption\n : options.gpuAcceleration;\n\n const offsetParent = getOffsetParent(data.instance.popper);\n const offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n const styles = {\n position: popper.position,\n };\n\n const offsets = getRoundedOffsets(\n data,\n window.devicePixelRatio < 2 || !isFirefox\n );\n\n const sideA = x === 'bottom' ? 'top' : 'bottom';\n const sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n const prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n let left, top;\n if (sideA === 'bottom') {\n // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = `translate3d(${left}px, ${top}px, 0)`;\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n const invertTop = sideA === 'bottom' ? -1 : 1;\n const invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = `${sideA}, ${sideB}`;\n }\n\n // Attributes\n const attributes = {\n 'x-placement': data.placement,\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = { ...attributes, ...data.attributes };\n data.styles = { ...styles, ...data.styles };\n data.arrowStyles = { ...data.offsets.arrow, ...data.arrowStyles };\n\n return data;\n}\n","import find from './find';\n\n/**\n * Helper used to know if the given modifier depends from another one.
\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nexport default function isModifierRequired(\n modifiers,\n requestingName,\n requestedName\n) {\n const requesting = find(modifiers, ({ name }) => name === requestingName);\n\n const isRequired =\n !!requesting &&\n modifiers.some(modifier => {\n return (\n modifier.name === requestedName &&\n modifier.enabled &&\n modifier.order < requesting.order\n );\n });\n\n if (!isRequired) {\n const requesting = `\\`${requestingName}\\``;\n const requested = `\\`${requestedName}\\``;\n console.warn(\n `${requested} modifier is required by ${requesting} modifier in order to work, be sure to include it before ${requesting}!`\n );\n }\n return isRequired;\n}\n","/**\n * List of accepted placements to use as values of the `placement` option.
\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.
\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nexport default [\n 'auto-start',\n 'auto',\n 'auto-end',\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n];\n","import placements from '../methods/placements';\n\n// Get rid of `auto` `auto-start` and `auto-end`\nconst validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nexport default function clockwise(placement, counter = false) {\n const index = validPlacements.indexOf(placement);\n const arr = validPlacements\n .slice(index + 1)\n .concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n","import getOppositePlacement from '../utils/getOppositePlacement';\nimport getOppositeVariation from '../utils/getOppositeVariation';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\nimport getBoundaries from '../utils/getBoundaries';\nimport isModifierEnabled from '../utils/isModifierEnabled';\nimport clockwise from '../utils/clockwise';\n\nconst BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise',\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n options.boundariesElement,\n data.positionFixed\n );\n\n let placement = data.placement.split('-')[0];\n let placementOpposite = getOppositePlacement(placement);\n let variation = data.placement.split('-')[1] || '';\n\n let flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach((step, index) => {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n const popperOffsets = data.offsets.popper;\n const refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n const floor = Math.floor;\n const overlapsRef =\n (placement === 'left' &&\n floor(popperOffsets.right) > floor(refOffsets.left)) ||\n (placement === 'right' &&\n floor(popperOffsets.left) < floor(refOffsets.right)) ||\n (placement === 'top' &&\n floor(popperOffsets.bottom) > floor(refOffsets.top)) ||\n (placement === 'bottom' &&\n floor(popperOffsets.top) < floor(refOffsets.bottom));\n\n const overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n const overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n const overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n const overflowsBottom =\n floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n const overflowsBoundaries =\n (placement === 'left' && overflowsLeft) ||\n (placement === 'right' && overflowsRight) ||\n (placement === 'top' && overflowsTop) ||\n (placement === 'bottom' && overflowsBottom);\n\n // flip the variation if required\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n // flips variation if reference element overflows boundaries\n const flippedVariationByRef =\n !!options.flipVariations &&\n ((isVertical && variation === 'start' && overflowsLeft) ||\n (isVertical && variation === 'end' && overflowsRight) ||\n (!isVertical && variation === 'start' && overflowsTop) ||\n (!isVertical && variation === 'end' && overflowsBottom));\n\n // flips variation if popper content overflows boundaries\n const flippedVariationByContent =\n !!options.flipVariationsByContent &&\n ((isVertical && variation === 'start' && overflowsRight) ||\n (isVertical && variation === 'end' && overflowsLeft) ||\n (!isVertical && variation === 'start' && overflowsBottom) ||\n (!isVertical && variation === 'end' && overflowsTop));\n\n const flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = {\n ...data.offsets.popper,\n ...getPopperOffsets(\n data.instance.popper,\n data.offsets.reference,\n data.placement\n ),\n };\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n","import isNumeric from '../utils/isNumeric';\nimport getClientRect from '../utils/getClientRect';\nimport find from '../utils/find';\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nexport function toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n const split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n const value = +split[1];\n const unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n let element;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n const rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n let size;\n if (unit === 'vh') {\n size = Math.max(\n document.documentElement.clientHeight,\n window.innerHeight || 0\n );\n } else {\n size = Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n );\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nexport function parseOffset(\n offset,\n popperOffsets,\n referenceOffsets,\n basePlacement\n) {\n const offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n const useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n const fragments = offset.split(/(\\+|\\-)/).map(frag => frag.trim());\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n const divider = fragments.indexOf(\n find(fragments, frag => frag.search(/,|\\s/) !== -1)\n );\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn(\n 'Offsets separated by white space(s) are deprecated, use a comma (,) instead.'\n );\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n const splitRegex = /\\s*,\\s*|\\s+/;\n let ops = divider !== -1\n ? [\n fragments\n .slice(0, divider)\n .concat([fragments[divider].split(splitRegex)[0]]),\n [fragments[divider].split(splitRegex)[1]].concat(\n fragments.slice(divider + 1)\n ),\n ]\n : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map((op, index) => {\n // Most of the units rely on the orientation of the popper\n const measurement = (index === 1 ? !useHeight : useHeight)\n ? 'height'\n : 'width';\n let mergeWithPrevious = false;\n return (\n op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce((a, b) => {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(str => toValue(str, measurement, popperOffsets, referenceOffsets))\n );\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach((op, index) => {\n op.forEach((frag, index2) => {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nexport default function offset(data, { offset }) {\n const { placement, offsets: { popper, reference } } = data;\n const basePlacement = placement.split('-')[0];\n\n let offsets;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n","import applyStyle, { applyStyleOnLoad } from './applyStyle';\nimport computeStyle from './computeStyle';\nimport arrow from './arrow';\nimport flip from './flip';\nimport keepTogether from './keepTogether';\nimport offset from './offset';\nimport preventOverflow from './preventOverflow';\nimport shift from './shift';\nimport hide from './hide';\nimport inner from './inner';\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.
\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.
\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nexport default {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.
\n * It will read the variation of the `placement` property.
\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift,\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.
\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.
\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.
\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0,\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries.
\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".
\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent',\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether,\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]',\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false,\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner,\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide,\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right',\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined,\n },\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n","import modifiers from '../modifiers/index';\n\n/**\n * Default options provided to Popper.js constructor.
\n * These can be overridden using the `options` argument of Popper.js.
\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nexport default {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: () => {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: () => {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers,\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function shift(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n const { reference, popper } = data.offsets;\n const isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n const side = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n const shiftOffsets = {\n start: { [side]: reference[side] },\n end: {\n [side]: reference[side] + reference[measurement] - popper[measurement],\n },\n };\n\n data.offsets.popper = { ...popper, ...shiftOffsets[shiftvariation] };\n }\n\n return data;\n}\n","import getOffsetParent from '../utils/getOffsetParent';\nimport getBoundaries from '../utils/getBoundaries';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function preventOverflow(data, options) {\n let boundariesElement =\n options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n const transformProp = getSupportedPropertyName('transform');\n const popperStyles = data.instance.popper.style; // assignment to help minification\n const { top, left, [transformProp]: transform } = popperStyles;\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n boundariesElement,\n data.positionFixed\n );\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n\n options.boundaries = boundaries;\n\n const order = options.priority;\n let popper = data.offsets.popper;\n\n const check = {\n primary(placement) {\n let value = popper[placement];\n if (\n popper[placement] < boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return { [placement]: value };\n },\n secondary(placement) {\n const mainSide = placement === 'right' ? 'left' : 'top';\n let value = popper[mainSide];\n if (\n popper[placement] > boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.min(\n popper[mainSide],\n boundaries[placement] -\n (placement === 'right' ? popper.width : popper.height)\n );\n }\n return { [mainSide]: value };\n },\n };\n\n order.forEach(placement => {\n const side =\n ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = { ...popper, ...check[side](placement) };\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function keepTogether(data) {\n const { popper, reference } = data.offsets;\n const placement = data.placement.split('-')[0];\n const floor = Math.floor;\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n const side = isVertical ? 'right' : 'bottom';\n const opSide = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] =\n floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOuterSizes from '../utils/getOuterSizes';\nimport isModifierRequired from '../utils/isModifierRequired';\nimport getStyleComputedProperty from '../utils/getStyleComputedProperty';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function arrow(data, options) {\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n let arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn(\n 'WARNING: `arrow.element` must be child of its popper element!'\n );\n return data;\n }\n }\n\n const placement = data.placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n const len = isVertical ? 'height' : 'width';\n const sideCapitalized = isVertical ? 'Top' : 'Left';\n const side = sideCapitalized.toLowerCase();\n const altSide = isVertical ? 'left' : 'top';\n const opSide = isVertical ? 'bottom' : 'right';\n const arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -=\n popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] +=\n reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n const center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n const css = getStyleComputedProperty(data.instance.popper);\n const popperMarginSide = parseFloat(css[`margin${sideCapitalized}`], 10);\n const popperBorderSide = parseFloat(css[`border${sideCapitalized}Width`], 10);\n let sideValue =\n center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = {\n [side]: Math.round(sideValue),\n [altSide]: '', // make sure to unset any eventual altSide value from the DOM node\n };\n\n return data;\n}\n","/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nexport default function getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOppositePlacement from '../utils/getOppositePlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function inner(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n const subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] =\n reference[basePlacement] -\n (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n","import isModifierRequired from '../utils/isModifierRequired';\nimport find from '../utils/find';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n const refRect = data.offsets.reference;\n const bound = find(\n data.instance.modifiers,\n modifier => modifier.name === 'preventOverflow'\n ).boundaries;\n\n if (\n refRect.bottom < bound.top ||\n refRect.left > bound.right ||\n refRect.top > bound.bottom ||\n refRect.right < bound.left\n ) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n","/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nexport default function getRoundedOffsets(data, shouldRound) {\n const { popper, reference } = data.offsets;\n const { round, floor } = Math;\n const noRound = v => v;\n \n const referenceWidth = round(reference.width);\n const popperWidth = round(popper.width);\n \n const isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n const isVariation = data.placement.indexOf('-') !== -1;\n const sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n const bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n const horizontalToInteger = !shouldRound\n ? noRound\n : isVertical || isVariation || sameWidthParity\n ? round\n : floor;\n const verticalToInteger = !shouldRound ? noRound : round;\n\n return {\n left: horizontalToInteger(\n bothOddWidth && !isVariation && shouldRound\n ? popper.left - 1\n : popper.left\n ),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right),\n };\n}\n","import setStyles from '../utils/setStyles';\nimport setAttributes from '../utils/setAttributes';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport computeAutoPlacement from '../utils/computeAutoPlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nexport default function applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nexport function applyStyleOnLoad(\n reference,\n popper,\n options,\n modifierOptions,\n state\n) {\n // compute reference element offsets\n const referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n const placement = computeAutoPlacement(\n options.placement,\n referenceOffsets,\n popper,\n reference,\n options.modifiers.flip.boundariesElement,\n options.modifiers.flip.padding\n );\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n return options;\n}\n","/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function(prop) {\n const value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n","!function(r,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):r.dayjs_plugin_relativeTime=t()}(this,function(){\"use strict\";return function(r,t,e){var n=t.prototype;e.en.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\"};var o=function(r,t,n,o){for(var d,i,u=n.$locale().relativeTime,a=[{l:\"s\",r:44,d:\"second\"},{l:\"m\",r:89},{l:\"mm\",r:44,d:\"minute\"},{l:\"h\",r:89},{l:\"hh\",r:21,d:\"hour\"},{l:\"d\",r:35},{l:\"dd\",r:25,d:\"day\"},{l:\"M\",r:45},{l:\"MM\",r:10,d:\"month\"},{l:\"y\",r:17},{l:\"yy\",d:\"year\"}],f=a.length,s=0;s0&&(l=a[s-1]),i=u[l.l].replace(\"%d\",h);break}}return t?i:(d>0?u.future:u.past).replace(\"%s\",i)};n.to=function(r,t){return o(r,t,this,!0)},n.from=function(r,t){return o(r,t,this)};var d=function(r){return r.$u?e.utc():e()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}});\n","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):e.dayjs_plugin_localizedFormat=t()}(this,function(){\"use strict\";return function(e,t,o){var n=t.prototype,r=n.format,M={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"};o.en.formats=M;n.format=function(e){void 0===e&&(e=\"YYYY-MM-DDTHH:mm:ssZ\");var t=this.$locale().formats,o=void 0===t?{}:t,n=e.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,t,n){var r=n&&n.toUpperCase();return t||o[n]||M[n]||o[r].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,o){return t||o.slice(1)})});return r.call(this,n)}}});\n","import prop from 'mithril/stream';\r\n\r\nexport default () => {\r\n const mo = global.m;\r\n\r\n const m = function (comp, ...args) {\r\n const node = mo.apply(this, arguments);\r\n\r\n if (!node.attrs) node.attrs = {};\r\n\r\n if (node.attrs.bidi) {\r\n m.bidi(node, node.attrs.bidi);\r\n }\r\n\r\n if (node.attrs.route) {\r\n node.attrs.href = node.attrs.route;\r\n node.attrs.tag = m.route.Link;\r\n\r\n delete node.attrs.route;\r\n }\r\n\r\n return node;\r\n };\r\n\r\n Object.keys(mo).forEach(key => m[key] = mo[key]);\r\n\r\n m.withAttr = (key: string, cb: Function) => function () {\r\n cb(this.getAttribute(key) || this[key]);\r\n };\r\n\r\n m.prop = prop;\r\n\r\n global.m = m;\r\n}\r\n","\"use strict\"\n\nmodule.exports = require(\"./stream/stream\")\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","module.exports = global[\"jQuery\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\imports-loader\\\\index.js?this=>window!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\zepto.js\");","/*** IMPORTS FROM imports-loader ***/\n(function() {\n\n/* Zepto v1.2.0 - zepto event ajax form ie - zeptojs.com/license */\n(function(global, factory) {\n if (typeof define === 'function' && define.amd)\n define(function() { return factory(global) })\n else\n factory(global)\n}(this, function(window) {\n var Zepto = (function() {\n var undefined, key, $, classList, emptyArray = [], concat = emptyArray.concat, filter = emptyArray.filter, slice = emptyArray.slice,\n document = window.document,\n elementDisplay = {}, classCache = {},\n cssNumber = { 'column-count': 1, 'columns': 1, 'font-weight': 1, 'line-height': 1,'opacity': 1, 'z-index': 1, 'zoom': 1 },\n fragmentRE = /^\\s*<(\\w+|!)[^>]*>/,\n singleTagRE = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,\n tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/ig,\n rootNodeRE = /^(?:body|html)$/i,\n capitalRE = /([A-Z])/g,\n\n // special attributes that should be get/set via method calls\n methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'],\n\n adjacencyOperators = [ 'after', 'prepend', 'before', 'append' ],\n table = document.createElement('table'),\n tableRow = document.createElement('tr'),\n containers = {\n 'tr': document.createElement('tbody'),\n 'tbody': table, 'thead': table, 'tfoot': table,\n 'td': tableRow, 'th': tableRow,\n '*': document.createElement('div')\n },\n readyRE = /complete|loaded|interactive/,\n simpleSelectorRE = /^[\\w-]*$/,\n class2type = {},\n toString = class2type.toString,\n zepto = {},\n camelize, uniq,\n tempParent = document.createElement('div'),\n propMap = {\n 'tabindex': 'tabIndex',\n 'readonly': 'readOnly',\n 'for': 'htmlFor',\n 'class': 'className',\n 'maxlength': 'maxLength',\n 'cellspacing': 'cellSpacing',\n 'cellpadding': 'cellPadding',\n 'rowspan': 'rowSpan',\n 'colspan': 'colSpan',\n 'usemap': 'useMap',\n 'frameborder': 'frameBorder',\n 'contenteditable': 'contentEditable'\n },\n isArray = Array.isArray ||\n function(object){ return object instanceof Array }\n\n zepto.matches = function(element, selector) {\n if (!selector || !element || element.nodeType !== 1) return false\n var matchesSelector = element.matches || element.webkitMatchesSelector ||\n element.mozMatchesSelector || element.oMatchesSelector ||\n element.matchesSelector\n if (matchesSelector) return matchesSelector.call(element, selector)\n // fall back to performing a selector:\n var match, parent = element.parentNode, temp = !parent\n if (temp) (parent = tempParent).appendChild(element)\n match = ~zepto.qsa(parent, selector).indexOf(element)\n temp && tempParent.removeChild(element)\n return match\n }\n\n function type(obj) {\n return obj == null ? String(obj) :\n class2type[toString.call(obj)] || \"object\"\n }\n\n function isFunction(value) { return type(value) == \"function\" }\n function isWindow(obj) { return obj != null && obj == obj.window }\n function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE }\n function isObject(obj) { return type(obj) == \"object\" }\n function isPlainObject(obj) {\n return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype\n }\n\n function likeArray(obj) {\n var length = !!obj && 'length' in obj && obj.length,\n type = $.type(obj)\n\n return 'function' != type && !isWindow(obj) && (\n 'array' == type || length === 0 ||\n (typeof length == 'number' && length > 0 && (length - 1) in obj)\n )\n }\n\n function compact(array) { return filter.call(array, function(item){ return item != null }) }\n function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array }\n camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : '' }) }\n function dasherize(str) {\n return str.replace(/::/g, '/')\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')\n .replace(/([a-z\\d])([A-Z])/g, '$1_$2')\n .replace(/_/g, '-')\n .toLowerCase()\n }\n uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) }\n\n function classRE(name) {\n return name in classCache ?\n classCache[name] : (classCache[name] = new RegExp('(^|\\\\s)' + name + '(\\\\s|$)'))\n }\n\n function maybeAddPx(name, value) {\n return (typeof value == \"number\" && !cssNumber[dasherize(name)]) ? value + \"px\" : value\n }\n\n function defaultDisplay(nodeName) {\n var element, display\n if (!elementDisplay[nodeName]) {\n element = document.createElement(nodeName)\n document.body.appendChild(element)\n display = getComputedStyle(element, '').getPropertyValue(\"display\")\n element.parentNode.removeChild(element)\n display == \"none\" && (display = \"block\")\n elementDisplay[nodeName] = display\n }\n return elementDisplay[nodeName]\n }\n\n function children(element) {\n return 'children' in element ?\n slice.call(element.children) :\n $.map(element.childNodes, function(node){ if (node.nodeType == 1) return node })\n }\n\n function Z(dom, selector) {\n var i, len = dom ? dom.length : 0\n for (i = 0; i < len; i++) this[i] = dom[i]\n this.length = len\n this.selector = selector || ''\n }\n\n // `$.zepto.fragment` takes a html string and an optional tag name\n // to generate DOM nodes from the given html string.\n // The generated DOM nodes are returned as an array.\n // This function can be overridden in plugins for example to make\n // it compatible with browsers that don't support the DOM fully.\n zepto.fragment = function(html, name, properties) {\n var dom, nodes, container\n\n // A special case optimization for a single tag\n if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1))\n\n if (!dom) {\n if (html.replace) html = html.replace(tagExpanderRE, \"<$1>\")\n if (name === undefined) name = fragmentRE.test(html) && RegExp.$1\n if (!(name in containers)) name = '*'\n\n container = containers[name]\n container.innerHTML = '' + html\n dom = $.each(slice.call(container.childNodes), function(){\n container.removeChild(this)\n })\n }\n\n if (isPlainObject(properties)) {\n nodes = $(dom)\n $.each(properties, function(key, value) {\n if (methodAttributes.indexOf(key) > -1) nodes[key](value)\n else nodes.attr(key, value)\n })\n }\n\n return dom\n }\n\n // `$.zepto.Z` swaps out the prototype of the given `dom` array\n // of nodes with `$.fn` and thus supplying all the Zepto functions\n // to the array. This method can be overridden in plugins.\n zepto.Z = function(dom, selector) {\n return new Z(dom, selector)\n }\n\n // `$.zepto.isZ` should return `true` if the given object is a Zepto\n // collection. This method can be overridden in plugins.\n zepto.isZ = function(object) {\n return object instanceof zepto.Z\n }\n\n // `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and\n // takes a CSS selector and an optional context (and handles various\n // special cases).\n // This method can be overridden in plugins.\n zepto.init = function(selector, context) {\n var dom\n // If nothing given, return an empty Zepto collection\n if (!selector) return zepto.Z()\n // Optimize for string selectors\n else if (typeof selector == 'string') {\n selector = selector.trim()\n // If it's a html fragment, create nodes from it\n // Note: In both Chrome 21 and Firefox 15, DOM error 12\n // is thrown if the fragment doesn't begin with <\n if (selector[0] == '<' && fragmentRE.test(selector))\n dom = zepto.fragment(selector, RegExp.$1, context), selector = null\n // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // If it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // If a function is given, call it when the DOM is ready\n else if (isFunction(selector)) return $(document).ready(selector)\n // If a Zepto collection is given, just return it\n else if (zepto.isZ(selector)) return selector\n else {\n // normalize array if an array of nodes is given\n if (isArray(selector)) dom = compact(selector)\n // Wrap DOM nodes.\n else if (isObject(selector))\n dom = [selector], selector = null\n // If it's a html fragment, create nodes from it\n else if (fragmentRE.test(selector))\n dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null\n // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // And last but no least, if it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // create a new Zepto collection from the nodes found\n return zepto.Z(dom, selector)\n }\n\n // `$` will be the base `Zepto` object. When calling this\n // function just call `$.zepto.init, which makes the implementation\n // details of selecting nodes and creating Zepto collections\n // patchable in plugins.\n $ = function(selector, context){\n return zepto.init(selector, context)\n }\n\n function extend(target, source, deep) {\n for (key in source)\n if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {\n if (isPlainObject(source[key]) && !isPlainObject(target[key]))\n target[key] = {}\n if (isArray(source[key]) && !isArray(target[key]))\n target[key] = []\n extend(target[key], source[key], deep)\n }\n else if (source[key] !== undefined) target[key] = source[key]\n }\n\n // Copy all but undefined properties from one or more\n // objects to the `target` object.\n $.extend = function(target){\n var deep, args = slice.call(arguments, 1)\n if (typeof target == 'boolean') {\n deep = target\n target = args.shift()\n }\n args.forEach(function(arg){ extend(target, arg, deep) })\n return target\n }\n\n // `$.zepto.qsa` is Zepto's CSS selector implementation which\n // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`.\n // This method can be overridden in plugins.\n zepto.qsa = function(element, selector){\n var found,\n maybeID = selector[0] == '#',\n maybeClass = !maybeID && selector[0] == '.',\n nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, // Ensure that a 1 char tag name still gets checked\n isSimple = simpleSelectorRE.test(nameOnly)\n return (element.getElementById && isSimple && maybeID) ? // Safari DocumentFragment doesn't have getElementById\n ( (found = element.getElementById(nameOnly)) ? [found] : [] ) :\n (element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11) ? [] :\n slice.call(\n isSimple && !maybeID && element.getElementsByClassName ? // DocumentFragment doesn't have getElementsByClassName/TagName\n maybeClass ? element.getElementsByClassName(nameOnly) : // If it's simple, it could be a class\n element.getElementsByTagName(selector) : // Or a tag\n element.querySelectorAll(selector) // Or it's not simple, and we need to query all\n )\n }\n\n function filtered(nodes, selector) {\n return selector == null ? $(nodes) : $(nodes).filter(selector)\n }\n\n $.contains = document.documentElement.contains ?\n function(parent, node) {\n return parent !== node && parent.contains(node)\n } :\n function(parent, node) {\n while (node && (node = node.parentNode))\n if (node === parent) return true\n return false\n }\n\n function funcArg(context, arg, idx, payload) {\n return isFunction(arg) ? arg.call(context, idx, payload) : arg\n }\n\n function setAttribute(node, name, value) {\n value == null ? node.removeAttribute(name) : node.setAttribute(name, value)\n }\n\n // access className property while respecting SVGAnimatedString\n function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }\n\n // \"true\" => true\n // \"false\" => false\n // \"null\" => null\n // \"42\" => 42\n // \"42.5\" => 42.5\n // \"08\" => \"08\"\n // JSON => parse if valid\n // String => self\n function deserializeValue(value) {\n try {\n return value ?\n value == \"true\" ||\n ( value == \"false\" ? false :\n value == \"null\" ? null :\n +value + \"\" == value ? +value :\n /^[\\[\\{]/.test(value) ? $.parseJSON(value) :\n value )\n : value\n } catch(e) {\n return value\n }\n }\n\n $.type = type\n $.isFunction = isFunction\n $.isWindow = isWindow\n $.isArray = isArray\n $.isPlainObject = isPlainObject\n\n $.isEmptyObject = function(obj) {\n var name\n for (name in obj) return false\n return true\n }\n\n $.isNumeric = function(val) {\n var num = Number(val), type = typeof val\n return val != null && type != 'boolean' &&\n (type != 'string' || val.length) &&\n !isNaN(num) && isFinite(num) || false\n }\n\n $.inArray = function(elem, array, i){\n return emptyArray.indexOf.call(array, elem, i)\n }\n\n $.camelCase = camelize\n $.trim = function(str) {\n return str == null ? \"\" : String.prototype.trim.call(str)\n }\n\n // plugin compatibility\n $.uuid = 0\n $.support = { }\n $.expr = { }\n $.noop = function() {}\n\n $.map = function(elements, callback){\n var value, values = [], i, key\n if (likeArray(elements))\n for (i = 0; i < elements.length; i++) {\n value = callback(elements[i], i)\n if (value != null) values.push(value)\n }\n else\n for (key in elements) {\n value = callback(elements[key], key)\n if (value != null) values.push(value)\n }\n return flatten(values)\n }\n\n $.each = function(elements, callback){\n var i, key\n if (likeArray(elements)) {\n for (i = 0; i < elements.length; i++)\n if (callback.call(elements[i], i, elements[i]) === false) return elements\n } else {\n for (key in elements)\n if (callback.call(elements[key], key, elements[key]) === false) return elements\n }\n\n return elements\n }\n\n $.grep = function(elements, callback){\n return filter.call(elements, callback)\n }\n\n if (window.JSON) $.parseJSON = JSON.parse\n\n // Populate the class2type map\n $.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), function(i, name) {\n class2type[ \"[object \" + name + \"]\" ] = name.toLowerCase()\n })\n\n // Define methods that will be available on all\n // Zepto collections\n $.fn = {\n constructor: zepto.Z,\n length: 0,\n\n // Because a collection acts like an array\n // copy over these useful array functions.\n forEach: emptyArray.forEach,\n reduce: emptyArray.reduce,\n push: emptyArray.push,\n sort: emptyArray.sort,\n splice: emptyArray.splice,\n indexOf: emptyArray.indexOf,\n concat: function(){\n var i, value, args = []\n for (i = 0; i < arguments.length; i++) {\n value = arguments[i]\n args[i] = zepto.isZ(value) ? value.toArray() : value\n }\n return concat.apply(zepto.isZ(this) ? this.toArray() : this, args)\n },\n\n // `map` and `slice` in the jQuery API work differently\n // from their array counterparts\n map: function(fn){\n return $($.map(this, function(el, i){ return fn.call(el, i, el) }))\n },\n slice: function(){\n return $(slice.apply(this, arguments))\n },\n\n ready: function(callback){\n // need to check if document.body exists for IE as that browser reports\n // document ready when it hasn't yet created the body element\n if (readyRE.test(document.readyState) && document.body) callback($)\n else document.addEventListener('DOMContentLoaded', function(){ callback($) }, false)\n return this\n },\n get: function(idx){\n return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length]\n },\n toArray: function(){ return this.get() },\n size: function(){\n return this.length\n },\n remove: function(){\n return this.each(function(){\n if (this.parentNode != null)\n this.parentNode.removeChild(this)\n })\n },\n each: function(callback){\n emptyArray.every.call(this, function(el, idx){\n return callback.call(el, idx, el) !== false\n })\n return this\n },\n filter: function(selector){\n if (isFunction(selector)) return this.not(this.not(selector))\n return $(filter.call(this, function(element){\n return zepto.matches(element, selector)\n }))\n },\n add: function(selector,context){\n return $(uniq(this.concat($(selector,context))))\n },\n is: function(selector){\n return this.length > 0 && zepto.matches(this[0], selector)\n },\n not: function(selector){\n var nodes=[]\n if (isFunction(selector) && selector.call !== undefined)\n this.each(function(idx){\n if (!selector.call(this,idx)) nodes.push(this)\n })\n else {\n var excludes = typeof selector == 'string' ? this.filter(selector) :\n (likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector)\n this.forEach(function(el){\n if (excludes.indexOf(el) < 0) nodes.push(el)\n })\n }\n return $(nodes)\n },\n has: function(selector){\n return this.filter(function(){\n return isObject(selector) ?\n $.contains(this, selector) :\n $(this).find(selector).size()\n })\n },\n eq: function(idx){\n return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1)\n },\n first: function(){\n var el = this[0]\n return el && !isObject(el) ? el : $(el)\n },\n last: function(){\n var el = this[this.length - 1]\n return el && !isObject(el) ? el : $(el)\n },\n find: function(selector){\n var result, $this = this\n if (!selector) result = $()\n else if (typeof selector == 'object')\n result = $(selector).filter(function(){\n var node = this\n return emptyArray.some.call($this, function(parent){\n return $.contains(parent, node)\n })\n })\n else if (this.length == 1) result = $(zepto.qsa(this[0], selector))\n else result = this.map(function(){ return zepto.qsa(this, selector) })\n return result\n },\n closest: function(selector, context){\n var nodes = [], collection = typeof selector == 'object' && $(selector)\n this.each(function(_, node){\n while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector)))\n node = node !== context && !isDocument(node) && node.parentNode\n if (node && nodes.indexOf(node) < 0) nodes.push(node)\n })\n return $(nodes)\n },\n parents: function(selector){\n var ancestors = [], nodes = this\n while (nodes.length > 0)\n nodes = $.map(nodes, function(node){\n if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) {\n ancestors.push(node)\n return node\n }\n })\n return filtered(ancestors, selector)\n },\n parent: function(selector){\n return filtered(uniq(this.pluck('parentNode')), selector)\n },\n children: function(selector){\n return filtered(this.map(function(){ return children(this) }), selector)\n },\n contents: function() {\n return this.map(function() { return this.contentDocument || slice.call(this.childNodes) })\n },\n siblings: function(selector){\n return filtered(this.map(function(i, el){\n return filter.call(children(el.parentNode), function(child){ return child!==el })\n }), selector)\n },\n empty: function(){\n return this.each(function(){ this.innerHTML = '' })\n },\n // `pluck` is borrowed from Prototype.js\n pluck: function(property){\n return $.map(this, function(el){ return el[property] })\n },\n show: function(){\n return this.each(function(){\n this.style.display == \"none\" && (this.style.display = '')\n if (getComputedStyle(this, '').getPropertyValue(\"display\") == \"none\")\n this.style.display = defaultDisplay(this.nodeName)\n })\n },\n replaceWith: function(newContent){\n return this.before(newContent).remove()\n },\n wrap: function(structure){\n var func = isFunction(structure)\n if (this[0] && !func)\n var dom = $(structure).get(0),\n clone = dom.parentNode || this.length > 1\n\n return this.each(function(index){\n $(this).wrapAll(\n func ? structure.call(this, index) :\n clone ? dom.cloneNode(true) : dom\n )\n })\n },\n wrapAll: function(structure){\n if (this[0]) {\n $(this[0]).before(structure = $(structure))\n var children\n // drill down to the inmost element\n while ((children = structure.children()).length) structure = children.first()\n $(structure).append(this)\n }\n return this\n },\n wrapInner: function(structure){\n var func = isFunction(structure)\n return this.each(function(index){\n var self = $(this), contents = self.contents(),\n dom = func ? structure.call(this, index) : structure\n contents.length ? contents.wrapAll(dom) : self.append(dom)\n })\n },\n unwrap: function(){\n this.parent().each(function(){\n $(this).replaceWith($(this).children())\n })\n return this\n },\n clone: function(){\n return this.map(function(){ return this.cloneNode(true) })\n },\n hide: function(){\n return this.css(\"display\", \"none\")\n },\n toggle: function(setting){\n return this.each(function(){\n var el = $(this)\n ;(setting === undefined ? el.css(\"display\") == \"none\" : setting) ? el.show() : el.hide()\n })\n },\n prev: function(selector){ return $(this.pluck('previousElementSibling')).filter(selector || '*') },\n next: function(selector){ return $(this.pluck('nextElementSibling')).filter(selector || '*') },\n html: function(html){\n return 0 in arguments ?\n this.each(function(idx){\n var originHtml = this.innerHTML\n $(this).empty().append( funcArg(this, html, idx, originHtml) )\n }) :\n (0 in this ? this[0].innerHTML : null)\n },\n text: function(text){\n return 0 in arguments ?\n this.each(function(idx){\n var newText = funcArg(this, text, idx, this.textContent)\n this.textContent = newText == null ? '' : ''+newText\n }) :\n (0 in this ? this.pluck('textContent').join(\"\") : null)\n },\n attr: function(name, value){\n var result\n return (typeof name == 'string' && !(1 in arguments)) ?\n (0 in this && this[0].nodeType == 1 && (result = this[0].getAttribute(name)) != null ? result : undefined) :\n this.each(function(idx){\n if (this.nodeType !== 1) return\n if (isObject(name)) for (key in name) setAttribute(this, key, name[key])\n else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name)))\n })\n },\n removeAttr: function(name){\n return this.each(function(){ this.nodeType === 1 && name.split(' ').forEach(function(attribute){\n setAttribute(this, attribute)\n }, this)})\n },\n prop: function(name, value){\n name = propMap[name] || name\n return (1 in arguments) ?\n this.each(function(idx){\n this[name] = funcArg(this, value, idx, this[name])\n }) :\n (this[0] && this[0][name])\n },\n removeProp: function(name){\n name = propMap[name] || name\n return this.each(function(){ delete this[name] })\n },\n data: function(name, value){\n var attrName = 'data-' + name.replace(capitalRE, '-$1').toLowerCase()\n\n var data = (1 in arguments) ?\n this.attr(attrName, value) :\n this.attr(attrName)\n\n return data !== null ? deserializeValue(data) : undefined\n },\n val: function(value){\n if (0 in arguments) {\n if (value == null) value = \"\"\n return this.each(function(idx){\n this.value = funcArg(this, value, idx, this.value)\n })\n } else {\n return this[0] && (this[0].multiple ?\n $(this[0]).find('option').filter(function(){ return this.selected }).pluck('value') :\n this[0].value)\n }\n },\n offset: function(coordinates){\n if (coordinates) return this.each(function(index){\n var $this = $(this),\n coords = funcArg(this, coordinates, index, $this.offset()),\n parentOffset = $this.offsetParent().offset(),\n props = {\n top: coords.top - parentOffset.top,\n left: coords.left - parentOffset.left\n }\n\n if ($this.css('position') == 'static') props['position'] = 'relative'\n $this.css(props)\n })\n if (!this.length) return null\n if (document.documentElement !== this[0] && !$.contains(document.documentElement, this[0]))\n return {top: 0, left: 0}\n var obj = this[0].getBoundingClientRect()\n return {\n left: obj.left + window.pageXOffset,\n top: obj.top + window.pageYOffset,\n width: Math.round(obj.width),\n height: Math.round(obj.height)\n }\n },\n css: function(property, value){\n if (arguments.length < 2) {\n var element = this[0]\n if (typeof property == 'string') {\n if (!element) return\n return element.style[camelize(property)] || getComputedStyle(element, '').getPropertyValue(property)\n } else if (isArray(property)) {\n if (!element) return\n var props = {}\n var computedStyle = getComputedStyle(element, '')\n $.each(property, function(_, prop){\n props[prop] = (element.style[camelize(prop)] || computedStyle.getPropertyValue(prop))\n })\n return props\n }\n }\n\n var css = ''\n if (type(property) == 'string') {\n if (!value && value !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(property)) })\n else\n css = dasherize(property) + \":\" + maybeAddPx(property, value)\n } else {\n for (key in property)\n if (!property[key] && property[key] !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(key)) })\n else\n css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';'\n }\n\n return this.each(function(){ this.style.cssText += ';' + css })\n },\n index: function(element){\n return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0])\n },\n hasClass: function(name){\n if (!name) return false\n return emptyArray.some.call(this, function(el){\n return this.test(className(el))\n }, classRE(name))\n },\n addClass: function(name){\n if (!name) return this\n return this.each(function(idx){\n if (!('className' in this)) return\n classList = []\n var cls = className(this), newName = funcArg(this, name, idx, cls)\n newName.split(/\\s+/g).forEach(function(klass){\n if (!$(this).hasClass(klass)) classList.push(klass)\n }, this)\n classList.length && className(this, cls + (cls ? \" \" : \"\") + classList.join(\" \"))\n })\n },\n removeClass: function(name){\n return this.each(function(idx){\n if (!('className' in this)) return\n if (name === undefined) return className(this, '')\n classList = className(this)\n funcArg(this, name, idx, classList).split(/\\s+/g).forEach(function(klass){\n classList = classList.replace(classRE(klass), \" \")\n })\n className(this, classList.trim())\n })\n },\n toggleClass: function(name, when){\n if (!name) return this\n return this.each(function(idx){\n var $this = $(this), names = funcArg(this, name, idx, className(this))\n names.split(/\\s+/g).forEach(function(klass){\n (when === undefined ? !$this.hasClass(klass) : when) ?\n $this.addClass(klass) : $this.removeClass(klass)\n })\n })\n },\n scrollTop: function(value){\n if (!this.length) return\n var hasScrollTop = 'scrollTop' in this[0]\n if (value === undefined) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset\n return this.each(hasScrollTop ?\n function(){ this.scrollTop = value } :\n function(){ this.scrollTo(this.scrollX, value) })\n },\n scrollLeft: function(value){\n if (!this.length) return\n var hasScrollLeft = 'scrollLeft' in this[0]\n if (value === undefined) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset\n return this.each(hasScrollLeft ?\n function(){ this.scrollLeft = value } :\n function(){ this.scrollTo(value, this.scrollY) })\n },\n position: function() {\n if (!this.length) return\n\n var elem = this[0],\n // Get *real* offsetParent\n offsetParent = this.offsetParent(),\n // Get correct offsets\n offset = this.offset(),\n parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset()\n\n // Subtract element margins\n // note: when an element has margin: auto the offsetLeft and marginLeft\n // are the same in Safari causing offset.left to incorrectly be 0\n offset.top -= parseFloat( $(elem).css('margin-top') ) || 0\n offset.left -= parseFloat( $(elem).css('margin-left') ) || 0\n\n // Add offsetParent borders\n parentOffset.top += parseFloat( $(offsetParent[0]).css('border-top-width') ) || 0\n parentOffset.left += parseFloat( $(offsetParent[0]).css('border-left-width') ) || 0\n\n // Subtract the two offsets\n return {\n top: offset.top - parentOffset.top,\n left: offset.left - parentOffset.left\n }\n },\n offsetParent: function() {\n return this.map(function(){\n var parent = this.offsetParent || document.body\n while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css(\"position\") == \"static\")\n parent = parent.offsetParent\n return parent\n })\n }\n }\n\n // for now\n $.fn.detach = $.fn.remove\n\n // Generate the `width` and `height` functions\n ;['width', 'height'].forEach(function(dimension){\n var dimensionProperty =\n dimension.replace(/./, function(m){ return m[0].toUpperCase() })\n\n $.fn[dimension] = function(value){\n var offset, el = this[0]\n if (value === undefined) return isWindow(el) ? el['inner' + dimensionProperty] :\n isDocument(el) ? el.documentElement['scroll' + dimensionProperty] :\n (offset = this.offset()) && offset[dimension]\n else return this.each(function(idx){\n el = $(this)\n el.css(dimension, funcArg(this, value, idx, el[dimension]()))\n })\n }\n })\n\n function traverseNode(node, fun) {\n fun(node)\n for (var i = 0, len = node.childNodes.length; i < len; i++)\n traverseNode(node.childNodes[i], fun)\n }\n\n // Generate the `after`, `prepend`, `before`, `append`,\n // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods.\n adjacencyOperators.forEach(function(operator, operatorIndex) {\n var inside = operatorIndex % 2 //=> prepend, append\n\n $.fn[operator] = function(){\n // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings\n var argType, nodes = $.map(arguments, function(arg) {\n var arr = []\n argType = type(arg)\n if (argType == \"array\") {\n arg.forEach(function(el) {\n if (el.nodeType !== undefined) return arr.push(el)\n else if ($.zepto.isZ(el)) return arr = arr.concat(el.get())\n arr = arr.concat(zepto.fragment(el))\n })\n return arr\n }\n return argType == \"object\" || arg == null ?\n arg : zepto.fragment(arg)\n }),\n parent, copyByClone = this.length > 1\n if (nodes.length < 1) return this\n\n return this.each(function(_, target){\n parent = inside ? target : target.parentNode\n\n // convert all methods to a \"before\" operation\n target = operatorIndex == 0 ? target.nextSibling :\n operatorIndex == 1 ? target.firstChild :\n operatorIndex == 2 ? target :\n null\n\n var parentInDocument = $.contains(document.documentElement, parent)\n\n nodes.forEach(function(node){\n if (copyByClone) node = node.cloneNode(true)\n else if (!parent) return $(node).remove()\n\n parent.insertBefore(node, target)\n if (parentInDocument) traverseNode(node, function(el){\n if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' &&\n (!el.type || el.type === 'text/javascript') && !el.src){\n var target = el.ownerDocument ? el.ownerDocument.defaultView : window\n target['eval'].call(target, el.innerHTML)\n }\n })\n })\n })\n }\n\n // after => insertAfter\n // prepend => prependTo\n // before => insertBefore\n // append => appendTo\n $.fn[inside ? operator+'To' : 'insert'+(operatorIndex ? 'Before' : 'After')] = function(html){\n $(html)[operator](this)\n return this\n }\n })\n\n zepto.Z.prototype = Z.prototype = $.fn\n\n // Export internal API functions in the `$.zepto` namespace\n zepto.uniq = uniq\n zepto.deserializeValue = deserializeValue\n $.zepto = zepto\n\n return $\n})()\n\nwindow.Zepto = Zepto\nwindow.$ === undefined && (window.$ = Zepto)\n\n;(function($){\n var _zid = 1, undefined,\n slice = Array.prototype.slice,\n isFunction = $.isFunction,\n isString = function(obj){ return typeof obj == 'string' },\n handlers = {},\n specialEvents={},\n focusinSupported = 'onfocusin' in window,\n focus = { focus: 'focusin', blur: 'focusout' },\n hover = { mouseenter: 'mouseover', mouseleave: 'mouseout' }\n\n specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents'\n\n function zid(element) {\n return element._zid || (element._zid = _zid++)\n }\n function findHandlers(element, event, fn, selector) {\n event = parse(event)\n if (event.ns) var matcher = matcherFor(event.ns)\n return (handlers[zid(element)] || []).filter(function(handler) {\n return handler\n && (!event.e || handler.e == event.e)\n && (!event.ns || matcher.test(handler.ns))\n && (!fn || zid(handler.fn) === zid(fn))\n && (!selector || handler.sel == selector)\n })\n }\n function parse(event) {\n var parts = ('' + event).split('.')\n return {e: parts[0], ns: parts.slice(1).sort().join(' ')}\n }\n function matcherFor(ns) {\n return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)')\n }\n\n function eventCapture(handler, captureSetting) {\n return handler.del &&\n (!focusinSupported && (handler.e in focus)) ||\n !!captureSetting\n }\n\n function realEvent(type) {\n return hover[type] || (focusinSupported && focus[type]) || type\n }\n\n function add(element, events, fn, data, selector, delegator, capture){\n var id = zid(element), set = (handlers[id] || (handlers[id] = []))\n events.split(/\\s/).forEach(function(event){\n if (event == 'ready') return $(document).ready(fn)\n var handler = parse(event)\n handler.fn = fn\n handler.sel = selector\n // emulate mouseenter, mouseleave\n if (handler.e in hover) fn = function(e){\n var related = e.relatedTarget\n if (!related || (related !== this && !$.contains(this, related)))\n return handler.fn.apply(this, arguments)\n }\n handler.del = delegator\n var callback = delegator || fn\n handler.proxy = function(e){\n e = compatible(e)\n if (e.isImmediatePropagationStopped()) return\n e.data = data\n var result = callback.apply(element, e._args == undefined ? [e] : [e].concat(e._args))\n if (result === false) e.preventDefault(), e.stopPropagation()\n return result\n }\n handler.i = set.length\n set.push(handler)\n if ('addEventListener' in element)\n element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n }\n function remove(element, events, fn, selector, capture){\n var id = zid(element)\n ;(events || '').split(/\\s/).forEach(function(event){\n findHandlers(element, event, fn, selector).forEach(function(handler){\n delete handlers[id][handler.i]\n if ('removeEventListener' in element)\n element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n })\n }\n\n $.event = { add: add, remove: remove }\n\n $.proxy = function(fn, context) {\n var args = (2 in arguments) && slice.call(arguments, 2)\n if (isFunction(fn)) {\n var proxyFn = function(){ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments) }\n proxyFn._zid = zid(fn)\n return proxyFn\n } else if (isString(context)) {\n if (args) {\n args.unshift(fn[context], fn)\n return $.proxy.apply(null, args)\n } else {\n return $.proxy(fn[context], fn)\n }\n } else {\n throw new TypeError(\"expected function\")\n }\n }\n\n $.fn.bind = function(event, data, callback){\n return this.on(event, data, callback)\n }\n $.fn.unbind = function(event, callback){\n return this.off(event, callback)\n }\n $.fn.one = function(event, selector, data, callback){\n return this.on(event, selector, data, callback, 1)\n }\n\n var returnTrue = function(){return true},\n returnFalse = function(){return false},\n ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,\n eventMethods = {\n preventDefault: 'isDefaultPrevented',\n stopImmediatePropagation: 'isImmediatePropagationStopped',\n stopPropagation: 'isPropagationStopped'\n }\n\n function compatible(event, source) {\n if (source || !event.isDefaultPrevented) {\n source || (source = event)\n\n $.each(eventMethods, function(name, predicate) {\n var sourceMethod = source[name]\n event[name] = function(){\n this[predicate] = returnTrue\n return sourceMethod && sourceMethod.apply(source, arguments)\n }\n event[predicate] = returnFalse\n })\n\n event.timeStamp || (event.timeStamp = Date.now())\n\n if (source.defaultPrevented !== undefined ? source.defaultPrevented :\n 'returnValue' in source ? source.returnValue === false :\n source.getPreventDefault && source.getPreventDefault())\n event.isDefaultPrevented = returnTrue\n }\n return event\n }\n\n function createProxy(event) {\n var key, proxy = { originalEvent: event }\n for (key in event)\n if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key]\n\n return compatible(proxy, event)\n }\n\n $.fn.delegate = function(selector, event, callback){\n return this.on(event, selector, callback)\n }\n $.fn.undelegate = function(selector, event, callback){\n return this.off(event, selector, callback)\n }\n\n $.fn.live = function(event, callback){\n $(document.body).delegate(this.selector, event, callback)\n return this\n }\n $.fn.die = function(event, callback){\n $(document.body).undelegate(this.selector, event, callback)\n return this\n }\n\n $.fn.on = function(event, selector, data, callback, one){\n var autoRemove, delegator, $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.on(type, selector, data, fn, one)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = data, data = selector, selector = undefined\n if (callback === undefined || data === false)\n callback = data, data = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(_, element){\n if (one) autoRemove = function(e){\n remove(element, e.type, callback)\n return callback.apply(this, arguments)\n }\n\n if (selector) delegator = function(e){\n var evt, match = $(e.target).closest(selector, element).get(0)\n if (match && match !== element) {\n evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element})\n return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1)))\n }\n }\n\n add(element, event, callback, data, selector, delegator || autoRemove)\n })\n }\n $.fn.off = function(event, selector, callback){\n var $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.off(type, selector, fn)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = selector, selector = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(){\n remove(this, event, callback, selector)\n })\n }\n\n $.fn.trigger = function(event, args){\n event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event)\n event._args = args\n return this.each(function(){\n // handle focus(), blur() by calling them directly\n if (event.type in focus && typeof this[event.type] == \"function\") this[event.type]()\n // items in the collection might not be DOM elements\n else if ('dispatchEvent' in this) this.dispatchEvent(event)\n else $(this).triggerHandler(event, args)\n })\n }\n\n // triggers event handlers on current element just as if an event occurred,\n // doesn't trigger an actual event, doesn't bubble\n $.fn.triggerHandler = function(event, args){\n var e, result\n this.each(function(i, element){\n e = createProxy(isString(event) ? $.Event(event) : event)\n e._args = args\n e.target = element\n $.each(findHandlers(element, event.type || event), function(i, handler){\n result = handler.proxy(e)\n if (e.isImmediatePropagationStopped()) return false\n })\n })\n return result\n }\n\n // shortcut methods for `.bind(event, fn)` for each event type\n ;('focusin focusout focus blur load resize scroll unload click dblclick '+\n 'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+\n 'change select keydown keypress keyup error').split(' ').forEach(function(event) {\n $.fn[event] = function(callback) {\n return (0 in arguments) ?\n this.bind(event, callback) :\n this.trigger(event)\n }\n })\n\n $.Event = function(type, props) {\n if (!isString(type)) props = type, type = props.type\n var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true\n if (props) for (var name in props) (name == 'bubbles') ? (bubbles = !!props[name]) : (event[name] = props[name])\n event.initEvent(type, bubbles, true)\n return compatible(event)\n }\n\n})(Zepto)\n\n;(function($){\n var jsonpID = +new Date(),\n document = window.document,\n key,\n name,\n rscript = /)<[^<]*)*<\\/script>/gi,\n scriptTypeRE = /^(?:text|application)\\/javascript/i,\n xmlTypeRE = /^(?:text|application)\\/xml/i,\n jsonType = 'application/json',\n htmlType = 'text/html',\n blankRE = /^\\s*$/,\n originAnchor = document.createElement('a')\n\n originAnchor.href = window.location.href\n\n // trigger a custom event and return false if it was cancelled\n function triggerAndReturn(context, eventName, data) {\n var event = $.Event(eventName)\n $(context).trigger(event, data)\n return !event.isDefaultPrevented()\n }\n\n // trigger an Ajax \"global\" event\n function triggerGlobal(settings, context, eventName, data) {\n if (settings.global) return triggerAndReturn(context || document, eventName, data)\n }\n\n // Number of active Ajax requests\n $.active = 0\n\n function ajaxStart(settings) {\n if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart')\n }\n function ajaxStop(settings) {\n if (settings.global && !(--$.active)) triggerGlobal(settings, null, 'ajaxStop')\n }\n\n // triggers an extra global event \"ajaxBeforeSend\" that's like \"ajaxSend\" but cancelable\n function ajaxBeforeSend(xhr, settings) {\n var context = settings.context\n if (settings.beforeSend.call(context, xhr, settings) === false ||\n triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false)\n return false\n\n triggerGlobal(settings, context, 'ajaxSend', [xhr, settings])\n }\n function ajaxSuccess(data, xhr, settings, deferred) {\n var context = settings.context, status = 'success'\n settings.success.call(context, data, status, xhr)\n if (deferred) deferred.resolveWith(context, [data, status, xhr])\n triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data])\n ajaxComplete(status, xhr, settings)\n }\n // type: \"timeout\", \"error\", \"abort\", \"parsererror\"\n function ajaxError(error, type, xhr, settings, deferred) {\n var context = settings.context\n settings.error.call(context, xhr, type, error)\n if (deferred) deferred.rejectWith(context, [xhr, type, error])\n triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error || type])\n ajaxComplete(type, xhr, settings)\n }\n // status: \"success\", \"notmodified\", \"error\", \"timeout\", \"abort\", \"parsererror\"\n function ajaxComplete(status, xhr, settings) {\n var context = settings.context\n settings.complete.call(context, xhr, status)\n triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings])\n ajaxStop(settings)\n }\n\n function ajaxDataFilter(data, type, settings) {\n if (settings.dataFilter == empty) return data\n var context = settings.context\n return settings.dataFilter.call(context, data, type)\n }\n\n // Empty function, used as default callback\n function empty() {}\n\n $.ajaxJSONP = function(options, deferred){\n if (!('type' in options)) return $.ajax(options)\n\n var _callbackName = options.jsonpCallback,\n callbackName = ($.isFunction(_callbackName) ?\n _callbackName() : _callbackName) || ('Zepto' + (jsonpID++)),\n script = document.createElement('script'),\n originalCallback = window[callbackName],\n responseData,\n abort = function(errorType) {\n $(script).triggerHandler('error', errorType || 'abort')\n },\n xhr = { abort: abort }, abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n $(script).on('load error', function(e, errorType){\n clearTimeout(abortTimeout)\n $(script).off().remove()\n\n if (e.type == 'error' || !responseData) {\n ajaxError(null, errorType || 'error', xhr, options, deferred)\n } else {\n ajaxSuccess(responseData[0], xhr, options, deferred)\n }\n\n window[callbackName] = originalCallback\n if (responseData && $.isFunction(originalCallback))\n originalCallback(responseData[0])\n\n originalCallback = responseData = undefined\n })\n\n if (ajaxBeforeSend(xhr, options) === false) {\n abort('abort')\n return xhr\n }\n\n window[callbackName] = function(){\n responseData = arguments\n }\n\n script.src = options.url.replace(/\\?(.+)=\\?/, '?$1=' + callbackName)\n document.head.appendChild(script)\n\n if (options.timeout > 0) abortTimeout = setTimeout(function(){\n abort('timeout')\n }, options.timeout)\n\n return xhr\n }\n\n $.ajaxSettings = {\n // Default type of request\n type: 'GET',\n // Callback that is executed before request\n beforeSend: empty,\n // Callback that is executed if the request succeeds\n success: empty,\n // Callback that is executed the the server drops error\n error: empty,\n // Callback that is executed on request complete (both: error and success)\n complete: empty,\n // The context for the callbacks\n context: null,\n // Whether to trigger \"global\" Ajax events\n global: true,\n // Transport\n xhr: function () {\n return new window.XMLHttpRequest()\n },\n // MIME types mapping\n // IIS returns Javascript as \"application/x-javascript\"\n accepts: {\n script: 'text/javascript, application/javascript, application/x-javascript',\n json: jsonType,\n xml: 'application/xml, text/xml',\n html: htmlType,\n text: 'text/plain'\n },\n // Whether the request is to another domain\n crossDomain: false,\n // Default timeout\n timeout: 0,\n // Whether data should be serialized to string\n processData: true,\n // Whether the browser should be allowed to cache GET responses\n cache: true,\n //Used to handle the raw response data of XMLHttpRequest.\n //This is a pre-filtering function to sanitize the response.\n //The sanitized response should be returned\n dataFilter: empty\n }\n\n function mimeToDataType(mime) {\n if (mime) mime = mime.split(';', 2)[0]\n return mime && ( mime == htmlType ? 'html' :\n mime == jsonType ? 'json' :\n scriptTypeRE.test(mime) ? 'script' :\n xmlTypeRE.test(mime) && 'xml' ) || 'text'\n }\n\n function appendQuery(url, query) {\n if (query == '') return url\n return (url + '&' + query).replace(/[&?]{1,2}/, '?')\n }\n\n // serialize payload and append it to the URL for GET requests\n function serializeData(options) {\n if (options.processData && options.data && $.type(options.data) != \"string\")\n options.data = $.param(options.data, options.traditional)\n if (options.data && (!options.type || options.type.toUpperCase() == 'GET' || 'jsonp' == options.dataType))\n options.url = appendQuery(options.url, options.data), options.data = undefined\n }\n\n $.ajax = function(options){\n var settings = $.extend({}, options || {}),\n deferred = $.Deferred && $.Deferred(),\n urlAnchor, hashIndex\n for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key]\n\n ajaxStart(settings)\n\n if (!settings.crossDomain) {\n urlAnchor = document.createElement('a')\n urlAnchor.href = settings.url\n // cleans up URL for .href (IE only), see https://github.com/madrobby/zepto/pull/1049\n urlAnchor.href = urlAnchor.href\n settings.crossDomain = (originAnchor.protocol + '//' + originAnchor.host) !== (urlAnchor.protocol + '//' + urlAnchor.host)\n }\n\n if (!settings.url) settings.url = window.location.toString()\n if ((hashIndex = settings.url.indexOf('#')) > -1) settings.url = settings.url.slice(0, hashIndex)\n serializeData(settings)\n\n var dataType = settings.dataType, hasPlaceholder = /\\?.+=\\?/.test(settings.url)\n if (hasPlaceholder) dataType = 'jsonp'\n\n if (settings.cache === false || (\n (!options || options.cache !== true) &&\n ('script' == dataType || 'jsonp' == dataType)\n ))\n settings.url = appendQuery(settings.url, '_=' + Date.now())\n\n if ('jsonp' == dataType) {\n if (!hasPlaceholder)\n settings.url = appendQuery(settings.url,\n settings.jsonp ? (settings.jsonp + '=?') : settings.jsonp === false ? '' : 'callback=?')\n return $.ajaxJSONP(settings, deferred)\n }\n\n var mime = settings.accepts[dataType],\n headers = { },\n setHeader = function(name, value) { headers[name.toLowerCase()] = [name, value] },\n protocol = /^([\\w-]+:)\\/\\//.test(settings.url) ? RegExp.$1 : window.location.protocol,\n xhr = settings.xhr(),\n nativeSetHeader = xhr.setRequestHeader,\n abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n if (!settings.crossDomain) setHeader('X-Requested-With', 'XMLHttpRequest')\n setHeader('Accept', mime || '*/*')\n if (mime = settings.mimeType || mime) {\n if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0]\n xhr.overrideMimeType && xhr.overrideMimeType(mime)\n }\n if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET'))\n setHeader('Content-Type', settings.contentType || 'application/x-www-form-urlencoded')\n\n if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name])\n xhr.setRequestHeader = setHeader\n\n xhr.onreadystatechange = function(){\n if (xhr.readyState == 4) {\n xhr.onreadystatechange = empty\n clearTimeout(abortTimeout)\n var result, error = false\n if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) {\n dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader('content-type'))\n\n if (xhr.responseType == 'arraybuffer' || xhr.responseType == 'blob')\n result = xhr.response\n else {\n result = xhr.responseText\n\n try {\n // http://perfectionkills.com/global-eval-what-are-the-options/\n // sanitize response accordingly if data filter callback provided\n result = ajaxDataFilter(result, dataType, settings)\n if (dataType == 'script') (1,eval)(result)\n else if (dataType == 'xml') result = xhr.responseXML\n else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result)\n } catch (e) { error = e }\n\n if (error) return ajaxError(error, 'parsererror', xhr, settings, deferred)\n }\n\n ajaxSuccess(result, xhr, settings, deferred)\n } else {\n ajaxError(xhr.statusText || null, xhr.status ? 'error' : 'abort', xhr, settings, deferred)\n }\n }\n }\n\n if (ajaxBeforeSend(xhr, settings) === false) {\n xhr.abort()\n ajaxError(null, 'abort', xhr, settings, deferred)\n return xhr\n }\n\n var async = 'async' in settings ? settings.async : true\n xhr.open(settings.type, settings.url, async, settings.username, settings.password)\n\n if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name]\n\n for (name in headers) nativeSetHeader.apply(xhr, headers[name])\n\n if (settings.timeout > 0) abortTimeout = setTimeout(function(){\n xhr.onreadystatechange = empty\n xhr.abort()\n ajaxError(null, 'timeout', xhr, settings, deferred)\n }, settings.timeout)\n\n // avoid sending empty string (#319)\n xhr.send(settings.data ? settings.data : null)\n return xhr\n }\n\n // handle optional data/success arguments\n function parseArguments(url, data, success, dataType) {\n if ($.isFunction(data)) dataType = success, success = data, data = undefined\n if (!$.isFunction(success)) dataType = success, success = undefined\n return {\n url: url\n , data: data\n , success: success\n , dataType: dataType\n }\n }\n\n $.get = function(/* url, data, success, dataType */){\n return $.ajax(parseArguments.apply(null, arguments))\n }\n\n $.post = function(/* url, data, success, dataType */){\n var options = parseArguments.apply(null, arguments)\n options.type = 'POST'\n return $.ajax(options)\n }\n\n $.getJSON = function(/* url, data, success */){\n var options = parseArguments.apply(null, arguments)\n options.dataType = 'json'\n return $.ajax(options)\n }\n\n $.fn.load = function(url, data, success){\n if (!this.length) return this\n var self = this, parts = url.split(/\\s/), selector,\n options = parseArguments(url, data, success),\n callback = options.success\n if (parts.length > 1) options.url = parts[0], selector = parts[1]\n options.success = function(response){\n self.html(selector ?\n $('
').html(response.replace(rscript, \"\")).find(selector)\n : response)\n callback && callback.apply(self, arguments)\n }\n $.ajax(options)\n return this\n }\n\n var escape = encodeURIComponent\n\n function serialize(params, obj, traditional, scope){\n var type, array = $.isArray(obj), hash = $.isPlainObject(obj)\n $.each(obj, function(key, value) {\n type = $.type(value)\n if (scope) key = traditional ? scope :\n scope + '[' + (hash || type == 'object' || type == 'array' ? key : '') + ']'\n // handle data in serializeArray() format\n if (!scope && array) params.add(value.name, value.value)\n // recurse into nested objects\n else if (type == \"array\" || (!traditional && type == \"object\"))\n serialize(params, value, traditional, key)\n else params.add(key, value)\n })\n }\n\n $.param = function(obj, traditional){\n var params = []\n params.add = function(key, value) {\n if ($.isFunction(value)) value = value()\n if (value == null) value = \"\"\n this.push(escape(key) + '=' + escape(value))\n }\n serialize(params, obj, traditional)\n return params.join('&').replace(/%20/g, '+')\n }\n})(Zepto)\n\n;(function($){\n $.fn.serializeArray = function() {\n var name, type, result = [],\n add = function(value) {\n if (value.forEach) return value.forEach(add)\n result.push({ name: name, value: value })\n }\n if (this[0]) $.each(this[0].elements, function(_, field){\n type = field.type, name = field.name\n if (name && field.nodeName.toLowerCase() != 'fieldset' &&\n !field.disabled && type != 'submit' && type != 'reset' && type != 'button' && type != 'file' &&\n ((type != 'radio' && type != 'checkbox') || field.checked))\n add($(field).val())\n })\n return result\n }\n\n $.fn.serialize = function(){\n var result = []\n this.serializeArray().forEach(function(elm){\n result.push(encodeURIComponent(elm.name) + '=' + encodeURIComponent(elm.value))\n })\n return result.join('&')\n }\n\n $.fn.submit = function(callback) {\n if (0 in arguments) this.bind('submit', callback)\n else if (this.length) {\n var event = $.Event('submit')\n this.eq(0).trigger(event)\n if (!event.isDefaultPrevented()) this.get(0).submit()\n }\n return this\n }\n\n})(Zepto)\n\n;(function(){\n // getComputedStyle shouldn't freak out when called\n // without a valid element as argument\n try {\n getComputedStyle(undefined)\n } catch(e) {\n var nativeGetComputedStyle = getComputedStyle\n window.getComputedStyle = function(element, pseudoElement){\n try {\n return nativeGetComputedStyle(element, pseudoElement)\n } catch(e) {\n return null\n }\n }\n }\n})()\n return Zepto\n}))\n\n}.call(window));","module.exports = global[\"moment\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\expose-loader\\\\index.js?dayjs!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\dayjs.min.js\");","module.exports = global[\"dayjs\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\dayjs.min.js\");","!function(t,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=n():\"function\"==typeof define&&define.amd?define(n):t.dayjs=n()}(this,function(){\"use strict\";var t=\"millisecond\",n=\"second\",e=\"minute\",r=\"hour\",i=\"day\",s=\"week\",u=\"month\",a=\"quarter\",o=\"year\",h=/^(\\d{4})-?(\\d{1,2})-?(\\d{0,2})[^0-9]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?.?(\\d{1,3})?$/,f=/\\[([^\\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,c=function(t,n,e){var r=String(t);return!r||r.length>=n?t:\"\"+Array(n+1-r.length).join(e)+t},d={s:c,z:function(t){var n=-t.utcOffset(),e=Math.abs(n),r=Math.floor(e/60),i=e%60;return(n<=0?\"+\":\"-\")+c(r,2,\"0\")+\":\"+c(i,2,\"0\")},m:function(t,n){var e=12*(n.year()-t.year())+(n.month()-t.month()),r=t.clone().add(e,u),i=n-r<0,s=t.clone().add(e+(i?-1:1),u);return Number(-(e+(n-r)/(i?r-s:s-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(h){return{M:u,y:o,w:s,d:i,h:r,m:e,s:n,ms:t,Q:a}[h]||String(h||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},$={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\")},l=\"en\",m={};m[l]=$;var y=function(t){return t instanceof v},M=function(t,n,e){var r;if(!t)return l;if(\"string\"==typeof t)m[t]&&(r=t),n&&(m[t]=n,r=t);else{var i=t.name;m[i]=t,r=i}return e||(l=r),r},g=function(t,n,e){if(y(t))return t.clone();var r=n?\"string\"==typeof n?{format:n,pl:e}:n:{};return r.date=t,new v(r)},D=d;D.l=M,D.i=y,D.w=function(t,n){return g(t,{locale:n.$L,utc:n.$u})};var v=function(){function c(t){this.$L=this.$L||M(t.locale,null,!0),this.parse(t)}var d=c.prototype;return d.parse=function(t){this.$d=function(t){var n=t.date,e=t.utc;if(null===n)return new Date(NaN);if(D.u(n))return new Date;if(n instanceof Date)return new Date(n);if(\"string\"==typeof n&&!/Z$/i.test(n)){var r=n.match(h);if(r)return e?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(n)}(t),this.init()},d.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},d.$utils=function(){return D},d.isValid=function(){return!(\"Invalid Date\"===this.$d.toString())},d.isSame=function(t,n){var e=g(t);return this.startOf(n)<=e&&e<=this.endOf(n)},d.isAfter=function(t,n){return g(t) element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function($window) {\n\tvar $doc = $window && $window.document\n\tvar currentRedraw\n\n\tvar nameSpace = {\n\t\tsvg: \"http://www.w3.org/2000/svg\",\n\t\tmath: \"http://www.w3.org/1998/Math/MathML\"\n\t}\n\n\tfunction getNameSpace(vnode) {\n\t\treturn vnode.attrs && vnode.attrs.xmlns || nameSpace[vnode.tag]\n\t}\n\n\t//sanity check to discourage people from doing `vnode.state = ...`\n\tfunction checkState(vnode, original) {\n\t\tif (vnode.state !== original) throw new Error(\"`vnode.state` must not be modified\")\n\t}\n\n\t//Note: the hook is passed as the `this` argument to allow proxying the\n\t//arguments without requiring a full array allocation to do so. It also\n\t//takes advantage of the fact the current `vnode` is the first argument in\n\t//all lifecycle methods.\n\tfunction callHook(vnode) {\n\t\tvar original = vnode.state\n\t\ttry {\n\t\t\treturn this.apply(original, arguments)\n\t\t} finally {\n\t\t\tcheckState(vnode, original)\n\t\t}\n\t}\n\n\t// IE11 (at least) throws an UnspecifiedError when accessing document.activeElement when\n\t// inside an iframe. Catch and swallow this error, and heavy-handidly return null.\n\tfunction activeElement() {\n\t\ttry {\n\t\t\treturn $doc.activeElement\n\t\t} catch (e) {\n\t\t\treturn null\n\t\t}\n\t}\n\t//create\n\tfunction createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) {\n\t\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t}\n\tfunction createNode(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tif (typeof tag === \"string\") {\n\t\t\tvnode.state = {}\n\t\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\t\tswitch (tag) {\n\t\t\t\tcase \"#\": createText(parent, vnode, nextSibling); break\n\t\t\t\tcase \"<\": createHTML(parent, vnode, ns, nextSibling); break\n\t\t\t\tcase \"[\": createFragment(parent, vnode, hooks, ns, nextSibling); break\n\t\t\t\tdefault: createElement(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t\telse createComponent(parent, vnode, hooks, ns, nextSibling)\n\t}\n\tfunction createText(parent, vnode, nextSibling) {\n\t\tvnode.dom = $doc.createTextNode(vnode.children)\n\t\tinsertNode(parent, vnode.dom, nextSibling)\n\t}\n\tvar possibleParents = {caption: \"table\", thead: \"table\", tbody: \"table\", tfoot: \"table\", tr: \"tbody\", th: \"tr\", td: \"tr\", colgroup: \"table\", col: \"colgroup\"}\n\tfunction createHTML(parent, vnode, ns, nextSibling) {\n\t\tvar match = vnode.children.match(/^\\s*?<(\\w+)/im) || []\n\t\t// not using the proper parent makes the child element(s) vanish.\n\t\t// var div = document.createElement(\"div\")\n\t\t// div.innerHTML = \"ij\"\n\t\t// console.log(div.innerHTML)\n\t\t// --> \"ij\", no in sight.\n\t\tvar temp = $doc.createElement(possibleParents[match[1]] || \"div\")\n\t\tif (ns === \"http://www.w3.org/2000/svg\") {\n\t\t\ttemp.innerHTML = \"\" + vnode.children + \"\"\n\t\t\ttemp = temp.firstChild\n\t\t} else {\n\t\t\ttemp.innerHTML = vnode.children\n\t\t}\n\t\tvnode.dom = temp.firstChild\n\t\tvnode.domSize = temp.childNodes.length\n\t\t// Capture nodes to remove, so we don't confuse them.\n\t\tvnode.instance = []\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tvar child\n\t\twhile (child = temp.firstChild) {\n\t\t\tvnode.instance.push(child)\n\t\t\tfragment.appendChild(child)\n\t\t}\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createFragment(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tif (vnode.children != null) {\n\t\t\tvar children = vnode.children\n\t\t\tcreateNodes(fragment, children, 0, children.length, hooks, null, ns)\n\t\t}\n\t\tvnode.dom = fragment.firstChild\n\t\tvnode.domSize = fragment.childNodes.length\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createElement(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tvar attrs = vnode.attrs\n\t\tvar is = attrs && attrs.is\n\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tvar element = ns ?\n\t\t\tis ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :\n\t\t\tis ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)\n\t\tvnode.dom = element\n\n\t\tif (attrs != null) {\n\t\t\tsetAttrs(vnode, attrs, ns)\n\t\t}\n\n\t\tinsertNode(parent, element, nextSibling)\n\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (vnode.text != null) {\n\t\t\t\tif (vnode.text !== \"\") element.textContent = vnode.text\n\t\t\t\telse vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t}\n\t\t\tif (vnode.children != null) {\n\t\t\t\tvar children = vnode.children\n\t\t\t\tcreateNodes(element, children, 0, children.length, hooks, null, ns)\n\t\t\t\tif (vnode.tag === \"select\" && attrs != null) setLateSelectAttrs(vnode, attrs)\n\t\t\t}\n\t\t}\n\t}\n\tfunction initComponent(vnode, hooks) {\n\t\tvar sentinel\n\t\tif (typeof vnode.tag.view === \"function\") {\n\t\t\tvnode.state = Object.create(vnode.tag)\n\t\t\tsentinel = vnode.state.view\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t} else {\n\t\t\tvnode.state = void 0\n\t\t\tsentinel = vnode.tag\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t\tvnode.state = (vnode.tag.prototype != null && typeof vnode.tag.prototype.view === \"function\") ? new vnode.tag(vnode) : vnode.tag(vnode)\n\t\t}\n\t\tinitLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tsentinel.$$reentrantLock$$ = null\n\t}\n\tfunction createComponent(parent, vnode, hooks, ns, nextSibling) {\n\t\tinitComponent(vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tcreateNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0\n\t\t}\n\t\telse {\n\t\t\tvnode.domSize = 0\n\t\t}\n\t}\n\n\t//update\n\t/**\n\t * @param {Element|Fragment} parent - the parent element\n\t * @param {Vnode[] | null} old - the list of vnodes of the last `render()` call for\n\t * this part of the tree\n\t * @param {Vnode[] | null} vnodes - as above, but for the current `render()` call.\n\t * @param {Function[]} hooks - an accumulator of post-render hooks (oncreate/onupdate)\n\t * @param {Element | null} nextSibling - the next DOM node if we're dealing with a\n\t * fragment that is not the last item in its\n\t * parent\n\t * @param {'svg' | 'math' | String | null} ns) - the current XML namespace, if any\n\t * @returns void\n\t */\n\t// This function diffs and patches lists of vnodes, both keyed and unkeyed.\n\t//\n\t// We will:\n\t//\n\t// 1. describe its general structure\n\t// 2. focus on the diff algorithm optimizations\n\t// 3. discuss DOM node operations.\n\n\t// ## Overview:\n\t//\n\t// The updateNodes() function:\n\t// - deals with trivial cases\n\t// - determines whether the lists are keyed or unkeyed based on the first non-null node\n\t// of each list.\n\t// - diffs them and patches the DOM if needed (that's the brunt of the code)\n\t// - manages the leftovers: after diffing, are there:\n\t// - old nodes left to remove?\n\t// \t - new nodes to insert?\n\t// \t deal with them!\n\t//\n\t// The lists are only iterated over once, with an exception for the nodes in `old` that\n\t// are visited in the fourth part of the diff and in the `removeNodes` loop.\n\n\t// ## Diffing\n\t//\n\t// Reading https://github.com/localvoid/ivi/blob/ddc09d06abaef45248e6133f7040d00d3c6be853/packages/ivi/src/vdom/implementation.ts#L617-L837\n\t// may be good for context on longest increasing subsequence-based logic for moving nodes.\n\t//\n\t// In order to diff keyed lists, one has to\n\t//\n\t// 1) match nodes in both lists, per key, and update them accordingly\n\t// 2) create the nodes present in the new list, but absent in the old one\n\t// 3) remove the nodes present in the old list, but absent in the new one\n\t// 4) figure out what nodes in 1) to move in order to minimize the DOM operations.\n\t//\n\t// To achieve 1) one can create a dictionary of keys => index (for the old list), then iterate\n\t// over the new list and for each new vnode, find the corresponding vnode in the old list using\n\t// the map.\n\t// 2) is achieved in the same step: if a new node has no corresponding entry in the map, it is new\n\t// and must be created.\n\t// For the removals, we actually remove the nodes that have been updated from the old list.\n\t// The nodes that remain in that list after 1) and 2) have been performed can be safely removed.\n\t// The fourth step is a bit more complex and relies on the longest increasing subsequence (LIS)\n\t// algorithm.\n\t//\n\t// the longest increasing subsequence is the list of nodes that can remain in place. Imagine going\n\t// from `1,2,3,4,5` to `4,5,1,2,3` where the numbers are not necessarily the keys, but the indices\n\t// corresponding to the keyed nodes in the old list (keyed nodes `e,d,c,b,a` => `b,a,e,d,c` would\n\t// match the above lists, for example).\n\t//\n\t// In there are two increasing subsequences: `4,5` and `1,2,3`, the latter being the longest. We\n\t// can update those nodes without moving them, and only call `insertNode` on `4` and `5`.\n\t//\n\t// @localvoid adapted the algo to also support node deletions and insertions (the `lis` is actually\n\t// the longest increasing subsequence *of old nodes still present in the new list*).\n\t//\n\t// It is a general algorithm that is fireproof in all circumstances, but it requires the allocation\n\t// and the construction of a `key => oldIndex` map, and three arrays (one with `newIndex => oldIndex`,\n\t// the `LIS` and a temporary one to create the LIS).\n\t//\n\t// So we cheat where we can: if the tails of the lists are identical, they are guaranteed to be part of\n\t// the LIS and can be updated without moving them.\n\t//\n\t// If two nodes are swapped, they are guaranteed not to be part of the LIS, and must be moved (with\n\t// the exception of the last node if the list is fully reversed).\n\t//\n\t// ## Finding the next sibling.\n\t//\n\t// `updateNode()` and `createNode()` expect a nextSibling parameter to perform DOM operations.\n\t// When the list is being traversed top-down, at any index, the DOM nodes up to the previous\n\t// vnode reflect the content of the new list, whereas the rest of the DOM nodes reflect the old\n\t// list. The next sibling must be looked for in the old list using `getNextSibling(... oldStart + 1 ...)`.\n\t//\n\t// In the other scenarios (swaps, upwards traversal, map-based diff),\n\t// the new vnodes list is traversed upwards. The DOM nodes at the bottom of the list reflect the\n\t// bottom part of the new vnodes list, and we can use the `v.dom` value of the previous node\n\t// as the next sibling (cached in the `nextSibling` variable).\n\n\n\t// ## DOM node moves\n\t//\n\t// In most scenarios `updateNode()` and `createNode()` perform the DOM operations. However,\n\t// this is not the case if the node moved (second and fourth part of the diff algo). We move\n\t// the old DOM nodes before updateNode runs because it enables us to use the cached `nextSibling`\n\t// variable rather than fetching it using `getNextSibling()`.\n\t//\n\t// The fourth part of the diff currently inserts nodes unconditionally, leading to issues\n\t// like #1791 and #1999. We need to be smarter about those situations where adjascent old\n\t// nodes remain together in the new list in a way that isn't covered by parts one and\n\t// three of the diff algo.\n\n\tfunction updateNodes(parent, old, vnodes, hooks, nextSibling, ns) {\n\t\tif (old === vnodes || old == null && vnodes == null) return\n\t\telse if (old == null || old.length === 0) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, ns)\n\t\telse if (vnodes == null || vnodes.length === 0) removeNodes(parent, old, 0, old.length)\n\t\telse {\n\t\t\tvar isOldKeyed = old[0] != null && old[0].key != null\n\t\t\tvar isKeyed = vnodes[0] != null && vnodes[0].key != null\n\t\t\tvar start = 0, oldStart = 0\n\t\t\tif (!isOldKeyed) while (oldStart < old.length && old[oldStart] == null) oldStart++\n\t\t\tif (!isKeyed) while (start < vnodes.length && vnodes[start] == null) start++\n\t\t\tif (isKeyed === null && isOldKeyed == null) return // both lists are full of nulls\n\t\t\tif (isOldKeyed !== isKeyed) {\n\t\t\t\tremoveNodes(parent, old, oldStart, old.length)\n\t\t\t\tcreateNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else if (!isKeyed) {\n\t\t\t\t// Don't index past the end of either list (causes deopts).\n\t\t\t\tvar commonLength = old.length < vnodes.length ? old.length : vnodes.length\n\t\t\t\t// Rewind if necessary to the first non-null index on either side.\n\t\t\t\t// We could alternatively either explicitly create or remove nodes when `start !== oldStart`\n\t\t\t\t// but that would be optimizing for sparse lists which are more rare than dense ones.\n\t\t\t\tstart = start < oldStart ? start : oldStart\n\t\t\t\tfor (; start < commonLength; start++) {\n\t\t\t\t\to = old[start]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o === v || o == null && v == null) continue\n\t\t\t\t\telse if (o == null) createNode(parent, v, hooks, ns, getNextSibling(old, start + 1, nextSibling))\n\t\t\t\t\telse if (v == null) removeNode(parent, o)\n\t\t\t\t\telse updateNode(parent, o, v, hooks, getNextSibling(old, start + 1, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\tif (old.length > commonLength) removeNodes(parent, old, start, old.length)\n\t\t\t\tif (vnodes.length > commonLength) createNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else {\n\t\t\t\t// keyed diff\n\t\t\t\tvar oldEnd = old.length - 1, end = vnodes.length - 1, map, o, v, oe, ve, topSibling\n\n\t\t\t\t// bottom-up\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t}\n\t\t\t\t// top-down\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o.key !== v.key) break\n\t\t\t\t\toldStart++, start++\n\t\t\t\t\tif (o !== v) updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\t// swaps and list reversals\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (start === end) break\n\t\t\t\t\tif (o.key !== ve.key || oe.key !== v.key) break\n\t\t\t\t\ttopSibling = getNextSibling(old, oldStart, nextSibling)\n\t\t\t\t\tmoveNodes(parent, oe, topSibling)\n\t\t\t\t\tif (oe !== v) updateNode(parent, oe, v, hooks, topSibling, ns)\n\t\t\t\t\tif (++start <= --end) moveNodes(parent, o, nextSibling)\n\t\t\t\t\tif (o !== ve) updateNode(parent, o, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldStart++; oldEnd--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t}\n\t\t\t\t// bottom up once again\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t}\n\t\t\t\tif (start > end) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\telse if (oldStart > oldEnd) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\telse {\n\t\t\t\t\t// inspired by ivi https://github.com/ivijs/ivi/ by Boris Kaul\n\t\t\t\t\tvar originalNextSibling = nextSibling, vnodesLength = end - start + 1, oldIndices = new Array(vnodesLength), li=0, i=0, pos = 2147483647, matched = 0, map, lisIndices\n\t\t\t\t\tfor (i = 0; i < vnodesLength; i++) oldIndices[i] = -1\n\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\tif (map == null) map = getKeyMap(old, oldStart, oldEnd + 1)\n\t\t\t\t\t\tve = vnodes[i]\n\t\t\t\t\t\tvar oldIndex = map[ve.key]\n\t\t\t\t\t\tif (oldIndex != null) {\n\t\t\t\t\t\t\tpos = (oldIndex < pos) ? oldIndex : -1 // becomes -1 if nodes were re-ordered\n\t\t\t\t\t\t\toldIndices[i-start] = oldIndex\n\t\t\t\t\t\t\toe = old[oldIndex]\n\t\t\t\t\t\t\told[oldIndex] = null\n\t\t\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\t\t\tmatched++\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnextSibling = originalNextSibling\n\t\t\t\t\tif (matched !== oldEnd - oldStart + 1) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\t\tif (matched === 0) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (pos === -1) {\n\t\t\t\t\t\t\t// the indices of the indices of the items that are part of the\n\t\t\t\t\t\t\t// longest increasing subsequence in the oldIndices list\n\t\t\t\t\t\t\tlisIndices = makeLisIndices(oldIndices)\n\t\t\t\t\t\t\tli = lisIndices.length - 1\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tif (lisIndices[li] === i - start) li--\n\t\t\t\t\t\t\t\t\telse moveNodes(parent, v, nextSibling)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateNode(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvar oldTag = old.tag, tag = vnode.tag\n\t\tif (oldTag === tag) {\n\t\t\tvnode.state = old.state\n\t\t\tvnode.events = old.events\n\t\t\tif (shouldNotUpdate(vnode, old)) return\n\t\t\tif (typeof oldTag === \"string\") {\n\t\t\t\tif (vnode.attrs != null) {\n\t\t\t\t\tupdateLifecycle(vnode.attrs, vnode, hooks)\n\t\t\t\t}\n\t\t\t\tswitch (oldTag) {\n\t\t\t\t\tcase \"#\": updateText(old, vnode); break\n\t\t\t\t\tcase \"<\": updateHTML(parent, old, vnode, ns, nextSibling); break\n\t\t\t\t\tcase \"[\": updateFragment(parent, old, vnode, hooks, nextSibling, ns); break\n\t\t\t\t\tdefault: updateElement(old, vnode, hooks, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t\telse updateComponent(parent, old, vnode, hooks, nextSibling, ns)\n\t\t}\n\t\telse {\n\t\t\tremoveNode(parent, old)\n\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t}\n\t}\n\tfunction updateText(old, vnode) {\n\t\tif (old.children.toString() !== vnode.children.toString()) {\n\t\t\told.dom.nodeValue = vnode.children\n\t\t}\n\t\tvnode.dom = old.dom\n\t}\n\tfunction updateHTML(parent, old, vnode, ns, nextSibling) {\n\t\tif (old.children !== vnode.children) {\n\t\t\tremoveHTML(parent, old)\n\t\t\tcreateHTML(parent, vnode, ns, nextSibling)\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t\tvnode.instance = old.instance\n\t\t}\n\t}\n\tfunction updateFragment(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tupdateNodes(parent, old.children, vnode.children, hooks, nextSibling, ns)\n\t\tvar domSize = 0, children = vnode.children\n\t\tvnode.dom = null\n\t\tif (children != null) {\n\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\tvar child = children[i]\n\t\t\t\tif (child != null && child.dom != null) {\n\t\t\t\t\tif (vnode.dom == null) vnode.dom = child.dom\n\t\t\t\t\tdomSize += child.domSize || 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (domSize !== 1) vnode.domSize = domSize\n\t\t}\n\t}\n\tfunction updateElement(old, vnode, hooks, ns) {\n\t\tvar element = vnode.dom = old.dom\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tif (vnode.tag === \"textarea\") {\n\t\t\tif (vnode.attrs == null) vnode.attrs = {}\n\t\t\tif (vnode.text != null) {\n\t\t\t\tvnode.attrs.value = vnode.text //FIXME handle multiple children\n\t\t\t\tvnode.text = undefined\n\t\t\t}\n\t\t}\n\t\tupdateAttrs(vnode, old.attrs, vnode.attrs, ns)\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (old.text != null && vnode.text != null && vnode.text !== \"\") {\n\t\t\t\tif (old.text.toString() !== vnode.text.toString()) old.dom.firstChild.nodeValue = vnode.text\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (old.text != null) old.children = [Vnode(\"#\", undefined, undefined, old.text, undefined, old.dom.firstChild)]\n\t\t\t\tif (vnode.text != null) vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t\tupdateNodes(element, old.children, vnode.children, hooks, null, ns)\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateComponent(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tupdateLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) updateLifecycle(vnode.attrs, vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tif (old.instance == null) createNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\telse updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, ns)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.instance.domSize\n\t\t}\n\t\telse if (old.instance != null) {\n\t\t\tremoveNode(parent, old.instance)\n\t\t\tvnode.dom = undefined\n\t\t\tvnode.domSize = 0\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t}\n\t}\n\tfunction getKeyMap(vnodes, start, end) {\n\t\tvar map = Object.create(null)\n\t\tfor (; start < end; start++) {\n\t\t\tvar vnode = vnodes[start]\n\t\t\tif (vnode != null) {\n\t\t\t\tvar key = vnode.key\n\t\t\t\tif (key != null) map[key] = start\n\t\t\t}\n\t\t}\n\t\treturn map\n\t}\n\t// Lifted from ivi https://github.com/ivijs/ivi/\n\t// takes a list of unique numbers (-1 is special and can\n\t// occur multiple times) and returns an array with the indices\n\t// of the items that are part of the longest increasing\n\t// subsequece\n\tvar lisTemp = []\n\tfunction makeLisIndices(a) {\n\t\tvar result = [0]\n\t\tvar u = 0, v = 0, i = 0\n\t\tvar il = lisTemp.length = a.length\n\t\tfor (var i = 0; i < il; i++) lisTemp[i] = a[i]\n\t\tfor (var i = 0; i < il; ++i) {\n\t\t\tif (a[i] === -1) continue\n\t\t\tvar j = result[result.length - 1]\n\t\t\tif (a[j] < a[i]) {\n\t\t\t\tlisTemp[i] = j\n\t\t\t\tresult.push(i)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tu = 0\n\t\t\tv = result.length - 1\n\t\t\twhile (u < v) {\n\t\t\t\t// Fast integer average without overflow.\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tvar c = (u >>> 1) + (v >>> 1) + (u & v & 1)\n\t\t\t\tif (a[result[c]] < a[i]) {\n\t\t\t\t\tu = c + 1\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tv = c\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (a[i] < a[result[u]]) {\n\t\t\t\tif (u > 0) lisTemp[i] = result[u - 1]\n\t\t\t\tresult[u] = i\n\t\t\t}\n\t\t}\n\t\tu = result.length\n\t\tv = result[u - 1]\n\t\twhile (u-- > 0) {\n\t\t\tresult[u] = v\n\t\t\tv = lisTemp[v]\n\t\t}\n\t\tlisTemp.length = 0\n\t\treturn result\n\t}\n\n\tfunction getNextSibling(vnodes, i, nextSibling) {\n\t\tfor (; i < vnodes.length; i++) {\n\t\t\tif (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom\n\t\t}\n\t\treturn nextSibling\n\t}\n\n\t// This covers a really specific edge case:\n\t// - Parent node is keyed and contains child\n\t// - Child is removed, returns unresolved promise in `onbeforeremove`\n\t// - Parent node is moved in keyed diff\n\t// - Remaining children still need moved appropriately\n\t//\n\t// Ideally, I'd track removed nodes as well, but that introduces a lot more\n\t// complexity and I'm not exactly interested in doing that.\n\tfunction moveNodes(parent, vnode, nextSibling) {\n\t\tvar frag = $doc.createDocumentFragment()\n\t\tmoveChildToFrag(parent, frag, vnode)\n\t\tinsertNode(parent, frag, nextSibling)\n\t}\n\tfunction moveChildToFrag(parent, frag, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\t\t\tfrag.appendChild(vnode.instance[i])\n\t\t\t\t}\n\t\t\t} else if (vnode.tag !== \"[\") {\n\t\t\t\t// Don't recurse for text nodes *or* elements, just fragments\n\t\t\t\tfrag.appendChild(vnode.dom)\n\t\t\t} else if (vnode.children.length === 1) {\n\t\t\t\tvnode = vnode.children[0]\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else {\n\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\tif (child != null) moveChildToFrag(parent, frag, child)\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\n\tfunction insertNode(parent, dom, nextSibling) {\n\t\tif (nextSibling != null) parent.insertBefore(dom, nextSibling)\n\t\telse parent.appendChild(dom)\n\t}\n\n\tfunction maybeSetContentEditable(vnode) {\n\t\tif (vnode.attrs == null || (\n\t\t\tvnode.attrs.contenteditable == null && // attribute\n\t\t\tvnode.attrs.contentEditable == null // property\n\t\t)) return false\n\t\tvar children = vnode.children\n\t\tif (children != null && children.length === 1 && children[0].tag === \"<\") {\n\t\t\tvar content = children[0].children\n\t\t\tif (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content\n\t\t}\n\t\telse if (vnode.text != null || children != null && children.length !== 0) throw new Error(\"Child node of a contenteditable must be trusted\")\n\t\treturn true\n\t}\n\n\t//remove\n\tfunction removeNodes(parent, vnodes, start, end) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) removeNode(parent, vnode)\n\t\t}\n\t}\n\tfunction removeNode(parent, vnode) {\n\t\tvar mask = 0\n\t\tvar original = vnode.state\n\t\tvar stateResult, attrsResult\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.state.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\tmask = 1\n\t\t\t\tstateResult = result\n\t\t\t}\n\t\t}\n\t\tif (vnode.attrs && typeof vnode.attrs.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.attrs.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tmask |= 2\n\t\t\t\tattrsResult = result\n\t\t\t}\n\t\t}\n\t\tcheckState(vnode, original)\n\n\t\t// If we can, try to fast-path it and avoid all the overhead of awaiting\n\t\tif (!mask) {\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t} else {\n\t\t\tif (stateResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 1) { mask &= 2; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tstateResult.then(next, next)\n\t\t\t}\n\t\t\tif (attrsResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 2) { mask &= 1; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tattrsResult.then(next, next)\n\t\t\t}\n\t\t}\n\n\t\tfunction reallyRemove() {\n\t\t\tcheckState(vnode, original)\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t}\n\t}\n\tfunction removeHTML(parent, vnode) {\n\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\tparent.removeChild(vnode.instance[i])\n\t\t}\n\t}\n\tfunction removeChild(parent, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tremoveHTML(parent, vnode)\n\t\t\t} else {\n\t\t\t\tif (vnode.tag !== \"[\") {\n\t\t\t\t\tparent.removeChild(vnode.dom)\n\t\t\t\t\tif (!Array.isArray(vnode.children)) break\n\t\t\t\t}\n\t\t\t\tif (vnode.children.length === 1) {\n\t\t\t\t\tvnode = vnode.children[0]\n\t\t\t\t\tif (vnode != null) continue\n\t\t\t\t} else {\n\t\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\t\tif (child != null) removeChild(parent, child)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\tfunction onremove(vnode) {\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onremove === \"function\") callHook.call(vnode.state.onremove, vnode)\n\t\tif (vnode.attrs && typeof vnode.attrs.onremove === \"function\") callHook.call(vnode.attrs.onremove, vnode)\n\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\tif (vnode.instance != null) onremove(vnode.instance)\n\t\t} else {\n\t\t\tvar children = vnode.children\n\t\t\tif (Array.isArray(children)) {\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\tvar child = children[i]\n\t\t\t\t\tif (child != null) onremove(child)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t//attrs\n\tfunction setAttrs(vnode, attrs, ns) {\n\t\tfor (var key in attrs) {\n\t\t\tsetAttr(vnode, key, null, attrs[key], ns)\n\t\t}\n\t}\n\tfunction setAttr(vnode, key, old, value, ns) {\n\t\tif (key === \"key\" || key === \"is\" || value == null || isLifecycleMethod(key) || (old === value && !isFormAttribute(vnode, key)) && typeof value !== \"object\") return\n\t\tif (key[0] === \"o\" && key[1] === \"n\") return updateEvent(vnode, key, value)\n\t\tif (key.slice(0, 6) === \"xlink:\") vnode.dom.setAttributeNS(\"http://www.w3.org/1999/xlink\", key.slice(6), value)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, value)\n\t\telse if (hasPropertyKey(vnode, key, ns)) {\n\t\t\tif (key === \"value\") {\n\t\t\t\t// Only do the coercion if we're actually going to check the value.\n\t\t\t\t/* eslint-disable no-implicit-coercion */\n\t\t\t\t//setting input[value] to same value by typing on focused element moves cursor to end in Chrome\n\t\t\t\tif ((vnode.tag === \"input\" || vnode.tag === \"textarea\") && vnode.dom.value === \"\" + value && vnode.dom === activeElement()) return\n\t\t\t\t//setting select[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"select\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t//setting option[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"option\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t/* eslint-enable no-implicit-coercion */\n\t\t\t}\n\t\t\t// If you assign an input type that is not supported by IE 11 with an assignment expression, an error will occur.\n\t\t\tif (vnode.tag === \"input\" && key === \"type\") vnode.dom.setAttribute(key, value)\n\t\t\telse vnode.dom[key] = value\n\t\t} else {\n\t\t\tif (typeof value === \"boolean\") {\n\t\t\t\tif (value) vnode.dom.setAttribute(key, \"\")\n\t\t\t\telse vnode.dom.removeAttribute(key)\n\t\t\t}\n\t\t\telse vnode.dom.setAttribute(key === \"className\" ? \"class\" : key, value)\n\t\t}\n\t}\n\tfunction removeAttr(vnode, key, old, ns) {\n\t\tif (key === \"key\" || key === \"is\" || old == null || isLifecycleMethod(key)) return\n\t\tif (key[0] === \"o\" && key[1] === \"n\" && !isLifecycleMethod(key)) updateEvent(vnode, key, undefined)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, null)\n\t\telse if (\n\t\t\thasPropertyKey(vnode, key, ns)\n\t\t\t&& key !== \"className\"\n\t\t\t&& !(key === \"value\" && (\n\t\t\t\tvnode.tag === \"option\"\n\t\t\t\t|| vnode.tag === \"select\" && vnode.dom.selectedIndex === -1 && vnode.dom === activeElement()\n\t\t\t))\n\t\t\t&& !(vnode.tag === \"input\" && key === \"type\")\n\t\t) {\n\t\t\tvnode.dom[key] = null\n\t\t} else {\n\t\t\tvar nsLastIndex = key.indexOf(\":\")\n\t\t\tif (nsLastIndex !== -1) key = key.slice(nsLastIndex + 1)\n\t\t\tif (old !== false) vnode.dom.removeAttribute(key === \"className\" ? \"class\" : key)\n\t\t}\n\t}\n\tfunction setLateSelectAttrs(vnode, attrs) {\n\t\tif (\"value\" in attrs) {\n\t\t\tif(attrs.value === null) {\n\t\t\t\tif (vnode.dom.selectedIndex !== -1) vnode.dom.value = null\n\t\t\t} else {\n\t\t\t\tvar normalized = \"\" + attrs.value // eslint-disable-line no-implicit-coercion\n\t\t\t\tif (vnode.dom.value !== normalized || vnode.dom.selectedIndex === -1) {\n\t\t\t\t\tvnode.dom.value = normalized\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (\"selectedIndex\" in attrs) setAttr(vnode, \"selectedIndex\", null, attrs.selectedIndex, undefined)\n\t}\n\tfunction updateAttrs(vnode, old, attrs, ns) {\n\t\tif (attrs != null) {\n\t\t\tfor (var key in attrs) {\n\t\t\t\tsetAttr(vnode, key, old && old[key], attrs[key], ns)\n\t\t\t}\n\t\t}\n\t\tvar val\n\t\tif (old != null) {\n\t\t\tfor (var key in old) {\n\t\t\t\tif (((val = old[key]) != null) && (attrs == null || attrs[key] == null)) {\n\t\t\t\t\tremoveAttr(vnode, key, val, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction isFormAttribute(vnode, attr) {\n\t\treturn attr === \"value\" || attr === \"checked\" || attr === \"selectedIndex\" || attr === \"selected\" && vnode.dom === activeElement() || vnode.tag === \"option\" && vnode.dom.parentNode === $doc.activeElement\n\t}\n\tfunction isLifecycleMethod(attr) {\n\t\treturn attr === \"oninit\" || attr === \"oncreate\" || attr === \"onupdate\" || attr === \"onremove\" || attr === \"onbeforeremove\" || attr === \"onbeforeupdate\"\n\t}\n\tfunction hasPropertyKey(vnode, key, ns) {\n\t\t// Filter out namespaced keys\n\t\treturn ns === undefined && (\n\t\t\t// If it's a custom element, just keep it.\n\t\t\tvnode.tag.indexOf(\"-\") > -1 || vnode.attrs != null && vnode.attrs.is ||\n\t\t\t// If it's a normal element, let's try to avoid a few browser bugs.\n\t\t\tkey !== \"href\" && key !== \"list\" && key !== \"form\" && key !== \"width\" && key !== \"height\"// && key !== \"type\"\n\t\t\t// Defer the property check until *after* we check everything.\n\t\t) && key in vnode.dom\n\t}\n\n\t//style\n\tvar uppercaseRegex = /[A-Z]/g\n\tfunction toLowerCase(capital) { return \"-\" + capital.toLowerCase() }\n\tfunction normalizeKey(key) {\n\t\treturn key[0] === \"-\" && key[1] === \"-\" ? key :\n\t\t\tkey === \"cssFloat\" ? \"float\" :\n\t\t\t\tkey.replace(uppercaseRegex, toLowerCase)\n\t}\n\tfunction updateStyle(element, old, style) {\n\t\tif (old === style) {\n\t\t\t// Styles are equivalent, do nothing.\n\t\t} else if (style == null) {\n\t\t\t// New style is missing, just clear it.\n\t\t\telement.style.cssText = \"\"\n\t\t} else if (typeof style !== \"object\") {\n\t\t\t// New style is a string, let engine deal with patching.\n\t\t\telement.style.cssText = style\n\t\t} else if (old == null || typeof old !== \"object\") {\n\t\t\t// `old` is missing or a string, `style` is an object.\n\t\t\telement.style.cssText = \"\"\n\t\t\t// Add new style properties\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null) element.style.setProperty(normalizeKey(key), String(value))\n\t\t\t}\n\t\t} else {\n\t\t\t// Both old & new are (different) objects.\n\t\t\t// Update style properties that have changed\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null && (value = String(value)) !== String(old[key])) {\n\t\t\t\t\telement.style.setProperty(normalizeKey(key), value)\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Remove style properties that no longer exist\n\t\t\tfor (var key in old) {\n\t\t\t\tif (old[key] != null && style[key] == null) {\n\t\t\t\t\telement.style.removeProperty(normalizeKey(key))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Here's an explanation of how this works:\n\t// 1. The event names are always (by design) prefixed by `on`.\n\t// 2. The EventListener interface accepts either a function or an object\n\t// with a `handleEvent` method.\n\t// 3. The object does not inherit from `Object.prototype`, to avoid\n\t// any potential interference with that (e.g. setters).\n\t// 4. The event name is remapped to the handler before calling it.\n\t// 5. In function-based event handlers, `ev.target === this`. We replicate\n\t// that below.\n\t// 6. In function-based event handlers, `return false` prevents the default\n\t// action and stops event propagation. We replicate that below.\n\tfunction EventDict() {\n\t\t// Save this, so the current redraw is correctly tracked.\n\t\tthis._ = currentRedraw\n\t}\n\tEventDict.prototype = Object.create(null)\n\tEventDict.prototype.handleEvent = function (ev) {\n\t\tvar handler = this[\"on\" + ev.type]\n\t\tvar result\n\t\tif (typeof handler === \"function\") result = handler.call(ev.currentTarget, ev)\n\t\telse if (typeof handler.handleEvent === \"function\") handler.handleEvent(ev)\n\t\tif (this._ && ev.redraw !== false) (0, this._)()\n\t\tif (result === false) {\n\t\t\tev.preventDefault()\n\t\t\tev.stopPropagation()\n\t\t}\n\t}\n\n\t//event\n\tfunction updateEvent(vnode, key, value) {\n\t\tif (vnode.events != null) {\n\t\t\tif (vnode.events[key] === value) return\n\t\t\tif (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\t\tif (vnode.events[key] == null) vnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = value\n\t\t\t} else {\n\t\t\t\tif (vnode.events[key] != null) vnode.dom.removeEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = undefined\n\t\t\t}\n\t\t} else if (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\tvnode.events = new EventDict()\n\t\t\tvnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\tvnode.events[key] = value\n\t\t}\n\t}\n\n\t//lifecycle\n\tfunction initLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.oninit === \"function\") callHook.call(source.oninit, vnode)\n\t\tif (typeof source.oncreate === \"function\") hooks.push(callHook.bind(source.oncreate, vnode))\n\t}\n\tfunction updateLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.onupdate === \"function\") hooks.push(callHook.bind(source.onupdate, vnode))\n\t}\n\tfunction shouldNotUpdate(vnode, old) {\n\t\tdo {\n\t\t\tif (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.attrs.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.state.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\treturn false\n\t\t} while (false); // eslint-disable-line no-constant-condition\n\t\tvnode.dom = old.dom\n\t\tvnode.domSize = old.domSize\n\t\tvnode.instance = old.instance\n\t\t// One would think having the actual latest attributes would be ideal,\n\t\t// but it doesn't let us properly diff based on our current internal\n\t\t// representation. We have to save not only the old DOM info, but also\n\t\t// the attributes used to create it, as we diff *that*, not against the\n\t\t// DOM directly (with a few exceptions in `setAttr`). And, of course, we\n\t\t// need to save the children and text as they are conceptually not\n\t\t// unlike special \"attributes\" internally.\n\t\tvnode.attrs = old.attrs\n\t\tvnode.children = old.children\n\t\tvnode.text = old.text\n\t\treturn true\n\t}\n\n\treturn function(dom, vnodes, redraw) {\n\t\tif (!dom) throw new TypeError(\"Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.\")\n\t\tvar hooks = []\n\t\tvar active = activeElement()\n\t\tvar namespace = dom.namespaceURI\n\n\t\t// First time rendering into a node clears it out\n\t\tif (dom.vnodes == null) dom.textContent = \"\"\n\n\t\tvnodes = Vnode.normalizeChildren(Array.isArray(vnodes) ? vnodes : [vnodes])\n\t\tvar prevRedraw = currentRedraw\n\t\ttry {\n\t\t\tcurrentRedraw = typeof redraw === \"function\" ? redraw : undefined\n\t\t\tupdateNodes(dom, dom.vnodes, vnodes, hooks, null, namespace === \"http://www.w3.org/1999/xhtml\" ? undefined : namespace)\n\t\t} finally {\n\t\t\tcurrentRedraw = prevRedraw\n\t\t}\n\t\tdom.vnodes = vnodes\n\t\t// `document.activeElement` can return null: https://html.spec.whatwg.org/multipage/interaction.html#dom-document-activeelement\n\t\tif (active != null && activeElement() !== active && typeof active.focus === \"function\") active.focus()\n\t\tfor (var i = 0; i < hooks.length; i++) hooks[i]()\n\t}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(render, schedule, console) {\n\tvar subscriptions = []\n\tvar rendering = false\n\tvar pending = false\n\n\tfunction sync() {\n\t\tif (rendering) throw new Error(\"Nested m.redraw.sync() call\")\n\t\trendering = true\n\t\tfor (var i = 0; i < subscriptions.length; i += 2) {\n\t\t\ttry { render(subscriptions[i], Vnode(subscriptions[i + 1]), redraw) }\n\t\t\tcatch (e) { console.error(e) }\n\t\t}\n\t\trendering = false\n\t}\n\n\tfunction redraw() {\n\t\tif (!pending) {\n\t\t\tpending = true\n\t\t\tschedule(function() {\n\t\t\t\tpending = false\n\t\t\t\tsync()\n\t\t\t})\n\t\t}\n\t}\n\n\tredraw.sync = sync\n\n\tfunction mount(root, component) {\n\t\tif (component != null && component.view == null && typeof component !== \"function\") {\n\t\t\tthrow new TypeError(\"m.mount(element, component) expects a component, not a vnode\")\n\t\t}\n\n\t\tvar index = subscriptions.indexOf(root)\n\t\tif (index >= 0) {\n\t\t\tsubscriptions.splice(index, 2)\n\t\t\trender(root, [], redraw)\n\t\t}\n\n\t\tif (component != null) {\n\t\t\tsubscriptions.push(root, component)\n\t\t\trender(root, Vnode(component), redraw)\n\t\t}\n\t}\n\n\treturn {mount: mount, redraw: redraw}\n}\n","\"use strict\"\n\nvar buildPathname = require(\"../pathname/build\")\n\nmodule.exports = function($window, Promise, oncompletion) {\n\tvar callbackCount = 0\n\n\tfunction PromiseProxy(executor) {\n\t\treturn new Promise(executor)\n\t}\n\n\t// In case the global Promise is some userland library's where they rely on\n\t// `foo instanceof this.constructor`, `this.constructor.resolve(value)`, or\n\t// similar. Let's *not* break them.\n\tPromiseProxy.prototype = Promise.prototype\n\tPromiseProxy.__proto__ = Promise // eslint-disable-line no-proto\n\n\tfunction makeRequest(factory) {\n\t\treturn function(url, args) {\n\t\t\tif (typeof url !== \"string\") { args = url; url = url.url }\n\t\t\telse if (args == null) args = {}\n\t\t\tvar promise = new Promise(function(resolve, reject) {\n\t\t\t\tfactory(buildPathname(url, args.params), args, function (data) {\n\t\t\t\t\tif (typeof args.type === \"function\") {\n\t\t\t\t\t\tif (Array.isArray(data)) {\n\t\t\t\t\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tdata[i] = new args.type(data[i])\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse data = new args.type(data)\n\t\t\t\t\t}\n\t\t\t\t\tresolve(data)\n\t\t\t\t}, reject)\n\t\t\t})\n\t\t\tif (args.background === true) return promise\n\t\t\tvar count = 0\n\t\t\tfunction complete() {\n\t\t\t\tif (--count === 0 && typeof oncompletion === \"function\") oncompletion()\n\t\t\t}\n\n\t\t\treturn wrap(promise)\n\n\t\t\tfunction wrap(promise) {\n\t\t\t\tvar then = promise.then\n\t\t\t\t// Set the constructor, so engines know to not await or resolve\n\t\t\t\t// this as a native promise. At the time of writing, this is\n\t\t\t\t// only necessary for V8, but their behavior is the correct\n\t\t\t\t// behavior per spec. See this spec issue for more details:\n\t\t\t\t// https://github.com/tc39/ecma262/issues/1577. Also, see the\n\t\t\t\t// corresponding comment in `request/tests/test-request.js` for\n\t\t\t\t// a bit more background on the issue at hand.\n\t\t\t\tpromise.constructor = PromiseProxy\n\t\t\t\tpromise.then = function() {\n\t\t\t\t\tcount++\n\t\t\t\t\tvar next = then.apply(promise, arguments)\n\t\t\t\t\tnext.then(complete, function(e) {\n\t\t\t\t\t\tcomplete()\n\t\t\t\t\t\tif (count === 0) throw e\n\t\t\t\t\t})\n\t\t\t\t\treturn wrap(next)\n\t\t\t\t}\n\t\t\t\treturn promise\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction hasHeader(args, name) {\n\t\tfor (var key in args.headers) {\n\t\t\tif ({}.hasOwnProperty.call(args.headers, key) && name.test(key)) return true\n\t\t}\n\t\treturn false\n\t}\n\n\treturn {\n\t\trequest: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar method = args.method != null ? args.method.toUpperCase() : \"GET\"\n\t\t\tvar body = args.body\n\t\t\tvar assumeJSON = (args.serialize == null || args.serialize === JSON.serialize) && !(body instanceof $window.FormData)\n\t\t\tvar responseType = args.responseType || (typeof args.extract === \"function\" ? \"\" : \"json\")\n\n\t\t\tvar xhr = new $window.XMLHttpRequest(), aborted = false\n\t\t\tvar original = xhr, replacedAbort\n\t\t\tvar abort = xhr.abort\n\n\t\t\txhr.abort = function() {\n\t\t\t\taborted = true\n\t\t\t\tabort.call(this)\n\t\t\t}\n\n\t\t\txhr.open(method, url, args.async !== false, typeof args.user === \"string\" ? args.user : undefined, typeof args.password === \"string\" ? args.password : undefined)\n\n\t\t\tif (assumeJSON && body != null && !hasHeader(args, /^content-type$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\")\n\t\t\t}\n\t\t\tif (typeof args.deserialize !== \"function\" && !hasHeader(args, /^accept$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Accept\", \"application/json, text/*\")\n\t\t\t}\n\t\t\tif (args.withCredentials) xhr.withCredentials = args.withCredentials\n\t\t\tif (args.timeout) xhr.timeout = args.timeout\n\t\t\txhr.responseType = responseType\n\n\t\t\tfor (var key in args.headers) {\n\t\t\t\tif ({}.hasOwnProperty.call(args.headers, key)) {\n\t\t\t\t\txhr.setRequestHeader(key, args.headers[key])\n\t\t\t\t}\n\t\t\t}\n\n\t\t\txhr.onreadystatechange = function(ev) {\n\t\t\t\t// Don't throw errors on xhr.abort().\n\t\t\t\tif (aborted) return\n\n\t\t\t\tif (ev.target.readyState === 4) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar success = (ev.target.status >= 200 && ev.target.status < 300) || ev.target.status === 304 || (/^file:\\/\\//i).test(url)\n\t\t\t\t\t\t// When the response type isn't \"\" or \"text\",\n\t\t\t\t\t\t// `xhr.responseText` is the wrong thing to use.\n\t\t\t\t\t\t// Browsers do the right thing and throw here, and we\n\t\t\t\t\t\t// should honor that and do the right thing by\n\t\t\t\t\t\t// preferring `xhr.response` where possible/practical.\n\t\t\t\t\t\tvar response = ev.target.response, message\n\n\t\t\t\t\t\tif (responseType === \"json\") {\n\t\t\t\t\t\t\t// For IE and Edge, which don't implement\n\t\t\t\t\t\t\t// `responseType: \"json\"`.\n\t\t\t\t\t\t\tif (!ev.target.responseType && typeof args.extract !== \"function\") response = JSON.parse(ev.target.responseText)\n\t\t\t\t\t\t} else if (!responseType || responseType === \"text\") {\n\t\t\t\t\t\t\t// Only use this default if it's text. If a parsed\n\t\t\t\t\t\t\t// document is needed on old IE and friends (all\n\t\t\t\t\t\t\t// unsupported), the user should use a custom\n\t\t\t\t\t\t\t// `config` instead. They're already using this at\n\t\t\t\t\t\t\t// their own risk.\n\t\t\t\t\t\t\tif (response == null) response = ev.target.responseText\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof args.extract === \"function\") {\n\t\t\t\t\t\t\tresponse = args.extract(ev.target, args)\n\t\t\t\t\t\t\tsuccess = true\n\t\t\t\t\t\t} else if (typeof args.deserialize === \"function\") {\n\t\t\t\t\t\t\tresponse = args.deserialize(response)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (success) resolve(response)\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttry { message = ev.target.responseText }\n\t\t\t\t\t\t\tcatch (e) { message = response }\n\t\t\t\t\t\t\tvar error = new Error(message)\n\t\t\t\t\t\t\terror.code = ev.target.status\n\t\t\t\t\t\t\terror.response = response\n\t\t\t\t\t\t\treject(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\treject(e)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof args.config === \"function\") {\n\t\t\t\txhr = args.config(xhr, args, url) || xhr\n\n\t\t\t\t// Propagate the `abort` to any replacement XHR as well.\n\t\t\t\tif (xhr !== original) {\n\t\t\t\t\treplacedAbort = xhr.abort\n\t\t\t\t\txhr.abort = function() {\n\t\t\t\t\t\taborted = true\n\t\t\t\t\t\treplacedAbort.call(this)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (body == null) xhr.send()\n\t\t\telse if (typeof args.serialize === \"function\") xhr.send(args.serialize(body))\n\t\t\telse if (body instanceof $window.FormData) xhr.send(body)\n\t\t\telse xhr.send(JSON.stringify(body))\n\t\t}),\n\t\tjsonp: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar callbackName = args.callbackName || \"_mithril_\" + Math.round(Math.random() * 1e16) + \"_\" + callbackCount++\n\t\t\tvar script = $window.document.createElement(\"script\")\n\t\t\t$window[callbackName] = function(data) {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\tresolve(data)\n\t\t\t}\n\t\t\tscript.onerror = function() {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\treject(new Error(\"JSONP request failed\"))\n\t\t\t}\n\t\t\tscript.src = url + (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") +\n\t\t\t\tencodeURIComponent(args.callbackKey || \"callback\") + \"=\" +\n\t\t\t\tencodeURIComponent(callbackName)\n\t\t\t$window.document.documentElement.appendChild(script)\n\t\t}),\n\t}\n}\n","\"use strict\"\n\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./api/router\")(window, mountRedraw)\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar m = require(\"../render/hyperscript\")\nvar Promise = require(\"../promise/promise\")\n\nvar buildPathname = require(\"../pathname/build\")\nvar parsePathname = require(\"../pathname/parse\")\nvar compileTemplate = require(\"../pathname/compileTemplate\")\nvar assign = require(\"../pathname/assign\")\n\nvar sentinel = {}\n\nmodule.exports = function($window, mountRedraw) {\n\tvar fireAsync\n\n\tfunction setPath(path, data, options) {\n\t\tpath = buildPathname(path, data)\n\t\tif (fireAsync != null) {\n\t\t\tfireAsync()\n\t\t\tvar state = options ? options.state : null\n\t\t\tvar title = options ? options.title : null\n\t\t\tif (options && options.replace) $window.history.replaceState(state, title, route.prefix + path)\n\t\t\telse $window.history.pushState(state, title, route.prefix + path)\n\t\t}\n\t\telse {\n\t\t\t$window.location.href = route.prefix + path\n\t\t}\n\t}\n\n\tvar currentResolver = sentinel, component, attrs, currentPath, lastUpdate\n\n\tvar SKIP = route.SKIP = {}\n\n\tfunction route(root, defaultRoute, routes) {\n\t\tif (root == null) throw new Error(\"Ensure the DOM element that was passed to `m.route` is not undefined\")\n\t\t// 0 = start\n\t\t// 1 = init\n\t\t// 2 = ready\n\t\tvar state = 0\n\n\t\tvar compiled = Object.keys(routes).map(function(route) {\n\t\t\tif (route[0] !== \"/\") throw new SyntaxError(\"Routes must start with a `/`\")\n\t\t\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(route)) {\n\t\t\t\tthrow new SyntaxError(\"Route parameter names must be separated with either `/`, `.`, or `-`\")\n\t\t\t}\n\t\t\treturn {\n\t\t\t\troute: route,\n\t\t\t\tcomponent: routes[route],\n\t\t\t\tcheck: compileTemplate(route),\n\t\t\t}\n\t\t})\n\t\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\t\tvar p = Promise.resolve()\n\t\tvar scheduled = false\n\t\tvar onremove\n\n\t\tfireAsync = null\n\n\t\tif (defaultRoute != null) {\n\t\t\tvar defaultData = parsePathname(defaultRoute)\n\n\t\t\tif (!compiled.some(function (i) { return i.check(defaultData) })) {\n\t\t\t\tthrow new ReferenceError(\"Default route doesn't match any known routes\")\n\t\t\t}\n\t\t}\n\n\t\tfunction resolveRoute() {\n\t\t\tscheduled = false\n\t\t\t// Consider the pathname holistically. The prefix might even be invalid,\n\t\t\t// but that's not our problem.\n\t\t\tvar prefix = $window.location.hash\n\t\t\tif (route.prefix[0] !== \"#\") {\n\t\t\t\tprefix = $window.location.search + prefix\n\t\t\t\tif (route.prefix[0] !== \"?\") {\n\t\t\t\t\tprefix = $window.location.pathname + prefix\n\t\t\t\t\tif (prefix[0] !== \"/\") prefix = \"/\" + prefix\n\t\t\t\t}\n\t\t\t}\n\t\t\t// This seemingly useless `.concat()` speeds up the tests quite a bit,\n\t\t\t// since the representation is consistently a relatively poorly\n\t\t\t// optimized cons string.\n\t\t\tvar path = prefix.concat()\n\t\t\t\t.replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponent)\n\t\t\t\t.slice(route.prefix.length)\n\t\t\tvar data = parsePathname(path)\n\n\t\t\tassign(data.params, $window.history.state)\n\n\t\t\tfunction fail() {\n\t\t\t\tif (path === defaultRoute) throw new Error(\"Could not resolve default route \" + defaultRoute)\n\t\t\t\tsetPath(defaultRoute, null, {replace: true})\n\t\t\t}\n\n\t\t\tloop(0)\n\t\t\tfunction loop(i) {\n\t\t\t\t// 0 = init\n\t\t\t\t// 1 = scheduled\n\t\t\t\t// 2 = done\n\t\t\t\tfor (; i < compiled.length; i++) {\n\t\t\t\t\tif (compiled[i].check(data)) {\n\t\t\t\t\t\tvar payload = compiled[i].component\n\t\t\t\t\t\tvar matchedRoute = compiled[i].route\n\t\t\t\t\t\tvar localComp = payload\n\t\t\t\t\t\tvar update = lastUpdate = function(comp) {\n\t\t\t\t\t\t\tif (update !== lastUpdate) return\n\t\t\t\t\t\t\tif (comp === SKIP) return loop(i + 1)\n\t\t\t\t\t\t\tcomponent = comp != null && (typeof comp.view === \"function\" || typeof comp === \"function\")? comp : \"div\"\n\t\t\t\t\t\t\tattrs = data.params, currentPath = path, lastUpdate = null\n\t\t\t\t\t\t\tcurrentResolver = payload.render ? payload : null\n\t\t\t\t\t\t\tif (state === 2) mountRedraw.redraw()\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tstate = 2\n\t\t\t\t\t\t\t\tmountRedraw.redraw.sync()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// There's no understating how much I *wish* I could\n\t\t\t\t\t\t// use `async`/`await` here...\n\t\t\t\t\t\tif (payload.view || typeof payload === \"function\") {\n\t\t\t\t\t\t\tpayload = {}\n\t\t\t\t\t\t\tupdate(localComp)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (payload.onmatch) {\n\t\t\t\t\t\t\tp.then(function () {\n\t\t\t\t\t\t\t\treturn payload.onmatch(data.params, path, matchedRoute)\n\t\t\t\t\t\t\t}).then(update, fail)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse update(\"div\")\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfail()\n\t\t\t}\n\t\t}\n\n\t\t// Set it unconditionally so `m.route.set` and `m.route.Link` both work,\n\t\t// even if neither `pushState` nor `hashchange` are supported. It's\n\t\t// cleared if `hashchange` is used, since that makes it automatically\n\t\t// async.\n\t\tfireAsync = function() {\n\t\t\tif (!scheduled) {\n\t\t\t\tscheduled = true\n\t\t\t\tcallAsync(resolveRoute)\n\t\t\t}\n\t\t}\n\n\t\tif (typeof $window.history.pushState === \"function\") {\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"popstate\", fireAsync, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"popstate\", fireAsync, false)\n\t\t} else if (route.prefix[0] === \"#\") {\n\t\t\tfireAsync = null\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"hashchange\", resolveRoute, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"hashchange\", resolveRoute, false)\n\t\t}\n\n\t\treturn mountRedraw.mount(root, {\n\t\t\tonbeforeupdate: function() {\n\t\t\t\tstate = state ? 2 : 1\n\t\t\t\treturn !(!state || sentinel === currentResolver)\n\t\t\t},\n\t\t\toncreate: resolveRoute,\n\t\t\tonremove: onremove,\n\t\t\tview: function() {\n\t\t\t\tif (!state || sentinel === currentResolver) return\n\t\t\t\t// Wrap in a fragment to preserve existing key semantics\n\t\t\t\tvar vnode = [Vnode(component, attrs.key, attrs)]\n\t\t\t\tif (currentResolver) vnode = currentResolver.render(vnode[0])\n\t\t\t\treturn vnode\n\t\t\t},\n\t\t})\n\t}\n\troute.set = function(path, data, options) {\n\t\tif (lastUpdate != null) {\n\t\t\toptions = options || {}\n\t\t\toptions.replace = true\n\t\t}\n\t\tlastUpdate = null\n\t\tsetPath(path, data, options)\n\t}\n\troute.get = function() {return currentPath}\n\troute.prefix = \"#!\"\n\troute.Link = {\n\t\tview: function(vnode) {\n\t\t\tvar options = vnode.attrs.options\n\t\t\t// Remove these so they don't get overwritten\n\t\t\tvar attrs = {}, onclick, href\n\t\t\tassign(attrs, vnode.attrs)\n\t\t\t// The first two are internal, but the rest are magic attributes\n\t\t\t// that need censored to not screw up rendering.\n\t\t\tattrs.selector = attrs.options = attrs.key = attrs.oninit =\n\t\t\tattrs.oncreate = attrs.onbeforeupdate = attrs.onupdate =\n\t\t\tattrs.onbeforeremove = attrs.onremove = null\n\n\t\t\t// Do this now so we can get the most current `href` and `disabled`.\n\t\t\t// Those attributes may also be specified in the selector, and we\n\t\t\t// should honor that.\n\t\t\tvar child = m(vnode.attrs.selector || \"a\", attrs, vnode.children)\n\n\t\t\t// Let's provide a *right* way to disable a route link, rather than\n\t\t\t// letting people screw up accessibility on accident.\n\t\t\t//\n\t\t\t// The attribute is coerced so users don't get surprised over\n\t\t\t// `disabled: 0` resulting in a button that's somehow routable\n\t\t\t// despite being visibly disabled.\n\t\t\tif (child.attrs.disabled = Boolean(child.attrs.disabled)) {\n\t\t\t\tchild.attrs.href = null\n\t\t\t\tchild.attrs[\"aria-disabled\"] = \"true\"\n\t\t\t\t// If you *really* do want to do this on a disabled link, use\n\t\t\t\t// an `oncreate` hook to add it.\n\t\t\t\tchild.attrs.onclick = null\n\t\t\t} else {\n\t\t\t\tonclick = child.attrs.onclick\n\t\t\t\thref = child.attrs.href\n\t\t\t\tchild.attrs.href = route.prefix + href\n\t\t\t\tchild.attrs.onclick = function(e) {\n\t\t\t\t\tvar result\n\t\t\t\t\tif (typeof onclick === \"function\") {\n\t\t\t\t\t\tresult = onclick.call(e.currentTarget, e)\n\t\t\t\t\t} else if (onclick == null || typeof onclick !== \"object\") {\n\t\t\t\t\t\t// do nothing\n\t\t\t\t\t} else if (typeof onclick.handleEvent === \"function\") {\n\t\t\t\t\t\tonclick.handleEvent(e)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Adapted from React Router's implementation:\n\t\t\t\t\t// https://github.com/ReactTraining/react-router/blob/520a0acd48ae1b066eb0b07d6d4d1790a1d02482/packages/react-router-dom/modules/Link.js\n\t\t\t\t\t//\n\t\t\t\t\t// Try to be flexible and intuitive in how we handle links.\n\t\t\t\t\t// Fun fact: links aren't as obvious to get right as you\n\t\t\t\t\t// would expect. There's a lot more valid ways to click a\n\t\t\t\t\t// link than this, and one might want to not simply click a\n\t\t\t\t\t// link, but right click or command-click it to copy the\n\t\t\t\t\t// link target, etc. Nope, this isn't just for blind people.\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip if `onclick` prevented default\n\t\t\t\t\t\tresult !== false && !e.defaultPrevented &&\n\t\t\t\t\t\t// Ignore everything but left clicks\n\t\t\t\t\t\t(e.button === 0 || e.which === 0 || e.which === 1) &&\n\t\t\t\t\t\t// Let the browser handle `target=_blank`, etc.\n\t\t\t\t\t\t(!e.currentTarget.target || e.currentTarget.target === \"_self\") &&\n\t\t\t\t\t\t// No modifier keys\n\t\t\t\t\t\t!e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey\n\t\t\t\t\t) {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\te.redraw = false\n\t\t\t\t\t\troute.set(href, null, options)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn child\n\t\t},\n\t}\n\troute.param = function(key) {\n\t\treturn attrs && key != null ? attrs[key] : attrs\n\t}\n\n\treturn route\n}\n","\"use strict\"\n\nvar parsePathname = require(\"./parse\")\n\n// Compiles a template into a function that takes a resolved path (without query\n// strings) and returns an object containing the template parameters with their\n// parsed values. This expects the input of the compiled template to be the\n// output of `parsePathname`. Note that it does *not* remove query parameters\n// specified in the template.\nmodule.exports = function(template) {\n\tvar templateData = parsePathname(template)\n\tvar templateKeys = Object.keys(templateData.params)\n\tvar keys = []\n\tvar regexp = new RegExp(\"^\" + templateData.path.replace(\n\t\t// I escape literal text so people can use things like `:file.:ext` or\n\t\t// `:lang-:locale` in routes. This is all merged into one pass so I\n\t\t// don't also accidentally escape `-` and make it harder to detect it to\n\t\t// ban it from template parameters.\n\t\t/:([^\\/.-]+)(\\.{3}|\\.(?!\\.)|-)?|[\\\\^$*+.()|\\[\\]{}]/g,\n\t\tfunction(m, key, extra) {\n\t\t\tif (key == null) return \"\\\\\" + m\n\t\t\tkeys.push({k: key, r: extra === \"...\"})\n\t\t\tif (extra === \"...\") return \"(.*)\"\n\t\t\tif (extra === \".\") return \"([^/]+)\\\\.\"\n\t\t\treturn \"([^/]+)\" + (extra || \"\")\n\t\t}\n\t) + \"$\")\n\treturn function(data) {\n\t\t// First, check the params. Usually, there isn't any, and it's just\n\t\t// checking a static set.\n\t\tfor (var i = 0; i < templateKeys.length; i++) {\n\t\t\tif (templateData.params[templateKeys[i]] !== data.params[templateKeys[i]]) return false\n\t\t}\n\t\t// If no interpolations exist, let's skip all the ceremony\n\t\tif (!keys.length) return regexp.test(data.path)\n\t\tvar values = regexp.exec(data.path)\n\t\tif (values == null) return false\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tdata.params[keys[i].k] = keys[i].r ? values[i + 1] : decodeURIComponent(values[i + 1])\n\t\t}\n\t\treturn true\n\t}\n}\n","if(!global[\"m\"]) global[\"m\"] = {};\nmodule.exports = global[\"m\"][\"bidi\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\bidi.js\");","( function _package( factory ){\r\n\tif( typeof define === 'function' && define.amd ){\r\n\t\tdefine( [ 'mithril' ], factory )\r\n\t}\r\n\telse if( typeof exports === 'object' ){\r\n\t\tmodule.exports = factory( require( 'mithril' ) )\r\n\t}\r\n\telse{\r\n\t\tfactory( m )\r\n\t}\r\n}( function define( m ){\r\n\tfunction bidi( node, prop ){\r\n\t\tvar type = node.tag === 'select'\r\n\t\t\t? node.attrs.multi\r\n\t\t\t\t? 'multi'\r\n\t\t\t\t: 'select'\r\n\t\t\t: node.attrs.type\r\n\r\n\t\t// Setup: bind listeners\r\n\t\tif( type === 'multi' ){\r\n\t\t\tnode.attrs.onchange = function(){\r\n\t\t\t\tprop( [].slice.call( this.selectedOptions, function( x ){\r\n\t\t\t\t\treturn x.value\r\n\t\t\t\t} ) )\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if( type === 'select' ){\r\n\t\t\tnode.attrs.onchange = function( e ){\r\n\t\t\t\tprop( this.selectedOptions[ 0 ].value )\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if( type === 'checkbox' ){\r\n\t\t\tnode.attrs.onchange = function( e ){\r\n\t\t\t\tprop( this.checked )\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.attrs.onchange = node.attrs.oninput = function( e ){\r\n\t\t\t\tprop( this.value )\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif( node.tag === 'select' ){\r\n\t\t\tnode.children.forEach( function( option ){\r\n\t\t\t\tif( option.attrs.value === prop() || option.children[ 0 ] === prop() ){\r\n\t\t\t\t\toption.attrs.selected = true\r\n\t\t\t\t}\r\n\t\t\t} )\r\n\t\t}\r\n\t\telse if( type === 'checkbox' ){\r\n\t\t\tnode.attrs.checked = prop()\r\n\t\t}\r\n\t\telse if( type === 'radio' ){\r\n\t\t\tnode.attrs.checked = prop() === node.attrs.value\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.attrs.value = prop()\r\n\t\t}\r\n\r\n\t\treturn node\r\n\t}\r\n\r\n\tbidi.view = function( ctrl, node, prop ){\r\n\t return bidi( node, node.attrs.bidi )\r\n\t}\r\n\r\n\tif( m.attrs ) m.attrs.bidi = bidi\r\n\t\r\n\tm.bidi = bidi\r\n\r\n\treturn bidi\r\n} ) )\r\n","module.exports = m;","module.exports = global[\"Mousetrap\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\mousetrap.js\");","/*global define:false */\n/**\n * Copyright 2012-2017 Craig Campbell\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * Mousetrap is a simple keyboard shortcut library for Javascript with\n * no external dependencies\n *\n * @version 1.6.3\n * @url craig.is/killing/mice\n */\n(function(window, document, undefined) {\n\n // Check if mousetrap is used inside browser, if not, return\n if (!window) {\n return;\n }\n\n /**\n * mapping of special keycodes to their corresponding keys\n *\n * everything in this dictionary cannot use keypress events\n * so it has to be here to map to the correct keycodes for\n * keyup/keydown events\n *\n * @type {Object}\n */\n var _MAP = {\n 8: 'backspace',\n 9: 'tab',\n 13: 'enter',\n 16: 'shift',\n 17: 'ctrl',\n 18: 'alt',\n 20: 'capslock',\n 27: 'esc',\n 32: 'space',\n 33: 'pageup',\n 34: 'pagedown',\n 35: 'end',\n 36: 'home',\n 37: 'left',\n 38: 'up',\n 39: 'right',\n 40: 'down',\n 45: 'ins',\n 46: 'del',\n 91: 'meta',\n 93: 'meta',\n 224: 'meta'\n };\n\n /**\n * mapping for special characters so they can support\n *\n * this dictionary is only used incase you want to bind a\n * keyup or keydown event to one of these keys\n *\n * @type {Object}\n */\n var _KEYCODE_MAP = {\n 106: '*',\n 107: '+',\n 109: '-',\n 110: '.',\n 111 : '/',\n 186: ';',\n 187: '=',\n 188: ',',\n 189: '-',\n 190: '.',\n 191: '/',\n 192: '`',\n 219: '[',\n 220: '\\\\',\n 221: ']',\n 222: '\\''\n };\n\n /**\n * this is a mapping of keys that require shift on a US keypad\n * back to the non shift equivelents\n *\n * this is so you can use keyup events with these keys\n *\n * note that this will only work reliably on US keyboards\n *\n * @type {Object}\n */\n var _SHIFT_MAP = {\n '~': '`',\n '!': '1',\n '@': '2',\n '#': '3',\n '$': '4',\n '%': '5',\n '^': '6',\n '&': '7',\n '*': '8',\n '(': '9',\n ')': '0',\n '_': '-',\n '+': '=',\n ':': ';',\n '\\\"': '\\'',\n '<': ',',\n '>': '.',\n '?': '/',\n '|': '\\\\'\n };\n\n /**\n * this is a list of special strings you can use to map\n * to modifier keys when you specify your keyboard shortcuts\n *\n * @type {Object}\n */\n var _SPECIAL_ALIASES = {\n 'option': 'alt',\n 'command': 'meta',\n 'return': 'enter',\n 'escape': 'esc',\n 'plus': '+',\n 'mod': /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? 'meta' : 'ctrl'\n };\n\n /**\n * variable to store the flipped version of _MAP from above\n * needed to check if we should use keypress or not when no action\n * is specified\n *\n * @type {Object|undefined}\n */\n var _REVERSE_MAP;\n\n /**\n * loop through the f keys, f1 to f19 and add them to the map\n * programatically\n */\n for (var i = 1; i < 20; ++i) {\n _MAP[111 + i] = 'f' + i;\n }\n\n /**\n * loop through to map numbers on the numeric keypad\n */\n for (i = 0; i <= 9; ++i) {\n\n // This needs to use a string cause otherwise since 0 is falsey\n // mousetrap will never fire for numpad 0 pressed as part of a keydown\n // event.\n //\n // @see https://github.com/ccampbell/mousetrap/pull/258\n _MAP[i + 96] = i.toString();\n }\n\n /**\n * cross browser add event method\n *\n * @param {Element|HTMLDocument} object\n * @param {string} type\n * @param {Function} callback\n * @returns void\n */\n function _addEvent(object, type, callback) {\n if (object.addEventListener) {\n object.addEventListener(type, callback, false);\n return;\n }\n\n object.attachEvent('on' + type, callback);\n }\n\n /**\n * takes the event and returns the key character\n *\n * @param {Event} e\n * @return {string}\n */\n function _characterFromEvent(e) {\n\n // for keypress events we should return the character as is\n if (e.type == 'keypress') {\n var character = String.fromCharCode(e.which);\n\n // if the shift key is not pressed then it is safe to assume\n // that we want the character to be lowercase. this means if\n // you accidentally have caps lock on then your key bindings\n // will continue to work\n //\n // the only side effect that might not be desired is if you\n // bind something like 'A' cause you want to trigger an\n // event when capital A is pressed caps lock will no longer\n // trigger the event. shift+a will though.\n if (!e.shiftKey) {\n character = character.toLowerCase();\n }\n\n return character;\n }\n\n // for non keypress events the special maps are needed\n if (_MAP[e.which]) {\n return _MAP[e.which];\n }\n\n if (_KEYCODE_MAP[e.which]) {\n return _KEYCODE_MAP[e.which];\n }\n\n // if it is not in the special map\n\n // with keydown and keyup events the character seems to always\n // come in as an uppercase character whether you are pressing shift\n // or not. we should make sure it is always lowercase for comparisons\n return String.fromCharCode(e.which).toLowerCase();\n }\n\n /**\n * checks if two arrays are equal\n *\n * @param {Array} modifiers1\n * @param {Array} modifiers2\n * @returns {boolean}\n */\n function _modifiersMatch(modifiers1, modifiers2) {\n return modifiers1.sort().join(',') === modifiers2.sort().join(',');\n }\n\n /**\n * takes a key event and figures out what the modifiers are\n *\n * @param {Event} e\n * @returns {Array}\n */\n function _eventModifiers(e) {\n var modifiers = [];\n\n if (e.shiftKey) {\n modifiers.push('shift');\n }\n\n if (e.altKey) {\n modifiers.push('alt');\n }\n\n if (e.ctrlKey) {\n modifiers.push('ctrl');\n }\n\n if (e.metaKey) {\n modifiers.push('meta');\n }\n\n return modifiers;\n }\n\n /**\n * prevents default for this event\n *\n * @param {Event} e\n * @returns void\n */\n function _preventDefault(e) {\n if (e.preventDefault) {\n e.preventDefault();\n return;\n }\n\n e.returnValue = false;\n }\n\n /**\n * stops propogation for this event\n *\n * @param {Event} e\n * @returns void\n */\n function _stopPropagation(e) {\n if (e.stopPropagation) {\n e.stopPropagation();\n return;\n }\n\n e.cancelBubble = true;\n }\n\n /**\n * determines if the keycode specified is a modifier key or not\n *\n * @param {string} key\n * @returns {boolean}\n */\n function _isModifier(key) {\n return key == 'shift' || key == 'ctrl' || key == 'alt' || key == 'meta';\n }\n\n /**\n * reverses the map lookup so that we can look for specific keys\n * to see what can and can't use keypress\n *\n * @return {Object}\n */\n function _getReverseMap() {\n if (!_REVERSE_MAP) {\n _REVERSE_MAP = {};\n for (var key in _MAP) {\n\n // pull out the numeric keypad from here cause keypress should\n // be able to detect the keys from the character\n if (key > 95 && key < 112) {\n continue;\n }\n\n if (_MAP.hasOwnProperty(key)) {\n _REVERSE_MAP[_MAP[key]] = key;\n }\n }\n }\n return _REVERSE_MAP;\n }\n\n /**\n * picks the best action based on the key combination\n *\n * @param {string} key - character for key\n * @param {Array} modifiers\n * @param {string=} action passed in\n */\n function _pickBestAction(key, modifiers, action) {\n\n // if no action was picked in we should try to pick the one\n // that we think would work best for this key\n if (!action) {\n action = _getReverseMap()[key] ? 'keydown' : 'keypress';\n }\n\n // modifier keys don't work as expected with keypress,\n // switch to keydown\n if (action == 'keypress' && modifiers.length) {\n action = 'keydown';\n }\n\n return action;\n }\n\n /**\n * Converts from a string key combination to an array\n *\n * @param {string} combination like \"command+shift+l\"\n * @return {Array}\n */\n function _keysFromString(combination) {\n if (combination === '+') {\n return ['+'];\n }\n\n combination = combination.replace(/\\+{2}/g, '+plus');\n return combination.split('+');\n }\n\n /**\n * Gets info for a specific key combination\n *\n * @param {string} combination key combination (\"command+s\" or \"a\" or \"*\")\n * @param {string=} action\n * @returns {Object}\n */\n function _getKeyInfo(combination, action) {\n var keys;\n var key;\n var i;\n var modifiers = [];\n\n // take the keys from this pattern and figure out what the actual\n // pattern is all about\n keys = _keysFromString(combination);\n\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n\n // normalize key names\n if (_SPECIAL_ALIASES[key]) {\n key = _SPECIAL_ALIASES[key];\n }\n\n // if this is not a keypress event then we should\n // be smart about using shift keys\n // this will only work for US keyboards however\n if (action && action != 'keypress' && _SHIFT_MAP[key]) {\n key = _SHIFT_MAP[key];\n modifiers.push('shift');\n }\n\n // if this key is a modifier then add it to the list of modifiers\n if (_isModifier(key)) {\n modifiers.push(key);\n }\n }\n\n // depending on what the key combination is\n // we will try to pick the best event for it\n action = _pickBestAction(key, modifiers, action);\n\n return {\n key: key,\n modifiers: modifiers,\n action: action\n };\n }\n\n function _belongsTo(element, ancestor) {\n if (element === null || element === document) {\n return false;\n }\n\n if (element === ancestor) {\n return true;\n }\n\n return _belongsTo(element.parentNode, ancestor);\n }\n\n function Mousetrap(targetElement) {\n var self = this;\n\n targetElement = targetElement || document;\n\n if (!(self instanceof Mousetrap)) {\n return new Mousetrap(targetElement);\n }\n\n /**\n * element to attach key events to\n *\n * @type {Element}\n */\n self.target = targetElement;\n\n /**\n * a list of all the callbacks setup via Mousetrap.bind()\n *\n * @type {Object}\n */\n self._callbacks = {};\n\n /**\n * direct map of string combinations to callbacks used for trigger()\n *\n * @type {Object}\n */\n self._directMap = {};\n\n /**\n * keeps track of what level each sequence is at since multiple\n * sequences can start out with the same sequence\n *\n * @type {Object}\n */\n var _sequenceLevels = {};\n\n /**\n * variable to store the setTimeout call\n *\n * @type {null|number}\n */\n var _resetTimer;\n\n /**\n * temporary state where we will ignore the next keyup\n *\n * @type {boolean|string}\n */\n var _ignoreNextKeyup = false;\n\n /**\n * temporary state where we will ignore the next keypress\n *\n * @type {boolean}\n */\n var _ignoreNextKeypress = false;\n\n /**\n * are we currently inside of a sequence?\n * type of action (\"keyup\" or \"keydown\" or \"keypress\") or false\n *\n * @type {boolean|string}\n */\n var _nextExpectedAction = false;\n\n /**\n * resets all sequence counters except for the ones passed in\n *\n * @param {Object} doNotReset\n * @returns void\n */\n function _resetSequences(doNotReset) {\n doNotReset = doNotReset || {};\n\n var activeSequences = false,\n key;\n\n for (key in _sequenceLevels) {\n if (doNotReset[key]) {\n activeSequences = true;\n continue;\n }\n _sequenceLevels[key] = 0;\n }\n\n if (!activeSequences) {\n _nextExpectedAction = false;\n }\n }\n\n /**\n * finds all callbacks that match based on the keycode, modifiers,\n * and action\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event|Object} e\n * @param {string=} sequenceName - name of the sequence we are looking for\n * @param {string=} combination\n * @param {number=} level\n * @returns {Array}\n */\n function _getMatches(character, modifiers, e, sequenceName, combination, level) {\n var i;\n var callback;\n var matches = [];\n var action = e.type;\n\n // if there are no events related to this keycode\n if (!self._callbacks[character]) {\n return [];\n }\n\n // if a modifier key is coming up on its own we should allow it\n if (action == 'keyup' && _isModifier(character)) {\n modifiers = [character];\n }\n\n // loop through all callbacks for the key that was pressed\n // and see if any of them match\n for (i = 0; i < self._callbacks[character].length; ++i) {\n callback = self._callbacks[character][i];\n\n // if a sequence name is not specified, but this is a sequence at\n // the wrong level then move onto the next match\n if (!sequenceName && callback.seq && _sequenceLevels[callback.seq] != callback.level) {\n continue;\n }\n\n // if the action we are looking for doesn't match the action we got\n // then we should keep going\n if (action != callback.action) {\n continue;\n }\n\n // if this is a keypress event and the meta key and control key\n // are not pressed that means that we need to only look at the\n // character, otherwise check the modifiers as well\n //\n // chrome will not fire a keypress if meta or control is down\n // safari will fire a keypress if meta or meta+shift is down\n // firefox will fire a keypress if meta or control is down\n if ((action == 'keypress' && !e.metaKey && !e.ctrlKey) || _modifiersMatch(modifiers, callback.modifiers)) {\n\n // when you bind a combination or sequence a second time it\n // should overwrite the first one. if a sequenceName or\n // combination is specified in this call it does just that\n //\n // @todo make deleting its own method?\n var deleteCombo = !sequenceName && callback.combo == combination;\n var deleteSequence = sequenceName && callback.seq == sequenceName && callback.level == level;\n if (deleteCombo || deleteSequence) {\n self._callbacks[character].splice(i, 1);\n }\n\n matches.push(callback);\n }\n }\n\n return matches;\n }\n\n /**\n * actually calls the callback function\n *\n * if your callback function returns false this will use the jquery\n * convention - prevent default and stop propogation on the event\n *\n * @param {Function} callback\n * @param {Event} e\n * @returns void\n */\n function _fireCallback(callback, e, combo, sequence) {\n\n // if this event should not happen stop here\n if (self.stopCallback(e, e.target || e.srcElement, combo, sequence)) {\n return;\n }\n\n if (callback(e, combo) === false) {\n _preventDefault(e);\n _stopPropagation(e);\n }\n }\n\n /**\n * handles a character key event\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event} e\n * @returns void\n */\n self._handleKey = function(character, modifiers, e) {\n var callbacks = _getMatches(character, modifiers, e);\n var i;\n var doNotReset = {};\n var maxLevel = 0;\n var processedSequenceCallback = false;\n\n // Calculate the maxLevel for sequences so we can only execute the longest callback sequence\n for (i = 0; i < callbacks.length; ++i) {\n if (callbacks[i].seq) {\n maxLevel = Math.max(maxLevel, callbacks[i].level);\n }\n }\n\n // loop through matching callbacks for this key event\n for (i = 0; i < callbacks.length; ++i) {\n\n // fire for all sequence callbacks\n // this is because if for example you have multiple sequences\n // bound such as \"g i\" and \"g t\" they both need to fire the\n // callback for matching g cause otherwise you can only ever\n // match the first one\n if (callbacks[i].seq) {\n\n // only fire callbacks for the maxLevel to prevent\n // subsequences from also firing\n //\n // for example 'a option b' should not cause 'option b' to fire\n // even though 'option b' is part of the other sequence\n //\n // any sequences that do not match here will be discarded\n // below by the _resetSequences call\n if (callbacks[i].level != maxLevel) {\n continue;\n }\n\n processedSequenceCallback = true;\n\n // keep a list of which sequences were matches for later\n doNotReset[callbacks[i].seq] = 1;\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo, callbacks[i].seq);\n continue;\n }\n\n // if there were no sequence matches but we are still here\n // that means this is a regular match so we should fire that\n if (!processedSequenceCallback) {\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo);\n }\n }\n\n // if the key you pressed matches the type of sequence without\n // being a modifier (ie \"keyup\" or \"keypress\") then we should\n // reset all sequences that were not matched by this event\n //\n // this is so, for example, if you have the sequence \"h a t\" and you\n // type \"h e a r t\" it does not match. in this case the \"e\" will\n // cause the sequence to reset\n //\n // modifier keys are ignored because you can have a sequence\n // that contains modifiers such as \"enter ctrl+space\" and in most\n // cases the modifier key will be pressed before the next key\n //\n // also if you have a sequence such as \"ctrl+b a\" then pressing the\n // \"b\" key will trigger a \"keypress\" and a \"keydown\"\n //\n // the \"keydown\" is expected when there is a modifier, but the\n // \"keypress\" ends up matching the _nextExpectedAction since it occurs\n // after and that causes the sequence to reset\n //\n // we ignore keypresses in a sequence that directly follow a keydown\n // for the same character\n var ignoreThisKeypress = e.type == 'keypress' && _ignoreNextKeypress;\n if (e.type == _nextExpectedAction && !_isModifier(character) && !ignoreThisKeypress) {\n _resetSequences(doNotReset);\n }\n\n _ignoreNextKeypress = processedSequenceCallback && e.type == 'keydown';\n };\n\n /**\n * handles a keydown event\n *\n * @param {Event} e\n * @returns void\n */\n function _handleKeyEvent(e) {\n\n // normalize e.which for key events\n // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion\n if (typeof e.which !== 'number') {\n e.which = e.keyCode;\n }\n\n var character = _characterFromEvent(e);\n\n // no character found then stop\n if (!character) {\n return;\n }\n\n // need to use === for the character check because the character can be 0\n if (e.type == 'keyup' && _ignoreNextKeyup === character) {\n _ignoreNextKeyup = false;\n return;\n }\n\n self.handleKey(character, _eventModifiers(e), e);\n }\n\n /**\n * called to set a 1 second timeout on the specified sequence\n *\n * this is so after each key press in the sequence you have 1 second\n * to press the next key before you have to start over\n *\n * @returns void\n */\n function _resetSequenceTimer() {\n clearTimeout(_resetTimer);\n _resetTimer = setTimeout(_resetSequences, 1000);\n }\n\n /**\n * binds a key sequence to an event\n *\n * @param {string} combo - combo specified in bind call\n * @param {Array} keys\n * @param {Function} callback\n * @param {string=} action\n * @returns void\n */\n function _bindSequence(combo, keys, callback, action) {\n\n // start off by adding a sequence level record for this combination\n // and setting the level to 0\n _sequenceLevels[combo] = 0;\n\n /**\n * callback to increase the sequence level for this sequence and reset\n * all other sequences that were active\n *\n * @param {string} nextAction\n * @returns {Function}\n */\n function _increaseSequence(nextAction) {\n return function() {\n _nextExpectedAction = nextAction;\n ++_sequenceLevels[combo];\n _resetSequenceTimer();\n };\n }\n\n /**\n * wraps the specified callback inside of another function in order\n * to reset all sequence counters as soon as this sequence is done\n *\n * @param {Event} e\n * @returns void\n */\n function _callbackAndReset(e) {\n _fireCallback(callback, e, combo);\n\n // we should ignore the next key up if the action is key down\n // or keypress. this is so if you finish a sequence and\n // release the key the final key will not trigger a keyup\n if (action !== 'keyup') {\n _ignoreNextKeyup = _characterFromEvent(e);\n }\n\n // weird race condition if a sequence ends with the key\n // another sequence begins with\n setTimeout(_resetSequences, 10);\n }\n\n // loop through keys one at a time and bind the appropriate callback\n // function. for any key leading up to the final one it should\n // increase the sequence. after the final, it should reset all sequences\n //\n // if an action is specified in the original bind call then that will\n // be used throughout. otherwise we will pass the action that the\n // next key in the sequence should match. this allows a sequence\n // to mix and match keypress and keydown events depending on which\n // ones are better suited to the key provided\n for (var i = 0; i < keys.length; ++i) {\n var isFinal = i + 1 === keys.length;\n var wrappedCallback = isFinal ? _callbackAndReset : _increaseSequence(action || _getKeyInfo(keys[i + 1]).action);\n _bindSingle(keys[i], wrappedCallback, action, combo, i);\n }\n }\n\n /**\n * binds a single keyboard combination\n *\n * @param {string} combination\n * @param {Function} callback\n * @param {string=} action\n * @param {string=} sequenceName - name of sequence if part of sequence\n * @param {number=} level - what part of the sequence the command is\n * @returns void\n */\n function _bindSingle(combination, callback, action, sequenceName, level) {\n\n // store a direct mapped reference for use with Mousetrap.trigger\n self._directMap[combination + ':' + action] = callback;\n\n // make sure multiple spaces in a row become a single space\n combination = combination.replace(/\\s+/g, ' ');\n\n var sequence = combination.split(' ');\n var info;\n\n // if this pattern is a sequence of keys then run through this method\n // to reprocess each pattern one key at a time\n if (sequence.length > 1) {\n _bindSequence(combination, sequence, callback, action);\n return;\n }\n\n info = _getKeyInfo(combination, action);\n\n // make sure to initialize array if this is the first time\n // a callback is added for this key\n self._callbacks[info.key] = self._callbacks[info.key] || [];\n\n // remove an existing match if there is one\n _getMatches(info.key, info.modifiers, {type: info.action}, sequenceName, combination, level);\n\n // add this call back to the array\n // if it is a sequence put it at the beginning\n // if not put it at the end\n //\n // this is important because the way these are processed expects\n // the sequence ones to come first\n self._callbacks[info.key][sequenceName ? 'unshift' : 'push']({\n callback: callback,\n modifiers: info.modifiers,\n action: info.action,\n seq: sequenceName,\n level: level,\n combo: combination\n });\n }\n\n /**\n * binds multiple combinations to the same callback\n *\n * @param {Array} combinations\n * @param {Function} callback\n * @param {string|undefined} action\n * @returns void\n */\n self._bindMultiple = function(combinations, callback, action) {\n for (var i = 0; i < combinations.length; ++i) {\n _bindSingle(combinations[i], callback, action);\n }\n };\n\n // start!\n _addEvent(targetElement, 'keypress', _handleKeyEvent);\n _addEvent(targetElement, 'keydown', _handleKeyEvent);\n _addEvent(targetElement, 'keyup', _handleKeyEvent);\n }\n\n /**\n * binds an event to mousetrap\n *\n * can be a single key, a combination of keys separated with +,\n * an array of keys, or a sequence of keys separated by spaces\n *\n * be sure to list the modifier keys first to make sure that the\n * correct key ends up getting bound (the last key in the pattern)\n *\n * @param {string|Array} keys\n * @param {Function} callback\n * @param {string=} action - 'keypress', 'keydown', or 'keyup'\n * @returns void\n */\n Mousetrap.prototype.bind = function(keys, callback, action) {\n var self = this;\n keys = keys instanceof Array ? keys : [keys];\n self._bindMultiple.call(self, keys, callback, action);\n return self;\n };\n\n /**\n * unbinds an event to mousetrap\n *\n * the unbinding sets the callback function of the specified key combo\n * to an empty function and deletes the corresponding key in the\n * _directMap dict.\n *\n * TODO: actually remove this from the _callbacks dictionary instead\n * of binding an empty function\n *\n * the keycombo+action has to be exactly the same as\n * it was defined in the bind method\n *\n * @param {string|Array} keys\n * @param {string} action\n * @returns void\n */\n Mousetrap.prototype.unbind = function(keys, action) {\n var self = this;\n return self.bind.call(self, keys, function() {}, action);\n };\n\n /**\n * triggers an event that has already been bound\n *\n * @param {string} keys\n * @param {string=} action\n * @returns void\n */\n Mousetrap.prototype.trigger = function(keys, action) {\n var self = this;\n if (self._directMap[keys + ':' + action]) {\n self._directMap[keys + ':' + action]({}, keys);\n }\n return self;\n };\n\n /**\n * resets the library back to its initial state. this is useful\n * if you want to clear out the current keyboard shortcuts and bind\n * new ones - for example if you switch to another page\n *\n * @returns void\n */\n Mousetrap.prototype.reset = function() {\n var self = this;\n self._callbacks = {};\n self._directMap = {};\n return self;\n };\n\n /**\n * should we stop this event before firing off callbacks\n *\n * @param {Event} e\n * @param {Element} element\n * @return {boolean}\n */\n Mousetrap.prototype.stopCallback = function(e, element) {\n var self = this;\n\n // if the element has the class \"mousetrap\" then no need to stop\n if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {\n return false;\n }\n\n if (_belongsTo(element, self.target)) {\n return false;\n }\n\n // Events originating from a shadow DOM are re-targetted and `e.target` is the shadow host,\n // not the initial event target in the shadow tree. Note that not all events cross the\n // shadow boundary.\n // For shadow trees with `mode: 'open'`, the initial event target is the first element in\n // the event’s composed path. For shadow trees with `mode: 'closed'`, the initial event\n // target cannot be obtained.\n if ('composedPath' in e && typeof e.composedPath === 'function') {\n // For open shadow trees, update `element` so that the following check works.\n var initialEventTarget = e.composedPath()[0];\n if (initialEventTarget !== e.target) {\n element = initialEventTarget;\n }\n }\n\n // stop for input, select, and textarea\n return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable;\n };\n\n /**\n * exposes _handleKey publicly so it can be overwritten by extensions\n */\n Mousetrap.prototype.handleKey = function() {\n var self = this;\n return self._handleKey.apply(self, arguments);\n };\n\n /**\n * allow custom key mappings\n */\n Mousetrap.addKeycodes = function(object) {\n for (var key in object) {\n if (object.hasOwnProperty(key)) {\n _MAP[key] = object[key];\n }\n }\n _REVERSE_MAP = null;\n };\n\n /**\n * Init the global mousetrap functions\n *\n * This method is needed to allow the global mousetrap functions to work\n * now that mousetrap is a constructor function.\n */\n Mousetrap.init = function() {\n var documentMousetrap = Mousetrap(document);\n for (var method in documentMousetrap) {\n if (method.charAt(0) !== '_') {\n Mousetrap[method] = (function(method) {\n return function() {\n return documentMousetrap[method].apply(documentMousetrap, arguments);\n };\n } (method));\n }\n }\n };\n\n Mousetrap.init();\n\n // expose mousetrap to the global object\n window.Mousetrap = Mousetrap;\n\n // expose as a common js module\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = Mousetrap;\n }\n\n // expose mousetrap as an AMD module\n if (typeof define === 'function' && define.amd) {\n define(function() {\n return Mousetrap;\n });\n }\n}) (typeof window !== 'undefined' ? window : null, typeof window !== 'undefined' ? document : null);\n","module.exports = global[\"classNames\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\index.js\");","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n;(function($){\n var zepto = $.zepto, oldQsa = zepto.qsa, oldMatches = zepto.matches\n\n function visible(elem){\n elem = $(elem)\n return !!(elem.width() || elem.height()) && elem.css(\"display\") !== \"none\"\n }\n\n // Implements a subset from:\n // http://api.jquery.com/category/selectors/jquery-selector-extensions/\n //\n // Each filter function receives the current index, all nodes in the\n // considered set, and a value if there were parentheses. The value\n // of `this` is the node currently being considered. The function returns the\n // resulting node(s), null, or undefined.\n //\n // Complex selectors are not supported:\n // li:has(label:contains(\"foo\")) + li:has(label:contains(\"bar\"))\n // ul.inner:first > li\n var filters = $.expr[':'] = {\n visible: function(){ if (visible(this)) return this },\n hidden: function(){ if (!visible(this)) return this },\n selected: function(){ if (this.selected) return this },\n checked: function(){ if (this.checked) return this },\n parent: function(){ return this.parentNode },\n first: function(idx){ if (idx === 0) return this },\n last: function(idx, nodes){ if (idx === nodes.length - 1) return this },\n eq: function(idx, _, value){ if (idx === value) return this },\n contains: function(idx, _, text){ if ($(this).text().indexOf(text) > -1) return this },\n has: function(idx, _, sel){ if (zepto.qsa(this, sel).length) return this }\n }\n\n var filterRe = new RegExp('(.*):(\\\\w+)(?:\\\\(([^)]+)\\\\))?$\\\\s*'),\n childRe = /^\\s*>/,\n classTag = 'Zepto' + (+new Date())\n\n function process(sel, fn) {\n // quote the hash in `a[href^=#]` expression\n sel = sel.replace(/=#\\]/g, '=\"#\"]')\n var filter, arg, match = filterRe.exec(sel)\n if (match && match[2] in filters) {\n filter = filters[match[2]], arg = match[3]\n sel = match[1]\n if (arg) {\n var num = Number(arg)\n if (isNaN(num)) arg = arg.replace(/^[\"']|[\"']$/g, '')\n else arg = num\n }\n }\n return fn(sel, filter, arg)\n }\n\n zepto.qsa = function(node, selector) {\n return process(selector, function(sel, filter, arg){\n try {\n var taggedParent\n if (!sel && filter) sel = '*'\n else if (childRe.test(sel))\n // support \"> *\" child queries by tagging the parent node with a\n // unique class and prepending that classname onto the selector\n taggedParent = $(node).addClass(classTag), sel = '.'+classTag+' '+sel\n\n var nodes = oldQsa(node, sel)\n } catch(e) {\n console.error('error performing selector: %o', selector)\n throw e\n } finally {\n if (taggedParent) taggedParent.removeClass(classTag)\n }\n return !filter ? nodes :\n zepto.uniq($.map(nodes, function(n, i){ return filter.call(n, i, nodes, arg) }))\n })\n }\n\n zepto.matches = function(node, selector){\n return process(selector, function(sel, filter, arg){\n return (!sel || oldMatches(node, sel)) &&\n (!filter || filter.call(node, null, arg) === node)\n })\n }\n})(Zepto)\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n// The following code is heavily inspired by jQuery's $.fn.data()\n\n;(function($){\n var data = {}, dataAttr = $.fn.data, camelize = $.camelCase,\n exp = $.expando = 'Zepto' + (+new Date()), emptyArray = []\n\n // Get value from node:\n // 1. first try key as given,\n // 2. then try camelized key,\n // 3. fall back to reading \"data-*\" attribute.\n function getData(node, name) {\n var id = node[exp], store = id && data[id]\n if (name === undefined) return store || setData(node)\n else {\n if (store) {\n if (name in store) return store[name]\n var camelName = camelize(name)\n if (camelName in store) return store[camelName]\n }\n return dataAttr.call($(node), name)\n }\n }\n\n // Store value under camelized key on node\n function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }\n\n // Read all \"data-*\" attributes from a node\n function attributeData(node) {\n var store = {}\n $.each(node.attributes || emptyArray, function(i, attr){\n if (attr.name.indexOf('data-') == 0)\n store[camelize(attr.name.replace('data-', ''))] =\n $.zepto.deserializeValue(attr.value)\n })\n return store\n }\n\n $.fn.data = function(name, value) {\n return value === undefined ?\n // set multiple values via object\n $.isPlainObject(name) ?\n this.each(function(i, node){\n $.each(name, function(key, value){ setData(node, key, value) })\n }) :\n // get value from first element\n (0 in this ? getData(this[0], name) : undefined) :\n // set value on all elements\n this.each(function(){ setData(this, name, value) })\n }\n\n $.data = function(elem, name, value) {\n return $(elem).data(name, value)\n }\n\n $.hasData = function(elem) {\n var id = elem[exp], store = id && data[id]\n return store ? !$.isEmptyObject(store) : false\n }\n\n $.fn.removeData = function(names) {\n if (typeof names == 'string') names = names.split(/\\s+/)\n return this.each(function(){\n var id = this[exp], store = id && data[id]\n if (store) $.each(names || store, function(key){\n delete store[names ? camelize(this) : key]\n })\n })\n }\n\n // Generate extended `remove` and `empty` functions\n ;['remove', 'empty'].forEach(function(methodName){\n var origFn = $.fn[methodName]\n $.fn[methodName] = function() {\n var elements = this.find('*')\n if (methodName === 'remove') elements = elements.add(this)\n elements.removeData()\n return origFn.call(this)\n }\n })\n})(Zepto)\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n;(function($, undefined){\n var prefix = '', eventPrefix,\n vendors = { Webkit: 'webkit', Moz: '', O: 'o' },\n testEl = document.createElement('div'),\n supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,\n transform,\n transitionProperty, transitionDuration, transitionTiming, transitionDelay,\n animationName, animationDuration, animationTiming, animationDelay,\n cssReset = {}\n\n function dasherize(str) { return str.replace(/([A-Z])/g, '-$1').toLowerCase() }\n function normalizeEvent(name) { return eventPrefix ? eventPrefix + name : name.toLowerCase() }\n\n if (testEl.style.transform === undefined) $.each(vendors, function(vendor, event){\n if (testEl.style[vendor + 'TransitionProperty'] !== undefined) {\n prefix = '-' + vendor.toLowerCase() + '-'\n eventPrefix = event\n return false\n }\n })\n\n transform = prefix + 'transform'\n cssReset[transitionProperty = prefix + 'transition-property'] =\n cssReset[transitionDuration = prefix + 'transition-duration'] =\n cssReset[transitionDelay = prefix + 'transition-delay'] =\n cssReset[transitionTiming = prefix + 'transition-timing-function'] =\n cssReset[animationName = prefix + 'animation-name'] =\n cssReset[animationDuration = prefix + 'animation-duration'] =\n cssReset[animationDelay = prefix + 'animation-delay'] =\n cssReset[animationTiming = prefix + 'animation-timing-function'] = ''\n\n $.fx = {\n off: (eventPrefix === undefined && testEl.style.transitionProperty === undefined),\n speeds: { _default: 400, fast: 200, slow: 600 },\n cssPrefix: prefix,\n transitionEnd: normalizeEvent('TransitionEnd'),\n animationEnd: normalizeEvent('AnimationEnd')\n }\n\n $.fn.animate = function(properties, duration, ease, callback, delay){\n if ($.isFunction(duration))\n callback = duration, ease = undefined, duration = undefined\n if ($.isFunction(ease))\n callback = ease, ease = undefined\n if ($.isPlainObject(duration))\n ease = duration.easing, callback = duration.complete, delay = duration.delay, duration = duration.duration\n if (duration) duration = (typeof duration == 'number' ? duration :\n ($.fx.speeds[duration] || $.fx.speeds._default)) / 1000\n if (delay) delay = parseFloat(delay) / 1000\n return this.anim(properties, duration, ease, callback, delay)\n }\n\n $.fn.anim = function(properties, duration, ease, callback, delay){\n var key, cssValues = {}, cssProperties, transforms = '',\n that = this, wrappedCallback, endEvent = $.fx.transitionEnd,\n fired = false\n\n if (duration === undefined) duration = $.fx.speeds._default / 1000\n if (delay === undefined) delay = 0\n if ($.fx.off) duration = 0\n\n if (typeof properties == 'string') {\n // keyframe animation\n cssValues[animationName] = properties\n cssValues[animationDuration] = duration + 's'\n cssValues[animationDelay] = delay + 's'\n cssValues[animationTiming] = (ease || 'linear')\n endEvent = $.fx.animationEnd\n } else {\n cssProperties = []\n // CSS transitions\n for (key in properties)\n if (supportedTransforms.test(key)) transforms += key + '(' + properties[key] + ') '\n else cssValues[key] = properties[key], cssProperties.push(dasherize(key))\n\n if (transforms) cssValues[transform] = transforms, cssProperties.push(transform)\n if (duration > 0 && typeof properties === 'object') {\n cssValues[transitionProperty] = cssProperties.join(', ')\n cssValues[transitionDuration] = duration + 's'\n cssValues[transitionDelay] = delay + 's'\n cssValues[transitionTiming] = (ease || 'linear')\n }\n }\n\n wrappedCallback = function(event){\n if (typeof event !== 'undefined') {\n if (event.target !== event.currentTarget) return // makes sure the event didn't bubble from \"below\"\n $(event.target).unbind(endEvent, wrappedCallback)\n } else\n $(this).unbind(endEvent, wrappedCallback) // triggered by setTimeout\n\n fired = true\n $(this).css(cssReset)\n callback && callback.call(this)\n }\n if (duration > 0){\n this.bind(endEvent, wrappedCallback)\n // transitionEnd is not always firing on older Android phones\n // so make sure it gets fired\n setTimeout(function(){\n if (fired) return\n wrappedCallback.call(that)\n }, ((duration + delay) * 1000) + 25)\n }\n\n // trigger page reflow so new elements can animate\n this.size() && this.get(0).clientLeft\n\n this.css(cssValues)\n\n if (duration <= 0) setTimeout(function() {\n that.each(function(){ wrappedCallback.call(this) })\n }, 0)\n\n return this\n }\n\n testEl = null\n})(Zepto)\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n;(function($, undefined){\n var document = window.document, docElem = document.documentElement,\n origShow = $.fn.show, origHide = $.fn.hide, origToggle = $.fn.toggle\n\n function anim(el, speed, opacity, scale, callback) {\n if (typeof speed == 'function' && !callback) callback = speed, speed = undefined\n var props = { opacity: opacity }\n if (scale) {\n props.scale = scale\n el.css($.fx.cssPrefix + 'transform-origin', '0 0')\n }\n return el.animate(props, speed, null, callback)\n }\n\n function hide(el, speed, scale, callback) {\n return anim(el, speed, 0, scale, function(){\n origHide.call($(this))\n callback && callback.call(this)\n })\n }\n\n $.fn.show = function(speed, callback) {\n origShow.call(this)\n if (speed === undefined) speed = 0\n else this.css('opacity', 0)\n return anim(this, speed, 1, '1,1', callback)\n }\n\n $.fn.hide = function(speed, callback) {\n if (speed === undefined) return origHide.call(this)\n else return hide(this, speed, '0,0', callback)\n }\n\n $.fn.toggle = function(speed, callback) {\n if (speed === undefined || typeof speed == 'boolean')\n return origToggle.call(this, speed)\n else return this.each(function(){\n var el = $(this)\n el[el.css('display') == 'none' ? 'show' : 'hide'](speed, callback)\n })\n }\n\n $.fn.fadeTo = function(speed, opacity, callback) {\n return anim(this, speed, opacity, null, callback)\n }\n\n $.fn.fadeIn = function(speed, callback) {\n var target = this.css('opacity')\n if (target > 0) this.css('opacity', 0)\n else target = 1\n return origShow.call(this).fadeTo(speed, target, callback)\n }\n\n $.fn.fadeOut = function(speed, callback) {\n return hide(this, speed, null, callback)\n }\n\n $.fn.fadeToggle = function(speed, callback) {\n return this.each(function(){\n var el = $(this)\n el[\n (el.css('opacity') == 0 || el.css('display') == 'none') ? 'fadeIn' : 'fadeOut'\n ](speed, callback)\n })\n }\n\n})(Zepto)\n","/*!\n * HC-Sticky\n * =========\n * Version: 2.2.3\n * Author: Some Web Media\n * Author URL: http://somewebmedia.com\n * Plugin URL: https://github.com/somewebmedia/hc-sticky\n * Description: Cross-browser plugin that makes any element on your page visible while you scroll\n * License: MIT\n */\n!function(t,e){\"use strict\";if(\"object\"==typeof module&&\"object\"==typeof module.exports){if(!t.document)throw new Error(\"HC-Sticky requires a browser to run.\");module.exports=e(t)}else\"function\"==typeof define&&define.amd?define(\"hcSticky\",[],e(t)):e(t)}(\"undefined\"!=typeof window?window:this,function(U){\"use strict\";var Y={top:0,bottom:0,bottomEnd:0,innerTop:0,innerSticker:null,stickyClass:\"sticky\",stickTo:null,followScroll:!0,responsive:null,mobileFirst:!1,onStart:null,onStop:null,onBeforeResize:null,onResize:null,resizeDebounce:100,disable:!1,queries:null,queryFlow:\"down\"},$=function(t,e,o){console.log(\"%c! HC Sticky:%c \"+t+\"%c \"+o+\" is now deprecated and will be removed. Use%c \"+e+\"%c instead.\",\"color: red\",\"color: darkviolet\",\"color: black\",\"color: darkviolet\",\"color: black\")},Q=U.document,X=function(n,f){var o=this;if(\"string\"==typeof n&&(n=Q.querySelector(n)),!n)return!1;f.queries&&$(\"queries\",\"responsive\",\"option\"),f.queryFlow&&$(\"queryFlow\",\"mobileFirst\",\"option\");var p={},d=X.Helpers,s=n.parentNode;\"static\"===d.getStyle(s,\"position\")&&(s.style.position=\"relative\");var u=function(){var t=0>>0;if(\"function\"!=typeof t)throw new TypeError(t+\" is not a function\");for(1 0) index-- // up\n if (e.which == 40 && index < $items.length - 1) index++ // down\n if (!~index) index = 0\n\n $items.eq(index).trigger('focus')\n }\n\n\n // DROPDOWN PLUGIN DEFINITION\n // ==========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.dropdown')\n\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n if (typeof option == 'string') data[option].call($this)\n })\n }\n\n var old = $.fn.dropdown\n\n $.fn.dropdown = Plugin\n $.fn.dropdown.Constructor = Dropdown\n\n\n // DROPDOWN NO CONFLICT\n // ====================\n\n $.fn.dropdown.noConflict = function () {\n $.fn.dropdown = old\n return this\n }\n\n\n // APPLY TO STANDARD DROPDOWN ELEMENTS\n // ===================================\n\n $(document)\n .on('click.bs.dropdown.data-api', clearMenus)\n .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\n .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)\n .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)\n .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)\n\n}(jQuery);\n","/* ========================================================================\n * Bootstrap: transition.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#transitions\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)\n // ============================================================\n\n function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n WebkitTransition : 'webkitTransitionEnd',\n MozTransition : 'transitionend',\n OTransition : 'oTransitionEnd otransitionend',\n transition : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n\n return false // explicit for ie8 ( ._.)\n }\n\n // https://blog.alexmaccaw.com/css-transitions\n $.fn.emulateTransitionEnd = function (duration) {\n var called = false\n var $el = this\n $(this).one('bsTransitionEnd', function () { called = true })\n var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\n setTimeout(callback, duration)\n return this\n }\n\n $(function () {\n $.support.transition = transitionEnd()\n\n if (!$.support.transition) return\n\n $.event.special.bsTransitionEnd = {\n bindType: $.support.transition.end,\n delegateType: $.support.transition.end,\n handle: function (e) {\n if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)\n }\n }\n })\n\n}(jQuery);\n","/* eslint-disable */\n;(function() {\n\"use strict\"\n/* eslint-enable */\nStream.SKIP = {}\nStream.lift = lift\nStream.scan = scan\nStream.merge = merge\nStream.combine = combine\nStream.scanMerge = scanMerge\nStream[\"fantasy-land/of\"] = Stream\n\nvar warnedHalt = false\nObject.defineProperty(Stream, \"HALT\", {\n\tget: function() {\n\t\twarnedHalt || console.log(\"HALT is deprecated and has been renamed to SKIP\");\n\t\twarnedHalt = true\n\t\treturn Stream.SKIP\n\t}\n})\n\nfunction Stream(value) {\n\tvar dependentStreams = []\n\tvar dependentFns = []\n\n\tfunction stream(v) {\n\t\tif (arguments.length && v !== Stream.SKIP) {\n\t\t\tvalue = v\n\t\t\tif (open(stream)) {\n\t\t\t\tstream._changing()\n\t\t\t\tstream._state = \"active\"\n\t\t\t\tdependentStreams.forEach(function(s, i) { s(dependentFns[i](value)) })\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n\tstream.constructor = Stream\n\tstream._state = arguments.length && value !== Stream.SKIP ? \"active\" : \"pending\"\n\tstream._parents = []\n\n\tstream._changing = function() {\n\t\tif (open(stream)) stream._state = \"changing\"\n\t\tdependentStreams.forEach(function(s) {\n\t\t\ts._changing()\n\t\t})\n\t}\n\n\tstream._map = function(fn, ignoreInitial) {\n\t\tvar target = ignoreInitial ? Stream() : Stream(fn(value))\n\t\ttarget._parents.push(stream)\n\t\tdependentStreams.push(target)\n\t\tdependentFns.push(fn)\n\t\treturn target\n\t}\n\n\tstream.map = function(fn) {\n\t\treturn stream._map(fn, stream._state !== \"active\")\n\t}\n\n\tvar end\n\tfunction createEnd() {\n\t\tend = Stream()\n\t\tend.map(function(value) {\n\t\t\tif (value === true) {\n\t\t\t\tstream._parents.forEach(function (p) {p._unregisterChild(stream)})\n\t\t\t\tstream._state = \"ended\"\n\t\t\t\tstream._parents.length = dependentStreams.length = dependentFns.length = 0\n\t\t\t}\n\t\t\treturn value\n\t\t})\n\t\treturn end\n\t}\n\n\tstream.toJSON = function() { return value != null && typeof value.toJSON === \"function\" ? value.toJSON() : value }\n\n\tstream[\"fantasy-land/map\"] = stream.map\n\tstream[\"fantasy-land/ap\"] = function(x) { return combine(function(s1, s2) { return s1()(s2()) }, [x, stream]) }\n\n\tstream._unregisterChild = function(child) {\n\t\tvar childIndex = dependentStreams.indexOf(child)\n\t\tif (childIndex !== -1) {\n\t\t\tdependentStreams.splice(childIndex, 1)\n\t\t\tdependentFns.splice(childIndex, 1)\n\t\t}\n\t}\n\n\tObject.defineProperty(stream, \"end\", {\n\t\tget: function() { return end || createEnd() }\n\t})\n\n\treturn stream\n}\n\nfunction combine(fn, streams) {\n\tvar ready = streams.every(function(s) {\n\t\tif (s.constructor !== Stream)\n\t\t\tthrow new Error(\"Ensure that each item passed to stream.combine/stream.merge/lift is a stream\")\n\t\treturn s._state === \"active\"\n\t})\n\tvar stream = ready\n\t\t? Stream(fn.apply(null, streams.concat([streams])))\n\t\t: Stream()\n\n\tvar changed = []\n\n\tvar mappers = streams.map(function(s) {\n\t\treturn s._map(function(value) {\n\t\t\tchanged.push(s)\n\t\t\tif (ready || streams.every(function(s) { return s._state !== \"pending\" })) {\n\t\t\t\tready = true\n\t\t\t\tstream(fn.apply(null, streams.concat([changed])))\n\t\t\t\tchanged = []\n\t\t\t}\n\t\t\treturn value\n\t\t}, true)\n\t})\n\n\tvar endStream = stream.end.map(function(value) {\n\t\tif (value === true) {\n\t\t\tmappers.forEach(function(mapper) { mapper.end(true) })\n\t\t\tendStream.end(true)\n\t\t}\n\t\treturn undefined\n\t})\n\n\treturn stream\n}\n\nfunction merge(streams) {\n\treturn combine(function() { return streams.map(function(s) { return s() }) }, streams)\n}\n\nfunction scan(fn, acc, origin) {\n\tvar stream = origin.map(function(v) {\n\t\tvar next = fn(acc, v)\n\t\tif (next !== Stream.SKIP) acc = next\n\t\treturn next\n\t})\n\tstream(acc)\n\treturn stream\n}\n\nfunction scanMerge(tuples, seed) {\n\tvar streams = tuples.map(function(tuple) { return tuple[0] })\n\n\tvar stream = combine(function() {\n\t\tvar changed = arguments[arguments.length - 1]\n\t\tstreams.forEach(function(stream, i) {\n\t\t\tif (changed.indexOf(stream) > -1)\n\t\t\t\tseed = tuples[i][1](seed, stream())\n\t\t})\n\n\t\treturn seed\n\t}, streams)\n\n\tstream(seed)\n\n\treturn stream\n}\n\nfunction lift() {\n\tvar fn = arguments[0]\n\tvar streams = Array.prototype.slice.call(arguments, 1)\n\treturn merge(streams).map(function(streams) {\n\t\treturn fn.apply(undefined, streams)\n\t})\n}\n\nfunction open(s) {\n\treturn s._state === \"pending\" || s._state === \"active\" || s._state === \"changing\"\n}\n\nif (typeof module !== \"undefined\") module[\"exports\"] = Stream\nelse if (typeof window.m === \"function\" && !(\"stream\" in window.m)) window.m.stream = Stream\nelse window.m = {stream : Stream}\n\n}());\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","var arrayEach = require('./_arrayEach'),\n baseEach = require('./_baseEach'),\n castFunction = require('./_castFunction'),\n isArray = require('./isArray');\n\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, castFunction(iteratee));\n}\n\nmodule.exports = forEach;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","var baseSet = require('./_baseSet');\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n}\n\nmodule.exports = set;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","var identity = require('./identity');\n\n/**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\nfunction castFunction(value) {\n return typeof value == 'function' ? value : identity;\n}\n\nmodule.exports = castFunction;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import forEach from 'lodash/forEach';\r\nimport get from 'lodash/get';\r\nimport set from 'lodash/set';\r\n\r\nexport default class Bus {\r\n subscribers = {};\r\n\r\n subscribe(event, callable) {\r\n set(this.subscribers, event + '[]', callable);\r\n }\r\n\r\n dispatch(event, args: any = null) {\r\n forEach(get(this.subscribers, event), function(listener) {\r\n listener(event, args);\r\n });\r\n }\r\n}","/**\n * The `extract` utility deletes a property from an object and returns its\n * value.\n */\nexport default function extract(object: object, property: string): any {\n const value = object[property];\n\n delete object[property];\n\n return value;\n}\n","/**\n * Extract the text nodes from a virtual element.\n *\n * @param {VirtualElement} vdom\n * @return {String}\n */\nexport default function extractText(vdom: any): string {\n if (vdom instanceof Array) {\n return vdom.map(element => extractText(element)).join('');\n } else if (typeof vdom === 'object' && vdom !== null) {\n return vdom.text || extractText(vdom.children);\n } else {\n return vdom;\n }\n}\n","/**\n * The `username` helper displays a user's username in a \n * tag. If the user doesn't exist, the username will be displayed as [deleted].\n *\n * @param {User} user\n */\nexport default function username(user): any {\n const name = (user && user.displayName()) || app.translator.trans('core.lib.username.deleted_text');\n\n return {name};\n}\n","import extract from './utils/extract';\nimport extractText from './utils/extractText';\nimport username from './helpers/username';\n\ntype Translations = { [key: string]: string };\n\nexport default class Translator {\n translations: Translations = {};\n locale = null;\n\n constructor() {\n /**\n * A map of translation keys to their translated values.\n *\n * @type {Object}\n * @public\n */\n this.translations = {};\n\n this.locale = null;\n }\n\n addTranslations(translations) {\n Object.assign(this.translations, translations);\n }\n\n trans(id: string, parameters = null) {\n const translation = this.translations[id];\n\n if (translation) {\n return this.apply(translation, parameters || {});\n }\n\n return id;\n }\n\n transText(id: string, parameters = null) {\n return extractText(this.trans(id, parameters));\n }\n\n apply(translation: string, input: any) {\n if ('user' in input) {\n const user = extract(input, 'user');\n if (!input.username) input.username = username(user);\n }\n\n const parts = translation.split(new RegExp('({[a-z0-9_]+}|)', 'gi'));\n\n const hydrated: any[] = [];\n const open: any[][] = [hydrated];\n\n parts.forEach(part => {\n const match = part.match(new RegExp('{([a-z0-9_]+)}|<(/?)([a-z0-9_]+)>', 'i'));\n\n if (match) {\n if (match[1]) {\n open[0].push(input[match[1]]);\n } else if (match[3]) {\n if (match[2]) {\n open.shift();\n } else {\n let tag = input[match[3]] || { tag: match[3], children: [] };\n open[0].push(tag);\n open.unshift(tag.children || tag);\n }\n }\n } else {\n open[0].push({ tag: 'span', text: part });\n }\n });\n\n return hydrated.filter(part => part);\n }\n}\n","import User from './models/User';\n\n/**\n * The `Session` class defines the current user session. It stores a reference\n * to the current authenticated user, and provides methods to log in/out.\n */\nexport default class Session {\n /**\n * The current authenticated user.\n */\n user?: User;\n\n /**\n * The CSRF token.\n */\n csrfToken?: string;\n\n constructor(user, csrfToken) {\n this.user = user;\n\n this.csrfToken = csrfToken;\n }\n\n /**\n * Attempt to log in a user.\n */\n login(body: { identification: string, password: string }, options = {}) {\n return app.request(Object.assign({\n method: 'POST',\n url: `${app.forum.attribute('baseUrl')}/login`,\n body\n }, options));\n }\n\n /**\n * Log the user out.\n *\n * @public\n */\n logout() {\n window.location.href = `${app.forum.attribute('baseUrl')}/logout?token=${this.csrfToken}`;\n }\n}\n","import Model from './Model';\n\n/**\n * The `Store` class defines a local data store, and provides methods to\n * retrieve data from the API.\n */\nexport default class Store {\n /**\n * The local data store. A tree of resource types to IDs, such that\n * accessing data[type][id] will return the model for that type/ID.\n */\n protected data: { [key: string]: { [key: number]: Model }} = {};\n\n /**\n * The model registry. A map of resource types to the model class that\n * should be used to represent resources of that type.\n */\n models: {};\n\n constructor(models) {\n this.models = models;\n }\n\n /**\n * Push resources contained within an API payload into the store.\n *\n * @param payload\n * @return The model(s) representing the resource(s) contained\n * within the 'data' key of the payload.\n */\n pushPayload(payload: { included?: {}[], data?: {}|{}[] }): Model|Model[] {\n if (payload.included) payload.included.map(this.pushObject.bind(this));\n\n const result: any = payload.data instanceof Array\n ? payload.data.map(this.pushObject.bind(this))\n : this.pushObject(payload.data);\n\n // Attach the original payload to the model that we give back. This is\n // useful to consumers as it allows them to access meta information\n // associated with their request.\n result.payload = payload;\n\n return result;\n }\n\n /**\n * Create a model to represent a resource object (or update an existing one),\n * and push it into the store.\n *\n * @param {Object} data The resource object\n * @return The model, or null if no model class has been\n * registered for this resource type.\n */\n pushObject(data): Model {\n if (!this.models[data.type]) return null;\n\n const type = this.data[data.type] = this.data[data.type] || {};\n\n if (type[data.id]) {\n type[data.id].pushData(data);\n } else {\n type[data.id] = this.createRecord(data.type, data);\n }\n\n type[data.id].exists = true;\n\n return type[data.id];\n }\n\n /**\n * Make a request to the API to find record(s) of a specific type.\n *\n * @param type The resource type.\n * @param [id] The ID(s) of the model(s) to retrieve.\n * Alternatively, if an object is passed, it will be handled as the\n * `query` parameter.\n * @param query\n * @param options\n */\n find(type: string, id?: number|number[]|any, query = {}, options = {}): Promise {\n let body = query;\n let url = `${app.forum.attribute('apiUrl')}/${type}`;\n\n if (id instanceof Array) {\n url += `?filter[id]=${id.join(',')}`;\n } else if (typeof id === 'object') {\n body = id;\n } else if (id) {\n url += `/${id}`;\n }\n\n return app.request(Object.assign({\n method: 'GET',\n url,\n body\n }, options)).then(this.pushPayload.bind(this));\n }\n\n /**\n * Get a record from the store by ID.\n *\n * @param type The resource type.\n * @param id The resource ID.\n */\n getById(type: string, id: number): T {\n return this.data[type] && this.data[type][id] as T;\n }\n\n /**\n * Get a record from the store by the value of a model attribute.\n *\n * @param type The resource type.\n * @param key The name of the method on the model.\n * @param value The value of the model attribute.\n */\n getBy(type: string, key: string, value: any): T {\n return this.all(type).filter(model => model[key]() === value)[0];\n }\n\n /**\n * Get all loaded records of a specific type.\n */\n all(type: string): T[] {\n const records = this.data[type];\n\n return records ? Object.keys(records).map(id => records[id]) : [];\n }\n\n /**\n * Remove the given model from the store.\n */\n remove(model: Model) {\n delete this.data[model.data.type][model.id()];\n }\n\n /**\n * Create a new record of the given type.\n *\n * @param {String} type The resource type\n * @param {Object} [data] Any data to initialize the model with\n */\n createRecord(type: string, data: any = {}): T {\n data.type = data.type || type;\n\n return new (this.models[type])(data, this);\n }\n}\n","/**\n * The `Drawer` class controls the page's drawer. The drawer is the area the\n * slides out from the left on mobile devices; it contains the header and the\n * footer.\n */\nexport default class Drawer {\n private $backdrop?: ZeptoCollection;\n\n constructor() {\n // Set up an event handler so that whenever the content area is tapped,\n // the drawer will close.\n $('#content').click(e => {\n if (this.isOpen()) {\n e.preventDefault();\n this.hide();\n }\n });\n }\n\n /**\n * Check whether or not the drawer is currently open.\n */\n isOpen(): boolean {\n return $('#app').hasClass('drawerOpen');\n }\n\n /**\n * Hide the drawer.\n */\n hide() {\n $('#app').removeClass('drawerOpen');\n\n if (this.$backdrop) this.$backdrop.remove();\n }\n\n /**\n * Show the drawer.\n *\n * @public\n */\n show() {\n $('#app').addClass('drawerOpen');\n\n this.$backdrop = $('
')\n .addClass('drawer-backdrop fade')\n .appendTo('body')\n .click(() => this.hide());\n\n setTimeout(() => this.$backdrop.addClass('in'));\n }\n}\n","/**\n * Extend an object's method by running its output through a mutating callback\n * every time it is called.\n *\n * The callback accepts the method's return value and should perform any\n * mutations directly on this value. For this reason, this function will not be\n * effective on methods which return scalar values (numbers, strings, booleans).\n *\n * Care should be taken to extend the correct object – in most cases, a class'\n * prototype will be the desired target of extension, not the class itself.\n *\n * @example\n * extend(Discussion.prototype, 'badges', function(badges) {\n * // do something with `badges`\n * });\n *\n * @param {Object} object The object that owns the method\n * @param {String} method The name of the method to extend\n * @param {function} callback A callback which mutates the method's output\n */\nexport function extend(object, method, callback) {\n const original = object[method];\n\n object[method] = (...args) => {\n // @ts-ignore\n const value = original ? original.apply(object, args) : undefined;\n\n // @ts-ignore\n callback.apply(object, [value].concat(args));\n\n return value;\n };\n\n Object.assign(object[method], original);\n}\n\n/**\n * Override an object's method by replacing it with a new function, so that the\n * new function will be run every time the object's method is called.\n *\n * The replacement function accepts the original method as its first argument,\n * which is like a call to 'super'. Any arguments passed to the original method\n * are also passed to the replacement.\n *\n * Care should be taken to extend the correct object – in most cases, a class'\n * prototype will be the desired target of extension, not the class itself.\n *\n * @example\n * override(Discussion.prototype, 'badges', function(original) {\n * const badges = original();\n * // do something with badges\n * return badges;\n * });\n *\n * @param {Object} object The object that owns the method\n * @param {String} method The name of the method to override\n * @param {function} newMethod The method to replace it with\n */\nexport function override(object, method, newMethod) {\n const original = object[method];\n\n object[method] = function(...args) {\n // @ts-ignore\n return newMethod.apply(this, [original.bind(this)].concat(args));\n };\n\n Object.assign(object[method], original);\n}\n","/**\n * The `Model` class represents a local data resource. It provides methods to\n * persist changes via the API.\n *\n * @abstract\n */\nimport Store from \"./Store\";\n\nexport default class Model {\n /**\n * The resource object from the API.\n */\n data: any;\n\n /**\n * The time at which the model's data was last updated. Watching the value\n * of this property is a fast way to retain/cache a subtree if data hasn't\n * changed.\n */\n freshness: Date;\n\n /**\n * Whether or not the resource exists on the server.\n */\n exists: boolean;\n\n /**\n * The data store that this resource should be persisted to.\n */\n protected store: Store;\n\n /**\n * @param {Object} data A resource object from the API.\n * @param {Store} store The data store that this model should be persisted to.\n */\n constructor(data = {}, store = null) {\n this.data = data;\n this.store = store;\n\n this.freshness = new Date();\n this.exists = false;\n }\n\n /**\n * Get the model's ID.\n * @final\n */\n id(): string|number {\n return this.data.id;\n }\n\n /**\n * Get one of the model's attributes.\n * @final\n */\n attribute(attribute: string): any {\n return this.data.attributes[attribute];\n }\n\n /**\n * Merge new data into this model locally.\n *\n * @param data A resource object to merge into this model\n * @public\n */\n pushData(data: {}) {\n // Since most of the top-level items in a resource object are objects\n // (e.g. relationships, attributes), we'll need to check and perform the\n // merge at the second level if that's the case.\n for (const key in data) {\n if (typeof data[key] === 'object') {\n this.data[key] = this.data[key] || {};\n\n // For every item in a second-level object, we want to check if we've\n // been handed a Model instance. If so, we will convert it to a\n // relationship data object.\n for (const innerKey in data[key]) {\n if (data[key][innerKey] instanceof Model) {\n data[key][innerKey] = {data: Model.getIdentifier(data[key][innerKey])};\n }\n this.data[key][innerKey] = data[key][innerKey];\n }\n } else {\n this.data[key] = data[key];\n }\n }\n\n // Now that we've updated the data, we can say that the model is fresh.\n // This is an easy way to invalidate retained subtrees etc.\n this.freshness = new Date();\n }\n\n /**\n * Merge new attributes into this model locally.\n *\n * @param {Object} attributes The attributes to merge.\n */\n pushAttributes(attributes: any) {\n this.pushData({attributes});\n }\n\n /**\n * Merge new attributes into this model, both locally and with persistence.\n *\n * @param attributes The attributes to save. If a 'relationships' key\n * exists, it will be extracted and relationships will also be saved.\n * @param [options]\n * @return {Promise}\n */\n save(attributes: any, options: any = {}): Promise {\n const data = {\n type: this.data.type,\n id: this.data.id,\n attributes,\n relationships: undefined\n };\n\n // If a 'relationships' key exists, extract it from the attributes hash and\n // set it on the top-level data object instead. We will be sending this data\n // object to the API for persistence.\n if (attributes.relationships) {\n data.relationships = {};\n\n for (const key in attributes.relationships) {\n const model = attributes.relationships[key];\n\n data.relationships[key] = {\n data: model instanceof Array\n ? model.map(Model.getIdentifier)\n : Model.getIdentifier(model)\n };\n }\n\n delete attributes.relationships;\n }\n\n // Before we update the model's data, we should make a copy of the model's\n // old data so that we can revert back to it if something goes awry during\n // persistence.\n const oldData = this.copyData();\n\n this.pushData(data);\n\n const request = {data};\n if (options.meta) request.meta = options.meta;\n\n return app.request(Object.assign({\n method: this.exists ? 'PATCH' : 'POST',\n url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n body: request\n }, options)).then(\n // If everything went well, we'll make sure the store knows that this\n // model exists now (if it didn't already), and we'll push the data that\n // the API returned into the store.\n payload => {\n this.store.data[payload.data.type] = this.store.data[payload.data.type] || {};\n this.store.data[payload.data.type][payload.data.id] = this;\n return this.store.pushPayload(payload);\n },\n\n // If something went wrong, though... good thing we backed up our model's\n // old data! We'll revert to that and let others handle the error.\n response => {\n this.pushData(oldData);\n m.lazyRedraw();\n throw response;\n }\n );\n }\n\n /**\n * Send a request to delete the resource.\n *\n * @param {Object} data Data to send along with the DELETE request.\n * @param {Object} [options]\n * @return {Promise}\n * @public\n */\n delete(body, options = {}) {\n if (!this.exists) return m.deferred.resolve().promise;\n\n return app.request(Object.assign({\n method: 'DELETE',\n url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n body\n }, options)).then(() => {\n this.exists = false;\n this.store.remove(this);\n });\n }\n\n /**\n * Construct a path to the API endpoint for this resource.\n *\n * @return {String}\n * @protected\n */\n apiEndpoint() {\n return '/' + this.data.type + (this.exists ? '/' + this.data.id : '');\n }\n\n copyData() {\n return JSON.parse(JSON.stringify(this.data));\n }\n\n /**\n * Generate a function which returns the value of the given attribute.\n *\n * @param {String} name\n * @param [transform] A function to transform the attribute value\n */\n static attribute(name: string, transform?: Function): () => any {\n return function() {\n const value = this.data.attributes && this.data.attributes[name];\n\n return transform ? transform(value) : value;\n };\n }\n\n /**\n * Generate a function which returns the value of the given has-one\n * relationship.\n *\n * @return false if no information about the\n * relationship exists; undefined if the relationship exists but the model\n * has not been loaded; or the model if it has been loaded.\n */\n static hasOne(name: string): () => Model|boolean {\n return function() {\n if (this.data.relationships) {\n const relationship = this.data.relationships[name];\n\n if (relationship) {\n return app.store.getById(relationship.data.type, relationship.data.id);\n }\n }\n\n return false;\n };\n }\n\n /**\n * Generate a function which returns the value of the given has-many\n * relationship.\n *\n * @return false if no information about the relationship\n * exists; an array if it does, containing models if they have been\n * loaded, and undefined for those that have not.\n */\n static hasMany(name: string): () => []|boolean {\n return function() {\n if (this.data.relationships) {\n const relationship = this.data.relationships[name];\n\n if (relationship) {\n return relationship.data.map(data => app.store.getById(data.type, data.id));\n }\n }\n\n return false;\n };\n }\n\n /**\n * Transform the given value into a Date object.\n */\n static transformDate(value: string): Date {\n return value ? new Date(value) : null;\n }\n\n /**\n * Get a resource identifier object for the given model.\n */\n protected static getIdentifier(model: Model): { type: string, id: string } {\n return {\n type: model.data.type,\n id: model.data.id\n };\n }\n}\n","import Model from '../Model';\n\nexport default class Forum extends Model {\n apiEndpoint() {\n return '/';\n }\n}\n","/**\n * The `computed` utility creates a function that will cache its output until\n * any of the dependent values are dirty.\n *\n * @param {...String} dependentKeys The keys of the dependent values.\n * @param {function} compute The function which computes the value using the\n * dependent values.\n */\nexport default function computed(...dependentKeys: string[]|Function[]): () => any {\n const keys = dependentKeys.slice(0, -1);\n const compute = dependentKeys.slice(-1)[0];\n\n const dependentValues = {};\n let computedValue;\n\n return function() {\n let recompute = false;\n\n // Read all of the dependent values. If any of them have changed since last\n // time, then we'll want to recompute our output.\n keys.forEach(key => {\n const value = typeof this[key] === 'function' ? this[key]() : this[key];\n\n if (dependentValues[key] !== value) {\n recompute = true;\n dependentValues[key] = value;\n }\n });\n\n if (recompute) {\n computedValue = compute.apply(this, keys.map(key => dependentValues[key]));\n }\n\n return computedValue;\n };\n}\n","class Item {\n content: T;\n priority: number;\n key: number = 0;\n\n constructor(content: any, priority: number) {\n this.content = content;\n this.priority = priority;\n }\n}\n\nexport default class ItemList {\n private items: { [key: string]: Item } = {};\n\n /**\n * Check whether the list is empty.\n *\n * @returns {boolean}\n * @public\n */\n isEmpty(): boolean {\n for (const i in this.items) {\n if (this.items.hasOwnProperty(i)) {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * Check whether an item is present in the list.\n */\n has(key: any): boolean {\n return !!this.items[key];\n }\n\n /**\n * Get the content of an item.\n */\n get(key: any): T {\n return this.items[key].content;\n }\n\n /**\n * Add an item to the list.\n *\n * @param {String} key A unique key for the item.\n * @param {*} content The item's content.\n * @param {Integer} [priority] The priority of the item. Items with a higher\n * priority will be positioned before items with a lower priority.\n * @return {ItemList}\n * @public\n */\n add(key: any, content: T, priority = 0) {\n this.items[key] = new Item(content, priority);\n\n return this;\n }\n\n toArray(): T[] {\n const items: Item[] = [];\n\n for (const i in this.items) {\n if (this.items.hasOwnProperty(i)) {\n if (this.items[i] !== null && this.items[i] instanceof Item) {\n this.items[i].content = Object(this.items[i].content);\n\n this.items[i].content.itemName = i;\n items.push(this.items[i]);\n this.items[i].key = items.length;\n }\n }\n }\n\n return items\n .sort((a, b) => {\n if (a.priority === b.priority) {\n return a.key - b.key;\n } else if (a.priority > b.priority) {\n return -1;\n }\n return 1;\n })\n .map(item => item.content);\n }\n}\n","import Mithril from 'mithril';\n\nexport type ComponentProps = {\n children?: Mithril.Children,\n\n className?: string;\n\n [key: string]: any;\n}\n\nexport default class Component {\n element: HTMLElement;\n\n props = {};\n\n constructor(props: T) {\n this.setProps(props);\n }\n\n view(vnode) {\n throw new Error('Component#view must be implemented by subclass');\n }\n\n oninit(vnode) {\n this.setProps(vnode.attrs);\n }\n\n oncreate(vnode) {\n this.setProps(vnode.attrs);\n this.element = vnode.dom;\n }\n\n onbeforeupdate(vnode) {\n this.setProps(vnode.attrs);\n }\n\n onupdate(vnode) {\n this.setProps(vnode.attrs);\n }\n\n onbeforeremove(vnode) {\n this.setProps(vnode.attrs);\n }\n\n onremove(vnode) {\n this.setProps(vnode.attrs);\n }\n\n /**\n * Returns a jQuery object for this component's element. If you pass in a\n * selector string, this method will return a jQuery object, using the current\n * element as its buffer.\n *\n * For example, calling `component.$('li')` will return a jQuery object\n * containing all of the `li` elements inside the DOM element of this\n * component.\n *\n * @param {String} [selector] a jQuery-compatible selector string\n * @returns {jQuery} the jQuery object for the DOM node\n * @final\n */\n $(selector?: string) {\n const $element = $(this.element);\n\n return selector ? $element.find(selector) : $element;\n }\n\n static component(props: ComponentProps|any = {}, children?: Mithril.Children) {\n const componentProps: ComponentProps = Object.assign({}, props);\n\n if (children) componentProps.children = children;\n\n return m(this, componentProps);\n }\n\n static initProps(props: ComponentProps = {}) {}\n\n private setProps(props: T) {\n (this.constructor as typeof Component).initProps(props);\n\n this.props = props;\n }\n}\n","/**\n * The `icon` helper displays an icon.\n *\n * @param {String} fontClass The full icon class, prefix and the icon’s name.\n * @param {Object} attrs Any other attributes to apply.\n */\nexport default function icon(fontClass: string, attrs: any = {}) {\n attrs.className = 'icon ' + fontClass + ' ' + (attrs.className || '');\n\n return ;\n}\n","import Component from '../Component';\nimport icon from '../helpers/icon';\nimport extract from '../utils/extract';\n\n/**\n * The `Badge` component represents a user/discussion badge, indicating some\n * status (e.g. a discussion is stickied, a user is an admin).\n *\n * A badge may have the following special props:\n *\n * - `type` The type of badge this is. This will be used to give the badge a\n * class name of `Badge--{type}`.\n * - `icon` The name of an icon to show inside the badge.\n * - `label`\n *\n * All other props will be assigned as attributes on the badge element.\n */\nexport default class Badge extends Component {\n view(vnode) {\n const attrs = vnode.attrs;\n const type = extract(attrs, 'type');\n const iconName = extract(attrs, 'icon');\n\n attrs.className = `Badge ${type ? `Badge--${type}` : ''} ${attrs.className || ''}`;\n attrs.title = extract(attrs, 'label') || '';\n\n return (\n \n {iconName ? icon(iconName, {className: 'Badge-icon'}) : m.trust(' ')}\n \n );\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n if (this.props.label) this.$().tooltip({container: 'body'});\n }\n}\n","import Model from '../Model';\nimport computed from '../utils/computed';\nimport ItemList from '../utils/ItemList';\nimport Badge from '../components/Badge';\n\nimport User from './User';\nimport Post from './Post';\n\nexport default class Discussion extends Model {\n title = Model.attribute('title') as () => string;\n slug = Model.attribute('slug') as () => string;\n\n createdAt = Model.attribute('createdAt', Model.transformDate) as () => Date;\n user = Model.hasOne('user') as () => User;\n firstPost = Model.hasOne('firstPost') as () => Post;\n\n lastPostedAt = Model.attribute('lastPostedAt', Model.transformDate) as () => Date;\n lastPostedUser = Model.hasOne('lastPostedUser') as () => User;\n lastPost = Model.hasOne('lastPost') as () => Post;\n lastPostNumber = Model.attribute('lastPostNumber') as () => number;\n\n commentCount = Model.attribute('commentCount') as () => number;\n replyCount = computed('commentCount', commentCount => Math.max(0, commentCount - 1)) as () => string;\n posts = Model.hasMany('posts') as () => Post[];\n mostRelevantPost = Model.hasOne('mostRelevantPost') as () => Post;\n\n lastReadAt = Model.attribute('lastReadAt', Model.transformDate) as () => Date;\n lastReadPostNumber = Model.attribute('lastReadPostNumber') as () => number;\n isUnread = computed('unreadCount', unreadCount => !!unreadCount) as () => boolean;\n isRead = computed('unreadCount', unreadCount => app.session.user && !unreadCount) as () => boolean;\n\n hiddenAt = Model.attribute('hiddenAt', Model.transformDate) as () => Date;\n hiddenUser = Model.hasOne('hiddenUser') as () => User;\n isHidden = computed('hiddenAt', hiddenAt => !!hiddenAt) as () => boolean;\n\n canReply = Model.attribute('canReply') as () => boolean;\n canRename = Model.attribute('canRename') as () => boolean;\n canHide = Model.attribute('canHide') as () => boolean;\n canDelete = Model.attribute('canDelete') as () => boolean;\n\n /**\n * Remove a post from the discussion's posts relationship.\n *\n * @param id The ID of the post to remove.\n */\n removePost(id: number) {\n const relationships = this.data.relationships;\n const posts = relationships && relationships.posts;\n\n if (posts) {\n posts.data.some((data, i) => {\n if (id === data.id) {\n posts.data.splice(i, 1);\n return true;\n }\n });\n }\n }\n\n /**\n * Get the estimated number of unread posts in this discussion for the current\n * user.\n */\n unreadCount(): number {\n const user = app.session.user;\n\n if (user && user.markedAllAsReadAt() < this.lastPostedAt()) {\n return Math.max(0, this.lastPostNumber() - (this.lastReadPostNumber() || 0));\n }\n\n return 0;\n }\n\n /**\n * Get the Badge components that apply to this discussion.\n */\n badges(): ItemList {\n const items = new ItemList();\n\n if (this.isHidden()) {\n items.add('hidden', );\n }\n\n return items;\n }\n\n /**\n * Get a list of all of the post IDs in this discussion.\n */\n postIds(): number[] {\n const posts = this.data.relationships.posts;\n\n return posts ? posts.data.map(link => link.id) : [];\n }\n}\n","export function hsvToRgb(h: number, s: number, v: number) {\n let r;\n let g;\n let b;\n\n const i = Math.floor(h * 6);\n const f = h * 6 - i;\n const p = v * (1 - s);\n const q = v * (1 - f * s);\n const t = v * (1 - (1 - f) * s);\n\n switch (i % 6) {\n case 0: r = v; g = t; b = p; break;\n case 1: r = q; g = v; b = p; break;\n case 2: r = p; g = v; b = t; break;\n case 3: r = p; g = q; b = v; break;\n case 4: r = t; g = p; b = v; break;\n case 5: r = v; g = p; b = q; break;\n }\n\n return {\n r: Math.floor(r * 255),\n g: Math.floor(g * 255),\n b: Math.floor(b * 255)\n };\n}\n\n/**\n * Convert the given string to a unique color.\n */\nexport default function stringToColor(string: string): string {\n let num = 0;\n\n // Convert the username into a number based on the ASCII value of each\n // character.\n for (let i = 0; i < string.length; i++) {\n num += string.charCodeAt(i);\n }\n\n // Construct a color using the remainder of that number divided by 360, and\n // some predefined saturation and value values.\n const hue = num % 360;\n const rgb = hsvToRgb(hue / 360, 0.3, 0.9);\n\n return '' + rgb.r.toString(16) + rgb.g.toString(16) + rgb.b.toString(16);\n}\n","import Badge from './Badge';\n\nexport default class GroupBadge extends Badge {\n static initProps(props) {\n super.initProps(props);\n\n if (props.group) {\n props.icon = props.group.icon();\n props.style = {backgroundColor: props.group.color()};\n props.label = typeof props.label === 'undefined' ? props.group.nameSingular() : props.label;\n props.type = `group--${props.group.id()}`;\n\n delete props.group;\n }\n }\n}\n","import Model from '../Model';\nimport stringToColor from '../utils/stringToColor';\nimport ItemList from '../utils/ItemList';\nimport computed from '../utils/computed';\nimport GroupBadge from '../components/GroupBadge';\nimport Group from \"./Group\";\n\nexport default class User extends Model {\n username = Model.attribute('username') as () => string;\n\n displayName = Model.attribute('displayName') as () => string;\n email = Model.attribute('email') as () => string;\n isEmailConfirmed = Model.attribute('isEmailConfirmed') as () => boolean;\n password = Model.attribute('password') as () => string;\n\n avatarUrl = Model.attribute('avatarUrl') as () => string;\n preferences = Model.attribute('preferences') as () => string;\n groups = Model.hasMany('groups') as () => Group[];\n\n joinTime = Model.attribute('joinTime', Model.transformDate) as () => Date;\n lastSeenAt = Model.attribute('lastSeenAt', Model.transformDate) as () => Date;\n markedAllAsReadAt = Model.attribute('markedAllAsReadAt', Model.transformDate) as () => Date;\n unreadNotificationCount = Model.attribute('unreadNotificationCount') as () => number;\n newNotificationCount = Model.attribute('newNotificationCount') as () => number;\n\n discussionCount = Model.attribute('discussionCount') as () => number;\n commentCount = Model.attribute('commentCount') as () => number;\n\n canEdit = Model.attribute('canEdit') as () => boolean;\n canDelete = Model.attribute('canDelete') as () => boolean;\n\n avatarColor = null;\n color = computed('username', 'avatarUrl', 'avatarColor', function(username, avatarUrl, avatarColor) {\n // If we've already calculated and cached the dominant color of the user's\n // avatar, then we can return that in RGB format. If we haven't, we'll want\n // to calculate it. Unless the user doesn't have an avatar, in which case\n // we generate a color from their username.\n if (avatarColor) {\n return 'rgb(' + avatarColor.join(', ') + ')';\n } else if (avatarUrl) {\n this.calculateAvatarColor();\n return '';\n }\n\n return '#' + stringToColor(username);\n }) as () => string;\n\n isOnline(): boolean {\n return this.lastSeenAt() > dayjs().subtract(5, 'minutes').toDate();\n }\n\n /**\n * Get the Badge components that apply to this user.\n */\n badges(): ItemList {\n const items = new ItemList();\n const groups = this.groups();\n\n if (groups) {\n groups.forEach(group => {\n items.add('group' + group.id(), GroupBadge.component({group}));\n });\n }\n\n return items;\n }\n\n /**\n * Calculate the dominant color of the user's avatar. The dominant color will\n * be set to the `avatarColor` property once it has been calculated.\n *\n * @protected\n */\n calculateAvatarColor() {\n const image = new Image();\n const user = this;\n\n image.onload = function() {\n const colorThief = new ColorThief();\n user.avatarColor = colorThief.getColor(this);\n user.freshness = new Date();\n m.redraw();\n };\n image.src = this.avatarUrl();\n }\n\n /**\n * Update the user's preferences.\n */\n savePreferences(newPreferences: object): Promise {\n const preferences = this.preferences();\n\n Object.assign(preferences, newPreferences);\n\n return this.save({preferences});\n }\n}\n","/**\n * Truncate a string to the given length, appending ellipses if necessary.\n */\nexport function truncate(string: string, length: number, start = 0): string {\n return (start > 0 ? '...' : '') +\n string.substring(start, start + length) +\n (string.length > start + length ? '...' : '');\n}\n\n/**\n * Create a slug out of the given string. Non-alphanumeric characters are\n * converted to hyphens.\n */\nexport function slug(string: string): string {\n return string.toLowerCase()\n .replace(/[^a-z0-9]/gi, '-')\n .replace(/-+/g, '-')\n .replace(/-$|^-/g, '');\n}\n\n/**\n * Strip HTML tags and quotes out of the given string, replacing them with\n * meaningful punctuation.\n */\nexport function getPlainContent(string: string): string {\n const html = string\n .replace(/(<\\/p>|
)/g, '$1  ')\n .replace(/]*>/ig, ' ');\n\n const dom = $('
').html(html);\n\n dom.find(getPlainContent.removeSelectors.join(',')).remove();\n\n return dom.text().replace(/\\s+/g, ' ').trim();\n}\n\n/**\n * An array of DOM selectors to remove when getting plain content.\n *\n * @type {String[]}\n */\ngetPlainContent.removeSelectors = ['blockquote', 'script'];\n\n/**\n * Make a string's first character uppercase.\n */\nexport function ucfirst(string: string): string {\n return string.substr(0, 1).toUpperCase() + string.substr(1);\n}\n","import Model from '../Model';\nimport computed from '../utils/computed';\nimport { getPlainContent } from '../utils/string';\n\nimport Discussion from './Discussion';\nimport User from \"./User\";\n\nexport default class Post extends Model {\n number = Model.attribute('number') as () => number;\n discussion = Model.hasOne('discussion') as () => Discussion;\n\n createdAt= Model.attribute('createdAt', Model.transformDate) as () => Date;\n user = Model.hasOne('user') as () => User;\n contentType = Model.attribute('contentType') as () => string;\n content = Model.attribute('content') as () => string;\n contentHtml = Model.attribute('contentHtml') as () => string;\n contentPlain = computed('contentHtml', getPlainContent) as () => string;\n\n editedAt = Model.attribute('editedAt', Model.transformDate) as () => Date;\n editedUser = Model.hasOne('editedUser') as () => User;\n isEdited = computed('editedAt', editedAt => !!editedAt) as () => boolean;\n\n hiddenAt = Model.attribute('hiddenAt', Model.transformDate) as () => Date;\n hiddenUser = Model.hasOne('hiddenUser') as () => User;\n isHidden = computed('hiddenAt', hiddenAt => !!hiddenAt) as () => boolean;\n\n canEdit = Model.attribute('canEdit') as () => boolean;\n canHide = Model.attribute('canHide') as () => boolean;\n canDelete = Model.attribute('canDelete') as () => boolean;\n}\n","import Model from '../Model';\n\nexport default class Group extends Model {\n static ADMINISTRATOR_ID = '1';\n static GUEST_ID = '2';\n static MEMBER_ID = '3';\n\n nameSingular = Model.attribute('nameSingular') as () => string;\n namePlural = Model.attribute('namePlural') as () => string;\n color = Model.attribute('color') as () => string;\n icon = Model.attribute('icon') as () => string;\n}\n","import Model from '../Model';\nimport User from './User';\n\nexport default class Notification extends Model {\n static ADMINISTRATOR_ID = '1';\n static GUEST_ID = '2';\n static MEMBER_ID = '3';\n\n contentType = Model.attribute('contentType') as () => string;\n content = Model.attribute('content') as () => string;\n createdAt = Model.attribute('createdAt', Model.transformDate) as () => Date;\n\n isRead = Model.attribute('isRead') as () => boolean;\n\n user = Model.hasOne('user') as () => User;\n fromUser = Model.hasOne('fromUser') as () => User;\n subject = Model.hasOne('subhect') as () => any;\n}\n","import Mithril from \"mithril\";\n\nexport interface RequestErrorResponse extends JSON {\n errors?: {\n code: string;\n source?: {\n pointer: string;\n };\n }[];\n}\n\nexport default class RequestError {\n status: number;\n responseText: string;\n options: Mithril.RequestOptions;\n xhr: XMLHttpRequest;\n response?: RequestErrorResponse;\n alert?: Mithril.Vnode;\n\n constructor(status, responseText, options, xhr) {\n this.status = status;\n this.responseText = responseText;\n this.options = options;\n this.xhr = xhr;\n\n try {\n this.response = JSON.parse(responseText);\n } catch (e) {\n this.response = null;\n }\n\n this.alert = null;\n }\n}\n","var __assign = (this && this.__assign) || Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n};\r\nvar defaults = {\r\n lines: 12,\r\n length: 7,\r\n width: 5,\r\n radius: 10,\r\n scale: 1.0,\r\n corners: 1,\r\n color: '#000',\r\n fadeColor: 'transparent',\r\n animation: 'spinner-line-fade-default',\r\n rotate: 0,\r\n direction: 1,\r\n speed: 1,\r\n zIndex: 2e9,\r\n className: 'spinner',\r\n top: '50%',\r\n left: '50%',\r\n shadow: '0 0 1px transparent',\r\n position: 'absolute',\r\n};\r\nvar Spinner = /** @class */ (function () {\r\n function Spinner(opts) {\r\n if (opts === void 0) { opts = {}; }\r\n this.opts = __assign({}, defaults, opts);\r\n }\r\n /**\r\n * Adds the spinner to the given target element. If this instance is already\r\n * spinning, it is automatically removed from its previous target by calling\r\n * stop() internally.\r\n */\r\n Spinner.prototype.spin = function (target) {\r\n this.stop();\r\n this.el = document.createElement('div');\r\n this.el.className = this.opts.className;\r\n this.el.setAttribute('role', 'progressbar');\r\n css(this.el, {\r\n position: this.opts.position,\r\n width: 0,\r\n zIndex: this.opts.zIndex,\r\n left: this.opts.left,\r\n top: this.opts.top,\r\n transform: \"scale(\" + this.opts.scale + \")\",\r\n });\r\n if (target) {\r\n target.insertBefore(this.el, target.firstChild || null);\r\n }\r\n drawLines(this.el, this.opts);\r\n return this;\r\n };\r\n /**\r\n * Stops and removes the Spinner.\r\n * Stopped spinners may be reused by calling spin() again.\r\n */\r\n Spinner.prototype.stop = function () {\r\n if (this.el) {\r\n if (typeof requestAnimationFrame !== 'undefined') {\r\n cancelAnimationFrame(this.animateId);\r\n }\r\n else {\r\n clearTimeout(this.animateId);\r\n }\r\n if (this.el.parentNode) {\r\n this.el.parentNode.removeChild(this.el);\r\n }\r\n this.el = undefined;\r\n }\r\n return this;\r\n };\r\n return Spinner;\r\n}());\r\nexport { Spinner };\r\n/**\r\n * Sets multiple style properties at once.\r\n */\r\nfunction css(el, props) {\r\n for (var prop in props) {\r\n el.style[prop] = props[prop];\r\n }\r\n return el;\r\n}\r\n/**\r\n * Returns the line color from the given string or array.\r\n */\r\nfunction getColor(color, idx) {\r\n return typeof color == 'string' ? color : color[idx % color.length];\r\n}\r\n/**\r\n * Internal method that draws the individual lines.\r\n */\r\nfunction drawLines(el, opts) {\r\n var borderRadius = (Math.round(opts.corners * opts.width * 500) / 1000) + 'px';\r\n var shadow = 'none';\r\n if (opts.shadow === true) {\r\n shadow = '0 2px 4px #000'; // default shadow\r\n }\r\n else if (typeof opts.shadow === 'string') {\r\n shadow = opts.shadow;\r\n }\r\n var shadows = parseBoxShadow(shadow);\r\n for (var i = 0; i < opts.lines; i++) {\r\n var degrees = ~~(360 / opts.lines * i + opts.rotate);\r\n var backgroundLine = css(document.createElement('div'), {\r\n position: 'absolute',\r\n top: -opts.width / 2 + \"px\",\r\n width: (opts.length + opts.width) + 'px',\r\n height: opts.width + 'px',\r\n background: getColor(opts.fadeColor, i),\r\n borderRadius: borderRadius,\r\n transformOrigin: 'left',\r\n transform: \"rotate(\" + degrees + \"deg) translateX(\" + opts.radius + \"px)\",\r\n });\r\n var delay = i * opts.direction / opts.lines / opts.speed;\r\n delay -= 1 / opts.speed; // so initial animation state will include trail\r\n var line = css(document.createElement('div'), {\r\n width: '100%',\r\n height: '100%',\r\n background: getColor(opts.color, i),\r\n borderRadius: borderRadius,\r\n boxShadow: normalizeShadow(shadows, degrees),\r\n animation: 1 / opts.speed + \"s linear \" + delay + \"s infinite \" + opts.animation,\r\n });\r\n backgroundLine.appendChild(line);\r\n el.appendChild(backgroundLine);\r\n }\r\n}\r\nfunction parseBoxShadow(boxShadow) {\r\n var regex = /^\\s*([a-zA-Z]+\\s+)?(-?\\d+(\\.\\d+)?)([a-zA-Z]*)\\s+(-?\\d+(\\.\\d+)?)([a-zA-Z]*)(.*)$/;\r\n var shadows = [];\r\n for (var _i = 0, _a = boxShadow.split(','); _i < _a.length; _i++) {\r\n var shadow = _a[_i];\r\n var matches = shadow.match(regex);\r\n if (matches === null) {\r\n continue; // invalid syntax\r\n }\r\n var x = +matches[2];\r\n var y = +matches[5];\r\n var xUnits = matches[4];\r\n var yUnits = matches[7];\r\n if (x === 0 && !xUnits) {\r\n xUnits = yUnits;\r\n }\r\n if (y === 0 && !yUnits) {\r\n yUnits = xUnits;\r\n }\r\n if (xUnits !== yUnits) {\r\n continue; // units must match to use as coordinates\r\n }\r\n shadows.push({\r\n prefix: matches[1] || '',\r\n x: x,\r\n y: y,\r\n xUnits: xUnits,\r\n yUnits: yUnits,\r\n end: matches[8],\r\n });\r\n }\r\n return shadows;\r\n}\r\n/**\r\n * Modify box-shadow x/y offsets to counteract rotation\r\n */\r\nfunction normalizeShadow(shadows, degrees) {\r\n var normalized = [];\r\n for (var _i = 0, shadows_1 = shadows; _i < shadows_1.length; _i++) {\r\n var shadow = shadows_1[_i];\r\n var xy = convertOffset(shadow.x, shadow.y, degrees);\r\n normalized.push(shadow.prefix + xy[0] + shadow.xUnits + ' ' + xy[1] + shadow.yUnits + shadow.end);\r\n }\r\n return normalized.join(', ');\r\n}\r\nfunction convertOffset(x, y, degrees) {\r\n var radians = degrees * Math.PI / 180;\r\n var sin = Math.sin(radians);\r\n var cos = Math.cos(radians);\r\n return [\r\n Math.round((x * cos + y * sin) * 1000) / 1000,\r\n Math.round((-x * sin + y * cos) * 1000) / 1000,\r\n ];\r\n}\r\n","import Component from '../Component';\nimport {Spinner, SpinnerOptions} from 'spin.js';\n\n/**\n * The `LoadingIndicator` component displays a loading spinner with spin.js. It\n * may have the following special props:\n *\n * - `size` The spin.js size preset to use. Defaults to 'small'.\n *\n * All other props will be assigned as attributes on the element.\n */\nexport default class LoadingIndicator extends Component {\n view(vnode) {\n const attrs = vnode.attrs;\n\n attrs.className = 'LoadingIndicator ' + (attrs.className || '');\n delete attrs.size;\n\n return
{m.trust(' ')}
;\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n const options: SpinnerOptions = { zIndex: 'auto', color: this.$().css('color') };\n let sizeOptions: SpinnerOptions = {};\n\n switch (vnode.attrs.size) {\n case 'large':\n sizeOptions = { lines: 10, length: 8, width: 4, radius: 8 };\n break;\n\n case 'tiny':\n sizeOptions = { lines: 8, length: 2, width: 2, radius: 3 };\n break;\n\n default:\n sizeOptions = { lines: 8, length: 4, width: 3, radius: 5 };\n }\n\n new Spinner({ ...options, ...sizeOptions }).spin(this.element);\n }\n}\n","import Component, {ComponentProps} from '../Component';\nimport icon from '../helpers/icon';\nimport extract from '../utils/extract';\nimport extractText from '../utils/extractText';\nimport LoadingIndicator from './LoadingIndicator';\n\nexport interface ButtonProps extends ComponentProps {\n title?: string,\n type?: string,\n icon?: string,\n\n loading?: boolean,\n disabled?: boolean,\n onclick?: Function\n}\n\n/**\n * The `Button` component defines an element which, when clicked, performs an\n * action. The button may have the following special props:\n *\n * - `icon` The name of the icon class. If specified, the button will be given a\n * 'has-icon' class name.\n * - `disabled` Whether or not the button is disabled. If truthy, the button\n * will be given a 'disabled' class name, and any `onclick` handler will be\n * removed.\n * - `loading` Whether or not the button should be in a disabled loading state.\n *\n * All other props will be assigned as attributes on the button element.\n *\n * Note that a Button has no default class names. This is because a Button can\n * be used to represent any generic clickable control, like a menu item.\n */\nexport default class Button extends Component {\n view(vnode) {\n const attrs: ButtonProps = vnode.attrs;\n const children = attrs.children;\n\n delete attrs.children;\n\n attrs.className = attrs.className || '';\n attrs.type = attrs.type || 'button';\n\n // If nothing else is provided, we use the textual button content as tooltip\n if (!attrs.title && this.props.children) {\n attrs.title = extractText(this.props.children);\n }\n\n const iconName = extract(attrs, 'icon');\n if (iconName) attrs.className += ' hasIcon';\n\n const loading = extract(attrs, 'loading');\n if (attrs.disabled || loading) {\n attrs.className += ' disabled' + (loading ? ' loading' : '');\n delete attrs.onclick;\n }\n\n return ;\n }\n\n /**\n * Get the template for the button's content.\n */\n protected getButtonContent(iconName?: string|boolean, loading?: boolean, children?: any) : any[] {\n return [\n iconName && iconName !== true ? icon(iconName, {className: 'Button-icon'}) : '',\n children ? {children} : '',\n loading ? LoadingIndicator.component({size: 'tiny', className: 'LoadingIndicator--inline'}) : ''\n ];\n }\n}\n","import Component from '../Component';\n\n/**\n * The `Separator` component defines a menu separator item.\n */\nexport default class Separator extends Component {\n static isListItem = true;\n\n view() {\n return
  • ;\n }\n}\n","import Separator from '../components/Separator';\n\nexport function isSeparator(item) {\n return item && item.component === Separator;\n}\n\nexport function withoutUnnecessarySeparators(items) {\n const newItems = [];\n let prevItem;\n\n items.forEach((item, i) => {\n if (!isSeparator(item) || (prevItem && !isSeparator(prevItem) && i !== items.length - 1)) {\n prevItem = item;\n newItems.push(item);\n }\n });\n\n return newItems;\n}\n\n/**\n * The `listItems` helper wraps a collection of components in
  • tags,\n * stripping out any unnecessary `Separator` components.\n *\n * @param {*} items\n * @return {Array}\n */\nexport default function listItems(items) {\n if (!(items instanceof Array)) items = [items];\n\n return withoutUnnecessarySeparators(items).map(item => {\n const isListItem = item.component && item.component.isListItem;\n const active = item.component && item.component.isActive && item.component.isActive(item.props);\n const className = item.props ? item.props.itemClassName : item.itemClassName;\n\n if (isListItem) {\n item.attrs = item.attrs || {};\n item.attrs.key = item.attrs.key || item.itemName;\n }\n\n return isListItem\n ? item\n :
  • \n {item}\n
  • ;\n });\n}\n","const MicroModal = (() => {\n\n const FOCUSABLE_ELEMENTS = ['a[href]', 'area[href]', 'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])', 'select:not([disabled]):not([aria-hidden])', 'textarea:not([disabled]):not([aria-hidden])', 'button:not([disabled]):not([aria-hidden])', 'iframe', 'object', 'embed', '[contenteditable]', '[tabindex]:not([tabindex^=\"-\"])'];\n\n class Modal {\n constructor({\n targetModal,\n triggers = [],\n onShow = () => {},\n onClose = () => {},\n openTrigger = 'data-micromodal-trigger',\n closeTrigger = 'data-micromodal-close',\n disableScroll = false,\n disableFocus = false,\n awaitCloseAnimation = false,\n awaitOpenAnimation = false,\n debugMode = false\n }) {\n // Save a reference of the modal\n this.modal = document.getElementById(targetModal); // Save a reference to the passed config\n\n this.config = {\n debugMode,\n disableScroll,\n openTrigger,\n closeTrigger,\n onShow,\n onClose,\n awaitCloseAnimation,\n awaitOpenAnimation,\n disableFocus // Register click events only if pre binding eventListeners\n\n };\n if (triggers.length > 0) this.registerTriggers(...triggers); // pre bind functions for event listeners\n\n this.onClick = this.onClick.bind(this);\n this.onKeydown = this.onKeydown.bind(this);\n }\n /**\n * Loops through all openTriggers and binds click event\n * @param {array} triggers [Array of node elements]\n * @return {void}\n */\n\n\n registerTriggers(...triggers) {\n triggers.filter(Boolean).forEach(trigger => {\n trigger.addEventListener('click', event => this.showModal(event));\n });\n }\n\n showModal() {\n this.activeElement = document.activeElement;\n this.modal.setAttribute('aria-hidden', 'false');\n this.modal.classList.add('is-open');\n this.scrollBehaviour('disable');\n this.addEventListeners();\n\n if (this.config.awaitOpenAnimation) {\n const handler = () => {\n this.modal.removeEventListener('animationend', handler, false);\n this.setFocusToFirstNode();\n };\n\n this.modal.addEventListener('animationend', handler, false);\n } else {\n this.setFocusToFirstNode();\n }\n\n this.config.onShow(this.modal, this.activeElement);\n }\n\n closeModal() {\n const modal = this.modal;\n this.modal.setAttribute('aria-hidden', 'true');\n this.removeEventListeners();\n this.scrollBehaviour('enable');\n\n if (this.activeElement) {\n this.activeElement.focus();\n }\n\n this.config.onClose(this.modal);\n\n if (this.config.awaitCloseAnimation) {\n this.modal.addEventListener('animationend', function handler() {\n modal.classList.remove('is-open');\n modal.removeEventListener('animationend', handler, false);\n }, false);\n } else {\n modal.classList.remove('is-open');\n }\n }\n\n closeModalById(targetModal) {\n this.modal = document.getElementById(targetModal);\n if (this.modal) this.closeModal();\n }\n\n scrollBehaviour(toggle) {\n if (!this.config.disableScroll) return;\n const body = document.querySelector('body');\n\n switch (toggle) {\n case 'enable':\n Object.assign(body.style, {\n overflow: '',\n height: ''\n });\n break;\n\n case 'disable':\n Object.assign(body.style, {\n overflow: 'hidden',\n height: '100vh'\n });\n break;\n\n default:\n }\n }\n\n addEventListeners() {\n this.modal.addEventListener('touchstart', this.onClick);\n this.modal.addEventListener('click', this.onClick);\n document.addEventListener('keydown', this.onKeydown);\n }\n\n removeEventListeners() {\n this.modal.removeEventListener('touchstart', this.onClick);\n this.modal.removeEventListener('click', this.onClick);\n document.removeEventListener('keydown', this.onKeydown);\n }\n\n onClick(event) {\n if (event.target.hasAttribute(this.config.closeTrigger)) {\n this.closeModal();\n event.preventDefault();\n }\n }\n\n onKeydown(event) {\n if (event.keyCode === 27) this.closeModal(event);\n if (event.keyCode === 9) this.maintainFocus(event);\n }\n\n getFocusableNodes() {\n const nodes = this.modal.querySelectorAll(FOCUSABLE_ELEMENTS);\n return Array(...nodes);\n }\n\n setFocusToFirstNode() {\n if (this.config.disableFocus) return;\n const focusableNodes = this.getFocusableNodes();\n if (focusableNodes.length) focusableNodes[0].focus();\n }\n\n maintainFocus(event) {\n const focusableNodes = this.getFocusableNodes(); // if disableFocus is true\n\n if (!this.modal.contains(document.activeElement)) {\n focusableNodes[0].focus();\n } else {\n const focusedItemIndex = focusableNodes.indexOf(document.activeElement);\n\n if (event.shiftKey && focusedItemIndex === 0) {\n focusableNodes[focusableNodes.length - 1].focus();\n event.preventDefault();\n }\n\n if (!event.shiftKey && focusedItemIndex === focusableNodes.length - 1) {\n focusableNodes[0].focus();\n event.preventDefault();\n }\n }\n }\n\n }\n /**\n * Modal prototype ends.\n * Here on code is responsible for detecting and\n * auto binding event handlers on modal triggers\n */\n // Keep a reference to the opened modal\n\n\n let activeModal = null;\n /**\n * Generates an associative array of modals and it's\n * respective triggers\n * @param {array} triggers An array of all triggers\n * @param {string} triggerAttr The data-attribute which triggers the module\n * @return {array}\n */\n\n const generateTriggerMap = (triggers, triggerAttr) => {\n const triggerMap = [];\n triggers.forEach(trigger => {\n const targetModal = trigger.attributes[triggerAttr].value;\n if (triggerMap[targetModal] === undefined) triggerMap[targetModal] = [];\n triggerMap[targetModal].push(trigger);\n });\n return triggerMap;\n };\n /**\n * Validates whether a modal of the given id exists\n * in the DOM\n * @param {number} id The id of the modal\n * @return {boolean}\n */\n\n\n const validateModalPresence = id => {\n if (!document.getElementById(id)) {\n console.warn(`MicroModal: \\u2757Seems like you have missed %c'${id}'`, 'background-color: #f8f9fa;color: #50596c;font-weight: bold;', 'ID somewhere in your code. Refer example below to resolve it.');\n console.warn(`%cExample:`, 'background-color: #f8f9fa;color: #50596c;font-weight: bold;', `
    `);\n return false;\n }\n };\n /**\n * Validates if there are modal triggers present\n * in the DOM\n * @param {array} triggers An array of data-triggers\n * @return {boolean}\n */\n\n\n const validateTriggerPresence = triggers => {\n if (triggers.length <= 0) {\n console.warn(`MicroModal: \\u2757Please specify at least one %c'micromodal-trigger'`, 'background-color: #f8f9fa;color: #50596c;font-weight: bold;', 'data attribute.');\n console.warn(`%cExample:`, 'background-color: #f8f9fa;color: #50596c;font-weight: bold;', ``);\n return false;\n }\n };\n /**\n * Checks if triggers and their corresponding modals\n * are present in the DOM\n * @param {array} triggers Array of DOM nodes which have data-triggers\n * @param {array} triggerMap Associative array of modals and their triggers\n * @return {boolean}\n */\n\n\n const validateArgs = (triggers, triggerMap) => {\n validateTriggerPresence(triggers);\n if (!triggerMap) return true;\n\n for (var id in triggerMap) validateModalPresence(id);\n\n return true;\n };\n /**\n * Binds click handlers to all modal triggers\n * @param {object} config [description]\n * @return void\n */\n\n\n const init = config => {\n // Create an config object with default openTrigger\n const options = Object.assign({}, {\n openTrigger: 'data-micromodal-trigger'\n }, config); // Collects all the nodes with the trigger\n\n const triggers = [...document.querySelectorAll(`[${options.openTrigger}]`)]; // Makes a mappings of modals with their trigger nodes\n\n const triggerMap = generateTriggerMap(triggers, options.openTrigger); // Checks if modals and triggers exist in dom\n\n if (options.debugMode === true && validateArgs(triggers, triggerMap) === false) return; // For every target modal creates a new instance\n\n for (var key in triggerMap) {\n let value = triggerMap[key];\n options.targetModal = key;\n options.triggers = [...value];\n activeModal = new Modal(options); // eslint-disable-line no-new\n }\n };\n /**\n * Shows a particular modal\n * @param {string} targetModal [The id of the modal to display]\n * @param {object} config [The configuration object to pass]\n * @return {void}\n */\n\n\n const show = (targetModal, config) => {\n const options = config || {};\n options.targetModal = targetModal; // Checks if modals and triggers exist in dom\n\n if (options.debugMode === true && validateModalPresence(targetModal) === false) return; // stores reference to active modal\n\n activeModal = new Modal(options); // eslint-disable-line no-new\n\n activeModal.showModal();\n };\n /**\n * Closes the active modal\n * @param {string} targetModal [The id of the modal to close]\n * @return {void}\n */\n\n\n const close = targetModal => {\n targetModal ? activeModal.closeModalById(targetModal) : activeModal.closeModal();\n };\n\n return {\n init,\n show,\n close\n };\n})();\n\nexport default MicroModal;\n","import Component, {ComponentProps} from '../Component';\nimport Button from './Button';\nimport listItems from '../helpers/listItems';\nimport extract from '../utils/extract';\nimport * as Mithril from \"mithril\";\n\nexport interface AlertProps extends ComponentProps {\n controls?: Mithril.ChildArray,\n type?: string,\n dismissible?: boolean,\n\n ondismiss?: () => any,\n}\n\n/**\n * The `Alert` component represents an alert box, which contains a message,\n * some controls, and may be dismissible.\n *\n * The alert may have the following special props:\n *\n * - `type` The type of alert this is. Will be used to give the alert a class\n * name of `Alert--{type}`.\n * - `controls` An array of controls to show in the alert.\n * - `dismissible` Whether or not the alert can be dismissed.\n * - `ondismiss` A callback to run when the alert is dismissed.\n *\n * All other props will be assigned as attributes on the alert element.\n */\nexport default class Alert extends Component {\n view() {\n const attrs: AlertProps = Object.assign({}, this.props);\n\n const type: string = extract(attrs, 'type');\n attrs.className = `Alert Alert--${type} ${attrs.className || ''}`;\n\n const children: Mithril.Children = extract(attrs, 'children');\n const controls: Mithril.ChildArray = extract(attrs, 'controls') || [];\n\n // If the alert is meant to be dismissible (which is the case by default),\n // then we will create a dismiss button to append as the final control in\n // the alert.\n const dismissible: boolean|undefined = extract(attrs, 'dismissible');\n const ondismiss: () => any = extract(attrs, 'ondismiss');\n const dismissControl = [];\n\n if (dismissible || dismissible === undefined) {\n dismissControl.push(\n \n );\n }\n\n return (\n
    \n \n {children}\n \n
      \n {listItems(controls.concat(dismissControl))}\n
    \n
    \n );\n }\n}\n","import Component, {ComponentProps} from '../Component';\nimport Button from './Button';\nimport RequestError from \"../utils/RequestError\";\n\n/**\n * The `Modal` component displays a modal dialog, wrapped in a form. Subclasses\n * should implement the `className`, `title`, and `content` methods.\n */\nexport default abstract class Modal extends Component {\n /**\n * An alert component to show below the header.\n */\n alert: Mithril.Vnode;\n\n loading: boolean;\n\n view() {\n if (this.alert) {\n this.alert.attrs.dismissible = false;\n }\n\n return (\n
    \n
    \n {this.isDismissible() ? (\n
    \n {Button.component({\n icon: 'fas fa-times',\n onclick: this.hide.bind(this),\n className: 'Button Button--icon Button--link'\n })}\n
    \n ) : ''}\n\n
    \n
    \n

    {this.title()}

    \n
    \n\n {this.alert &&
    {this.alert}
    }\n\n {this.content()}\n
    \n
    \n
    \n );\n }\n\n /**\n * Determine whether or not the modal should be dismissible via an 'x' button.\n */\n isDismissible(): boolean {\n return true;\n }\n\n /**\n * Get the class name to apply to the modal.\n */\n abstract className(): string;\n\n /**\n * Get the title of the modal dialog.\n */\n abstract title(): string;\n\n /**\n * Get the content of the modal.\n */\n abstract content();\n\n /**\n * Handle the modal form's submit event.\n */\n onsubmit(e: Event) {}\n\n /**\n * Focus on the first input when the modal is ready to be used.\n */\n onready() {\n this.$('form').find('input, select, textarea').first().focus().select();\n }\n\n onhide() {}\n\n /**\n * Hide the modal.\n */\n hide() {\n app.modal.close();\n }\n\n /**\n * Stop loading.\n */\n loaded() {\n this.loading = false;\n m.redraw();\n }\n\n /**\n * Show an alert describing an error returned from the API, and give focus to\n * the first relevant field.\n */\n onerror(error: RequestError) {\n this.alert = error.alert;\n\n m.redraw();\n\n if (error.status === 422 && error.response.errors) {\n this.$(`form [name=\"${error.response.errors[0].source.pointer.replace('/data/attributes/', '')}\"]`).select();\n } else {\n this.onready();\n }\n }\n}\n","import MicroModal from 'micromodal';\n\nimport Component from \"../Component\";\nimport Modal from './Modal';\n\n/**\n * The `ModalManager` component manages a modal dialog. Only one modal dialog\n * can be shown at once; loading a new component into the ModalManager will\n * overwrite the previous one.\n */\nexport default class ModalManager extends Component {\n showing: boolean;\n component: Modal;\n hideTimeout: number;\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n app.modal = this;\n\n window.vnode = vnode;\n }\n\n view() {\n return (\n
    \n {this.component && m(this.component)}\n
    \n );\n }\n\n /**\n * Show a modal dialog.\n */\n show(component: Modal) {\n if (!(component instanceof Modal)) {\n throw new Error('The ModalManager component can only show Modal components');\n }\n\n clearTimeout(this.hideTimeout);\n\n this.showing = true;\n this.component = component;\n\n // if (app.current) app.current.retain = true;\n\n m.redraw(true);\n\n if (!$('.modal-backdrop').length) {\n $('
    ').addClass('modal-backdrop')\n .appendTo('body');\n }\n\n MicroModal.show('Modal', {\n awaitCloseAnimation: true,\n onClose: () => {\n $('.modal-backdrop').fadeOut(200, function () {\n this.remove();\n });\n\n this.showing = false;\n }\n });\n\n this.onready();\n }\n\n onclick(e) {\n if (e.target === this.element) {\n this.close();\n }\n }\n\n /**\n * Close the modal dialog.\n */\n close() {\n if (!this.showing) return;\n\n // Don't hide the modal immediately, because if the consumer happens to call\n // the `show` method straight after to show another modal dialog, it will\n // cause the new modal dialog to disappear. Instead we will wait for a tiny\n // bit to give the `show` method the opportunity to prevent this from going\n // ahead.\n this.hideTimeout = setTimeout(() => MicroModal.close('Modal'));\n }\n\n /**\n * Clear content from the modal area.\n *\n * @protected\n */\n clear() {\n if (this.component) {\n this.component.onhide();\n }\n\n this.component = null;\n\n app.current.retain = false;\n\n m.lazyRedraw();\n }\n\n /**\n * When the modal dialog is ready to be used, tell it!\n *\n * @protected\n */\n onready() {\n if (this.component && this.component.onready) {\n this.component.onready(this.$());\n }\n }\n}\n","import Mithril from \"mithril\";\n\nimport Bus from './Bus';\nimport Translator from './Translator';\nimport Session from './Session';\nimport Store from './Store';\n\nimport extract from './utils/extract';\nimport mapRoutes from './utils/mapRoutes';\nimport Drawer from './utils/Drawer';\nimport {extend} from './extend';\n\nimport Forum from './models/Forum';\nimport Discussion from './models/Discussion';\nimport User from './models/User';\nimport Post from './models/Post';\nimport Group from './models/Group';\nimport Notification from './models/Notification';\n\nimport RequestError from './utils/RequestError';\nimport Alert from './components/Alert';\nimport ModalManager from './components/ModalManager';\n\nexport type ApplicationData = {\n apiDocument: any;\n locale: string;\n locales: any;\n resources: any[];\n session: any;\n};\n\nexport default abstract class Application {\n /**\n * The forum model for this application.\n */\n forum: Forum;\n\n data: ApplicationData;\n\n translator = new Translator();\n bus = new Bus();\n\n /**\n * The app's session.\n */\n session: Session;\n\n /**\n * The app's data store.\n */\n store = new Store({\n forums: Forum,\n users: User,\n discussions: Discussion,\n posts: Post,\n groups: Group,\n notifications: Notification\n });\n\n drawer = new Drawer();\n\n modal: ModalManager;\n\n /**\n * A local cache that can be used to store data at the application level, so\n * that is persists between different routes.\n */\n cache = {};\n\n routes = {};\n\n title = '';\n titleCount = 0;\n\n /**\n * An Alert that was shown as a result of an AJAX request error. If present,\n * it will be dismissed on the next successful request.\n */\n private requestError: Alert = null;\n\n mount(basePath = '') {\n m.mount(document.getElementById('modal'), new ModalManager());\n\n // this.alerts = m.mount(document.getElementById('alerts'), );\n\n m.route(document.getElementById('content'), basePath + '/', mapRoutes(this.routes, basePath));\n }\n\n boot(payload: any) {\n this.data = payload;\n\n this.store.pushPayload({ data: this.data.resources });\n\n this.forum = this.store.getById('forums', 1);\n\n this.session = new Session(\n this.store.getById('users', this.data.session.userId),\n this.data.session.csrfToken\n );\n\n this.locale();\n this.plugins();\n this.setupRoutes();\n this.mount();\n\n this.bus.dispatch('app.booting');\n }\n\n locale() {\n this.translator.locale = this.data.locale;\n\n this.bus.dispatch('app.locale');\n }\n\n plugins() {\n this.bus.dispatch('app.plugins');\n }\n\n setupRoutes() {\n this.bus.dispatch('app.routes');\n }\n\n /**\n * Get the API response document that has been preloaded into the application.\n */\n preloadedApiDocument() {\n if (this.data.apiDocument) {\n const results = this.store.pushPayload(this.data.apiDocument);\n\n this.data.apiDocument = null;\n\n return results;\n }\n\n return null;\n }\n\n /**\n * Set the of the page.\n */\n setTitle(title: string) {\n this.title = title;\n this.updateTitle();\n }\n\n /**\n * Set a number to display in the <title> of the page.\n */\n setTitleCount(count: number) {\n this.titleCount = count;\n this.updateTitle();\n }\n\n updateTitle() {\n document.title = (this.titleCount ? `(${this.titleCount}) ` : '') +\n (this.title ? this.title + ' - ' : '') +\n this.forum.attribute('title');\n }\n\n /**\n * Construct a URL to the route with the given name.\n */\n route(name: string, params: object = {}): string {\n const route = this.routes[name];\n\n if (!route) throw new Error(`Route '${name}' does not exist`);\n\n const url = route.path.replace(/:([^\\/]+)/g, (m, key) => extract(params, key));\n const queryString = m.buildQueryString(params);\n const prefix = m.route.prefix === '' ? this.forum.attribute('basePath') : '';\n\n return prefix + url + (queryString ? '?' + queryString : '');\n }\n\n /**\n * Make an AJAX request, handling any low-level errors that may occur.\n *\n * @see https://mithril.js.org/request.html\n */\n request(originalOptions: Mithril.RequestOptions|any): Promise<any> {\n const options: Mithril.RequestOptions = Object.assign({}, originalOptions);\n\n // Set some default options if they haven't been overridden. We want to\n // authenticate all requests with the session token. We also want all\n // requests to run asynchronously in the background, so that they don't\n // prevent redraws from occurring.\n options.background = options.background || true;\n\n extend(options, 'config', (result, xhr: XMLHttpRequest) => xhr.setRequestHeader('X-CSRF-Token', this.session.csrfToken));\n\n // If the method is something like PATCH or DELETE, which not all servers\n // and clients support, then we'll send it as a POST request with the\n // intended method specified in the X-HTTP-Method-Override header.\n if (options.method !== 'GET' && options.method !== 'POST') {\n const method = options.method;\n extend(options, 'config', (result, xhr: XMLHttpRequest) => xhr.setRequestHeader('X-HTTP-Method-Override', method));\n options.method = 'POST';\n }\n\n // When we deserialize JSON data, if for some reason the server has provided\n // a dud response, we don't want the application to crash. We'll show an\n // error message to the user instead.\n options.deserialize = options.deserialize || (responseText => responseText);\n\n options.errorHandler = options.errorHandler || (error => {\n throw error;\n });\n\n // When extracting the data from the response, we can check the server\n // response code and show an error message to the user if something's gone\n // awry.\n const original = options.extract;\n options.extract = xhr => {\n let responseText;\n\n if (original) {\n responseText = original(xhr.responseText);\n } else {\n responseText = xhr.responseText || null;\n }\n\n const status = xhr.status;\n\n if (status < 200 || status > 299) {\n throw new RequestError(status, responseText, options, xhr);\n }\n\n if (xhr.getResponseHeader) {\n const csrfToken = xhr.getResponseHeader('X-CSRF-Token');\n if (csrfToken) app.session.csrfToken = csrfToken;\n }\n\n try {\n return JSON.parse(responseText);\n } catch (e) {\n throw new RequestError(500, responseText, options, xhr);\n }\n };\n\n // TODO: ALERT MANAGER\n // if (this.requestError) this.alerts.dismiss(this.requestError.alert);\n\n // Now make the request. If it's a failure, inspect the error that was\n // returned and show an alert containing its contents.\n // const deferred = m.deferred();\n\n // return new Promise((resolve, reject) => )\n\n return m.request(options)\n .then(res => res, error => {\n this.requestError = error;\n\n let children;\n\n switch (error.status) {\n case 422:\n children = error.response.errors\n .map(error => [error.detail, m('br')])\n .reduce((a, b) => a.concat(b), [])\n .slice(0, -1);\n break;\n\n case 401:\n case 403:\n children = this.translator.trans('core.lib.error.permission_denied_message');\n break;\n\n case 404:\n case 410:\n children = this.translator.trans('core.lib.error.not_found_message');\n break;\n\n case 429:\n children = this.translator.trans('core.lib.error.rate_limit_exceeded_message');\n break;\n\n default:\n children = this.translator.trans('core.lib.error.generic_message');\n }\n\n error.alert = Alert.component({\n type: 'error',\n children\n });\n\n try {\n options.errorHandler(error);\n } catch (error) {\n console.error(error);\n // this.alerts.show(error.alert);\n }\n\n return Promise.reject(error);\n });\n\n // return deferred.promise;\n }\n}\n","import { RouteDefs } from 'mithril';\n\n/**\n * The `mapRoutes` utility converts a map of named application routes into a\n * format that can be understood by Mithril.\n *\n * @see https://lhorie.github.io/mithril/mithril.route.html#defining-routes\n */\nexport default function mapRoutes(routes: object, basePath: string = ''): RouteDefs {\n const map = {};\n\n for (const key in routes) {\n const route = routes[key];\n\n if (route.component) {\n if (!route.component.attrs) route.component.attrs = {};\n route.component.attrs.routeName = key;\n }\n\n map[basePath + route.path] = route.component;\n }\n\n return map;\n}\n","export interface StackItem {\n name: string;\n title: string;\n url?: string;\n}\n\n/**\n * The `History` class keeps track and manages a stack of routes that the user\n * has navigated to in their session.\n *\n * An item can be pushed to the top of the stack using the `push` method. An\n * item in the stack has a name and a URL. The name need not be unique; if it is\n * the same as the item before it, that will be overwritten with the new URL. In\n * this way, if a user visits a discussion, and then visits another discussion,\n * popping the history stack will still take them back to the discussion list\n * rather than the previous discussion.\n */\nexport default class History {\n /**\n * The stack of routes that have been navigated to.\n */\n protected stack: StackItem[] = [];\n\n /**\n * Get the item on the top of the stack.\n */\n getCurrent(): StackItem {\n return this.stack[this.stack.length - 1];\n }\n\n /**\n * Get the previous item on the stack.\n */\n getPrevious(): StackItem {\n return this.stack[this.stack.length - 2];\n }\n\n /**\n * Push an item to the top of the stack.\n *\n * @param {String} name The name of the route.\n * @param {String} title The title of the route.\n * @param {String} [url] The URL of the route. The current URL will be used if\n * not provided.\n */\n push(name: string, title: string, url: string = m.route.get()) {\n // If we're pushing an item with the same name as second-to-top item in the\n // stack, we will assume that the user has clicked the 'back' button in\n // their browser. In this case, we don't want to push a new item, so we will\n // pop off the top item, and then the second-to-top item will be overwritten\n // below.\n const secondTop = this.stack[this.stack.length - 2];\n if (secondTop && secondTop.name === name) {\n this.stack.pop();\n }\n\n // If we're pushing an item with the same name as the top item in the stack,\n // then we'll overwrite it with the new URL.\n const top = this.getCurrent();\n if (top && top.name === name) {\n Object.assign(top, {url, title});\n } else {\n this.stack.push({name, url, title});\n }\n }\n\n /**\n * Check whether or not the history stack is able to be popped.\n */\n canGoBack(): boolean {\n return this.stack.length > 1;\n }\n\n /**\n * Go back to the previous route in the history stack.\n */\n back() {\n if (! this.canGoBack()) {\n return this.home();\n }\n\n this.stack.pop();\n\n m.route.set(this.getCurrent().url);\n }\n\n /**\n * Get the URL of the previous page.\n */\n backUrl(): string {\n const secondTop = this.stack[this.stack.length - 2];\n\n return secondTop.url;\n }\n\n /**\n * Go to the first route in the history stack.\n */\n home() {\n this.stack.splice(0);\n\n m.route.set('/');\n }\n}\n","import Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `HeaderPrimary` component displays primary header controls. On the\n * default skin, these are shown just to the right of the forum title.\n */\nexport default class HeaderPrimary extends Component {\n view() {\n return (\n <ul className=\"Header-controls\">\n {listItems(this.items().toArray())}\n </ul>\n );\n }\n\n /**\n * Build an item list for the controls.\n */\n items(): ItemList {\n return new ItemList();\n }\n}\n","import Stream from 'mithril/stream';\n\nimport Modal from '../../common/components/Modal';\nimport {ComponentProps} from '../../common/Component';\nimport ItemList from \"../../common/utils/ItemList\";\nimport Button from \"../../common/components/Button\";\n\nexport interface LogInModalProps extends ComponentProps {\n username?: string;\n password?: string;\n remember?: boolean;\n}\n\n/**\n * The `LogInModal` component displays a modal dialog with a login form.\n *\n * ### Props\n *\n * - `identification`\n * - `password`\n * - `remember`\n */\nexport default class LogInModal extends Modal<LogInModalProps> {\n /**\n * The value of the identification input.\n */\n identification: Stream<string>;\n\n /**\n * The value of the password input.\n */\n password: Stream<string>;\n\n /**\n * The value of the remember me input.\n */\n remember: Stream<string>;\n\n oninit(vnode) {\n super.oninit(vnode);\n\n console.log('#oninit');\n\n this.identification = m.prop(this.props.identification || '');\n\n this.password = m.prop(this.props.password || '');\n\n this.remember = m.prop(!!this.props.remember);\n }\n\n className(): string {\n return 'LogInModal Modal--small';\n }\n\n title(): string {\n return app.translator.transText('core.forum.log_in.title');\n }\n\n content() {\n return [\n <div className=\"Modal-body\">\n {this.body()}\n </div>,\n <div className=\"Modal-footer\">\n {this.footer()}\n </div>\n ];\n }\n\n body() {\n return [\n // <LogInButtons/>,\n\n <div className=\"Form Form--centered\">\n {this.fields().toArray()}\n </div>\n ];\n }\n\n fields() {\n const items = new ItemList();\n\n items.add('identification', <div className=\"Form-group\">\n <input className=\"FormControl\" name=\"identification\" type=\"text\" placeholder={app.translator.transText('core.forum.log_in.username_or_email_placeholder')}\n bidi={this.identification}\n disabled={this.loading} />\n </div>, 30);\n\n items.add('password', <div className=\"Form-group\">\n <input className=\"FormControl\" name=\"password\" type=\"password\" placeholder={app.translator.transText('core.forum.log_in.password_placeholder')}\n bidi={this.password}\n disabled={this.loading} />\n </div>, 20);\n\n items.add('remember', <div className=\"Form-group\">\n <div>\n <label className=\"checkbox\">\n <input type=\"checkbox\" bidi={this.remember} disabled={this.loading} />\n {app.translator.trans('core.forum.log_in.remember_me_label')}\n </label>\n </div>\n </div>, 10);\n\n items.add('submit', <div className=\"Form-group\">\n {Button.component({\n className: 'Button Button--primary Button--block',\n type: 'submit',\n loading: this.loading,\n children: app.translator.trans('core.forum.log_in.submit_button')\n })}\n </div>, -10);\n\n return items;\n }\n\n footer() {\n return [\n <p className=\"LogInModal-forgotPassword\">\n <a onclick={this.forgotPassword.bind(this)}>{app.translator.trans('core.forum.log_in.forgot_password_link')}</a>\n </p>,\n\n app.forum.attribute('allowSignUp') && (\n <p className=\"LogInModal-signUp\">\n {app.translator.trans('core.forum.log_in.sign_up_text', {a: <a onclick={this.signUp.bind(this)}/> })}\n </p>\n )\n ];\n }\n\n /**\n * Open the forgot password modal, prefilling it with an email if the user has\n * entered one.\n *\n * @public\n */\n forgotPassword() {\n const email = this.identification();\n const props = email.indexOf('@') !== -1 ? {email} : undefined;\n\n app.modal.show(new ForgotPasswordModal(props));\n }\n\n /**\n * Open the sign up modal, prefilling it with an email/username/password if\n * the user has entered one.\n *\n * @public\n */\n signUp() {\n const props = {password: this.password()};\n const identification = this.identification();\n props[identification.indexOf('@') !== -1 ? 'email' : 'username'] = identification;\n\n // app.modal.show(new SignUpModal(props));\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n this.$(`[name=\"${this.identification() ? 'password' : 'identification'}\"]`).select();\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n const identification = this.identification();\n const password = this.password();\n const remember = this.remember();\n\n app.session.login({identification, password, remember}, {errorHandler: this.onerror.bind(this)})\n .then(\n () => window.location.reload(),\n this.loaded.bind(this)\n );\n }\n\n onerror(error) {\n if (error.status === 401) {\n error.alert.attrs.children = app.translator.trans('core.forum.log_in.invalid_login_message');\n }\n\n super.onerror(error);\n }\n}\n","/**\n * The `avatar` helper displays a user's avatar.\n *\n * @param {User} user\n * @param {Object} attrs Attributes to apply to the avatar element\n * @return {Object}\n */\nexport default function avatar(user, attrs: any = {}) {\n attrs.className = 'Avatar ' + (attrs.className || '');\n let content = '';\n\n // If the `title` attribute is set to null or false, we don't want to give the\n // avatar a title. On the other hand, if it hasn't been given at all, we can\n // safely default it to the user's username.\n const hasTitle = attrs.title === 'undefined' || attrs.title;\n if (!hasTitle) delete attrs.title;\n\n // If a user has been passed, then we will set up an avatar using their\n // uploaded image, or the first letter of their username if they haven't\n // uploaded one.\n if (user) {\n const username = user.displayName() || '?';\n const avatarUrl = user.avatarUrl();\n\n if (hasTitle) attrs.title = attrs.title || username;\n\n if (avatarUrl) {\n return <img {...attrs} src={avatarUrl}/>;\n }\n\n content = username.charAt(0).toUpperCase();\n attrs.style = {background: user.color()};\n }\n\n return <span {...attrs}>{content}</span>;\n}\n","import Component, {ComponentProps} from '../Component';\nimport icon from '../helpers/icon';\nimport listItems from '../helpers/listItems';\n\nexport interface DropdownProps extends ComponentProps {\n buttonClassName?: string;\n menuClassName?: string;\n label?: string;\n icon?: string;\n caretIcon?: undefined|string;\n\n onhide?: Function;\n onshow?: Function;\n onclick?: Function;\n}\n\n/**\n * The `Dropdown` component displays a button which, when clicked, shows a\n * dropdown menu beneath it.\n *\n * ### Props\n *\n * - `buttonClassName` A class name to apply to the dropdown toggle button.\n * - `menuClassName` A class name to apply to the dropdown menu.\n * - `icon` The name of an icon to show in the dropdown toggle button.\n * - `caretIcon` The name of an icon to show on the right of the button.\n * - `label` The label of the dropdown toggle button. Defaults to 'Controls'.\n * - `onhide`\n * - `onshow`\n *\n * The children will be displayed as a list inside of the dropdown menu.\n */\nexport default class Dropdown<T extends DropdownProps = DropdownProps> extends Component<T> {\n showing: boolean;\n\n static initProps(props: DropdownProps) {\n props.className = props.className || '';\n props.buttonClassName = props.buttonClassName || '';\n props.menuClassName = props.menuClassName || '';\n props.label = props.label || '';\n props.caretIcon = typeof props.caretIcon !== 'undefined' ? props.caretIcon : 'fas fa-caret-down';\n }\n\n view() {\n const items = this.props.children ? listItems(this.props.children) : [];\n\n return (\n <div className={`ButtonGroup Dropdown dropdown ${this.props.className} itemCount${items.length}${this.showing ? ' open' : ''}`}>\n {this.getButton()}\n {this.getMenu(items)}\n </div>\n );\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n this.$('> .Dropdown-toggle').dropdown();\n\n // When opening the dropdown menu, work out if the menu goes beyond the\n // bottom of the viewport. If it does, we will apply class to make it show\n // above the toggle button instead of below it.\n this.element.addEventListener('shown.bs.dropdown', () => {\n this.showing = true;\n\n if (this.props.onshow) {\n this.props.onshow();\n }\n\n m.redraw();\n\n const $menu = this.$('.Dropdown-menu');\n const isRight = $menu.hasClass('Dropdown-menu--right');\n\n $menu.removeClass('Dropdown-menu--top Dropdown-menu--right');\n\n $menu.toggleClass(\n 'Dropdown-menu--top',\n $menu.offset().top + $menu.height() > $(window).scrollTop() + $(window).height()\n );\n\n if ($menu.offset().top < 0) {\n $menu.removeClass('Dropdown-menu--top');\n }\n\n $menu.toggleClass(\n 'Dropdown-menu--right',\n isRight || $menu.offset().left + $menu.width() > $(window).scrollLeft() + $(window).width()\n );\n });\n\n this.element.addEventListener('hidden.bs.dropdown', () => {\n this.showing = false;\n\n if (this.props.onhide) {\n this.props.onhide();\n }\n\n m.redraw();\n });\n }\n\n /**\n * Get the template for the button.\n */\n protected getButton(): any {\n return (\n <button\n className={'Dropdown-toggle ' + this.props.buttonClassName}\n data-toggle=\"dropdown\"\n onclick={this.props.onclick}>\n {this.getButtonContent()}\n </button>\n );\n }\n\n /**\n * Get the template for the button's content.\n *\n * @return {*}\n */\n protected getButtonContent() {\n const attrs = this.props;\n\n return [\n attrs.icon ? icon(attrs.icon, {className: 'Button-icon'}) : '',\n <span className=\"Button-label\">{attrs.label}</span>,\n attrs.caretIcon ? icon(attrs.caretIcon, {className: 'Button-caret'}) : ''\n ];\n }\n\n protected getMenu(items) {\n return (\n <ul className={'Dropdown-menu dropdown-menu ' + this.props.menuClassName}>\n {items}\n </ul>\n );\n }\n}\n","import Button, {ButtonProps} from './Button';\n\ninterface LinkButtonProps extends ButtonProps {\n active: boolean;\n oncreate: Function;\n href?: string;\n}\n\n/**\n * The `LinkButton` component defines a `Button` which links to a route.\n *\n * ### Props\n *\n * All of the props accepted by `Button`, plus:\n *\n * - `active` Whether or not the page that this button links to is currently\n * active.\n * - `href` The URL to link to. If the current URL `m.route()` matches this,\n * the `active` prop will automatically be set to true.\n */\nexport default class LinkButton extends Button<LinkButtonProps> {\n static initProps(props: LinkButtonProps) {\n props.active = this.isActive(props);\n props.oncreate = props.oncreate;\n }\n\n view(vnode) {\n const vdom = super.view(vnode);\n\n vdom.tag = m.route.Link;\n\n return vdom;\n }\n\n /**\n * Determine whether a component with the given props is 'active'.\n */\n static isActive(props: LinkButtonProps): boolean {\n return typeof props.active !== 'undefined'\n ? props.active\n : m.route.get() === props.href;\n }\n}\n","import avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport Dropdown from '../../common/components/Dropdown';\nimport LinkButton from '../../common/components/LinkButton';\nimport Button from '../../common/components/Button';\nimport ItemList from '../../common/utils/ItemList';\nimport Separator from '../../common/components/Separator';\nimport Group from '../../common/models/Group';\n\n/**\n * The `SessionDropdown` component shows a button with the current user's\n * avatar/name, with a dropdown of session controls.\n */\nexport default class SessionDropdown extends Dropdown {\n static initProps(props) {\n super.initProps(props);\n\n props.className = 'SessionDropdown';\n props.buttonClassName = 'Button Button--user Button--flat';\n props.menuClassName = 'Dropdown-menu--right';\n }\n\n view() {\n this.props.children = this.items().toArray();\n\n return super.view();\n }\n\n getButtonContent() {\n const user = app.session.user;\n\n return [\n avatar(user), ' ',\n <span className=\"Button-label\">{username(user)}</span>\n ];\n }\n\n /**\n * Build an item list for the contents of the dropdown menu.\n */\n items(): ItemList {\n const items = new ItemList();\n const user = app.session.user;\n\n items.add('profile',\n LinkButton.component({\n icon: 'fas fa-user',\n children: app.translator.trans('core.forum.header.profile_button'),\n href: app.route.user(user)\n }),\n 100\n );\n\n // items.add('settings',\n // LinkButton.component({\n // icon: 'fas fa-cog',\n // children: app.translator.trans('core.forum.header.settings_button'),\n // href: app.route('settings')\n // }),\n // 50\n // );\n\n if (app.forum.attribute('adminUrl')) {\n items.add('administration',\n LinkButton.component({\n icon: 'fas fa-wrench',\n children: app.translator.trans('core.forum.header.admin_button'),\n href: app.forum.attribute('adminUrl'),\n target: '_blank',\n config: () => {}\n }),\n 0\n );\n }\n\n items.add('separator', Separator.component(), -90);\n\n items.add('logOut',\n Button.component({\n icon: 'fas fa-sign-out-alt',\n children: app.translator.trans('core.forum.header.log_out_button'),\n onclick: app.session.logout.bind(app.session)\n }),\n -100\n );\n\n return items;\n }\n}\n","import Dropdown, {DropdownProps} from './Dropdown';\nimport icon from '../helpers/icon';\n\nexport interface SelectDropdownProps extends DropdownProps {\n defaultLabel?: string;\n}\n\n/**\n * The `SelectDropdown` component is the same as a `Dropdown`, except the toggle\n * button's label is set as the label of the first child which has a truthy\n * `active` prop.\n *\n * ### Props\n *\n * - `caretIcon`\n * - `defaultLabel`\n */\nexport default class SelectDropdown extends Dropdown<SelectDropdownProps> {\n static initProps(props: SelectDropdownProps) {\n props.caretIcon = typeof props.caretIcon !== 'undefined' ? props.caretIcon : 'fas fa-sort';\n\n super.initProps(props);\n\n props.className += ' Dropdown--select';\n }\n\n getButtonContent() {\n const activeChild = this.props.children.filter(child => child.attrs.active)[0];\n let label = activeChild && activeChild.attrs.children || this.props.defaultLabel;\n\n if (label instanceof Array) label = label[0];\n\n return [\n <span className=\"Button-label\">{label}</span>,\n icon(this.props.caretIcon, {className: 'Button-caret'})\n ];\n }\n}\n","import Component from '../../common/Component';\nimport listItems from '../../common/helpers/listItems';\nimport Button from '../../common/components/Button';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Notification from '../../common/models/Notification';\nimport Discussion from '../../common/models/Discussion';\n\n/**\n * The `NotificationList` component displays a list of the logged-in user's\n * notifications, grouped by discussion.\n */\nexport default class NotificationList extends Component {\n /**\n * Whether or not the notifications are loading.\n */\n loading: boolean = false;\n\n /**\n * Whether or not there are more results that can be loaded.\n */\n moreResults: boolean = false;\n\n private $scrollParent: ZeptoCollection;\n private scrollHandler: () => void;\n\n view() {\n const pages = app.cache.notifications || [];\n\n return (\n <div className=\"NotificationList\">\n <div className=\"NotificationList-header\">\n <div className=\"App-primaryControl\">\n {Button.component({\n className: 'Button Button--icon Button--link',\n icon: 'fas fa-check',\n title: app.translator.transText('core.forum.notifications.mark_all_as_read_tooltip'),\n onclick: this.markAllAsRead.bind(this)\n })}\n </div>\n\n <h4 className=\"App-titleControl App-titleControl--text\">{app.translator.trans('core.forum.notifications.title')}</h4>\n </div>\n\n <div className=\"NotificationList-content\">\n {pages.length ? pages.map(notifications => {\n const groups = [];\n const discussions = {};\n\n notifications.forEach(notification => {\n const subject = notification.subject();\n\n if (typeof subject === 'undefined') return;\n\n // Get the discussion that this notification is related to. If it's not\n // directly related to a discussion, it may be related to a post or\n // other entity which is related to a discussion.\n let discussion: any = false;\n if (subject instanceof Discussion) discussion = subject;\n else if (subject && subject.discussion) discussion = subject.discussion();\n\n // If the notification is not related to a discussion directly or\n // indirectly, then we will assign it to a neutral group.\n const key = discussion ? discussion.id() : 0;\n discussions[key] = discussions[key] || {discussion: discussion, notifications: []};\n discussions[key].notifications.push(notification);\n\n if (groups.indexOf(discussions[key]) === -1) {\n groups.push(discussions[key]);\n }\n });\n\n return groups.map(group => {\n const badges = group.discussion && group.discussion.badges().toArray();\n\n return (\n <div className=\"NotificationGroup\">\n {group.discussion\n ? (\n <m.route.Link className=\"NotificationGroup-header\"\n href={app.route.discussion(group.discussion)}>\n {badges && badges.length ? <ul className=\"NotificationGroup-badges badges\">{listItems(badges)}</ul> : ''}\n {group.discussion.title()}\n </m.route.Link>\n ) : (\n <div className=\"NotificationGroup-header\">\n {app.forum.attribute('title')}\n </div>\n )}\n\n <ul className=\"NotificationGroup-content\">\n {group.notifications.map(notification => {\n const NotificationComponent = app.notificationComponents[notification.contentType()];\n return NotificationComponent ? <li>{NotificationComponent.component({notification})}</li> : '';\n })}\n </ul>\n </div>\n );\n });\n }) : ''}\n {this.loading\n ? <LoadingIndicator className=\"LoadingIndicator--block\" />\n : (pages.length ? '' : <div className=\"NotificationList-empty\">{app.translator.trans('core.forum.notifications.empty_text')}</div>)}\n </div>\n </div>\n );\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n const $notifications = this.$('.NotificationList-content');\n const $scrollParent = this.$scrollParent = $notifications.css('overflow') === 'auto' ? $notifications : $(window);\n\n this.scrollHandler = () => {\n const scrollTop = $scrollParent.scrollTop();\n const viewportHeight = $scrollParent.height();\n const contentTop = $scrollParent === $notifications ? 0 : $notifications.offset().top;\n const contentHeight = $notifications[0].scrollHeight;\n\n if (this.moreResults && !this.loading && scrollTop + viewportHeight >= contentTop + contentHeight) {\n this.loadMore();\n }\n };\n\n $scrollParent.on('scroll', this.scrollHandler);\n }\n\n onremove(vnode) {\n super.onremove(vnode);\n\n this.$scrollParent.off('scroll', this.scrollHandler);\n }\n\n /**\n * Load notifications into the application's cache if they haven't already\n * been loaded.\n */\n load() {\n if (app.session.user.newNotificationCount()) {\n delete app.cache.notifications;\n }\n\n if (app.cache.notifications) {\n return;\n }\n\n app.session.user.pushAttributes({newNotificationCount: 0});\n\n this.loadMore();\n }\n\n /**\n * Load the next page of notification results.\n */\n loadMore() {\n this.loading = true;\n m.redraw();\n\n const params = app.cache.notifications ? {page: {offset: app.cache.notifications.length * 10}} : null;\n\n return app.store.find('notifications', params)\n .then(this.parseResults.bind(this))\n .catch(() => {})\n .then(() => {\n this.loading = false;\n m.redraw();\n });\n }\n\n /**\n * Parse results and append them to the notification list.\n */\n parseResults(results: Notification[]|any): Notification[]|any {\n app.cache.notifications = app.cache.notifications || [];\n\n if (results.length) app.cache.notifications.push(results);\n\n this.moreResults = !!results.payload.links.next;\n\n return results;\n }\n\n /**\n * Mark all of the notifications as read.\n */\n markAllAsRead() {\n if (!app.cache.notifications) return;\n\n app.session.user.pushAttributes({unreadNotificationCount: 0});\n\n app.cache.notifications.forEach(notifications => {\n notifications.forEach(notification => notification.pushAttributes({isRead: true}))\n });\n\n app.request({\n url: `${app.forum.attribute('apiUrl')}/notifications/read`,\n method: 'POST'\n });\n }\n}\n","import Dropdown from '../../common/components/Dropdown';\nimport icon from '../../common/helpers/icon';\nimport NotificationList from './NotificationList';\n\nexport default class NotificationsDropdown extends Dropdown {\n list = new NotificationList();\n\n static initProps(props) {\n props.className = props.className || 'NotificationsDropdown';\n props.buttonClassName = props.buttonClassName || 'Button Button--flat';\n props.menuClassName = props.menuClassName || 'Dropdown-menu--right';\n props.label = props.label || app.translator.trans('core.forum.notifications.tooltip');\n props.icon = props.icon || 'fas fa-bell';\n\n super.initProps(props);\n }\n\n getButton() {\n const newNotifications = this.getNewCount();\n const vdom = super.getButton();\n\n vdom.attrs.title = this.props.label;\n\n vdom.attrs.className += (newNotifications ? ' new' : '');\n vdom.attrs.onclick = this.onclick.bind(this);\n\n return vdom;\n }\n\n getButtonContent() {\n const unread = this.getUnreadCount();\n\n return [\n icon(this.props.icon, {className: 'Button-icon'}),\n unread ? <span className=\"NotificationsDropdown-unread\">{unread}</span> : '',\n <span className=\"Button-label\">{this.props.label}</span>\n ];\n }\n\n getMenu() {\n return (\n <div className={'Dropdown-menu ' + this.props.menuClassName} onclick={this.menuClick.bind(this)}>\n {this.showing ? m(this.list) : ''}\n </div>\n );\n }\n\n onclick() {\n if (app.drawer.isOpen()) {\n this.goToRoute();\n } else {\n this.list.load();\n }\n }\n\n goToRoute() {\n m.route.set(app.route('notifications'));\n }\n\n getUnreadCount() {\n return app.session.user.unreadNotificationCount();\n }\n\n getNewCount() {\n return app.session.user.newNotificationCount();\n }\n\n menuClick(e) {\n // Don't close the notifications dropdown if the user is opening a link in a\n // new tab or window.\n if (e.shiftKey || e.metaKey || e.ctrlKey || e.which === 2) e.stopPropagation();\n }\n}\n","/**\n * The `KeyboardNavigatable` class manages lists that can be navigated with the\n * keyboard, calling callbacks for each actions.\n *\n * This helper encapsulates the key binding logic, providing a simple fluent\n * API for use.\n */\nexport default class KeyboardNavigatable {\n callbacks = {};\n\n // By default, always handle keyboard navigation.\n whenCallback = () => true;\n\n /**\n * Provide a callback to be executed when navigating upwards.\n *\n * This will be triggered by the Up key.\n */\n onUp(callback: Function): this {\n this.callbacks[38] = e => {\n e.preventDefault();\n callback(e);\n };\n\n return this;\n }\n\n /**\n * Provide a callback to be executed when navigating downwards.\n *\n * This will be triggered by the Down key.\n */\n onDown(callback: Function): this {\n this.callbacks[40] = e => {\n e.preventDefault();\n callback(e);\n };\n\n return this;\n }\n\n /**\n * Provide a callback to be executed when the current item is selected..\n *\n * This will be triggered by the Return and Tab keys..\n */\n onSelect(callback: Function): this {\n this.callbacks[9] = this.callbacks[13] = e => {\n e.preventDefault();\n callback(e);\n };\n\n return this;\n }\n\n /**\n * Provide a callback to be executed when the navigation is canceled.\n *\n * This will be triggered by the Escape key.\n */\n onCancel(callback: Function): this {\n this.callbacks[27] = e => {\n e.stopPropagation();\n e.preventDefault();\n callback(e);\n };\n\n return this;\n }\n\n /**\n * Provide a callback to be executed when previous input is removed.\n *\n * This will be triggered by the Backspace key.\n */\n onRemove(callback: Function): this {\n this.callbacks[8] = e => {\n if (e.target.selectionStart === 0 && e.target.selectionEnd === 0) {\n callback(e);\n e.preventDefault();\n }\n };\n\n return this;\n }\n\n /**\n * Provide a callback that determines whether keyboard input should be handled.\n */\n when(callback: () => boolean): this {\n this.whenCallback = callback;\n\n return this;\n }\n\n /**\n * Set up the navigation key bindings on the given jQuery element.\n */\n bindTo($element: any) {\n // Handle navigation key events on the navigatable element.\n $element.on('keydown', this.navigate.bind(this));\n }\n\n /**\n * Interpret the given keyboard event as navigation commands.\n */\n navigate(event: KeyboardEvent) {\n // This callback determines whether keyboard should be handled or ignored.\n if (!this.whenCallback()) return;\n\n const keyCallback = this.callbacks[event.which];\n if (keyCallback) {\n keyCallback(event);\n }\n }\n}\n","import { truncate } from '../utils/string';\n\n/**\n * The `highlight` helper searches for a word phrase in a string, and wraps\n * matches with the <mark> tag.\n *\n * @param {String} string The string to highlight.\n * @param {String|RegExp} phrase The word or words to highlight.\n * @param {Integer} [length] The number of characters to truncate the string to.\n * The string will be truncated surrounding the first match.\n */\nexport default function highlight(string: string, phrase: string|RegExp, length?: number): any {\n if (!phrase && !length) return string;\n\n // Convert the word phrase into a global regular expression (if it isn't\n // already) so we can search the string for matched.\n const regexp = phrase instanceof RegExp ? phrase : new RegExp(phrase, 'gi');\n\n let highlighted = string;\n let start = 0;\n\n // If a length was given, the truncate the string surrounding the first match.\n if (length) {\n if (phrase) start = Math.max(0, string.search(regexp) - length / 2);\n\n highlighted = truncate(highlighted, length, start);\n }\n\n // Convert the string into HTML entities, then highlight all matches with\n // <mark> tags. Then we will return the result as a trusted HTML string.\n highlighted = $('<div/>').text(highlighted).html();\n\n if (phrase) highlighted = highlighted.replace(regexp, '<mark>$&</mark>');\n\n return m.trust(highlighted);\n}\n","export default abstract class SearchSource {\n abstract view(vnode: string);\n\n abstract search(query: string);\n}\n","import highlight from '../../common/helpers/highlight';\nimport LinkButton from '../../common/components/LinkButton';\nimport SearchSource from \"./SearchSource\";\nimport Discussion from \"../../common/models/Discussion\";\n\n/**\n * The `DiscussionsSearchSource` finds and displays discussion search results in\n * the search dropdown.\n */\nexport default class DiscussionsSearchSource extends SearchSource {\n protected results: { [key: string]: Discussion[] } = {};\n\n search(query: string) {\n query = query.toLowerCase();\n\n this.results[query] = [];\n\n const params = {\n filter: {q: query},\n page: {limit: 3},\n include: 'mostRelevantPost'\n };\n\n return app.store.find('discussions', params).then(results => this.results[query] = results);\n }\n\n view(query: string) {\n query = query.toLowerCase();\n\n const results = this.results[query] || [];\n\n return [\n <li className=\"Dropdown-header\">{app.translator.trans('core.forum.search.discussions_heading')}</li>,\n <li>\n {LinkButton.component({\n icon: 'fas fa-search',\n children: app.translator.trans('core.forum.search.all_discussions_button', {query}),\n href: app.route('index', {q: query})\n })}\n </li>,\n results.map(discussion => {\n const mostRelevantPost = discussion.mostRelevantPost();\n\n return (\n <li className=\"DiscussionSearchResult\" data-index={'discussions' + discussion.id()}>\n <m.route.Link href={app.route.discussion(discussion, mostRelevantPost && mostRelevantPost.number())}>\n <div className=\"DiscussionSearchResult-title\">{highlight(discussion.title(), query)}</div>\n {mostRelevantPost ? <div className=\"DiscussionSearchResult-excerpt\">{highlight(mostRelevantPost.contentPlain(), query, 100)}</div> : ''}\n </m.route.Link>\n </li>\n );\n })\n ];\n }\n}\n","import highlight from '../../common/helpers/highlight';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport SearchSource from \"./SearchSource\";\nimport User from '../../common/models/User';\n\n/**\n * The `UsersSearchSource` finds and displays user search results in the search\n * dropdown.\n *\n * @implements SearchSource\n */\nexport default class UsersSearchSource extends SearchSource {\n protected results: { [key: string]: User[] } = {};\n\n search(query: string) {\n return app.store.find<User>('users', {\n filter: {q: query},\n page: {limit: 5}\n }).then(results => {\n this.results[query] = results;\n m.redraw();\n });\n }\n\n view(query: string) {\n query = query.toLowerCase();\n\n const results = (this.results[query] || [])\n .concat(app.store.all<User>('users').filter((user: User) => [user.username(), user.displayName()].some(value => value.toLowerCase().substr(0, query.length) === query)))\n .filter((e, i, arr) => arr.lastIndexOf(e) === i)\n .sort((a, b) => a.displayName().localeCompare(b.displayName()));\n\n if (!results.length) return '';\n\n return [\n <li className=\"Dropdown-header\">{app.translator.trans('core.forum.search.users_heading')}</li>,\n results.map(user => {\n const name = username(user);\n\n if (!name.children) {\n name.children = [name.text];\n delete name.text;\n }\n\n name.children[0] = highlight(name.children[0], query);\n\n return (\n <li className=\"UserSearchResult\" data-index={'users' + user.id()}>\n <m.route.Link href={app.route.user(user)}>\n {avatar(user)}\n {name}\n </m.route.Link>\n </li>\n );\n })\n ];\n }\n}\n","import Component from '../../common/Component';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport ItemList from '../../common/utils/ItemList';\nimport KeyboardNavigatable from '../utils/KeyboardNavigatable';\nimport icon from '../../common/helpers/icon';\nimport DiscussionsSearchSource from './DiscussionsSearchSource';\nimport UsersSearchSource from './UsersSearchSource';\nimport SearchSource from './SearchSource';\n\nimport Stream from 'mithril/stream';\n\n/**\n * The `Search` component displays a menu of as-you-type results from a variety\n * of sources.\n *\n * The search box will be 'activated' if the app's current controller implements\n * a `searching` method that returns a truthy value. If this is the case, an 'x'\n * button will be shown next to the search field, and clicking it will call the\n * `clearSearch` method on the controller.\n */\nexport default class Search extends Component {\n /**\n * The value of the search input.\n */\n value: Stream<string> = m.prop('');\n\n /**\n * Whether or not the search input has focus.\n */\n hasFocus: boolean = false;\n\n /**\n * An array of SearchSources.\n */\n sources: SearchSource[] = null;\n\n /**\n * The number of sources that are still loading results.\n */\n loadingSources = 0;\n\n /**\n * A list of queries that have been searched for.\n */\n searched: string[] = [];\n\n /**\n * The index of the currently-selected <li> in the results list. This can be\n * a unique string (to account for the fact that an item's position may jump\n * around as new results load), but otherwise it will be numeric (the\n * sequential position within the list).\n */\n index: string|number = 0;\n\n navigator: KeyboardNavigatable;\n\n searchTimeout: number;\n\n view() {\n const currentSearch = this.getCurrentSearch();\n\n // Initialize search input value in the view rather than the constructor so\n // that we have access to app.current.\n if (typeof this.value() === 'undefined') {\n this.value(currentSearch || '');\n }\n\n // Initialize search sources in the view rather than the constructor so\n // that we have access to app.forum.\n if (!this.sources) {\n this.sources = this.sourceItems().toArray();\n }\n\n // Hide the search view if no sources were loaded\n if (!this.sources.length) return <div/>;\n\n return (\n <div className={'Search ' + classNames({\n open: this.value() && this.hasFocus,\n focused: this.hasFocus,\n active: !!currentSearch,\n loading: !!this.loadingSources\n })}>\n <div className=\"Search-input\">\n <input className=\"FormControl\"\n type=\"search\"\n placeholder={app.translator.transText('core.forum.header.search_placeholder')}\n value={this.value()}\n oninput={m.withAttr('value', this.value)}\n onfocus={() => this.hasFocus = true}\n onblur={() => this.hasFocus = false}/>\n {this.loadingSources\n ? LoadingIndicator.component({size: 'tiny', className: 'Button Button--icon Button--link'})\n : currentSearch\n ? <button className=\"Search-clear Button Button--icon Button--link\" onclick={this.clear.bind(this)}>{icon('fas fa-times-circle')}</button>\n : ''}\n </div>\n <ul className=\"Dropdown-menu Search-results\">\n {this.value() && this.hasFocus\n ? this.sources.map(source => source.view(this.value()))\n : ''}\n </ul>\n </div>\n );\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n // Highlight the item that is currently selected.\n this.setIndex(this.getCurrentNumericIndex());\n\n const search = this;\n\n this.$('.Search-results')\n .on('mousedown', e => e.preventDefault())\n .on('click', () => this.$('input').blur())\n\n // Whenever the mouse is hovered over a search result, highlight it.\n .on('mouseenter', '> li:not(.Dropdown-header)', function() {\n search.setIndex(\n search.selectableItems().index(this)\n );\n });\n\n const $input = this.$('input');\n\n this.navigator = new KeyboardNavigatable();\n\n this.navigator\n .onUp(() => this.setIndex(this.getCurrentNumericIndex() - 1, true))\n .onDown(() => this.setIndex(this.getCurrentNumericIndex() + 1, true))\n .onSelect(this.selectResult.bind(this))\n .onCancel(this.clear.bind(this))\n .bindTo($input);\n\n // Handle input key events on the search input, triggering results to load.\n $input\n .on('input focus', function() {\n const query = this.value.toLowerCase();\n\n if (!query) return;\n\n clearTimeout(search.searchTimeout);\n search.searchTimeout = setTimeout(() => {\n if (search.searched.indexOf(query) !== -1) return;\n\n if (query.length >= 3) {\n search.sources.map(source => {\n if (!source.search) return;\n\n search.loadingSources++;\n\n source.search(query).then(() => {\n search.loadingSources = Math.max(0, search.loadingSources - 1);\n m.redraw();\n });\n });\n }\n\n search.searched.push(query);\n m.redraw();\n }, 250);\n })\n\n .on('focus', function() {\n $(this).one('mouseup', e => e.preventDefault()).select();\n });\n }\n\n /**\n * Get the active search in the app's current controller.\n *\n * @return {String}\n */\n getCurrentSearch() {\n return app.current && typeof app.current.searching === 'function' && app.current.searching();\n }\n\n /**\n * Navigate to the currently selected search result and close the list.\n */\n selectResult() {\n clearTimeout(this.searchTimeout);\n this.loadingSources = 0;\n\n if (this.value()) {\n m.route.set(this.getItem(this.index).find('a').attr('href'));\n } else {\n this.clear();\n }\n\n this.$('input').blur();\n }\n\n /**\n * Clear the search input and the current controller's active search.\n */\n clear() {\n this.value('');\n\n if (this.getCurrentSearch()) {\n app.current.clearSearch();\n } else {\n m.redraw();\n }\n }\n\n /**\n * Build an item list of SearchSources.\n *\n * @return {ItemList}\n */\n sourceItems() {\n const items = new ItemList();\n\n if (app.forum.attribute('canViewDiscussions')) items.add('discussions', new DiscussionsSearchSource());\n if (app.forum.attribute('canViewUserList')) items.add('users', new UsersSearchSource());\n\n return items;\n }\n\n /**\n * Get all of the search result items that are selectable.\n *\n * @return {jQuery}\n */\n selectableItems() {\n return this.$('.Search-results > li:not(.Dropdown-header)');\n }\n\n /**\n * Get the position of the currently selected search result item.\n *\n * @return {Integer}\n */\n getCurrentNumericIndex() {\n return this.selectableItems().index(\n this.getItem(this.index)\n );\n }\n\n /**\n * Get the <li> in the search results with the given index (numeric or named).\n *\n * @param {String} index\n * @return {DOMElement}\n */\n getItem(index) {\n const $items = this.selectableItems();\n let $item = $items.filter(`[data-index=\"${index}\"]`);\n\n if (!$item.length) {\n $item = $items.eq(index);\n }\n\n return $item;\n }\n\n /**\n * Set the currently-selected search result item to the one with the given\n * index.\n *\n * @param index\n * @param scrollToItem Whether or not to scroll the dropdown so that\n * the item is in view.\n */\n setIndex(index: number, scrollToItem?: boolean) {\n const $items = this.selectableItems();\n const $dropdown = $items.parent();\n\n let fixedIndex = index;\n if (index < 0) {\n fixedIndex = $items.length - 1;\n } else if (index >= $items.length) {\n fixedIndex = 0;\n }\n\n const $item = $items.removeClass('active').eq(fixedIndex).addClass('active');\n\n this.index = $item.attr('data-index') || fixedIndex;\n\n if (scrollToItem) {\n const dropdownScroll = $dropdown.scrollTop();\n const dropdownTop = $dropdown.offset().top;\n const dropdownBottom = dropdownTop + $dropdown.outerHeight();\n const itemTop = $item.offset().top;\n const itemBottom = itemTop + $item.outerHeight();\n\n let scrollTop;\n if (itemTop < dropdownTop) {\n scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n } else if (itemBottom > dropdownBottom) {\n scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n }\n\n if (typeof scrollTop !== 'undefined') {\n $dropdown.animate({scrollTop}, 100);\n }\n }\n }\n}\n","import Component from '../../common/Component';\nimport Button from '../../common/components/Button';\nimport LogInModal from './LogInModal';\n// import SignUpModal from './SignUpModal';\nimport SessionDropdown from './SessionDropdown';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport NotificationsDropdown from './NotificationsDropdown';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\n\nimport Search from './Search';\n\n/**\n * The `HeaderSecondary` component displays secondary header controls, such as\n * the search box and the user menu. On the default skin, these are shown on the\n * right side of the header.\n */\nexport default class HeaderSecondary extends Component {\n view() {\n return (\n <ul className=\"Header-controls\">\n {listItems(this.items().toArray())}\n </ul>\n );\n }\n\n /**\n * Build an item list for the controls.\n */\n items(): ItemList {\n const items = new ItemList();\n\n items.add('search', Search.component(), 30);\n\n if (app.forum.attribute(\"showLanguageSelector\") && Object.keys(app.data.locales).length > 1) {\n const locales = [];\n\n for (const locale in app.data.locales) {\n locales.push(Button.component({\n active: app.data.locale === locale,\n children: app.data.locales[locale],\n icon: app.data.locale === locale ? 'fas fa-check' : true,\n onclick: () => {\n if (app.session.user) {\n app.session.user.savePreferences({locale}).then(() => window.location.reload());\n } else {\n document.cookie = `locale=${locale}; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT`;\n window.location.reload();\n }\n }\n }));\n }\n\n items.add('locale', SelectDropdown.component({\n children: locales,\n buttonClassName: 'Button Button--link'\n }), 20);\n }\n\n if (app.session.user) {\n items.add('notifications', NotificationsDropdown.component(), 10);\n items.add('session', SessionDropdown.component(), 0);\n } else {\n if (app.forum.attribute('allowSignUp')) {\n items.add('signUp',\n Button.component({\n children: app.translator.trans('core.forum.header.sign_up_link'),\n className: 'Button Button--link',\n onclick: () => app.modal.show(new SignUpModal())\n }), 10\n );\n }\n\n items.add('logIn',\n Button.component({\n children: app.translator.trans('core.forum.header.log_in_link'),\n className: 'Button Button--link',\n onclick: () => app.modal.show(new LogInModal())\n }), 0\n );\n }\n\n return items;\n }\n}\n","import Component from '../../common/Component';\n\nexport default class IndexPage extends Component {\n oninit() {\n console.log('IndexPage#oninit');\n }\n\n view() {\n return (\n <div class=\"container\">\n <h1>hi</h1>\n </div>\n );\n }\n}\n","import Component from '../../common/Component';\n\n/**\n * The `Page` component\n */\nexport default abstract class Page extends Component {\n /**\n * A class name to apply to the body while the route is active.\n */\n bodyClass: string = '';\n\n oninit(vnode) {\n super.oninit(vnode);\n\n if (this.bodyClass) {\n $('#app').addClass(this.bodyClass);\n }\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n app.previous = app.current;\n app.current = this;\n\n app.drawer.hide();\n app.modal.close();\n }\n\n onremove(vnode) {\n super.onremove(vnode);\n\n $('#app').removeClass(this.bodyClass);\n }\n}\n","/**\n * Setup the sidebar DOM element to be affixed to the top of the viewport\n * using hcSticky.\n */\nexport default function affixSidebar(vnode) {\n const element = vnode.dom;\n const $sidebar = $(element);\n const $header = $('#header');\n const $affixElement = $sidebar.find('> ul')[0];\n\n $(window).off('.affix');\n\n new hcSticky($affixElement, {\n stickTo: element,\n top: $header.outerHeight(true) + parseInt($sidebar.css('margin-top'), 10),\n });\n}\n","/**\n * The `humanTime` utility converts a date to a localized, human-readable time-\n * ago string.\n */\nexport default function humanTime(time: Date): string {\n let m = dayjs(time);\n const now = dayjs();\n\n // To prevent showing things like \"in a few seconds\" due to small offsets\n // between client and server time, we always reset future dates to the\n // current time. This will result in \"just now\" being shown instead.\n if (m.isAfter(now)) {\n m = now;\n }\n\n const day = 864e5;\n const diff = m.diff(dayjs());\n let ago = null;\n\n // If this date was more than a month ago, we'll show the name of the month\n // in the string. If it wasn't this year, we'll show the year as well.\n if (diff < -30 * day) {\n if (m.year() === dayjs().year()) {\n ago = m.format('D MMM');\n } else {\n ago = m.format('MMM \\'YY');\n }\n } else {\n ago = m.fromNow();\n }\n\n return ago;\n};\n","import Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\n// import EditUserModal from '../components/EditUserModal';\nimport UserPage from '../components/UserPage';\nimport ItemList from '../../common/utils/ItemList';\nimport User from \"../../common/models/User\";\n\n/**\n * The `UserControls` utility constructs a list of buttons for a user which\n * perform actions on it.\n */\nexport default {\n /**\n * Get a list of controls for a user.\n *\n * @param user\n * @param context The parent component under which the controls menu will\n * be displayed.\n */\n controls(user: User, context: any): ItemList {\n const items = new ItemList();\n\n ['user', 'moderation', 'destructive'].forEach(section => {\n const controls = this[section + 'Controls'](user, context).toArray();\n if (controls.length) {\n controls.forEach(item => items.add(item.itemName, item));\n items.add(section + 'Separator', Separator.component());\n }\n });\n\n return items;\n },\n\n /**\n * Get controls for a user pertaining to the current user (e.g. poke, follow).\n */\n userControls(): ItemList {\n return new ItemList();\n },\n\n /**\n * Get controls for a user pertaining to moderation (e.g. suspend, edit).\n */\n moderationControls(user: User): ItemList {\n const items = new ItemList();\n\n if (user.canEdit()) {\n items.add('edit', Button.component({\n icon: 'fas fa-pencil-alt',\n children: app.translator.trans('core.forum.user_controls.edit_button'),\n onclick: this.editAction.bind(user)\n }));\n }\n\n return items;\n },\n\n /**\n * Get controls for a user which are destructive (e.g. delete).\n */\n destructiveControls(user: User): ItemList {\n const items = new ItemList();\n\n if (user.id() !== '1' && user.canDelete()) {\n items.add('delete', Button.component({\n icon: 'fas fa-times',\n children: app.translator.trans('core.forum.user_controls.delete_button'),\n onclick: this.deleteAction.bind(user)\n }));\n }\n\n return items;\n },\n\n /**\n * Delete the user.\n */\n deleteAction() {\n if (confirm(app.translator.trans('core.forum.user_controls.delete_confirmation'))) {\n this.delete().then(() => {\n if (app.current instanceof UserPage && app.current.user === this) {\n app.history.back();\n } else {\n window.location.reload();\n }\n });\n }\n },\n\n /**\n * Edit the user.\n */\n editAction() {\n app.modal.show(new EditUserModal({user: this}));\n }\n};\n","import Component, {ComponentProps} from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\nimport icon from '../../common/helpers/icon';\nimport listItems from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport Button from '../../common/components/Button';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport User from '../../common/models/User';\n\nexport interface AvatarEditorProps extends ComponentProps {\n user: User;\n}\n\n/**\n * The `AvatarEditor` component displays a user's avatar along with a dropdown\n * menu which allows the user to upload/remove the avatar.\n */\nexport default class AvatarEditor extends Component<AvatarEditorProps> {\n /**\n * Whether or not an avatar upload is in progress.\n */\n loading = false;\n\n /**\n * Whether or not an image has been dragged over the dropzone.\n */\n isDraggedOver = false;\n\n static initProps(props) {\n super.initProps(props);\n\n props.className = props.className || '';\n }\n\n view() {\n const user = this.props.user;\n\n return (\n <div className={'AvatarEditor Dropdown ' + this.props.className + (this.loading ? ' loading' : '') + (this.isDraggedOver ? ' dragover' : '')}>\n {avatar(user)}\n <a className={ user.avatarUrl() ? \"Dropdown-toggle\" : \"Dropdown-toggle AvatarEditor--noAvatar\" }\n title={app.translator.trans('core.forum.user.avatar_upload_tooltip')}\n data-toggle=\"dropdown\"\n onclick={this.quickUpload.bind(this)}\n ondragover={this.enableDragover.bind(this)}\n ondragenter={this.enableDragover.bind(this)}\n ondragleave={this.disableDragover.bind(this)}\n ondragend={this.disableDragover.bind(this)}\n ondrop={this.dropUpload.bind(this)}>\n {this.loading ? LoadingIndicator.component() : (user.avatarUrl() ? icon('fas fa-pencil-alt') : icon('fas fa-plus-circle'))}\n </a>\n <ul className=\"Dropdown-menu Menu\">\n {listItems(this.controlItems().toArray())}\n </ul>\n </div>\n );\n }\n\n /**\n * Get the items in the edit avatar dropdown menu.\n *\n * @return {ItemList}\n */\n controlItems() {\n const items = new ItemList();\n\n items.add('upload',\n Button.component({\n icon: 'fas fa-upload',\n children: app.translator.trans('core.forum.user.avatar_upload_button'),\n onclick: this.openPicker.bind(this)\n })\n );\n\n items.add('remove',\n Button.component({\n icon: 'fas fa-times',\n children: app.translator.trans('core.forum.user.avatar_remove_button'),\n onclick: this.remove.bind(this)\n })\n );\n\n return items;\n }\n\n /**\n * Enable dragover style\n *\n * @param {Event} e\n */\n enableDragover(e) {\n e.preventDefault();\n e.stopPropagation();\n this.isDraggedOver = true;\n }\n\n /**\n * Disable dragover style\n *\n * @param {Event} e\n */\n disableDragover(e) {\n e.preventDefault();\n e.stopPropagation();\n this.isDraggedOver = false;\n }\n\n /**\n * Upload avatar when file is dropped into dropzone.\n *\n * @param {Event} e\n */\n dropUpload(e) {\n e.preventDefault();\n e.stopPropagation();\n this.isDraggedOver = false;\n this.upload(e.dataTransfer.files[0]);\n }\n\n /**\n * If the user doesn't have an avatar, there's no point in showing the\n * controls dropdown, because only one option would be viable: uploading.\n * Thus, when the avatar editor's dropdown toggle button is clicked, we prompt\n * the user to upload an avatar immediately.\n *\n * @param {Event} e\n */\n quickUpload(e) {\n if (!this.props.user.avatarUrl()) {\n e.preventDefault();\n e.stopPropagation();\n this.openPicker();\n }\n }\n\n /**\n * Upload avatar using file picker\n */\n openPicker() {\n if (this.loading) return;\n\n // Create a hidden HTML input element and click on it so the user can select\n // an avatar file. Once they have, we will upload it via the API.\n const user = this.props.user;\n const $input = $('<input type=\"file\">');\n\n $input.appendTo('body').hide().click().on('change', e => {\n this.upload($(e.target)[0].files[0]);\n });\n }\n\n /**\n * Upload avatar\n *\n * @param {File} file\n */\n upload(file) {\n if (this.loading) return;\n\n const user = this.props.user;\n const body = new FormData();\n data.append('avatar', file);\n\n this.loading = true;\n m.redraw();\n\n app.request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/users/${user.id()}/avatar`,\n serialize: raw => raw,\n body\n }).then(\n this.success.bind(this),\n this.failure.bind(this)\n );\n }\n\n /**\n * Remove the user's avatar.\n */\n remove() {\n const user = this.props.user;\n\n this.loading = true;\n m.redraw();\n\n app.request({\n method: 'DELETE',\n url: `${app.forum.attribute('apiUrl')}/users/${user.id()}/avatar`\n }).then(\n this.success.bind(this),\n this.failure.bind(this)\n );\n }\n\n /**\n * After a successful upload/removal, push the updated user data into the\n * store, and force a recomputation of the user's avatar color.\n *\n * @param {Object} response\n * @protected\n */\n success(response) {\n app.store.pushPayload(response);\n delete this.props.user.avatarColor;\n\n this.loading = false;\n m.redraw();\n }\n\n /**\n * If avatar upload/removal fails, stop loading.\n *\n * @param {Object} response\n * @protected\n */\n failure(response) {\n this.loading = false;\n m.redraw();\n }\n}\n","import Component, {ComponentProps} from '../../common/Component';\nimport humanTime from '../../common/utils/humanTime';\nimport ItemList from '../../common/utils/ItemList';\nimport UserControls from '../utils/UserControls';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport icon from '../../common/helpers/icon';\nimport Dropdown from '../../common/components/Dropdown';\nimport AvatarEditor from './AvatarEditor';\nimport listItems from '../../common/helpers/listItems';\nimport User from \"../../common/models/User\";\n\nexport interface UserCardProps extends ComponentProps {\n user: User;\n editable: boolean;\n controlsButtonClassName: string;\n}\n\n/**\n * The `UserCard` component displays a user's profile card. This is used both on\n * the `UserPage` (in the hero) and in discussions, shown when hovering over a\n * post author.\n */\nexport default class UserCard extends Component<UserCardProps> {\n view() {\n const user = this.props.user;\n const controls = UserControls.controls(user, this).toArray();\n const color = user.color();\n const badges = user.badges().toArray();\n\n return (\n <div className={'UserCard ' + (this.props.className || '')}\n style={color ? {backgroundColor: color} : ''}>\n <div className=\"darkenBackground\">\n\n <div className=\"container\">\n {controls.length ? Dropdown.component({\n children: controls,\n className: 'UserCard-controls App-primaryControl',\n menuClassName: 'Dropdown-menu--right',\n buttonClassName: this.props.controlsButtonClassName,\n label: app.translator.trans('core.forum.user_controls.button'),\n icon: 'fas fa-ellipsis-v'\n }) : ''}\n\n <div className=\"UserCard-profile\">\n <h2 className=\"UserCard-identity\">\n {this.props.editable\n ? [AvatarEditor.component({user, className: 'UserCard-avatar'}), username(user)]\n : (\n <m.route.Link href={app.route.user(user)}>\n <div className=\"UserCard-avatar\">{avatar(user)}</div>\n {username(user)}\n </m.route.Link>\n )}\n </h2>\n\n {badges.length ? (\n <ul className=\"UserCard-badges badges\">\n {listItems(badges)}\n </ul>\n ) : ''}\n\n <ul className=\"UserCard-info\">\n {listItems(this.infoItems().toArray())}\n </ul>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n /**\n * Build an item list of tidbits of info to show on this user's profile.\n *\n * @return {ItemList}\n */\n infoItems() {\n const items = new ItemList();\n const user = this.props.user;\n const lastSeenAt = user.lastSeenAt();\n\n if (lastSeenAt) {\n const online = user.isOnline();\n\n items.add('lastSeen', (\n <span className={'UserCard-lastSeen' + (online ? ' online' : '')}>\n {online\n ? [icon('fas fa-circle'), ' ', app.translator.trans('core.forum.user.online_text')]\n : [icon('far fa-clock'), ' ', humanTime(lastSeenAt)]}\n </span>\n ));\n }\n\n items.add('joined', app.translator.trans('core.forum.user.joined_date_text', {ago: humanTime(user.joinTime())}));\n\n return items;\n }\n}\n","import Page from './Page';\nimport ItemList from '../../common/utils/ItemList';\nimport affixSidebar from '../utils/affixSidebar';\nimport UserCard from './UserCard';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport LinkButton from '../../common/components/LinkButton';\nimport Separator from '../../common/components/Separator';\nimport listItems from '../../common/helpers/listItems';\n\nimport User from '../../common/models/User';\n\n/**\n * The `UserPage` component shows a user's profile. It can be extended to show\n * content inside of the content area. See `ActivityPage` and `SettingsPage` for\n * examples.\n */\nexport default abstract class UserPage extends Page {\n /**\n * The user this page is for.\n */\n user: User;\n bodyClass: string = 'App--user';\n\n /**\n * The username of the currently loaded user\n */\n username: string;\n\n view() {\n return (\n <div className=\"UserPage\">\n {this.user ? [\n UserCard.component({\n user: this.user,\n className: 'Hero UserHero',\n editable: this.user.canEdit() || this.user === app.session.user,\n controlsButtonClassName: 'Button'\n }),\n <div className=\"container\">\n <div className=\"sideNavContainer\">\n <nav className=\"sideNav UserPage-nav\" config={affixSidebar}>\n <ul>{listItems(this.sidebarItems().toArray())}</ul>\n </nav>\n <div className=\"sideNavOffset UserPage-content\">\n {this.content()}\n </div>\n </div>\n </div>\n ] : [\n LoadingIndicator.component({lassName: 'LoadingIndicator--block'})\n ]}\n </div>\n );\n }\n\n /**\n * Get the content to display in the user page.\n */\n abstract content();\n\n /**\n * Initialize the component with a user, and trigger the loading of their\n * activity feed.\n */\n protected show(user: User) {\n this.user = user;\n\n app.setTitle(user.displayName());\n\n m.redraw();\n }\n\n /**\n * Given a username, load the user's profile from the store, or make a request\n * if we don't have it yet. Then initialize the profile page with that user.\n */\n loadUser(username: string) {\n const lowercaseUsername = username.toLowerCase();\n\n if (lowercaseUsername == this.username) return;\n\n this.username = lowercaseUsername;\n\n app.store.all('users').some(user => {\n if (user.username().toLowerCase() === lowercaseUsername && user.joinTime()) {\n this.show(user);\n return true;\n }\n });\n\n if (!this.user) {\n app.store.find('users', username).then(this.show.bind(this));\n }\n }\n\n /**\n * Build an item list for the content of the sidebar.\n */\n sidebarItems() {\n const items = new ItemList();\n\n items.add('nav',\n SelectDropdown.component({\n children: this.navItems().toArray(),\n className: 'App-titleControl',\n buttonClassName: 'Button'\n })\n );\n\n return items;\n }\n\n /**\n * Build an item list for the navigation in the sidebar.\n */\n navItems() {\n const items = new ItemList();\n const user = this.user;\n\n items.add('posts',\n LinkButton.component({\n href: app.route('user.posts', {username: user.username()}),\n children: [app.translator.trans('core.forum.user.posts_link'), <span className=\"Button-badge\">{user.commentCount()}</span>],\n icon: 'far fa-comment'\n }),\n 100\n );\n\n items.add('discussions',\n LinkButton.component({\n href: app.route('user.discussions', {username: user.username()}),\n children: [app.translator.trans('core.forum.user.discussions_link'), <span className=\"Button-badge\">{user.discussionCount()}</span>],\n icon: 'fas fa-bars'\n }),\n 90\n );\n\n if (app.session.user === user) {\n items.add('separator', Separator.component(), -90);\n items.add('settings',\n LinkButton.component({\n href: app.route('settings'),\n children: app.translator.trans('core.forum.user.settings_link'),\n icon: 'fas fa-cog'\n }),\n -100\n );\n }\n\n return items;\n }\n}\n","import UserPage from './UserPage';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Button from '../../common/components/Button';\n// import Placeholder from '../../common/components/Placeholder';\n// import CommentPost from './CommentPost';\nimport Post from \"../../common/models/Post\";\n\n/**\n * The `PostsUserPage` component shows a user's activity feed inside of their\n * profile.\n */\nexport default class PostsUserPage extends UserPage {\n /**\n * Whether or not the activity feed is currently loading.\n */\n loading = true;\n\n /**\n * Whether or not there are any more activity items that can be loaded.\n */\n moreResults = false;\n\n /**\n * The Post models in the feed.\n */\n posts: Post[] = [];\n\n /**\n * The number of activity items to load per request.\n */\n loadLimit = 20;\n\n oninit(vnode) {\n super.oninit(vnode);\n\n this.loadUser(vnode.attrs.username);\n }\n\n onupdate(vnode) {\n super.onupdate(vnode);\n\n this.loadUser(vnode.attrs.username);\n }\n\n content() {\n return <p>test</p>;\n\n if (this.posts.length === 0 && ! this.loading) {\n return (\n <div className=\"PostsUserPage\">\n <Placeholder text={app.translator.trans('core.forum.user.posts_empty_text')} />\n </div>\n );\n }\n\n let footer;\n\n if (this.loading) {\n footer = LoadingIndicator.component();\n } else if (this.moreResults) {\n footer = (\n <div className=\"PostsUserPage-loadMore\">\n {Button.component({\n children: app.translator.trans('core.forum.user.posts_load_more_button'),\n className: 'Button',\n onclick: this.loadMore.bind(this)\n })}\n </div>\n );\n }\n\n return (\n <div className=\"PostsUserPage\">\n <ul className=\"PostsUserPage-list\">\n {this.posts.map(post => (\n <li>\n <div className=\"PostsUserPage-discussion\">\n {app.translator.trans('core.forum.user.in_discussion_text', {discussion: <m.route.Link href={app.route.post(post)}>{post.discussion().title()}</m.route.Link>})}\n </div>\n {CommentPost.component({post})}\n </li>\n ))}\n </ul>\n <div className=\"PostsUserPage-loadMore\">\n {footer}\n </div>\n </div>\n );\n }\n\n /**\n * Initialize the component with a user, and trigger the loading of their\n * activity feed.\n */\n show(user) {\n super.show(user);\n\n this.refresh();\n }\n\n /**\n * Clear and reload the user's activity feed.\n */\n refresh() {\n this.loading = true;\n this.posts = [];\n\n m.redraw();\n\n this.loadResults().then(this.parseResults.bind(this));\n }\n\n /**\n * Load a new page of the user's activity feed.\n *\n * @param offset The position to start getting results from.\n */\n protected loadResults(offset?: number): Promise<Post[]> {\n return app.store.find<Post>('posts', {\n filter: {\n user: this.user.id(),\n type: 'comment'\n },\n page: {offset, limit: this.loadLimit},\n sort: '-createdAt'\n });\n }\n\n /**\n * Load the next page of results.\n */\n loadMore() {\n this.loading = true;\n this.loadResults(this.posts.length).then(this.parseResults.bind(this));\n }\n\n /**\n * Parse results and append them to the activity feed.\n */\n parseResults(results: Post[]): Post[] {\n this.loading = false;\n\n [].push.apply(this.posts, results);\n\n this.moreResults = results.length >= this.loadLimit;\n m.redraw();\n\n return results;\n }\n}\n","import Application from '../common/Application';\nimport History from './utils/History';\n\nimport HeaderPrimary from './components/HeaderPrimary';\nimport HeaderSecondary from './components/HeaderSecondary';\n\nimport IndexPage from './components/IndexPage';\nimport PostsUserPage from './components/PostsUserPage';\n\nexport default class Forum extends Application {\n routes = {\n 'index': { path: '/', component: IndexPage },\n 'index.filter': { path: '/:filter', component: IndexPage },\n\n 'user': { path: '/u/:username', component: PostsUserPage },\n 'user.posts': { path: '/u/:username', component: PostsUserPage },\n 'user.discussions': { path: '/u/:username', component: PostsUserPage },\n 'settings': { path: '/u/:username', component: PostsUserPage },\n\n 'discussion': { path: '/d/:id', IndexPage },\n };\n\n /**\n * The app's history stack, which keeps track of which routes the user visits\n * so that they can easily navigate back to the previous route.\n */\n history: History = new History();\n\n mount() {\n // Get the configured default route and update that route's path to be '/'.\n // Push the homepage as the first route, so that the user will always be\n // able to click on the 'back' button to go home, regardless of which page\n // they started on.\n const defaultRoute = this.forum.attribute('defaultRoute');\n let defaultAction = 'index';\n\n for (const i in this.routes) {\n if (this.routes[i].path === defaultRoute) defaultAction = i;\n }\n\n this.routes[defaultAction].path = '/';\n this.history.push(defaultAction, this.translator.transText('core.forum.header.back_to_index_tooltip'), '/');\n\n // m.mount(document.getElementById('app-navigation'), Navigation.component({className: 'App-backControl', drawer: true}));\n // m.mount(document.getElementById('header-navigation'), Navigation.component());\n m.mount(document.getElementById('header-primary'), new HeaderPrimary());\n m.mount(document.getElementById('header-secondary'), new HeaderSecondary());\n\n // this.pane = new Pane(document.getElementById('app'));\n // this.composer = m.mount(document.getElementById('composer'), Composer.component());\n\n m.route.prefix = '';\n super.mount(this.forum.attribute('basePath'));\n\n // alertEmailConfirmation(this);\n\n // Route the home link back home when clicked. We do not want it to register\n // if the user is opening it in a new tab, however.\n $('#home-link').click((e: MouseEvent) => {\n if (e.ctrlKey || e.metaKey || e.which === 2) return;\n e.preventDefault();\n app.history.home();\n\n // Reload the current user so that their unread notification count is refreshed.\n if (app.session.user) {\n app.store.find('users', app.session.user.id());\n m.redraw();\n }\n });\n }\n\n setupRoutes() {\n super.setupRoutes();\n\n this.route.discussion = (discussion, near) => {\n const slug = discussion.slug();\n return this.route(near && near !== 1 ? 'discussion.near' : 'discussion', {\n id: discussion.id() + (slug.trim() ? '-' + slug : ''),\n near: near && near !== 1 ? near : undefined\n });\n };\n\n /**\n * Generate a URL to a post.\n *\n * @param {Post} post\n * @return {String}\n */\n this.route.post = post => {\n return this.route.discussion(post.discussion(), post.number());\n };\n\n /**\n * Generate a URL to a user.\n *\n * @param {User} user\n * @return {String}\n */\n this.route.user = user => {\n return this.route('user', {\n username: user.username()\n });\n };\n }\n}\n","import * as extend from './extend';\n\nexport default {\n extend: extend,\n};\n","import compat from '../common/compat';\n\nimport Forum from './Forum';\n\nimport IndexPage from './components/IndexPage';\n\nexport default Object.assign(compat, {\n 'components/IndexPage': IndexPage,\n Forum: Forum,\n}) as any;\n","import Forum from './Forum';\n\nconst app = new Forum();\n\n// @ts-ignore\nwindow.app = app;\n\napp.bus.subscribe('app.plugins', () => {\n // @ts-ignore\n const extensions = flarum.extensions;\n\n Object.keys(extensions).forEach(name => {\n const extension = extensions[name];\n\n // if (typeof extension === 'function') extension();\n });\n});\n\nexport { app };\n\n// Export compat API\nimport compat from './compat';\n\ncompat.app = app;\n\nexport { compat };\n","/*\r\n * This file is part of Flarum.\r\n *\r\n * (c) Toby Zerner <toby.zerner@gmail.com>\r\n *\r\n * For the full copyright and license information, please view the LICENSE\r\n * file that was distributed with this source code.\r\n */\r\n\r\nexport * from './src/common';\r\nexport * from './src/forum';"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@flarum/core/webpack/bootstrap","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/core/(webpack)/buildin/global.js","webpack://@flarum/core/./node_modules/mithril/render/vnode.js","webpack://@flarum/core/external \"m\"","webpack://@flarum/core/./node_modules/mithril/mount-redraw.js","webpack://@flarum/core/./node_modules/mithril/pathname/build.js","webpack://@flarum/core/./node_modules/mithril/pathname/parse.js","webpack://@flarum/core/./node_modules/mithril/render/hyperscript.js","webpack://@flarum/core/./node_modules/mithril/render/hyperscriptVnode.js","webpack://@flarum/core/./node_modules/mithril/promise/promise.js","webpack://@flarum/core/./node_modules/mithril/promise/polyfill.js","webpack://@flarum/core/./node_modules/timers-browserify/main.js","webpack://@flarum/core/./node_modules/mithril/render.js","webpack://@flarum/core/./node_modules/mithril/querystring/build.js","webpack://@flarum/core/./node_modules/mithril/pathname/assign.js","webpack://@flarum/core/./node_modules/mithril/querystring/parse.js","webpack://@flarum/core/./node_modules/lodash/isArray.js","webpack://@flarum/core/./node_modules/jump.js/dist/jump.module.js","webpack://@flarum/core/../../src/index.js","webpack://@flarum/core/../../../popper/src/utils/isFunction.js","webpack://@flarum/core/./src/common/utils/patchZepto.ts","webpack://@flarum/core/./src/common/utils/patchMithril.ts","webpack://@flarum/core/./src/common/index.ts","webpack://@flarum/core/../../src/utils/debounce.js","webpack://@flarum/core/../../src/utils/isBrowser.js","webpack://@flarum/core/../../src/utils/isFunction.js","webpack://@flarum/core/../../src/utils/getStyleComputedProperty.js","webpack://@flarum/core/../../src/utils/getParentNode.js","webpack://@flarum/core/../../src/utils/getScrollParent.js","webpack://@flarum/core/../../src/utils/isIE.js","webpack://@flarum/core/../../src/utils/getOffsetParent.js","webpack://@flarum/core/../../src/utils/getRoot.js","webpack://@flarum/core/../../src/utils/findCommonOffsetParent.js","webpack://@flarum/core/../../src/utils/isOffsetContainer.js","webpack://@flarum/core/../../src/utils/getScroll.js","webpack://@flarum/core/../../src/utils/getBordersSize.js","webpack://@flarum/core/../../src/utils/getWindowSizes.js","webpack://@flarum/core/../../src/utils/getClientRect.js","webpack://@flarum/core/../../src/utils/getBoundingClientRect.js","webpack://@flarum/core/../../src/utils/getOffsetRectRelativeToArbitraryNode.js","webpack://@flarum/core/../../src/utils/includeScroll.js","webpack://@flarum/core/../../src/utils/getFixedPositionOffsetParent.js","webpack://@flarum/core/../../src/utils/getBoundaries.js","webpack://@flarum/core/../../src/utils/getViewportOffsetRectRelativeToArtbitraryNode.js","webpack://@flarum/core/../../src/utils/isFixed.js","webpack://@flarum/core/../../src/utils/computeAutoPlacement.js","webpack://@flarum/core/../../src/utils/getReferenceOffsets.js","webpack://@flarum/core/../../src/utils/getOuterSizes.js","webpack://@flarum/core/../../src/utils/getOppositePlacement.js","webpack://@flarum/core/../../src/utils/getPopperOffsets.js","webpack://@flarum/core/../../src/utils/find.js","webpack://@flarum/core/../../src/utils/runModifiers.js","webpack://@flarum/core/../../src/utils/findIndex.js","webpack://@flarum/core/../../src/methods/update.js","webpack://@flarum/core/../../src/utils/isModifierEnabled.js","webpack://@flarum/core/../../src/utils/getSupportedPropertyName.js","webpack://@flarum/core/../../src/methods/destroy.js","webpack://@flarum/core/../../src/utils/getWindow.js","webpack://@flarum/core/../../src/utils/setupEventListeners.js","webpack://@flarum/core/../../src/methods/enableEventListeners.js","webpack://@flarum/core/../../src/methods/disableEventListeners.js","webpack://@flarum/core/../../src/utils/removeEventListeners.js","webpack://@flarum/core/../../src/utils/isNumeric.js","webpack://@flarum/core/../../src/utils/setStyles.js","webpack://@flarum/core/../../src/modifiers/computeStyle.js","webpack://@flarum/core/../../src/utils/isModifierRequired.js","webpack://@flarum/core/../../src/methods/placements.js","webpack://@flarum/core/../../src/utils/clockwise.js","webpack://@flarum/core/../../src/modifiers/flip.js","webpack://@flarum/core/../../src/modifiers/offset.js","webpack://@flarum/core/../../src/modifiers/index.js","webpack://@flarum/core/../../src/methods/defaults.js","webpack://@flarum/core/../../src/modifiers/shift.js","webpack://@flarum/core/../../src/modifiers/preventOverflow.js","webpack://@flarum/core/../../src/modifiers/keepTogether.js","webpack://@flarum/core/../../src/modifiers/arrow.js","webpack://@flarum/core/../../src/utils/getOppositeVariation.js","webpack://@flarum/core/../../src/modifiers/inner.js","webpack://@flarum/core/../../src/modifiers/hide.js","webpack://@flarum/core/../../src/utils/getRoundedOffsets.js","webpack://@flarum/core/../../src/modifiers/applyStyle.js","webpack://@flarum/core/../../src/utils/setAttributes.js","webpack://@flarum/core/./node_modules/dayjs/plugin/relativeTime.js","webpack://@flarum/core/./node_modules/dayjs/plugin/localizedFormat.js","webpack://@flarum/core/./node_modules/mithril/stream.js","webpack://@flarum/core/./node_modules/lodash/_baseGetTag.js","webpack://@flarum/core/./node_modules/lodash/_root.js","webpack://@flarum/core/./node_modules/lodash/isObjectLike.js","webpack://@flarum/core/./node_modules/lodash/_nativeCreate.js","webpack://@flarum/core/./node_modules/lodash/_assocIndexOf.js","webpack://@flarum/core/./node_modules/lodash/_getMapData.js","webpack://@flarum/core/./node_modules/zepto/dist/zepto.js-exposed","webpack://@flarum/core/./node_modules/zepto/dist/zepto.js","webpack://@flarum/core/./node_modules/dayjs/dayjs.min.js-exposed?da0f","webpack://@flarum/core/./node_modules/dayjs/dayjs.min.js-exposed","webpack://@flarum/core/./node_modules/dayjs/dayjs.min.js","webpack://@flarum/core/./node_modules/mithril/index.js-exposed","webpack://@flarum/core/./node_modules/mithril/index.js","webpack://@flarum/core/./node_modules/mithril/hyperscript.js","webpack://@flarum/core/./node_modules/mithril/render/trust.js","webpack://@flarum/core/./node_modules/mithril/render/fragment.js","webpack://@flarum/core/./node_modules/mithril/request.js","webpack://@flarum/core/./node_modules/setimmediate/setImmediate.js","webpack://@flarum/core/./node_modules/process/browser.js","webpack://@flarum/core/./node_modules/mithril/render/render.js","webpack://@flarum/core/./node_modules/mithril/api/mount-redraw.js","webpack://@flarum/core/./node_modules/mithril/request/request.js","webpack://@flarum/core/./node_modules/mithril/route.js","webpack://@flarum/core/./node_modules/mithril/api/router.js","webpack://@flarum/core/./node_modules/mithril/pathname/compileTemplate.js","webpack://@flarum/core/./node_modules/m.attrs.bidi/bidi.js-exposed","webpack://@flarum/core/./node_modules/m.attrs.bidi/bidi.js","webpack://@flarum/core/./node_modules/mousetrap/mousetrap.js-exposed","webpack://@flarum/core/./node_modules/mousetrap/mousetrap.js","webpack://@flarum/core/./node_modules/classNames/index.js-exposed","webpack://@flarum/core/./node_modules/classNames/index.js","webpack://@flarum/core/./node_modules/zepto/src/selector.js","webpack://@flarum/core/./node_modules/zepto/src/data.js","webpack://@flarum/core/./node_modules/zepto/src/fx.js","webpack://@flarum/core/./node_modules/zepto/src/fx_methods.js","webpack://@flarum/core/./node_modules/hc-sticky/dist/hc-sticky.js","webpack://@flarum/core/(webpack)/buildin/harmony-module.js","webpack://@flarum/core/(webpack)/buildin/amd-options.js","webpack://@flarum/core/./node_modules/bootstrap/js/dropdown.js","webpack://@flarum/core/./node_modules/bootstrap/js/transition.js","webpack://@flarum/core/./node_modules/mithril/stream/stream.js","webpack://@flarum/core/./node_modules/lodash/_Symbol.js","webpack://@flarum/core/./node_modules/lodash/isObject.js","webpack://@flarum/core/./node_modules/lodash/isSymbol.js","webpack://@flarum/core/./node_modules/lodash/_getNative.js","webpack://@flarum/core/./node_modules/lodash/_freeGlobal.js","webpack://@flarum/core/(webpack)/buildin/module.js","webpack://@flarum/core/./node_modules/lodash/_isIndex.js","webpack://@flarum/core/./node_modules/lodash/isLength.js","webpack://@flarum/core/./node_modules/lodash/isArrayLike.js","webpack://@flarum/core/./node_modules/lodash/isFunction.js","webpack://@flarum/core/./node_modules/lodash/_castPath.js","webpack://@flarum/core/./node_modules/lodash/eq.js","webpack://@flarum/core/./node_modules/lodash/_toKey.js","webpack://@flarum/core/./node_modules/lodash/forEach.js","webpack://@flarum/core/./node_modules/lodash/get.js","webpack://@flarum/core/./node_modules/lodash/set.js","webpack://@flarum/core/./node_modules/lodash/_arrayEach.js","webpack://@flarum/core/./node_modules/lodash/_baseEach.js","webpack://@flarum/core/./node_modules/lodash/_baseForOwn.js","webpack://@flarum/core/./node_modules/lodash/_baseFor.js","webpack://@flarum/core/./node_modules/lodash/_createBaseFor.js","webpack://@flarum/core/./node_modules/lodash/keys.js","webpack://@flarum/core/./node_modules/lodash/_arrayLikeKeys.js","webpack://@flarum/core/./node_modules/lodash/_baseTimes.js","webpack://@flarum/core/./node_modules/lodash/isArguments.js","webpack://@flarum/core/./node_modules/lodash/_baseIsArguments.js","webpack://@flarum/core/./node_modules/lodash/_getRawTag.js","webpack://@flarum/core/./node_modules/lodash/_objectToString.js","webpack://@flarum/core/./node_modules/lodash/isBuffer.js","webpack://@flarum/core/./node_modules/lodash/stubFalse.js","webpack://@flarum/core/./node_modules/lodash/isTypedArray.js","webpack://@flarum/core/./node_modules/lodash/_baseIsTypedArray.js","webpack://@flarum/core/./node_modules/lodash/_baseUnary.js","webpack://@flarum/core/./node_modules/lodash/_nodeUtil.js","webpack://@flarum/core/./node_modules/lodash/_baseKeys.js","webpack://@flarum/core/./node_modules/lodash/_isPrototype.js","webpack://@flarum/core/./node_modules/lodash/_nativeKeys.js","webpack://@flarum/core/./node_modules/lodash/_overArg.js","webpack://@flarum/core/./node_modules/lodash/_createBaseEach.js","webpack://@flarum/core/./node_modules/lodash/_castFunction.js","webpack://@flarum/core/./node_modules/lodash/identity.js","webpack://@flarum/core/./node_modules/lodash/_baseGet.js","webpack://@flarum/core/./node_modules/lodash/_isKey.js","webpack://@flarum/core/./node_modules/lodash/_stringToPath.js","webpack://@flarum/core/./node_modules/lodash/_memoizeCapped.js","webpack://@flarum/core/./node_modules/lodash/memoize.js","webpack://@flarum/core/./node_modules/lodash/_MapCache.js","webpack://@flarum/core/./node_modules/lodash/_mapCacheClear.js","webpack://@flarum/core/./node_modules/lodash/_Hash.js","webpack://@flarum/core/./node_modules/lodash/_hashClear.js","webpack://@flarum/core/./node_modules/lodash/_baseIsNative.js","webpack://@flarum/core/./node_modules/lodash/_isMasked.js","webpack://@flarum/core/./node_modules/lodash/_coreJsData.js","webpack://@flarum/core/./node_modules/lodash/_toSource.js","webpack://@flarum/core/./node_modules/lodash/_getValue.js","webpack://@flarum/core/./node_modules/lodash/_hashDelete.js","webpack://@flarum/core/./node_modules/lodash/_hashGet.js","webpack://@flarum/core/./node_modules/lodash/_hashHas.js","webpack://@flarum/core/./node_modules/lodash/_hashSet.js","webpack://@flarum/core/./node_modules/lodash/_ListCache.js","webpack://@flarum/core/./node_modules/lodash/_listCacheClear.js","webpack://@flarum/core/./node_modules/lodash/_listCacheDelete.js","webpack://@flarum/core/./node_modules/lodash/_listCacheGet.js","webpack://@flarum/core/./node_modules/lodash/_listCacheHas.js","webpack://@flarum/core/./node_modules/lodash/_listCacheSet.js","webpack://@flarum/core/./node_modules/lodash/_Map.js","webpack://@flarum/core/./node_modules/lodash/_mapCacheDelete.js","webpack://@flarum/core/./node_modules/lodash/_isKeyable.js","webpack://@flarum/core/./node_modules/lodash/_mapCacheGet.js","webpack://@flarum/core/./node_modules/lodash/_mapCacheHas.js","webpack://@flarum/core/./node_modules/lodash/_mapCacheSet.js","webpack://@flarum/core/./node_modules/lodash/toString.js","webpack://@flarum/core/./node_modules/lodash/_baseToString.js","webpack://@flarum/core/./node_modules/lodash/_arrayMap.js","webpack://@flarum/core/./node_modules/lodash/_baseSet.js","webpack://@flarum/core/./node_modules/lodash/_assignValue.js","webpack://@flarum/core/./node_modules/lodash/_baseAssignValue.js","webpack://@flarum/core/./node_modules/lodash/_defineProperty.js","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/core/./src/common/Bus.ts","webpack://@flarum/core/./src/common/utils/extract.ts","webpack://@flarum/core/./src/common/utils/extractText.ts","webpack://@flarum/core/./src/common/helpers/username.tsx","webpack://@flarum/core/./src/common/Translator.ts","webpack://@flarum/core/./src/common/Session.ts","webpack://@flarum/core/./src/common/Store.ts","webpack://@flarum/core/./src/common/utils/Drawer.ts","webpack://@flarum/core/./src/common/extend.ts","webpack://@flarum/core/./src/common/Model.ts","webpack://@flarum/core/./src/common/models/Forum.ts","webpack://@flarum/core/./src/common/utils/computed.ts","webpack://@flarum/core/./src/common/utils/ItemList.ts","webpack://@flarum/core/./src/common/Component.ts","webpack://@flarum/core/./src/common/helpers/icon.tsx","webpack://@flarum/core/./src/common/components/Badge.tsx","webpack://@flarum/core/./src/common/models/Discussion.tsx","webpack://@flarum/core/./src/common/utils/stringToColor.ts","webpack://@flarum/core/./src/common/components/GroupBadge.ts","webpack://@flarum/core/./src/common/models/User.ts","webpack://@flarum/core/./src/common/utils/string.ts","webpack://@flarum/core/./src/common/models/Post.ts","webpack://@flarum/core/./src/common/models/Group.ts","webpack://@flarum/core/./src/common/models/Notification.ts","webpack://@flarum/core/./src/common/utils/RequestError.ts","webpack://@flarum/core/./node_modules/spin.js/spin.js","webpack://@flarum/core/./src/common/components/LoadingIndicator.tsx","webpack://@flarum/core/./src/common/components/Button.tsx","webpack://@flarum/core/./src/common/components/Separator.tsx","webpack://@flarum/core/./src/common/helpers/listItems.tsx","webpack://@flarum/core/./node_modules/micromodal/dist/micromodal.es.js","webpack://@flarum/core/./src/common/components/Alert.tsx","webpack://@flarum/core/./src/common/components/Modal.tsx","webpack://@flarum/core/./src/common/components/ModalManager.tsx","webpack://@flarum/core/./src/common/Application.ts","webpack://@flarum/core/./src/common/utils/mapRoutes.ts","webpack://@flarum/core/./src/forum/utils/History.ts","webpack://@flarum/core/./src/forum/components/HeaderPrimary.tsx","webpack://@flarum/core/./src/forum/components/LogInModal.tsx","webpack://@flarum/core/./src/common/helpers/avatar.tsx","webpack://@flarum/core/./src/common/components/Dropdown.tsx","webpack://@flarum/core/./src/common/components/LinkButton.tsx","webpack://@flarum/core/./src/forum/components/SessionDropdown.tsx","webpack://@flarum/core/./src/common/components/SelectDropdown.tsx","webpack://@flarum/core/./src/forum/components/NotificationList.tsx","webpack://@flarum/core/./src/forum/components/NotificationsDropdown.tsx","webpack://@flarum/core/./src/forum/utils/KeyboardNavigatable.ts","webpack://@flarum/core/./src/common/helpers/highlight.ts","webpack://@flarum/core/./src/forum/components/SearchSource.ts","webpack://@flarum/core/./src/forum/components/DiscussionsSearchSource.tsx","webpack://@flarum/core/./src/forum/components/UsersSearchSource.tsx","webpack://@flarum/core/./src/forum/components/Search.tsx","webpack://@flarum/core/./src/forum/components/HeaderSecondary.tsx","webpack://@flarum/core/./src/forum/components/IndexPage.tsx","webpack://@flarum/core/./src/forum/components/Page.tsx","webpack://@flarum/core/./src/forum/utils/affixSidebar.ts","webpack://@flarum/core/./src/common/utils/humanTime.ts","webpack://@flarum/core/./src/forum/utils/UserControls.ts","webpack://@flarum/core/./src/forum/components/AvatarEditor.tsx","webpack://@flarum/core/./src/forum/components/UserCard.tsx","webpack://@flarum/core/./src/forum/components/UserPage.tsx","webpack://@flarum/core/./src/forum/components/PostsUserPage.tsx","webpack://@flarum/core/./src/forum/Forum.ts","webpack://@flarum/core/./src/common/compat.ts","webpack://@flarum/core/./src/forum/compat.ts","webpack://@flarum/core/./src/forum/index.ts","webpack://@flarum/core/./forum.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","_extends","assign","target","arguments","length","source","apply","this","g","Function","e","window","Vnode","tag","attrs","children","text","dom","domSize","undefined","state","events","instance","normalize","node","Array","isArray","normalizeChildren","String","input","isKeyed","TypeError","render","require","requestAnimationFrame","console","buildQueryString","template","params","test","SyntaxError","queryIndex","indexOf","hashIndex","queryEnd","pathEnd","path","slice","query","resolved","replace","variadic","encodeURIComponent","newQueryIndex","newHashIndex","newQueryEnd","newPathEnd","result","querystring","parseQueryString","url","hyperscriptVnode","selectorParser","selectorCache","hasOwn","isEmpty","selector","view","Error","vnode","hasClass","className","class","newAttrs","execSelector","match","classes","exec","type","id","push","attrValue","join","compileSelector","start","PromisePolyfill","Promise","finally","global","executor","self","resolvers","rejectors","resolveCurrent","handler","rejectCurrent","_instance","callAsync","setImmediate","setTimeout","list","shouldAbsorb","execute","then","error","retry","executeOnce","runs","run","fn","onerror","onFulfilled","onRejection","resolveNext","rejectNext","handle","callback","next","promise","resolve","reject","catch","reason","all","total","count","values","consume","race","scope","Timeout","clearFn","_id","_clearFn","clearTimeout","setInterval","clearInterval","timeout","close","unref","ref","enroll","item","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","active","_onTimeout","clearImmediate","toString","args","destructure","keys","forEach","string","charAt","entries","split","counters","data","entry","decodeURIComponent","levels","cursor","pop","j","level","nextLevel","isNumber","isNaN","parseInt","desc","getOwnPropertyDescriptor","easeInOutQuad","b","_typeof","iterator","obj","constructor","singleton","element","stop","offset","easing","a11y","distance","duration","timeStart","timeElapsed","top","getBoundingClientRect","loop","timeCurrent","scrollTo","setAttribute","focus","done","options","scrollY","pageYOffset","document","querySelector","jumper","DEFAULT_OPTIONS","Tooltip","reference","title","allowHtml","tooltipGenerator","tooltipNode","Math","titleNode","functionToCheck","getType","titleText","container","placement","arrowSelector","boundariesElement","func","event","directEvents","oppositeEvents","evt","popper","delay","computedDelay","lastTitle","show","hide","dispose","toggle","updateTitleContent","_events","_setTooltipNodeEvent","relatedreference","relatedreference2","evt2","$","tooltip","option","each","$this","attr","removeAttr","includes","dimension","Dimension","toUpperCase","margin","elem","size","side","css","expr","tagName","hover","leave","on","animatedScrollTop","to","fx","speeds","_default","jump","extend","special","bindBeforeSpecialEvents","eventName","el","specialEvent","_init","originalHandler","$target","trigger","setup","mo","_m","dayjs","relativeTime","localizedFormat","comp","bidi","route","href","Link","withAttr","cb","getAttribute","prop","longerTimeoutBrowsers","timeoutDuration","isBrowser","navigator","called","scheduled","isFunction","getStyleComputedProperty","getParentNode","getScrollParent","overflow","overflowX","overflowY","isIE11","isIE10","isIE","version","getOffsetParent","noOffsetParent","offsetParent","nodeName","getRoot","findCommonOffsetParent","element1","element2","order","Node","end","range","commonAncestorContainer","element1root","getScroll","upperSide","html","getBordersSize","styles","axis","sideA","sideB","parseFloat","getSize","body","computedStyle","getWindowSizes","getComputedStyle","getClientRect","offsets","height","rect","scrollTop","scrollLeft","sizes","width","horizScrollbar","vertScrollbar","getOffsetRectRelativeToArbitraryNode","parent","fixedPosition","runIsIE","isHTML","childrenRect","parentRect","scrollParent","borderTopWidth","borderLeftWidth","marginTop","marginLeft","subtract","modifier","includeScroll","getFixedPositionOffsetParent","getBoundaries","boundaries","left","excludeScroll","relativeOffset","getViewportOffsetRectRelativeToArtbitraryNode","boundariesNode","isFixed","parentNode","isPaddingNumber","padding","computeAutoPlacement","rects","refRect","bottom","sortedAreas","getArea","a","filteredAreas","filter","computedPlacement","variation","getReferenceOffsets","getOuterSizes","x","y","getOppositePlacement","hash","right","matched","getPopperOffsets","referenceOffsets","popperRect","popperOffsets","isHoriz","mainSide","secondarySide","measurement","secondaryMeasurement","find","arr","check","runModifiers","modifiers","ends","findIndex","cur","update","flip","positionFixed","isModifierEnabled","modifierName","some","getSupportedPropertyName","prefixes","upperProp","prefix","toCheck","destroy","getWindow","ownerDocument","setupEventListeners","passive","scrollElement","attachToScrollParents","scrollParents","isBody","enableEventListeners","disableEventListeners","removeEventListeners","isNumeric","isFinite","setStyles","unit","isFirefox","isModifierRequired","requesting","isRequired","requested","validPlacements","placements","clockwise","counter","index","BEHAVIORS","parseOffset","useHeight","basePlacement","fragments","map","frag","divider","splitRegex","ops","mergeWithPrevious","op","str","toValue","index2","shiftvariation","isVertical","shiftOffsets","transformProp","popperStyles","transform","floor","opSide","arrowElement","len","sideCapitalized","altSide","arrowElementSize","center","popperMarginSide","popperBorderSide","sideValue","placementOpposite","flipOrder","refOffsets","overlapsRef","overflowsLeft","overflowsRight","overflowsTop","overflowsBottom","overflowsBoundaries","flippedVariationByRef","flippedVariationByContent","flippedVariation","getOppositeVariation","subtractLength","bound","legacyGpuAccelerationOption","gpuAcceleration","offsetParentRect","position","shouldRound","round","noRound","v","referenceWidth","popperWidth","isVariation","horizontalToInteger","verticalToInteger","bothOddWidth","getRoundedOffsets","prefixedProperty","invertTop","invertLeft","attributes","Popper","debounce","modifierOptions","eventsEnabled","Utils","PopperUtils","Defaults","en","future","past","mm","h","hh","dd","M","MM","yy","u","$locale","f","diff","abs","from","$u","utc","toNow","fromNow","format","LTS","LT","L","LL","LLL","LLLL","formats","getRawTag","objectToString","nullTag","undefinedTag","symToStringTag","freeGlobal","freeSelf","root","nativeCreate","getNative","eq","array","isKeyable","__data__","define","Zepto","classList","camelize","uniq","emptyArray","concat","elementDisplay","classCache","cssNumber","fragmentRE","singleTagRE","tagExpanderRE","rootNodeRE","capitalRE","methodAttributes","table","createElement","tableRow","containers","readyRE","simpleSelectorRE","class2type","zepto","tempParent","propMap","isWindow","isDocument","nodeType","DOCUMENT_NODE","isObject","isPlainObject","getPrototypeOf","likeArray","dasherize","toLowerCase","classRE","RegExp","maybeAddPx","childNodes","Z","deep","filtered","nodes","funcArg","context","arg","idx","payload","removeAttribute","klass","svg","baseVal","deserializeValue","parseJSON","traverseNode","fun","matches","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","temp","appendChild","qsa","removeChild","chr","fragment","properties","$1","innerHTML","isZ","init","trim","ready","shift","found","maybeID","maybeClass","nameOnly","isSimple","getElementById","getElementsByClassName","getElementsByTagName","querySelectorAll","contains","documentElement","isEmptyObject","val","num","Number","inArray","camelCase","uuid","support","noop","elements","grep","JSON","parse","reduce","sort","splice","toArray","readyState","addEventListener","remove","every","not","add","is","excludes","has","first","last","closest","collection","_","parents","ancestors","pluck","contents","contentDocument","siblings","child","empty","display","style","getPropertyValue","replaceWith","newContent","before","wrap","structure","clone","wrapAll","cloneNode","append","wrapInner","unwrap","setting","prev","originHtml","newText","textContent","attribute","removeProp","attrName","multiple","selected","coordinates","coords","parentOffset","props","pageXOffset","removeProperty","cssText","addClass","cls","removeClass","toggleClass","when","hasScrollTop","scrollX","hasScrollLeft","detach","dimensionProperty","operator","operatorIndex","inside","argType","copyByClone","nextSibling","firstChild","parentInDocument","insertBefore","src","defaultView","_zid","isString","handlers","specialEvents","focusinSupported","blur","mouseenter","mouseleave","zid","findHandlers","matcher","sel","parts","eventCapture","captureSetting","del","realEvent","delegator","capture","set","related","relatedTarget","proxy","compatible","isImmediatePropagationStopped","_args","preventDefault","stopPropagation","removeEventListener","click","mousedown","mouseup","mousemove","proxyFn","unshift","unbind","off","one","returnTrue","returnFalse","ignoreProperties","eventMethods","stopImmediatePropagation","isDefaultPrevented","predicate","sourceMethod","timeStamp","Date","now","defaultPrevented","returnValue","getPreventDefault","createProxy","originalEvent","delegate","undelegate","live","die","autoRemove","currentTarget","liveFired","Event","dispatchEvent","triggerHandler","createEvent","bubbles","initEvent","jsonpID","rscript","scriptTypeRE","xmlTypeRE","jsonType","htmlType","blankRE","originAnchor","triggerGlobal","settings","triggerAndReturn","ajaxBeforeSend","xhr","beforeSend","ajaxSuccess","deferred","success","resolveWith","ajaxComplete","ajaxError","rejectWith","status","complete","ajaxStop","appendQuery","parseArguments","dataType","location","ajaxJSONP","ajax","responseData","abortTimeout","_callbackName","jsonpCallback","callbackName","script","originalCallback","abort","errorType","head","ajaxSettings","XMLHttpRequest","accepts","json","xml","crossDomain","processData","cache","dataFilter","urlAnchor","Deferred","ajaxStart","protocol","host","param","traditional","serializeData","hasPlaceholder","jsonp","mime","headers","setHeader","nativeSetHeader","setRequestHeader","mimeType","overrideMimeType","contentType","onreadystatechange","mimeToDataType","getResponseHeader","responseType","response","responseText","ajaxDataFilter","eval","responseXML","statusText","async","open","username","password","xhrFields","send","post","getJSON","load","escape","serialize","serializeArray","field","disabled","checked","elm","submit","nativeGetComputedStyle","pseudoElement","factory","z","utcOffset","year","month","ceil","w","ms","Q","weekdays","months","pl","date","D","locale","$L","$d","NaN","UTC","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","isSame","startOf","endOf","isAfter","isBefore","$g","day","hour","minute","second","millisecond","unix","valueOf","getTime","toDate","weekStart","$set","min","daysInMonth","substr","meridiem","YY","YYYY","MMM","monthsShort","MMMM","DD","weekdaysMin","ddd","weekdaysShort","dddd","H","HH","A","ss","SSS","getTimezoneOffset","toJSON","toISOString","toUTCString","isDayjs","Ls","hyperscript","request","mountRedraw","trust","mount","redraw","parsePathname","buildPathname","registerImmediate","channel","messagePrefix","onGlobalMessage","nextHandle","tasksByHandle","currentlyRunningATask","doc","attachTo","process","nextTick","runIfPresent","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","onmessage","canUsePostMessage","MessageChannel","port1","port2","random","attachEvent","task","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","marker","runClearTimeout","Item","browser","env","argv","versions","addListener","once","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","$window","currentRedraw","$doc","nameSpace","math","getNameSpace","xmlns","checkState","original","callHook","activeElement","createNodes","vnodes","hooks","createNode","initLifecycle","createTextNode","insertNode","createText","createHTML","createDocumentFragment","createFragment","createElementNS","setAttr","setAttrs","maybeSetContentEditable","selectedIndex","normalized","setLateSelectAttrs","sentinel","$$reentrantLock$$","initComponent","createComponent","possibleParents","caption","thead","tbody","tfoot","tr","th","td","colgroup","col","updateNodes","old","removeNodes","isOldKeyed","oldStart","oe","ve","topSibling","oldEnd","updateNode","getNextSibling","moveNodes","lisIndices","originalNextSibling","vnodesLength","oldIndices","li","pos","getKeyMap","oldIndex","il","lisTemp","makeLisIndices","commonLength","removeNode","oldTag","force","onbeforeupdate","shouldNotUpdate","updateLifecycle","nodeValue","updateText","removeHTML","updateHTML","updateFragment","updateAttrs","updateElement","updateComponent","moveChildToFrag","contenteditable","contentEditable","content","stateResult","attrsResult","mask","onbeforeremove","reallyRemove","onremove","isLifecycleMethod","isFormAttribute","updateEvent","setAttributeNS","updateStyle","hasPropertyKey","nsLastIndex","uppercaseRegex","capital","normalizeKey","setProperty","EventDict","oninit","oncreate","onupdate","handleEvent","ev","namespace","namespaceURI","prevRedraw","schedule","subscriptions","rendering","pending","sync","component","oncompletion","callbackCount","PromiseProxy","makeRequest","background","hasHeader","__proto__","replacedAbort","method","assumeJSON","FormData","extract","aborted","user","deserialize","withCredentials","message","code","config","stringify","callbackKey","compileTemplate","fireAsync","setPath","history","replaceState","pushState","currentPath","lastUpdate","currentResolver","SKIP","defaultRoute","routes","compiled","defaultData","ReferenceError","resolveRoute","search","pathname","fail","matchedRoute","localComp","onmatch","onclick","Boolean","button","which","ctrlKey","metaKey","shiftKey","altKey","templateData","templateKeys","regexp","extra","k","multi","onchange","selectedOptions","oninput","ctrl","_REVERSE_MAP","_MAP","8","9","13","16","17","18","20","27","32","33","34","35","36","37","38","39","40","45","46","91","93","224","_KEYCODE_MAP","106","107","109","110","111","186","187","188","189","190","191","192","219","220","221","222","_SHIFT_MAP","_SPECIAL_ALIASES","platform","Mousetrap","action","_bindMultiple","_directMap","reset","_callbacks","stopCallback","_belongsTo","ancestor","composedPath","initialEventTarget","isContentEditable","handleKey","_handleKey","addKeycodes","documentMousetrap","_addEvent","_characterFromEvent","character","fromCharCode","_isModifier","_pickBestAction","_getReverseMap","_getKeyInfo","combination","_keysFromString","targetElement","_resetTimer","_sequenceLevels","_ignoreNextKeyup","_ignoreNextKeypress","_nextExpectedAction","_resetSequences","doNotReset","activeSequences","_getMatches","sequenceName","modifiers1","modifiers2","seq","deleteCombo","combo","deleteSequence","_fireCallback","sequence","srcElement","_preventDefault","cancelBubble","_stopPropagation","_handleKeyEvent","keyCode","_eventModifiers","_bindSequence","_increaseSequence","nextAction","_callbackAndReset","wrappedCallback","_bindSingle","info","callbacks","maxLevel","processedSequenceCallback","max","ignoreThisKeypress","combinations","classNames","inner","default","oldQsa","oldMatches","visible","filters","hidden","filterRe","childRe","classTag","taggedParent","dataAttr","exp","expando","setData","store","attributeData","camelName","getData","hasData","removeData","names","methodName","origFn","eventPrefix","transitionProperty","transitionDuration","transitionTiming","transitionDelay","animationName","animationDuration","animationTiming","animationDelay","testEl","supportedTransforms","cssReset","normalizeEvent","Webkit","Moz","O","vendor","fast","slow","cssPrefix","transitionEnd","animationEnd","animate","ease","anim","cssProperties","cssValues","transforms","that","endEvent","fired","clientLeft","origShow","origHide","origToggle","speed","opacity","scale","fadeTo","fadeIn","fadeOut","fadeToggle","U","Y","bottomEnd","innerTop","innerSticker","stickyClass","stickTo","followScroll","responsive","mobileFirst","onStart","onStop","onBeforeResize","onResize","resizeDebounce","disable","queries","queryFlow","log","X","Helpers","getStyle","innerWidth","stick","isAttached","attach","offsetLeft","release","positionLeft","S","E","T","C","N","R","offsetHeight","B","I","q","getCascadedStyle","verticalAlign","boxSizing","marginRight","marginBottom","paddingLeft","paddingRight","float","cssFloat","MozBoxSizing","offsetWidth","HTMLDocument","Document","clientHeight","scrollHeight","innerHeight","offsetTop","F","P","W","V","refresh","triggerMethod","reinit","jQuery","hcSticky","writable","configurable","detachEvent","currentStyle","originalModule","webpackPolyfill","__webpack_amd_options__","backdrop","Dropdown","getParent","$parent","clearMenus","VERSION","isActive","insertAfter","keydown","$items","dropdown","Constructor","noConflict","emulateTransitionEnd","$el","transition","transEndEventNames","WebkitTransition","MozTransition","OTransition","bsTransitionEnd","bindType","delegateType","handleObj","Stream","lift","merge","streams","scan","acc","origin","stream","combine","scanMerge","tuples","seed","tuple","changed","warnedHalt","dependentStreams","dependentFns","_changing","_state","_parents","_map","ignoreInitial","s1","s2","_unregisterChild","childIndex","mappers","endStream","mapper","baseGetTag","isObjectLike","symbolTag","baseIsNative","getValue","deprecate","paths","MAX_SAFE_INTEGER","reIsUint","isLength","asyncTag","funcTag","genTag","proxyTag","isKey","stringToPath","other","isSymbol","INFINITY","arrayEach","baseEach","castFunction","iteratee","baseGet","defaultValue","baseSet","baseForOwn","createBaseEach","baseFor","createBaseFor","fromRight","keysFunc","iterable","arrayLikeKeys","baseKeys","isArrayLike","baseTimes","isArguments","isBuffer","isIndex","isTypedArray","inherited","isArr","isArg","isBuff","isType","skipIndexes","baseIsArguments","objectProto","propertyIsEnumerable","argsTag","nativeObjectToString","isOwn","unmasked","stubFalse","freeExports","freeModule","Buffer","baseIsTypedArray","baseUnary","nodeUtil","nodeIsTypedArray","typedArrayTags","freeProcess","types","isPrototype","nativeKeys","Ctor","overArg","eachFunc","identity","castPath","toKey","reIsDeepProp","reIsPlainProp","memoizeCapped","rePropName","reEscapeChar","charCodeAt","number","quote","subString","memoize","MAX_MEMOIZE_SIZE","clear","MapCache","FUNC_ERROR_TEXT","resolver","memoized","Cache","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","Hash","ListCache","Map","hashClear","hashDelete","hashGet","hashHas","hashSet","isMasked","toSource","reIsHostCtor","funcProto","funcToString","reIsNative","uid","coreJsData","maskSrcKey","IE_PROTO","HASH_UNDEFINED","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","assocIndexOf","getMapData","baseToString","arrayMap","symbolProto","symbolToString","assignValue","customizer","lastIndex","nested","newValue","objValue","baseAssignValue","_inheritsLoose","subClass","superClass","Bus","subscribers","subscribe","callable","dispatch","listener","extractText","vdom","displayName","app","translator","trans","Translator","translations","addTranslations","parameters","translation","transText","hydrated","part","Session","csrfToken","login","forum","logout","Store","models","pushPayload","included","pushObject","pushData","createRecord","exists","getById","getBy","model","records","Drawer","$backdrop","isOpen","appendTo","override","newMethod","Model","freshness","innerKey","getIdentifier","pushAttributes","save","relationships","oldData","copyData","meta","apiEndpoint","delete","hasOne","relationship","hasMany","transformDate","Forum","computed","dependentKeys","compute","computedValue","dependentValues","recompute","priority","ItemList","items","itemName","Component","setProps","$element","componentProps","initProps","icon","fontClass","Badge","iconName","label","Discussion","slug","createdAt","firstPost","lastPostedAt","lastPostedUser","lastPost","lastPostNumber","commentCount","replyCount","posts","mostRelevantPost","lastReadAt","lastReadPostNumber","isUnread","unreadCount","isRead","session","hiddenAt","hiddenUser","isHidden","canReply","canRename","canHide","canDelete","removePost","markedAllAsReadAt","badges","postIds","link","stringToColor","rgb","hsvToRgb","GroupBadge","group","backgroundColor","color","nameSingular","User","email","isEmailConfirmed","avatarUrl","preferences","groups","joinTime","lastSeenAt","unreadNotificationCount","newNotificationCount","discussionCount","canEdit","avatarColor","calculateAvatarColor","isOnline","image","Image","onload","colorThief","ColorThief","getColor","savePreferences","newPreferences","getPlainContent","removeSelectors","Post","discussion","contentHtml","contentPlain","editedAt","editedUser","isEdited","Group","namePlural","ADMINISTRATOR_ID","GUEST_ID","MEMBER_ID","Notification","fromUser","subject","RequestError","alert","__assign","defaults","lines","radius","corners","fadeColor","animation","rotate","direction","zIndex","shadow","Spinner","opts","spin","borderRadius","shadows","boxShadow","regex","_i","_a","xUnits","yUnits","parseBoxShadow","degrees","backgroundLine","transformOrigin","line","normalizeShadow","drawLines","cancelAnimationFrame","animateId","shadows_1","xy","convertOffset","radians","PI","sin","cos","LoadingIndicator","sizeOptions","Button","loading","getButtonContent","Separator","isSeparator","listItems","prevItem","newItems","withoutUnnecessarySeparators","isListItem","itemClassName","FOCUSABLE_ELEMENTS","Modal","activeModal","validateModalPresence","validateArgs","Alert","controls","dismissible","ondismiss","dismissControl","MicroModal","targetModal","triggers","onShow","onClose","openTrigger","closeTrigger","disableScroll","disableFocus","awaitCloseAnimation","awaitOpenAnimation","debugMode","modal","registerTriggers","onClick","onKeydown","showModal","scrollBehaviour","addEventListeners","setFocusToFirstNode","closeModal","closeModalById","hasAttribute","maintainFocus","getFocusableNodes","focusableNodes","focusedItemIndex","warn","triggerMap","validateTriggerPresence","triggerAttr","generateTriggerMap","isDismissible","onsubmit","onready","select","onhide","loaded","errors","pointer","ModalManager","showing","hideTimeout","current","retain","Application","bus","forums","users","discussions","notifications","drawer","titleCount","requestError","basePath","routeName","mapRoutes","boot","resources","userId","plugins","setupRoutes","preloadedApiDocument","apiDocument","results","setTitle","updateTitle","setTitleCount","queryString","originalOptions","errorHandler","res","detail","History","stack","getCurrent","getPrevious","secondTop","canGoBack","back","home","backUrl","HeaderPrimary","LogInModal","identification","remember","footer","fields","placeholder","forgotPassword","signUp","ForgotPasswordModal","reload","avatar","hasTitle","buttonClassName","menuClassName","caretIcon","getButton","getMenu","onshow","$menu","isRight","data-toggle","LinkButton","SessionDropdown","SelectDropdown","activeChild","defaultLabel","NotificationList","moreResults","$scrollParent","scrollHandler","pages","markAllAsRead","notification","NotificationComponent","notificationComponents","$notifications","viewportHeight","contentTop","contentHeight","loadMore","page","parseResults","links","NotificationsDropdown","newNotifications","getNewCount","unread","getUnreadCount","menuClick","goToRoute","KeyboardNavigatable","whenCallback","onUp","onDown","onSelect","onCancel","onRemove","selectionStart","selectionEnd","bindTo","navigate","keyCallback","highlight","phrase","highlighted","substring","truncate","SearchSource","DiscussionsSearchSource","limit","include","data-index","UsersSearchSource","lastIndexOf","localeCompare","Search","hasFocus","sources","loadingSources","searched","searchTimeout","currentSearch","getCurrentSearch","sourceItems","focused","onfocus","onblur","setIndex","getCurrentNumericIndex","selectableItems","$input","selectResult","searching","getItem","clearSearch","$item","scrollToItem","$dropdown","fixedIndex","dropdownScroll","dropdownTop","dropdownBottom","outerHeight","itemTop","itemBottom","HeaderSecondary","locales","cookie","SignUpModal","IndexPage","Page","bodyClass","previous","affixSidebar","$sidebar","$header","$affixElement","humanTime","time","section","userControls","moderationControls","editAction","destructiveControls","deleteAction","confirm","UserPage","EditUserModal","AvatarEditor","isDraggedOver","quickUpload","ondragover","enableDragover","ondragenter","ondragleave","disableDragover","ondragend","ondrop","dropUpload","controlItems","openPicker","upload","dataTransfer","files","file","raw","failure","UserCard","UserControls","controlsButtonClassName","editable","infoItems","online","ago","sidebarItems","lassName","loadUser","lowercaseUsername","navItems","PostsUserPage","loadLimit","loadResults","defaultAction","near","compat","extensions","flarum"],"mappings":"wBACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAM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AAYr7D,SAAQ,SAAApL,GACVymE,EAAWzmE,SAWrCwmE,GAAO3c,IAAMA,GCvBb","file":"forum.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 143);\n","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","\"use strict\"\n\nfunction Vnode(tag, key, attrs, children, text, dom) {\n\treturn {tag: tag, key: key, attrs: attrs, children: children, text: text, dom: dom, domSize: undefined, state: undefined, events: undefined, instance: undefined}\n}\nVnode.normalize = function(node) {\n\tif (Array.isArray(node)) return Vnode(\"[\", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined)\n\tif (node == null || typeof node === \"boolean\") return null\n\tif (typeof node === \"object\") return node\n\treturn Vnode(\"#\", undefined, undefined, String(node), undefined, undefined)\n}\nVnode.normalizeChildren = function(input) {\n\tvar children = []\n\tif (input.length) {\n\t\tvar isKeyed = input[0] != null && input[0].key != null\n\t\t// Note: this is a *very* perf-sensitive check.\n\t\t// Fun fact: merging the loop like this is somehow faster than splitting\n\t\t// it, noticeably so.\n\t\tfor (var i = 1; i < input.length; i++) {\n\t\t\tif ((input[i] != null && input[i].key != null) !== isKeyed) {\n\t\t\t\tthrow new TypeError(\"Vnodes must either always have keys or never have keys!\")\n\t\t\t}\n\t\t}\n\t\tfor (var i = 0; i < input.length; i++) {\n\t\t\tchildren[i] = Vnode.normalize(input[i])\n\t\t}\n\t}\n\treturn children\n}\n\nmodule.exports = Vnode\n","module.exports = m;","\"use strict\"\n\nvar render = require(\"./render\")\n\nmodule.exports = require(\"./api/mount-redraw\")(render, requestAnimationFrame, console)\n","\"use strict\"\n\nvar buildQueryString = require(\"../querystring/build\")\nvar assign = require(\"./assign\")\n\n// Returns `path` from `template` + `params`\nmodule.exports = function(template, params) {\n\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(template)) {\n\t\tthrow new SyntaxError(\"Template parameter names *must* be separated\")\n\t}\n\tif (params == null) return template\n\tvar queryIndex = template.indexOf(\"?\")\n\tvar hashIndex = template.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? template.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = template.slice(0, pathEnd)\n\tvar query = {}\n\n\tassign(query, params)\n\n\tvar resolved = path.replace(/:([^\\/\\.-]+)(\\.{3})?/g, function(m, key, variadic) {\n\t\tdelete query[key]\n\t\t// If no such parameter exists, don't interpolate it.\n\t\tif (params[key] == null) return m\n\t\t// Escape normal parameters, but not variadic ones.\n\t\treturn variadic ? params[key] : encodeURIComponent(String(params[key]))\n\t})\n\n\t// In case the template substitution adds new query/hash parameters.\n\tvar newQueryIndex = resolved.indexOf(\"?\")\n\tvar newHashIndex = resolved.indexOf(\"#\")\n\tvar newQueryEnd = newHashIndex < 0 ? resolved.length : newHashIndex\n\tvar newPathEnd = newQueryIndex < 0 ? newQueryEnd : newQueryIndex\n\tvar result = resolved.slice(0, newPathEnd)\n\n\tif (queryIndex >= 0) result += template.slice(queryIndex, queryEnd)\n\tif (newQueryIndex >= 0) result += (queryIndex < 0 ? \"?\" : \"&\") + resolved.slice(newQueryIndex, newQueryEnd)\n\tvar querystring = buildQueryString(query)\n\tif (querystring) result += (queryIndex < 0 && newQueryIndex < 0 ? \"?\" : \"&\") + querystring\n\tif (hashIndex >= 0) result += template.slice(hashIndex)\n\tif (newHashIndex >= 0) result += (hashIndex < 0 ? \"\" : \"&\") + resolved.slice(newHashIndex)\n\treturn result\n}\n","\"use strict\"\n\nvar parseQueryString = require(\"../querystring/parse\")\n\n// Returns `{path, params}` from `url`\nmodule.exports = function(url) {\n\tvar queryIndex = url.indexOf(\"?\")\n\tvar hashIndex = url.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? url.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = url.slice(0, pathEnd).replace(/\\/{2,}/g, \"/\")\n\n\tif (!path) path = \"/\"\n\telse {\n\t\tif (path[0] !== \"/\") path = \"/\" + path\n\t\tif (path.length > 1 && path[path.length - 1] === \"/\") path = path.slice(0, -1)\n\t}\n\treturn {\n\t\tpath: path,\n\t\tparams: queryIndex < 0\n\t\t\t? {}\n\t\t\t: parseQueryString(url.slice(queryIndex + 1, queryEnd)),\n\t}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nvar selectorParser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[(.+?)(?:\\s*=\\s*(\"|'|)((?:\\\\[\"'\\]]|.)*?)\\5)?\\])/g\nvar selectorCache = {}\nvar hasOwn = {}.hasOwnProperty\n\nfunction isEmpty(object) {\n\tfor (var key in object) if (hasOwn.call(object, key)) return false\n\treturn true\n}\n\nfunction compileSelector(selector) {\n\tvar match, tag = \"div\", classes = [], attrs = {}\n\twhile (match = selectorParser.exec(selector)) {\n\t\tvar type = match[1], value = match[2]\n\t\tif (type === \"\" && value !== \"\") tag = value\n\t\telse if (type === \"#\") attrs.id = value\n\t\telse if (type === \".\") classes.push(value)\n\t\telse if (match[3][0] === \"[\") {\n\t\t\tvar attrValue = match[6]\n\t\t\tif (attrValue) attrValue = attrValue.replace(/\\\\([\"'])/g, \"$1\").replace(/\\\\\\\\/g, \"\\\\\")\n\t\t\tif (match[4] === \"class\") classes.push(attrValue)\n\t\t\telse attrs[match[4]] = attrValue === \"\" ? attrValue : attrValue || true\n\t\t}\n\t}\n\tif (classes.length > 0) attrs.className = classes.join(\" \")\n\treturn selectorCache[selector] = {tag: tag, attrs: attrs}\n}\n\nfunction execSelector(state, vnode) {\n\tvar attrs = vnode.attrs\n\tvar children = Vnode.normalizeChildren(vnode.children)\n\tvar hasClass = hasOwn.call(attrs, \"class\")\n\tvar className = hasClass ? attrs.class : attrs.className\n\n\tvnode.tag = state.tag\n\tvnode.attrs = null\n\tvnode.children = undefined\n\n\tif (!isEmpty(state.attrs) && !isEmpty(attrs)) {\n\t\tvar newAttrs = {}\n\n\t\tfor (var key in attrs) {\n\t\t\tif (hasOwn.call(attrs, key)) newAttrs[key] = attrs[key]\n\t\t}\n\n\t\tattrs = newAttrs\n\t}\n\n\tfor (var key in state.attrs) {\n\t\tif (hasOwn.call(state.attrs, key) && key !== \"className\" && !hasOwn.call(attrs, key)){\n\t\t\tattrs[key] = state.attrs[key]\n\t\t}\n\t}\n\tif (className != null || state.attrs.className != null) attrs.className =\n\t\tclassName != null\n\t\t\t? state.attrs.className != null\n\t\t\t\t? String(state.attrs.className) + \" \" + String(className)\n\t\t\t\t: className\n\t\t\t: state.attrs.className != null\n\t\t\t\t? state.attrs.className\n\t\t\t\t: null\n\n\tif (hasClass) attrs.class = null\n\n\tfor (var key in attrs) {\n\t\tif (hasOwn.call(attrs, key) && key !== \"key\") {\n\t\t\tvnode.attrs = attrs\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif (Array.isArray(children) && children.length === 1 && children[0] != null && children[0].tag === \"#\") {\n\t\tvnode.text = children[0].children\n\t} else {\n\t\tvnode.children = children\n\t}\n\n\treturn vnode\n}\n\nfunction hyperscript(selector) {\n\tif (selector == null || typeof selector !== \"string\" && typeof selector !== \"function\" && typeof selector.view !== \"function\") {\n\t\tthrow Error(\"The selector must be either a string or a component.\");\n\t}\n\n\tvar vnode = hyperscriptVnode.apply(1, arguments)\n\n\tif (typeof selector === \"string\") {\n\t\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\t\tif (selector !== \"[\") return execSelector(selectorCache[selector] || compileSelector(selector), vnode)\n\t}\n\n\tvnode.tag = selector\n\treturn vnode\n}\n\nmodule.exports = hyperscript\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\n// Call via `hyperscriptVnode.apply(startOffset, arguments)`\n//\n// The reason I do it this way, forwarding the arguments and passing the start\n// offset in `this`, is so I don't have to create a temporary array in a\n// performance-critical path.\n//\n// In native ES6, I'd instead add a final `...args` parameter to the\n// `hyperscript` and `fragment` factories and define this as\n// `hyperscriptVnode(...args)`, since modern engines do optimize that away. But\n// ES5 (what Mithril requires thanks to IE support) doesn't give me that luxury,\n// and engines aren't nearly intelligent enough to do either of these:\n//\n// 1. Elide the allocation for `[].slice.call(arguments, 1)` when it's passed to\n// another function only to be indexed.\n// 2. Elide an `arguments` allocation when it's passed to any function other\n// than `Function.prototype.apply` or `Reflect.apply`.\n//\n// In ES6, it'd probably look closer to this (I'd need to profile it, though):\n// module.exports = function(attrs, ...children) {\n// if (attrs == null || typeof attrs === \"object\" && attrs.tag == null && !Array.isArray(attrs)) {\n// if (children.length === 1 && Array.isArray(children[0])) children = children[0]\n// } else {\n// children = children.length === 0 && Array.isArray(attrs) ? attrs : [attrs, ...children]\n// attrs = undefined\n// }\n//\n// if (attrs == null) attrs = {}\n// return Vnode(\"\", attrs.key, attrs, children)\n// }\nmodule.exports = function() {\n\tvar attrs = arguments[this], start = this + 1, children\n\n\tif (attrs == null) {\n\t\tattrs = {}\n\t} else if (typeof attrs !== \"object\" || attrs.tag != null || Array.isArray(attrs)) {\n\t\tattrs = {}\n\t\tstart = this\n\t}\n\n\tif (arguments.length === start + 1) {\n\t\tchildren = arguments[start]\n\t\tif (!Array.isArray(children)) children = [children]\n\t} else {\n\t\tchildren = []\n\t\twhile (start < arguments.length) children.push(arguments[start++])\n\t}\n\n\treturn Vnode(\"\", attrs.key, attrs, children)\n}\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./polyfill\")\n\nif (typeof window !== \"undefined\") {\n\tif (typeof window.Promise === \"undefined\") {\n\t\twindow.Promise = PromisePolyfill\n\t} else if (!window.Promise.prototype.finally) {\n\t\twindow.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = window.Promise\n} else if (typeof global !== \"undefined\") {\n\tif (typeof global.Promise === \"undefined\") {\n\t\tglobal.Promise = PromisePolyfill\n\t} else if (!global.Promise.prototype.finally) {\n\t\tglobal.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = global.Promise\n} else {\n\tmodule.exports = PromisePolyfill\n}\n","\"use strict\"\n/** @constructor */\nvar PromisePolyfill = function(executor) {\n\tif (!(this instanceof PromisePolyfill)) throw new Error(\"Promise must be called with `new`\")\n\tif (typeof executor !== \"function\") throw new TypeError(\"executor must be a function\")\n\n\tvar self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false)\n\tvar instance = self._instance = {resolvers: resolvers, rejectors: rejectors}\n\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\tfunction handler(list, shouldAbsorb) {\n\t\treturn function execute(value) {\n\t\t\tvar then\n\t\t\ttry {\n\t\t\t\tif (shouldAbsorb && value != null && (typeof value === \"object\" || typeof value === \"function\") && typeof (then = value.then) === \"function\") {\n\t\t\t\t\tif (value === self) throw new TypeError(\"Promise can't be resolved w/ itself\")\n\t\t\t\t\texecuteOnce(then.bind(value))\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcallAsync(function() {\n\t\t\t\t\t\tif (!shouldAbsorb && list.length === 0) console.error(\"Possible unhandled promise rejection:\", value)\n\t\t\t\t\t\tfor (var i = 0; i < list.length; i++) list[i](value)\n\t\t\t\t\t\tresolvers.length = 0, rejectors.length = 0\n\t\t\t\t\t\tinstance.state = shouldAbsorb\n\t\t\t\t\t\tinstance.retry = function() {execute(value)}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\trejectCurrent(e)\n\t\t\t}\n\t\t}\n\t}\n\tfunction executeOnce(then) {\n\t\tvar runs = 0\n\t\tfunction run(fn) {\n\t\t\treturn function(value) {\n\t\t\t\tif (runs++ > 0) return\n\t\t\t\tfn(value)\n\t\t\t}\n\t\t}\n\t\tvar onerror = run(rejectCurrent)\n\t\ttry {then(run(resolveCurrent), onerror)} catch (e) {onerror(e)}\n\t}\n\n\texecuteOnce(executor)\n}\nPromisePolyfill.prototype.then = function(onFulfilled, onRejection) {\n\tvar self = this, instance = self._instance\n\tfunction handle(callback, list, next, state) {\n\t\tlist.push(function(value) {\n\t\t\tif (typeof callback !== \"function\") next(value)\n\t\t\telse try {resolveNext(callback(value))} catch (e) {if (rejectNext) rejectNext(e)}\n\t\t})\n\t\tif (typeof instance.retry === \"function\" && state === instance.state) instance.retry()\n\t}\n\tvar resolveNext, rejectNext\n\tvar promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject})\n\thandle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false)\n\treturn promise\n}\nPromisePolyfill.prototype.catch = function(onRejection) {\n\treturn this.then(null, onRejection)\n}\nPromisePolyfill.prototype.finally = function(callback) {\n\treturn this.then(\n\t\tfunction(value) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn value\n\t\t\t})\n\t\t},\n\t\tfunction(reason) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn PromisePolyfill.reject(reason);\n\t\t\t})\n\t\t}\n\t)\n}\nPromisePolyfill.resolve = function(value) {\n\tif (value instanceof PromisePolyfill) return value\n\treturn new PromisePolyfill(function(resolve) {resolve(value)})\n}\nPromisePolyfill.reject = function(value) {\n\treturn new PromisePolyfill(function(resolve, reject) {reject(value)})\n}\nPromisePolyfill.all = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tvar total = list.length, count = 0, values = []\n\t\tif (list.length === 0) resolve([])\n\t\telse for (var i = 0; i < list.length; i++) {\n\t\t\t(function(i) {\n\t\t\t\tfunction consume(value) {\n\t\t\t\t\tcount++\n\t\t\t\t\tvalues[i] = value\n\t\t\t\t\tif (count === total) resolve(values)\n\t\t\t\t}\n\t\t\t\tif (list[i] != null && (typeof list[i] === \"object\" || typeof list[i] === \"function\") && typeof list[i].then === \"function\") {\n\t\t\t\t\tlist[i].then(consume, reject)\n\t\t\t\t}\n\t\t\t\telse consume(list[i])\n\t\t\t})(i)\n\t\t}\n\t})\n}\nPromisePolyfill.race = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tfor (var i = 0; i < list.length; i++) {\n\t\t\tlist[i].then(resolve, reject)\n\t\t}\n\t})\n}\n\nmodule.exports = PromisePolyfill\n","var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n","\"use strict\"\n\nmodule.exports = require(\"./render/render\")(window)\n","\"use strict\"\n\nmodule.exports = function(object) {\n\tif (Object.prototype.toString.call(object) !== \"[object Object]\") return \"\"\n\n\tvar args = []\n\tfor (var key in object) {\n\t\tdestructure(key, object[key])\n\t}\n\n\treturn args.join(\"&\")\n\n\tfunction destructure(key, value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tfor (var i = 0; i < value.length; i++) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse if (Object.prototype.toString.call(value) === \"[object Object]\") {\n\t\t\tfor (var i in value) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse args.push(encodeURIComponent(key) + (value != null && value !== \"\" ? \"=\" + encodeURIComponent(value) : \"\"))\n\t}\n}\n","\"use strict\"\n\nmodule.exports = Object.assign || function(target, source) {\n\tif(source) Object.keys(source).forEach(function(key) { target[key] = source[key] })\n}\n","\"use strict\"\n\nmodule.exports = function(string) {\n\tif (string === \"\" || string == null) return {}\n\tif (string.charAt(0) === \"?\") string = string.slice(1)\n\n\tvar entries = string.split(\"&\"), counters = {}, data = {}\n\tfor (var i = 0; i < entries.length; i++) {\n\t\tvar entry = entries[i].split(\"=\")\n\t\tvar key = decodeURIComponent(entry[0])\n\t\tvar value = entry.length === 2 ? decodeURIComponent(entry[1]) : \"\"\n\n\t\tif (value === \"true\") value = true\n\t\telse if (value === \"false\") value = false\n\n\t\tvar levels = key.split(/\\]\\[?|\\[/)\n\t\tvar cursor = data\n\t\tif (key.indexOf(\"[\") > -1) levels.pop()\n\t\tfor (var j = 0; j < levels.length; j++) {\n\t\t\tvar level = levels[j], nextLevel = levels[j + 1]\n\t\t\tvar isNumber = nextLevel == \"\" || !isNaN(parseInt(nextLevel, 10))\n\t\t\tif (level === \"\") {\n\t\t\t\tvar key = levels.slice(0, j).join()\n\t\t\t\tif (counters[key] == null) {\n\t\t\t\t\tcounters[key] = Array.isArray(cursor) ? cursor.length : 0\n\t\t\t\t}\n\t\t\t\tlevel = counters[key]++\n\t\t\t}\n\t\t\t// Disallow direct prototype pollution\n\t\t\telse if (level === \"__proto__\") break\n\t\t\tif (j === levels.length - 1) cursor[level] = value\n\t\t\telse {\n\t\t\t\t// Read own properties exclusively to disallow indirect\n\t\t\t\t// prototype pollution\n\t\t\t\tvar desc = Object.getOwnPropertyDescriptor(cursor, level)\n\t\t\t\tif (desc != null) desc = desc.value\n\t\t\t\tif (desc == null) cursor[level] = desc = isNumber ? [] : {}\n\t\t\t\tcursor = desc\n\t\t\t}\n\t\t}\n\t}\n\treturn data\n}\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","// Robert Penner's easeInOutQuad\n\n// find the rest of his easing functions here: http://robertpenner.com/easing/\n// find them exported for ES6 consumption here: https://github.com/jaxgeller/ez.js\n\nvar easeInOutQuad = function easeInOutQuad(t, b, c, d) {\n t /= d / 2;\n if (t < 1) return c / 2 * t * t + b;\n t--;\n return -c / 2 * (t * (t - 2) - 1) + b;\n};\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar jumper = function jumper() {\n // private variable cache\n // no variables are created during a jump, preventing memory leaks\n\n var element = void 0; // element to scroll to (node)\n\n var start = void 0; // where scroll starts (px)\n var stop = void 0; // where scroll stops (px)\n\n var offset = void 0; // adjustment from the stop position (px)\n var easing = void 0; // easing function (function)\n var a11y = void 0; // accessibility support flag (boolean)\n\n var distance = void 0; // distance of scroll (px)\n var duration = void 0; // scroll duration (ms)\n\n var timeStart = void 0; // time scroll started (ms)\n var timeElapsed = void 0; // time spent scrolling thus far (ms)\n\n var next = void 0; // next scroll position (px)\n\n var callback = void 0; // to call when done scrolling (function)\n\n // scroll position helper\n\n function location() {\n return window.scrollY || window.pageYOffset;\n }\n\n // element offset helper\n\n function top(element) {\n return element.getBoundingClientRect().top + start;\n }\n\n // rAF loop helper\n\n function loop(timeCurrent) {\n // store time scroll started, if not started already\n if (!timeStart) {\n timeStart = timeCurrent;\n }\n\n // determine time spent scrolling so far\n timeElapsed = timeCurrent - timeStart;\n\n // calculate next scroll position\n next = easing(timeElapsed, start, distance, duration);\n\n // scroll to it\n window.scrollTo(0, next);\n\n // check progress\n timeElapsed < duration ? window.requestAnimationFrame(loop) // continue scroll loop\n : done(); // scrolling is done\n }\n\n // scroll finished helper\n\n function done() {\n // account for rAF time rounding inaccuracies\n window.scrollTo(0, start + distance);\n\n // if scrolling to an element, and accessibility is enabled\n if (element && a11y) {\n // add tabindex indicating programmatic focus\n element.setAttribute('tabindex', '-1');\n\n // focus the element\n element.focus();\n }\n\n // if it exists, fire the callback\n if (typeof callback === 'function') {\n callback();\n }\n\n // reset time for next jump\n timeStart = false;\n }\n\n // API\n\n function jump(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // resolve options, or use defaults\n duration = options.duration || 1000;\n offset = options.offset || 0;\n callback = options.callback; // \"undefined\" is a suitable default, and won't be called\n easing = options.easing || easeInOutQuad;\n a11y = options.a11y || false;\n\n // cache starting position\n start = location();\n\n // resolve target\n switch (typeof target === 'undefined' ? 'undefined' : _typeof(target)) {\n // scroll from current position\n case 'number':\n element = undefined; // no element to scroll to\n a11y = false; // make sure accessibility is off\n stop = start + target;\n break;\n\n // scroll to element (node)\n // bounding rect is relative to the viewport\n case 'object':\n element = target;\n stop = top(element);\n break;\n\n // scroll to element (selector)\n // bounding rect is relative to the viewport\n case 'string':\n element = document.querySelector(target);\n stop = top(element);\n break;\n }\n\n // resolve scroll distance, accounting for offset\n distance = stop - start + offset;\n\n // resolve duration\n switch (_typeof(options.duration)) {\n // number in ms\n case 'number':\n duration = options.duration;\n break;\n\n // function passed the distance of the scroll\n case 'function':\n duration = options.duration(distance);\n break;\n }\n\n // start the loop\n window.requestAnimationFrame(loop);\n }\n\n // expose only the jump method\n return jump;\n};\n\n// export singleton\n\nvar singleton = jumper();\n\nexport default singleton;\n","// Utils\nimport debounce from './utils/debounce';\nimport isFunction from './utils/isFunction';\n\n// Methods\nimport update from './methods/update';\nimport destroy from './methods/destroy';\nimport enableEventListeners from './methods/enableEventListeners';\nimport disableEventListeners from './methods/disableEventListeners';\nimport Defaults from './methods/defaults';\nimport placements from './methods/placements';\n\nexport default class Popper {\n /**\n * Creates a new Popper.js instance.\n * @class Popper\n * @param {Element|referenceObject} reference - The reference element used to position the popper\n * @param {Element} popper - The HTML / XML element used as the popper\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n constructor(reference, popper, options = {}) {\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = { ...Popper.Defaults, ...options };\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: [],\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys({\n ...Popper.Defaults.modifiers,\n ...options.modifiers,\n }).forEach(name => {\n this.options.modifiers[name] = {\n // If it's a built-in modifier, use it as base\n ...(Popper.Defaults.modifiers[name] || {}),\n // If there are custom options, override and merge with default ones\n ...(options.modifiers ? options.modifiers[name] : {}),\n };\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers)\n .map(name => ({\n name,\n ...this.options.modifiers[name],\n }))\n // sort the modifiers by order\n .sort((a, b) => a.order - b.order);\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(modifierOptions => {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(\n this.reference,\n this.popper,\n this.options,\n modifierOptions,\n this.state\n );\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n\n const eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n update() {\n return update.call(this);\n }\n destroy() {\n return destroy.call(this);\n }\n enableEventListeners() {\n return enableEventListeners.call(this);\n }\n disableEventListeners() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedules an update. It will run on the next UI update available.\n * @method scheduleUpdate\n * @memberof Popper\n */\n scheduleUpdate = () => requestAnimationFrame(this.update);\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n static Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\n\n static placements = placements;\n\n static Defaults = Defaults;\n}\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.<br />\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n","/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nexport default function isFunction(functionToCheck) {\n const getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","import jump from 'jump.js';\r\nimport Tooltip from 'tooltip.js';\r\n\r\n// add $.fn.tooltip\r\n$.fn.tooltip = function (option) {\r\n return this.each(function () {\r\n const $this = $(this);\r\n let data = $this.data('bs.tooltip');\r\n const options = typeof option === 'object' && option || {};\r\n\r\n if ($this.attr('title')) {\r\n options.title = $this.attr('title');\r\n $this.removeAttr('title');\r\n $this.attr('data-original-title', options.title);\r\n }\r\n\r\n if (option === 'destroy') option = 'dispose';\r\n\r\n if (!data && ['dispose', 'hide'].includes(option)) return;\r\n\r\n if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)));\r\n if (typeof option === 'string' && data[option]) data[option]();\r\n });\r\n};\r\n\r\n// add $.fn.outerWidth and $.fn.outerHeight\r\n['width', 'height'].forEach(function(dimension) {\r\n const Dimension = dimension.replace(/./, function (m) {\r\n return m[0].toUpperCase()\r\n });\r\n\r\n $.fn[`outer${Dimension}`] = function(margin) {\r\n const elem = this;\r\n\r\n if (elem) {\r\n const sides = {'width': ['left', 'right'], 'height': ['top', 'bottom']};\r\n let size = elem[dimension]();\r\n\r\n sides[dimension].forEach(function(side) {\r\n if (margin) size += parseInt(elem.css('margin-' + side), 10);\r\n });\r\n\r\n return size;\r\n } else {\r\n return null;\r\n }\r\n };\r\n});\r\n\r\n// allow use of $(':input')\r\n// @ts-ignore\r\n$.expr[':']['input'] = function() {\r\n if (('disabled' in this) || ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON'].includes(this.tagName)) return this;\r\n};\r\n\r\n// add $().hover() method\r\n$.fn.hover = function(hover, leave) {\r\n return this\r\n .on('mouseenter', hover)\r\n .on('mouseleave', leave || hover);\r\n};\r\n\r\n// add animated scroll\r\n$.fn.animatedScrollTop = function (to, duration = $.fx.speeds._default, callback) {\r\n if (typeof to === 'number') to -= (window.scrollY || window.pageYOffset);\r\n\r\n jump(to, {\r\n duration: $.fx.speeds[duration] || duration,\r\n callback\r\n });\r\n\r\n return this;\r\n};\r\n\r\n// required for compatibility with jquery plugins\r\n// ex: bootstrap plugins\r\n$.fn.extend = $.extend.bind($);\r\n\r\n/**\r\n * Enable special events on Zepto\r\n * @license Original Copyright 2013 Enideo. Released under dual MIT and GPL licenses.\r\n */\r\n// @ts-ignore\r\n$.event.special = $.event.special || {};\r\n\r\nconst bindBeforeSpecialEvents = $.fn.bind;\r\n\r\n$.fn.bind = function(eventName, data, callback) {\r\n const el = this;\r\n\r\n if (!callback){\r\n callback = data;\r\n data = null;\r\n }\r\n\r\n $.each(eventName.split(/\\s/), (key: string, value: any) : boolean => {\r\n value = value.split(/\\./)[0];\r\n\r\n if(value in $.event.special){\r\n let specialEvent = $.event.special[value];\r\n\r\n /// init enable special events on Zepto\r\n if(!specialEvent._init) {\r\n specialEvent._init = true;\r\n\r\n /// intercept and replace the special event handler to add functionality\r\n specialEvent.originalHandler = specialEvent.handler;\r\n specialEvent.handler = function(){\r\n\r\n /// make event argument writable, like on jQuery\r\n const args = Array.prototype.slice.call(arguments);\r\n\r\n args[0] = $.extend({},args[0]);\r\n\r\n /// define the event handle, $.event.dispatch is only for newer versions of jQuery\r\n $.event.handle = function(){\r\n\r\n /// make context of trigger the event element\r\n const args = Array.prototype.slice.call(arguments);\r\n const event = args[0];\r\n const $target = $(event.target);\r\n\r\n $target.trigger.apply( $target, arguments );\r\n };\r\n\r\n specialEvent.originalHandler.apply(this,args);\r\n }\r\n }\r\n\r\n /// setup special events on Zepto\r\n specialEvent.setup.apply(el, [data]);\r\n }\r\n\r\n return true;\r\n });\r\n\r\n return bindBeforeSpecialEvents.apply(this, [eventName, callback]);\r\n};\r\n","import m from 'mithril';\nimport prop from 'mithril/stream';\n\nexport default () => {\n const mo = window['m'];\n\n const _m = function (comp, ...args) {\n const node = mo.apply(this, arguments);\n\n if (!node.attrs) node.attrs = {};\n\n if (node.attrs.bidi) {\n m.bidi(node, node.attrs.bidi);\n }\n\n if (node.attrs.route) {\n node.attrs.href = node.attrs.route;\n node.attrs.tag = m.route.Link;\n\n delete node.attrs.route;\n }\n\n return node;\n };\n\n Object.keys(mo).forEach(key => _m[key] = mo[key]);\n\n _m.withAttr = (key: string, cb: Function) => function () {\n cb(this.getAttribute(key) || this[key]);\n };\n\n _m.prop = prop;\n\n window['m'] = _m;\n}\n","import 'expose-loader?jQuery!zepto';\r\nimport 'expose-loader?moment!expose-loader?dayjs!dayjs';\r\nimport 'expose-loader?m!mithril';\r\nimport 'expose-loader?m.bidi!m.attrs.bidi';\r\nimport 'expose-loader?Mousetrap!mousetrap';\r\nimport 'expose-loader?classNames!classNames';\r\n\r\nimport 'zepto/src/selector';\r\nimport 'zepto/src/data';\r\nimport 'zepto/src/fx';\r\nimport 'zepto/src/fx_methods';\r\n\r\nimport './utils/patchZepto';\r\n\r\nimport 'hc-sticky';\r\nimport 'bootstrap/js/dropdown';\r\nimport 'bootstrap/js/transition';\r\n\r\nimport relativeTime from 'dayjs/plugin/relativeTime';\r\nimport localizedFormat from 'dayjs/plugin/localizedFormat';\r\n\r\ndayjs.extend(relativeTime);\r\ndayjs.extend(localizedFormat);\r\n\r\nimport patchMithril from './utils/patchMithril';\r\n\r\npatchMithril();\r\n\r\n// import * as Extend from './extend/index';\r\n\r\n// export { Extend };\r\n","import isBrowser from './isBrowser';\n\nconst longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\nlet timeoutDuration = 0;\nfor (let i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n timeoutDuration = 1;\n break;\n }\n}\n\nexport function microtaskDebounce(fn) {\n let called = false\n return () => {\n if (called) {\n return\n }\n called = true\n window.Promise.resolve().then(() => {\n called = false\n fn()\n })\n }\n}\n\nexport function taskDebounce(fn) {\n let scheduled = false;\n return () => {\n if (!scheduled) {\n scheduled = true;\n setTimeout(() => {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nconst supportsMicroTasks = isBrowser && window.Promise\n\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nexport default (supportsMicroTasks\n ? microtaskDebounce\n : taskDebounce);\n","export default typeof window !== 'undefined' && typeof document !== 'undefined';\n","/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nexport default function isFunction(functionToCheck) {\n const getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nexport default function getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n const window = element.ownerDocument.defaultView;\n const css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n","/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nexport default function getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nexport default function getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body\n case '#document':\n return element.body\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n const { overflow, overflowX, overflowY } = getStyleComputedProperty(element);\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n","import isBrowser from './isBrowser';\n\nconst isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nconst isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nexport default function isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nexport default function getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n const noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n let offsetParent = element.offsetParent || null;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n const nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (\n ['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 &&\n getStyleComputedProperty(offsetParent, 'position') === 'static'\n ) {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n","/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nexport default function getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n","import isOffsetContainer from './isOffsetContainer';\nimport getRoot from './getRoot';\nimport getOffsetParent from './getOffsetParent';\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nexport default function findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n const order =\n element1.compareDocumentPosition(element2) &\n Node.DOCUMENT_POSITION_FOLLOWING;\n const start = order ? element1 : element2;\n const end = order ? element2 : element1;\n\n // Get common ancestor container\n const range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n const { commonAncestorContainer } = range;\n\n // Both nodes are inside #document\n if (\n (element1 !== commonAncestorContainer &&\n element2 !== commonAncestorContainer) ||\n start.contains(end)\n ) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n const element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n","import getOffsetParent from './getOffsetParent';\n\nexport default function isOffsetContainer(element) {\n const { nodeName } = element;\n if (nodeName === 'BODY') {\n return false;\n }\n return (\n nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element\n );\n}\n","/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nexport default function getScroll(element, side = 'top') {\n const upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n const nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n const html = element.ownerDocument.documentElement;\n const scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n","/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nexport default function getBordersSize(styles, axis) {\n const sideA = axis === 'x' ? 'Left' : 'Top';\n const sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return (\n parseFloat(styles[`border${sideA}Width`], 10) +\n parseFloat(styles[`border${sideB}Width`], 10)\n );\n}\n","import isIE from './isIE';\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(\n body[`offset${axis}`],\n body[`scroll${axis}`],\n html[`client${axis}`],\n html[`offset${axis}`],\n html[`scroll${axis}`],\n isIE(10)\n ? (parseInt(html[`offset${axis}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Top' : 'Left'}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Bottom' : 'Right'}`]))\n : 0 \n );\n}\n\nexport default function getWindowSizes(document) {\n const body = document.body;\n const html = document.documentElement;\n const computedStyle = isIE(10) && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle),\n };\n}\n","/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nexport default function getClientRect(offsets) {\n return {\n ...offsets,\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height,\n };\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getBordersSize from './getBordersSize';\nimport getWindowSizes from './getWindowSizes';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\nimport isIE from './isIE';\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nexport default function getBoundingClientRect(element) {\n let rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n }\n else {\n rect = element.getBoundingClientRect();\n }\n }\n catch(e){}\n\n const result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top,\n };\n\n // subtract scrollbar size from sizes\n const sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n const width =\n sizes.width || element.clientWidth || result.right - result.left;\n const height =\n sizes.height || element.clientHeight || result.bottom - result.top;\n\n let horizScrollbar = element.offsetWidth - width;\n let vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n const styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport includeScroll from './includeScroll';\nimport getScrollParent from './getScrollParent';\nimport getBoundingClientRect from './getBoundingClientRect';\nimport runIsIE from './isIE';\nimport getClientRect from './getClientRect';\n\nexport default function getOffsetRectRelativeToArbitraryNode(children, parent, fixedPosition = false) {\n const isIE10 = runIsIE(10);\n const isHTML = parent.nodeName === 'HTML';\n const childrenRect = getBoundingClientRect(children);\n const parentRect = getBoundingClientRect(parent);\n const scrollParent = getScrollParent(children);\n\n const styles = getStyleComputedProperty(parent);\n const borderTopWidth = parseFloat(styles.borderTopWidth, 10);\n const borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if(fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n let offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height,\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n const marginTop = parseFloat(styles.marginTop, 10);\n const marginLeft = parseFloat(styles.marginLeft, 10);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (\n isIE10 && !fixedPosition\n ? parent.contains(scrollParent)\n : parent === scrollParent && scrollParent.nodeName !== 'BODY'\n ) {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n","import getScroll from './getScroll';\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nexport default function includeScroll(rect, element, subtract = false) {\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n const modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nexport default function getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n let el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n\n}\n","import getScrollParent from './getScrollParent';\nimport getParentNode from './getParentNode';\nimport findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getViewportOffsetRectRelativeToArtbitraryNode from './getViewportOffsetRectRelativeToArtbitraryNode';\nimport getWindowSizes from './getWindowSizes';\nimport isFixed from './isFixed';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nexport default function getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement,\n fixedPosition = false\n) {\n // NOTE: 1 DOM access here\n\n let boundaries = { top: 0, left: 0 };\n const offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);\n\n // Handle viewport case\n if (boundariesElement === 'viewport' ) {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n }\n\n else {\n // Handle other cases based on DOM element used as boundaries\n let boundariesNode;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n const offsets = getOffsetRectRelativeToArbitraryNode(\n boundariesNode,\n offsetParent,\n fixedPosition\n );\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n const { height, width } = getWindowSizes(popper.ownerDocument);\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n padding = padding || 0;\n const isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0; \n boundaries.top += isPaddingNumber ? padding : padding.top || 0; \n boundaries.right -= isPaddingNumber ? padding : padding.right || 0; \n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0; \n\n return boundaries;\n}\n","import getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\n\nexport default function getViewportOffsetRectRelativeToArtbitraryNode(element, excludeScroll = false) {\n const html = element.ownerDocument.documentElement;\n const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n const width = Math.max(html.clientWidth, window.innerWidth || 0);\n const height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n const scrollTop = !excludeScroll ? getScroll(html) : 0;\n const scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n const offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width,\n height,\n };\n\n return getClientRect(offset);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nexport default function isFixed(element) {\n const nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n const parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n","import getBoundaries from '../utils/getBoundaries';\n\nfunction getArea({ width, height }) {\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeAutoPlacement(\n placement,\n refRect,\n popper,\n reference,\n boundariesElement,\n padding = 0\n) {\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n const boundaries = getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement\n );\n\n const rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top,\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height,\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom,\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height,\n },\n };\n\n const sortedAreas = Object.keys(rects)\n .map(key => ({\n key,\n ...rects[key],\n area: getArea(rects[key]),\n }))\n .sort((a, b) => b.area - a.area);\n\n const filteredAreas = sortedAreas.filter(\n ({ width, height }) =>\n width >= popper.clientWidth && height >= popper.clientHeight\n );\n\n const computedPlacement = filteredAreas.length > 0\n ? filteredAreas[0].key\n : sortedAreas[0].key;\n\n const variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? `-${variation}` : '');\n}\n","import findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nexport default function getReferenceOffsets(state, popper, reference, fixedPosition = null) {\n const commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n","/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nexport default function getOuterSizes(element) {\n const window = element.ownerDocument.defaultView;\n const styles = window.getComputedStyle(element);\n const x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n const y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n const result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x,\n };\n return result;\n}\n","/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nexport default function getOppositePlacement(placement) {\n const hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, matched => hash[matched]);\n}\n","import getOuterSizes from './getOuterSizes';\nimport getOppositePlacement from './getOppositePlacement';\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nexport default function getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n const popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n const popperOffsets = {\n width: popperRect.width,\n height: popperRect.height,\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n const isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n const mainSide = isHoriz ? 'top' : 'left';\n const secondarySide = isHoriz ? 'left' : 'top';\n const measurement = isHoriz ? 'height' : 'width';\n const secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] =\n referenceOffsets[mainSide] +\n referenceOffsets[measurement] / 2 -\n popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] =\n referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] =\n referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n","/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n","import isFunction from './isFunction';\nimport findIndex from './findIndex';\nimport getClientRect from '../utils/getClientRect';\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nexport default function runModifiers(modifiers, data, ends) {\n const modifiersToRun = ends === undefined\n ? modifiers\n : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(modifier => {\n if (modifier['function']) { // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n const fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n","import find from './find';\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(cur => cur[prop] === value);\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n const match = find(arr, obj => obj[prop] === value);\n return arr.indexOf(match);\n}\n","import computeAutoPlacement from '../utils/computeAutoPlacement';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.<br />\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nexport default function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n let data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {},\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(\n this.state,\n this.popper,\n this.reference,\n this.options.positionFixed\n );\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(\n this.options.placement,\n data.offsets.reference,\n this.popper,\n this.reference,\n this.options.modifiers.flip.boundariesElement,\n this.options.modifiers.flip.padding\n );\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(\n this.popper,\n data.offsets.reference,\n data.placement\n );\n\n data.offsets.popper.position = this.options.positionFixed\n ? 'fixed'\n : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n","/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nexport default function isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(\n ({ name, enabled }) => enabled && name === modifierName\n );\n}\n","/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nexport default function getSupportedPropertyName(property) {\n const prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n const upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (let i = 0; i < prefixes.length; i++) {\n const prefix = prefixes[i];\n const toCheck = prefix ? `${prefix}${upperProp}` : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n","import isModifierEnabled from '../utils/isModifierEnabled';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nexport default function destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicity asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n","/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nexport default function getWindow(element) {\n const ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n","import getScrollParent from './getScrollParent';\nimport getWindow from './getWindow';\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n const isBody = scrollParent.nodeName === 'BODY';\n const target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(\n getScrollParent(target.parentNode),\n event,\n callback,\n scrollParents\n );\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function setupEventListeners(\n reference,\n options,\n state,\n updateBound\n) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n const scrollElement = getScrollParent(reference);\n attachToScrollParents(\n scrollElement,\n 'scroll',\n state.updateBound,\n state.scrollParents\n );\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n","import setupEventListeners from '../utils/setupEventListeners';\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nexport default function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(\n this.reference,\n this.options,\n this.state,\n this.scheduleUpdate\n );\n }\n}\n","import removeEventListeners from '../utils/removeEventListeners';\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nexport default function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n","import getWindow from './getWindow';\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(target => {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n","/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nexport default function isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n","import isNumeric from './isNumeric';\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setStyles(element, styles) {\n Object.keys(styles).forEach(prop => {\n let unit = '';\n // add unit if the value is numeric and is one of the following\n if (\n ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !==\n -1 &&\n isNumeric(styles[prop])\n ) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n","import getSupportedPropertyName from '../utils/getSupportedPropertyName';\nimport find from '../utils/find';\nimport getOffsetParent from '../utils/getOffsetParent';\nimport getBoundingClientRect from '../utils/getBoundingClientRect';\nimport getRoundedOffsets from '../utils/getRoundedOffsets';\nimport isBrowser from '../utils/isBrowser';\n\nconst isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeStyle(data, options) {\n const { x, y } = options;\n const { popper } = data.offsets;\n\n // Remove this legacy support in Popper.js v2\n const legacyGpuAccelerationOption = find(\n data.instance.modifiers,\n modifier => modifier.name === 'applyStyle'\n ).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn(\n 'WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'\n );\n }\n const gpuAcceleration =\n legacyGpuAccelerationOption !== undefined\n ? legacyGpuAccelerationOption\n : options.gpuAcceleration;\n\n const offsetParent = getOffsetParent(data.instance.popper);\n const offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n const styles = {\n position: popper.position,\n };\n\n const offsets = getRoundedOffsets(\n data,\n window.devicePixelRatio < 2 || !isFirefox\n );\n\n const sideA = x === 'bottom' ? 'top' : 'bottom';\n const sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n const prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n let left, top;\n if (sideA === 'bottom') {\n // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = `translate3d(${left}px, ${top}px, 0)`;\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n const invertTop = sideA === 'bottom' ? -1 : 1;\n const invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = `${sideA}, ${sideB}`;\n }\n\n // Attributes\n const attributes = {\n 'x-placement': data.placement,\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = { ...attributes, ...data.attributes };\n data.styles = { ...styles, ...data.styles };\n data.arrowStyles = { ...data.offsets.arrow, ...data.arrowStyles };\n\n return data;\n}\n","import find from './find';\n\n/**\n * Helper used to know if the given modifier depends from another one.<br />\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nexport default function isModifierRequired(\n modifiers,\n requestingName,\n requestedName\n) {\n const requesting = find(modifiers, ({ name }) => name === requestingName);\n\n const isRequired =\n !!requesting &&\n modifiers.some(modifier => {\n return (\n modifier.name === requestedName &&\n modifier.enabled &&\n modifier.order < requesting.order\n );\n });\n\n if (!isRequired) {\n const requesting = `\\`${requestingName}\\``;\n const requested = `\\`${requestedName}\\``;\n console.warn(\n `${requested} modifier is required by ${requesting} modifier in order to work, be sure to include it before ${requesting}!`\n );\n }\n return isRequired;\n}\n","/**\n * List of accepted placements to use as values of the `placement` option.<br />\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.<br />\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nexport default [\n 'auto-start',\n 'auto',\n 'auto-end',\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n];\n","import placements from '../methods/placements';\n\n// Get rid of `auto` `auto-start` and `auto-end`\nconst validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nexport default function clockwise(placement, counter = false) {\n const index = validPlacements.indexOf(placement);\n const arr = validPlacements\n .slice(index + 1)\n .concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n","import getOppositePlacement from '../utils/getOppositePlacement';\nimport getOppositeVariation from '../utils/getOppositeVariation';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\nimport getBoundaries from '../utils/getBoundaries';\nimport isModifierEnabled from '../utils/isModifierEnabled';\nimport clockwise from '../utils/clockwise';\n\nconst BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise',\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n options.boundariesElement,\n data.positionFixed\n );\n\n let placement = data.placement.split('-')[0];\n let placementOpposite = getOppositePlacement(placement);\n let variation = data.placement.split('-')[1] || '';\n\n let flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach((step, index) => {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n const popperOffsets = data.offsets.popper;\n const refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n const floor = Math.floor;\n const overlapsRef =\n (placement === 'left' &&\n floor(popperOffsets.right) > floor(refOffsets.left)) ||\n (placement === 'right' &&\n floor(popperOffsets.left) < floor(refOffsets.right)) ||\n (placement === 'top' &&\n floor(popperOffsets.bottom) > floor(refOffsets.top)) ||\n (placement === 'bottom' &&\n floor(popperOffsets.top) < floor(refOffsets.bottom));\n\n const overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n const overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n const overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n const overflowsBottom =\n floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n const overflowsBoundaries =\n (placement === 'left' && overflowsLeft) ||\n (placement === 'right' && overflowsRight) ||\n (placement === 'top' && overflowsTop) ||\n (placement === 'bottom' && overflowsBottom);\n\n // flip the variation if required\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n // flips variation if reference element overflows boundaries\n const flippedVariationByRef =\n !!options.flipVariations &&\n ((isVertical && variation === 'start' && overflowsLeft) ||\n (isVertical && variation === 'end' && overflowsRight) ||\n (!isVertical && variation === 'start' && overflowsTop) ||\n (!isVertical && variation === 'end' && overflowsBottom));\n\n // flips variation if popper content overflows boundaries\n const flippedVariationByContent =\n !!options.flipVariationsByContent &&\n ((isVertical && variation === 'start' && overflowsRight) ||\n (isVertical && variation === 'end' && overflowsLeft) ||\n (!isVertical && variation === 'start' && overflowsBottom) ||\n (!isVertical && variation === 'end' && overflowsTop));\n\n const flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = {\n ...data.offsets.popper,\n ...getPopperOffsets(\n data.instance.popper,\n data.offsets.reference,\n data.placement\n ),\n };\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n","import isNumeric from '../utils/isNumeric';\nimport getClientRect from '../utils/getClientRect';\nimport find from '../utils/find';\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nexport function toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n const split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n const value = +split[1];\n const unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n let element;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n const rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n let size;\n if (unit === 'vh') {\n size = Math.max(\n document.documentElement.clientHeight,\n window.innerHeight || 0\n );\n } else {\n size = Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n );\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nexport function parseOffset(\n offset,\n popperOffsets,\n referenceOffsets,\n basePlacement\n) {\n const offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n const useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n const fragments = offset.split(/(\\+|\\-)/).map(frag => frag.trim());\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n const divider = fragments.indexOf(\n find(fragments, frag => frag.search(/,|\\s/) !== -1)\n );\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn(\n 'Offsets separated by white space(s) are deprecated, use a comma (,) instead.'\n );\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n const splitRegex = /\\s*,\\s*|\\s+/;\n let ops = divider !== -1\n ? [\n fragments\n .slice(0, divider)\n .concat([fragments[divider].split(splitRegex)[0]]),\n [fragments[divider].split(splitRegex)[1]].concat(\n fragments.slice(divider + 1)\n ),\n ]\n : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map((op, index) => {\n // Most of the units rely on the orientation of the popper\n const measurement = (index === 1 ? !useHeight : useHeight)\n ? 'height'\n : 'width';\n let mergeWithPrevious = false;\n return (\n op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce((a, b) => {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(str => toValue(str, measurement, popperOffsets, referenceOffsets))\n );\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach((op, index) => {\n op.forEach((frag, index2) => {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nexport default function offset(data, { offset }) {\n const { placement, offsets: { popper, reference } } = data;\n const basePlacement = placement.split('-')[0];\n\n let offsets;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n","import applyStyle, { applyStyleOnLoad } from './applyStyle';\nimport computeStyle from './computeStyle';\nimport arrow from './arrow';\nimport flip from './flip';\nimport keepTogether from './keepTogether';\nimport offset from './offset';\nimport preventOverflow from './preventOverflow';\nimport shift from './shift';\nimport hide from './hide';\nimport inner from './inner';\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.<br />\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.<br />\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nexport default {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.<br />\n * It will read the variation of the `placement` property.<br />\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift,\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.<br />\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.<br />\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.<br />\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0,\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries.<br />\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".<br />\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent',\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether,\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]',\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false,\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner,\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide,\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right',\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined,\n },\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n","import modifiers from '../modifiers/index';\n\n/**\n * Default options provided to Popper.js constructor.<br />\n * These can be overridden using the `options` argument of Popper.js.<br />\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nexport default {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.<br />\n * By default, it is set to no-op.<br />\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: () => {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.<br />\n * By default, it is set to no-op.<br />\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: () => {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers,\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function shift(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n const { reference, popper } = data.offsets;\n const isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n const side = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n const shiftOffsets = {\n start: { [side]: reference[side] },\n end: {\n [side]: reference[side] + reference[measurement] - popper[measurement],\n },\n };\n\n data.offsets.popper = { ...popper, ...shiftOffsets[shiftvariation] };\n }\n\n return data;\n}\n","import getOffsetParent from '../utils/getOffsetParent';\nimport getBoundaries from '../utils/getBoundaries';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function preventOverflow(data, options) {\n let boundariesElement =\n options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n const transformProp = getSupportedPropertyName('transform');\n const popperStyles = data.instance.popper.style; // assignment to help minification\n const { top, left, [transformProp]: transform } = popperStyles;\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n boundariesElement,\n data.positionFixed\n );\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n\n options.boundaries = boundaries;\n\n const order = options.priority;\n let popper = data.offsets.popper;\n\n const check = {\n primary(placement) {\n let value = popper[placement];\n if (\n popper[placement] < boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return { [placement]: value };\n },\n secondary(placement) {\n const mainSide = placement === 'right' ? 'left' : 'top';\n let value = popper[mainSide];\n if (\n popper[placement] > boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.min(\n popper[mainSide],\n boundaries[placement] -\n (placement === 'right' ? popper.width : popper.height)\n );\n }\n return { [mainSide]: value };\n },\n };\n\n order.forEach(placement => {\n const side =\n ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = { ...popper, ...check[side](placement) };\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function keepTogether(data) {\n const { popper, reference } = data.offsets;\n const placement = data.placement.split('-')[0];\n const floor = Math.floor;\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n const side = isVertical ? 'right' : 'bottom';\n const opSide = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] =\n floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOuterSizes from '../utils/getOuterSizes';\nimport isModifierRequired from '../utils/isModifierRequired';\nimport getStyleComputedProperty from '../utils/getStyleComputedProperty';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function arrow(data, options) {\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n let arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn(\n 'WARNING: `arrow.element` must be child of its popper element!'\n );\n return data;\n }\n }\n\n const placement = data.placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n const len = isVertical ? 'height' : 'width';\n const sideCapitalized = isVertical ? 'Top' : 'Left';\n const side = sideCapitalized.toLowerCase();\n const altSide = isVertical ? 'left' : 'top';\n const opSide = isVertical ? 'bottom' : 'right';\n const arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -=\n popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] +=\n reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n const center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n const css = getStyleComputedProperty(data.instance.popper);\n const popperMarginSide = parseFloat(css[`margin${sideCapitalized}`], 10);\n const popperBorderSide = parseFloat(css[`border${sideCapitalized}Width`], 10);\n let sideValue =\n center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = {\n [side]: Math.round(sideValue),\n [altSide]: '', // make sure to unset any eventual altSide value from the DOM node\n };\n\n return data;\n}\n","/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nexport default function getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOppositePlacement from '../utils/getOppositePlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function inner(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n const subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] =\n reference[basePlacement] -\n (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n","import isModifierRequired from '../utils/isModifierRequired';\nimport find from '../utils/find';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n const refRect = data.offsets.reference;\n const bound = find(\n data.instance.modifiers,\n modifier => modifier.name === 'preventOverflow'\n ).boundaries;\n\n if (\n refRect.bottom < bound.top ||\n refRect.left > bound.right ||\n refRect.top > bound.bottom ||\n refRect.right < bound.left\n ) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n","/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nexport default function getRoundedOffsets(data, shouldRound) {\n const { popper, reference } = data.offsets;\n const { round, floor } = Math;\n const noRound = v => v;\n \n const referenceWidth = round(reference.width);\n const popperWidth = round(popper.width);\n \n const isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n const isVariation = data.placement.indexOf('-') !== -1;\n const sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n const bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n const horizontalToInteger = !shouldRound\n ? noRound\n : isVertical || isVariation || sameWidthParity\n ? round\n : floor;\n const verticalToInteger = !shouldRound ? noRound : round;\n\n return {\n left: horizontalToInteger(\n bothOddWidth && !isVariation && shouldRound\n ? popper.left - 1\n : popper.left\n ),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right),\n };\n}\n","import setStyles from '../utils/setStyles';\nimport setAttributes from '../utils/setAttributes';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport computeAutoPlacement from '../utils/computeAutoPlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nexport default function applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nexport function applyStyleOnLoad(\n reference,\n popper,\n options,\n modifierOptions,\n state\n) {\n // compute reference element offsets\n const referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n const placement = computeAutoPlacement(\n options.placement,\n referenceOffsets,\n popper,\n reference,\n options.modifiers.flip.boundariesElement,\n options.modifiers.flip.padding\n );\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n return options;\n}\n","/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function(prop) {\n const value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n","!function(r,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):r.dayjs_plugin_relativeTime=t()}(this,function(){\"use strict\";return function(r,t,e){var n=t.prototype;e.en.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\"};var o=function(r,t,n,o){for(var d,i,u=n.$locale().relativeTime,a=[{l:\"s\",r:44,d:\"second\"},{l:\"m\",r:89},{l:\"mm\",r:44,d:\"minute\"},{l:\"h\",r:89},{l:\"hh\",r:21,d:\"hour\"},{l:\"d\",r:35},{l:\"dd\",r:25,d:\"day\"},{l:\"M\",r:45},{l:\"MM\",r:10,d:\"month\"},{l:\"y\",r:17},{l:\"yy\",d:\"year\"}],f=a.length,s=0;s<f;s+=1){var l=a[s];l.d&&(d=o?e(r).diff(n,l.d,!0):n.diff(r,l.d,!0));var h=Math.round(Math.abs(d));if(h<=l.r||!l.r){1===h&&s>0&&(l=a[s-1]),i=u[l.l].replace(\"%d\",h);break}}return t?i:(d>0?u.future:u.past).replace(\"%s\",i)};n.to=function(r,t){return o(r,t,this,!0)},n.from=function(r,t){return o(r,t,this)};var d=function(r){return r.$u?e.utc():e()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}});\n","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):e.dayjs_plugin_localizedFormat=t()}(this,function(){\"use strict\";return function(e,t,o){var n=t.prototype,r=n.format,M={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"};o.en.formats=M;n.format=function(e){void 0===e&&(e=\"YYYY-MM-DDTHH:mm:ssZ\");var t=this.$locale().formats,o=void 0===t?{}:t,n=e.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,t,n){var r=n&&n.toUpperCase();return t||o[n]||M[n]||o[r].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,o){return t||o.slice(1)})});return r.call(this,n)}}});\n","\"use strict\"\n\nmodule.exports = require(\"./stream/stream\")\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","module.exports = global[\"jQuery\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\imports-loader\\\\index.js?this=>window!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\zepto.js\");","/*** IMPORTS FROM imports-loader ***/\n(function() {\n\n/* Zepto v1.2.0 - zepto event ajax form ie - zeptojs.com/license */\n(function(global, factory) {\n if (typeof define === 'function' && define.amd)\n define(function() { return factory(global) })\n else\n factory(global)\n}(this, function(window) {\n var Zepto = (function() {\n var undefined, key, $, classList, emptyArray = [], concat = emptyArray.concat, filter = emptyArray.filter, slice = emptyArray.slice,\n document = window.document,\n elementDisplay = {}, classCache = {},\n cssNumber = { 'column-count': 1, 'columns': 1, 'font-weight': 1, 'line-height': 1,'opacity': 1, 'z-index': 1, 'zoom': 1 },\n fragmentRE = /^\\s*<(\\w+|!)[^>]*>/,\n singleTagRE = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,\n tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/ig,\n rootNodeRE = /^(?:body|html)$/i,\n capitalRE = /([A-Z])/g,\n\n // special attributes that should be get/set via method calls\n methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'],\n\n adjacencyOperators = [ 'after', 'prepend', 'before', 'append' ],\n table = document.createElement('table'),\n tableRow = document.createElement('tr'),\n containers = {\n 'tr': document.createElement('tbody'),\n 'tbody': table, 'thead': table, 'tfoot': table,\n 'td': tableRow, 'th': tableRow,\n '*': document.createElement('div')\n },\n readyRE = /complete|loaded|interactive/,\n simpleSelectorRE = /^[\\w-]*$/,\n class2type = {},\n toString = class2type.toString,\n zepto = {},\n camelize, uniq,\n tempParent = document.createElement('div'),\n propMap = {\n 'tabindex': 'tabIndex',\n 'readonly': 'readOnly',\n 'for': 'htmlFor',\n 'class': 'className',\n 'maxlength': 'maxLength',\n 'cellspacing': 'cellSpacing',\n 'cellpadding': 'cellPadding',\n 'rowspan': 'rowSpan',\n 'colspan': 'colSpan',\n 'usemap': 'useMap',\n 'frameborder': 'frameBorder',\n 'contenteditable': 'contentEditable'\n },\n isArray = Array.isArray ||\n function(object){ return object instanceof Array }\n\n zepto.matches = function(element, selector) {\n if (!selector || !element || element.nodeType !== 1) return false\n var matchesSelector = element.matches || element.webkitMatchesSelector ||\n element.mozMatchesSelector || element.oMatchesSelector ||\n element.matchesSelector\n if (matchesSelector) return matchesSelector.call(element, selector)\n // fall back to performing a selector:\n var match, parent = element.parentNode, temp = !parent\n if (temp) (parent = tempParent).appendChild(element)\n match = ~zepto.qsa(parent, selector).indexOf(element)\n temp && tempParent.removeChild(element)\n return match\n }\n\n function type(obj) {\n return obj == null ? String(obj) :\n class2type[toString.call(obj)] || \"object\"\n }\n\n function isFunction(value) { return type(value) == \"function\" }\n function isWindow(obj) { return obj != null && obj == obj.window }\n function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE }\n function isObject(obj) { return type(obj) == \"object\" }\n function isPlainObject(obj) {\n return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype\n }\n\n function likeArray(obj) {\n var length = !!obj && 'length' in obj && obj.length,\n type = $.type(obj)\n\n return 'function' != type && !isWindow(obj) && (\n 'array' == type || length === 0 ||\n (typeof length == 'number' && length > 0 && (length - 1) in obj)\n )\n }\n\n function compact(array) { return filter.call(array, function(item){ return item != null }) }\n function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array }\n camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : '' }) }\n function dasherize(str) {\n return str.replace(/::/g, '/')\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')\n .replace(/([a-z\\d])([A-Z])/g, '$1_$2')\n .replace(/_/g, '-')\n .toLowerCase()\n }\n uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) }\n\n function classRE(name) {\n return name in classCache ?\n classCache[name] : (classCache[name] = new RegExp('(^|\\\\s)' + name + '(\\\\s|$)'))\n }\n\n function maybeAddPx(name, value) {\n return (typeof value == \"number\" && !cssNumber[dasherize(name)]) ? value + \"px\" : value\n }\n\n function defaultDisplay(nodeName) {\n var element, display\n if (!elementDisplay[nodeName]) {\n element = document.createElement(nodeName)\n document.body.appendChild(element)\n display = getComputedStyle(element, '').getPropertyValue(\"display\")\n element.parentNode.removeChild(element)\n display == \"none\" && (display = \"block\")\n elementDisplay[nodeName] = display\n }\n return elementDisplay[nodeName]\n }\n\n function children(element) {\n return 'children' in element ?\n slice.call(element.children) :\n $.map(element.childNodes, function(node){ if (node.nodeType == 1) return node })\n }\n\n function Z(dom, selector) {\n var i, len = dom ? dom.length : 0\n for (i = 0; i < len; i++) this[i] = dom[i]\n this.length = len\n this.selector = selector || ''\n }\n\n // `$.zepto.fragment` takes a html string and an optional tag name\n // to generate DOM nodes from the given html string.\n // The generated DOM nodes are returned as an array.\n // This function can be overridden in plugins for example to make\n // it compatible with browsers that don't support the DOM fully.\n zepto.fragment = function(html, name, properties) {\n var dom, nodes, container\n\n // A special case optimization for a single tag\n if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1))\n\n if (!dom) {\n if (html.replace) html = html.replace(tagExpanderRE, \"<$1></$2>\")\n if (name === undefined) name = fragmentRE.test(html) && RegExp.$1\n if (!(name in containers)) name = '*'\n\n container = containers[name]\n container.innerHTML = '' + html\n dom = $.each(slice.call(container.childNodes), function(){\n container.removeChild(this)\n })\n }\n\n if (isPlainObject(properties)) {\n nodes = $(dom)\n $.each(properties, function(key, value) {\n if (methodAttributes.indexOf(key) > -1) nodes[key](value)\n else nodes.attr(key, value)\n })\n }\n\n return dom\n }\n\n // `$.zepto.Z` swaps out the prototype of the given `dom` array\n // of nodes with `$.fn` and thus supplying all the Zepto functions\n // to the array. This method can be overridden in plugins.\n zepto.Z = function(dom, selector) {\n return new Z(dom, selector)\n }\n\n // `$.zepto.isZ` should return `true` if the given object is a Zepto\n // collection. This method can be overridden in plugins.\n zepto.isZ = function(object) {\n return object instanceof zepto.Z\n }\n\n // `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and\n // takes a CSS selector and an optional context (and handles various\n // special cases).\n // This method can be overridden in plugins.\n zepto.init = function(selector, context) {\n var dom\n // If nothing given, return an empty Zepto collection\n if (!selector) return zepto.Z()\n // Optimize for string selectors\n else if (typeof selector == 'string') {\n selector = selector.trim()\n // If it's a html fragment, create nodes from it\n // Note: In both Chrome 21 and Firefox 15, DOM error 12\n // is thrown if the fragment doesn't begin with <\n if (selector[0] == '<' && fragmentRE.test(selector))\n dom = zepto.fragment(selector, RegExp.$1, context), selector = null\n // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // If it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // If a function is given, call it when the DOM is ready\n else if (isFunction(selector)) return $(document).ready(selector)\n // If a Zepto collection is given, just return it\n else if (zepto.isZ(selector)) return selector\n else {\n // normalize array if an array of nodes is given\n if (isArray(selector)) dom = compact(selector)\n // Wrap DOM nodes.\n else if (isObject(selector))\n dom = [selector], selector = null\n // If it's a html fragment, create nodes from it\n else if (fragmentRE.test(selector))\n dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null\n // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // And last but no least, if it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // create a new Zepto collection from the nodes found\n return zepto.Z(dom, selector)\n }\n\n // `$` will be the base `Zepto` object. When calling this\n // function just call `$.zepto.init, which makes the implementation\n // details of selecting nodes and creating Zepto collections\n // patchable in plugins.\n $ = function(selector, context){\n return zepto.init(selector, context)\n }\n\n function extend(target, source, deep) {\n for (key in source)\n if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {\n if (isPlainObject(source[key]) && !isPlainObject(target[key]))\n target[key] = {}\n if (isArray(source[key]) && !isArray(target[key]))\n target[key] = []\n extend(target[key], source[key], deep)\n }\n else if (source[key] !== undefined) target[key] = source[key]\n }\n\n // Copy all but undefined properties from one or more\n // objects to the `target` object.\n $.extend = function(target){\n var deep, args = slice.call(arguments, 1)\n if (typeof target == 'boolean') {\n deep = target\n target = args.shift()\n }\n args.forEach(function(arg){ extend(target, arg, deep) })\n return target\n }\n\n // `$.zepto.qsa` is Zepto's CSS selector implementation which\n // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`.\n // This method can be overridden in plugins.\n zepto.qsa = function(element, selector){\n var found,\n maybeID = selector[0] == '#',\n maybeClass = !maybeID && selector[0] == '.',\n nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, // Ensure that a 1 char tag name still gets checked\n isSimple = simpleSelectorRE.test(nameOnly)\n return (element.getElementById && isSimple && maybeID) ? // Safari DocumentFragment doesn't have getElementById\n ( (found = element.getElementById(nameOnly)) ? [found] : [] ) :\n (element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11) ? [] :\n slice.call(\n isSimple && !maybeID && element.getElementsByClassName ? // DocumentFragment doesn't have getElementsByClassName/TagName\n maybeClass ? element.getElementsByClassName(nameOnly) : // If it's simple, it could be a class\n element.getElementsByTagName(selector) : // Or a tag\n element.querySelectorAll(selector) // Or it's not simple, and we need to query all\n )\n }\n\n function filtered(nodes, selector) {\n return selector == null ? $(nodes) : $(nodes).filter(selector)\n }\n\n $.contains = document.documentElement.contains ?\n function(parent, node) {\n return parent !== node && parent.contains(node)\n } :\n function(parent, node) {\n while (node && (node = node.parentNode))\n if (node === parent) return true\n return false\n }\n\n function funcArg(context, arg, idx, payload) {\n return isFunction(arg) ? arg.call(context, idx, payload) : arg\n }\n\n function setAttribute(node, name, value) {\n value == null ? node.removeAttribute(name) : node.setAttribute(name, value)\n }\n\n // access className property while respecting SVGAnimatedString\n function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }\n\n // \"true\" => true\n // \"false\" => false\n // \"null\" => null\n // \"42\" => 42\n // \"42.5\" => 42.5\n // \"08\" => \"08\"\n // JSON => parse if valid\n // String => self\n function deserializeValue(value) {\n try {\n return value ?\n value == \"true\" ||\n ( value == \"false\" ? false :\n value == \"null\" ? null :\n +value + \"\" == value ? +value :\n /^[\\[\\{]/.test(value) ? $.parseJSON(value) :\n value )\n : value\n } catch(e) {\n return value\n }\n }\n\n $.type = type\n $.isFunction = isFunction\n $.isWindow = isWindow\n $.isArray = isArray\n $.isPlainObject = isPlainObject\n\n $.isEmptyObject = function(obj) {\n var name\n for (name in obj) return false\n return true\n }\n\n $.isNumeric = function(val) {\n var num = Number(val), type = typeof val\n return val != null && type != 'boolean' &&\n (type != 'string' || val.length) &&\n !isNaN(num) && isFinite(num) || false\n }\n\n $.inArray = function(elem, array, i){\n return emptyArray.indexOf.call(array, elem, i)\n }\n\n $.camelCase = camelize\n $.trim = function(str) {\n return str == null ? \"\" : String.prototype.trim.call(str)\n }\n\n // plugin compatibility\n $.uuid = 0\n $.support = { }\n $.expr = { }\n $.noop = function() {}\n\n $.map = function(elements, callback){\n var value, values = [], i, key\n if (likeArray(elements))\n for (i = 0; i < elements.length; i++) {\n value = callback(elements[i], i)\n if (value != null) values.push(value)\n }\n else\n for (key in elements) {\n value = callback(elements[key], key)\n if (value != null) values.push(value)\n }\n return flatten(values)\n }\n\n $.each = function(elements, callback){\n var i, key\n if (likeArray(elements)) {\n for (i = 0; i < elements.length; i++)\n if (callback.call(elements[i], i, elements[i]) === false) return elements\n } else {\n for (key in elements)\n if (callback.call(elements[key], key, elements[key]) === false) return elements\n }\n\n return elements\n }\n\n $.grep = function(elements, callback){\n return filter.call(elements, callback)\n }\n\n if (window.JSON) $.parseJSON = JSON.parse\n\n // Populate the class2type map\n $.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), function(i, name) {\n class2type[ \"[object \" + name + \"]\" ] = name.toLowerCase()\n })\n\n // Define methods that will be available on all\n // Zepto collections\n $.fn = {\n constructor: zepto.Z,\n length: 0,\n\n // Because a collection acts like an array\n // copy over these useful array functions.\n forEach: emptyArray.forEach,\n reduce: emptyArray.reduce,\n push: emptyArray.push,\n sort: emptyArray.sort,\n splice: emptyArray.splice,\n indexOf: emptyArray.indexOf,\n concat: function(){\n var i, value, args = []\n for (i = 0; i < arguments.length; i++) {\n value = arguments[i]\n args[i] = zepto.isZ(value) ? value.toArray() : value\n }\n return concat.apply(zepto.isZ(this) ? this.toArray() : this, args)\n },\n\n // `map` and `slice` in the jQuery API work differently\n // from their array counterparts\n map: function(fn){\n return $($.map(this, function(el, i){ return fn.call(el, i, el) }))\n },\n slice: function(){\n return $(slice.apply(this, arguments))\n },\n\n ready: function(callback){\n // need to check if document.body exists for IE as that browser reports\n // document ready when it hasn't yet created the body element\n if (readyRE.test(document.readyState) && document.body) callback($)\n else document.addEventListener('DOMContentLoaded', function(){ callback($) }, false)\n return this\n },\n get: function(idx){\n return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length]\n },\n toArray: function(){ return this.get() },\n size: function(){\n return this.length\n },\n remove: function(){\n return this.each(function(){\n if (this.parentNode != null)\n this.parentNode.removeChild(this)\n })\n },\n each: function(callback){\n emptyArray.every.call(this, function(el, idx){\n return callback.call(el, idx, el) !== false\n })\n return this\n },\n filter: function(selector){\n if (isFunction(selector)) return this.not(this.not(selector))\n return $(filter.call(this, function(element){\n return zepto.matches(element, selector)\n }))\n },\n add: function(selector,context){\n return $(uniq(this.concat($(selector,context))))\n },\n is: function(selector){\n return this.length > 0 && zepto.matches(this[0], selector)\n },\n not: function(selector){\n var nodes=[]\n if (isFunction(selector) && selector.call !== undefined)\n this.each(function(idx){\n if (!selector.call(this,idx)) nodes.push(this)\n })\n else {\n var excludes = typeof selector == 'string' ? this.filter(selector) :\n (likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector)\n this.forEach(function(el){\n if (excludes.indexOf(el) < 0) nodes.push(el)\n })\n }\n return $(nodes)\n },\n has: function(selector){\n return this.filter(function(){\n return isObject(selector) ?\n $.contains(this, selector) :\n $(this).find(selector).size()\n })\n },\n eq: function(idx){\n return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1)\n },\n first: function(){\n var el = this[0]\n return el && !isObject(el) ? el : $(el)\n },\n last: function(){\n var el = this[this.length - 1]\n return el && !isObject(el) ? el : $(el)\n },\n find: function(selector){\n var result, $this = this\n if (!selector) result = $()\n else if (typeof selector == 'object')\n result = $(selector).filter(function(){\n var node = this\n return emptyArray.some.call($this, function(parent){\n return $.contains(parent, node)\n })\n })\n else if (this.length == 1) result = $(zepto.qsa(this[0], selector))\n else result = this.map(function(){ return zepto.qsa(this, selector) })\n return result\n },\n closest: function(selector, context){\n var nodes = [], collection = typeof selector == 'object' && $(selector)\n this.each(function(_, node){\n while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector)))\n node = node !== context && !isDocument(node) && node.parentNode\n if (node && nodes.indexOf(node) < 0) nodes.push(node)\n })\n return $(nodes)\n },\n parents: function(selector){\n var ancestors = [], nodes = this\n while (nodes.length > 0)\n nodes = $.map(nodes, function(node){\n if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) {\n ancestors.push(node)\n return node\n }\n })\n return filtered(ancestors, selector)\n },\n parent: function(selector){\n return filtered(uniq(this.pluck('parentNode')), selector)\n },\n children: function(selector){\n return filtered(this.map(function(){ return children(this) }), selector)\n },\n contents: function() {\n return this.map(function() { return this.contentDocument || slice.call(this.childNodes) })\n },\n siblings: function(selector){\n return filtered(this.map(function(i, el){\n return filter.call(children(el.parentNode), function(child){ return child!==el })\n }), selector)\n },\n empty: function(){\n return this.each(function(){ this.innerHTML = '' })\n },\n // `pluck` is borrowed from Prototype.js\n pluck: function(property){\n return $.map(this, function(el){ return el[property] })\n },\n show: function(){\n return this.each(function(){\n this.style.display == \"none\" && (this.style.display = '')\n if (getComputedStyle(this, '').getPropertyValue(\"display\") == \"none\")\n this.style.display = defaultDisplay(this.nodeName)\n })\n },\n replaceWith: function(newContent){\n return this.before(newContent).remove()\n },\n wrap: function(structure){\n var func = isFunction(structure)\n if (this[0] && !func)\n var dom = $(structure).get(0),\n clone = dom.parentNode || this.length > 1\n\n return this.each(function(index){\n $(this).wrapAll(\n func ? structure.call(this, index) :\n clone ? dom.cloneNode(true) : dom\n )\n })\n },\n wrapAll: function(structure){\n if (this[0]) {\n $(this[0]).before(structure = $(structure))\n var children\n // drill down to the inmost element\n while ((children = structure.children()).length) structure = children.first()\n $(structure).append(this)\n }\n return this\n },\n wrapInner: function(structure){\n var func = isFunction(structure)\n return this.each(function(index){\n var self = $(this), contents = self.contents(),\n dom = func ? structure.call(this, index) : structure\n contents.length ? contents.wrapAll(dom) : self.append(dom)\n })\n },\n unwrap: function(){\n this.parent().each(function(){\n $(this).replaceWith($(this).children())\n })\n return this\n },\n clone: function(){\n return this.map(function(){ return this.cloneNode(true) })\n },\n hide: function(){\n return this.css(\"display\", \"none\")\n },\n toggle: function(setting){\n return this.each(function(){\n var el = $(this)\n ;(setting === undefined ? el.css(\"display\") == \"none\" : setting) ? el.show() : el.hide()\n })\n },\n prev: function(selector){ return $(this.pluck('previousElementSibling')).filter(selector || '*') },\n next: function(selector){ return $(this.pluck('nextElementSibling')).filter(selector || '*') },\n html: function(html){\n return 0 in arguments ?\n this.each(function(idx){\n var originHtml = this.innerHTML\n $(this).empty().append( funcArg(this, html, idx, originHtml) )\n }) :\n (0 in this ? this[0].innerHTML : null)\n },\n text: function(text){\n return 0 in arguments ?\n this.each(function(idx){\n var newText = funcArg(this, text, idx, this.textContent)\n this.textContent = newText == null ? '' : ''+newText\n }) :\n (0 in this ? this.pluck('textContent').join(\"\") : null)\n },\n attr: function(name, value){\n var result\n return (typeof name == 'string' && !(1 in arguments)) ?\n (0 in this && this[0].nodeType == 1 && (result = this[0].getAttribute(name)) != null ? result : undefined) :\n this.each(function(idx){\n if (this.nodeType !== 1) return\n if (isObject(name)) for (key in name) setAttribute(this, key, name[key])\n else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name)))\n })\n },\n removeAttr: function(name){\n return this.each(function(){ this.nodeType === 1 && name.split(' ').forEach(function(attribute){\n setAttribute(this, attribute)\n }, this)})\n },\n prop: function(name, value){\n name = propMap[name] || name\n return (1 in arguments) ?\n this.each(function(idx){\n this[name] = funcArg(this, value, idx, this[name])\n }) :\n (this[0] && this[0][name])\n },\n removeProp: function(name){\n name = propMap[name] || name\n return this.each(function(){ delete this[name] })\n },\n data: function(name, value){\n var attrName = 'data-' + name.replace(capitalRE, '-$1').toLowerCase()\n\n var data = (1 in arguments) ?\n this.attr(attrName, value) :\n this.attr(attrName)\n\n return data !== null ? deserializeValue(data) : undefined\n },\n val: function(value){\n if (0 in arguments) {\n if (value == null) value = \"\"\n return this.each(function(idx){\n this.value = funcArg(this, value, idx, this.value)\n })\n } else {\n return this[0] && (this[0].multiple ?\n $(this[0]).find('option').filter(function(){ return this.selected }).pluck('value') :\n this[0].value)\n }\n },\n offset: function(coordinates){\n if (coordinates) return this.each(function(index){\n var $this = $(this),\n coords = funcArg(this, coordinates, index, $this.offset()),\n parentOffset = $this.offsetParent().offset(),\n props = {\n top: coords.top - parentOffset.top,\n left: coords.left - parentOffset.left\n }\n\n if ($this.css('position') == 'static') props['position'] = 'relative'\n $this.css(props)\n })\n if (!this.length) return null\n if (document.documentElement !== this[0] && !$.contains(document.documentElement, this[0]))\n return {top: 0, left: 0}\n var obj = this[0].getBoundingClientRect()\n return {\n left: obj.left + window.pageXOffset,\n top: obj.top + window.pageYOffset,\n width: Math.round(obj.width),\n height: Math.round(obj.height)\n }\n },\n css: function(property, value){\n if (arguments.length < 2) {\n var element = this[0]\n if (typeof property == 'string') {\n if (!element) return\n return element.style[camelize(property)] || getComputedStyle(element, '').getPropertyValue(property)\n } else if (isArray(property)) {\n if (!element) return\n var props = {}\n var computedStyle = getComputedStyle(element, '')\n $.each(property, function(_, prop){\n props[prop] = (element.style[camelize(prop)] || computedStyle.getPropertyValue(prop))\n })\n return props\n }\n }\n\n var css = ''\n if (type(property) == 'string') {\n if (!value && value !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(property)) })\n else\n css = dasherize(property) + \":\" + maybeAddPx(property, value)\n } else {\n for (key in property)\n if (!property[key] && property[key] !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(key)) })\n else\n css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';'\n }\n\n return this.each(function(){ this.style.cssText += ';' + css })\n },\n index: function(element){\n return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0])\n },\n hasClass: function(name){\n if (!name) return false\n return emptyArray.some.call(this, function(el){\n return this.test(className(el))\n }, classRE(name))\n },\n addClass: function(name){\n if (!name) return this\n return this.each(function(idx){\n if (!('className' in this)) return\n classList = []\n var cls = className(this), newName = funcArg(this, name, idx, cls)\n newName.split(/\\s+/g).forEach(function(klass){\n if (!$(this).hasClass(klass)) classList.push(klass)\n }, this)\n classList.length && className(this, cls + (cls ? \" \" : \"\") + classList.join(\" \"))\n })\n },\n removeClass: function(name){\n return this.each(function(idx){\n if (!('className' in this)) return\n if (name === undefined) return className(this, '')\n classList = className(this)\n funcArg(this, name, idx, classList).split(/\\s+/g).forEach(function(klass){\n classList = classList.replace(classRE(klass), \" \")\n })\n className(this, classList.trim())\n })\n },\n toggleClass: function(name, when){\n if (!name) return this\n return this.each(function(idx){\n var $this = $(this), names = funcArg(this, name, idx, className(this))\n names.split(/\\s+/g).forEach(function(klass){\n (when === undefined ? !$this.hasClass(klass) : when) ?\n $this.addClass(klass) : $this.removeClass(klass)\n })\n })\n },\n scrollTop: function(value){\n if (!this.length) return\n var hasScrollTop = 'scrollTop' in this[0]\n if (value === undefined) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset\n return this.each(hasScrollTop ?\n function(){ this.scrollTop = value } :\n function(){ this.scrollTo(this.scrollX, value) })\n },\n scrollLeft: function(value){\n if (!this.length) return\n var hasScrollLeft = 'scrollLeft' in this[0]\n if (value === undefined) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset\n return this.each(hasScrollLeft ?\n function(){ this.scrollLeft = value } :\n function(){ this.scrollTo(value, this.scrollY) })\n },\n position: function() {\n if (!this.length) return\n\n var elem = this[0],\n // Get *real* offsetParent\n offsetParent = this.offsetParent(),\n // Get correct offsets\n offset = this.offset(),\n parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset()\n\n // Subtract element margins\n // note: when an element has margin: auto the offsetLeft and marginLeft\n // are the same in Safari causing offset.left to incorrectly be 0\n offset.top -= parseFloat( $(elem).css('margin-top') ) || 0\n offset.left -= parseFloat( $(elem).css('margin-left') ) || 0\n\n // Add offsetParent borders\n parentOffset.top += parseFloat( $(offsetParent[0]).css('border-top-width') ) || 0\n parentOffset.left += parseFloat( $(offsetParent[0]).css('border-left-width') ) || 0\n\n // Subtract the two offsets\n return {\n top: offset.top - parentOffset.top,\n left: offset.left - parentOffset.left\n }\n },\n offsetParent: function() {\n return this.map(function(){\n var parent = this.offsetParent || document.body\n while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css(\"position\") == \"static\")\n parent = parent.offsetParent\n return parent\n })\n }\n }\n\n // for now\n $.fn.detach = $.fn.remove\n\n // Generate the `width` and `height` functions\n ;['width', 'height'].forEach(function(dimension){\n var dimensionProperty =\n dimension.replace(/./, function(m){ return m[0].toUpperCase() })\n\n $.fn[dimension] = function(value){\n var offset, el = this[0]\n if (value === undefined) return isWindow(el) ? el['inner' + dimensionProperty] :\n isDocument(el) ? el.documentElement['scroll' + dimensionProperty] :\n (offset = this.offset()) && offset[dimension]\n else return this.each(function(idx){\n el = $(this)\n el.css(dimension, funcArg(this, value, idx, el[dimension]()))\n })\n }\n })\n\n function traverseNode(node, fun) {\n fun(node)\n for (var i = 0, len = node.childNodes.length; i < len; i++)\n traverseNode(node.childNodes[i], fun)\n }\n\n // Generate the `after`, `prepend`, `before`, `append`,\n // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods.\n adjacencyOperators.forEach(function(operator, operatorIndex) {\n var inside = operatorIndex % 2 //=> prepend, append\n\n $.fn[operator] = function(){\n // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings\n var argType, nodes = $.map(arguments, function(arg) {\n var arr = []\n argType = type(arg)\n if (argType == \"array\") {\n arg.forEach(function(el) {\n if (el.nodeType !== undefined) return arr.push(el)\n else if ($.zepto.isZ(el)) return arr = arr.concat(el.get())\n arr = arr.concat(zepto.fragment(el))\n })\n return arr\n }\n return argType == \"object\" || arg == null ?\n arg : zepto.fragment(arg)\n }),\n parent, copyByClone = this.length > 1\n if (nodes.length < 1) return this\n\n return this.each(function(_, target){\n parent = inside ? target : target.parentNode\n\n // convert all methods to a \"before\" operation\n target = operatorIndex == 0 ? target.nextSibling :\n operatorIndex == 1 ? target.firstChild :\n operatorIndex == 2 ? target :\n null\n\n var parentInDocument = $.contains(document.documentElement, parent)\n\n nodes.forEach(function(node){\n if (copyByClone) node = node.cloneNode(true)\n else if (!parent) return $(node).remove()\n\n parent.insertBefore(node, target)\n if (parentInDocument) traverseNode(node, function(el){\n if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' &&\n (!el.type || el.type === 'text/javascript') && !el.src){\n var target = el.ownerDocument ? el.ownerDocument.defaultView : window\n target['eval'].call(target, el.innerHTML)\n }\n })\n })\n })\n }\n\n // after => insertAfter\n // prepend => prependTo\n // before => insertBefore\n // append => appendTo\n $.fn[inside ? operator+'To' : 'insert'+(operatorIndex ? 'Before' : 'After')] = function(html){\n $(html)[operator](this)\n return this\n }\n })\n\n zepto.Z.prototype = Z.prototype = $.fn\n\n // Export internal API functions in the `$.zepto` namespace\n zepto.uniq = uniq\n zepto.deserializeValue = deserializeValue\n $.zepto = zepto\n\n return $\n})()\n\nwindow.Zepto = Zepto\nwindow.$ === undefined && (window.$ = Zepto)\n\n;(function($){\n var _zid = 1, undefined,\n slice = Array.prototype.slice,\n isFunction = $.isFunction,\n isString = function(obj){ return typeof obj == 'string' },\n handlers = {},\n specialEvents={},\n focusinSupported = 'onfocusin' in window,\n focus = { focus: 'focusin', blur: 'focusout' },\n hover = { mouseenter: 'mouseover', mouseleave: 'mouseout' }\n\n specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents'\n\n function zid(element) {\n return element._zid || (element._zid = _zid++)\n }\n function findHandlers(element, event, fn, selector) {\n event = parse(event)\n if (event.ns) var matcher = matcherFor(event.ns)\n return (handlers[zid(element)] || []).filter(function(handler) {\n return handler\n && (!event.e || handler.e == event.e)\n && (!event.ns || matcher.test(handler.ns))\n && (!fn || zid(handler.fn) === zid(fn))\n && (!selector || handler.sel == selector)\n })\n }\n function parse(event) {\n var parts = ('' + event).split('.')\n return {e: parts[0], ns: parts.slice(1).sort().join(' ')}\n }\n function matcherFor(ns) {\n return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)')\n }\n\n function eventCapture(handler, captureSetting) {\n return handler.del &&\n (!focusinSupported && (handler.e in focus)) ||\n !!captureSetting\n }\n\n function realEvent(type) {\n return hover[type] || (focusinSupported && focus[type]) || type\n }\n\n function add(element, events, fn, data, selector, delegator, capture){\n var id = zid(element), set = (handlers[id] || (handlers[id] = []))\n events.split(/\\s/).forEach(function(event){\n if (event == 'ready') return $(document).ready(fn)\n var handler = parse(event)\n handler.fn = fn\n handler.sel = selector\n // emulate mouseenter, mouseleave\n if (handler.e in hover) fn = function(e){\n var related = e.relatedTarget\n if (!related || (related !== this && !$.contains(this, related)))\n return handler.fn.apply(this, arguments)\n }\n handler.del = delegator\n var callback = delegator || fn\n handler.proxy = function(e){\n e = compatible(e)\n if (e.isImmediatePropagationStopped()) return\n e.data = data\n var result = callback.apply(element, e._args == undefined ? [e] : [e].concat(e._args))\n if (result === false) e.preventDefault(), e.stopPropagation()\n return result\n }\n handler.i = set.length\n set.push(handler)\n if ('addEventListener' in element)\n element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n }\n function remove(element, events, fn, selector, capture){\n var id = zid(element)\n ;(events || '').split(/\\s/).forEach(function(event){\n findHandlers(element, event, fn, selector).forEach(function(handler){\n delete handlers[id][handler.i]\n if ('removeEventListener' in element)\n element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n })\n }\n\n $.event = { add: add, remove: remove }\n\n $.proxy = function(fn, context) {\n var args = (2 in arguments) && slice.call(arguments, 2)\n if (isFunction(fn)) {\n var proxyFn = function(){ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments) }\n proxyFn._zid = zid(fn)\n return proxyFn\n } else if (isString(context)) {\n if (args) {\n args.unshift(fn[context], fn)\n return $.proxy.apply(null, args)\n } else {\n return $.proxy(fn[context], fn)\n }\n } else {\n throw new TypeError(\"expected function\")\n }\n }\n\n $.fn.bind = function(event, data, callback){\n return this.on(event, data, callback)\n }\n $.fn.unbind = function(event, callback){\n return this.off(event, callback)\n }\n $.fn.one = function(event, selector, data, callback){\n return this.on(event, selector, data, callback, 1)\n }\n\n var returnTrue = function(){return true},\n returnFalse = function(){return false},\n ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,\n eventMethods = {\n preventDefault: 'isDefaultPrevented',\n stopImmediatePropagation: 'isImmediatePropagationStopped',\n stopPropagation: 'isPropagationStopped'\n }\n\n function compatible(event, source) {\n if (source || !event.isDefaultPrevented) {\n source || (source = event)\n\n $.each(eventMethods, function(name, predicate) {\n var sourceMethod = source[name]\n event[name] = function(){\n this[predicate] = returnTrue\n return sourceMethod && sourceMethod.apply(source, arguments)\n }\n event[predicate] = returnFalse\n })\n\n event.timeStamp || (event.timeStamp = Date.now())\n\n if (source.defaultPrevented !== undefined ? source.defaultPrevented :\n 'returnValue' in source ? source.returnValue === false :\n source.getPreventDefault && source.getPreventDefault())\n event.isDefaultPrevented = returnTrue\n }\n return event\n }\n\n function createProxy(event) {\n var key, proxy = { originalEvent: event }\n for (key in event)\n if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key]\n\n return compatible(proxy, event)\n }\n\n $.fn.delegate = function(selector, event, callback){\n return this.on(event, selector, callback)\n }\n $.fn.undelegate = function(selector, event, callback){\n return this.off(event, selector, callback)\n }\n\n $.fn.live = function(event, callback){\n $(document.body).delegate(this.selector, event, callback)\n return this\n }\n $.fn.die = function(event, callback){\n $(document.body).undelegate(this.selector, event, callback)\n return this\n }\n\n $.fn.on = function(event, selector, data, callback, one){\n var autoRemove, delegator, $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.on(type, selector, data, fn, one)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = data, data = selector, selector = undefined\n if (callback === undefined || data === false)\n callback = data, data = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(_, element){\n if (one) autoRemove = function(e){\n remove(element, e.type, callback)\n return callback.apply(this, arguments)\n }\n\n if (selector) delegator = function(e){\n var evt, match = $(e.target).closest(selector, element).get(0)\n if (match && match !== element) {\n evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element})\n return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1)))\n }\n }\n\n add(element, event, callback, data, selector, delegator || autoRemove)\n })\n }\n $.fn.off = function(event, selector, callback){\n var $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.off(type, selector, fn)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = selector, selector = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(){\n remove(this, event, callback, selector)\n })\n }\n\n $.fn.trigger = function(event, args){\n event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event)\n event._args = args\n return this.each(function(){\n // handle focus(), blur() by calling them directly\n if (event.type in focus && typeof this[event.type] == \"function\") this[event.type]()\n // items in the collection might not be DOM elements\n else if ('dispatchEvent' in this) this.dispatchEvent(event)\n else $(this).triggerHandler(event, args)\n })\n }\n\n // triggers event handlers on current element just as if an event occurred,\n // doesn't trigger an actual event, doesn't bubble\n $.fn.triggerHandler = function(event, args){\n var e, result\n this.each(function(i, element){\n e = createProxy(isString(event) ? $.Event(event) : event)\n e._args = args\n e.target = element\n $.each(findHandlers(element, event.type || event), function(i, handler){\n result = handler.proxy(e)\n if (e.isImmediatePropagationStopped()) return false\n })\n })\n return result\n }\n\n // shortcut methods for `.bind(event, fn)` for each event type\n ;('focusin focusout focus blur load resize scroll unload click dblclick '+\n 'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+\n 'change select keydown keypress keyup error').split(' ').forEach(function(event) {\n $.fn[event] = function(callback) {\n return (0 in arguments) ?\n this.bind(event, callback) :\n this.trigger(event)\n }\n })\n\n $.Event = function(type, props) {\n if (!isString(type)) props = type, type = props.type\n var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true\n if (props) for (var name in props) (name == 'bubbles') ? (bubbles = !!props[name]) : (event[name] = props[name])\n event.initEvent(type, bubbles, true)\n return compatible(event)\n }\n\n})(Zepto)\n\n;(function($){\n var jsonpID = +new Date(),\n document = window.document,\n key,\n name,\n rscript = /<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi,\n scriptTypeRE = /^(?:text|application)\\/javascript/i,\n xmlTypeRE = /^(?:text|application)\\/xml/i,\n jsonType = 'application/json',\n htmlType = 'text/html',\n blankRE = /^\\s*$/,\n originAnchor = document.createElement('a')\n\n originAnchor.href = window.location.href\n\n // trigger a custom event and return false if it was cancelled\n function triggerAndReturn(context, eventName, data) {\n var event = $.Event(eventName)\n $(context).trigger(event, data)\n return !event.isDefaultPrevented()\n }\n\n // trigger an Ajax \"global\" event\n function triggerGlobal(settings, context, eventName, data) {\n if (settings.global) return triggerAndReturn(context || document, eventName, data)\n }\n\n // Number of active Ajax requests\n $.active = 0\n\n function ajaxStart(settings) {\n if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart')\n }\n function ajaxStop(settings) {\n if (settings.global && !(--$.active)) triggerGlobal(settings, null, 'ajaxStop')\n }\n\n // triggers an extra global event \"ajaxBeforeSend\" that's like \"ajaxSend\" but cancelable\n function ajaxBeforeSend(xhr, settings) {\n var context = settings.context\n if (settings.beforeSend.call(context, xhr, settings) === false ||\n triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false)\n return false\n\n triggerGlobal(settings, context, 'ajaxSend', [xhr, settings])\n }\n function ajaxSuccess(data, xhr, settings, deferred) {\n var context = settings.context, status = 'success'\n settings.success.call(context, data, status, xhr)\n if (deferred) deferred.resolveWith(context, [data, status, xhr])\n triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data])\n ajaxComplete(status, xhr, settings)\n }\n // type: \"timeout\", \"error\", \"abort\", \"parsererror\"\n function ajaxError(error, type, xhr, settings, deferred) {\n var context = settings.context\n settings.error.call(context, xhr, type, error)\n if (deferred) deferred.rejectWith(context, [xhr, type, error])\n triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error || type])\n ajaxComplete(type, xhr, settings)\n }\n // status: \"success\", \"notmodified\", \"error\", \"timeout\", \"abort\", \"parsererror\"\n function ajaxComplete(status, xhr, settings) {\n var context = settings.context\n settings.complete.call(context, xhr, status)\n triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings])\n ajaxStop(settings)\n }\n\n function ajaxDataFilter(data, type, settings) {\n if (settings.dataFilter == empty) return data\n var context = settings.context\n return settings.dataFilter.call(context, data, type)\n }\n\n // Empty function, used as default callback\n function empty() {}\n\n $.ajaxJSONP = function(options, deferred){\n if (!('type' in options)) return $.ajax(options)\n\n var _callbackName = options.jsonpCallback,\n callbackName = ($.isFunction(_callbackName) ?\n _callbackName() : _callbackName) || ('Zepto' + (jsonpID++)),\n script = document.createElement('script'),\n originalCallback = window[callbackName],\n responseData,\n abort = function(errorType) {\n $(script).triggerHandler('error', errorType || 'abort')\n },\n xhr = { abort: abort }, abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n $(script).on('load error', function(e, errorType){\n clearTimeout(abortTimeout)\n $(script).off().remove()\n\n if (e.type == 'error' || !responseData) {\n ajaxError(null, errorType || 'error', xhr, options, deferred)\n } else {\n ajaxSuccess(responseData[0], xhr, options, deferred)\n }\n\n window[callbackName] = originalCallback\n if (responseData && $.isFunction(originalCallback))\n originalCallback(responseData[0])\n\n originalCallback = responseData = undefined\n })\n\n if (ajaxBeforeSend(xhr, options) === false) {\n abort('abort')\n return xhr\n }\n\n window[callbackName] = function(){\n responseData = arguments\n }\n\n script.src = options.url.replace(/\\?(.+)=\\?/, '?$1=' + callbackName)\n document.head.appendChild(script)\n\n if (options.timeout > 0) abortTimeout = setTimeout(function(){\n abort('timeout')\n }, options.timeout)\n\n return xhr\n }\n\n $.ajaxSettings = {\n // Default type of request\n type: 'GET',\n // Callback that is executed before request\n beforeSend: empty,\n // Callback that is executed if the request succeeds\n success: empty,\n // Callback that is executed the the server drops error\n error: empty,\n // Callback that is executed on request complete (both: error and success)\n complete: empty,\n // The context for the callbacks\n context: null,\n // Whether to trigger \"global\" Ajax events\n global: true,\n // Transport\n xhr: function () {\n return new window.XMLHttpRequest()\n },\n // MIME types mapping\n // IIS returns Javascript as \"application/x-javascript\"\n accepts: {\n script: 'text/javascript, application/javascript, application/x-javascript',\n json: jsonType,\n xml: 'application/xml, text/xml',\n html: htmlType,\n text: 'text/plain'\n },\n // Whether the request is to another domain\n crossDomain: false,\n // Default timeout\n timeout: 0,\n // Whether data should be serialized to string\n processData: true,\n // Whether the browser should be allowed to cache GET responses\n cache: true,\n //Used to handle the raw response data of XMLHttpRequest.\n //This is a pre-filtering function to sanitize the response.\n //The sanitized response should be returned\n dataFilter: empty\n }\n\n function mimeToDataType(mime) {\n if (mime) mime = mime.split(';', 2)[0]\n return mime && ( mime == htmlType ? 'html' :\n mime == jsonType ? 'json' :\n scriptTypeRE.test(mime) ? 'script' :\n xmlTypeRE.test(mime) && 'xml' ) || 'text'\n }\n\n function appendQuery(url, query) {\n if (query == '') return url\n return (url + '&' + query).replace(/[&?]{1,2}/, '?')\n }\n\n // serialize payload and append it to the URL for GET requests\n function serializeData(options) {\n if (options.processData && options.data && $.type(options.data) != \"string\")\n options.data = $.param(options.data, options.traditional)\n if (options.data && (!options.type || options.type.toUpperCase() == 'GET' || 'jsonp' == options.dataType))\n options.url = appendQuery(options.url, options.data), options.data = undefined\n }\n\n $.ajax = function(options){\n var settings = $.extend({}, options || {}),\n deferred = $.Deferred && $.Deferred(),\n urlAnchor, hashIndex\n for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key]\n\n ajaxStart(settings)\n\n if (!settings.crossDomain) {\n urlAnchor = document.createElement('a')\n urlAnchor.href = settings.url\n // cleans up URL for .href (IE only), see https://github.com/madrobby/zepto/pull/1049\n urlAnchor.href = urlAnchor.href\n settings.crossDomain = (originAnchor.protocol + '//' + originAnchor.host) !== (urlAnchor.protocol + '//' + urlAnchor.host)\n }\n\n if (!settings.url) settings.url = window.location.toString()\n if ((hashIndex = settings.url.indexOf('#')) > -1) settings.url = settings.url.slice(0, hashIndex)\n serializeData(settings)\n\n var dataType = settings.dataType, hasPlaceholder = /\\?.+=\\?/.test(settings.url)\n if (hasPlaceholder) dataType = 'jsonp'\n\n if (settings.cache === false || (\n (!options || options.cache !== true) &&\n ('script' == dataType || 'jsonp' == dataType)\n ))\n settings.url = appendQuery(settings.url, '_=' + Date.now())\n\n if ('jsonp' == dataType) {\n if (!hasPlaceholder)\n settings.url = appendQuery(settings.url,\n settings.jsonp ? (settings.jsonp + '=?') : settings.jsonp === false ? '' : 'callback=?')\n return $.ajaxJSONP(settings, deferred)\n }\n\n var mime = settings.accepts[dataType],\n headers = { },\n setHeader = function(name, value) { headers[name.toLowerCase()] = [name, value] },\n protocol = /^([\\w-]+:)\\/\\//.test(settings.url) ? RegExp.$1 : window.location.protocol,\n xhr = settings.xhr(),\n nativeSetHeader = xhr.setRequestHeader,\n abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n if (!settings.crossDomain) setHeader('X-Requested-With', 'XMLHttpRequest')\n setHeader('Accept', mime || '*/*')\n if (mime = settings.mimeType || mime) {\n if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0]\n xhr.overrideMimeType && xhr.overrideMimeType(mime)\n }\n if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET'))\n setHeader('Content-Type', settings.contentType || 'application/x-www-form-urlencoded')\n\n if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name])\n xhr.setRequestHeader = setHeader\n\n xhr.onreadystatechange = function(){\n if (xhr.readyState == 4) {\n xhr.onreadystatechange = empty\n clearTimeout(abortTimeout)\n var result, error = false\n if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) {\n dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader('content-type'))\n\n if (xhr.responseType == 'arraybuffer' || xhr.responseType == 'blob')\n result = xhr.response\n else {\n result = xhr.responseText\n\n try {\n // http://perfectionkills.com/global-eval-what-are-the-options/\n // sanitize response accordingly if data filter callback provided\n result = ajaxDataFilter(result, dataType, settings)\n if (dataType == 'script') (1,eval)(result)\n else if (dataType == 'xml') result = xhr.responseXML\n else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result)\n } catch (e) { error = e }\n\n if (error) return ajaxError(error, 'parsererror', xhr, settings, deferred)\n }\n\n ajaxSuccess(result, xhr, settings, deferred)\n } else {\n ajaxError(xhr.statusText || null, xhr.status ? 'error' : 'abort', xhr, settings, deferred)\n }\n }\n }\n\n if (ajaxBeforeSend(xhr, settings) === false) {\n xhr.abort()\n ajaxError(null, 'abort', xhr, settings, deferred)\n return xhr\n }\n\n var async = 'async' in settings ? settings.async : true\n xhr.open(settings.type, settings.url, async, settings.username, settings.password)\n\n if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name]\n\n for (name in headers) nativeSetHeader.apply(xhr, headers[name])\n\n if (settings.timeout > 0) abortTimeout = setTimeout(function(){\n xhr.onreadystatechange = empty\n xhr.abort()\n ajaxError(null, 'timeout', xhr, settings, deferred)\n }, settings.timeout)\n\n // avoid sending empty string (#319)\n xhr.send(settings.data ? settings.data : null)\n return xhr\n }\n\n // handle optional data/success arguments\n function parseArguments(url, data, success, dataType) {\n if ($.isFunction(data)) dataType = success, success = data, data = undefined\n if (!$.isFunction(success)) dataType = success, success = undefined\n return {\n url: url\n , data: data\n , success: success\n , dataType: dataType\n }\n }\n\n $.get = function(/* url, data, success, dataType */){\n return $.ajax(parseArguments.apply(null, arguments))\n }\n\n $.post = function(/* url, data, success, dataType */){\n var options = parseArguments.apply(null, arguments)\n options.type = 'POST'\n return $.ajax(options)\n }\n\n $.getJSON = function(/* url, data, success */){\n var options = parseArguments.apply(null, arguments)\n options.dataType = 'json'\n return $.ajax(options)\n }\n\n $.fn.load = function(url, data, success){\n if (!this.length) return this\n var self = this, parts = url.split(/\\s/), selector,\n options = parseArguments(url, data, success),\n callback = options.success\n if (parts.length > 1) options.url = parts[0], selector = parts[1]\n options.success = function(response){\n self.html(selector ?\n $('<div>').html(response.replace(rscript, \"\")).find(selector)\n : response)\n callback && callback.apply(self, arguments)\n }\n $.ajax(options)\n return this\n }\n\n var escape = encodeURIComponent\n\n function serialize(params, obj, traditional, scope){\n var type, array = $.isArray(obj), hash = $.isPlainObject(obj)\n $.each(obj, function(key, value) {\n type = $.type(value)\n if (scope) key = traditional ? scope :\n scope + '[' + (hash || type == 'object' || type == 'array' ? key : '') + ']'\n // handle data in serializeArray() format\n if (!scope && array) params.add(value.name, value.value)\n // recurse into nested objects\n else if (type == \"array\" || (!traditional && type == \"object\"))\n serialize(params, value, traditional, key)\n else params.add(key, value)\n })\n }\n\n $.param = function(obj, traditional){\n var params = []\n params.add = function(key, value) {\n if ($.isFunction(value)) value = value()\n if (value == null) value = \"\"\n this.push(escape(key) + '=' + escape(value))\n }\n serialize(params, obj, traditional)\n return params.join('&').replace(/%20/g, '+')\n }\n})(Zepto)\n\n;(function($){\n $.fn.serializeArray = function() {\n var name, type, result = [],\n add = function(value) {\n if (value.forEach) return value.forEach(add)\n result.push({ name: name, value: value })\n }\n if (this[0]) $.each(this[0].elements, function(_, field){\n type = field.type, name = field.name\n if (name && field.nodeName.toLowerCase() != 'fieldset' &&\n !field.disabled && type != 'submit' && type != 'reset' && type != 'button' && type != 'file' &&\n ((type != 'radio' && type != 'checkbox') || field.checked))\n add($(field).val())\n })\n return result\n }\n\n $.fn.serialize = function(){\n var result = []\n this.serializeArray().forEach(function(elm){\n result.push(encodeURIComponent(elm.name) + '=' + encodeURIComponent(elm.value))\n })\n return result.join('&')\n }\n\n $.fn.submit = function(callback) {\n if (0 in arguments) this.bind('submit', callback)\n else if (this.length) {\n var event = $.Event('submit')\n this.eq(0).trigger(event)\n if (!event.isDefaultPrevented()) this.get(0).submit()\n }\n return this\n }\n\n})(Zepto)\n\n;(function(){\n // getComputedStyle shouldn't freak out when called\n // without a valid element as argument\n try {\n getComputedStyle(undefined)\n } catch(e) {\n var nativeGetComputedStyle = getComputedStyle\n window.getComputedStyle = function(element, pseudoElement){\n try {\n return nativeGetComputedStyle(element, pseudoElement)\n } catch(e) {\n return null\n }\n }\n }\n})()\n return Zepto\n}))\n\n}.call(window));","module.exports = global[\"moment\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\expose-loader\\\\index.js?dayjs!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\dayjs.min.js\");","module.exports = global[\"dayjs\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\dayjs.min.js\");","!function(t,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=n():\"function\"==typeof define&&define.amd?define(n):t.dayjs=n()}(this,function(){\"use strict\";var t=\"millisecond\",n=\"second\",e=\"minute\",r=\"hour\",i=\"day\",s=\"week\",u=\"month\",a=\"quarter\",o=\"year\",h=/^(\\d{4})-?(\\d{1,2})-?(\\d{0,2})[^0-9]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?.?(\\d{1,3})?$/,f=/\\[([^\\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,c=function(t,n,e){var r=String(t);return!r||r.length>=n?t:\"\"+Array(n+1-r.length).join(e)+t},d={s:c,z:function(t){var n=-t.utcOffset(),e=Math.abs(n),r=Math.floor(e/60),i=e%60;return(n<=0?\"+\":\"-\")+c(r,2,\"0\")+\":\"+c(i,2,\"0\")},m:function(t,n){var e=12*(n.year()-t.year())+(n.month()-t.month()),r=t.clone().add(e,u),i=n-r<0,s=t.clone().add(e+(i?-1:1),u);return Number(-(e+(n-r)/(i?r-s:s-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(h){return{M:u,y:o,w:s,d:i,h:r,m:e,s:n,ms:t,Q:a}[h]||String(h||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},$={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\")},l=\"en\",m={};m[l]=$;var y=function(t){return t instanceof v},M=function(t,n,e){var r;if(!t)return l;if(\"string\"==typeof t)m[t]&&(r=t),n&&(m[t]=n,r=t);else{var i=t.name;m[i]=t,r=i}return e||(l=r),r},g=function(t,n,e){if(y(t))return t.clone();var r=n?\"string\"==typeof n?{format:n,pl:e}:n:{};return r.date=t,new v(r)},D=d;D.l=M,D.i=y,D.w=function(t,n){return g(t,{locale:n.$L,utc:n.$u})};var v=function(){function c(t){this.$L=this.$L||M(t.locale,null,!0),this.parse(t)}var d=c.prototype;return d.parse=function(t){this.$d=function(t){var n=t.date,e=t.utc;if(null===n)return new Date(NaN);if(D.u(n))return new Date;if(n instanceof Date)return new Date(n);if(\"string\"==typeof n&&!/Z$/i.test(n)){var r=n.match(h);if(r)return e?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(n)}(t),this.init()},d.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},d.$utils=function(){return D},d.isValid=function(){return!(\"Invalid Date\"===this.$d.toString())},d.isSame=function(t,n){var e=g(t);return this.startOf(n)<=e&&e<=this.endOf(n)},d.isAfter=function(t,n){return g(t)<this.startOf(n)},d.isBefore=function(t,n){return this.endOf(n)<g(t)},d.$g=function(t,n,e){return D.u(t)?this[n]:this.set(e,t)},d.year=function(t){return this.$g(t,\"$y\",o)},d.month=function(t){return this.$g(t,\"$M\",u)},d.day=function(t){return this.$g(t,\"$W\",i)},d.date=function(t){return this.$g(t,\"$D\",\"date\")},d.hour=function(t){return this.$g(t,\"$H\",r)},d.minute=function(t){return this.$g(t,\"$m\",e)},d.second=function(t){return this.$g(t,\"$s\",n)},d.millisecond=function(n){return this.$g(n,\"$ms\",t)},d.unix=function(){return Math.floor(this.valueOf()/1e3)},d.valueOf=function(){return this.$d.getTime()},d.startOf=function(t,a){var h=this,f=!!D.u(a)||a,c=D.p(t),d=function(t,n){var e=D.w(h.$u?Date.UTC(h.$y,n,t):new Date(h.$y,n,t),h);return f?e:e.endOf(i)},$=function(t,n){return D.w(h.toDate()[t].apply(h.toDate(),(f?[0,0,0,0]:[23,59,59,999]).slice(n)),h)},l=this.$W,m=this.$M,y=this.$D,M=\"set\"+(this.$u?\"UTC\":\"\");switch(c){case o:return f?d(1,0):d(31,11);case u:return f?d(1,m):d(0,m+1);case s:var g=this.$locale().weekStart||0,v=(l<g?l+7:l)-g;return d(f?y-v:y+(6-v),m);case i:case\"date\":return $(M+\"Hours\",0);case r:return $(M+\"Minutes\",1);case e:return $(M+\"Seconds\",2);case n:return $(M+\"Milliseconds\",3);default:return this.clone()}},d.endOf=function(t){return this.startOf(t,!1)},d.$set=function(s,a){var h,f=D.p(s),c=\"set\"+(this.$u?\"UTC\":\"\"),d=(h={},h[i]=c+\"Date\",h.date=c+\"Date\",h[u]=c+\"Month\",h[o]=c+\"FullYear\",h[r]=c+\"Hours\",h[e]=c+\"Minutes\",h[n]=c+\"Seconds\",h[t]=c+\"Milliseconds\",h)[f],$=f===i?this.$D+(a-this.$W):a;if(f===u||f===o){var l=this.clone().set(\"date\",1);l.$d[d]($),l.init(),this.$d=l.set(\"date\",Math.min(this.$D,l.daysInMonth())).toDate()}else d&&this.$d[d]($);return this.init(),this},d.set=function(t,n){return this.clone().$set(t,n)},d.get=function(t){return this[D.p(t)]()},d.add=function(t,a){var h,f=this;t=Number(t);var c=D.p(a),d=function(n){var e=g(f);return D.w(e.date(e.date()+Math.round(n*t)),f)};if(c===u)return this.set(u,this.$M+t);if(c===o)return this.set(o,this.$y+t);if(c===i)return d(1);if(c===s)return d(7);var $=(h={},h[e]=6e4,h[r]=36e5,h[n]=1e3,h)[c]||1,l=this.valueOf()+t*$;return D.w(l,this)},d.subtract=function(t,n){return this.add(-1*t,n)},d.format=function(t){var n=this;if(!this.isValid())return\"Invalid Date\";var e=t||\"YYYY-MM-DDTHH:mm:ssZ\",r=D.z(this),i=this.$locale(),s=this.$H,u=this.$m,a=this.$M,o=i.weekdays,h=i.months,c=function(t,r,i,s){return t&&(t[r]||t(n,e))||i[r].substr(0,s)},d=function(t){return D.s(s%12||12,t,\"0\")},$=i.meridiem||function(t,n,e){var r=t<12?\"AM\":\"PM\";return e?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:D.s(a+1,2,\"0\"),MMM:c(i.monthsShort,a,h,3),MMMM:h[a]||h(this,e),D:this.$D,DD:D.s(this.$D,2,\"0\"),d:String(this.$W),dd:c(i.weekdaysMin,this.$W,o,2),ddd:c(i.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:D.s(s,2,\"0\"),h:d(1),hh:d(2),a:$(s,u,!0),A:$(s,u,!1),m:String(u),mm:D.s(u,2,\"0\"),s:String(this.$s),ss:D.s(this.$s,2,\"0\"),SSS:D.s(this.$ms,3,\"0\"),Z:r};return e.replace(f,function(t,n){return n||l[t]||r.replace(\":\",\"\")})},d.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},d.diff=function(t,h,f){var c,d=D.p(h),$=g(t),l=6e4*($.utcOffset()-this.utcOffset()),m=this-$,y=D.m(this,$);return y=(c={},c[o]=y/12,c[u]=y,c[a]=y/3,c[s]=(m-l)/6048e5,c[i]=(m-l)/864e5,c[r]=m/36e5,c[e]=m/6e4,c[n]=m/1e3,c)[d]||m,f?y:D.a(y)},d.daysInMonth=function(){return this.endOf(u).$D},d.$locale=function(){return m[this.$L]},d.locale=function(t,n){if(!t)return this.$L;var e=this.clone();return e.$L=M(t,n,!0),e},d.clone=function(){return D.w(this.toDate(),this)},d.toDate=function(){return new Date(this.$d)},d.toJSON=function(){return this.isValid()?this.toISOString():null},d.toISOString=function(){return this.$d.toISOString()},d.toString=function(){return this.$d.toUTCString()},c}();return g.prototype=v.prototype,g.extend=function(t,n){return t(n,v,g),g},g.locale=M,g.isDayjs=y,g.unix=function(t){return g(1e3*t)},g.en=m[l],g.Ls=m,g});\n","module.exports = global[\"m\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\index.js\");","\"use strict\"\n\nvar hyperscript = require(\"./hyperscript\")\nvar request = require(\"./request\")\nvar mountRedraw = require(\"./mount-redraw\")\n\nvar m = function m() { return hyperscript.apply(this, arguments) }\nm.m = hyperscript\nm.trust = hyperscript.trust\nm.fragment = hyperscript.fragment\nm.mount = mountRedraw.mount\nm.route = require(\"./route\")\nm.render = require(\"./render\")\nm.redraw = mountRedraw.redraw\nm.request = request.request\nm.jsonp = request.jsonp\nm.parseQueryString = require(\"./querystring/parse\")\nm.buildQueryString = require(\"./querystring/build\")\nm.parsePathname = require(\"./pathname/parse\")\nm.buildPathname = require(\"./pathname/build\")\nm.vnode = require(\"./render/vnode\")\nm.PromisePolyfill = require(\"./promise/polyfill\")\n\nmodule.exports = m\n","\"use strict\"\n\nvar hyperscript = require(\"./render/hyperscript\")\n\nhyperscript.trust = require(\"./render/trust\")\nhyperscript.fragment = require(\"./render/fragment\")\n\nmodule.exports = hyperscript\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(html) {\n\tif (html == null) html = \"\"\n\treturn Vnode(\"<\", undefined, undefined, html, undefined, undefined)\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nmodule.exports = function() {\n\tvar vnode = hyperscriptVnode.apply(0, arguments)\n\n\tvnode.tag = \"[\"\n\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\treturn vnode\n}\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./promise/promise\")\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./request/request\")(window, PromisePolyfill, mountRedraw.redraw)\n","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function($window) {\n\tvar $doc = $window && $window.document\n\tvar currentRedraw\n\n\tvar nameSpace = {\n\t\tsvg: \"http://www.w3.org/2000/svg\",\n\t\tmath: \"http://www.w3.org/1998/Math/MathML\"\n\t}\n\n\tfunction getNameSpace(vnode) {\n\t\treturn vnode.attrs && vnode.attrs.xmlns || nameSpace[vnode.tag]\n\t}\n\n\t//sanity check to discourage people from doing `vnode.state = ...`\n\tfunction checkState(vnode, original) {\n\t\tif (vnode.state !== original) throw new Error(\"`vnode.state` must not be modified\")\n\t}\n\n\t//Note: the hook is passed as the `this` argument to allow proxying the\n\t//arguments without requiring a full array allocation to do so. It also\n\t//takes advantage of the fact the current `vnode` is the first argument in\n\t//all lifecycle methods.\n\tfunction callHook(vnode) {\n\t\tvar original = vnode.state\n\t\ttry {\n\t\t\treturn this.apply(original, arguments)\n\t\t} finally {\n\t\t\tcheckState(vnode, original)\n\t\t}\n\t}\n\n\t// IE11 (at least) throws an UnspecifiedError when accessing document.activeElement when\n\t// inside an iframe. Catch and swallow this error, and heavy-handidly return null.\n\tfunction activeElement() {\n\t\ttry {\n\t\t\treturn $doc.activeElement\n\t\t} catch (e) {\n\t\t\treturn null\n\t\t}\n\t}\n\t//create\n\tfunction createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) {\n\t\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t}\n\tfunction createNode(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tif (typeof tag === \"string\") {\n\t\t\tvnode.state = {}\n\t\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\t\tswitch (tag) {\n\t\t\t\tcase \"#\": createText(parent, vnode, nextSibling); break\n\t\t\t\tcase \"<\": createHTML(parent, vnode, ns, nextSibling); break\n\t\t\t\tcase \"[\": createFragment(parent, vnode, hooks, ns, nextSibling); break\n\t\t\t\tdefault: createElement(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t\telse createComponent(parent, vnode, hooks, ns, nextSibling)\n\t}\n\tfunction createText(parent, vnode, nextSibling) {\n\t\tvnode.dom = $doc.createTextNode(vnode.children)\n\t\tinsertNode(parent, vnode.dom, nextSibling)\n\t}\n\tvar possibleParents = {caption: \"table\", thead: \"table\", tbody: \"table\", tfoot: \"table\", tr: \"tbody\", th: \"tr\", td: \"tr\", colgroup: \"table\", col: \"colgroup\"}\n\tfunction createHTML(parent, vnode, ns, nextSibling) {\n\t\tvar match = vnode.children.match(/^\\s*?<(\\w+)/im) || []\n\t\t// not using the proper parent makes the child element(s) vanish.\n\t\t// var div = document.createElement(\"div\")\n\t\t// div.innerHTML = \"<td>i</td><td>j</td>\"\n\t\t// console.log(div.innerHTML)\n\t\t// --> \"ij\", no <td> in sight.\n\t\tvar temp = $doc.createElement(possibleParents[match[1]] || \"div\")\n\t\tif (ns === \"http://www.w3.org/2000/svg\") {\n\t\t\ttemp.innerHTML = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\" + vnode.children + \"</svg>\"\n\t\t\ttemp = temp.firstChild\n\t\t} else {\n\t\t\ttemp.innerHTML = vnode.children\n\t\t}\n\t\tvnode.dom = temp.firstChild\n\t\tvnode.domSize = temp.childNodes.length\n\t\t// Capture nodes to remove, so we don't confuse them.\n\t\tvnode.instance = []\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tvar child\n\t\twhile (child = temp.firstChild) {\n\t\t\tvnode.instance.push(child)\n\t\t\tfragment.appendChild(child)\n\t\t}\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createFragment(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tif (vnode.children != null) {\n\t\t\tvar children = vnode.children\n\t\t\tcreateNodes(fragment, children, 0, children.length, hooks, null, ns)\n\t\t}\n\t\tvnode.dom = fragment.firstChild\n\t\tvnode.domSize = fragment.childNodes.length\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createElement(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tvar attrs = vnode.attrs\n\t\tvar is = attrs && attrs.is\n\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tvar element = ns ?\n\t\t\tis ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :\n\t\t\tis ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)\n\t\tvnode.dom = element\n\n\t\tif (attrs != null) {\n\t\t\tsetAttrs(vnode, attrs, ns)\n\t\t}\n\n\t\tinsertNode(parent, element, nextSibling)\n\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (vnode.text != null) {\n\t\t\t\tif (vnode.text !== \"\") element.textContent = vnode.text\n\t\t\t\telse vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t}\n\t\t\tif (vnode.children != null) {\n\t\t\t\tvar children = vnode.children\n\t\t\t\tcreateNodes(element, children, 0, children.length, hooks, null, ns)\n\t\t\t\tif (vnode.tag === \"select\" && attrs != null) setLateSelectAttrs(vnode, attrs)\n\t\t\t}\n\t\t}\n\t}\n\tfunction initComponent(vnode, hooks) {\n\t\tvar sentinel\n\t\tif (typeof vnode.tag.view === \"function\") {\n\t\t\tvnode.state = Object.create(vnode.tag)\n\t\t\tsentinel = vnode.state.view\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t} else {\n\t\t\tvnode.state = void 0\n\t\t\tsentinel = vnode.tag\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t\tvnode.state = (vnode.tag.prototype != null && typeof vnode.tag.prototype.view === \"function\") ? new vnode.tag(vnode) : vnode.tag(vnode)\n\t\t}\n\t\tinitLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tsentinel.$$reentrantLock$$ = null\n\t}\n\tfunction createComponent(parent, vnode, hooks, ns, nextSibling) {\n\t\tinitComponent(vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tcreateNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0\n\t\t}\n\t\telse {\n\t\t\tvnode.domSize = 0\n\t\t}\n\t}\n\n\t//update\n\t/**\n\t * @param {Element|Fragment} parent - the parent element\n\t * @param {Vnode[] | null} old - the list of vnodes of the last `render()` call for\n\t * this part of the tree\n\t * @param {Vnode[] | null} vnodes - as above, but for the current `render()` call.\n\t * @param {Function[]} hooks - an accumulator of post-render hooks (oncreate/onupdate)\n\t * @param {Element | null} nextSibling - the next DOM node if we're dealing with a\n\t * fragment that is not the last item in its\n\t * parent\n\t * @param {'svg' | 'math' | String | null} ns) - the current XML namespace, if any\n\t * @returns void\n\t */\n\t// This function diffs and patches lists of vnodes, both keyed and unkeyed.\n\t//\n\t// We will:\n\t//\n\t// 1. describe its general structure\n\t// 2. focus on the diff algorithm optimizations\n\t// 3. discuss DOM node operations.\n\n\t// ## Overview:\n\t//\n\t// The updateNodes() function:\n\t// - deals with trivial cases\n\t// - determines whether the lists are keyed or unkeyed based on the first non-null node\n\t// of each list.\n\t// - diffs them and patches the DOM if needed (that's the brunt of the code)\n\t// - manages the leftovers: after diffing, are there:\n\t// - old nodes left to remove?\n\t// \t - new nodes to insert?\n\t// \t deal with them!\n\t//\n\t// The lists are only iterated over once, with an exception for the nodes in `old` that\n\t// are visited in the fourth part of the diff and in the `removeNodes` loop.\n\n\t// ## Diffing\n\t//\n\t// Reading https://github.com/localvoid/ivi/blob/ddc09d06abaef45248e6133f7040d00d3c6be853/packages/ivi/src/vdom/implementation.ts#L617-L837\n\t// may be good for context on longest increasing subsequence-based logic for moving nodes.\n\t//\n\t// In order to diff keyed lists, one has to\n\t//\n\t// 1) match nodes in both lists, per key, and update them accordingly\n\t// 2) create the nodes present in the new list, but absent in the old one\n\t// 3) remove the nodes present in the old list, but absent in the new one\n\t// 4) figure out what nodes in 1) to move in order to minimize the DOM operations.\n\t//\n\t// To achieve 1) one can create a dictionary of keys => index (for the old list), then iterate\n\t// over the new list and for each new vnode, find the corresponding vnode in the old list using\n\t// the map.\n\t// 2) is achieved in the same step: if a new node has no corresponding entry in the map, it is new\n\t// and must be created.\n\t// For the removals, we actually remove the nodes that have been updated from the old list.\n\t// The nodes that remain in that list after 1) and 2) have been performed can be safely removed.\n\t// The fourth step is a bit more complex and relies on the longest increasing subsequence (LIS)\n\t// algorithm.\n\t//\n\t// the longest increasing subsequence is the list of nodes that can remain in place. Imagine going\n\t// from `1,2,3,4,5` to `4,5,1,2,3` where the numbers are not necessarily the keys, but the indices\n\t// corresponding to the keyed nodes in the old list (keyed nodes `e,d,c,b,a` => `b,a,e,d,c` would\n\t// match the above lists, for example).\n\t//\n\t// In there are two increasing subsequences: `4,5` and `1,2,3`, the latter being the longest. We\n\t// can update those nodes without moving them, and only call `insertNode` on `4` and `5`.\n\t//\n\t// @localvoid adapted the algo to also support node deletions and insertions (the `lis` is actually\n\t// the longest increasing subsequence *of old nodes still present in the new list*).\n\t//\n\t// It is a general algorithm that is fireproof in all circumstances, but it requires the allocation\n\t// and the construction of a `key => oldIndex` map, and three arrays (one with `newIndex => oldIndex`,\n\t// the `LIS` and a temporary one to create the LIS).\n\t//\n\t// So we cheat where we can: if the tails of the lists are identical, they are guaranteed to be part of\n\t// the LIS and can be updated without moving them.\n\t//\n\t// If two nodes are swapped, they are guaranteed not to be part of the LIS, and must be moved (with\n\t// the exception of the last node if the list is fully reversed).\n\t//\n\t// ## Finding the next sibling.\n\t//\n\t// `updateNode()` and `createNode()` expect a nextSibling parameter to perform DOM operations.\n\t// When the list is being traversed top-down, at any index, the DOM nodes up to the previous\n\t// vnode reflect the content of the new list, whereas the rest of the DOM nodes reflect the old\n\t// list. The next sibling must be looked for in the old list using `getNextSibling(... oldStart + 1 ...)`.\n\t//\n\t// In the other scenarios (swaps, upwards traversal, map-based diff),\n\t// the new vnodes list is traversed upwards. The DOM nodes at the bottom of the list reflect the\n\t// bottom part of the new vnodes list, and we can use the `v.dom` value of the previous node\n\t// as the next sibling (cached in the `nextSibling` variable).\n\n\n\t// ## DOM node moves\n\t//\n\t// In most scenarios `updateNode()` and `createNode()` perform the DOM operations. However,\n\t// this is not the case if the node moved (second and fourth part of the diff algo). We move\n\t// the old DOM nodes before updateNode runs because it enables us to use the cached `nextSibling`\n\t// variable rather than fetching it using `getNextSibling()`.\n\t//\n\t// The fourth part of the diff currently inserts nodes unconditionally, leading to issues\n\t// like #1791 and #1999. We need to be smarter about those situations where adjascent old\n\t// nodes remain together in the new list in a way that isn't covered by parts one and\n\t// three of the diff algo.\n\n\tfunction updateNodes(parent, old, vnodes, hooks, nextSibling, ns) {\n\t\tif (old === vnodes || old == null && vnodes == null) return\n\t\telse if (old == null || old.length === 0) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, ns)\n\t\telse if (vnodes == null || vnodes.length === 0) removeNodes(parent, old, 0, old.length)\n\t\telse {\n\t\t\tvar isOldKeyed = old[0] != null && old[0].key != null\n\t\t\tvar isKeyed = vnodes[0] != null && vnodes[0].key != null\n\t\t\tvar start = 0, oldStart = 0\n\t\t\tif (!isOldKeyed) while (oldStart < old.length && old[oldStart] == null) oldStart++\n\t\t\tif (!isKeyed) while (start < vnodes.length && vnodes[start] == null) start++\n\t\t\tif (isKeyed === null && isOldKeyed == null) return // both lists are full of nulls\n\t\t\tif (isOldKeyed !== isKeyed) {\n\t\t\t\tremoveNodes(parent, old, oldStart, old.length)\n\t\t\t\tcreateNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else if (!isKeyed) {\n\t\t\t\t// Don't index past the end of either list (causes deopts).\n\t\t\t\tvar commonLength = old.length < vnodes.length ? old.length : vnodes.length\n\t\t\t\t// Rewind if necessary to the first non-null index on either side.\n\t\t\t\t// We could alternatively either explicitly create or remove nodes when `start !== oldStart`\n\t\t\t\t// but that would be optimizing for sparse lists which are more rare than dense ones.\n\t\t\t\tstart = start < oldStart ? start : oldStart\n\t\t\t\tfor (; start < commonLength; start++) {\n\t\t\t\t\to = old[start]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o === v || o == null && v == null) continue\n\t\t\t\t\telse if (o == null) createNode(parent, v, hooks, ns, getNextSibling(old, start + 1, nextSibling))\n\t\t\t\t\telse if (v == null) removeNode(parent, o)\n\t\t\t\t\telse updateNode(parent, o, v, hooks, getNextSibling(old, start + 1, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\tif (old.length > commonLength) removeNodes(parent, old, start, old.length)\n\t\t\t\tif (vnodes.length > commonLength) createNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else {\n\t\t\t\t// keyed diff\n\t\t\t\tvar oldEnd = old.length - 1, end = vnodes.length - 1, map, o, v, oe, ve, topSibling\n\n\t\t\t\t// bottom-up\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t}\n\t\t\t\t// top-down\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o.key !== v.key) break\n\t\t\t\t\toldStart++, start++\n\t\t\t\t\tif (o !== v) updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\t// swaps and list reversals\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (start === end) break\n\t\t\t\t\tif (o.key !== ve.key || oe.key !== v.key) break\n\t\t\t\t\ttopSibling = getNextSibling(old, oldStart, nextSibling)\n\t\t\t\t\tmoveNodes(parent, oe, topSibling)\n\t\t\t\t\tif (oe !== v) updateNode(parent, oe, v, hooks, topSibling, ns)\n\t\t\t\t\tif (++start <= --end) moveNodes(parent, o, nextSibling)\n\t\t\t\t\tif (o !== ve) updateNode(parent, o, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldStart++; oldEnd--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t}\n\t\t\t\t// bottom up once again\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t}\n\t\t\t\tif (start > end) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\telse if (oldStart > oldEnd) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\telse {\n\t\t\t\t\t// inspired by ivi https://github.com/ivijs/ivi/ by Boris Kaul\n\t\t\t\t\tvar originalNextSibling = nextSibling, vnodesLength = end - start + 1, oldIndices = new Array(vnodesLength), li=0, i=0, pos = 2147483647, matched = 0, map, lisIndices\n\t\t\t\t\tfor (i = 0; i < vnodesLength; i++) oldIndices[i] = -1\n\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\tif (map == null) map = getKeyMap(old, oldStart, oldEnd + 1)\n\t\t\t\t\t\tve = vnodes[i]\n\t\t\t\t\t\tvar oldIndex = map[ve.key]\n\t\t\t\t\t\tif (oldIndex != null) {\n\t\t\t\t\t\t\tpos = (oldIndex < pos) ? oldIndex : -1 // becomes -1 if nodes were re-ordered\n\t\t\t\t\t\t\toldIndices[i-start] = oldIndex\n\t\t\t\t\t\t\toe = old[oldIndex]\n\t\t\t\t\t\t\told[oldIndex] = null\n\t\t\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\t\t\tmatched++\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnextSibling = originalNextSibling\n\t\t\t\t\tif (matched !== oldEnd - oldStart + 1) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\t\tif (matched === 0) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (pos === -1) {\n\t\t\t\t\t\t\t// the indices of the indices of the items that are part of the\n\t\t\t\t\t\t\t// longest increasing subsequence in the oldIndices list\n\t\t\t\t\t\t\tlisIndices = makeLisIndices(oldIndices)\n\t\t\t\t\t\t\tli = lisIndices.length - 1\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tif (lisIndices[li] === i - start) li--\n\t\t\t\t\t\t\t\t\telse moveNodes(parent, v, nextSibling)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateNode(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvar oldTag = old.tag, tag = vnode.tag\n\t\tif (oldTag === tag) {\n\t\t\tvnode.state = old.state\n\t\t\tvnode.events = old.events\n\t\t\tif (shouldNotUpdate(vnode, old)) return\n\t\t\tif (typeof oldTag === \"string\") {\n\t\t\t\tif (vnode.attrs != null) {\n\t\t\t\t\tupdateLifecycle(vnode.attrs, vnode, hooks)\n\t\t\t\t}\n\t\t\t\tswitch (oldTag) {\n\t\t\t\t\tcase \"#\": updateText(old, vnode); break\n\t\t\t\t\tcase \"<\": updateHTML(parent, old, vnode, ns, nextSibling); break\n\t\t\t\t\tcase \"[\": updateFragment(parent, old, vnode, hooks, nextSibling, ns); break\n\t\t\t\t\tdefault: updateElement(old, vnode, hooks, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t\telse updateComponent(parent, old, vnode, hooks, nextSibling, ns)\n\t\t}\n\t\telse {\n\t\t\tremoveNode(parent, old)\n\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t}\n\t}\n\tfunction updateText(old, vnode) {\n\t\tif (old.children.toString() !== vnode.children.toString()) {\n\t\t\told.dom.nodeValue = vnode.children\n\t\t}\n\t\tvnode.dom = old.dom\n\t}\n\tfunction updateHTML(parent, old, vnode, ns, nextSibling) {\n\t\tif (old.children !== vnode.children) {\n\t\t\tremoveHTML(parent, old)\n\t\t\tcreateHTML(parent, vnode, ns, nextSibling)\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t\tvnode.instance = old.instance\n\t\t}\n\t}\n\tfunction updateFragment(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tupdateNodes(parent, old.children, vnode.children, hooks, nextSibling, ns)\n\t\tvar domSize = 0, children = vnode.children\n\t\tvnode.dom = null\n\t\tif (children != null) {\n\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\tvar child = children[i]\n\t\t\t\tif (child != null && child.dom != null) {\n\t\t\t\t\tif (vnode.dom == null) vnode.dom = child.dom\n\t\t\t\t\tdomSize += child.domSize || 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (domSize !== 1) vnode.domSize = domSize\n\t\t}\n\t}\n\tfunction updateElement(old, vnode, hooks, ns) {\n\t\tvar element = vnode.dom = old.dom\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tif (vnode.tag === \"textarea\") {\n\t\t\tif (vnode.attrs == null) vnode.attrs = {}\n\t\t\tif (vnode.text != null) {\n\t\t\t\tvnode.attrs.value = vnode.text //FIXME handle multiple children\n\t\t\t\tvnode.text = undefined\n\t\t\t}\n\t\t}\n\t\tupdateAttrs(vnode, old.attrs, vnode.attrs, ns)\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (old.text != null && vnode.text != null && vnode.text !== \"\") {\n\t\t\t\tif (old.text.toString() !== vnode.text.toString()) old.dom.firstChild.nodeValue = vnode.text\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (old.text != null) old.children = [Vnode(\"#\", undefined, undefined, old.text, undefined, old.dom.firstChild)]\n\t\t\t\tif (vnode.text != null) vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t\tupdateNodes(element, old.children, vnode.children, hooks, null, ns)\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateComponent(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tupdateLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) updateLifecycle(vnode.attrs, vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tif (old.instance == null) createNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\telse updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, ns)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.instance.domSize\n\t\t}\n\t\telse if (old.instance != null) {\n\t\t\tremoveNode(parent, old.instance)\n\t\t\tvnode.dom = undefined\n\t\t\tvnode.domSize = 0\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t}\n\t}\n\tfunction getKeyMap(vnodes, start, end) {\n\t\tvar map = Object.create(null)\n\t\tfor (; start < end; start++) {\n\t\t\tvar vnode = vnodes[start]\n\t\t\tif (vnode != null) {\n\t\t\t\tvar key = vnode.key\n\t\t\t\tif (key != null) map[key] = start\n\t\t\t}\n\t\t}\n\t\treturn map\n\t}\n\t// Lifted from ivi https://github.com/ivijs/ivi/\n\t// takes a list of unique numbers (-1 is special and can\n\t// occur multiple times) and returns an array with the indices\n\t// of the items that are part of the longest increasing\n\t// subsequece\n\tvar lisTemp = []\n\tfunction makeLisIndices(a) {\n\t\tvar result = [0]\n\t\tvar u = 0, v = 0, i = 0\n\t\tvar il = lisTemp.length = a.length\n\t\tfor (var i = 0; i < il; i++) lisTemp[i] = a[i]\n\t\tfor (var i = 0; i < il; ++i) {\n\t\t\tif (a[i] === -1) continue\n\t\t\tvar j = result[result.length - 1]\n\t\t\tif (a[j] < a[i]) {\n\t\t\t\tlisTemp[i] = j\n\t\t\t\tresult.push(i)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tu = 0\n\t\t\tv = result.length - 1\n\t\t\twhile (u < v) {\n\t\t\t\t// Fast integer average without overflow.\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tvar c = (u >>> 1) + (v >>> 1) + (u & v & 1)\n\t\t\t\tif (a[result[c]] < a[i]) {\n\t\t\t\t\tu = c + 1\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tv = c\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (a[i] < a[result[u]]) {\n\t\t\t\tif (u > 0) lisTemp[i] = result[u - 1]\n\t\t\t\tresult[u] = i\n\t\t\t}\n\t\t}\n\t\tu = result.length\n\t\tv = result[u - 1]\n\t\twhile (u-- > 0) {\n\t\t\tresult[u] = v\n\t\t\tv = lisTemp[v]\n\t\t}\n\t\tlisTemp.length = 0\n\t\treturn result\n\t}\n\n\tfunction getNextSibling(vnodes, i, nextSibling) {\n\t\tfor (; i < vnodes.length; i++) {\n\t\t\tif (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom\n\t\t}\n\t\treturn nextSibling\n\t}\n\n\t// This covers a really specific edge case:\n\t// - Parent node is keyed and contains child\n\t// - Child is removed, returns unresolved promise in `onbeforeremove`\n\t// - Parent node is moved in keyed diff\n\t// - Remaining children still need moved appropriately\n\t//\n\t// Ideally, I'd track removed nodes as well, but that introduces a lot more\n\t// complexity and I'm not exactly interested in doing that.\n\tfunction moveNodes(parent, vnode, nextSibling) {\n\t\tvar frag = $doc.createDocumentFragment()\n\t\tmoveChildToFrag(parent, frag, vnode)\n\t\tinsertNode(parent, frag, nextSibling)\n\t}\n\tfunction moveChildToFrag(parent, frag, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\t\t\tfrag.appendChild(vnode.instance[i])\n\t\t\t\t}\n\t\t\t} else if (vnode.tag !== \"[\") {\n\t\t\t\t// Don't recurse for text nodes *or* elements, just fragments\n\t\t\t\tfrag.appendChild(vnode.dom)\n\t\t\t} else if (vnode.children.length === 1) {\n\t\t\t\tvnode = vnode.children[0]\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else {\n\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\tif (child != null) moveChildToFrag(parent, frag, child)\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\n\tfunction insertNode(parent, dom, nextSibling) {\n\t\tif (nextSibling != null) parent.insertBefore(dom, nextSibling)\n\t\telse parent.appendChild(dom)\n\t}\n\n\tfunction maybeSetContentEditable(vnode) {\n\t\tif (vnode.attrs == null || (\n\t\t\tvnode.attrs.contenteditable == null && // attribute\n\t\t\tvnode.attrs.contentEditable == null // property\n\t\t)) return false\n\t\tvar children = vnode.children\n\t\tif (children != null && children.length === 1 && children[0].tag === \"<\") {\n\t\t\tvar content = children[0].children\n\t\t\tif (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content\n\t\t}\n\t\telse if (vnode.text != null || children != null && children.length !== 0) throw new Error(\"Child node of a contenteditable must be trusted\")\n\t\treturn true\n\t}\n\n\t//remove\n\tfunction removeNodes(parent, vnodes, start, end) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) removeNode(parent, vnode)\n\t\t}\n\t}\n\tfunction removeNode(parent, vnode) {\n\t\tvar mask = 0\n\t\tvar original = vnode.state\n\t\tvar stateResult, attrsResult\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.state.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\tmask = 1\n\t\t\t\tstateResult = result\n\t\t\t}\n\t\t}\n\t\tif (vnode.attrs && typeof vnode.attrs.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.attrs.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tmask |= 2\n\t\t\t\tattrsResult = result\n\t\t\t}\n\t\t}\n\t\tcheckState(vnode, original)\n\n\t\t// If we can, try to fast-path it and avoid all the overhead of awaiting\n\t\tif (!mask) {\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t} else {\n\t\t\tif (stateResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 1) { mask &= 2; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tstateResult.then(next, next)\n\t\t\t}\n\t\t\tif (attrsResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 2) { mask &= 1; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tattrsResult.then(next, next)\n\t\t\t}\n\t\t}\n\n\t\tfunction reallyRemove() {\n\t\t\tcheckState(vnode, original)\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t}\n\t}\n\tfunction removeHTML(parent, vnode) {\n\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\tparent.removeChild(vnode.instance[i])\n\t\t}\n\t}\n\tfunction removeChild(parent, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tremoveHTML(parent, vnode)\n\t\t\t} else {\n\t\t\t\tif (vnode.tag !== \"[\") {\n\t\t\t\t\tparent.removeChild(vnode.dom)\n\t\t\t\t\tif (!Array.isArray(vnode.children)) break\n\t\t\t\t}\n\t\t\t\tif (vnode.children.length === 1) {\n\t\t\t\t\tvnode = vnode.children[0]\n\t\t\t\t\tif (vnode != null) continue\n\t\t\t\t} else {\n\t\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\t\tif (child != null) removeChild(parent, child)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\tfunction onremove(vnode) {\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onremove === \"function\") callHook.call(vnode.state.onremove, vnode)\n\t\tif (vnode.attrs && typeof vnode.attrs.onremove === \"function\") callHook.call(vnode.attrs.onremove, vnode)\n\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\tif (vnode.instance != null) onremove(vnode.instance)\n\t\t} else {\n\t\t\tvar children = vnode.children\n\t\t\tif (Array.isArray(children)) {\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\tvar child = children[i]\n\t\t\t\t\tif (child != null) onremove(child)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t//attrs\n\tfunction setAttrs(vnode, attrs, ns) {\n\t\tfor (var key in attrs) {\n\t\t\tsetAttr(vnode, key, null, attrs[key], ns)\n\t\t}\n\t}\n\tfunction setAttr(vnode, key, old, value, ns) {\n\t\tif (key === \"key\" || key === \"is\" || value == null || isLifecycleMethod(key) || (old === value && !isFormAttribute(vnode, key)) && typeof value !== \"object\") return\n\t\tif (key[0] === \"o\" && key[1] === \"n\") return updateEvent(vnode, key, value)\n\t\tif (key.slice(0, 6) === \"xlink:\") vnode.dom.setAttributeNS(\"http://www.w3.org/1999/xlink\", key.slice(6), value)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, value)\n\t\telse if (hasPropertyKey(vnode, key, ns)) {\n\t\t\tif (key === \"value\") {\n\t\t\t\t// Only do the coercion if we're actually going to check the value.\n\t\t\t\t/* eslint-disable no-implicit-coercion */\n\t\t\t\t//setting input[value] to same value by typing on focused element moves cursor to end in Chrome\n\t\t\t\tif ((vnode.tag === \"input\" || vnode.tag === \"textarea\") && vnode.dom.value === \"\" + value && vnode.dom === activeElement()) return\n\t\t\t\t//setting select[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"select\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t//setting option[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"option\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t/* eslint-enable no-implicit-coercion */\n\t\t\t}\n\t\t\t// If you assign an input type that is not supported by IE 11 with an assignment expression, an error will occur.\n\t\t\tif (vnode.tag === \"input\" && key === \"type\") vnode.dom.setAttribute(key, value)\n\t\t\telse vnode.dom[key] = value\n\t\t} else {\n\t\t\tif (typeof value === \"boolean\") {\n\t\t\t\tif (value) vnode.dom.setAttribute(key, \"\")\n\t\t\t\telse vnode.dom.removeAttribute(key)\n\t\t\t}\n\t\t\telse vnode.dom.setAttribute(key === \"className\" ? \"class\" : key, value)\n\t\t}\n\t}\n\tfunction removeAttr(vnode, key, old, ns) {\n\t\tif (key === \"key\" || key === \"is\" || old == null || isLifecycleMethod(key)) return\n\t\tif (key[0] === \"o\" && key[1] === \"n\" && !isLifecycleMethod(key)) updateEvent(vnode, key, undefined)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, null)\n\t\telse if (\n\t\t\thasPropertyKey(vnode, key, ns)\n\t\t\t&& key !== \"className\"\n\t\t\t&& !(key === \"value\" && (\n\t\t\t\tvnode.tag === \"option\"\n\t\t\t\t|| vnode.tag === \"select\" && vnode.dom.selectedIndex === -1 && vnode.dom === activeElement()\n\t\t\t))\n\t\t\t&& !(vnode.tag === \"input\" && key === \"type\")\n\t\t) {\n\t\t\tvnode.dom[key] = null\n\t\t} else {\n\t\t\tvar nsLastIndex = key.indexOf(\":\")\n\t\t\tif (nsLastIndex !== -1) key = key.slice(nsLastIndex + 1)\n\t\t\tif (old !== false) vnode.dom.removeAttribute(key === \"className\" ? \"class\" : key)\n\t\t}\n\t}\n\tfunction setLateSelectAttrs(vnode, attrs) {\n\t\tif (\"value\" in attrs) {\n\t\t\tif(attrs.value === null) {\n\t\t\t\tif (vnode.dom.selectedIndex !== -1) vnode.dom.value = null\n\t\t\t} else {\n\t\t\t\tvar normalized = \"\" + attrs.value // eslint-disable-line no-implicit-coercion\n\t\t\t\tif (vnode.dom.value !== normalized || vnode.dom.selectedIndex === -1) {\n\t\t\t\t\tvnode.dom.value = normalized\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (\"selectedIndex\" in attrs) setAttr(vnode, \"selectedIndex\", null, attrs.selectedIndex, undefined)\n\t}\n\tfunction updateAttrs(vnode, old, attrs, ns) {\n\t\tif (attrs != null) {\n\t\t\tfor (var key in attrs) {\n\t\t\t\tsetAttr(vnode, key, old && old[key], attrs[key], ns)\n\t\t\t}\n\t\t}\n\t\tvar val\n\t\tif (old != null) {\n\t\t\tfor (var key in old) {\n\t\t\t\tif (((val = old[key]) != null) && (attrs == null || attrs[key] == null)) {\n\t\t\t\t\tremoveAttr(vnode, key, val, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction isFormAttribute(vnode, attr) {\n\t\treturn attr === \"value\" || attr === \"checked\" || attr === \"selectedIndex\" || attr === \"selected\" && vnode.dom === activeElement() || vnode.tag === \"option\" && vnode.dom.parentNode === $doc.activeElement\n\t}\n\tfunction isLifecycleMethod(attr) {\n\t\treturn attr === \"oninit\" || attr === \"oncreate\" || attr === \"onupdate\" || attr === \"onremove\" || attr === \"onbeforeremove\" || attr === \"onbeforeupdate\"\n\t}\n\tfunction hasPropertyKey(vnode, key, ns) {\n\t\t// Filter out namespaced keys\n\t\treturn ns === undefined && (\n\t\t\t// If it's a custom element, just keep it.\n\t\t\tvnode.tag.indexOf(\"-\") > -1 || vnode.attrs != null && vnode.attrs.is ||\n\t\t\t// If it's a normal element, let's try to avoid a few browser bugs.\n\t\t\tkey !== \"href\" && key !== \"list\" && key !== \"form\" && key !== \"width\" && key !== \"height\"// && key !== \"type\"\n\t\t\t// Defer the property check until *after* we check everything.\n\t\t) && key in vnode.dom\n\t}\n\n\t//style\n\tvar uppercaseRegex = /[A-Z]/g\n\tfunction toLowerCase(capital) { return \"-\" + capital.toLowerCase() }\n\tfunction normalizeKey(key) {\n\t\treturn key[0] === \"-\" && key[1] === \"-\" ? key :\n\t\t\tkey === \"cssFloat\" ? \"float\" :\n\t\t\t\tkey.replace(uppercaseRegex, toLowerCase)\n\t}\n\tfunction updateStyle(element, old, style) {\n\t\tif (old === style) {\n\t\t\t// Styles are equivalent, do nothing.\n\t\t} else if (style == null) {\n\t\t\t// New style is missing, just clear it.\n\t\t\telement.style.cssText = \"\"\n\t\t} else if (typeof style !== \"object\") {\n\t\t\t// New style is a string, let engine deal with patching.\n\t\t\telement.style.cssText = style\n\t\t} else if (old == null || typeof old !== \"object\") {\n\t\t\t// `old` is missing or a string, `style` is an object.\n\t\t\telement.style.cssText = \"\"\n\t\t\t// Add new style properties\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null) element.style.setProperty(normalizeKey(key), String(value))\n\t\t\t}\n\t\t} else {\n\t\t\t// Both old & new are (different) objects.\n\t\t\t// Update style properties that have changed\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null && (value = String(value)) !== String(old[key])) {\n\t\t\t\t\telement.style.setProperty(normalizeKey(key), value)\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Remove style properties that no longer exist\n\t\t\tfor (var key in old) {\n\t\t\t\tif (old[key] != null && style[key] == null) {\n\t\t\t\t\telement.style.removeProperty(normalizeKey(key))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Here's an explanation of how this works:\n\t// 1. The event names are always (by design) prefixed by `on`.\n\t// 2. The EventListener interface accepts either a function or an object\n\t// with a `handleEvent` method.\n\t// 3. The object does not inherit from `Object.prototype`, to avoid\n\t// any potential interference with that (e.g. setters).\n\t// 4. The event name is remapped to the handler before calling it.\n\t// 5. In function-based event handlers, `ev.target === this`. We replicate\n\t// that below.\n\t// 6. In function-based event handlers, `return false` prevents the default\n\t// action and stops event propagation. We replicate that below.\n\tfunction EventDict() {\n\t\t// Save this, so the current redraw is correctly tracked.\n\t\tthis._ = currentRedraw\n\t}\n\tEventDict.prototype = Object.create(null)\n\tEventDict.prototype.handleEvent = function (ev) {\n\t\tvar handler = this[\"on\" + ev.type]\n\t\tvar result\n\t\tif (typeof handler === \"function\") result = handler.call(ev.currentTarget, ev)\n\t\telse if (typeof handler.handleEvent === \"function\") handler.handleEvent(ev)\n\t\tif (this._ && ev.redraw !== false) (0, this._)()\n\t\tif (result === false) {\n\t\t\tev.preventDefault()\n\t\t\tev.stopPropagation()\n\t\t}\n\t}\n\n\t//event\n\tfunction updateEvent(vnode, key, value) {\n\t\tif (vnode.events != null) {\n\t\t\tif (vnode.events[key] === value) return\n\t\t\tif (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\t\tif (vnode.events[key] == null) vnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = value\n\t\t\t} else {\n\t\t\t\tif (vnode.events[key] != null) vnode.dom.removeEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = undefined\n\t\t\t}\n\t\t} else if (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\tvnode.events = new EventDict()\n\t\t\tvnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\tvnode.events[key] = value\n\t\t}\n\t}\n\n\t//lifecycle\n\tfunction initLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.oninit === \"function\") callHook.call(source.oninit, vnode)\n\t\tif (typeof source.oncreate === \"function\") hooks.push(callHook.bind(source.oncreate, vnode))\n\t}\n\tfunction updateLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.onupdate === \"function\") hooks.push(callHook.bind(source.onupdate, vnode))\n\t}\n\tfunction shouldNotUpdate(vnode, old) {\n\t\tdo {\n\t\t\tif (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.attrs.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.state.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\treturn false\n\t\t} while (false); // eslint-disable-line no-constant-condition\n\t\tvnode.dom = old.dom\n\t\tvnode.domSize = old.domSize\n\t\tvnode.instance = old.instance\n\t\t// One would think having the actual latest attributes would be ideal,\n\t\t// but it doesn't let us properly diff based on our current internal\n\t\t// representation. We have to save not only the old DOM info, but also\n\t\t// the attributes used to create it, as we diff *that*, not against the\n\t\t// DOM directly (with a few exceptions in `setAttr`). And, of course, we\n\t\t// need to save the children and text as they are conceptually not\n\t\t// unlike special \"attributes\" internally.\n\t\tvnode.attrs = old.attrs\n\t\tvnode.children = old.children\n\t\tvnode.text = old.text\n\t\treturn true\n\t}\n\n\treturn function(dom, vnodes, redraw) {\n\t\tif (!dom) throw new TypeError(\"Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.\")\n\t\tvar hooks = []\n\t\tvar active = activeElement()\n\t\tvar namespace = dom.namespaceURI\n\n\t\t// First time rendering into a node clears it out\n\t\tif (dom.vnodes == null) dom.textContent = \"\"\n\n\t\tvnodes = Vnode.normalizeChildren(Array.isArray(vnodes) ? vnodes : [vnodes])\n\t\tvar prevRedraw = currentRedraw\n\t\ttry {\n\t\t\tcurrentRedraw = typeof redraw === \"function\" ? redraw : undefined\n\t\t\tupdateNodes(dom, dom.vnodes, vnodes, hooks, null, namespace === \"http://www.w3.org/1999/xhtml\" ? undefined : namespace)\n\t\t} finally {\n\t\t\tcurrentRedraw = prevRedraw\n\t\t}\n\t\tdom.vnodes = vnodes\n\t\t// `document.activeElement` can return null: https://html.spec.whatwg.org/multipage/interaction.html#dom-document-activeelement\n\t\tif (active != null && activeElement() !== active && typeof active.focus === \"function\") active.focus()\n\t\tfor (var i = 0; i < hooks.length; i++) hooks[i]()\n\t}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(render, schedule, console) {\n\tvar subscriptions = []\n\tvar rendering = false\n\tvar pending = false\n\n\tfunction sync() {\n\t\tif (rendering) throw new Error(\"Nested m.redraw.sync() call\")\n\t\trendering = true\n\t\tfor (var i = 0; i < subscriptions.length; i += 2) {\n\t\t\ttry { render(subscriptions[i], Vnode(subscriptions[i + 1]), redraw) }\n\t\t\tcatch (e) { console.error(e) }\n\t\t}\n\t\trendering = false\n\t}\n\n\tfunction redraw() {\n\t\tif (!pending) {\n\t\t\tpending = true\n\t\t\tschedule(function() {\n\t\t\t\tpending = false\n\t\t\t\tsync()\n\t\t\t})\n\t\t}\n\t}\n\n\tredraw.sync = sync\n\n\tfunction mount(root, component) {\n\t\tif (component != null && component.view == null && typeof component !== \"function\") {\n\t\t\tthrow new TypeError(\"m.mount(element, component) expects a component, not a vnode\")\n\t\t}\n\n\t\tvar index = subscriptions.indexOf(root)\n\t\tif (index >= 0) {\n\t\t\tsubscriptions.splice(index, 2)\n\t\t\trender(root, [], redraw)\n\t\t}\n\n\t\tif (component != null) {\n\t\t\tsubscriptions.push(root, component)\n\t\t\trender(root, Vnode(component), redraw)\n\t\t}\n\t}\n\n\treturn {mount: mount, redraw: redraw}\n}\n","\"use strict\"\n\nvar buildPathname = require(\"../pathname/build\")\n\nmodule.exports = function($window, Promise, oncompletion) {\n\tvar callbackCount = 0\n\n\tfunction PromiseProxy(executor) {\n\t\treturn new Promise(executor)\n\t}\n\n\t// In case the global Promise is some userland library's where they rely on\n\t// `foo instanceof this.constructor`, `this.constructor.resolve(value)`, or\n\t// similar. Let's *not* break them.\n\tPromiseProxy.prototype = Promise.prototype\n\tPromiseProxy.__proto__ = Promise // eslint-disable-line no-proto\n\n\tfunction makeRequest(factory) {\n\t\treturn function(url, args) {\n\t\t\tif (typeof url !== \"string\") { args = url; url = url.url }\n\t\t\telse if (args == null) args = {}\n\t\t\tvar promise = new Promise(function(resolve, reject) {\n\t\t\t\tfactory(buildPathname(url, args.params), args, function (data) {\n\t\t\t\t\tif (typeof args.type === \"function\") {\n\t\t\t\t\t\tif (Array.isArray(data)) {\n\t\t\t\t\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tdata[i] = new args.type(data[i])\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse data = new args.type(data)\n\t\t\t\t\t}\n\t\t\t\t\tresolve(data)\n\t\t\t\t}, reject)\n\t\t\t})\n\t\t\tif (args.background === true) return promise\n\t\t\tvar count = 0\n\t\t\tfunction complete() {\n\t\t\t\tif (--count === 0 && typeof oncompletion === \"function\") oncompletion()\n\t\t\t}\n\n\t\t\treturn wrap(promise)\n\n\t\t\tfunction wrap(promise) {\n\t\t\t\tvar then = promise.then\n\t\t\t\t// Set the constructor, so engines know to not await or resolve\n\t\t\t\t// this as a native promise. At the time of writing, this is\n\t\t\t\t// only necessary for V8, but their behavior is the correct\n\t\t\t\t// behavior per spec. See this spec issue for more details:\n\t\t\t\t// https://github.com/tc39/ecma262/issues/1577. Also, see the\n\t\t\t\t// corresponding comment in `request/tests/test-request.js` for\n\t\t\t\t// a bit more background on the issue at hand.\n\t\t\t\tpromise.constructor = PromiseProxy\n\t\t\t\tpromise.then = function() {\n\t\t\t\t\tcount++\n\t\t\t\t\tvar next = then.apply(promise, arguments)\n\t\t\t\t\tnext.then(complete, function(e) {\n\t\t\t\t\t\tcomplete()\n\t\t\t\t\t\tif (count === 0) throw e\n\t\t\t\t\t})\n\t\t\t\t\treturn wrap(next)\n\t\t\t\t}\n\t\t\t\treturn promise\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction hasHeader(args, name) {\n\t\tfor (var key in args.headers) {\n\t\t\tif ({}.hasOwnProperty.call(args.headers, key) && name.test(key)) return true\n\t\t}\n\t\treturn false\n\t}\n\n\treturn {\n\t\trequest: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar method = args.method != null ? args.method.toUpperCase() : \"GET\"\n\t\t\tvar body = args.body\n\t\t\tvar assumeJSON = (args.serialize == null || args.serialize === JSON.serialize) && !(body instanceof $window.FormData)\n\t\t\tvar responseType = args.responseType || (typeof args.extract === \"function\" ? \"\" : \"json\")\n\n\t\t\tvar xhr = new $window.XMLHttpRequest(), aborted = false\n\t\t\tvar original = xhr, replacedAbort\n\t\t\tvar abort = xhr.abort\n\n\t\t\txhr.abort = function() {\n\t\t\t\taborted = true\n\t\t\t\tabort.call(this)\n\t\t\t}\n\n\t\t\txhr.open(method, url, args.async !== false, typeof args.user === \"string\" ? args.user : undefined, typeof args.password === \"string\" ? args.password : undefined)\n\n\t\t\tif (assumeJSON && body != null && !hasHeader(args, /^content-type$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\")\n\t\t\t}\n\t\t\tif (typeof args.deserialize !== \"function\" && !hasHeader(args, /^accept$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Accept\", \"application/json, text/*\")\n\t\t\t}\n\t\t\tif (args.withCredentials) xhr.withCredentials = args.withCredentials\n\t\t\tif (args.timeout) xhr.timeout = args.timeout\n\t\t\txhr.responseType = responseType\n\n\t\t\tfor (var key in args.headers) {\n\t\t\t\tif ({}.hasOwnProperty.call(args.headers, key)) {\n\t\t\t\t\txhr.setRequestHeader(key, args.headers[key])\n\t\t\t\t}\n\t\t\t}\n\n\t\t\txhr.onreadystatechange = function(ev) {\n\t\t\t\t// Don't throw errors on xhr.abort().\n\t\t\t\tif (aborted) return\n\n\t\t\t\tif (ev.target.readyState === 4) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar success = (ev.target.status >= 200 && ev.target.status < 300) || ev.target.status === 304 || (/^file:\\/\\//i).test(url)\n\t\t\t\t\t\t// When the response type isn't \"\" or \"text\",\n\t\t\t\t\t\t// `xhr.responseText` is the wrong thing to use.\n\t\t\t\t\t\t// Browsers do the right thing and throw here, and we\n\t\t\t\t\t\t// should honor that and do the right thing by\n\t\t\t\t\t\t// preferring `xhr.response` where possible/practical.\n\t\t\t\t\t\tvar response = ev.target.response, message\n\n\t\t\t\t\t\tif (responseType === \"json\") {\n\t\t\t\t\t\t\t// For IE and Edge, which don't implement\n\t\t\t\t\t\t\t// `responseType: \"json\"`.\n\t\t\t\t\t\t\tif (!ev.target.responseType && typeof args.extract !== \"function\") response = JSON.parse(ev.target.responseText)\n\t\t\t\t\t\t} else if (!responseType || responseType === \"text\") {\n\t\t\t\t\t\t\t// Only use this default if it's text. If a parsed\n\t\t\t\t\t\t\t// document is needed on old IE and friends (all\n\t\t\t\t\t\t\t// unsupported), the user should use a custom\n\t\t\t\t\t\t\t// `config` instead. They're already using this at\n\t\t\t\t\t\t\t// their own risk.\n\t\t\t\t\t\t\tif (response == null) response = ev.target.responseText\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof args.extract === \"function\") {\n\t\t\t\t\t\t\tresponse = args.extract(ev.target, args)\n\t\t\t\t\t\t\tsuccess = true\n\t\t\t\t\t\t} else if (typeof args.deserialize === \"function\") {\n\t\t\t\t\t\t\tresponse = args.deserialize(response)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (success) resolve(response)\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttry { message = ev.target.responseText }\n\t\t\t\t\t\t\tcatch (e) { message = response }\n\t\t\t\t\t\t\tvar error = new Error(message)\n\t\t\t\t\t\t\terror.code = ev.target.status\n\t\t\t\t\t\t\terror.response = response\n\t\t\t\t\t\t\treject(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\treject(e)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof args.config === \"function\") {\n\t\t\t\txhr = args.config(xhr, args, url) || xhr\n\n\t\t\t\t// Propagate the `abort` to any replacement XHR as well.\n\t\t\t\tif (xhr !== original) {\n\t\t\t\t\treplacedAbort = xhr.abort\n\t\t\t\t\txhr.abort = function() {\n\t\t\t\t\t\taborted = true\n\t\t\t\t\t\treplacedAbort.call(this)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (body == null) xhr.send()\n\t\t\telse if (typeof args.serialize === \"function\") xhr.send(args.serialize(body))\n\t\t\telse if (body instanceof $window.FormData) xhr.send(body)\n\t\t\telse xhr.send(JSON.stringify(body))\n\t\t}),\n\t\tjsonp: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar callbackName = args.callbackName || \"_mithril_\" + Math.round(Math.random() * 1e16) + \"_\" + callbackCount++\n\t\t\tvar script = $window.document.createElement(\"script\")\n\t\t\t$window[callbackName] = function(data) {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\tresolve(data)\n\t\t\t}\n\t\t\tscript.onerror = function() {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\treject(new Error(\"JSONP request failed\"))\n\t\t\t}\n\t\t\tscript.src = url + (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") +\n\t\t\t\tencodeURIComponent(args.callbackKey || \"callback\") + \"=\" +\n\t\t\t\tencodeURIComponent(callbackName)\n\t\t\t$window.document.documentElement.appendChild(script)\n\t\t}),\n\t}\n}\n","\"use strict\"\n\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./api/router\")(window, mountRedraw)\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar m = require(\"../render/hyperscript\")\nvar Promise = require(\"../promise/promise\")\n\nvar buildPathname = require(\"../pathname/build\")\nvar parsePathname = require(\"../pathname/parse\")\nvar compileTemplate = require(\"../pathname/compileTemplate\")\nvar assign = require(\"../pathname/assign\")\n\nvar sentinel = {}\n\nmodule.exports = function($window, mountRedraw) {\n\tvar fireAsync\n\n\tfunction setPath(path, data, options) {\n\t\tpath = buildPathname(path, data)\n\t\tif (fireAsync != null) {\n\t\t\tfireAsync()\n\t\t\tvar state = options ? options.state : null\n\t\t\tvar title = options ? options.title : null\n\t\t\tif (options && options.replace) $window.history.replaceState(state, title, route.prefix + path)\n\t\t\telse $window.history.pushState(state, title, route.prefix + path)\n\t\t}\n\t\telse {\n\t\t\t$window.location.href = route.prefix + path\n\t\t}\n\t}\n\n\tvar currentResolver = sentinel, component, attrs, currentPath, lastUpdate\n\n\tvar SKIP = route.SKIP = {}\n\n\tfunction route(root, defaultRoute, routes) {\n\t\tif (root == null) throw new Error(\"Ensure the DOM element that was passed to `m.route` is not undefined\")\n\t\t// 0 = start\n\t\t// 1 = init\n\t\t// 2 = ready\n\t\tvar state = 0\n\n\t\tvar compiled = Object.keys(routes).map(function(route) {\n\t\t\tif (route[0] !== \"/\") throw new SyntaxError(\"Routes must start with a `/`\")\n\t\t\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(route)) {\n\t\t\t\tthrow new SyntaxError(\"Route parameter names must be separated with either `/`, `.`, or `-`\")\n\t\t\t}\n\t\t\treturn {\n\t\t\t\troute: route,\n\t\t\t\tcomponent: routes[route],\n\t\t\t\tcheck: compileTemplate(route),\n\t\t\t}\n\t\t})\n\t\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\t\tvar p = Promise.resolve()\n\t\tvar scheduled = false\n\t\tvar onremove\n\n\t\tfireAsync = null\n\n\t\tif (defaultRoute != null) {\n\t\t\tvar defaultData = parsePathname(defaultRoute)\n\n\t\t\tif (!compiled.some(function (i) { return i.check(defaultData) })) {\n\t\t\t\tthrow new ReferenceError(\"Default route doesn't match any known routes\")\n\t\t\t}\n\t\t}\n\n\t\tfunction resolveRoute() {\n\t\t\tscheduled = false\n\t\t\t// Consider the pathname holistically. The prefix might even be invalid,\n\t\t\t// but that's not our problem.\n\t\t\tvar prefix = $window.location.hash\n\t\t\tif (route.prefix[0] !== \"#\") {\n\t\t\t\tprefix = $window.location.search + prefix\n\t\t\t\tif (route.prefix[0] !== \"?\") {\n\t\t\t\t\tprefix = $window.location.pathname + prefix\n\t\t\t\t\tif (prefix[0] !== \"/\") prefix = \"/\" + prefix\n\t\t\t\t}\n\t\t\t}\n\t\t\t// This seemingly useless `.concat()` speeds up the tests quite a bit,\n\t\t\t// since the representation is consistently a relatively poorly\n\t\t\t// optimized cons string.\n\t\t\tvar path = prefix.concat()\n\t\t\t\t.replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponent)\n\t\t\t\t.slice(route.prefix.length)\n\t\t\tvar data = parsePathname(path)\n\n\t\t\tassign(data.params, $window.history.state)\n\n\t\t\tfunction fail() {\n\t\t\t\tif (path === defaultRoute) throw new Error(\"Could not resolve default route \" + defaultRoute)\n\t\t\t\tsetPath(defaultRoute, null, {replace: true})\n\t\t\t}\n\n\t\t\tloop(0)\n\t\t\tfunction loop(i) {\n\t\t\t\t// 0 = init\n\t\t\t\t// 1 = scheduled\n\t\t\t\t// 2 = done\n\t\t\t\tfor (; i < compiled.length; i++) {\n\t\t\t\t\tif (compiled[i].check(data)) {\n\t\t\t\t\t\tvar payload = compiled[i].component\n\t\t\t\t\t\tvar matchedRoute = compiled[i].route\n\t\t\t\t\t\tvar localComp = payload\n\t\t\t\t\t\tvar update = lastUpdate = function(comp) {\n\t\t\t\t\t\t\tif (update !== lastUpdate) return\n\t\t\t\t\t\t\tif (comp === SKIP) return loop(i + 1)\n\t\t\t\t\t\t\tcomponent = comp != null && (typeof comp.view === \"function\" || typeof comp === \"function\")? comp : \"div\"\n\t\t\t\t\t\t\tattrs = data.params, currentPath = path, lastUpdate = null\n\t\t\t\t\t\t\tcurrentResolver = payload.render ? payload : null\n\t\t\t\t\t\t\tif (state === 2) mountRedraw.redraw()\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tstate = 2\n\t\t\t\t\t\t\t\tmountRedraw.redraw.sync()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// There's no understating how much I *wish* I could\n\t\t\t\t\t\t// use `async`/`await` here...\n\t\t\t\t\t\tif (payload.view || typeof payload === \"function\") {\n\t\t\t\t\t\t\tpayload = {}\n\t\t\t\t\t\t\tupdate(localComp)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (payload.onmatch) {\n\t\t\t\t\t\t\tp.then(function () {\n\t\t\t\t\t\t\t\treturn payload.onmatch(data.params, path, matchedRoute)\n\t\t\t\t\t\t\t}).then(update, fail)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse update(\"div\")\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfail()\n\t\t\t}\n\t\t}\n\n\t\t// Set it unconditionally so `m.route.set` and `m.route.Link` both work,\n\t\t// even if neither `pushState` nor `hashchange` are supported. It's\n\t\t// cleared if `hashchange` is used, since that makes it automatically\n\t\t// async.\n\t\tfireAsync = function() {\n\t\t\tif (!scheduled) {\n\t\t\t\tscheduled = true\n\t\t\t\tcallAsync(resolveRoute)\n\t\t\t}\n\t\t}\n\n\t\tif (typeof $window.history.pushState === \"function\") {\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"popstate\", fireAsync, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"popstate\", fireAsync, false)\n\t\t} else if (route.prefix[0] === \"#\") {\n\t\t\tfireAsync = null\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"hashchange\", resolveRoute, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"hashchange\", resolveRoute, false)\n\t\t}\n\n\t\treturn mountRedraw.mount(root, {\n\t\t\tonbeforeupdate: function() {\n\t\t\t\tstate = state ? 2 : 1\n\t\t\t\treturn !(!state || sentinel === currentResolver)\n\t\t\t},\n\t\t\toncreate: resolveRoute,\n\t\t\tonremove: onremove,\n\t\t\tview: function() {\n\t\t\t\tif (!state || sentinel === currentResolver) return\n\t\t\t\t// Wrap in a fragment to preserve existing key semantics\n\t\t\t\tvar vnode = [Vnode(component, attrs.key, attrs)]\n\t\t\t\tif (currentResolver) vnode = currentResolver.render(vnode[0])\n\t\t\t\treturn vnode\n\t\t\t},\n\t\t})\n\t}\n\troute.set = function(path, data, options) {\n\t\tif (lastUpdate != null) {\n\t\t\toptions = options || {}\n\t\t\toptions.replace = true\n\t\t}\n\t\tlastUpdate = null\n\t\tsetPath(path, data, options)\n\t}\n\troute.get = function() {return currentPath}\n\troute.prefix = \"#!\"\n\troute.Link = {\n\t\tview: function(vnode) {\n\t\t\tvar options = vnode.attrs.options\n\t\t\t// Remove these so they don't get overwritten\n\t\t\tvar attrs = {}, onclick, href\n\t\t\tassign(attrs, vnode.attrs)\n\t\t\t// The first two are internal, but the rest are magic attributes\n\t\t\t// that need censored to not screw up rendering.\n\t\t\tattrs.selector = attrs.options = attrs.key = attrs.oninit =\n\t\t\tattrs.oncreate = attrs.onbeforeupdate = attrs.onupdate =\n\t\t\tattrs.onbeforeremove = attrs.onremove = null\n\n\t\t\t// Do this now so we can get the most current `href` and `disabled`.\n\t\t\t// Those attributes may also be specified in the selector, and we\n\t\t\t// should honor that.\n\t\t\tvar child = m(vnode.attrs.selector || \"a\", attrs, vnode.children)\n\n\t\t\t// Let's provide a *right* way to disable a route link, rather than\n\t\t\t// letting people screw up accessibility on accident.\n\t\t\t//\n\t\t\t// The attribute is coerced so users don't get surprised over\n\t\t\t// `disabled: 0` resulting in a button that's somehow routable\n\t\t\t// despite being visibly disabled.\n\t\t\tif (child.attrs.disabled = Boolean(child.attrs.disabled)) {\n\t\t\t\tchild.attrs.href = null\n\t\t\t\tchild.attrs[\"aria-disabled\"] = \"true\"\n\t\t\t\t// If you *really* do want to do this on a disabled link, use\n\t\t\t\t// an `oncreate` hook to add it.\n\t\t\t\tchild.attrs.onclick = null\n\t\t\t} else {\n\t\t\t\tonclick = child.attrs.onclick\n\t\t\t\thref = child.attrs.href\n\t\t\t\tchild.attrs.href = route.prefix + href\n\t\t\t\tchild.attrs.onclick = function(e) {\n\t\t\t\t\tvar result\n\t\t\t\t\tif (typeof onclick === \"function\") {\n\t\t\t\t\t\tresult = onclick.call(e.currentTarget, e)\n\t\t\t\t\t} else if (onclick == null || typeof onclick !== \"object\") {\n\t\t\t\t\t\t// do nothing\n\t\t\t\t\t} else if (typeof onclick.handleEvent === \"function\") {\n\t\t\t\t\t\tonclick.handleEvent(e)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Adapted from React Router's implementation:\n\t\t\t\t\t// https://github.com/ReactTraining/react-router/blob/520a0acd48ae1b066eb0b07d6d4d1790a1d02482/packages/react-router-dom/modules/Link.js\n\t\t\t\t\t//\n\t\t\t\t\t// Try to be flexible and intuitive in how we handle links.\n\t\t\t\t\t// Fun fact: links aren't as obvious to get right as you\n\t\t\t\t\t// would expect. There's a lot more valid ways to click a\n\t\t\t\t\t// link than this, and one might want to not simply click a\n\t\t\t\t\t// link, but right click or command-click it to copy the\n\t\t\t\t\t// link target, etc. Nope, this isn't just for blind people.\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip if `onclick` prevented default\n\t\t\t\t\t\tresult !== false && !e.defaultPrevented &&\n\t\t\t\t\t\t// Ignore everything but left clicks\n\t\t\t\t\t\t(e.button === 0 || e.which === 0 || e.which === 1) &&\n\t\t\t\t\t\t// Let the browser handle `target=_blank`, etc.\n\t\t\t\t\t\t(!e.currentTarget.target || e.currentTarget.target === \"_self\") &&\n\t\t\t\t\t\t// No modifier keys\n\t\t\t\t\t\t!e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey\n\t\t\t\t\t) {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\te.redraw = false\n\t\t\t\t\t\troute.set(href, null, options)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn child\n\t\t},\n\t}\n\troute.param = function(key) {\n\t\treturn attrs && key != null ? attrs[key] : attrs\n\t}\n\n\treturn route\n}\n","\"use strict\"\n\nvar parsePathname = require(\"./parse\")\n\n// Compiles a template into a function that takes a resolved path (without query\n// strings) and returns an object containing the template parameters with their\n// parsed values. This expects the input of the compiled template to be the\n// output of `parsePathname`. Note that it does *not* remove query parameters\n// specified in the template.\nmodule.exports = function(template) {\n\tvar templateData = parsePathname(template)\n\tvar templateKeys = Object.keys(templateData.params)\n\tvar keys = []\n\tvar regexp = new RegExp(\"^\" + templateData.path.replace(\n\t\t// I escape literal text so people can use things like `:file.:ext` or\n\t\t// `:lang-:locale` in routes. This is all merged into one pass so I\n\t\t// don't also accidentally escape `-` and make it harder to detect it to\n\t\t// ban it from template parameters.\n\t\t/:([^\\/.-]+)(\\.{3}|\\.(?!\\.)|-)?|[\\\\^$*+.()|\\[\\]{}]/g,\n\t\tfunction(m, key, extra) {\n\t\t\tif (key == null) return \"\\\\\" + m\n\t\t\tkeys.push({k: key, r: extra === \"...\"})\n\t\t\tif (extra === \"...\") return \"(.*)\"\n\t\t\tif (extra === \".\") return \"([^/]+)\\\\.\"\n\t\t\treturn \"([^/]+)\" + (extra || \"\")\n\t\t}\n\t) + \"$\")\n\treturn function(data) {\n\t\t// First, check the params. Usually, there isn't any, and it's just\n\t\t// checking a static set.\n\t\tfor (var i = 0; i < templateKeys.length; i++) {\n\t\t\tif (templateData.params[templateKeys[i]] !== data.params[templateKeys[i]]) return false\n\t\t}\n\t\t// If no interpolations exist, let's skip all the ceremony\n\t\tif (!keys.length) return regexp.test(data.path)\n\t\tvar values = regexp.exec(data.path)\n\t\tif (values == null) return false\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tdata.params[keys[i].k] = keys[i].r ? values[i + 1] : decodeURIComponent(values[i + 1])\n\t\t}\n\t\treturn true\n\t}\n}\n","if(!global[\"m\"]) global[\"m\"] = {};\nmodule.exports = global[\"m\"][\"bidi\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\bidi.js\");","( function _package( factory ){\r\n\tif( typeof define === 'function' && define.amd ){\r\n\t\tdefine( [ 'mithril' ], factory )\r\n\t}\r\n\telse if( typeof exports === 'object' ){\r\n\t\tmodule.exports = factory( require( 'mithril' ) )\r\n\t}\r\n\telse{\r\n\t\tfactory( m )\r\n\t}\r\n}( function define( m ){\r\n\tfunction bidi( node, prop ){\r\n\t\tvar type = node.tag === 'select'\r\n\t\t\t? node.attrs.multi\r\n\t\t\t\t? 'multi'\r\n\t\t\t\t: 'select'\r\n\t\t\t: node.attrs.type\r\n\r\n\t\t// Setup: bind listeners\r\n\t\tif( type === 'multi' ){\r\n\t\t\tnode.attrs.onchange = function(){\r\n\t\t\t\tprop( [].slice.call( this.selectedOptions, function( x ){\r\n\t\t\t\t\treturn x.value\r\n\t\t\t\t} ) )\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if( type === 'select' ){\r\n\t\t\tnode.attrs.onchange = function( e ){\r\n\t\t\t\tprop( this.selectedOptions[ 0 ].value )\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if( type === 'checkbox' ){\r\n\t\t\tnode.attrs.onchange = function( e ){\r\n\t\t\t\tprop( this.checked )\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.attrs.onchange = node.attrs.oninput = function( e ){\r\n\t\t\t\tprop( this.value )\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif( node.tag === 'select' ){\r\n\t\t\tnode.children.forEach( function( option ){\r\n\t\t\t\tif( option.attrs.value === prop() || option.children[ 0 ] === prop() ){\r\n\t\t\t\t\toption.attrs.selected = true\r\n\t\t\t\t}\r\n\t\t\t} )\r\n\t\t}\r\n\t\telse if( type === 'checkbox' ){\r\n\t\t\tnode.attrs.checked = prop()\r\n\t\t}\r\n\t\telse if( type === 'radio' ){\r\n\t\t\tnode.attrs.checked = prop() === node.attrs.value\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.attrs.value = prop()\r\n\t\t}\r\n\r\n\t\treturn node\r\n\t}\r\n\r\n\tbidi.view = function( ctrl, node, prop ){\r\n\t return bidi( node, node.attrs.bidi )\r\n\t}\r\n\r\n\tif( m.attrs ) m.attrs.bidi = bidi\r\n\t\r\n\tm.bidi = bidi\r\n\r\n\treturn bidi\r\n} ) )\r\n","module.exports = global[\"Mousetrap\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\mousetrap.js\");","/*global define:false */\n/**\n * Copyright 2012-2017 Craig Campbell\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * Mousetrap is a simple keyboard shortcut library for Javascript with\n * no external dependencies\n *\n * @version 1.6.3\n * @url craig.is/killing/mice\n */\n(function(window, document, undefined) {\n\n // Check if mousetrap is used inside browser, if not, return\n if (!window) {\n return;\n }\n\n /**\n * mapping of special keycodes to their corresponding keys\n *\n * everything in this dictionary cannot use keypress events\n * so it has to be here to map to the correct keycodes for\n * keyup/keydown events\n *\n * @type {Object}\n */\n var _MAP = {\n 8: 'backspace',\n 9: 'tab',\n 13: 'enter',\n 16: 'shift',\n 17: 'ctrl',\n 18: 'alt',\n 20: 'capslock',\n 27: 'esc',\n 32: 'space',\n 33: 'pageup',\n 34: 'pagedown',\n 35: 'end',\n 36: 'home',\n 37: 'left',\n 38: 'up',\n 39: 'right',\n 40: 'down',\n 45: 'ins',\n 46: 'del',\n 91: 'meta',\n 93: 'meta',\n 224: 'meta'\n };\n\n /**\n * mapping for special characters so they can support\n *\n * this dictionary is only used incase you want to bind a\n * keyup or keydown event to one of these keys\n *\n * @type {Object}\n */\n var _KEYCODE_MAP = {\n 106: '*',\n 107: '+',\n 109: '-',\n 110: '.',\n 111 : '/',\n 186: ';',\n 187: '=',\n 188: ',',\n 189: '-',\n 190: '.',\n 191: '/',\n 192: '`',\n 219: '[',\n 220: '\\\\',\n 221: ']',\n 222: '\\''\n };\n\n /**\n * this is a mapping of keys that require shift on a US keypad\n * back to the non shift equivelents\n *\n * this is so you can use keyup events with these keys\n *\n * note that this will only work reliably on US keyboards\n *\n * @type {Object}\n */\n var _SHIFT_MAP = {\n '~': '`',\n '!': '1',\n '@': '2',\n '#': '3',\n '$': '4',\n '%': '5',\n '^': '6',\n '&': '7',\n '*': '8',\n '(': '9',\n ')': '0',\n '_': '-',\n '+': '=',\n ':': ';',\n '\\\"': '\\'',\n '<': ',',\n '>': '.',\n '?': '/',\n '|': '\\\\'\n };\n\n /**\n * this is a list of special strings you can use to map\n * to modifier keys when you specify your keyboard shortcuts\n *\n * @type {Object}\n */\n var _SPECIAL_ALIASES = {\n 'option': 'alt',\n 'command': 'meta',\n 'return': 'enter',\n 'escape': 'esc',\n 'plus': '+',\n 'mod': /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? 'meta' : 'ctrl'\n };\n\n /**\n * variable to store the flipped version of _MAP from above\n * needed to check if we should use keypress or not when no action\n * is specified\n *\n * @type {Object|undefined}\n */\n var _REVERSE_MAP;\n\n /**\n * loop through the f keys, f1 to f19 and add them to the map\n * programatically\n */\n for (var i = 1; i < 20; ++i) {\n _MAP[111 + i] = 'f' + i;\n }\n\n /**\n * loop through to map numbers on the numeric keypad\n */\n for (i = 0; i <= 9; ++i) {\n\n // This needs to use a string cause otherwise since 0 is falsey\n // mousetrap will never fire for numpad 0 pressed as part of a keydown\n // event.\n //\n // @see https://github.com/ccampbell/mousetrap/pull/258\n _MAP[i + 96] = i.toString();\n }\n\n /**\n * cross browser add event method\n *\n * @param {Element|HTMLDocument} object\n * @param {string} type\n * @param {Function} callback\n * @returns void\n */\n function _addEvent(object, type, callback) {\n if (object.addEventListener) {\n object.addEventListener(type, callback, false);\n return;\n }\n\n object.attachEvent('on' + type, callback);\n }\n\n /**\n * takes the event and returns the key character\n *\n * @param {Event} e\n * @return {string}\n */\n function _characterFromEvent(e) {\n\n // for keypress events we should return the character as is\n if (e.type == 'keypress') {\n var character = String.fromCharCode(e.which);\n\n // if the shift key is not pressed then it is safe to assume\n // that we want the character to be lowercase. this means if\n // you accidentally have caps lock on then your key bindings\n // will continue to work\n //\n // the only side effect that might not be desired is if you\n // bind something like 'A' cause you want to trigger an\n // event when capital A is pressed caps lock will no longer\n // trigger the event. shift+a will though.\n if (!e.shiftKey) {\n character = character.toLowerCase();\n }\n\n return character;\n }\n\n // for non keypress events the special maps are needed\n if (_MAP[e.which]) {\n return _MAP[e.which];\n }\n\n if (_KEYCODE_MAP[e.which]) {\n return _KEYCODE_MAP[e.which];\n }\n\n // if it is not in the special map\n\n // with keydown and keyup events the character seems to always\n // come in as an uppercase character whether you are pressing shift\n // or not. we should make sure it is always lowercase for comparisons\n return String.fromCharCode(e.which).toLowerCase();\n }\n\n /**\n * checks if two arrays are equal\n *\n * @param {Array} modifiers1\n * @param {Array} modifiers2\n * @returns {boolean}\n */\n function _modifiersMatch(modifiers1, modifiers2) {\n return modifiers1.sort().join(',') === modifiers2.sort().join(',');\n }\n\n /**\n * takes a key event and figures out what the modifiers are\n *\n * @param {Event} e\n * @returns {Array}\n */\n function _eventModifiers(e) {\n var modifiers = [];\n\n if (e.shiftKey) {\n modifiers.push('shift');\n }\n\n if (e.altKey) {\n modifiers.push('alt');\n }\n\n if (e.ctrlKey) {\n modifiers.push('ctrl');\n }\n\n if (e.metaKey) {\n modifiers.push('meta');\n }\n\n return modifiers;\n }\n\n /**\n * prevents default for this event\n *\n * @param {Event} e\n * @returns void\n */\n function _preventDefault(e) {\n if (e.preventDefault) {\n e.preventDefault();\n return;\n }\n\n e.returnValue = false;\n }\n\n /**\n * stops propogation for this event\n *\n * @param {Event} e\n * @returns void\n */\n function _stopPropagation(e) {\n if (e.stopPropagation) {\n e.stopPropagation();\n return;\n }\n\n e.cancelBubble = true;\n }\n\n /**\n * determines if the keycode specified is a modifier key or not\n *\n * @param {string} key\n * @returns {boolean}\n */\n function _isModifier(key) {\n return key == 'shift' || key == 'ctrl' || key == 'alt' || key == 'meta';\n }\n\n /**\n * reverses the map lookup so that we can look for specific keys\n * to see what can and can't use keypress\n *\n * @return {Object}\n */\n function _getReverseMap() {\n if (!_REVERSE_MAP) {\n _REVERSE_MAP = {};\n for (var key in _MAP) {\n\n // pull out the numeric keypad from here cause keypress should\n // be able to detect the keys from the character\n if (key > 95 && key < 112) {\n continue;\n }\n\n if (_MAP.hasOwnProperty(key)) {\n _REVERSE_MAP[_MAP[key]] = key;\n }\n }\n }\n return _REVERSE_MAP;\n }\n\n /**\n * picks the best action based on the key combination\n *\n * @param {string} key - character for key\n * @param {Array} modifiers\n * @param {string=} action passed in\n */\n function _pickBestAction(key, modifiers, action) {\n\n // if no action was picked in we should try to pick the one\n // that we think would work best for this key\n if (!action) {\n action = _getReverseMap()[key] ? 'keydown' : 'keypress';\n }\n\n // modifier keys don't work as expected with keypress,\n // switch to keydown\n if (action == 'keypress' && modifiers.length) {\n action = 'keydown';\n }\n\n return action;\n }\n\n /**\n * Converts from a string key combination to an array\n *\n * @param {string} combination like \"command+shift+l\"\n * @return {Array}\n */\n function _keysFromString(combination) {\n if (combination === '+') {\n return ['+'];\n }\n\n combination = combination.replace(/\\+{2}/g, '+plus');\n return combination.split('+');\n }\n\n /**\n * Gets info for a specific key combination\n *\n * @param {string} combination key combination (\"command+s\" or \"a\" or \"*\")\n * @param {string=} action\n * @returns {Object}\n */\n function _getKeyInfo(combination, action) {\n var keys;\n var key;\n var i;\n var modifiers = [];\n\n // take the keys from this pattern and figure out what the actual\n // pattern is all about\n keys = _keysFromString(combination);\n\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n\n // normalize key names\n if (_SPECIAL_ALIASES[key]) {\n key = _SPECIAL_ALIASES[key];\n }\n\n // if this is not a keypress event then we should\n // be smart about using shift keys\n // this will only work for US keyboards however\n if (action && action != 'keypress' && _SHIFT_MAP[key]) {\n key = _SHIFT_MAP[key];\n modifiers.push('shift');\n }\n\n // if this key is a modifier then add it to the list of modifiers\n if (_isModifier(key)) {\n modifiers.push(key);\n }\n }\n\n // depending on what the key combination is\n // we will try to pick the best event for it\n action = _pickBestAction(key, modifiers, action);\n\n return {\n key: key,\n modifiers: modifiers,\n action: action\n };\n }\n\n function _belongsTo(element, ancestor) {\n if (element === null || element === document) {\n return false;\n }\n\n if (element === ancestor) {\n return true;\n }\n\n return _belongsTo(element.parentNode, ancestor);\n }\n\n function Mousetrap(targetElement) {\n var self = this;\n\n targetElement = targetElement || document;\n\n if (!(self instanceof Mousetrap)) {\n return new Mousetrap(targetElement);\n }\n\n /**\n * element to attach key events to\n *\n * @type {Element}\n */\n self.target = targetElement;\n\n /**\n * a list of all the callbacks setup via Mousetrap.bind()\n *\n * @type {Object}\n */\n self._callbacks = {};\n\n /**\n * direct map of string combinations to callbacks used for trigger()\n *\n * @type {Object}\n */\n self._directMap = {};\n\n /**\n * keeps track of what level each sequence is at since multiple\n * sequences can start out with the same sequence\n *\n * @type {Object}\n */\n var _sequenceLevels = {};\n\n /**\n * variable to store the setTimeout call\n *\n * @type {null|number}\n */\n var _resetTimer;\n\n /**\n * temporary state where we will ignore the next keyup\n *\n * @type {boolean|string}\n */\n var _ignoreNextKeyup = false;\n\n /**\n * temporary state where we will ignore the next keypress\n *\n * @type {boolean}\n */\n var _ignoreNextKeypress = false;\n\n /**\n * are we currently inside of a sequence?\n * type of action (\"keyup\" or \"keydown\" or \"keypress\") or false\n *\n * @type {boolean|string}\n */\n var _nextExpectedAction = false;\n\n /**\n * resets all sequence counters except for the ones passed in\n *\n * @param {Object} doNotReset\n * @returns void\n */\n function _resetSequences(doNotReset) {\n doNotReset = doNotReset || {};\n\n var activeSequences = false,\n key;\n\n for (key in _sequenceLevels) {\n if (doNotReset[key]) {\n activeSequences = true;\n continue;\n }\n _sequenceLevels[key] = 0;\n }\n\n if (!activeSequences) {\n _nextExpectedAction = false;\n }\n }\n\n /**\n * finds all callbacks that match based on the keycode, modifiers,\n * and action\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event|Object} e\n * @param {string=} sequenceName - name of the sequence we are looking for\n * @param {string=} combination\n * @param {number=} level\n * @returns {Array}\n */\n function _getMatches(character, modifiers, e, sequenceName, combination, level) {\n var i;\n var callback;\n var matches = [];\n var action = e.type;\n\n // if there are no events related to this keycode\n if (!self._callbacks[character]) {\n return [];\n }\n\n // if a modifier key is coming up on its own we should allow it\n if (action == 'keyup' && _isModifier(character)) {\n modifiers = [character];\n }\n\n // loop through all callbacks for the key that was pressed\n // and see if any of them match\n for (i = 0; i < self._callbacks[character].length; ++i) {\n callback = self._callbacks[character][i];\n\n // if a sequence name is not specified, but this is a sequence at\n // the wrong level then move onto the next match\n if (!sequenceName && callback.seq && _sequenceLevels[callback.seq] != callback.level) {\n continue;\n }\n\n // if the action we are looking for doesn't match the action we got\n // then we should keep going\n if (action != callback.action) {\n continue;\n }\n\n // if this is a keypress event and the meta key and control key\n // are not pressed that means that we need to only look at the\n // character, otherwise check the modifiers as well\n //\n // chrome will not fire a keypress if meta or control is down\n // safari will fire a keypress if meta or meta+shift is down\n // firefox will fire a keypress if meta or control is down\n if ((action == 'keypress' && !e.metaKey && !e.ctrlKey) || _modifiersMatch(modifiers, callback.modifiers)) {\n\n // when you bind a combination or sequence a second time it\n // should overwrite the first one. if a sequenceName or\n // combination is specified in this call it does just that\n //\n // @todo make deleting its own method?\n var deleteCombo = !sequenceName && callback.combo == combination;\n var deleteSequence = sequenceName && callback.seq == sequenceName && callback.level == level;\n if (deleteCombo || deleteSequence) {\n self._callbacks[character].splice(i, 1);\n }\n\n matches.push(callback);\n }\n }\n\n return matches;\n }\n\n /**\n * actually calls the callback function\n *\n * if your callback function returns false this will use the jquery\n * convention - prevent default and stop propogation on the event\n *\n * @param {Function} callback\n * @param {Event} e\n * @returns void\n */\n function _fireCallback(callback, e, combo, sequence) {\n\n // if this event should not happen stop here\n if (self.stopCallback(e, e.target || e.srcElement, combo, sequence)) {\n return;\n }\n\n if (callback(e, combo) === false) {\n _preventDefault(e);\n _stopPropagation(e);\n }\n }\n\n /**\n * handles a character key event\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event} e\n * @returns void\n */\n self._handleKey = function(character, modifiers, e) {\n var callbacks = _getMatches(character, modifiers, e);\n var i;\n var doNotReset = {};\n var maxLevel = 0;\n var processedSequenceCallback = false;\n\n // Calculate the maxLevel for sequences so we can only execute the longest callback sequence\n for (i = 0; i < callbacks.length; ++i) {\n if (callbacks[i].seq) {\n maxLevel = Math.max(maxLevel, callbacks[i].level);\n }\n }\n\n // loop through matching callbacks for this key event\n for (i = 0; i < callbacks.length; ++i) {\n\n // fire for all sequence callbacks\n // this is because if for example you have multiple sequences\n // bound such as \"g i\" and \"g t\" they both need to fire the\n // callback for matching g cause otherwise you can only ever\n // match the first one\n if (callbacks[i].seq) {\n\n // only fire callbacks for the maxLevel to prevent\n // subsequences from also firing\n //\n // for example 'a option b' should not cause 'option b' to fire\n // even though 'option b' is part of the other sequence\n //\n // any sequences that do not match here will be discarded\n // below by the _resetSequences call\n if (callbacks[i].level != maxLevel) {\n continue;\n }\n\n processedSequenceCallback = true;\n\n // keep a list of which sequences were matches for later\n doNotReset[callbacks[i].seq] = 1;\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo, callbacks[i].seq);\n continue;\n }\n\n // if there were no sequence matches but we are still here\n // that means this is a regular match so we should fire that\n if (!processedSequenceCallback) {\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo);\n }\n }\n\n // if the key you pressed matches the type of sequence without\n // being a modifier (ie \"keyup\" or \"keypress\") then we should\n // reset all sequences that were not matched by this event\n //\n // this is so, for example, if you have the sequence \"h a t\" and you\n // type \"h e a r t\" it does not match. in this case the \"e\" will\n // cause the sequence to reset\n //\n // modifier keys are ignored because you can have a sequence\n // that contains modifiers such as \"enter ctrl+space\" and in most\n // cases the modifier key will be pressed before the next key\n //\n // also if you have a sequence such as \"ctrl+b a\" then pressing the\n // \"b\" key will trigger a \"keypress\" and a \"keydown\"\n //\n // the \"keydown\" is expected when there is a modifier, but the\n // \"keypress\" ends up matching the _nextExpectedAction since it occurs\n // after and that causes the sequence to reset\n //\n // we ignore keypresses in a sequence that directly follow a keydown\n // for the same character\n var ignoreThisKeypress = e.type == 'keypress' && _ignoreNextKeypress;\n if (e.type == _nextExpectedAction && !_isModifier(character) && !ignoreThisKeypress) {\n _resetSequences(doNotReset);\n }\n\n _ignoreNextKeypress = processedSequenceCallback && e.type == 'keydown';\n };\n\n /**\n * handles a keydown event\n *\n * @param {Event} e\n * @returns void\n */\n function _handleKeyEvent(e) {\n\n // normalize e.which for key events\n // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion\n if (typeof e.which !== 'number') {\n e.which = e.keyCode;\n }\n\n var character = _characterFromEvent(e);\n\n // no character found then stop\n if (!character) {\n return;\n }\n\n // need to use === for the character check because the character can be 0\n if (e.type == 'keyup' && _ignoreNextKeyup === character) {\n _ignoreNextKeyup = false;\n return;\n }\n\n self.handleKey(character, _eventModifiers(e), e);\n }\n\n /**\n * called to set a 1 second timeout on the specified sequence\n *\n * this is so after each key press in the sequence you have 1 second\n * to press the next key before you have to start over\n *\n * @returns void\n */\n function _resetSequenceTimer() {\n clearTimeout(_resetTimer);\n _resetTimer = setTimeout(_resetSequences, 1000);\n }\n\n /**\n * binds a key sequence to an event\n *\n * @param {string} combo - combo specified in bind call\n * @param {Array} keys\n * @param {Function} callback\n * @param {string=} action\n * @returns void\n */\n function _bindSequence(combo, keys, callback, action) {\n\n // start off by adding a sequence level record for this combination\n // and setting the level to 0\n _sequenceLevels[combo] = 0;\n\n /**\n * callback to increase the sequence level for this sequence and reset\n * all other sequences that were active\n *\n * @param {string} nextAction\n * @returns {Function}\n */\n function _increaseSequence(nextAction) {\n return function() {\n _nextExpectedAction = nextAction;\n ++_sequenceLevels[combo];\n _resetSequenceTimer();\n };\n }\n\n /**\n * wraps the specified callback inside of another function in order\n * to reset all sequence counters as soon as this sequence is done\n *\n * @param {Event} e\n * @returns void\n */\n function _callbackAndReset(e) {\n _fireCallback(callback, e, combo);\n\n // we should ignore the next key up if the action is key down\n // or keypress. this is so if you finish a sequence and\n // release the key the final key will not trigger a keyup\n if (action !== 'keyup') {\n _ignoreNextKeyup = _characterFromEvent(e);\n }\n\n // weird race condition if a sequence ends with the key\n // another sequence begins with\n setTimeout(_resetSequences, 10);\n }\n\n // loop through keys one at a time and bind the appropriate callback\n // function. for any key leading up to the final one it should\n // increase the sequence. after the final, it should reset all sequences\n //\n // if an action is specified in the original bind call then that will\n // be used throughout. otherwise we will pass the action that the\n // next key in the sequence should match. this allows a sequence\n // to mix and match keypress and keydown events depending on which\n // ones are better suited to the key provided\n for (var i = 0; i < keys.length; ++i) {\n var isFinal = i + 1 === keys.length;\n var wrappedCallback = isFinal ? _callbackAndReset : _increaseSequence(action || _getKeyInfo(keys[i + 1]).action);\n _bindSingle(keys[i], wrappedCallback, action, combo, i);\n }\n }\n\n /**\n * binds a single keyboard combination\n *\n * @param {string} combination\n * @param {Function} callback\n * @param {string=} action\n * @param {string=} sequenceName - name of sequence if part of sequence\n * @param {number=} level - what part of the sequence the command is\n * @returns void\n */\n function _bindSingle(combination, callback, action, sequenceName, level) {\n\n // store a direct mapped reference for use with Mousetrap.trigger\n self._directMap[combination + ':' + action] = callback;\n\n // make sure multiple spaces in a row become a single space\n combination = combination.replace(/\\s+/g, ' ');\n\n var sequence = combination.split(' ');\n var info;\n\n // if this pattern is a sequence of keys then run through this method\n // to reprocess each pattern one key at a time\n if (sequence.length > 1) {\n _bindSequence(combination, sequence, callback, action);\n return;\n }\n\n info = _getKeyInfo(combination, action);\n\n // make sure to initialize array if this is the first time\n // a callback is added for this key\n self._callbacks[info.key] = self._callbacks[info.key] || [];\n\n // remove an existing match if there is one\n _getMatches(info.key, info.modifiers, {type: info.action}, sequenceName, combination, level);\n\n // add this call back to the array\n // if it is a sequence put it at the beginning\n // if not put it at the end\n //\n // this is important because the way these are processed expects\n // the sequence ones to come first\n self._callbacks[info.key][sequenceName ? 'unshift' : 'push']({\n callback: callback,\n modifiers: info.modifiers,\n action: info.action,\n seq: sequenceName,\n level: level,\n combo: combination\n });\n }\n\n /**\n * binds multiple combinations to the same callback\n *\n * @param {Array} combinations\n * @param {Function} callback\n * @param {string|undefined} action\n * @returns void\n */\n self._bindMultiple = function(combinations, callback, action) {\n for (var i = 0; i < combinations.length; ++i) {\n _bindSingle(combinations[i], callback, action);\n }\n };\n\n // start!\n _addEvent(targetElement, 'keypress', _handleKeyEvent);\n _addEvent(targetElement, 'keydown', _handleKeyEvent);\n _addEvent(targetElement, 'keyup', _handleKeyEvent);\n }\n\n /**\n * binds an event to mousetrap\n *\n * can be a single key, a combination of keys separated with +,\n * an array of keys, or a sequence of keys separated by spaces\n *\n * be sure to list the modifier keys first to make sure that the\n * correct key ends up getting bound (the last key in the pattern)\n *\n * @param {string|Array} keys\n * @param {Function} callback\n * @param {string=} action - 'keypress', 'keydown', or 'keyup'\n * @returns void\n */\n Mousetrap.prototype.bind = function(keys, callback, action) {\n var self = this;\n keys = keys instanceof Array ? keys : [keys];\n self._bindMultiple.call(self, keys, callback, action);\n return self;\n };\n\n /**\n * unbinds an event to mousetrap\n *\n * the unbinding sets the callback function of the specified key combo\n * to an empty function and deletes the corresponding key in the\n * _directMap dict.\n *\n * TODO: actually remove this from the _callbacks dictionary instead\n * of binding an empty function\n *\n * the keycombo+action has to be exactly the same as\n * it was defined in the bind method\n *\n * @param {string|Array} keys\n * @param {string} action\n * @returns void\n */\n Mousetrap.prototype.unbind = function(keys, action) {\n var self = this;\n return self.bind.call(self, keys, function() {}, action);\n };\n\n /**\n * triggers an event that has already been bound\n *\n * @param {string} keys\n * @param {string=} action\n * @returns void\n */\n Mousetrap.prototype.trigger = function(keys, action) {\n var self = this;\n if (self._directMap[keys + ':' + action]) {\n self._directMap[keys + ':' + action]({}, keys);\n }\n return self;\n };\n\n /**\n * resets the library back to its initial state. this is useful\n * if you want to clear out the current keyboard shortcuts and bind\n * new ones - for example if you switch to another page\n *\n * @returns void\n */\n Mousetrap.prototype.reset = function() {\n var self = this;\n self._callbacks = {};\n self._directMap = {};\n return self;\n };\n\n /**\n * should we stop this event before firing off callbacks\n *\n * @param {Event} e\n * @param {Element} element\n * @return {boolean}\n */\n Mousetrap.prototype.stopCallback = function(e, element) {\n var self = this;\n\n // if the element has the class \"mousetrap\" then no need to stop\n if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {\n return false;\n }\n\n if (_belongsTo(element, self.target)) {\n return false;\n }\n\n // Events originating from a shadow DOM are re-targetted and `e.target` is the shadow host,\n // not the initial event target in the shadow tree. Note that not all events cross the\n // shadow boundary.\n // For shadow trees with `mode: 'open'`, the initial event target is the first element in\n // the event’s composed path. For shadow trees with `mode: 'closed'`, the initial event\n // target cannot be obtained.\n if ('composedPath' in e && typeof e.composedPath === 'function') {\n // For open shadow trees, update `element` so that the following check works.\n var initialEventTarget = e.composedPath()[0];\n if (initialEventTarget !== e.target) {\n element = initialEventTarget;\n }\n }\n\n // stop for input, select, and textarea\n return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable;\n };\n\n /**\n * exposes _handleKey publicly so it can be overwritten by extensions\n */\n Mousetrap.prototype.handleKey = function() {\n var self = this;\n return self._handleKey.apply(self, arguments);\n };\n\n /**\n * allow custom key mappings\n */\n Mousetrap.addKeycodes = function(object) {\n for (var key in object) {\n if (object.hasOwnProperty(key)) {\n _MAP[key] = object[key];\n }\n }\n _REVERSE_MAP = null;\n };\n\n /**\n * Init the global mousetrap functions\n *\n * This method is needed to allow the global mousetrap functions to work\n * now that mousetrap is a constructor function.\n */\n Mousetrap.init = function() {\n var documentMousetrap = Mousetrap(document);\n for (var method in documentMousetrap) {\n if (method.charAt(0) !== '_') {\n Mousetrap[method] = (function(method) {\n return function() {\n return documentMousetrap[method].apply(documentMousetrap, arguments);\n };\n } (method));\n }\n }\n };\n\n Mousetrap.init();\n\n // expose mousetrap to the global object\n window.Mousetrap = Mousetrap;\n\n // expose as a common js module\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = Mousetrap;\n }\n\n // expose mousetrap as an AMD module\n if (typeof define === 'function' && define.amd) {\n define(function() {\n return Mousetrap;\n });\n }\n}) (typeof window !== 'undefined' ? window : null, typeof window !== 'undefined' ? document : null);\n","module.exports = global[\"classNames\"] = require(\"-!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--5!E:\\\\sites\\\\flarum-new\\\\packages\\\\flarum-core\\\\js\\\\node_modules\\\\source-map-loader\\\\index.js!.\\\\index.js\");","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n;(function($){\n var zepto = $.zepto, oldQsa = zepto.qsa, oldMatches = zepto.matches\n\n function visible(elem){\n elem = $(elem)\n return !!(elem.width() || elem.height()) && elem.css(\"display\") !== \"none\"\n }\n\n // Implements a subset from:\n // http://api.jquery.com/category/selectors/jquery-selector-extensions/\n //\n // Each filter function receives the current index, all nodes in the\n // considered set, and a value if there were parentheses. The value\n // of `this` is the node currently being considered. The function returns the\n // resulting node(s), null, or undefined.\n //\n // Complex selectors are not supported:\n // li:has(label:contains(\"foo\")) + li:has(label:contains(\"bar\"))\n // ul.inner:first > li\n var filters = $.expr[':'] = {\n visible: function(){ if (visible(this)) return this },\n hidden: function(){ if (!visible(this)) return this },\n selected: function(){ if (this.selected) return this },\n checked: function(){ if (this.checked) return this },\n parent: function(){ return this.parentNode },\n first: function(idx){ if (idx === 0) return this },\n last: function(idx, nodes){ if (idx === nodes.length - 1) return this },\n eq: function(idx, _, value){ if (idx === value) return this },\n contains: function(idx, _, text){ if ($(this).text().indexOf(text) > -1) return this },\n has: function(idx, _, sel){ if (zepto.qsa(this, sel).length) return this }\n }\n\n var filterRe = new RegExp('(.*):(\\\\w+)(?:\\\\(([^)]+)\\\\))?$\\\\s*'),\n childRe = /^\\s*>/,\n classTag = 'Zepto' + (+new Date())\n\n function process(sel, fn) {\n // quote the hash in `a[href^=#]` expression\n sel = sel.replace(/=#\\]/g, '=\"#\"]')\n var filter, arg, match = filterRe.exec(sel)\n if (match && match[2] in filters) {\n filter = filters[match[2]], arg = match[3]\n sel = match[1]\n if (arg) {\n var num = Number(arg)\n if (isNaN(num)) arg = arg.replace(/^[\"']|[\"']$/g, '')\n else arg = num\n }\n }\n return fn(sel, filter, arg)\n }\n\n zepto.qsa = function(node, selector) {\n return process(selector, function(sel, filter, arg){\n try {\n var taggedParent\n if (!sel && filter) sel = '*'\n else if (childRe.test(sel))\n // support \"> *\" child queries by tagging the parent node with a\n // unique class and prepending that classname onto the selector\n taggedParent = $(node).addClass(classTag), sel = '.'+classTag+' '+sel\n\n var nodes = oldQsa(node, sel)\n } catch(e) {\n console.error('error performing selector: %o', selector)\n throw e\n } finally {\n if (taggedParent) taggedParent.removeClass(classTag)\n }\n return !filter ? nodes :\n zepto.uniq($.map(nodes, function(n, i){ return filter.call(n, i, nodes, arg) }))\n })\n }\n\n zepto.matches = function(node, selector){\n return process(selector, function(sel, filter, arg){\n return (!sel || oldMatches(node, sel)) &&\n (!filter || filter.call(node, null, arg) === node)\n })\n }\n})(Zepto)\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n// The following code is heavily inspired by jQuery's $.fn.data()\n\n;(function($){\n var data = {}, dataAttr = $.fn.data, camelize = $.camelCase,\n exp = $.expando = 'Zepto' + (+new Date()), emptyArray = []\n\n // Get value from node:\n // 1. first try key as given,\n // 2. then try camelized key,\n // 3. fall back to reading \"data-*\" attribute.\n function getData(node, name) {\n var id = node[exp], store = id && data[id]\n if (name === undefined) return store || setData(node)\n else {\n if (store) {\n if (name in store) return store[name]\n var camelName = camelize(name)\n if (camelName in store) return store[camelName]\n }\n return dataAttr.call($(node), name)\n }\n }\n\n // Store value under camelized key on node\n function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }\n\n // Read all \"data-*\" attributes from a node\n function attributeData(node) {\n var store = {}\n $.each(node.attributes || emptyArray, function(i, attr){\n if (attr.name.indexOf('data-') == 0)\n store[camelize(attr.name.replace('data-', ''))] =\n $.zepto.deserializeValue(attr.value)\n })\n return store\n }\n\n $.fn.data = function(name, value) {\n return value === undefined ?\n // set multiple values via object\n $.isPlainObject(name) ?\n this.each(function(i, node){\n $.each(name, function(key, value){ setData(node, key, value) })\n }) :\n // get value from first element\n (0 in this ? getData(this[0], name) : undefined) :\n // set value on all elements\n this.each(function(){ setData(this, name, value) })\n }\n\n $.data = function(elem, name, value) {\n return $(elem).data(name, value)\n }\n\n $.hasData = function(elem) {\n var id = elem[exp], store = id && data[id]\n return store ? !$.isEmptyObject(store) : false\n }\n\n $.fn.removeData = function(names) {\n if (typeof names == 'string') names = names.split(/\\s+/)\n return this.each(function(){\n var id = this[exp], store = id && data[id]\n if (store) $.each(names || store, function(key){\n delete store[names ? camelize(this) : key]\n })\n })\n }\n\n // Generate extended `remove` and `empty` functions\n ;['remove', 'empty'].forEach(function(methodName){\n var origFn = $.fn[methodName]\n $.fn[methodName] = function() {\n var elements = this.find('*')\n if (methodName === 'remove') elements = elements.add(this)\n elements.removeData()\n return origFn.call(this)\n }\n })\n})(Zepto)\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n;(function($, undefined){\n var prefix = '', eventPrefix,\n vendors = { Webkit: 'webkit', Moz: '', O: 'o' },\n testEl = document.createElement('div'),\n supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,\n transform,\n transitionProperty, transitionDuration, transitionTiming, transitionDelay,\n animationName, animationDuration, animationTiming, animationDelay,\n cssReset = {}\n\n function dasherize(str) { return str.replace(/([A-Z])/g, '-$1').toLowerCase() }\n function normalizeEvent(name) { return eventPrefix ? eventPrefix + name : name.toLowerCase() }\n\n if (testEl.style.transform === undefined) $.each(vendors, function(vendor, event){\n if (testEl.style[vendor + 'TransitionProperty'] !== undefined) {\n prefix = '-' + vendor.toLowerCase() + '-'\n eventPrefix = event\n return false\n }\n })\n\n transform = prefix + 'transform'\n cssReset[transitionProperty = prefix + 'transition-property'] =\n cssReset[transitionDuration = prefix + 'transition-duration'] =\n cssReset[transitionDelay = prefix + 'transition-delay'] =\n cssReset[transitionTiming = prefix + 'transition-timing-function'] =\n cssReset[animationName = prefix + 'animation-name'] =\n cssReset[animationDuration = prefix + 'animation-duration'] =\n cssReset[animationDelay = prefix + 'animation-delay'] =\n cssReset[animationTiming = prefix + 'animation-timing-function'] = ''\n\n $.fx = {\n off: (eventPrefix === undefined && testEl.style.transitionProperty === undefined),\n speeds: { _default: 400, fast: 200, slow: 600 },\n cssPrefix: prefix,\n transitionEnd: normalizeEvent('TransitionEnd'),\n animationEnd: normalizeEvent('AnimationEnd')\n }\n\n $.fn.animate = function(properties, duration, ease, callback, delay){\n if ($.isFunction(duration))\n callback = duration, ease = undefined, duration = undefined\n if ($.isFunction(ease))\n callback = ease, ease = undefined\n if ($.isPlainObject(duration))\n ease = duration.easing, callback = duration.complete, delay = duration.delay, duration = duration.duration\n if (duration) duration = (typeof duration == 'number' ? duration :\n ($.fx.speeds[duration] || $.fx.speeds._default)) / 1000\n if (delay) delay = parseFloat(delay) / 1000\n return this.anim(properties, duration, ease, callback, delay)\n }\n\n $.fn.anim = function(properties, duration, ease, callback, delay){\n var key, cssValues = {}, cssProperties, transforms = '',\n that = this, wrappedCallback, endEvent = $.fx.transitionEnd,\n fired = false\n\n if (duration === undefined) duration = $.fx.speeds._default / 1000\n if (delay === undefined) delay = 0\n if ($.fx.off) duration = 0\n\n if (typeof properties == 'string') {\n // keyframe animation\n cssValues[animationName] = properties\n cssValues[animationDuration] = duration + 's'\n cssValues[animationDelay] = delay + 's'\n cssValues[animationTiming] = (ease || 'linear')\n endEvent = $.fx.animationEnd\n } else {\n cssProperties = []\n // CSS transitions\n for (key in properties)\n if (supportedTransforms.test(key)) transforms += key + '(' + properties[key] + ') '\n else cssValues[key] = properties[key], cssProperties.push(dasherize(key))\n\n if (transforms) cssValues[transform] = transforms, cssProperties.push(transform)\n if (duration > 0 && typeof properties === 'object') {\n cssValues[transitionProperty] = cssProperties.join(', ')\n cssValues[transitionDuration] = duration + 's'\n cssValues[transitionDelay] = delay + 's'\n cssValues[transitionTiming] = (ease || 'linear')\n }\n }\n\n wrappedCallback = function(event){\n if (typeof event !== 'undefined') {\n if (event.target !== event.currentTarget) return // makes sure the event didn't bubble from \"below\"\n $(event.target).unbind(endEvent, wrappedCallback)\n } else\n $(this).unbind(endEvent, wrappedCallback) // triggered by setTimeout\n\n fired = true\n $(this).css(cssReset)\n callback && callback.call(this)\n }\n if (duration > 0){\n this.bind(endEvent, wrappedCallback)\n // transitionEnd is not always firing on older Android phones\n // so make sure it gets fired\n setTimeout(function(){\n if (fired) return\n wrappedCallback.call(that)\n }, ((duration + delay) * 1000) + 25)\n }\n\n // trigger page reflow so new elements can animate\n this.size() && this.get(0).clientLeft\n\n this.css(cssValues)\n\n if (duration <= 0) setTimeout(function() {\n that.each(function(){ wrappedCallback.call(this) })\n }, 0)\n\n return this\n }\n\n testEl = null\n})(Zepto)\n","// Zepto.js\n// (c) 2010-2016 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n;(function($, undefined){\n var document = window.document, docElem = document.documentElement,\n origShow = $.fn.show, origHide = $.fn.hide, origToggle = $.fn.toggle\n\n function anim(el, speed, opacity, scale, callback) {\n if (typeof speed == 'function' && !callback) callback = speed, speed = undefined\n var props = { opacity: opacity }\n if (scale) {\n props.scale = scale\n el.css($.fx.cssPrefix + 'transform-origin', '0 0')\n }\n return el.animate(props, speed, null, callback)\n }\n\n function hide(el, speed, scale, callback) {\n return anim(el, speed, 0, scale, function(){\n origHide.call($(this))\n callback && callback.call(this)\n })\n }\n\n $.fn.show = function(speed, callback) {\n origShow.call(this)\n if (speed === undefined) speed = 0\n else this.css('opacity', 0)\n return anim(this, speed, 1, '1,1', callback)\n }\n\n $.fn.hide = function(speed, callback) {\n if (speed === undefined) return origHide.call(this)\n else return hide(this, speed, '0,0', callback)\n }\n\n $.fn.toggle = function(speed, callback) {\n if (speed === undefined || typeof speed == 'boolean')\n return origToggle.call(this, speed)\n else return this.each(function(){\n var el = $(this)\n el[el.css('display') == 'none' ? 'show' : 'hide'](speed, callback)\n })\n }\n\n $.fn.fadeTo = function(speed, opacity, callback) {\n return anim(this, speed, opacity, null, callback)\n }\n\n $.fn.fadeIn = function(speed, callback) {\n var target = this.css('opacity')\n if (target > 0) this.css('opacity', 0)\n else target = 1\n return origShow.call(this).fadeTo(speed, target, callback)\n }\n\n $.fn.fadeOut = function(speed, callback) {\n return hide(this, speed, null, callback)\n }\n\n $.fn.fadeToggle = function(speed, callback) {\n return this.each(function(){\n var el = $(this)\n el[\n (el.css('opacity') == 0 || el.css('display') == 'none') ? 'fadeIn' : 'fadeOut'\n ](speed, callback)\n })\n }\n\n})(Zepto)\n","/*!\n * HC-Sticky\n * =========\n * Version: 2.2.3\n * Author: Some Web Media\n * Author URL: http://somewebmedia.com\n * Plugin URL: https://github.com/somewebmedia/hc-sticky\n * Description: Cross-browser plugin that makes any element on your page visible while you scroll\n * License: MIT\n */\n!function(t,e){\"use strict\";if(\"object\"==typeof module&&\"object\"==typeof module.exports){if(!t.document)throw new Error(\"HC-Sticky requires a browser to run.\");module.exports=e(t)}else\"function\"==typeof define&&define.amd?define(\"hcSticky\",[],e(t)):e(t)}(\"undefined\"!=typeof window?window:this,function(U){\"use strict\";var Y={top:0,bottom:0,bottomEnd:0,innerTop:0,innerSticker:null,stickyClass:\"sticky\",stickTo:null,followScroll:!0,responsive:null,mobileFirst:!1,onStart:null,onStop:null,onBeforeResize:null,onResize:null,resizeDebounce:100,disable:!1,queries:null,queryFlow:\"down\"},$=function(t,e,o){console.log(\"%c! HC Sticky:%c \"+t+\"%c \"+o+\" is now deprecated and will be removed. Use%c \"+e+\"%c instead.\",\"color: red\",\"color: darkviolet\",\"color: black\",\"color: darkviolet\",\"color: black\")},Q=U.document,X=function(n,f){var o=this;if(\"string\"==typeof n&&(n=Q.querySelector(n)),!n)return!1;f.queries&&$(\"queries\",\"responsive\",\"option\"),f.queryFlow&&$(\"queryFlow\",\"mobileFirst\",\"option\");var p={},d=X.Helpers,s=n.parentNode;\"static\"===d.getStyle(s,\"position\")&&(s.style.position=\"relative\");var u=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d.isEmptyObject(t)&&!d.isEmptyObject(p)||(p=Object.assign({},Y,p,t))},t=function(){return p.disable},e=function(){var t,e=p.responsive||p.queries;if(e){var o=U.innerWidth;if(t=f,(p=Object.assign({},Y,t||{})).mobileFirst)for(var i in e)i<=o&&!d.isEmptyObject(e[i])&&u(e[i]);else{var n=[];for(var s in e){var r={};r[s]=e[s],n.push(r)}for(var l=n.length-1;0<=l;l--){var a=n[l],c=Object.keys(a)[0];o<=c&&!d.isEmptyObject(a[c])&&u(a[c])}}}},r={css:{},position:null,stick:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d.hasClass(n,p.stickyClass)||(!1===l.isAttached&&l.attach(),r.position=\"fixed\",n.style.position=\"fixed\",n.style.left=l.offsetLeft+\"px\",n.style.width=l.width,void 0===t.bottom?n.style.bottom=\"auto\":n.style.bottom=t.bottom+\"px\",void 0===t.top?n.style.top=\"auto\":n.style.top=t.top+\"px\",n.classList?n.classList.add(p.stickyClass):n.className+=\" \"+p.stickyClass,p.onStart&&p.onStart.call(n,Object.assign({},p)))},release:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(t.stop=t.stop||!1,!0===t.stop||\"fixed\"===r.position||null===r.position||!(void 0===t.top&&void 0===t.bottom||void 0!==t.top&&(parseInt(d.getStyle(n,\"top\"))||0)===t.top||void 0!==t.bottom&&(parseInt(d.getStyle(n,\"bottom\"))||0)===t.bottom)){!0===t.stop?!0===l.isAttached&&l.detach():!1===l.isAttached&&l.attach();var e=t.position||r.css.position;r.position=e,n.style.position=e,n.style.left=!0===t.stop?r.css.left:l.positionLeft+\"px\",n.style.width=\"absolute\"!==e?r.css.width:l.width,void 0===t.bottom?n.style.bottom=!0===t.stop?\"\":\"auto\":n.style.bottom=t.bottom+\"px\",void 0===t.top?n.style.top=!0===t.stop?\"\":\"auto\":n.style.top=t.top+\"px\",n.classList?n.classList.remove(p.stickyClass):n.className=n.className.replace(new RegExp(\"(^|\\\\b)\"+p.stickyClass.split(\" \").join(\"|\")+\"(\\\\b|$)\",\"gi\"),\" \"),p.onStop&&p.onStop.call(n,Object.assign({},p))}}},l={el:Q.createElement(\"div\"),offsetLeft:null,positionLeft:null,width:null,isAttached:!1,init:function(){for(var t in l.el.className=\"sticky-spacer\",r.css)l.el.style[t]=r.css[t];l.el.style[\"z-index\"]=\"-1\";var e=d.getStyle(n);l.offsetLeft=d.offset(n).left-(parseInt(e.marginLeft)||0),l.positionLeft=d.position(n).left,l.width=d.getStyle(n,\"width\")},attach:function(){s.insertBefore(l.el,n),l.isAttached=!0},detach:function(){l.el=s.removeChild(l.el),l.isAttached=!1}},a=void 0,c=void 0,g=void 0,m=void 0,h=void 0,v=void 0,y=void 0,b=void 0,S=void 0,w=void 0,k=void 0,E=void 0,x=void 0,L=void 0,T=void 0,j=void 0,O=void 0,C=void 0,i=function(){var t,e,o,i;r.css=(t=n,e=d.getCascadedStyle(t),o=d.getStyle(t),i={height:t.offsetHeight+\"px\",left:e.left,right:e.right,top:e.top,bottom:e.bottom,position:o.position,display:o.display,verticalAlign:o.verticalAlign,boxSizing:o.boxSizing,marginLeft:e.marginLeft,marginRight:e.marginRight,marginTop:e.marginTop,marginBottom:e.marginBottom,paddingLeft:e.paddingLeft,paddingRight:e.paddingRight},e.float&&(i.float=e.float||\"none\"),e.cssFloat&&(i.cssFloat=e.cssFloat||\"none\"),o.MozBoxSizing&&(i.MozBoxSizing=o.MozBoxSizing),i.width=\"auto\"!==e.width?e.width:\"border-box\"===i.boxSizing||\"border-box\"===i.MozBoxSizing?t.offsetWidth+\"px\":o.width,i),l.init(),a=!(!p.stickTo||!(\"document\"===p.stickTo||p.stickTo.nodeType&&9===p.stickTo.nodeType||\"object\"==typeof p.stickTo&&p.stickTo instanceof(\"undefined\"!=typeof HTMLDocument?HTMLDocument:Document))),c=p.stickTo?a?Q:\"string\"==typeof p.stickTo?Q.querySelector(p.stickTo):p.stickTo:s,T=(C=function(){var t=n.offsetHeight+(parseInt(r.css.marginTop)||0)+(parseInt(r.css.marginBottom)||0),e=(T||0)-t;return-1<=e&&e<=1?T:t})(),m=(O=function(){return a?Math.max(Q.documentElement.clientHeight,Q.body.scrollHeight,Q.documentElement.scrollHeight,Q.body.offsetHeight,Q.documentElement.offsetHeight):c.offsetHeight})(),h=a?0:d.offset(c).top,v=p.stickTo?a?0:d.offset(s).top:h,y=U.innerHeight,j=n.offsetTop-(parseInt(r.css.marginTop)||0),g=p.innerSticker?\"string\"==typeof p.innerSticker?Q.querySelector(p.innerSticker):p.innerSticker:null,b=isNaN(p.top)&&-1<p.top.indexOf(\"%\")?parseFloat(p.top)/100*y:p.top,S=isNaN(p.bottom)&&-1<p.bottom.indexOf(\"%\")?parseFloat(p.bottom)/100*y:p.bottom,w=g?g.offsetTop:p.innerTop?p.innerTop:0,k=isNaN(p.bottomEnd)&&-1<p.bottomEnd.indexOf(\"%\")?parseFloat(p.bottomEnd)/100*y:p.bottomEnd,E=h-b+w+j},z=U.pageYOffset||Q.documentElement.scrollTop,N=0,H=void 0,R=function(){T=C(),m=O(),x=h+m-b-k,L=y<T;var t=U.pageYOffset||Q.documentElement.scrollTop,e=d.offset(n).top,o=e-t,i=void 0;H=t<z?\"up\":\"down\",N=t-z,E<(z=t)?x+b+(L?S:0)-(p.followScroll&&L?0:b)<=t+T-w-(y-(E-w)<T-w&&p.followScroll&&0<(i=T-y-w)?i:0)?r.release({position:\"absolute\",bottom:v+s.offsetHeight-x-b}):L&&p.followScroll?\"down\"===H?o+T+S<=y+.9?r.stick({bottom:S}):\"fixed\"===r.position&&r.release({position:\"absolute\",top:e-b-E-N+w}):Math.ceil(o+w)<0&&\"fixed\"===r.position?r.release({position:\"absolute\",top:e-b-E+w-N}):t+b-w<=e&&r.stick({top:b-w}):r.stick({top:b-w}):r.release({stop:!0})},A=!1,B=!1,I=function(){A&&(d.event.unbind(U,\"scroll\",R),A=!1)},q=function(){null!==n.offsetParent&&\"none\"!==d.getStyle(n,\"display\")?(i(),m<=T?I():(R(),A||(d.event.bind(U,\"scroll\",R),A=!0))):I()},F=function(){n.style.position=\"\",n.style.left=\"\",n.style.top=\"\",n.style.bottom=\"\",n.style.width=\"\",n.classList?n.classList.remove(p.stickyClass):n.className=n.className.replace(new RegExp(\"(^|\\\\b)\"+p.stickyClass.split(\" \").join(\"|\")+\"(\\\\b|$)\",\"gi\"),\" \"),r.css={},!(r.position=null)===l.isAttached&&l.detach()},M=function(){F(),e(),t()?I():q()},D=function(){p.onBeforeResize&&p.onBeforeResize.call(n,Object.assign({},p)),M(),p.onResize&&p.onResize.call(n,Object.assign({},p))},P=p.resizeDebounce?d.debounce(D,p.resizeDebounce):D,W=function(){B&&(d.event.unbind(U,\"resize\",P),B=!1),I()},V=function(){B||(d.event.bind(U,\"resize\",P),B=!0),e(),t()?I():q()};this.options=function(t){return t?p[t]:Object.assign({},p)},this.refresh=M,this.update=function(t){u(t),f=Object.assign({},f,t||{}),M()},this.attach=V,this.detach=W,this.destroy=function(){W(),F()},this.triggerMethod=function(t,e){\"function\"==typeof o[t]&&o[t](e)},this.reinit=function(){$(\"reinit\",\"refresh\",\"method\"),M()},u(f),V(),d.event.bind(U,\"load\",M)};if(void 0!==U.jQuery){var i=U.jQuery,n=\"hcSticky\";i.fn.extend({hcSticky:function(e,o){return this.length?\"options\"===e?i.data(this.get(0),n).options():this.each(function(){var t=i.data(this,n);t?t.triggerMethod(e,o):(t=new X(this,e),i.data(this,n,t))}):this}})}return U.hcSticky=U.hcSticky||X,X}),function(c){\"use strict\";var t=c.hcSticky,f=c.document;\"function\"!=typeof Object.assign&&Object.defineProperty(Object,\"assign\",{value:function(t,e){if(null==t)throw new TypeError(\"Cannot convert undefined or null to object\");for(var o=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(o[s]=n[s])}return o},writable:!0,configurable:!0}),Array.prototype.forEach||(Array.prototype.forEach=function(t){var e,o;if(null==this)throw new TypeError(\"this is null or not defined\");var i=Object(this),n=i.length>>>0;if(\"function\"!=typeof t)throw new TypeError(t+\" is not a function\");for(1<arguments.length&&(e=arguments[1]),o=0;o<n;){var s;o in i&&(s=i[o],t.call(e,s,o,i)),o++}});var e=function(){var t=f.documentElement,e=function(){};function i(t){var e=c.event;return e.target=e.target||e.srcElement||t,e}t.addEventListener?e=function(t,e,o){t.addEventListener(e,o,!1)}:t.attachEvent&&(e=function(e,t,o){e[t+o]=o.handleEvent?function(){var t=i(e);o.handleEvent.call(o,t)}:function(){var t=i(e);o.call(e,t)},e.attachEvent(\"on\"+t,e[t+o])});var o=function(){};return t.removeEventListener?o=function(t,e,o){t.removeEventListener(e,o,!1)}:t.detachEvent&&(o=function(e,o,i){e.detachEvent(\"on\"+o,e[o+i]);try{delete e[o+i]}catch(t){e[o+i]=void 0}}),{bind:e,unbind:o}}(),r=function(t,e){return c.getComputedStyle?e?f.defaultView.getComputedStyle(t,null).getPropertyValue(e):f.defaultView.getComputedStyle(t,null):t.currentStyle?e?t.currentStyle[e.replace(/-\\w/g,function(t){return t.toUpperCase().replace(\"-\",\"\")})]:t.currentStyle:void 0},l=function(t){var e=t.getBoundingClientRect(),o=c.pageYOffset||f.documentElement.scrollTop,i=c.pageXOffset||f.documentElement.scrollLeft;return{top:e.top+o,left:e.left+i}};t.Helpers={isEmptyObject:function(t){for(var e in t)return!1;return!0},debounce:function(i,n,s){var r=void 0;return function(){var t=this,e=arguments,o=s&&!r;clearTimeout(r),r=setTimeout(function(){r=null,s||i.apply(t,e)},n),o&&i.apply(t,e)}},hasClass:function(t,e){return t.classList?t.classList.contains(e):new RegExp(\"(^| )\"+e+\"( |$)\",\"gi\").test(t.className)},offset:l,position:function(t){var e=t.offsetParent,o=l(e),i=l(t),n=r(e),s=r(t);return o.top+=parseInt(n.borderTopWidth)||0,o.left+=parseInt(n.borderLeftWidth)||0,{top:i.top-o.top-(parseInt(s.marginTop)||0),left:i.left-o.left-(parseInt(s.marginLeft)||0)}},getStyle:r,getCascadedStyle:function(t){var e=t.cloneNode(!0);e.style.display=\"none\",Array.prototype.slice.call(e.querySelectorAll('input[type=\"radio\"]')).forEach(function(t){t.removeAttribute(\"name\")}),t.parentNode.insertBefore(e,t.nextSibling);var o=void 0;e.currentStyle?o=e.currentStyle:c.getComputedStyle&&(o=f.defaultView.getComputedStyle(e,null));var i={};for(var n in o)!isNaN(n)||\"string\"!=typeof o[n]&&\"number\"!=typeof o[n]||(i[n]=o[n]);if(Object.keys(i).length<3)for(var s in i={},o)isNaN(s)||(i[o[s].replace(/-\\w/g,function(t){return t.toUpperCase().replace(\"-\",\"\")})]=o.getPropertyValue(o[s]));if(i.margin||\"auto\"!==i.marginLeft?i.margin||i.marginLeft!==i.marginRight||i.marginLeft!==i.marginTop||i.marginLeft!==i.marginBottom||(i.margin=i.marginLeft):i.margin=\"auto\",!i.margin&&\"0px\"===i.marginLeft&&\"0px\"===i.marginRight){var r=t.offsetLeft-t.parentNode.offsetLeft,l=r-(parseInt(i.left)||0)-(parseInt(i.right)||0),a=t.parentNode.offsetWidth-t.offsetWidth-r-(parseInt(i.right)||0)+(parseInt(i.left)||0)-l;0!==a&&1!==a||(i.margin=\"auto\")}return e.parentNode.removeChild(e),e=null,i},event:e}}(window);","module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","/* globals __webpack_amd_options__ */\nmodule.exports = __webpack_amd_options__;\n","/* ========================================================================\n * Bootstrap: dropdown.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#dropdowns\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // DROPDOWN CLASS DEFINITION\n // =========================\n\n var backdrop = '.dropdown-backdrop'\n var toggle = '[data-toggle=\"dropdown\"]'\n var Dropdown = function (element) {\n $(element).on('click.bs.dropdown', this.toggle)\n }\n\n Dropdown.VERSION = '3.4.1'\n\n function getParent($this) {\n var selector = $this.attr('data-target')\n\n if (!selector) {\n selector = $this.attr('href')\n selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n }\n\n var $parent = selector !== '#' ? $(document).find(selector) : null\n\n return $parent && $parent.length ? $parent : $this.parent()\n }\n\n function clearMenus(e) {\n if (e && e.which === 3) return\n $(backdrop).remove()\n $(toggle).each(function () {\n var $this = $(this)\n var $parent = getParent($this)\n var relatedTarget = { relatedTarget: this }\n\n if (!$parent.hasClass('open')) return\n\n if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return\n\n $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))\n\n if (e.isDefaultPrevented()) return\n\n $this.attr('aria-expanded', 'false')\n $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))\n })\n }\n\n Dropdown.prototype.toggle = function (e) {\n var $this = $(this)\n\n if ($this.is('.disabled, :disabled')) return\n\n var $parent = getParent($this)\n var isActive = $parent.hasClass('open')\n\n clearMenus()\n\n if (!isActive) {\n if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {\n // if mobile we use a backdrop because click events don't delegate\n $(document.createElement('div'))\n .addClass('dropdown-backdrop')\n .insertAfter($(this))\n .on('click', clearMenus)\n }\n\n var relatedTarget = { relatedTarget: this }\n $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))\n\n if (e.isDefaultPrevented()) return\n\n $this\n .trigger('focus')\n .attr('aria-expanded', 'true')\n\n $parent\n .toggleClass('open')\n .trigger($.Event('shown.bs.dropdown', relatedTarget))\n }\n\n return false\n }\n\n Dropdown.prototype.keydown = function (e) {\n if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return\n\n var $this = $(this)\n\n e.preventDefault()\n e.stopPropagation()\n\n if ($this.is('.disabled, :disabled')) return\n\n var $parent = getParent($this)\n var isActive = $parent.hasClass('open')\n\n if (!isActive && e.which != 27 || isActive && e.which == 27) {\n if (e.which == 27) $parent.find(toggle).trigger('focus')\n return $this.trigger('click')\n }\n\n var desc = ' li:not(.disabled):visible a'\n var $items = $parent.find('.dropdown-menu' + desc)\n\n if (!$items.length) return\n\n var index = $items.index(e.target)\n\n if (e.which == 38 && index > 0) index-- // up\n if (e.which == 40 && index < $items.length - 1) index++ // down\n if (!~index) index = 0\n\n $items.eq(index).trigger('focus')\n }\n\n\n // DROPDOWN PLUGIN DEFINITION\n // ==========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.dropdown')\n\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n if (typeof option == 'string') data[option].call($this)\n })\n }\n\n var old = $.fn.dropdown\n\n $.fn.dropdown = Plugin\n $.fn.dropdown.Constructor = Dropdown\n\n\n // DROPDOWN NO CONFLICT\n // ====================\n\n $.fn.dropdown.noConflict = function () {\n $.fn.dropdown = old\n return this\n }\n\n\n // APPLY TO STANDARD DROPDOWN ELEMENTS\n // ===================================\n\n $(document)\n .on('click.bs.dropdown.data-api', clearMenus)\n .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\n .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)\n .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)\n .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)\n\n}(jQuery);\n","/* ========================================================================\n * Bootstrap: transition.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#transitions\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)\n // ============================================================\n\n function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n WebkitTransition : 'webkitTransitionEnd',\n MozTransition : 'transitionend',\n OTransition : 'oTransitionEnd otransitionend',\n transition : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n\n return false // explicit for ie8 ( ._.)\n }\n\n // https://blog.alexmaccaw.com/css-transitions\n $.fn.emulateTransitionEnd = function (duration) {\n var called = false\n var $el = this\n $(this).one('bsTransitionEnd', function () { called = true })\n var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\n setTimeout(callback, duration)\n return this\n }\n\n $(function () {\n $.support.transition = transitionEnd()\n\n if (!$.support.transition) return\n\n $.event.special.bsTransitionEnd = {\n bindType: $.support.transition.end,\n delegateType: $.support.transition.end,\n handle: function (e) {\n if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)\n }\n }\n })\n\n}(jQuery);\n","/* eslint-disable */\n;(function() {\n\"use strict\"\n/* eslint-enable */\nStream.SKIP = {}\nStream.lift = lift\nStream.scan = scan\nStream.merge = merge\nStream.combine = combine\nStream.scanMerge = scanMerge\nStream[\"fantasy-land/of\"] = Stream\n\nvar warnedHalt = false\nObject.defineProperty(Stream, \"HALT\", {\n\tget: function() {\n\t\twarnedHalt || console.log(\"HALT is deprecated and has been renamed to SKIP\");\n\t\twarnedHalt = true\n\t\treturn Stream.SKIP\n\t}\n})\n\nfunction Stream(value) {\n\tvar dependentStreams = []\n\tvar dependentFns = []\n\n\tfunction stream(v) {\n\t\tif (arguments.length && v !== Stream.SKIP) {\n\t\t\tvalue = v\n\t\t\tif (open(stream)) {\n\t\t\t\tstream._changing()\n\t\t\t\tstream._state = \"active\"\n\t\t\t\tdependentStreams.forEach(function(s, i) { s(dependentFns[i](value)) })\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n\tstream.constructor = Stream\n\tstream._state = arguments.length && value !== Stream.SKIP ? \"active\" : \"pending\"\n\tstream._parents = []\n\n\tstream._changing = function() {\n\t\tif (open(stream)) stream._state = \"changing\"\n\t\tdependentStreams.forEach(function(s) {\n\t\t\ts._changing()\n\t\t})\n\t}\n\n\tstream._map = function(fn, ignoreInitial) {\n\t\tvar target = ignoreInitial ? Stream() : Stream(fn(value))\n\t\ttarget._parents.push(stream)\n\t\tdependentStreams.push(target)\n\t\tdependentFns.push(fn)\n\t\treturn target\n\t}\n\n\tstream.map = function(fn) {\n\t\treturn stream._map(fn, stream._state !== \"active\")\n\t}\n\n\tvar end\n\tfunction createEnd() {\n\t\tend = Stream()\n\t\tend.map(function(value) {\n\t\t\tif (value === true) {\n\t\t\t\tstream._parents.forEach(function (p) {p._unregisterChild(stream)})\n\t\t\t\tstream._state = \"ended\"\n\t\t\t\tstream._parents.length = dependentStreams.length = dependentFns.length = 0\n\t\t\t}\n\t\t\treturn value\n\t\t})\n\t\treturn end\n\t}\n\n\tstream.toJSON = function() { return value != null && typeof value.toJSON === \"function\" ? value.toJSON() : value }\n\n\tstream[\"fantasy-land/map\"] = stream.map\n\tstream[\"fantasy-land/ap\"] = function(x) { return combine(function(s1, s2) { return s1()(s2()) }, [x, stream]) }\n\n\tstream._unregisterChild = function(child) {\n\t\tvar childIndex = dependentStreams.indexOf(child)\n\t\tif (childIndex !== -1) {\n\t\t\tdependentStreams.splice(childIndex, 1)\n\t\t\tdependentFns.splice(childIndex, 1)\n\t\t}\n\t}\n\n\tObject.defineProperty(stream, \"end\", {\n\t\tget: function() { return end || createEnd() }\n\t})\n\n\treturn stream\n}\n\nfunction combine(fn, streams) {\n\tvar ready = streams.every(function(s) {\n\t\tif (s.constructor !== Stream)\n\t\t\tthrow new Error(\"Ensure that each item passed to stream.combine/stream.merge/lift is a stream\")\n\t\treturn s._state === \"active\"\n\t})\n\tvar stream = ready\n\t\t? Stream(fn.apply(null, streams.concat([streams])))\n\t\t: Stream()\n\n\tvar changed = []\n\n\tvar mappers = streams.map(function(s) {\n\t\treturn s._map(function(value) {\n\t\t\tchanged.push(s)\n\t\t\tif (ready || streams.every(function(s) { return s._state !== \"pending\" })) {\n\t\t\t\tready = true\n\t\t\t\tstream(fn.apply(null, streams.concat([changed])))\n\t\t\t\tchanged = []\n\t\t\t}\n\t\t\treturn value\n\t\t}, true)\n\t})\n\n\tvar endStream = stream.end.map(function(value) {\n\t\tif (value === true) {\n\t\t\tmappers.forEach(function(mapper) { mapper.end(true) })\n\t\t\tendStream.end(true)\n\t\t}\n\t\treturn undefined\n\t})\n\n\treturn stream\n}\n\nfunction merge(streams) {\n\treturn combine(function() { return streams.map(function(s) { return s() }) }, streams)\n}\n\nfunction scan(fn, acc, origin) {\n\tvar stream = origin.map(function(v) {\n\t\tvar next = fn(acc, v)\n\t\tif (next !== Stream.SKIP) acc = next\n\t\treturn next\n\t})\n\tstream(acc)\n\treturn stream\n}\n\nfunction scanMerge(tuples, seed) {\n\tvar streams = tuples.map(function(tuple) { return tuple[0] })\n\n\tvar stream = combine(function() {\n\t\tvar changed = arguments[arguments.length - 1]\n\t\tstreams.forEach(function(stream, i) {\n\t\t\tif (changed.indexOf(stream) > -1)\n\t\t\t\tseed = tuples[i][1](seed, stream())\n\t\t})\n\n\t\treturn seed\n\t}, streams)\n\n\tstream(seed)\n\n\treturn stream\n}\n\nfunction lift() {\n\tvar fn = arguments[0]\n\tvar streams = Array.prototype.slice.call(arguments, 1)\n\treturn merge(streams).map(function(streams) {\n\t\treturn fn.apply(undefined, streams)\n\t})\n}\n\nfunction open(s) {\n\treturn s._state === \"pending\" || s._state === \"active\" || s._state === \"changing\"\n}\n\nif (typeof module !== \"undefined\") module[\"exports\"] = Stream\nelse if (typeof window.m === \"function\" && !(\"stream\" in window.m)) window.m.stream = Stream\nelse window.m = {stream : Stream}\n\n}());\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","var arrayEach = require('./_arrayEach'),\n baseEach = require('./_baseEach'),\n castFunction = require('./_castFunction'),\n isArray = require('./isArray');\n\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, castFunction(iteratee));\n}\n\nmodule.exports = forEach;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","var baseSet = require('./_baseSet');\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n}\n\nmodule.exports = set;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","var identity = require('./identity');\n\n/**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\nfunction castFunction(value) {\n return typeof value == 'function' ? value : identity;\n}\n\nmodule.exports = castFunction;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import forEach from 'lodash/forEach';\r\nimport get from 'lodash/get';\r\nimport set from 'lodash/set';\r\n\r\nexport default class Bus {\r\n subscribers = {};\r\n\r\n subscribe(event, callable) {\r\n set(this.subscribers, event + '[]', callable);\r\n }\r\n\r\n dispatch(event, args: any = null) {\r\n forEach(get(this.subscribers, event), function(listener) {\r\n listener(event, args);\r\n });\r\n }\r\n}","/**\r\n * The `extract` utility deletes a property from an object and returns its\r\n * value.\r\n */\r\nexport default function extract(object: object, property: string): any {\r\n const value = object[property];\r\n\r\n delete object[property];\r\n\r\n return value;\r\n}\r\n","/**\r\n * Extract the text nodes from a virtual element.\r\n *\r\n * @param {VirtualElement} vdom\r\n * @return {String}\r\n */\r\nexport default function extractText(vdom: any): string {\r\n if (vdom instanceof Array) {\r\n return vdom.map(element => extractText(element)).join('');\r\n } else if (typeof vdom === 'object' && vdom !== null) {\r\n return vdom.text || extractText(vdom.children);\r\n } else {\r\n return vdom;\r\n }\r\n}\r\n","/**\r\n * The `username` helper displays a user's username in a <span class=\"username\">\r\n * tag. If the user doesn't exist, the username will be displayed as [deleted].\r\n *\r\n * @param {User} user\r\n */\r\nexport default function username(user): any {\r\n const name = (user && user.displayName()) || app.translator.trans('core.lib.username.deleted_text');\r\n\r\n return <span className=\"username\">{name}</span>;\r\n}\r\n","import extract from './utils/extract';\r\nimport extractText from './utils/extractText';\r\nimport username from './helpers/username';\r\n\r\ntype Translations = { [key: string]: string };\r\n\r\nexport default class Translator {\r\n translations: Translations = {};\r\n locale = null;\r\n\r\n constructor() {\r\n /**\r\n * A map of translation keys to their translated values.\r\n *\r\n * @type {Object}\r\n * @public\r\n */\r\n this.translations = {};\r\n\r\n this.locale = null;\r\n }\r\n\r\n addTranslations(translations) {\r\n Object.assign(this.translations, translations);\r\n }\r\n\r\n trans(id: string, parameters = null) {\r\n const translation = this.translations[id];\r\n\r\n if (translation) {\r\n return this.apply(translation, parameters || {});\r\n }\r\n\r\n return id;\r\n }\r\n\r\n transText(id: string, parameters = null) {\r\n return extractText(this.trans(id, parameters));\r\n }\r\n\r\n apply(translation: string, input: any) {\r\n if ('user' in input) {\r\n const user = extract(input, 'user');\r\n if (!input.username) input.username = username(user);\r\n }\r\n\r\n const parts = translation.split(new RegExp('({[a-z0-9_]+}|</?[a-z0-9_]+>)', 'gi'));\r\n\r\n const hydrated: any[] = [];\r\n const open: any[][] = [hydrated];\r\n\r\n parts.forEach(part => {\r\n const match = part.match(new RegExp('{([a-z0-9_]+)}|<(/?)([a-z0-9_]+)>', 'i'));\r\n\r\n if (match) {\r\n if (match[1]) {\r\n open[0].push(input[match[1]]);\r\n } else if (match[3]) {\r\n if (match[2]) {\r\n open.shift();\r\n } else {\r\n let tag = input[match[3]] || { tag: match[3], children: [] };\r\n open[0].push(tag);\r\n open.unshift(tag.children || tag);\r\n }\r\n }\r\n } else {\r\n open[0].push({ tag: 'span', text: part });\r\n }\r\n });\r\n\r\n return hydrated.filter(part => part);\r\n }\r\n}\r\n","import User from './models/User';\n\n/**\n * The `Session` class defines the current user session. It stores a reference\n * to the current authenticated user, and provides methods to log in/out.\n */\nexport default class Session {\n /**\n * The current authenticated user.\n */\n user?: User;\n\n /**\n * The CSRF token.\n */\n csrfToken?: string;\n\n constructor(user, csrfToken) {\n this.user = user;\n\n this.csrfToken = csrfToken;\n }\n\n /**\n * Attempt to log in a user.\n */\n login(body: { identification: string, password: string, remember?: string }, options = {}) {\n return app.request(Object.assign({\n method: 'POST',\n url: `${app.forum.attribute('baseUrl')}/login`,\n body\n }, options));\n }\n\n /**\n * Log the user out.\n *\n * @public\n */\n logout() {\n window.location.href = `${app.forum.attribute('baseUrl')}/logout?token=${this.csrfToken}`;\n }\n}\n","import Model from './Model';\n\n/**\n * The `Store` class defines a local data store, and provides methods to\n * retrieve data from the API.\n */\nexport default class Store {\n /**\n * The local data store. A tree of resource types to IDs, such that\n * accessing data[type][id] will return the model for that type/ID.\n */\n data: { [key: string]: { [key: number]: Model }} = {};\n\n /**\n * The model registry. A map of resource types to the model class that\n * should be used to represent resources of that type.\n */\n models: {};\n\n constructor(models) {\n this.models = models;\n }\n\n /**\n * Push resources contained within an API payload into the store.\n *\n * @param payload\n * @return The model(s) representing the resource(s) contained\n * within the 'data' key of the payload.\n */\n pushPayload(payload: { included?: {}[], data?: {}|{}[] }): Model|Model[] {\n if (payload.included) payload.included.map(this.pushObject.bind(this));\n\n const result: any = payload.data instanceof Array\n ? payload.data.map(this.pushObject.bind(this))\n : this.pushObject(payload.data);\n\n // Attach the original payload to the model that we give back. This is\n // useful to consumers as it allows them to access meta information\n // associated with their request.\n result.payload = payload;\n\n return result;\n }\n\n /**\n * Create a model to represent a resource object (or update an existing one),\n * and push it into the store.\n *\n * @param {Object} data The resource object\n * @return The model, or null if no model class has been\n * registered for this resource type.\n */\n pushObject(data): Model {\n if (!this.models[data.type]) return null;\n\n const type = this.data[data.type] = this.data[data.type] || {};\n\n if (type[data.id]) {\n type[data.id].pushData(data);\n } else {\n type[data.id] = this.createRecord(data.type, data);\n }\n\n type[data.id].exists = true;\n\n return type[data.id];\n }\n\n /**\n * Make a request to the API to find record(s) of a specific type.\n *\n * @param type The resource type.\n * @param [id] The ID(s) of the model(s) to retrieve.\n * Alternatively, if an object is passed, it will be handled as the\n * `query` parameter.\n * @param query\n * @param options\n */\n find<T extends Model = Model>(type: string, id?: number|number[]|any, query = {}, options = {}): Promise<T[]> {\n let body = query;\n let url = `${app.forum.attribute('apiUrl')}/${type}`;\n\n if (id instanceof Array) {\n url += `?filter[id]=${id.join(',')}`;\n } else if (typeof id === 'object') {\n body = id;\n } else if (id) {\n url += `/${id}`;\n }\n\n return app.request(Object.assign({\n method: 'GET',\n url,\n body\n }, options)).then(this.pushPayload.bind(this));\n }\n\n /**\n * Get a record from the store by ID.\n *\n * @param type The resource type.\n * @param id The resource ID.\n */\n getById<T extends Model = Model>(type: string, id: number): T {\n return this.data[type] && this.data[type][id] as T;\n }\n\n /**\n * Get a record from the store by the value of a model attribute.\n *\n * @param type The resource type.\n * @param key The name of the method on the model.\n * @param value The value of the model attribute.\n */\n getBy<T extends Model = Model>(type: string, key: string, value: any): T {\n return this.all<T>(type).filter(model => model[key]() === value)[0];\n }\n\n /**\n * Get all loaded records of a specific type.\n */\n all<T extends Model = Model>(type: string): T[] {\n const records = this.data[type];\n\n return records ? Object.keys(records).map(id => records[id]) : [];\n }\n\n /**\n * Remove the given model from the store.\n */\n remove(model: Model) {\n delete this.data[model.data.type][model.id()];\n }\n\n /**\n * Create a new record of the given type.\n *\n * @param {String} type The resource type\n * @param {Object} [data] Any data to initialize the model with\n */\n createRecord<T extends Model = Model>(type: string, data: any = {}): T {\n data.type = data.type || type;\n\n return new (this.models[type])(data, this);\n }\n}\n","/**\r\n * The `Drawer` class controls the page's drawer. The drawer is the area the\r\n * slides out from the left on mobile devices; it contains the header and the\r\n * footer.\r\n */\r\nexport default class Drawer {\r\n private $backdrop?: ZeptoCollection;\r\n\r\n constructor() {\r\n // Set up an event handler so that whenever the content area is tapped,\r\n // the drawer will close.\r\n $('#content').click(e => {\r\n if (this.isOpen()) {\r\n e.preventDefault();\r\n this.hide();\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Check whether or not the drawer is currently open.\r\n */\r\n isOpen(): boolean {\r\n return $('#app').hasClass('drawerOpen');\r\n }\r\n\r\n /**\r\n * Hide the drawer.\r\n */\r\n hide() {\r\n $('#app').removeClass('drawerOpen');\r\n\r\n if (this.$backdrop) this.$backdrop.remove();\r\n }\r\n\r\n /**\r\n * Show the drawer.\r\n *\r\n * @public\r\n */\r\n show() {\r\n $('#app').addClass('drawerOpen');\r\n\r\n this.$backdrop = $('<div/>')\r\n .addClass('drawer-backdrop fade')\r\n .appendTo('body')\r\n .click(() => this.hide());\r\n\r\n setTimeout(() => this.$backdrop.addClass('in'));\r\n }\r\n}\r\n","/**\r\n * Extend an object's method by running its output through a mutating callback\r\n * every time it is called.\r\n *\r\n * The callback accepts the method's return value and should perform any\r\n * mutations directly on this value. For this reason, this function will not be\r\n * effective on methods which return scalar values (numbers, strings, booleans).\r\n *\r\n * Care should be taken to extend the correct object – in most cases, a class'\r\n * prototype will be the desired target of extension, not the class itself.\r\n *\r\n * @example\r\n * extend(Discussion.prototype, 'badges', function(badges) {\r\n * // do something with `badges`\r\n * });\r\n *\r\n * @param {Object} object The object that owns the method\r\n * @param {String} method The name of the method to extend\r\n * @param {function} callback A callback which mutates the method's output\r\n */\r\nexport function extend(object, method, callback) {\r\n const original = object[method];\r\n\r\n object[method] = (...args) => {\r\n // @ts-ignore\r\n const value = original ? original.apply(object, args) : undefined;\r\n\r\n // @ts-ignore\r\n callback.apply(object, [value].concat(args));\r\n\r\n return value;\r\n };\r\n\r\n Object.assign(object[method], original);\r\n}\r\n\r\n/**\r\n * Override an object's method by replacing it with a new function, so that the\r\n * new function will be run every time the object's method is called.\r\n *\r\n * The replacement function accepts the original method as its first argument,\r\n * which is like a call to 'super'. Any arguments passed to the original method\r\n * are also passed to the replacement.\r\n *\r\n * Care should be taken to extend the correct object – in most cases, a class'\r\n * prototype will be the desired target of extension, not the class itself.\r\n *\r\n * @example\r\n * override(Discussion.prototype, 'badges', function(original) {\r\n * const badges = original();\r\n * // do something with badges\r\n * return badges;\r\n * });\r\n *\r\n * @param {Object} object The object that owns the method\r\n * @param {String} method The name of the method to override\r\n * @param {function} newMethod The method to replace it with\r\n */\r\nexport function override(object, method, newMethod) {\r\n const original = object[method];\r\n\r\n object[method] = function(...args) {\r\n // @ts-ignore\r\n return newMethod.apply(this, [original.bind(this)].concat(args));\r\n };\r\n\r\n Object.assign(object[method], original);\r\n}\r\n","/**\n * The `Model` class represents a local data resource. It provides methods to\n * persist changes via the API.\n *\n * @abstract\n */\nimport Store from \"./Store\";\n\nexport default class Model {\n /**\n * The resource object from the API.\n */\n data: any;\n\n /**\n * The time at which the model's data was last updated. Watching the value\n * of this property is a fast way to retain/cache a subtree if data hasn't\n * changed.\n */\n freshness: Date;\n\n /**\n * Whether or not the resource exists on the server.\n */\n exists: boolean;\n\n /**\n * The data store that this resource should be persisted to.\n */\n protected store: Store;\n\n /**\n * @param {Object} data A resource object from the API.\n * @param {Store} store The data store that this model should be persisted to.\n */\n constructor(data = {}, store = null) {\n this.data = data;\n this.store = store;\n\n this.freshness = new Date();\n this.exists = false;\n }\n\n /**\n * Get the model's ID.\n * @final\n */\n id(): string|number {\n return this.data.id;\n }\n\n /**\n * Get one of the model's attributes.\n * @final\n */\n attribute(attribute: string): any {\n return this.data.attributes[attribute];\n }\n\n /**\n * Merge new data into this model locally.\n *\n * @param data A resource object to merge into this model\n * @public\n */\n pushData(data: {}) {\n // Since most of the top-level items in a resource object are objects\n // (e.g. relationships, attributes), we'll need to check and perform the\n // merge at the second level if that's the case.\n for (const key in data) {\n if (typeof data[key] === 'object') {\n this.data[key] = this.data[key] || {};\n\n // For every item in a second-level object, we want to check if we've\n // been handed a Model instance. If so, we will convert it to a\n // relationship data object.\n for (const innerKey in data[key]) {\n if (data[key][innerKey] instanceof Model) {\n data[key][innerKey] = {data: Model.getIdentifier(data[key][innerKey])};\n }\n this.data[key][innerKey] = data[key][innerKey];\n }\n } else {\n this.data[key] = data[key];\n }\n }\n\n // Now that we've updated the data, we can say that the model is fresh.\n // This is an easy way to invalidate retained subtrees etc.\n this.freshness = new Date();\n }\n\n /**\n * Merge new attributes into this model locally.\n *\n * @param {Object} attributes The attributes to merge.\n */\n pushAttributes(attributes: any) {\n this.pushData({attributes});\n }\n\n /**\n * Merge new attributes into this model, both locally and with persistence.\n *\n * @param attributes The attributes to save. If a 'relationships' key\n * exists, it will be extracted and relationships will also be saved.\n * @param [options]\n * @return {Promise}\n */\n save(attributes: any, options: any = {}): Promise<Model|Model[]> {\n const data = {\n type: this.data.type,\n id: this.data.id,\n attributes,\n relationships: undefined\n };\n\n // If a 'relationships' key exists, extract it from the attributes hash and\n // set it on the top-level data object instead. We will be sending this data\n // object to the API for persistence.\n if (attributes.relationships) {\n data.relationships = {};\n\n for (const key in attributes.relationships) {\n const model = attributes.relationships[key];\n\n data.relationships[key] = {\n data: model instanceof Array\n ? model.map(Model.getIdentifier)\n : Model.getIdentifier(model)\n };\n }\n\n delete attributes.relationships;\n }\n\n // Before we update the model's data, we should make a copy of the model's\n // old data so that we can revert back to it if something goes awry during\n // persistence.\n const oldData = this.copyData();\n\n this.pushData(data);\n\n const request = {data};\n if (options.meta) request.meta = options.meta;\n\n return app.request(Object.assign({\n method: this.exists ? 'PATCH' : 'POST',\n url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n body: request\n }, options)).then(\n // If everything went well, we'll make sure the store knows that this\n // model exists now (if it didn't already), and we'll push the data that\n // the API returned into the store.\n payload => {\n this.store.data[payload.data.type] = this.store.data[payload.data.type] || {};\n this.store.data[payload.data.type][payload.data.id] = this;\n return this.store.pushPayload(payload);\n },\n\n // If something went wrong, though... good thing we backed up our model's\n // old data! We'll revert to that and let others handle the error.\n response => {\n this.pushData(oldData);\n m.redraw();\n throw response;\n }\n );\n }\n\n /**\n * Send a request to delete the resource.\n *\n * @param {Object} body Data to send along with the DELETE request.\n * @param {Object} [options]\n * @return {Promise}\n * @public\n */\n delete(body = {}, options = {}) {\n if (!this.exists) return Promise.resolve();\n\n return app.request(Object.assign({\n method: 'DELETE',\n url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n body\n }, options)).then(() => {\n this.exists = false;\n this.store.remove(this);\n });\n }\n\n /**\n * Construct a path to the API endpoint for this resource.\n *\n * @return {String}\n * @protected\n */\n apiEndpoint() {\n return '/' + this.data.type + (this.exists ? '/' + this.data.id : '');\n }\n\n copyData() {\n return JSON.parse(JSON.stringify(this.data));\n }\n\n /**\n * Generate a function which returns the value of the given attribute.\n *\n * @param {String} name\n * @param [transform] A function to transform the attribute value\n */\n static attribute(name: string, transform?: Function): () => any {\n return function() {\n const value = this.data.attributes && this.data.attributes[name];\n\n return transform ? transform(value) : value;\n };\n }\n\n /**\n * Generate a function which returns the value of the given has-one\n * relationship.\n *\n * @return false if no information about the\n * relationship exists; undefined if the relationship exists but the model\n * has not been loaded; or the model if it has been loaded.\n */\n static hasOne(name: string): () => Model|boolean {\n return function() {\n if (this.data.relationships) {\n const relationship = this.data.relationships[name];\n\n if (relationship) {\n return app.store.getById(relationship.data.type, relationship.data.id);\n }\n }\n\n return false;\n };\n }\n\n /**\n * Generate a function which returns the value of the given has-many\n * relationship.\n *\n * @return false if no information about the relationship\n * exists; an array if it does, containing models if they have been\n * loaded, and undefined for those that have not.\n */\n static hasMany(name: string): () => []|boolean {\n return function() {\n if (this.data.relationships) {\n const relationship = this.data.relationships[name];\n\n if (relationship) {\n return relationship.data.map(data => app.store.getById(data.type, data.id));\n }\n }\n\n return false;\n };\n }\n\n /**\n * Transform the given value into a Date object.\n */\n static transformDate(value: string): Date {\n return value ? new Date(value) : null;\n }\n\n /**\n * Get a resource identifier object for the given model.\n */\n protected static getIdentifier(model: Model): { type: string, id: string } {\n return {\n type: model.data.type,\n id: model.data.id\n };\n }\n}\n","import Model from '../Model';\r\n\r\nexport default class Forum extends Model {\r\n apiEndpoint() {\r\n return '/';\r\n }\r\n}\r\n","/**\n * The `computed` utility creates a function that will cache its output until\n * any of the dependent values are dirty.\n *\n * @param {...String} dependentKeys The keys of the dependent values.\n * @param {function} compute The function which computes the value using the\n * dependent values.\n */\nexport default function computed(dependentKeys: string|string[], compute: Function): () => any {\n const keys = Array.from(dependentKeys);\n\n const dependentValues = {};\n let computedValue;\n\n return function() {\n let recompute = false;\n\n // Read all of the dependent values. If any of them have changed since last\n // time, then we'll want to recompute our output.\n keys.forEach(key => {\n const value = typeof this[key] === 'function' ? this[key]() : this[key];\n\n if (dependentValues[key] !== value) {\n recompute = true;\n dependentValues[key] = value;\n }\n });\n\n if (recompute) {\n computedValue = compute.apply(this, keys.map(key => dependentValues[key]));\n }\n\n return computedValue;\n };\n}\n","class Item<T> {\r\n content: T;\r\n priority: number;\r\n key: number = 0;\r\n\r\n constructor(content: any, priority: number) {\r\n this.content = content;\r\n this.priority = priority;\r\n }\r\n}\r\n\r\nexport default class ItemList<T = any> {\r\n private items: { [key: string]: Item<T> } = {};\r\n\r\n /**\r\n * Check whether the list is empty.\r\n *\r\n * @returns {boolean}\r\n * @public\r\n */\r\n isEmpty(): boolean {\r\n for (const i in this.items) {\r\n if (this.items.hasOwnProperty(i)) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Check whether an item is present in the list.\r\n */\r\n has(key: any): boolean {\r\n return !!this.items[key];\r\n }\r\n\r\n /**\r\n * Get the content of an item.\r\n */\r\n get(key: any): T {\r\n return this.items[key].content;\r\n }\r\n\r\n /**\r\n * Add an item to the list.\r\n *\r\n * @param {String} key A unique key for the item.\r\n * @param {*} content The item's content.\r\n * @param {Integer} [priority] The priority of the item. Items with a higher\r\n * priority will be positioned before items with a lower priority.\r\n * @return {ItemList}\r\n * @public\r\n */\r\n add(key: any, content: T, priority = 0) {\r\n this.items[key] = new Item(content, priority);\r\n\r\n return this;\r\n }\r\n\r\n toArray(): T[] {\r\n const items: Item<T>[] = [];\r\n\r\n for (const i in this.items) {\r\n if (this.items.hasOwnProperty(i)) {\r\n if (this.items[i] !== null && this.items[i] instanceof Item) {\r\n this.items[i].content = Object(this.items[i].content);\r\n\r\n this.items[i].content.itemName = i;\r\n items.push(this.items[i]);\r\n this.items[i].key = items.length;\r\n }\r\n }\r\n }\r\n\r\n return items\r\n .sort((a, b) => {\r\n if (a.priority === b.priority) {\r\n return a.key - b.key;\r\n } else if (a.priority > b.priority) {\r\n return -1;\r\n }\r\n return 1;\r\n })\r\n .map(item => item.content);\r\n }\r\n}\r\n","import Mithril from 'mithril';\r\n\r\nexport type ComponentProps = {\r\n children?: Mithril.Children,\r\n\r\n className?: string;\r\n\r\n [key: string]: any;\r\n}\r\n\r\nexport default class Component<T extends ComponentProps = any> {\r\n element: HTMLElement;\r\n\r\n props = <T> {};\r\n\r\n view(vnode) {\r\n throw new Error('Component#view must be implemented by subclass');\r\n }\r\n\r\n oninit(vnode) {\r\n this.setProps(vnode.attrs);\r\n }\r\n\r\n oncreate(vnode) {\r\n this.setProps(vnode.attrs);\r\n this.element = vnode.dom;\r\n }\r\n\r\n onbeforeupdate(vnode) {\r\n this.setProps(vnode.attrs);\r\n }\r\n\r\n onupdate(vnode) {\r\n this.setProps(vnode.attrs);\r\n }\r\n\r\n onbeforeremove(vnode) {\r\n this.setProps(vnode.attrs);\r\n }\r\n\r\n onremove(vnode) {\r\n this.setProps(vnode.attrs);\r\n }\r\n\r\n /**\r\n * Returns a jQuery object for this component's element. If you pass in a\r\n * selector string, this method will return a jQuery object, using the current\r\n * element as its buffer.\r\n *\r\n * For example, calling `component.$('li')` will return a jQuery object\r\n * containing all of the `li` elements inside the DOM element of this\r\n * component.\r\n *\r\n * @param {String} [selector] a jQuery-compatible selector string\r\n * @returns {jQuery} the jQuery object for the DOM node\r\n * @final\r\n */\r\n $(selector?: string) {\r\n const $element = $(this.element);\r\n\r\n return selector ? $element.find(selector) : $element;\r\n }\r\n\r\n static component(props: ComponentProps|any = {}, children?: Mithril.Children) {\r\n const componentProps: ComponentProps = Object.assign({}, props);\r\n\r\n if (children) componentProps.children = children;\r\n\r\n return m(this, componentProps);\r\n }\r\n\r\n static initProps(props: ComponentProps = {}) {}\r\n\r\n private setProps(props: T) {\r\n (this.constructor as typeof Component).initProps(props);\r\n\r\n this.props = props;\r\n }\r\n}\r\n","/**\r\n * The `icon` helper displays an icon.\r\n *\r\n * @param {String} fontClass The full icon class, prefix and the icon’s name.\r\n * @param {Object} attrs Any other attributes to apply.\r\n */\r\nexport default function icon(fontClass: string, attrs: any = {}) {\r\n attrs.className = 'icon ' + fontClass + ' ' + (attrs.className || '');\r\n\r\n return <i {...attrs}/>;\r\n}\r\n","import Component from '../Component';\r\nimport icon from '../helpers/icon';\r\nimport extract from '../utils/extract';\r\n\r\n/**\r\n * The `Badge` component represents a user/discussion badge, indicating some\r\n * status (e.g. a discussion is stickied, a user is an admin).\r\n *\r\n * A badge may have the following special props:\r\n *\r\n * - `type` The type of badge this is. This will be used to give the badge a\r\n * class name of `Badge--{type}`.\r\n * - `icon` The name of an icon to show inside the badge.\r\n * - `label`\r\n *\r\n * All other props will be assigned as attributes on the badge element.\r\n */\r\nexport default class Badge extends Component {\r\n view(vnode) {\r\n const attrs = vnode.attrs;\r\n const type = extract(attrs, 'type');\r\n const iconName = extract(attrs, 'icon');\r\n\r\n attrs.className = `Badge ${type ? `Badge--${type}` : ''} ${attrs.className || ''}`;\r\n attrs.title = extract(attrs, 'label') || '';\r\n\r\n return (\r\n <span {...attrs}>\r\n {iconName ? icon(iconName, {className: 'Badge-icon'}) : m.trust(' ')}\r\n </span>\r\n );\r\n }\r\n\r\n oncreate(vnode) {\r\n super.oncreate(vnode);\r\n\r\n if (this.props.label) this.$().tooltip({container: 'body'});\r\n }\r\n}\r\n","import Model from '../Model';\r\nimport computed from '../utils/computed';\r\nimport ItemList from '../utils/ItemList';\r\nimport Badge from '../components/Badge';\r\n\r\nimport User from './User';\r\nimport Post from './Post';\r\n\r\nexport default class Discussion extends Model {\r\n title = Model.attribute('title') as () => string;\r\n slug = Model.attribute('slug') as () => string;\r\n\r\n createdAt = Model.attribute('createdAt', Model.transformDate) as () => Date;\r\n user = Model.hasOne('user') as () => User;\r\n firstPost = Model.hasOne('firstPost') as () => Post;\r\n\r\n lastPostedAt = Model.attribute('lastPostedAt', Model.transformDate) as () => Date;\r\n lastPostedUser = Model.hasOne('lastPostedUser') as () => User;\r\n lastPost = Model.hasOne('lastPost') as () => Post;\r\n lastPostNumber = Model.attribute('lastPostNumber') as () => number;\r\n\r\n commentCount = Model.attribute('commentCount') as () => number;\r\n replyCount = computed('commentCount', commentCount => Math.max(0, commentCount - 1)) as () => string;\r\n posts = Model.hasMany('posts') as () => Post[];\r\n mostRelevantPost = Model.hasOne('mostRelevantPost') as () => Post;\r\n\r\n lastReadAt = Model.attribute('lastReadAt', Model.transformDate) as () => Date;\r\n lastReadPostNumber = Model.attribute('lastReadPostNumber') as () => number;\r\n isUnread = computed('unreadCount', unreadCount => !!unreadCount) as () => boolean;\r\n isRead = computed('unreadCount', unreadCount => app.session.user && !unreadCount) as () => boolean;\r\n\r\n hiddenAt = Model.attribute('hiddenAt', Model.transformDate) as () => Date;\r\n hiddenUser = Model.hasOne('hiddenUser') as () => User;\r\n isHidden = computed('hiddenAt', hiddenAt => !!hiddenAt) as () => boolean;\r\n\r\n canReply = Model.attribute('canReply') as () => boolean;\r\n canRename = Model.attribute('canRename') as () => boolean;\r\n canHide = Model.attribute('canHide') as () => boolean;\r\n canDelete = Model.attribute('canDelete') as () => boolean;\r\n\r\n /**\r\n * Remove a post from the discussion's posts relationship.\r\n *\r\n * @param id The ID of the post to remove.\r\n */\r\n removePost(id: number) {\r\n const relationships = this.data.relationships;\r\n const posts = relationships && relationships.posts;\r\n\r\n if (posts) {\r\n posts.data.some((data, i) => {\r\n if (id === data.id) {\r\n posts.data.splice(i, 1);\r\n return true;\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Get the estimated number of unread posts in this discussion for the current\r\n * user.\r\n */\r\n unreadCount(): number {\r\n const user = app.session.user;\r\n\r\n if (user && user.markedAllAsReadAt() < this.lastPostedAt()) {\r\n return Math.max(0, this.lastPostNumber() - (this.lastReadPostNumber() || 0));\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n /**\r\n * Get the Badge components that apply to this discussion.\r\n */\r\n badges(): ItemList {\r\n const items = new ItemList();\r\n\r\n if (this.isHidden()) {\r\n items.add('hidden', <Badge type=\"hidden\" icon=\"fas fa-trash\" label={app.translator.trans('core.lib.badge.hidden_tooltip')}/>);\r\n }\r\n\r\n return items;\r\n }\r\n\r\n /**\r\n * Get a list of all of the post IDs in this discussion.\r\n */\r\n postIds(): number[] {\r\n const posts = this.data.relationships.posts;\r\n\r\n return posts ? posts.data.map(link => link.id) : [];\r\n }\r\n}\r\n","export function hsvToRgb(h: number, s: number, v: number) {\r\n let r;\r\n let g;\r\n let b;\r\n\r\n const i = Math.floor(h * 6);\r\n const f = h * 6 - i;\r\n const p = v * (1 - s);\r\n const q = v * (1 - f * s);\r\n const t = v * (1 - (1 - f) * s);\r\n\r\n switch (i % 6) {\r\n case 0: r = v; g = t; b = p; break;\r\n case 1: r = q; g = v; b = p; break;\r\n case 2: r = p; g = v; b = t; break;\r\n case 3: r = p; g = q; b = v; break;\r\n case 4: r = t; g = p; b = v; break;\r\n case 5: r = v; g = p; b = q; break;\r\n }\r\n\r\n return {\r\n r: Math.floor(r * 255),\r\n g: Math.floor(g * 255),\r\n b: Math.floor(b * 255)\r\n };\r\n}\r\n\r\n/**\r\n * Convert the given string to a unique color.\r\n */\r\nexport default function stringToColor(string: string): string {\r\n let num = 0;\r\n\r\n // Convert the username into a number based on the ASCII value of each\r\n // character.\r\n for (let i = 0; i < string.length; i++) {\r\n num += string.charCodeAt(i);\r\n }\r\n\r\n // Construct a color using the remainder of that number divided by 360, and\r\n // some predefined saturation and value values.\r\n const hue = num % 360;\r\n const rgb = hsvToRgb(hue / 360, 0.3, 0.9);\r\n\r\n return '' + rgb.r.toString(16) + rgb.g.toString(16) + rgb.b.toString(16);\r\n}\r\n","import Badge from './Badge';\r\n\r\nexport default class GroupBadge extends Badge {\r\n static initProps(props) {\r\n super.initProps(props);\r\n\r\n if (props.group) {\r\n props.icon = props.group.icon();\r\n props.style = {backgroundColor: props.group.color()};\r\n props.label = typeof props.label === 'undefined' ? props.group.nameSingular() : props.label;\r\n props.type = `group--${props.group.id()}`;\r\n\r\n delete props.group;\r\n }\r\n }\r\n}\r\n","import Model from '../Model';\nimport stringToColor from '../utils/stringToColor';\nimport ItemList from '../utils/ItemList';\nimport computed from '../utils/computed';\nimport GroupBadge from '../components/GroupBadge';\nimport Group from \"./Group\";\n\nexport default class User extends Model {\n username = Model.attribute('username') as () => string;\n\n displayName = Model.attribute('displayName') as () => string;\n email = Model.attribute('email') as () => string;\n isEmailConfirmed = Model.attribute('isEmailConfirmed') as () => boolean;\n password = Model.attribute('password') as () => string;\n\n avatarUrl = Model.attribute('avatarUrl') as () => string;\n preferences = Model.attribute('preferences') as () => string;\n groups = Model.hasMany('groups') as () => Group[];\n\n joinTime = Model.attribute('joinTime', Model.transformDate) as () => Date;\n lastSeenAt = Model.attribute('lastSeenAt', Model.transformDate) as () => Date;\n markedAllAsReadAt = Model.attribute('markedAllAsReadAt', Model.transformDate) as () => Date;\n unreadNotificationCount = Model.attribute('unreadNotificationCount') as () => number;\n newNotificationCount = Model.attribute('newNotificationCount') as () => number;\n\n discussionCount = Model.attribute('discussionCount') as () => number;\n commentCount = Model.attribute('commentCount') as () => number;\n\n canEdit = Model.attribute('canEdit') as () => boolean;\n canDelete = Model.attribute('canDelete') as () => boolean;\n\n avatarColor = null;\n color = computed(['username', 'avatarUrl', 'avatarColor'], function(username, avatarUrl, avatarColor) {\n // If we've already calculated and cached the dominant color of the user's\n // avatar, then we can return that in RGB format. If we haven't, we'll want\n // to calculate it. Unless the user doesn't have an avatar, in which case\n // we generate a color from their username.\n if (avatarColor) {\n return 'rgb(' + avatarColor.join(', ') + ')';\n } else if (avatarUrl) {\n this.calculateAvatarColor();\n return '';\n }\n\n return '#' + stringToColor(username);\n }) as () => string;\n\n isOnline(): boolean {\n return this.lastSeenAt() > dayjs().subtract(5, 'minutes').toDate();\n }\n\n /**\n * Get the Badge components that apply to this user.\n */\n badges(): ItemList {\n const items = new ItemList();\n const groups = this.groups();\n\n if (groups) {\n groups.forEach(group => {\n items.add('group' + group.id(), GroupBadge.component({group}));\n });\n }\n\n return items;\n }\n\n /**\n * Calculate the dominant color of the user's avatar. The dominant color will\n * be set to the `avatarColor` property once it has been calculated.\n *\n * @protected\n */\n calculateAvatarColor() {\n const image = new Image();\n const user = this;\n\n image.onload = function() {\n const colorThief = new ColorThief();\n user.avatarColor = colorThief.getColor(this);\n user.freshness = new Date();\n m.redraw();\n };\n image.src = this.avatarUrl();\n }\n\n /**\n * Update the user's preferences.\n */\n savePreferences(newPreferences: object): Promise<User> {\n const preferences = this.preferences();\n\n Object.assign(preferences, newPreferences);\n\n return <Promise<User>> this.save({preferences});\n }\n}\n","/**\r\n * Truncate a string to the given length, appending ellipses if necessary.\r\n */\r\nexport function truncate(string: string, length: number, start = 0): string {\r\n return (start > 0 ? '...' : '') +\r\n string.substring(start, start + length) +\r\n (string.length > start + length ? '...' : '');\r\n}\r\n\r\n/**\r\n * Create a slug out of the given string. Non-alphanumeric characters are\r\n * converted to hyphens.\r\n */\r\nexport function slug(string: string): string {\r\n return string.toLowerCase()\r\n .replace(/[^a-z0-9]/gi, '-')\r\n .replace(/-+/g, '-')\r\n .replace(/-$|^-/g, '');\r\n}\r\n\r\n/**\r\n * Strip HTML tags and quotes out of the given string, replacing them with\r\n * meaningful punctuation.\r\n */\r\nexport function getPlainContent(string: string): string {\r\n const html = string\r\n .replace(/(<\\/p>|<br>)/g, '$1  ')\r\n .replace(/<img\\b[^>]*>/ig, ' ');\r\n\r\n const dom = $('<div/>').html(html);\r\n\r\n dom.find(getPlainContent.removeSelectors.join(',')).remove();\r\n\r\n return dom.text().replace(/\\s+/g, ' ').trim();\r\n}\r\n\r\n/**\r\n * An array of DOM selectors to remove when getting plain content.\r\n *\r\n * @type {String[]}\r\n */\r\ngetPlainContent.removeSelectors = ['blockquote', 'script'];\r\n\r\n/**\r\n * Make a string's first character uppercase.\r\n */\r\nexport function ucfirst(string: string): string {\r\n return string.substr(0, 1).toUpperCase() + string.substr(1);\r\n}\r\n","import Model from '../Model';\r\nimport computed from '../utils/computed';\r\nimport { getPlainContent } from '../utils/string';\r\n\r\nimport Discussion from './Discussion';\r\nimport User from \"./User\";\r\n\r\nexport default class Post extends Model {\r\n number = Model.attribute('number') as () => number;\r\n discussion = Model.hasOne('discussion') as () => Discussion;\r\n\r\n createdAt= Model.attribute('createdAt', Model.transformDate) as () => Date;\r\n user = Model.hasOne('user') as () => User;\r\n contentType = Model.attribute('contentType') as () => string;\r\n content = Model.attribute('content') as () => string;\r\n contentHtml = Model.attribute('contentHtml') as () => string;\r\n contentPlain = computed('contentHtml', getPlainContent) as () => string;\r\n\r\n editedAt = Model.attribute('editedAt', Model.transformDate) as () => Date;\r\n editedUser = Model.hasOne('editedUser') as () => User;\r\n isEdited = computed('editedAt', editedAt => !!editedAt) as () => boolean;\r\n\r\n hiddenAt = Model.attribute('hiddenAt', Model.transformDate) as () => Date;\r\n hiddenUser = Model.hasOne('hiddenUser') as () => User;\r\n isHidden = computed('hiddenAt', hiddenAt => !!hiddenAt) as () => boolean;\r\n\r\n canEdit = Model.attribute('canEdit') as () => boolean;\r\n canHide = Model.attribute('canHide') as () => boolean;\r\n canDelete = Model.attribute('canDelete') as () => boolean;\r\n}\r\n","import Model from '../Model';\r\n\r\nexport default class Group extends Model {\r\n static ADMINISTRATOR_ID = '1';\r\n static GUEST_ID = '2';\r\n static MEMBER_ID = '3';\r\n\r\n nameSingular = Model.attribute('nameSingular') as () => string;\r\n namePlural = Model.attribute('namePlural') as () => string;\r\n color = Model.attribute('color') as () => string;\r\n icon = Model.attribute('icon') as () => string;\r\n}\r\n","import Model from '../Model';\r\nimport User from './User';\r\n\r\nexport default class Notification extends Model {\r\n static ADMINISTRATOR_ID = '1';\r\n static GUEST_ID = '2';\r\n static MEMBER_ID = '3';\r\n\r\n contentType = Model.attribute('contentType') as () => string;\r\n content = Model.attribute('content') as () => string;\r\n createdAt = Model.attribute('createdAt', Model.transformDate) as () => Date;\r\n\r\n isRead = Model.attribute('isRead') as () => boolean;\r\n\r\n user = Model.hasOne('user') as () => User;\r\n fromUser = Model.hasOne('fromUser') as () => User;\r\n subject = Model.hasOne('subhect') as () => any;\r\n}\r\n","import Mithril from \"mithril\";\r\n\r\nexport interface RequestErrorResponse extends JSON {\r\n errors?: {\r\n code: string;\r\n source?: {\r\n pointer: string;\r\n };\r\n }[];\r\n}\r\n\r\nexport default class RequestError {\r\n status: number;\r\n responseText: string;\r\n options: Mithril.RequestOptions;\r\n xhr: XMLHttpRequest;\r\n response?: RequestErrorResponse;\r\n alert?: Mithril.Vnode;\r\n\r\n constructor(status, responseText, options, xhr) {\r\n this.status = status;\r\n this.responseText = responseText;\r\n this.options = options;\r\n this.xhr = xhr;\r\n\r\n try {\r\n this.response = JSON.parse(responseText);\r\n } catch (e) {\r\n this.response = null;\r\n }\r\n\r\n this.alert = null;\r\n }\r\n}\r\n","var __assign = (this && this.__assign) || Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n};\r\nvar defaults = {\r\n lines: 12,\r\n length: 7,\r\n width: 5,\r\n radius: 10,\r\n scale: 1.0,\r\n corners: 1,\r\n color: '#000',\r\n fadeColor: 'transparent',\r\n animation: 'spinner-line-fade-default',\r\n rotate: 0,\r\n direction: 1,\r\n speed: 1,\r\n zIndex: 2e9,\r\n className: 'spinner',\r\n top: '50%',\r\n left: '50%',\r\n shadow: '0 0 1px transparent',\r\n position: 'absolute',\r\n};\r\nvar Spinner = /** @class */ (function () {\r\n function Spinner(opts) {\r\n if (opts === void 0) { opts = {}; }\r\n this.opts = __assign({}, defaults, opts);\r\n }\r\n /**\r\n * Adds the spinner to the given target element. If this instance is already\r\n * spinning, it is automatically removed from its previous target by calling\r\n * stop() internally.\r\n */\r\n Spinner.prototype.spin = function (target) {\r\n this.stop();\r\n this.el = document.createElement('div');\r\n this.el.className = this.opts.className;\r\n this.el.setAttribute('role', 'progressbar');\r\n css(this.el, {\r\n position: this.opts.position,\r\n width: 0,\r\n zIndex: this.opts.zIndex,\r\n left: this.opts.left,\r\n top: this.opts.top,\r\n transform: \"scale(\" + this.opts.scale + \")\",\r\n });\r\n if (target) {\r\n target.insertBefore(this.el, target.firstChild || null);\r\n }\r\n drawLines(this.el, this.opts);\r\n return this;\r\n };\r\n /**\r\n * Stops and removes the Spinner.\r\n * Stopped spinners may be reused by calling spin() again.\r\n */\r\n Spinner.prototype.stop = function () {\r\n if (this.el) {\r\n if (typeof requestAnimationFrame !== 'undefined') {\r\n cancelAnimationFrame(this.animateId);\r\n }\r\n else {\r\n clearTimeout(this.animateId);\r\n }\r\n if (this.el.parentNode) {\r\n this.el.parentNode.removeChild(this.el);\r\n }\r\n this.el = undefined;\r\n }\r\n return this;\r\n };\r\n return Spinner;\r\n}());\r\nexport { Spinner };\r\n/**\r\n * Sets multiple style properties at once.\r\n */\r\nfunction css(el, props) {\r\n for (var prop in props) {\r\n el.style[prop] = props[prop];\r\n }\r\n return el;\r\n}\r\n/**\r\n * Returns the line color from the given string or array.\r\n */\r\nfunction getColor(color, idx) {\r\n return typeof color == 'string' ? color : color[idx % color.length];\r\n}\r\n/**\r\n * Internal method that draws the individual lines.\r\n */\r\nfunction drawLines(el, opts) {\r\n var borderRadius = (Math.round(opts.corners * opts.width * 500) / 1000) + 'px';\r\n var shadow = 'none';\r\n if (opts.shadow === true) {\r\n shadow = '0 2px 4px #000'; // default shadow\r\n }\r\n else if (typeof opts.shadow === 'string') {\r\n shadow = opts.shadow;\r\n }\r\n var shadows = parseBoxShadow(shadow);\r\n for (var i = 0; i < opts.lines; i++) {\r\n var degrees = ~~(360 / opts.lines * i + opts.rotate);\r\n var backgroundLine = css(document.createElement('div'), {\r\n position: 'absolute',\r\n top: -opts.width / 2 + \"px\",\r\n width: (opts.length + opts.width) + 'px',\r\n height: opts.width + 'px',\r\n background: getColor(opts.fadeColor, i),\r\n borderRadius: borderRadius,\r\n transformOrigin: 'left',\r\n transform: \"rotate(\" + degrees + \"deg) translateX(\" + opts.radius + \"px)\",\r\n });\r\n var delay = i * opts.direction / opts.lines / opts.speed;\r\n delay -= 1 / opts.speed; // so initial animation state will include trail\r\n var line = css(document.createElement('div'), {\r\n width: '100%',\r\n height: '100%',\r\n background: getColor(opts.color, i),\r\n borderRadius: borderRadius,\r\n boxShadow: normalizeShadow(shadows, degrees),\r\n animation: 1 / opts.speed + \"s linear \" + delay + \"s infinite \" + opts.animation,\r\n });\r\n backgroundLine.appendChild(line);\r\n el.appendChild(backgroundLine);\r\n }\r\n}\r\nfunction parseBoxShadow(boxShadow) {\r\n var regex = /^\\s*([a-zA-Z]+\\s+)?(-?\\d+(\\.\\d+)?)([a-zA-Z]*)\\s+(-?\\d+(\\.\\d+)?)([a-zA-Z]*)(.*)$/;\r\n var shadows = [];\r\n for (var _i = 0, _a = boxShadow.split(','); _i < _a.length; _i++) {\r\n var shadow = _a[_i];\r\n var matches = shadow.match(regex);\r\n if (matches === null) {\r\n continue; // invalid syntax\r\n }\r\n var x = +matches[2];\r\n var y = +matches[5];\r\n var xUnits = matches[4];\r\n var yUnits = matches[7];\r\n if (x === 0 && !xUnits) {\r\n xUnits = yUnits;\r\n }\r\n if (y === 0 && !yUnits) {\r\n yUnits = xUnits;\r\n }\r\n if (xUnits !== yUnits) {\r\n continue; // units must match to use as coordinates\r\n }\r\n shadows.push({\r\n prefix: matches[1] || '',\r\n x: x,\r\n y: y,\r\n xUnits: xUnits,\r\n yUnits: yUnits,\r\n end: matches[8],\r\n });\r\n }\r\n return shadows;\r\n}\r\n/**\r\n * Modify box-shadow x/y offsets to counteract rotation\r\n */\r\nfunction normalizeShadow(shadows, degrees) {\r\n var normalized = [];\r\n for (var _i = 0, shadows_1 = shadows; _i < shadows_1.length; _i++) {\r\n var shadow = shadows_1[_i];\r\n var xy = convertOffset(shadow.x, shadow.y, degrees);\r\n normalized.push(shadow.prefix + xy[0] + shadow.xUnits + ' ' + xy[1] + shadow.yUnits + shadow.end);\r\n }\r\n return normalized.join(', ');\r\n}\r\nfunction convertOffset(x, y, degrees) {\r\n var radians = degrees * Math.PI / 180;\r\n var sin = Math.sin(radians);\r\n var cos = Math.cos(radians);\r\n return [\r\n Math.round((x * cos + y * sin) * 1000) / 1000,\r\n Math.round((-x * sin + y * cos) * 1000) / 1000,\r\n ];\r\n}\r\n","import Component from '../Component';\r\nimport {Spinner, SpinnerOptions} from 'spin.js';\r\n\r\n/**\r\n * The `LoadingIndicator` component displays a loading spinner with spin.js. It\r\n * may have the following special props:\r\n *\r\n * - `size` The spin.js size preset to use. Defaults to 'small'.\r\n *\r\n * All other props will be assigned as attributes on the element.\r\n */\r\nexport default class LoadingIndicator extends Component {\r\n view(vnode) {\r\n const attrs = vnode.attrs;\r\n\r\n attrs.className = 'LoadingIndicator ' + (attrs.className || '');\r\n delete attrs.size;\r\n\r\n return <div {...attrs}>{m.trust(' ')}</div>;\r\n }\r\n\r\n oncreate(vnode) {\r\n super.oncreate(vnode);\r\n\r\n const options: SpinnerOptions = { zIndex: 'auto', color: this.$().css('color') };\r\n let sizeOptions: SpinnerOptions = {};\r\n\r\n switch (vnode.attrs.size) {\r\n case 'large':\r\n sizeOptions = { lines: 10, length: 8, width: 4, radius: 8 };\r\n break;\r\n\r\n case 'tiny':\r\n sizeOptions = { lines: 8, length: 2, width: 2, radius: 3 };\r\n break;\r\n\r\n default:\r\n sizeOptions = { lines: 8, length: 4, width: 3, radius: 5 };\r\n }\r\n\r\n new Spinner({ ...options, ...sizeOptions }).spin(this.element);\r\n }\r\n}\r\n","import Component, {ComponentProps} from '../Component';\r\nimport icon from '../helpers/icon';\r\nimport extract from '../utils/extract';\r\nimport extractText from '../utils/extractText';\r\nimport LoadingIndicator from './LoadingIndicator';\r\n\r\nexport interface ButtonProps extends ComponentProps {\r\n title?: string,\r\n type?: string,\r\n icon?: string,\r\n\r\n loading?: boolean,\r\n disabled?: boolean,\r\n onclick?: Function\r\n}\r\n\r\n/**\r\n * The `Button` component defines an element which, when clicked, performs an\r\n * action. The button may have the following special props:\r\n *\r\n * - `icon` The name of the icon class. If specified, the button will be given a\r\n * 'has-icon' class name.\r\n * - `disabled` Whether or not the button is disabled. If truthy, the button\r\n * will be given a 'disabled' class name, and any `onclick` handler will be\r\n * removed.\r\n * - `loading` Whether or not the button should be in a disabled loading state.\r\n *\r\n * All other props will be assigned as attributes on the button element.\r\n *\r\n * Note that a Button has no default class names. This is because a Button can\r\n * be used to represent any generic clickable control, like a menu item.\r\n */\r\nexport default class Button<T extends ButtonProps = ButtonProps> extends Component<T> {\r\n view(vnode) {\r\n const attrs: ButtonProps = vnode.attrs;\r\n const children = attrs.children;\r\n\r\n delete attrs.children;\r\n\r\n attrs.className = attrs.className || '';\r\n attrs.type = attrs.type || 'button';\r\n\r\n // If nothing else is provided, we use the textual button content as tooltip\r\n if (!attrs.title && this.props.children) {\r\n attrs.title = extractText(this.props.children);\r\n }\r\n\r\n const iconName = extract(attrs, 'icon');\r\n if (iconName) attrs.className += ' hasIcon';\r\n\r\n const loading = extract(attrs, 'loading');\r\n if (attrs.disabled || loading) {\r\n attrs.className += ' disabled' + (loading ? ' loading' : '');\r\n delete attrs.onclick;\r\n }\r\n\r\n return <button {...attrs}>{this.getButtonContent(iconName, attrs.loading, children)}</button>;\r\n }\r\n\r\n /**\r\n * Get the template for the button's content.\r\n */\r\n protected getButtonContent(iconName?: string|boolean, loading?: boolean, children?: any) : any[] {\r\n return [\r\n iconName && iconName !== true ? icon(iconName, {className: 'Button-icon'}) : '',\r\n children ? <span className=\"Button-label\">{children}</span> : '',\r\n loading ? LoadingIndicator.component({size: 'tiny', className: 'LoadingIndicator--inline'}) : ''\r\n ];\r\n }\r\n}\r\n","import Component from '../Component';\r\n\r\n/**\r\n * The `Separator` component defines a menu separator item.\r\n */\r\nexport default class Separator extends Component {\r\n static isListItem = true;\r\n\r\n view() {\r\n return <li className=\"Dropdown-separator\"/>;\r\n }\r\n}\r\n","import Separator from '../components/Separator';\r\n\r\nexport function isSeparator(item) {\r\n return item && item.component === Separator;\r\n}\r\n\r\nexport function withoutUnnecessarySeparators(items) {\r\n const newItems = [];\r\n let prevItem;\r\n\r\n items.forEach((item, i) => {\r\n if (!isSeparator(item) || (prevItem && !isSeparator(prevItem) && i !== items.length - 1)) {\r\n prevItem = item;\r\n newItems.push(item);\r\n }\r\n });\r\n\r\n return newItems;\r\n}\r\n\r\n/**\r\n * The `listItems` helper wraps a collection of components in <li> tags,\r\n * stripping out any unnecessary `Separator` components.\r\n *\r\n * @param {*} items\r\n * @return {Array}\r\n */\r\nexport default function listItems(items) {\r\n if (!(items instanceof Array)) items = [items];\r\n\r\n return withoutUnnecessarySeparators(items).map(item => {\r\n const isListItem = item.component && item.component.isListItem;\r\n const active = item.component && item.component.isActive && item.component.isActive(item.props);\r\n const className = item.props ? item.props.itemClassName : item.itemClassName;\r\n\r\n if (isListItem) {\r\n item.attrs = item.attrs || {};\r\n item.attrs.key = item.attrs.key || item.itemName;\r\n }\r\n\r\n return isListItem\r\n ? item\r\n : <li className={classNames([\r\n (item.itemName ? 'item-' + item.itemName : ''),\r\n className,\r\n (active ? 'active' : '')\r\n ])}\r\n key={item.itemName}>\r\n {item}\r\n </li>;\r\n });\r\n}\r\n","const MicroModal = (() => {\n\n const FOCUSABLE_ELEMENTS = ['a[href]', 'area[href]', 'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])', 'select:not([disabled]):not([aria-hidden])', 'textarea:not([disabled]):not([aria-hidden])', 'button:not([disabled]):not([aria-hidden])', 'iframe', 'object', 'embed', '[contenteditable]', '[tabindex]:not([tabindex^=\"-\"])'];\n\n class Modal {\n constructor({\n targetModal,\n triggers = [],\n onShow = () => {},\n onClose = () => {},\n openTrigger = 'data-micromodal-trigger',\n closeTrigger = 'data-micromodal-close',\n disableScroll = false,\n disableFocus = false,\n awaitCloseAnimation = false,\n awaitOpenAnimation = false,\n debugMode = false\n }) {\n // Save a reference of the modal\n this.modal = document.getElementById(targetModal); // Save a reference to the passed config\n\n this.config = {\n debugMode,\n disableScroll,\n openTrigger,\n closeTrigger,\n onShow,\n onClose,\n awaitCloseAnimation,\n awaitOpenAnimation,\n disableFocus // Register click events only if pre binding eventListeners\n\n };\n if (triggers.length > 0) this.registerTriggers(...triggers); // pre bind functions for event listeners\n\n this.onClick = this.onClick.bind(this);\n this.onKeydown = this.onKeydown.bind(this);\n }\n /**\n * Loops through all openTriggers and binds click event\n * @param {array} triggers [Array of node elements]\n * @return {void}\n */\n\n\n registerTriggers(...triggers) {\n triggers.filter(Boolean).forEach(trigger => {\n trigger.addEventListener('click', event => this.showModal(event));\n });\n }\n\n showModal() {\n this.activeElement = document.activeElement;\n this.modal.setAttribute('aria-hidden', 'false');\n this.modal.classList.add('is-open');\n this.scrollBehaviour('disable');\n this.addEventListeners();\n\n if (this.config.awaitOpenAnimation) {\n const handler = () => {\n this.modal.removeEventListener('animationend', handler, false);\n this.setFocusToFirstNode();\n };\n\n this.modal.addEventListener('animationend', handler, false);\n } else {\n this.setFocusToFirstNode();\n }\n\n this.config.onShow(this.modal, this.activeElement);\n }\n\n closeModal() {\n const modal = this.modal;\n this.modal.setAttribute('aria-hidden', 'true');\n this.removeEventListeners();\n this.scrollBehaviour('enable');\n\n if (this.activeElement) {\n this.activeElement.focus();\n }\n\n this.config.onClose(this.modal);\n\n if (this.config.awaitCloseAnimation) {\n this.modal.addEventListener('animationend', function handler() {\n modal.classList.remove('is-open');\n modal.removeEventListener('animationend', handler, false);\n }, false);\n } else {\n modal.classList.remove('is-open');\n }\n }\n\n closeModalById(targetModal) {\n this.modal = document.getElementById(targetModal);\n if (this.modal) this.closeModal();\n }\n\n scrollBehaviour(toggle) {\n if (!this.config.disableScroll) return;\n const body = document.querySelector('body');\n\n switch (toggle) {\n case 'enable':\n Object.assign(body.style, {\n overflow: '',\n height: ''\n });\n break;\n\n case 'disable':\n Object.assign(body.style, {\n overflow: 'hidden',\n height: '100vh'\n });\n break;\n\n default:\n }\n }\n\n addEventListeners() {\n this.modal.addEventListener('touchstart', this.onClick);\n this.modal.addEventListener('click', this.onClick);\n document.addEventListener('keydown', this.onKeydown);\n }\n\n removeEventListeners() {\n this.modal.removeEventListener('touchstart', this.onClick);\n this.modal.removeEventListener('click', this.onClick);\n document.removeEventListener('keydown', this.onKeydown);\n }\n\n onClick(event) {\n if (event.target.hasAttribute(this.config.closeTrigger)) {\n this.closeModal();\n event.preventDefault();\n }\n }\n\n onKeydown(event) {\n if (event.keyCode === 27) this.closeModal(event);\n if (event.keyCode === 9) this.maintainFocus(event);\n }\n\n getFocusableNodes() {\n const nodes = this.modal.querySelectorAll(FOCUSABLE_ELEMENTS);\n return Array(...nodes);\n }\n\n setFocusToFirstNode() {\n if (this.config.disableFocus) return;\n const focusableNodes = this.getFocusableNodes();\n if (focusableNodes.length) focusableNodes[0].focus();\n }\n\n maintainFocus(event) {\n const focusableNodes = this.getFocusableNodes(); // if disableFocus is true\n\n if (!this.modal.contains(document.activeElement)) {\n focusableNodes[0].focus();\n } else {\n const focusedItemIndex = focusableNodes.indexOf(document.activeElement);\n\n if (event.shiftKey && focusedItemIndex === 0) {\n focusableNodes[focusableNodes.length - 1].focus();\n event.preventDefault();\n }\n\n if (!event.shiftKey && focusedItemIndex === focusableNodes.length - 1) {\n focusableNodes[0].focus();\n event.preventDefault();\n }\n }\n }\n\n }\n /**\n * Modal prototype ends.\n * Here on code is responsible for detecting and\n * auto binding event handlers on modal triggers\n */\n // Keep a reference to the opened modal\n\n\n let activeModal = null;\n /**\n * Generates an associative array of modals and it's\n * respective triggers\n * @param {array} triggers An array of all triggers\n * @param {string} triggerAttr The data-attribute which triggers the module\n * @return {array}\n */\n\n const generateTriggerMap = (triggers, triggerAttr) => {\n const triggerMap = [];\n triggers.forEach(trigger => {\n const targetModal = trigger.attributes[triggerAttr].value;\n if (triggerMap[targetModal] === undefined) triggerMap[targetModal] = [];\n triggerMap[targetModal].push(trigger);\n });\n return triggerMap;\n };\n /**\n * Validates whether a modal of the given id exists\n * in the DOM\n * @param {number} id The id of the modal\n * @return {boolean}\n */\n\n\n const validateModalPresence = id => {\n if (!document.getElementById(id)) {\n console.warn(`MicroModal: \\u2757Seems like you have missed %c'${id}'`, 'background-color: #f8f9fa;color: #50596c;font-weight: bold;', 'ID somewhere in your code. Refer example below to resolve it.');\n console.warn(`%cExample:`, 'background-color: #f8f9fa;color: #50596c;font-weight: bold;', `<div class=\"modal\" id=\"${id}\"></div>`);\n return false;\n }\n };\n /**\n * Validates if there are modal triggers present\n * in the DOM\n * @param {array} triggers An array of data-triggers\n * @return {boolean}\n */\n\n\n const validateTriggerPresence = triggers => {\n if (triggers.length <= 0) {\n console.warn(`MicroModal: \\u2757Please specify at least one %c'micromodal-trigger'`, 'background-color: #f8f9fa;color: #50596c;font-weight: bold;', 'data attribute.');\n console.warn(`%cExample:`, 'background-color: #f8f9fa;color: #50596c;font-weight: bold;', `<a href=\"#\" data-micromodal-trigger=\"my-modal\"></a>`);\n return false;\n }\n };\n /**\n * Checks if triggers and their corresponding modals\n * are present in the DOM\n * @param {array} triggers Array of DOM nodes which have data-triggers\n * @param {array} triggerMap Associative array of modals and their triggers\n * @return {boolean}\n */\n\n\n const validateArgs = (triggers, triggerMap) => {\n validateTriggerPresence(triggers);\n if (!triggerMap) return true;\n\n for (var id in triggerMap) validateModalPresence(id);\n\n return true;\n };\n /**\n * Binds click handlers to all modal triggers\n * @param {object} config [description]\n * @return void\n */\n\n\n const init = config => {\n // Create an config object with default openTrigger\n const options = Object.assign({}, {\n openTrigger: 'data-micromodal-trigger'\n }, config); // Collects all the nodes with the trigger\n\n const triggers = [...document.querySelectorAll(`[${options.openTrigger}]`)]; // Makes a mappings of modals with their trigger nodes\n\n const triggerMap = generateTriggerMap(triggers, options.openTrigger); // Checks if modals and triggers exist in dom\n\n if (options.debugMode === true && validateArgs(triggers, triggerMap) === false) return; // For every target modal creates a new instance\n\n for (var key in triggerMap) {\n let value = triggerMap[key];\n options.targetModal = key;\n options.triggers = [...value];\n activeModal = new Modal(options); // eslint-disable-line no-new\n }\n };\n /**\n * Shows a particular modal\n * @param {string} targetModal [The id of the modal to display]\n * @param {object} config [The configuration object to pass]\n * @return {void}\n */\n\n\n const show = (targetModal, config) => {\n const options = config || {};\n options.targetModal = targetModal; // Checks if modals and triggers exist in dom\n\n if (options.debugMode === true && validateModalPresence(targetModal) === false) return; // stores reference to active modal\n\n activeModal = new Modal(options); // eslint-disable-line no-new\n\n activeModal.showModal();\n };\n /**\n * Closes the active modal\n * @param {string} targetModal [The id of the modal to close]\n * @return {void}\n */\n\n\n const close = targetModal => {\n targetModal ? activeModal.closeModalById(targetModal) : activeModal.closeModal();\n };\n\n return {\n init,\n show,\n close\n };\n})();\n\nexport default MicroModal;\n","import Component, {ComponentProps} from '../Component';\r\nimport Button from './Button';\r\nimport listItems from '../helpers/listItems';\r\nimport extract from '../utils/extract';\r\nimport * as Mithril from \"mithril\";\r\n\r\nexport interface AlertProps extends ComponentProps {\r\n controls?: Mithril.ChildArray,\r\n type?: string,\r\n dismissible?: boolean,\r\n\r\n ondismiss?: () => any,\r\n}\r\n\r\n/**\r\n * The `Alert` component represents an alert box, which contains a message,\r\n * some controls, and may be dismissible.\r\n *\r\n * The alert may have the following special props:\r\n *\r\n * - `type` The type of alert this is. Will be used to give the alert a class\r\n * name of `Alert--{type}`.\r\n * - `controls` An array of controls to show in the alert.\r\n * - `dismissible` Whether or not the alert can be dismissed.\r\n * - `ondismiss` A callback to run when the alert is dismissed.\r\n *\r\n * All other props will be assigned as attributes on the alert element.\r\n */\r\nexport default class Alert extends Component<AlertProps> {\r\n view() {\r\n const attrs: AlertProps = Object.assign({}, this.props);\r\n\r\n const type: string = extract(attrs, 'type');\r\n attrs.className = `Alert Alert--${type} ${attrs.className || ''}`;\r\n\r\n const children: Mithril.Children = extract(attrs, 'children');\r\n const controls: Mithril.ChildArray = extract(attrs, 'controls') || [];\r\n\r\n // If the alert is meant to be dismissible (which is the case by default),\r\n // then we will create a dismiss button to append as the final control in\r\n // the alert.\r\n const dismissible: boolean|undefined = extract(attrs, 'dismissible');\r\n const ondismiss: () => any = extract(attrs, 'ondismiss');\r\n const dismissControl = [];\r\n\r\n if (dismissible || dismissible === undefined) {\r\n dismissControl.push(\r\n <Button\r\n icon=\"fas fa-times\"\r\n className=\"Button Button--link Button--icon Alert-dismiss\"\r\n onclick={ondismiss}/>\r\n );\r\n }\r\n\r\n return (\r\n <div {...attrs}>\r\n <span className=\"Alert-body\">\r\n {children}\r\n </span>\r\n <ul className=\"Alert-controls\">\r\n {listItems(controls.concat(dismissControl))}\r\n </ul>\r\n </div>\r\n );\r\n }\r\n}\r\n","import Mithril from 'mithril';\n\nimport Component, {ComponentProps} from '../Component';\nimport Button from './Button';\nimport RequestError from \"../utils/RequestError\";\n\n/**\n * The `Modal` component displays a modal dialog, wrapped in a form. Subclasses\n * should implement the `className`, `title`, and `content` methods.\n */\nexport default abstract class Modal<T extends ComponentProps = ComponentProps> extends Component<T> {\n /**\n * An alert component to show below the header.\n */\n alert: Mithril.Vnode;\n\n loading: boolean;\n\n view() {\n if (this.alert) {\n this.alert.attrs.dismissible = false;\n }\n\n return (\n <div className={`Modal modal-dialog ${this.className()}`}>\n <div className=\"Modal-content\">\n {this.isDismissible() ? (\n <div className=\"Modal-close App-backControl\">\n {Button.component({\n icon: 'fas fa-times',\n onclick: this.hide.bind(this),\n className: 'Button Button--icon Button--link'\n })}\n </div>\n ) : ''}\n\n <form onsubmit={this.onsubmit.bind(this)}>\n <div className=\"Modal-header\">\n <h3 className=\"App-titleControl App-titleControl--text\">{this.title()}</h3>\n </div>\n\n {this.alert && <div className=\"Modal-alert\">{this.alert}</div>}\n\n {this.content()}\n </form>\n </div>\n </div>\n );\n }\n\n /**\n * Determine whether or not the modal should be dismissible via an 'x' button.\n */\n isDismissible(): boolean {\n return true;\n }\n\n /**\n * Get the class name to apply to the modal.\n */\n abstract className(): string;\n\n /**\n * Get the title of the modal dialog.\n */\n abstract title(): string;\n\n /**\n * Get the content of the modal.\n */\n abstract content();\n\n /**\n * Handle the modal form's submit event.\n */\n onsubmit(e: Event) {}\n\n /**\n * Focus on the first input when the modal is ready to be used.\n */\n onready() {\n this.$('form').find('input, select, textarea').first().focus().select();\n }\n\n onhide() {}\n\n /**\n * Hide the modal.\n */\n hide() {\n app.modal.close();\n }\n\n /**\n * Stop loading.\n */\n loaded() {\n this.loading = false;\n m.redraw();\n }\n\n /**\n * Show an alert describing an error returned from the API, and give focus to\n * the first relevant field.\n */\n onerror(error: RequestError) {\n this.alert = error.alert;\n\n m.redraw();\n\n if (error.status === 422 && error.response.errors) {\n this.$(`form [name=\"${error.response.errors[0].source.pointer.replace('/data/attributes/', '')}\"]`).select();\n } else {\n this.onready();\n }\n }\n}\n","import MicroModal from 'micromodal';\n\nimport Component from \"../Component\";\nimport Modal from './Modal';\n\n/**\n * The `ModalManager` component manages a modal dialog. Only one modal dialog\n * can be shown at once; loading a new component into the ModalManager will\n * overwrite the previous one.\n */\nexport default class ModalManager extends Component {\n showing: boolean;\n component: Modal;\n hideTimeout: number;\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n app.modal = this;\n }\n\n view() {\n return (\n <div className=\"ModalManager modal\" id=\"Modal\" onclick={this.onclick.bind(this)} key=\"modal\">\n {this.component && m(this.component)}\n </div>\n );\n }\n\n /**\n * Show a modal dialog.\n */\n show(component: Modal) {\n if (!(component instanceof Modal)) {\n throw new Error('The ModalManager component can only show Modal components');\n }\n\n clearTimeout(this.hideTimeout);\n\n this.showing = true;\n this.component = component;\n\n // if (app.current) app.current.retain = true;\n\n m.redraw();\n\n if (!$('.modal-backdrop').length) {\n $('<div />').addClass('modal-backdrop')\n .appendTo('body');\n }\n\n MicroModal.show('Modal', {\n awaitCloseAnimation: true,\n onClose: () => {\n $('.modal-backdrop').fadeOut(200, function () {\n this.remove();\n });\n\n this.showing = false;\n }\n });\n\n this.onready();\n }\n\n onclick(e) {\n if (e.target === this.element) {\n this.close();\n }\n }\n\n /**\n * Close the modal dialog.\n */\n close() {\n if (!this.showing) return;\n\n // Don't hide the modal immediately, because if the consumer happens to call\n // the `show` method straight after to show another modal dialog, it will\n // cause the new modal dialog to disappear. Instead we will wait for a tiny\n // bit to give the `show` method the opportunity to prevent this from going\n // ahead.\n this.hideTimeout = setTimeout(() => MicroModal.close('Modal'));\n }\n\n /**\n * Clear content from the modal area.\n *\n * @protected\n */\n clear() {\n if (this.component) {\n this.component.onhide();\n }\n\n this.component = null;\n\n app.current.retain = false;\n\n m.redraw();\n }\n\n /**\n * When the modal dialog is ready to be used, tell it!\n *\n * @protected\n */\n onready() {\n if (this.component && this.component.onready) {\n this.component.onready();\n }\n }\n}\n","import Mithril from \"mithril\";\n\nimport Bus from './Bus';\nimport Translator from './Translator';\nimport Session from './Session';\nimport Store from './Store';\n\nimport extract from './utils/extract';\nimport mapRoutes from './utils/mapRoutes';\nimport Drawer from './utils/Drawer';\nimport {extend} from './extend';\n\nimport Forum from './models/Forum';\nimport Discussion from './models/Discussion';\nimport User from './models/User';\nimport Post from './models/Post';\nimport Group from './models/Group';\nimport Notification from './models/Notification';\n\nimport RequestError from './utils/RequestError';\nimport Alert from './components/Alert';\nimport ModalManager from './components/ModalManager';\n\nexport type ApplicationData = {\n apiDocument: any;\n locale: string;\n locales: any;\n resources: any[];\n session: any;\n};\n\nexport default abstract class Application {\n /**\n * The forum model for this application.\n */\n forum: Forum;\n\n data: ApplicationData;\n\n translator = new Translator();\n bus = new Bus();\n\n /**\n * The app's session.\n */\n session: Session;\n\n /**\n * The app's data store.\n */\n store = new Store({\n forums: Forum,\n users: User,\n discussions: Discussion,\n posts: Post,\n groups: Group,\n notifications: Notification\n });\n\n drawer = new Drawer();\n\n modal: ModalManager;\n\n /**\n * A local cache that can be used to store data at the application level, so\n * that is persists between different routes.\n */\n cache = {\n notifications: null,\n };\n\n routes = {};\n\n title = '';\n titleCount = 0;\n\n /**\n * An Alert that was shown as a result of an AJAX request error. If present,\n * it will be dismissed on the next successful request.\n */\n private requestError: Alert = null;\n\n mount(basePath = '') {\n m.mount(document.getElementById('modal'), new ModalManager());\n\n // this.alerts = m.mount(document.getElementById('alerts'), <AlertManager />);\n\n m.route(document.getElementById('content'), basePath + '/', mapRoutes(this.routes, basePath));\n }\n\n boot(payload: any) {\n this.data = payload;\n\n this.store.pushPayload({ data: this.data.resources });\n\n this.forum = this.store.getById('forums', 1);\n\n this.session = new Session(\n this.store.getById('users', this.data.session.userId),\n this.data.session.csrfToken\n );\n\n this.locale();\n this.plugins();\n this.setupRoutes();\n this.mount();\n\n this.bus.dispatch('app.booting');\n }\n\n locale() {\n this.translator.locale = this.data.locale;\n\n this.bus.dispatch('app.locale');\n }\n\n plugins() {\n this.bus.dispatch('app.plugins');\n }\n\n setupRoutes() {\n this.bus.dispatch('app.routes');\n }\n\n /**\n * Get the API response document that has been preloaded into the application.\n */\n preloadedApiDocument() {\n if (this.data.apiDocument) {\n const results = this.store.pushPayload(this.data.apiDocument);\n\n this.data.apiDocument = null;\n\n return results;\n }\n\n return null;\n }\n\n /**\n * Set the <title> of the page.\n */\n setTitle(title: string) {\n this.title = title;\n this.updateTitle();\n }\n\n /**\n * Set a number to display in the <title> of the page.\n */\n setTitleCount(count: number) {\n this.titleCount = count;\n this.updateTitle();\n }\n\n updateTitle() {\n document.title = (this.titleCount ? `(${this.titleCount}) ` : '') +\n (this.title ? this.title + ' - ' : '') +\n this.forum.attribute('title');\n }\n\n /**\n * Construct a URL to the route with the given name.\n */\n route(name: string, params: object = {}): string {\n const route = this.routes[name];\n\n if (!route) throw new Error(`Route '${name}' does not exist`);\n\n const url = route.path.replace(/:([^\\/]+)/g, (m, key) => extract(params, key));\n const queryString = m.buildQueryString(params);\n const prefix = m.route.prefix === '' ? this.forum.attribute('basePath') : '';\n\n return prefix + url + (queryString ? '?' + queryString : '');\n }\n\n /**\n * Make an AJAX request, handling any low-level errors that may occur.\n *\n * @see https://mithril.js.org/request.html\n */\n request(originalOptions: Mithril.RequestOptions|any): Promise<any> {\n const options: Mithril.RequestOptions = Object.assign({}, originalOptions);\n\n // Set some default options if they haven't been overridden. We want to\n // authenticate all requests with the session token. We also want all\n // requests to run asynchronously in the background, so that they don't\n // prevent redraws from occurring.\n options.background = options.background || true;\n\n extend(options, 'config', (result, xhr: XMLHttpRequest) => xhr.setRequestHeader('X-CSRF-Token', this.session.csrfToken));\n\n // If the method is something like PATCH or DELETE, which not all servers\n // and clients support, then we'll send it as a POST request with the\n // intended method specified in the X-HTTP-Method-Override header.\n if (options.method !== 'GET' && options.method !== 'POST') {\n const method = options.method;\n extend(options, 'config', (result, xhr: XMLHttpRequest) => xhr.setRequestHeader('X-HTTP-Method-Override', method));\n options.method = 'POST';\n }\n\n // When we deserialize JSON data, if for some reason the server has provided\n // a dud response, we don't want the application to crash. We'll show an\n // error message to the user instead.\n options.deserialize = options.deserialize || (responseText => responseText);\n\n options.errorHandler = options.errorHandler || (error => {\n throw error;\n });\n\n // When extracting the data from the response, we can check the server\n // response code and show an error message to the user if something's gone\n // awry.\n const original = options.extract;\n options.extract = xhr => {\n let responseText;\n\n if (original) {\n responseText = original(xhr.responseText);\n } else {\n responseText = xhr.responseText || null;\n }\n\n const status = xhr.status;\n\n if (status < 200 || status > 299) {\n throw new RequestError(status, responseText, options, xhr);\n }\n\n if (xhr.getResponseHeader) {\n const csrfToken = xhr.getResponseHeader('X-CSRF-Token');\n if (csrfToken) app.session.csrfToken = csrfToken;\n }\n\n try {\n return JSON.parse(responseText);\n } catch (e) {\n throw new RequestError(500, responseText, options, xhr);\n }\n };\n\n // TODO: ALERT MANAGER\n // if (this.requestError) this.alerts.dismiss(this.requestError.alert);\n\n // Now make the request. If it's a failure, inspect the error that was\n // returned and show an alert containing its contents.\n // const deferred = m.deferred();\n\n // return new Promise((resolve, reject) => )\n\n return m.request(options)\n .then(res => res, error => {\n this.requestError = error;\n\n let children;\n\n switch (error.status) {\n case 422:\n children = error.response.errors\n .map(error => [error.detail, m('br')])\n .reduce((a, b) => a.concat(b), [])\n .slice(0, -1);\n break;\n\n case 401:\n case 403:\n children = this.translator.trans('core.lib.error.permission_denied_message');\n break;\n\n case 404:\n case 410:\n children = this.translator.trans('core.lib.error.not_found_message');\n break;\n\n case 429:\n children = this.translator.trans('core.lib.error.rate_limit_exceeded_message');\n break;\n\n default:\n children = this.translator.trans('core.lib.error.generic_message');\n }\n\n error.alert = Alert.component({\n type: 'error',\n children\n });\n\n try {\n options.errorHandler(error);\n } catch (error) {\n console.error(error);\n // this.alerts.show(error.alert);\n }\n\n return Promise.reject(error);\n });\n\n // return deferred.promise;\n }\n}\n","import { RouteDefs } from 'mithril';\r\n\r\n/**\r\n * The `mapRoutes` utility converts a map of named application routes into a\r\n * format that can be understood by Mithril.\r\n *\r\n * @see https://lhorie.github.io/mithril/mithril.route.html#defining-routes\r\n */\r\nexport default function mapRoutes(routes: object, basePath: string = ''): RouteDefs {\r\n const map = {};\r\n\r\n for (const key in routes) {\r\n const route = routes[key];\r\n\r\n if (route.component) {\r\n if (!route.component.attrs) route.component.attrs = {};\r\n route.component.attrs.routeName = key;\r\n }\r\n\r\n map[basePath + route.path] = route.component;\r\n }\r\n\r\n return map;\r\n}\r\n","export interface StackItem {\r\n name: string;\r\n title: string;\r\n url?: string;\r\n}\r\n\r\n/**\r\n * The `History` class keeps track and manages a stack of routes that the user\r\n * has navigated to in their session.\r\n *\r\n * An item can be pushed to the top of the stack using the `push` method. An\r\n * item in the stack has a name and a URL. The name need not be unique; if it is\r\n * the same as the item before it, that will be overwritten with the new URL. In\r\n * this way, if a user visits a discussion, and then visits another discussion,\r\n * popping the history stack will still take them back to the discussion list\r\n * rather than the previous discussion.\r\n */\r\nexport default class History {\r\n /**\r\n * The stack of routes that have been navigated to.\r\n */\r\n protected stack: StackItem[] = [];\r\n\r\n /**\r\n * Get the item on the top of the stack.\r\n */\r\n getCurrent(): StackItem {\r\n return this.stack[this.stack.length - 1];\r\n }\r\n\r\n /**\r\n * Get the previous item on the stack.\r\n */\r\n getPrevious(): StackItem {\r\n return this.stack[this.stack.length - 2];\r\n }\r\n\r\n /**\r\n * Push an item to the top of the stack.\r\n *\r\n * @param {String} name The name of the route.\r\n * @param {String} title The title of the route.\r\n * @param {String} [url] The URL of the route. The current URL will be used if\r\n * not provided.\r\n */\r\n push(name: string, title: string, url: string = m.route.get()) {\r\n // If we're pushing an item with the same name as second-to-top item in the\r\n // stack, we will assume that the user has clicked the 'back' button in\r\n // their browser. In this case, we don't want to push a new item, so we will\r\n // pop off the top item, and then the second-to-top item will be overwritten\r\n // below.\r\n const secondTop = this.stack[this.stack.length - 2];\r\n if (secondTop && secondTop.name === name) {\r\n this.stack.pop();\r\n }\r\n\r\n // If we're pushing an item with the same name as the top item in the stack,\r\n // then we'll overwrite it with the new URL.\r\n const top = this.getCurrent();\r\n if (top && top.name === name) {\r\n Object.assign(top, {url, title});\r\n } else {\r\n this.stack.push({name, url, title});\r\n }\r\n }\r\n\r\n /**\r\n * Check whether or not the history stack is able to be popped.\r\n */\r\n canGoBack(): boolean {\r\n return this.stack.length > 1;\r\n }\r\n\r\n /**\r\n * Go back to the previous route in the history stack.\r\n */\r\n back() {\r\n if (! this.canGoBack()) {\r\n return this.home();\r\n }\r\n\r\n this.stack.pop();\r\n\r\n m.route.set(this.getCurrent().url);\r\n }\r\n\r\n /**\r\n * Get the URL of the previous page.\r\n */\r\n backUrl(): string {\r\n const secondTop = this.stack[this.stack.length - 2];\r\n\r\n return secondTop.url;\r\n }\r\n\r\n /**\r\n * Go to the first route in the history stack.\r\n */\r\n home() {\r\n this.stack.splice(0);\r\n\r\n m.route.set('/');\r\n }\r\n}\r\n","import Component from '../../common/Component';\r\nimport ItemList from '../../common/utils/ItemList';\r\nimport listItems from '../../common/helpers/listItems';\r\n\r\n/**\r\n * The `HeaderPrimary` component displays primary header controls. On the\r\n * default skin, these are shown just to the right of the forum title.\r\n */\r\nexport default class HeaderPrimary extends Component {\r\n view() {\r\n return (\r\n <ul className=\"Header-controls\">\r\n {listItems(this.items().toArray())}\r\n </ul>\r\n );\r\n }\r\n\r\n /**\r\n * Build an item list for the controls.\r\n */\r\n items(): ItemList {\r\n return new ItemList();\r\n }\r\n}\r\n","import Stream from 'mithril/stream';\n\nimport Modal from '../../common/components/Modal';\nimport {ComponentProps} from '../../common/Component';\nimport ItemList from \"../../common/utils/ItemList\";\nimport Button from \"../../common/components/Button\";\n\nexport interface LogInModalProps extends ComponentProps {\n username?: string;\n password?: string;\n remember?: boolean;\n}\n\n/**\n * The `LogInModal` component displays a modal dialog with a login form.\n *\n * ### Props\n *\n * - `identification`\n * - `password`\n * - `remember`\n */\nexport default class LogInModal extends Modal<LogInModalProps> {\n /**\n * The value of the identification input.\n */\n identification: Stream<string>;\n\n /**\n * The value of the password input.\n */\n password: Stream<string>;\n\n /**\n * The value of the remember me input.\n */\n remember: Stream<string>;\n\n oninit(vnode) {\n super.oninit(vnode);\n\n this.identification = m.prop(this.props.identification || '');\n\n this.password = m.prop(this.props.password || '');\n\n this.remember = m.prop(!!this.props.remember);\n }\n\n className(): string {\n return 'LogInModal Modal--small';\n }\n\n title(): string {\n return app.translator.transText('core.forum.log_in.title');\n }\n\n content() {\n return [\n <div className=\"Modal-body\">\n {this.body()}\n </div>,\n <div className=\"Modal-footer\">\n {this.footer()}\n </div>\n ];\n }\n\n body() {\n return [\n // <LogInButtons/>,\n\n <div className=\"Form Form--centered\">\n {this.fields().toArray()}\n </div>\n ];\n }\n\n fields() {\n const items = new ItemList();\n\n items.add('identification', <div className=\"Form-group\">\n <input className=\"FormControl\" name=\"identification\" type=\"text\" placeholder={app.translator.transText('core.forum.log_in.username_or_email_placeholder')}\n bidi={this.identification}\n disabled={this.loading} />\n </div>, 30);\n\n items.add('password', <div className=\"Form-group\">\n <input className=\"FormControl\" name=\"password\" type=\"password\" placeholder={app.translator.transText('core.forum.log_in.password_placeholder')}\n bidi={this.password}\n disabled={this.loading} />\n </div>, 20);\n\n items.add('remember', <div className=\"Form-group\">\n <div>\n <label className=\"checkbox\">\n <input type=\"checkbox\" bidi={this.remember} disabled={this.loading} />\n {app.translator.trans('core.forum.log_in.remember_me_label')}\n </label>\n </div>\n </div>, 10);\n\n items.add('submit', <div className=\"Form-group\">\n {Button.component({\n className: 'Button Button--primary Button--block',\n type: 'submit',\n loading: this.loading,\n children: app.translator.trans('core.forum.log_in.submit_button')\n })}\n </div>, -10);\n\n return items;\n }\n\n footer() {\n return [\n <p className=\"LogInModal-forgotPassword\">\n <a onclick={this.forgotPassword.bind(this)}>{app.translator.trans('core.forum.log_in.forgot_password_link')}</a>\n </p>,\n\n app.forum.attribute('allowSignUp') && (\n <p className=\"LogInModal-signUp\">\n {app.translator.trans('core.forum.log_in.sign_up_text', {a: <a onclick={this.signUp.bind(this)}/> })}\n </p>\n )\n ];\n }\n\n /**\n * Open the forgot password modal, prefilling it with an email if the user has\n * entered one.\n *\n * @public\n */\n forgotPassword() {\n const email = this.identification();\n const props = email.indexOf('@') !== -1 ? {email} : undefined;\n\n app.modal.show(new ForgotPasswordModal(props));\n }\n\n /**\n * Open the sign up modal, prefilling it with an email/username/password if\n * the user has entered one.\n *\n * @public\n */\n signUp() {\n const props = {password: this.password()};\n const identification = this.identification();\n props[identification.indexOf('@') !== -1 ? 'email' : 'username'] = identification;\n\n // app.modal.show(new SignUpModal(props));\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n this.$(`[name=\"${this.identification() ? 'password' : 'identification'}\"]`).select();\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n const identification = this.identification();\n const password = this.password();\n const remember = this.remember();\n\n app.session.login({identification, password, remember}, {errorHandler: this.onerror.bind(this)})\n .then(\n () => window.location.reload(),\n this.loaded.bind(this)\n );\n }\n\n onerror(error) {\n if (error.status === 401) {\n error.alert.attrs.children = app.translator.trans('core.forum.log_in.invalid_login_message');\n }\n\n super.onerror(error);\n }\n}\n","/**\r\n * The `avatar` helper displays a user's avatar.\r\n *\r\n * @param {User} user\r\n * @param {Object} attrs Attributes to apply to the avatar element\r\n * @return {Object}\r\n */\r\nexport default function avatar(user, attrs: any = {}) {\r\n attrs.className = 'Avatar ' + (attrs.className || '');\r\n let content = '';\r\n\r\n // If the `title` attribute is set to null or false, we don't want to give the\r\n // avatar a title. On the other hand, if it hasn't been given at all, we can\r\n // safely default it to the user's username.\r\n const hasTitle = attrs.title === 'undefined' || attrs.title;\r\n if (!hasTitle) delete attrs.title;\r\n\r\n // If a user has been passed, then we will set up an avatar using their\r\n // uploaded image, or the first letter of their username if they haven't\r\n // uploaded one.\r\n if (user) {\r\n const username = user.displayName() || '?';\r\n const avatarUrl = user.avatarUrl();\r\n\r\n if (hasTitle) attrs.title = attrs.title || username;\r\n\r\n if (avatarUrl) {\r\n return <img {...attrs} src={avatarUrl}/>;\r\n }\r\n\r\n content = username.charAt(0).toUpperCase();\r\n attrs.style = {background: user.color()};\r\n }\r\n\r\n return <span {...attrs}>{content}</span>;\r\n}\r\n","import Component, {ComponentProps} from '../Component';\r\nimport icon from '../helpers/icon';\r\nimport listItems from '../helpers/listItems';\r\n\r\nexport interface DropdownProps extends ComponentProps {\r\n buttonClassName?: string;\r\n menuClassName?: string;\r\n label?: string;\r\n icon?: string;\r\n caretIcon?: undefined|string;\r\n\r\n onhide?: Function;\r\n onshow?: Function;\r\n onclick?: Function;\r\n}\r\n\r\n/**\r\n * The `Dropdown` component displays a button which, when clicked, shows a\r\n * dropdown menu beneath it.\r\n *\r\n * ### Props\r\n *\r\n * - `buttonClassName` A class name to apply to the dropdown toggle button.\r\n * - `menuClassName` A class name to apply to the dropdown menu.\r\n * - `icon` The name of an icon to show in the dropdown toggle button.\r\n * - `caretIcon` The name of an icon to show on the right of the button.\r\n * - `label` The label of the dropdown toggle button. Defaults to 'Controls'.\r\n * - `onhide`\r\n * - `onshow`\r\n *\r\n * The children will be displayed as a list inside of the dropdown menu.\r\n */\r\nexport default class Dropdown<T extends DropdownProps = DropdownProps> extends Component<T> {\r\n showing: boolean;\r\n\r\n static initProps(props: DropdownProps) {\r\n props.className = props.className || '';\r\n props.buttonClassName = props.buttonClassName || '';\r\n props.menuClassName = props.menuClassName || '';\r\n props.label = props.label || '';\r\n props.caretIcon = typeof props.caretIcon !== 'undefined' ? props.caretIcon : 'fas fa-caret-down';\r\n }\r\n\r\n view() {\r\n const items = this.props.children ? listItems(this.props.children) : [];\r\n\r\n return (\r\n <div className={`ButtonGroup Dropdown dropdown ${this.props.className} itemCount${items.length}${this.showing ? ' open' : ''}`}>\r\n {this.getButton()}\r\n {this.getMenu(items)}\r\n </div>\r\n );\r\n }\r\n\r\n oncreate(vnode) {\r\n super.oncreate(vnode);\r\n\r\n this.$('> .Dropdown-toggle').dropdown();\r\n\r\n // When opening the dropdown menu, work out if the menu goes beyond the\r\n // bottom of the viewport. If it does, we will apply class to make it show\r\n // above the toggle button instead of below it.\r\n this.element.addEventListener('shown.bs.dropdown', () => {\r\n this.showing = true;\r\n\r\n if (this.props.onshow) {\r\n this.props.onshow();\r\n }\r\n\r\n m.redraw();\r\n\r\n const $menu = this.$('.Dropdown-menu');\r\n const isRight = $menu.hasClass('Dropdown-menu--right');\r\n\r\n $menu.removeClass('Dropdown-menu--top Dropdown-menu--right');\r\n\r\n $menu.toggleClass(\r\n 'Dropdown-menu--top',\r\n $menu.offset().top + $menu.height() > $(window).scrollTop() + $(window).height()\r\n );\r\n\r\n if ($menu.offset().top < 0) {\r\n $menu.removeClass('Dropdown-menu--top');\r\n }\r\n\r\n $menu.toggleClass(\r\n 'Dropdown-menu--right',\r\n isRight || $menu.offset().left + $menu.width() > $(window).scrollLeft() + $(window).width()\r\n );\r\n });\r\n\r\n this.element.addEventListener('hidden.bs.dropdown', () => {\r\n this.showing = false;\r\n\r\n if (this.props.onhide) {\r\n this.props.onhide();\r\n }\r\n\r\n m.redraw();\r\n });\r\n }\r\n\r\n /**\r\n * Get the template for the button.\r\n */\r\n protected getButton(): any {\r\n return (\r\n <button\r\n className={'Dropdown-toggle ' + this.props.buttonClassName}\r\n data-toggle=\"dropdown\"\r\n onclick={this.props.onclick}>\r\n {this.getButtonContent()}\r\n </button>\r\n );\r\n }\r\n\r\n /**\r\n * Get the template for the button's content.\r\n *\r\n * @return {*}\r\n */\r\n protected getButtonContent() {\r\n const attrs = this.props;\r\n\r\n return [\r\n attrs.icon ? icon(attrs.icon, {className: 'Button-icon'}) : '',\r\n <span className=\"Button-label\">{attrs.label}</span>,\r\n attrs.caretIcon ? icon(attrs.caretIcon, {className: 'Button-caret'}) : ''\r\n ];\r\n }\r\n\r\n protected getMenu(items) {\r\n return (\r\n <ul className={'Dropdown-menu dropdown-menu ' + this.props.menuClassName}>\r\n {items}\r\n </ul>\r\n );\r\n }\r\n}\r\n","import Button, {ButtonProps} from './Button';\r\n\r\ninterface LinkButtonProps extends ButtonProps {\r\n active: boolean;\r\n oncreate: Function;\r\n href?: string;\r\n}\r\n\r\n/**\r\n * The `LinkButton` component defines a `Button` which links to a route.\r\n *\r\n * ### Props\r\n *\r\n * All of the props accepted by `Button`, plus:\r\n *\r\n * - `active` Whether or not the page that this button links to is currently\r\n * active.\r\n * - `href` The URL to link to. If the current URL `m.route()` matches this,\r\n * the `active` prop will automatically be set to true.\r\n */\r\nexport default class LinkButton extends Button<LinkButtonProps> {\r\n static initProps(props: LinkButtonProps) {\r\n props.active = this.isActive(props);\r\n props.oncreate = props.oncreate;\r\n }\r\n\r\n view(vnode) {\r\n const vdom = super.view(vnode);\r\n\r\n vdom.tag = m.route.Link;\r\n\r\n return vdom;\r\n }\r\n\r\n /**\r\n * Determine whether a component with the given props is 'active'.\r\n */\r\n static isActive(props: LinkButtonProps): boolean {\r\n return typeof props.active !== 'undefined'\r\n ? props.active\r\n : m.route.get() === props.href;\r\n }\r\n}\r\n","import avatar from '../../common/helpers/avatar';\r\nimport username from '../../common/helpers/username';\r\nimport Dropdown from '../../common/components/Dropdown';\r\nimport LinkButton from '../../common/components/LinkButton';\r\nimport Button from '../../common/components/Button';\r\nimport ItemList from '../../common/utils/ItemList';\r\nimport Separator from '../../common/components/Separator';\r\nimport Group from '../../common/models/Group';\r\n\r\n/**\r\n * The `SessionDropdown` component shows a button with the current user's\r\n * avatar/name, with a dropdown of session controls.\r\n */\r\nexport default class SessionDropdown extends Dropdown {\r\n static initProps(props) {\r\n super.initProps(props);\r\n\r\n props.className = 'SessionDropdown';\r\n props.buttonClassName = 'Button Button--user Button--flat';\r\n props.menuClassName = 'Dropdown-menu--right';\r\n }\r\n\r\n view() {\r\n this.props.children = this.items().toArray();\r\n\r\n return super.view();\r\n }\r\n\r\n getButtonContent() {\r\n const user = app.session.user;\r\n\r\n return [\r\n avatar(user), ' ',\r\n <span className=\"Button-label\">{username(user)}</span>\r\n ];\r\n }\r\n\r\n /**\r\n * Build an item list for the contents of the dropdown menu.\r\n */\r\n items(): ItemList {\r\n const items = new ItemList();\r\n const user = app.session.user;\r\n\r\n items.add('profile',\r\n LinkButton.component({\r\n icon: 'fas fa-user',\r\n children: app.translator.trans('core.forum.header.profile_button'),\r\n href: app.route.user(user)\r\n }),\r\n 100\r\n );\r\n\r\n // items.add('settings',\r\n // LinkButton.component({\r\n // icon: 'fas fa-cog',\r\n // children: app.translator.trans('core.forum.header.settings_button'),\r\n // href: app.route('settings')\r\n // }),\r\n // 50\r\n // );\r\n\r\n if (app.forum.attribute('adminUrl')) {\r\n items.add('administration',\r\n LinkButton.component({\r\n icon: 'fas fa-wrench',\r\n children: app.translator.trans('core.forum.header.admin_button'),\r\n href: app.forum.attribute('adminUrl'),\r\n target: '_blank',\r\n config: () => {}\r\n }),\r\n 0\r\n );\r\n }\r\n\r\n items.add('separator', Separator.component(), -90);\r\n\r\n items.add('logOut',\r\n Button.component({\r\n icon: 'fas fa-sign-out-alt',\r\n children: app.translator.trans('core.forum.header.log_out_button'),\r\n onclick: app.session.logout.bind(app.session)\r\n }),\r\n -100\r\n );\r\n\r\n return items;\r\n }\r\n}\r\n","import Dropdown, {DropdownProps} from './Dropdown';\r\nimport icon from '../helpers/icon';\r\n\r\nexport interface SelectDropdownProps extends DropdownProps {\r\n defaultLabel?: string;\r\n}\r\n\r\n/**\r\n * The `SelectDropdown` component is the same as a `Dropdown`, except the toggle\r\n * button's label is set as the label of the first child which has a truthy\r\n * `active` prop.\r\n *\r\n * ### Props\r\n *\r\n * - `caretIcon`\r\n * - `defaultLabel`\r\n */\r\nexport default class SelectDropdown extends Dropdown<SelectDropdownProps> {\r\n static initProps(props: SelectDropdownProps) {\r\n props.caretIcon = typeof props.caretIcon !== 'undefined' ? props.caretIcon : 'fas fa-sort';\r\n\r\n super.initProps(props);\r\n\r\n props.className += ' Dropdown--select';\r\n }\r\n\r\n getButtonContent() {\r\n const activeChild = this.props.children.filter(child => child.attrs.active)[0];\r\n let label = activeChild && activeChild.attrs.children || this.props.defaultLabel;\r\n\r\n if (label instanceof Array) label = label[0];\r\n\r\n return [\r\n <span className=\"Button-label\">{label}</span>,\r\n icon(this.props.caretIcon, {className: 'Button-caret'})\r\n ];\r\n }\r\n}\r\n","import Component from '../../common/Component';\nimport listItems from '../../common/helpers/listItems';\nimport Button from '../../common/components/Button';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Notification from '../../common/models/Notification';\nimport Discussion from '../../common/models/Discussion';\n\n/**\n * The `NotificationList` component displays a list of the logged-in user's\n * notifications, grouped by discussion.\n */\nexport default class NotificationList extends Component {\n /**\n * Whether or not the notifications are loading.\n */\n loading: boolean = false;\n\n /**\n * Whether or not there are more results that can be loaded.\n */\n moreResults: boolean = false;\n\n private $scrollParent: ZeptoCollection;\n private scrollHandler: () => void;\n\n view() {\n const pages = app.cache.notifications || [];\n\n return (\n <div className=\"NotificationList\">\n <div className=\"NotificationList-header\">\n <div className=\"App-primaryControl\">\n {Button.component({\n className: 'Button Button--icon Button--link',\n icon: 'fas fa-check',\n title: app.translator.transText('core.forum.notifications.mark_all_as_read_tooltip'),\n onclick: this.markAllAsRead.bind(this)\n })}\n </div>\n\n <h4 className=\"App-titleControl App-titleControl--text\">{app.translator.trans('core.forum.notifications.title')}</h4>\n </div>\n\n <div className=\"NotificationList-content\">\n {pages.length ? pages.map(notifications => {\n const groups = [];\n const discussions = {};\n\n notifications.forEach(notification => {\n const subject = notification.subject();\n\n if (typeof subject === 'undefined') return;\n\n // Get the discussion that this notification is related to. If it's not\n // directly related to a discussion, it may be related to a post or\n // other entity which is related to a discussion.\n let discussion: any = false;\n if (subject instanceof Discussion) discussion = subject;\n else if (subject && subject.discussion) discussion = subject.discussion();\n\n // If the notification is not related to a discussion directly or\n // indirectly, then we will assign it to a neutral group.\n const key = discussion ? discussion.id() : 0;\n discussions[key] = discussions[key] || {discussion: discussion, notifications: []};\n discussions[key].notifications.push(notification);\n\n if (groups.indexOf(discussions[key]) === -1) {\n groups.push(discussions[key]);\n }\n });\n\n return groups.map(group => {\n const badges = group.discussion && group.discussion.badges().toArray();\n\n return (\n <div className=\"NotificationGroup\">\n {group.discussion\n ? (\n <m.route.Link className=\"NotificationGroup-header\"\n href={app.route.discussion(group.discussion)}>\n {badges && badges.length ? <ul className=\"NotificationGroup-badges badges\">{listItems(badges)}</ul> : ''}\n {group.discussion.title()}\n </m.route.Link>\n ) : (\n <div className=\"NotificationGroup-header\">\n {app.forum.attribute('title')}\n </div>\n )}\n\n <ul className=\"NotificationGroup-content\">\n {group.notifications.map(notification => {\n const NotificationComponent = app.notificationComponents[notification.contentType()];\n return NotificationComponent ? <li>{NotificationComponent.component({notification})}</li> : '';\n })}\n </ul>\n </div>\n );\n });\n }) : ''}\n {this.loading\n ? <LoadingIndicator className=\"LoadingIndicator--block\" />\n : (pages.length ? '' : <div className=\"NotificationList-empty\">{app.translator.trans('core.forum.notifications.empty_text')}</div>)}\n </div>\n </div>\n );\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n const $notifications = this.$('.NotificationList-content');\n const $scrollParent = this.$scrollParent = $notifications.css('overflow') === 'auto' ? $notifications : $(window);\n\n this.scrollHandler = () => {\n const scrollTop = $scrollParent.scrollTop();\n const viewportHeight = $scrollParent.height();\n const contentTop = $scrollParent === $notifications ? 0 : $notifications.offset().top;\n const contentHeight = $notifications[0].scrollHeight;\n\n if (this.moreResults && !this.loading && scrollTop + viewportHeight >= contentTop + contentHeight) {\n this.loadMore();\n }\n };\n\n $scrollParent.on('scroll', this.scrollHandler);\n }\n\n onremove(vnode) {\n super.onremove(vnode);\n\n this.$scrollParent.off('scroll', this.scrollHandler);\n }\n\n /**\n * Load notifications into the application's cache if they haven't already\n * been loaded.\n */\n load() {\n if (app.session.user.newNotificationCount()) {\n delete app.cache.notifications;\n }\n\n if (app.cache.notifications) {\n return;\n }\n\n app.session.user.pushAttributes({newNotificationCount: 0});\n\n this.loadMore();\n }\n\n /**\n * Load the next page of notification results.\n */\n loadMore() {\n this.loading = true;\n m.redraw();\n\n const params = app.cache.notifications ? {page: {offset: app.cache.notifications.length * 10}} : null;\n\n return app.store.find<Notification>('notifications', params)\n .then(this.parseResults.bind(this))\n .catch(() => {})\n .then(() => {\n this.loading = false;\n m.redraw();\n });\n }\n\n /**\n * Parse results and append them to the notification list.\n */\n parseResults(results: Notification[]): Notification[] {\n app.cache.notifications = app.cache.notifications || [];\n\n if (results.length) app.cache.notifications.push(results);\n\n this.moreResults = !!results.payload.links.next;\n\n return results;\n }\n\n /**\n * Mark all of the notifications as read.\n */\n markAllAsRead() {\n if (!app.cache.notifications) return;\n\n app.session.user.pushAttributes({unreadNotificationCount: 0});\n\n app.cache.notifications.forEach(notifications => {\n notifications.forEach(notification => notification.pushAttributes({isRead: true}))\n });\n\n app.request({\n url: `${app.forum.attribute('apiUrl')}/notifications/read`,\n method: 'POST'\n });\n }\n}\n","import Dropdown from '../../common/components/Dropdown';\r\nimport icon from '../../common/helpers/icon';\r\nimport NotificationList from './NotificationList';\r\n\r\nexport default class NotificationsDropdown extends Dropdown {\r\n list = new NotificationList();\r\n\r\n static initProps(props) {\r\n props.className = props.className || 'NotificationsDropdown';\r\n props.buttonClassName = props.buttonClassName || 'Button Button--flat';\r\n props.menuClassName = props.menuClassName || 'Dropdown-menu--right';\r\n props.label = props.label || app.translator.trans('core.forum.notifications.tooltip');\r\n props.icon = props.icon || 'fas fa-bell';\r\n\r\n super.initProps(props);\r\n }\r\n\r\n getButton() {\r\n const newNotifications = this.getNewCount();\r\n const vdom = super.getButton();\r\n\r\n vdom.attrs.title = this.props.label;\r\n\r\n vdom.attrs.className += (newNotifications ? ' new' : '');\r\n vdom.attrs.onclick = this.onclick.bind(this);\r\n\r\n return vdom;\r\n }\r\n\r\n getButtonContent() {\r\n const unread = this.getUnreadCount();\r\n\r\n return [\r\n icon(this.props.icon, {className: 'Button-icon'}),\r\n unread ? <span className=\"NotificationsDropdown-unread\">{unread}</span> : '',\r\n <span className=\"Button-label\">{this.props.label}</span>\r\n ];\r\n }\r\n\r\n getMenu() {\r\n return (\r\n <div className={'Dropdown-menu ' + this.props.menuClassName} onclick={this.menuClick.bind(this)}>\r\n {this.showing ? m(this.list) : ''}\r\n </div>\r\n );\r\n }\r\n\r\n onclick() {\r\n if (app.drawer.isOpen()) {\r\n this.goToRoute();\r\n } else {\r\n this.list.load();\r\n }\r\n }\r\n\r\n goToRoute() {\r\n m.route.set(app.route('notifications'));\r\n }\r\n\r\n getUnreadCount() {\r\n return app.session.user.unreadNotificationCount();\r\n }\r\n\r\n getNewCount() {\r\n return app.session.user.newNotificationCount();\r\n }\r\n\r\n menuClick(e) {\r\n // Don't close the notifications dropdown if the user is opening a link in a\r\n // new tab or window.\r\n if (e.shiftKey || e.metaKey || e.ctrlKey || e.which === 2) e.stopPropagation();\r\n }\r\n}\r\n","/**\r\n * The `KeyboardNavigatable` class manages lists that can be navigated with the\r\n * keyboard, calling callbacks for each actions.\r\n *\r\n * This helper encapsulates the key binding logic, providing a simple fluent\r\n * API for use.\r\n */\r\nexport default class KeyboardNavigatable {\r\n callbacks = {};\r\n\r\n // By default, always handle keyboard navigation.\r\n whenCallback = () => true;\r\n\r\n /**\r\n * Provide a callback to be executed when navigating upwards.\r\n *\r\n * This will be triggered by the Up key.\r\n */\r\n onUp(callback: Function): this {\r\n this.callbacks[38] = e => {\r\n e.preventDefault();\r\n callback(e);\r\n };\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Provide a callback to be executed when navigating downwards.\r\n *\r\n * This will be triggered by the Down key.\r\n */\r\n onDown(callback: Function): this {\r\n this.callbacks[40] = e => {\r\n e.preventDefault();\r\n callback(e);\r\n };\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Provide a callback to be executed when the current item is selected..\r\n *\r\n * This will be triggered by the Return and Tab keys..\r\n */\r\n onSelect(callback: Function): this {\r\n this.callbacks[9] = this.callbacks[13] = e => {\r\n e.preventDefault();\r\n callback(e);\r\n };\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Provide a callback to be executed when the navigation is canceled.\r\n *\r\n * This will be triggered by the Escape key.\r\n */\r\n onCancel(callback: Function): this {\r\n this.callbacks[27] = e => {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n callback(e);\r\n };\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Provide a callback to be executed when previous input is removed.\r\n *\r\n * This will be triggered by the Backspace key.\r\n */\r\n onRemove(callback: Function): this {\r\n this.callbacks[8] = e => {\r\n if (e.target.selectionStart === 0 && e.target.selectionEnd === 0) {\r\n callback(e);\r\n e.preventDefault();\r\n }\r\n };\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Provide a callback that determines whether keyboard input should be handled.\r\n */\r\n when(callback: () => boolean): this {\r\n this.whenCallback = callback;\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Set up the navigation key bindings on the given jQuery element.\r\n */\r\n bindTo($element: any) {\r\n // Handle navigation key events on the navigatable element.\r\n $element.on('keydown', this.navigate.bind(this));\r\n }\r\n\r\n /**\r\n * Interpret the given keyboard event as navigation commands.\r\n */\r\n navigate(event: KeyboardEvent) {\r\n // This callback determines whether keyboard should be handled or ignored.\r\n if (!this.whenCallback()) return;\r\n\r\n const keyCallback = this.callbacks[event.which];\r\n if (keyCallback) {\r\n keyCallback(event);\r\n }\r\n }\r\n}\r\n","import { truncate } from '../utils/string';\r\n\r\n/**\r\n * The `highlight` helper searches for a word phrase in a string, and wraps\r\n * matches with the <mark> tag.\r\n *\r\n * @param {String} string The string to highlight.\r\n * @param {String|RegExp} phrase The word or words to highlight.\r\n * @param {Integer} [length] The number of characters to truncate the string to.\r\n * The string will be truncated surrounding the first match.\r\n */\r\nexport default function highlight(string: string, phrase: string|RegExp, length?: number): any {\r\n if (!phrase && !length) return string;\r\n\r\n // Convert the word phrase into a global regular expression (if it isn't\r\n // already) so we can search the string for matched.\r\n const regexp = phrase instanceof RegExp ? phrase : new RegExp(phrase, 'gi');\r\n\r\n let highlighted = string;\r\n let start = 0;\r\n\r\n // If a length was given, the truncate the string surrounding the first match.\r\n if (length) {\r\n if (phrase) start = Math.max(0, string.search(regexp) - length / 2);\r\n\r\n highlighted = truncate(highlighted, length, start);\r\n }\r\n\r\n // Convert the string into HTML entities, then highlight all matches with\r\n // <mark> tags. Then we will return the result as a trusted HTML string.\r\n highlighted = $('<div/>').text(highlighted).html();\r\n\r\n if (phrase) highlighted = highlighted.replace(regexp, '<mark>$&</mark>');\r\n\r\n return m.trust(highlighted);\r\n}\r\n","export default abstract class SearchSource {\r\n abstract view(vnode: string);\r\n\r\n abstract search(query: string);\r\n}\r\n","import highlight from '../../common/helpers/highlight';\nimport LinkButton from '../../common/components/LinkButton';\nimport SearchSource from \"./SearchSource\";\nimport Discussion from \"../../common/models/Discussion\";\n\n/**\n * The `DiscussionsSearchSource` finds and displays discussion search results in\n * the search dropdown.\n */\nexport default class DiscussionsSearchSource extends SearchSource {\n protected results: { [key: string]: Discussion[] } = {};\n\n search(query: string) {\n query = query.toLowerCase();\n\n this.results[query] = [];\n\n const params = {\n filter: {q: query},\n page: {limit: 3},\n include: 'mostRelevantPost'\n };\n\n return app.store.find<Discussion>('discussions', params).then(results => this.results[query] = results);\n }\n\n view(query: string) {\n query = query.toLowerCase();\n\n const results = this.results[query] || [];\n\n return [\n <li className=\"Dropdown-header\">{app.translator.trans('core.forum.search.discussions_heading')}</li>,\n <li>\n {LinkButton.component({\n icon: 'fas fa-search',\n children: app.translator.trans('core.forum.search.all_discussions_button', {query}),\n href: app.route('index', {q: query})\n })}\n </li>,\n results.map(discussion => {\n const mostRelevantPost = discussion.mostRelevantPost();\n\n return (\n <li className=\"DiscussionSearchResult\" data-index={'discussions' + discussion.id()}>\n <m.route.Link href={app.route.discussion(discussion, mostRelevantPost && mostRelevantPost.number())}>\n <div className=\"DiscussionSearchResult-title\">{highlight(discussion.title(), query)}</div>\n {mostRelevantPost ? <div className=\"DiscussionSearchResult-excerpt\">{highlight(mostRelevantPost.contentPlain(), query, 100)}</div> : ''}\n </m.route.Link>\n </li>\n );\n })\n ];\n }\n}\n","import highlight from '../../common/helpers/highlight';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport SearchSource from \"./SearchSource\";\nimport User from '../../common/models/User';\n\n/**\n * The `UsersSearchSource` finds and displays user search results in the search\n * dropdown.\n *\n * @implements SearchSource\n */\nexport default class UsersSearchSource extends SearchSource {\n protected results: { [key: string]: User[] } = {};\n\n search(query: string) {\n return app.store.find<User>('users', {\n filter: {q: query},\n page: {limit: 5}\n }).then(results => {\n this.results[query] = results;\n m.redraw();\n });\n }\n\n view(query: string) {\n query = query.toLowerCase();\n\n const results = (this.results[query] || [])\n .concat(app.store.all<User>('users').filter(user => [user.username(), user.displayName()].some(value => value.toLowerCase().substr(0, query.length) === query)))\n .filter((e, i, arr) => arr.lastIndexOf(e) === i)\n .sort((a, b) => a.displayName().localeCompare(b.displayName()));\n\n if (!results.length) return '';\n\n return [\n <li className=\"Dropdown-header\">{app.translator.trans('core.forum.search.users_heading')}</li>,\n results.map(user => {\n const name = username(user);\n\n if (!name.children) {\n name.children = [name.text];\n delete name.text;\n }\n\n name.children[0] = highlight(name.children[0], query);\n\n return (\n <li className=\"UserSearchResult\" data-index={'users' + user.id()}>\n <m.route.Link href={app.route.user(user)}>\n {avatar(user)}\n {name}\n </m.route.Link>\n </li>\n );\n })\n ];\n }\n}\n","import Component from '../../common/Component';\r\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\r\nimport ItemList from '../../common/utils/ItemList';\r\nimport KeyboardNavigatable from '../utils/KeyboardNavigatable';\r\nimport icon from '../../common/helpers/icon';\r\nimport DiscussionsSearchSource from './DiscussionsSearchSource';\r\nimport UsersSearchSource from './UsersSearchSource';\r\nimport SearchSource from './SearchSource';\r\n\r\nimport Stream from 'mithril/stream';\r\n\r\n/**\r\n * The `Search` component displays a menu of as-you-type results from a variety\r\n * of sources.\r\n *\r\n * The search box will be 'activated' if the app's current controller implements\r\n * a `searching` method that returns a truthy value. If this is the case, an 'x'\r\n * button will be shown next to the search field, and clicking it will call the\r\n * `clearSearch` method on the controller.\r\n */\r\nexport default class Search extends Component {\r\n /**\r\n * The value of the search input.\r\n */\r\n value: Stream<string> = m.prop('');\r\n\r\n /**\r\n * Whether or not the search input has focus.\r\n */\r\n hasFocus: boolean = false;\r\n\r\n /**\r\n * An array of SearchSources.\r\n */\r\n sources: SearchSource[] = null;\r\n\r\n /**\r\n * The number of sources that are still loading results.\r\n */\r\n loadingSources = 0;\r\n\r\n /**\r\n * A list of queries that have been searched for.\r\n */\r\n searched: string[] = [];\r\n\r\n /**\r\n * The index of the currently-selected <li> in the results list. This can be\r\n * a unique string (to account for the fact that an item's position may jump\r\n * around as new results load), but otherwise it will be numeric (the\r\n * sequential position within the list).\r\n */\r\n index: string|number = 0;\r\n\r\n navigator: KeyboardNavigatable;\r\n\r\n searchTimeout: number;\r\n\r\n view() {\r\n const currentSearch = this.getCurrentSearch();\r\n\r\n // Initialize search input value in the view rather than the constructor so\r\n // that we have access to app.current.\r\n if (typeof this.value() === 'undefined') {\r\n this.value(currentSearch || '');\r\n }\r\n\r\n // Initialize search sources in the view rather than the constructor so\r\n // that we have access to app.forum.\r\n if (!this.sources) {\r\n this.sources = this.sourceItems().toArray();\r\n }\r\n\r\n // Hide the search view if no sources were loaded\r\n if (!this.sources.length) return <div/>;\r\n\r\n return (\r\n <div className={'Search ' + classNames({\r\n open: this.value() && this.hasFocus,\r\n focused: this.hasFocus,\r\n active: !!currentSearch,\r\n loading: !!this.loadingSources\r\n })}>\r\n <div className=\"Search-input\">\r\n <input className=\"FormControl\"\r\n type=\"search\"\r\n placeholder={app.translator.transText('core.forum.header.search_placeholder')}\r\n value={this.value()}\r\n oninput={m.withAttr('value', this.value)}\r\n onfocus={() => this.hasFocus = true}\r\n onblur={() => this.hasFocus = false}/>\r\n {this.loadingSources\r\n ? LoadingIndicator.component({size: 'tiny', className: 'Button Button--icon Button--link'})\r\n : currentSearch\r\n ? <button className=\"Search-clear Button Button--icon Button--link\" onclick={this.clear.bind(this)}>{icon('fas fa-times-circle')}</button>\r\n : ''}\r\n </div>\r\n <ul className=\"Dropdown-menu Search-results\">\r\n {this.value() && this.hasFocus\r\n ? this.sources.map(source => source.view(this.value()))\r\n : ''}\r\n </ul>\r\n </div>\r\n );\r\n }\r\n\r\n oncreate(vnode) {\r\n super.oncreate(vnode);\r\n\r\n // Highlight the item that is currently selected.\r\n this.setIndex(this.getCurrentNumericIndex());\r\n\r\n const search = this;\r\n\r\n this.$('.Search-results')\r\n .on('mousedown', e => e.preventDefault())\r\n .on('click', () => this.$('input').blur())\r\n\r\n // Whenever the mouse is hovered over a search result, highlight it.\r\n .on('mouseenter', '> li:not(.Dropdown-header)', function() {\r\n search.setIndex(\r\n search.selectableItems().index(this)\r\n );\r\n });\r\n\r\n const $input = this.$('input');\r\n\r\n this.navigator = new KeyboardNavigatable();\r\n\r\n this.navigator\r\n .onUp(() => this.setIndex(this.getCurrentNumericIndex() - 1, true))\r\n .onDown(() => this.setIndex(this.getCurrentNumericIndex() + 1, true))\r\n .onSelect(this.selectResult.bind(this))\r\n .onCancel(this.clear.bind(this))\r\n .bindTo($input);\r\n\r\n // Handle input key events on the search input, triggering results to load.\r\n $input\r\n .on('input focus', function() {\r\n const query = this.value.toLowerCase();\r\n\r\n if (!query) return;\r\n\r\n clearTimeout(search.searchTimeout);\r\n search.searchTimeout = setTimeout(() => {\r\n if (search.searched.indexOf(query) !== -1) return;\r\n\r\n if (query.length >= 3) {\r\n search.sources.map(source => {\r\n if (!source.search) return;\r\n\r\n search.loadingSources++;\r\n\r\n source.search(query).then(() => {\r\n search.loadingSources = Math.max(0, search.loadingSources - 1);\r\n m.redraw();\r\n });\r\n });\r\n }\r\n\r\n search.searched.push(query);\r\n m.redraw();\r\n }, 250);\r\n })\r\n\r\n .on('focus', function() {\r\n $(this).one('mouseup', e => e.preventDefault()).select();\r\n });\r\n }\r\n\r\n /**\r\n * Get the active search in the app's current controller.\r\n *\r\n * @return {String}\r\n */\r\n getCurrentSearch() {\r\n return app.current && typeof app.current.searching === 'function' && app.current.searching();\r\n }\r\n\r\n /**\r\n * Navigate to the currently selected search result and close the list.\r\n */\r\n selectResult() {\r\n clearTimeout(this.searchTimeout);\r\n this.loadingSources = 0;\r\n\r\n if (this.value()) {\r\n m.route.set(this.getItem(this.index).find('a').attr('href'));\r\n } else {\r\n this.clear();\r\n }\r\n\r\n this.$('input').blur();\r\n }\r\n\r\n /**\r\n * Clear the search input and the current controller's active search.\r\n */\r\n clear() {\r\n this.value('');\r\n\r\n if (this.getCurrentSearch()) {\r\n app.current.clearSearch();\r\n } else {\r\n m.redraw();\r\n }\r\n }\r\n\r\n /**\r\n * Build an item list of SearchSources.\r\n *\r\n * @return {ItemList}\r\n */\r\n sourceItems() {\r\n const items = new ItemList();\r\n\r\n if (app.forum.attribute('canViewDiscussions')) items.add('discussions', new DiscussionsSearchSource());\r\n if (app.forum.attribute('canViewUserList')) items.add('users', new UsersSearchSource());\r\n\r\n return items;\r\n }\r\n\r\n /**\r\n * Get all of the search result items that are selectable.\r\n *\r\n * @return {jQuery}\r\n */\r\n selectableItems() {\r\n return this.$('.Search-results > li:not(.Dropdown-header)');\r\n }\r\n\r\n /**\r\n * Get the position of the currently selected search result item.\r\n *\r\n * @return {Integer}\r\n */\r\n getCurrentNumericIndex() {\r\n return this.selectableItems().index(\r\n this.getItem(this.index)\r\n );\r\n }\r\n\r\n /**\r\n * Get the <li> in the search results with the given index (numeric or named).\r\n *\r\n * @param {String} index\r\n * @return {DOMElement}\r\n */\r\n getItem(index) {\r\n const $items = this.selectableItems();\r\n let $item = $items.filter(`[data-index=\"${index}\"]`);\r\n\r\n if (!$item.length) {\r\n $item = $items.eq(index);\r\n }\r\n\r\n return $item;\r\n }\r\n\r\n /**\r\n * Set the currently-selected search result item to the one with the given\r\n * index.\r\n *\r\n * @param index\r\n * @param scrollToItem Whether or not to scroll the dropdown so that\r\n * the item is in view.\r\n */\r\n setIndex(index: number, scrollToItem?: boolean) {\r\n const $items = this.selectableItems();\r\n const $dropdown = $items.parent();\r\n\r\n let fixedIndex = index;\r\n if (index < 0) {\r\n fixedIndex = $items.length - 1;\r\n } else if (index >= $items.length) {\r\n fixedIndex = 0;\r\n }\r\n\r\n const $item = $items.removeClass('active').eq(fixedIndex).addClass('active');\r\n\r\n this.index = $item.attr('data-index') || fixedIndex;\r\n\r\n if (scrollToItem) {\r\n const dropdownScroll = $dropdown.scrollTop();\r\n const dropdownTop = $dropdown.offset().top;\r\n const dropdownBottom = dropdownTop + $dropdown.outerHeight();\r\n const itemTop = $item.offset().top;\r\n const itemBottom = itemTop + $item.outerHeight();\r\n\r\n let scrollTop;\r\n if (itemTop < dropdownTop) {\r\n scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\r\n } else if (itemBottom > dropdownBottom) {\r\n scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\r\n }\r\n\r\n if (typeof scrollTop !== 'undefined') {\r\n $dropdown.animate({scrollTop}, 100);\r\n }\r\n }\r\n }\r\n}\r\n","import Component from '../../common/Component';\r\nimport Button from '../../common/components/Button';\r\nimport LogInModal from './LogInModal';\r\n// import SignUpModal from './SignUpModal';\r\nimport SessionDropdown from './SessionDropdown';\r\nimport SelectDropdown from '../../common/components/SelectDropdown';\r\nimport NotificationsDropdown from './NotificationsDropdown';\r\nimport ItemList from '../../common/utils/ItemList';\r\nimport listItems from '../../common/helpers/listItems';\r\n\r\nimport Search from './Search';\r\n\r\n/**\r\n * The `HeaderSecondary` component displays secondary header controls, such as\r\n * the search box and the user menu. On the default skin, these are shown on the\r\n * right side of the header.\r\n */\r\nexport default class HeaderSecondary extends Component {\r\n view() {\r\n return (\r\n <ul className=\"Header-controls\">\r\n {listItems(this.items().toArray())}\r\n </ul>\r\n );\r\n }\r\n\r\n /**\r\n * Build an item list for the controls.\r\n */\r\n items(): ItemList {\r\n const items = new ItemList();\r\n\r\n items.add('search', Search.component(), 30);\r\n\r\n if (app.forum.attribute(\"showLanguageSelector\") && Object.keys(app.data.locales).length > 1) {\r\n const locales = [];\r\n\r\n for (const locale in app.data.locales) {\r\n locales.push(Button.component({\r\n active: app.data.locale === locale,\r\n children: app.data.locales[locale],\r\n icon: app.data.locale === locale ? 'fas fa-check' : true,\r\n onclick: () => {\r\n if (app.session.user) {\r\n app.session.user.savePreferences({locale}).then(() => window.location.reload());\r\n } else {\r\n document.cookie = `locale=${locale}; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT`;\r\n window.location.reload();\r\n }\r\n }\r\n }));\r\n }\r\n\r\n items.add('locale', SelectDropdown.component({\r\n children: locales,\r\n buttonClassName: 'Button Button--link'\r\n }), 20);\r\n }\r\n\r\n if (app.session.user) {\r\n items.add('notifications', NotificationsDropdown.component(), 10);\r\n items.add('session', SessionDropdown.component(), 0);\r\n } else {\r\n if (app.forum.attribute('allowSignUp')) {\r\n items.add('signUp',\r\n Button.component({\r\n children: app.translator.trans('core.forum.header.sign_up_link'),\r\n className: 'Button Button--link',\r\n onclick: () => app.modal.show(new SignUpModal())\r\n }), 10\r\n );\r\n }\r\n\r\n items.add('logIn',\r\n Button.component({\r\n children: app.translator.trans('core.forum.header.log_in_link'),\r\n className: 'Button Button--link',\r\n onclick: () => app.modal.show(new LogInModal())\r\n }), 0\r\n );\r\n }\r\n\r\n return items;\r\n }\r\n}\r\n","import Component from '../../common/Component';\r\n\r\nexport default class IndexPage extends Component {\r\n oninit() {\r\n console.log('IndexPage#oninit');\r\n }\r\n\r\n view() {\r\n return (\r\n <div class=\"container\">\r\n <h1>hi</h1>\r\n </div>\r\n );\r\n }\r\n}\r\n","import Component from '../../common/Component';\r\n\r\n/**\r\n * The `Page` component\r\n */\r\nexport default abstract class Page extends Component {\r\n /**\r\n * A class name to apply to the body while the route is active.\r\n */\r\n bodyClass: string = '';\r\n\r\n oninit(vnode) {\r\n super.oninit(vnode);\r\n\r\n if (this.bodyClass) {\r\n $('#app').addClass(this.bodyClass);\r\n }\r\n }\r\n\r\n oncreate(vnode) {\r\n super.oncreate(vnode);\r\n\r\n app.previous = app.current;\r\n app.current = this;\r\n\r\n app.drawer.hide();\r\n app.modal.close();\r\n }\r\n\r\n onremove(vnode) {\r\n super.onremove(vnode);\r\n\r\n $('#app').removeClass(this.bodyClass);\r\n }\r\n}\r\n","/**\r\n * Setup the sidebar DOM element to be affixed to the top of the viewport\r\n * using hcSticky.\r\n */\r\nexport default function affixSidebar(vnode) {\r\n const element = vnode.dom;\r\n const $sidebar = $(element);\r\n const $header = $('#header');\r\n const $affixElement = $sidebar.find('> ul')[0];\r\n\r\n $(window).off('.affix');\r\n\r\n new hcSticky($affixElement, {\r\n stickTo: element,\r\n top: $header.outerHeight(true) + parseInt($sidebar.css('margin-top'), 10),\r\n });\r\n}\r\n","/**\r\n * The `humanTime` utility converts a date to a localized, human-readable time-\r\n * ago string.\r\n */\r\nexport default function humanTime(time: Date): string {\r\n let m = dayjs(time);\r\n const now = dayjs();\r\n\r\n // To prevent showing things like \"in a few seconds\" due to small offsets\r\n // between client and server time, we always reset future dates to the\r\n // current time. This will result in \"just now\" being shown instead.\r\n if (m.isAfter(now)) {\r\n m = now;\r\n }\r\n\r\n const day = 864e5;\r\n const diff = m.diff(dayjs());\r\n let ago = null;\r\n\r\n // If this date was more than a month ago, we'll show the name of the month\r\n // in the string. If it wasn't this year, we'll show the year as well.\r\n if (diff < -30 * day) {\r\n if (m.year() === dayjs().year()) {\r\n ago = m.format('D MMM');\r\n } else {\r\n ago = m.format('MMM \\'YY');\r\n }\r\n } else {\r\n ago = m.fromNow();\r\n }\r\n\r\n return ago;\r\n};\r\n","import Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\n// import EditUserModal from '../components/EditUserModal';\nimport UserPage from '../components/UserPage';\nimport ItemList from '../../common/utils/ItemList';\nimport User from \"../../common/models/User\";\n\n/**\n * The `UserControls` utility constructs a list of buttons for a user which\n * perform actions on it.\n */\nexport default {\n /**\n * Get a list of controls for a user.\n *\n * @param user\n * @param context The parent component under which the controls menu will\n * be displayed.\n */\n controls(user: User, context: any): ItemList {\n const items = new ItemList();\n\n ['user', 'moderation', 'destructive'].forEach(section => {\n const controls = this[section + 'Controls'](user, context).toArray();\n if (controls.length) {\n controls.forEach(item => items.add(item.itemName, item));\n items.add(section + 'Separator', Separator.component());\n }\n });\n\n return items;\n },\n\n /**\n * Get controls for a user pertaining to the current user (e.g. poke, follow).\n */\n userControls(): ItemList {\n return new ItemList();\n },\n\n /**\n * Get controls for a user pertaining to moderation (e.g. suspend, edit).\n */\n moderationControls(user: User): ItemList {\n const items = new ItemList();\n\n if (user.canEdit()) {\n items.add('edit', Button.component({\n icon: 'fas fa-pencil-alt',\n children: app.translator.trans('core.forum.user_controls.edit_button'),\n onclick: this.editAction.bind(user)\n }));\n }\n\n return items;\n },\n\n /**\n * Get controls for a user which are destructive (e.g. delete).\n */\n destructiveControls(user: User): ItemList {\n const items = new ItemList();\n\n if (user.id() !== '1' && user.canDelete()) {\n items.add('delete', Button.component({\n icon: 'fas fa-times',\n children: app.translator.trans('core.forum.user_controls.delete_button'),\n onclick: this.deleteAction.bind(user)\n }));\n }\n\n return items;\n },\n\n /**\n * Delete the user.\n */\n deleteAction(this: User) {\n if (confirm(app.translator.transText('core.forum.user_controls.delete_confirmation'))) {\n this.delete().then(() => {\n if (app.current instanceof UserPage && app.current.user === this) {\n app.history.back();\n } else {\n window.location.reload();\n }\n });\n }\n },\n\n /**\n * Edit the user.\n */\n editAction(this: User) {\n app.modal.show(new EditUserModal({user: this}));\n }\n};\n","import Component, {ComponentProps} from '../../common/Component';\r\nimport avatar from '../../common/helpers/avatar';\r\nimport icon from '../../common/helpers/icon';\r\nimport listItems from '../../common/helpers/listItems';\r\nimport ItemList from '../../common/utils/ItemList';\r\nimport Button from '../../common/components/Button';\r\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\r\nimport User from '../../common/models/User';\r\n\r\nexport interface AvatarEditorProps extends ComponentProps {\r\n user: User;\r\n}\r\n\r\n/**\r\n * The `AvatarEditor` component displays a user's avatar along with a dropdown\r\n * menu which allows the user to upload/remove the avatar.\r\n */\r\nexport default class AvatarEditor extends Component<AvatarEditorProps> {\r\n /**\r\n * Whether or not an avatar upload is in progress.\r\n */\r\n loading = false;\r\n\r\n /**\r\n * Whether or not an image has been dragged over the dropzone.\r\n */\r\n isDraggedOver = false;\r\n\r\n static initProps(props) {\r\n super.initProps(props);\r\n\r\n props.className = props.className || '';\r\n }\r\n\r\n view() {\r\n const user = this.props.user;\r\n\r\n return (\r\n <div className={'AvatarEditor Dropdown ' + this.props.className + (this.loading ? ' loading' : '') + (this.isDraggedOver ? ' dragover' : '')}>\r\n {avatar(user)}\r\n <a className={ user.avatarUrl() ? \"Dropdown-toggle\" : \"Dropdown-toggle AvatarEditor--noAvatar\" }\r\n title={app.translator.trans('core.forum.user.avatar_upload_tooltip')}\r\n data-toggle=\"dropdown\"\r\n onclick={this.quickUpload.bind(this)}\r\n ondragover={this.enableDragover.bind(this)}\r\n ondragenter={this.enableDragover.bind(this)}\r\n ondragleave={this.disableDragover.bind(this)}\r\n ondragend={this.disableDragover.bind(this)}\r\n ondrop={this.dropUpload.bind(this)}>\r\n {this.loading ? LoadingIndicator.component() : (user.avatarUrl() ? icon('fas fa-pencil-alt') : icon('fas fa-plus-circle'))}\r\n </a>\r\n <ul className=\"Dropdown-menu Menu\">\r\n {listItems(this.controlItems().toArray())}\r\n </ul>\r\n </div>\r\n );\r\n }\r\n\r\n /**\r\n * Get the items in the edit avatar dropdown menu.\r\n *\r\n * @return {ItemList}\r\n */\r\n controlItems() {\r\n const items = new ItemList();\r\n\r\n items.add('upload',\r\n Button.component({\r\n icon: 'fas fa-upload',\r\n children: app.translator.trans('core.forum.user.avatar_upload_button'),\r\n onclick: this.openPicker.bind(this)\r\n })\r\n );\r\n\r\n items.add('remove',\r\n Button.component({\r\n icon: 'fas fa-times',\r\n children: app.translator.trans('core.forum.user.avatar_remove_button'),\r\n onclick: this.remove.bind(this)\r\n })\r\n );\r\n\r\n return items;\r\n }\r\n\r\n /**\r\n * Enable dragover style\r\n *\r\n * @param {Event} e\r\n */\r\n enableDragover(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.isDraggedOver = true;\r\n }\r\n\r\n /**\r\n * Disable dragover style\r\n *\r\n * @param {Event} e\r\n */\r\n disableDragover(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.isDraggedOver = false;\r\n }\r\n\r\n /**\r\n * Upload avatar when file is dropped into dropzone.\r\n *\r\n * @param {Event} e\r\n */\r\n dropUpload(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.isDraggedOver = false;\r\n this.upload(e.dataTransfer.files[0]);\r\n }\r\n\r\n /**\r\n * If the user doesn't have an avatar, there's no point in showing the\r\n * controls dropdown, because only one option would be viable: uploading.\r\n * Thus, when the avatar editor's dropdown toggle button is clicked, we prompt\r\n * the user to upload an avatar immediately.\r\n *\r\n * @param {Event} e\r\n */\r\n quickUpload(e) {\r\n if (!this.props.user.avatarUrl()) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.openPicker();\r\n }\r\n }\r\n\r\n /**\r\n * Upload avatar using file picker\r\n */\r\n openPicker() {\r\n if (this.loading) return;\r\n\r\n // Create a hidden HTML input element and click on it so the user can select\r\n // an avatar file. Once they have, we will upload it via the API.\r\n const user = this.props.user;\r\n const $input = $('<input type=\"file\">');\r\n\r\n $input.appendTo('body').hide().click().on('change', e => {\r\n this.upload($(e.target)[0].files[0]);\r\n });\r\n }\r\n\r\n /**\r\n * Upload avatar\r\n *\r\n * @param {File} file\r\n */\r\n upload(file) {\r\n if (this.loading) return;\r\n\r\n const user = this.props.user;\r\n const body = new FormData();\r\n data.append('avatar', file);\r\n\r\n this.loading = true;\r\n m.redraw();\r\n\r\n app.request({\r\n method: 'POST',\r\n url: `${app.forum.attribute('apiUrl')}/users/${user.id()}/avatar`,\r\n serialize: raw => raw,\r\n body\r\n }).then(\r\n this.success.bind(this),\r\n this.failure.bind(this)\r\n );\r\n }\r\n\r\n /**\r\n * Remove the user's avatar.\r\n */\r\n remove() {\r\n const user = this.props.user;\r\n\r\n this.loading = true;\r\n m.redraw();\r\n\r\n app.request({\r\n method: 'DELETE',\r\n url: `${app.forum.attribute('apiUrl')}/users/${user.id()}/avatar`\r\n }).then(\r\n this.success.bind(this),\r\n this.failure.bind(this)\r\n );\r\n }\r\n\r\n /**\r\n * After a successful upload/removal, push the updated user data into the\r\n * store, and force a recomputation of the user's avatar color.\r\n *\r\n * @param {Object} response\r\n * @protected\r\n */\r\n success(response) {\r\n app.store.pushPayload(response);\r\n delete this.props.user.avatarColor;\r\n\r\n this.loading = false;\r\n m.redraw();\r\n }\r\n\r\n /**\r\n * If avatar upload/removal fails, stop loading.\r\n *\r\n * @param {Object} response\r\n * @protected\r\n */\r\n failure(response) {\r\n this.loading = false;\r\n m.redraw();\r\n }\r\n}\r\n","import Component, {ComponentProps} from '../../common/Component';\r\nimport humanTime from '../../common/utils/humanTime';\r\nimport ItemList from '../../common/utils/ItemList';\r\nimport UserControls from '../utils/UserControls';\r\nimport avatar from '../../common/helpers/avatar';\r\nimport username from '../../common/helpers/username';\r\nimport icon from '../../common/helpers/icon';\r\nimport Dropdown from '../../common/components/Dropdown';\r\nimport AvatarEditor from './AvatarEditor';\r\nimport listItems from '../../common/helpers/listItems';\r\nimport User from \"../../common/models/User\";\r\n\r\nexport interface UserCardProps extends ComponentProps {\r\n user: User;\r\n editable: boolean;\r\n controlsButtonClassName: string;\r\n}\r\n\r\n/**\r\n * The `UserCard` component displays a user's profile card. This is used both on\r\n * the `UserPage` (in the hero) and in discussions, shown when hovering over a\r\n * post author.\r\n */\r\nexport default class UserCard extends Component<UserCardProps> {\r\n view() {\r\n const user = this.props.user;\r\n const controls = UserControls.controls(user, this).toArray();\r\n const color = user.color();\r\n const badges = user.badges().toArray();\r\n\r\n return (\r\n <div className={'UserCard ' + (this.props.className || '')}\r\n style={color ? {backgroundColor: color} : ''}>\r\n <div className=\"darkenBackground\">\r\n\r\n <div className=\"container\">\r\n {controls.length ? Dropdown.component({\r\n children: controls,\r\n className: 'UserCard-controls App-primaryControl',\r\n menuClassName: 'Dropdown-menu--right',\r\n buttonClassName: this.props.controlsButtonClassName,\r\n label: app.translator.trans('core.forum.user_controls.button'),\r\n icon: 'fas fa-ellipsis-v'\r\n }) : ''}\r\n\r\n <div className=\"UserCard-profile\">\r\n <h2 className=\"UserCard-identity\">\r\n {this.props.editable\r\n ? [AvatarEditor.component({user, className: 'UserCard-avatar'}), username(user)]\r\n : (\r\n <m.route.Link href={app.route.user(user)}>\r\n <div className=\"UserCard-avatar\">{avatar(user)}</div>\r\n {username(user)}\r\n </m.route.Link>\r\n )}\r\n </h2>\r\n\r\n {badges.length ? (\r\n <ul className=\"UserCard-badges badges\">\r\n {listItems(badges)}\r\n </ul>\r\n ) : ''}\r\n\r\n <ul className=\"UserCard-info\">\r\n {listItems(this.infoItems().toArray())}\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n /**\r\n * Build an item list of tidbits of info to show on this user's profile.\r\n *\r\n * @return {ItemList}\r\n */\r\n infoItems() {\r\n const items = new ItemList();\r\n const user = this.props.user;\r\n const lastSeenAt = user.lastSeenAt();\r\n\r\n if (lastSeenAt) {\r\n const online = user.isOnline();\r\n\r\n items.add('lastSeen', (\r\n <span className={'UserCard-lastSeen' + (online ? ' online' : '')}>\r\n {online\r\n ? [icon('fas fa-circle'), ' ', app.translator.trans('core.forum.user.online_text')]\r\n : [icon('far fa-clock'), ' ', humanTime(lastSeenAt)]}\r\n </span>\r\n ));\r\n }\r\n\r\n items.add('joined', app.translator.trans('core.forum.user.joined_date_text', {ago: humanTime(user.joinTime())}));\r\n\r\n return items;\r\n }\r\n}\r\n","import Page from './Page';\nimport ItemList from '../../common/utils/ItemList';\nimport affixSidebar from '../utils/affixSidebar';\nimport UserCard from './UserCard';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport LinkButton from '../../common/components/LinkButton';\nimport Separator from '../../common/components/Separator';\nimport listItems from '../../common/helpers/listItems';\n\nimport User from '../../common/models/User';\n\n/**\n * The `UserPage` component shows a user's profile. It can be extended to show\n * content inside of the content area. See `ActivityPage` and `SettingsPage` for\n * examples.\n */\nexport default abstract class UserPage extends Page {\n /**\n * The user this page is for.\n */\n user: User;\n bodyClass: string = 'App--user';\n\n /**\n * The username of the currently loaded user\n */\n username: string;\n\n view() {\n return (\n <div className=\"UserPage\">\n {this.user ? [\n UserCard.component({\n user: this.user,\n className: 'Hero UserHero',\n editable: this.user.canEdit() || this.user === app.session.user,\n controlsButtonClassName: 'Button'\n }),\n <div className=\"container\">\n <div className=\"sideNavContainer\">\n <nav className=\"sideNav UserPage-nav\" config={affixSidebar}>\n <ul>{listItems(this.sidebarItems().toArray())}</ul>\n </nav>\n <div className=\"sideNavOffset UserPage-content\">\n {this.content()}\n </div>\n </div>\n </div>\n ] : [\n LoadingIndicator.component({lassName: 'LoadingIndicator--block'})\n ]}\n </div>\n );\n }\n\n /**\n * Get the content to display in the user page.\n */\n abstract content();\n\n /**\n * Initialize the component with a user, and trigger the loading of their\n * activity feed.\n */\n protected show(user: User) {\n this.user = user;\n\n app.setTitle(user.displayName());\n\n m.redraw();\n }\n\n /**\n * Given a username, load the user's profile from the store, or make a request\n * if we don't have it yet. Then initialize the profile page with that user.\n */\n loadUser(username: string) {\n const lowercaseUsername = username.toLowerCase();\n\n if (lowercaseUsername == this.username) return;\n\n this.username = lowercaseUsername;\n\n app.store.all<User>('users').some(user => {\n if (user.username().toLowerCase() === lowercaseUsername && user.joinTime()) {\n this.show(user);\n return true;\n }\n });\n\n if (!this.user) {\n app.store.find('users', username).then(this.show.bind(this));\n }\n }\n\n /**\n * Build an item list for the content of the sidebar.\n */\n sidebarItems() {\n const items = new ItemList();\n\n items.add('nav',\n SelectDropdown.component({\n children: this.navItems().toArray(),\n className: 'App-titleControl',\n buttonClassName: 'Button'\n })\n );\n\n return items;\n }\n\n /**\n * Build an item list for the navigation in the sidebar.\n */\n navItems() {\n const items = new ItemList();\n const user = this.user;\n\n items.add('posts',\n LinkButton.component({\n href: app.route('user.posts', {username: user.username()}),\n children: [app.translator.trans('core.forum.user.posts_link'), <span className=\"Button-badge\">{user.commentCount()}</span>],\n icon: 'far fa-comment'\n }),\n 100\n );\n\n items.add('discussions',\n LinkButton.component({\n href: app.route('user.discussions', {username: user.username()}),\n children: [app.translator.trans('core.forum.user.discussions_link'), <span className=\"Button-badge\">{user.discussionCount()}</span>],\n icon: 'fas fa-bars'\n }),\n 90\n );\n\n if (app.session.user === user) {\n items.add('separator', Separator.component(), -90);\n items.add('settings',\n LinkButton.component({\n href: app.route('settings'),\n children: app.translator.trans('core.forum.user.settings_link'),\n icon: 'fas fa-cog'\n }),\n -100\n );\n }\n\n return items;\n }\n}\n","import UserPage from './UserPage';\r\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\r\nimport Button from '../../common/components/Button';\r\n// import Placeholder from '../../common/components/Placeholder';\r\n// import CommentPost from './CommentPost';\r\nimport Post from \"../../common/models/Post\";\r\n\r\n/**\r\n * The `PostsUserPage` component shows a user's activity feed inside of their\r\n * profile.\r\n */\r\nexport default class PostsUserPage extends UserPage {\r\n /**\r\n * Whether or not the activity feed is currently loading.\r\n */\r\n loading = true;\r\n\r\n /**\r\n * Whether or not there are any more activity items that can be loaded.\r\n */\r\n moreResults = false;\r\n\r\n /**\r\n * The Post models in the feed.\r\n */\r\n posts: Post[] = [];\r\n\r\n /**\r\n * The number of activity items to load per request.\r\n */\r\n loadLimit = 20;\r\n\r\n oninit(vnode) {\r\n super.oninit(vnode);\r\n\r\n this.loadUser(vnode.attrs.username);\r\n }\r\n\r\n onupdate(vnode) {\r\n super.onupdate(vnode);\r\n\r\n this.loadUser(vnode.attrs.username);\r\n }\r\n\r\n content() {\r\n return <p>test</p>;\r\n\r\n if (this.posts.length === 0 && ! this.loading) {\r\n return (\r\n <div className=\"PostsUserPage\">\r\n <Placeholder text={app.translator.trans('core.forum.user.posts_empty_text')} />\r\n </div>\r\n );\r\n }\r\n\r\n let footer;\r\n\r\n if (this.loading) {\r\n footer = LoadingIndicator.component();\r\n } else if (this.moreResults) {\r\n footer = (\r\n <div className=\"PostsUserPage-loadMore\">\r\n {Button.component({\r\n children: app.translator.trans('core.forum.user.posts_load_more_button'),\r\n className: 'Button',\r\n onclick: this.loadMore.bind(this)\r\n })}\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <div className=\"PostsUserPage\">\r\n <ul className=\"PostsUserPage-list\">\r\n {this.posts.map(post => (\r\n <li>\r\n <div className=\"PostsUserPage-discussion\">\r\n {app.translator.trans('core.forum.user.in_discussion_text', {discussion: <m.route.Link href={app.route.post(post)}>{post.discussion().title()}</m.route.Link>})}\r\n </div>\r\n {CommentPost.component({post})}\r\n </li>\r\n ))}\r\n </ul>\r\n <div className=\"PostsUserPage-loadMore\">\r\n {footer}\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n /**\r\n * Initialize the component with a user, and trigger the loading of their\r\n * activity feed.\r\n */\r\n show(user) {\r\n super.show(user);\r\n\r\n this.refresh();\r\n }\r\n\r\n /**\r\n * Clear and reload the user's activity feed.\r\n */\r\n refresh() {\r\n this.loading = true;\r\n this.posts = [];\r\n\r\n m.redraw();\r\n\r\n this.loadResults().then(this.parseResults.bind(this));\r\n }\r\n\r\n /**\r\n * Load a new page of the user's activity feed.\r\n *\r\n * @param offset The position to start getting results from.\r\n */\r\n protected loadResults(offset?: number): Promise<Post[]> {\r\n return app.store.find<Post>('posts', {\r\n filter: {\r\n user: this.user.id(),\r\n type: 'comment'\r\n },\r\n page: {offset, limit: this.loadLimit},\r\n sort: '-createdAt'\r\n });\r\n }\r\n\r\n /**\r\n * Load the next page of results.\r\n */\r\n loadMore() {\r\n this.loading = true;\r\n this.loadResults(this.posts.length).then(this.parseResults.bind(this));\r\n }\r\n\r\n /**\r\n * Parse results and append them to the activity feed.\r\n */\r\n parseResults(results: Post[]): Post[] {\r\n this.loading = false;\r\n\r\n [].push.apply(this.posts, results);\r\n\r\n this.moreResults = results.length >= this.loadLimit;\r\n m.redraw();\r\n\r\n return results;\r\n }\r\n}\r\n","import Application from '../common/Application';\nimport History from './utils/History';\n\nimport HeaderPrimary from './components/HeaderPrimary';\nimport HeaderSecondary from './components/HeaderSecondary';\n\nimport Page from './components/Page';\nimport IndexPage from './components/IndexPage';\nimport PostsUserPage from './components/PostsUserPage';\nimport User from \"../common/models/User\";\nimport Post from \"../common/models/Post\";\nimport Discussion from \"../common/models/Discussion\";\n\nexport default class Forum extends Application {\n routes = {\n 'index': { path: '/', component: IndexPage },\n 'index.filter': { path: '/:filter', component: IndexPage },\n\n 'user': { path: '/u/:username', component: PostsUserPage },\n 'user.posts': { path: '/u/:username', component: PostsUserPage },\n 'user.discussions': { path: '/u/:username', component: PostsUserPage },\n 'settings': { path: '/u/:username', component: PostsUserPage },\n\n 'discussion': { path: '/d/:id', IndexPage },\n };\n\n /**\n * The app's history stack, which keeps track of which routes the user visits\n * so that they can easily navigate back to the previous route.\n */\n history: History = new History();\n\n previous: Page;\n current: Page;\n\n mount() {\n // Get the configured default route and update that route's path to be '/'.\n // Push the homepage as the first route, so that the user will always be\n // able to click on the 'back' button to go home, regardless of which page\n // they started on.\n const defaultRoute = this.forum.attribute('defaultRoute');\n let defaultAction = 'index';\n\n for (const i in this.routes) {\n if (this.routes[i].path === defaultRoute) defaultAction = i;\n }\n\n this.routes[defaultAction].path = '/';\n this.history.push(defaultAction, this.translator.transText('core.forum.header.back_to_index_tooltip'), '/');\n\n // m.mount(document.getElementById('app-navigation'), Navigation.component({className: 'App-backControl', drawer: true}));\n // m.mount(document.getElementById('header-navigation'), Navigation.component());\n m.mount(document.getElementById('header-primary'), new HeaderPrimary());\n m.mount(document.getElementById('header-secondary'), new HeaderSecondary());\n\n // this.pane = new Pane(document.getElementById('app'));\n // this.composer = m.mount(document.getElementById('composer'), Composer.component());\n\n m.route.prefix = '';\n super.mount(this.forum.attribute('basePath'));\n\n // alertEmailConfirmation(this);\n\n // Route the home link back home when clicked. We do not want it to register\n // if the user is opening it in a new tab, however.\n $('#home-link').click((e: MouseEvent) => {\n if (e.ctrlKey || e.metaKey || e.which === 2) return;\n e.preventDefault();\n app.history.home();\n\n // Reload the current user so that their unread notification count is refreshed.\n if (app.session.user) {\n app.store.find('users', app.session.user.id());\n m.redraw();\n }\n });\n }\n\n setupRoutes() {\n super.setupRoutes();\n\n this.route.discussion = (discussion: Discussion, near?: number): string => {\n const slug = discussion.slug();\n return this.route(near && near !== 1 ? 'discussion.near' : 'discussion', {\n id: discussion.id() + (slug.trim() ? '-' + slug : ''),\n near: near && near !== 1 ? near : undefined\n });\n };\n\n /**\n * Generate a URL to a post.\n */\n this.route.post = (post: Post): string => {\n return this.route.discussion(post.discussion(), post.number());\n };\n\n /**\n * Generate a URL to a user.\n */\n this.route.user = (user: User): string => {\n return this.route('user', {\n username: user.username()\n });\n };\n }\n}\n","import * as extend from './extend';\r\n\r\nexport default {\r\n extend: extend,\r\n};\r\n","import compat from '../common/compat';\r\n\r\nimport Forum from './Forum';\r\n\r\nimport IndexPage from './components/IndexPage';\r\n\r\nexport default Object.assign(compat, {\r\n 'components/IndexPage': IndexPage,\r\n Forum: Forum,\r\n}) as any;\r\n","import Forum from './Forum';\r\n\r\nconst app = new Forum();\r\n\r\n// @ts-ignore\r\nwindow.app = app;\r\n\r\napp.bus.subscribe('app.plugins', () => {\r\n // @ts-ignore\r\n const extensions = flarum.extensions;\r\n\r\n Object.keys(extensions).forEach(name => {\r\n const extension = extensions[name];\r\n\r\n // if (typeof extension === 'function') extension();\r\n });\r\n});\r\n\r\nexport { app };\r\n\r\n// Export compat API\r\nimport compat from './compat';\r\n\r\ncompat.app = app;\r\n\r\nexport { compat };\r\n","/*\r\n * This file is part of Flarum.\r\n *\r\n * (c) Toby Zerner <toby.zerner@gmail.com>\r\n *\r\n * For the full copyright and license information, please view the LICENSE\r\n * file that was distributed with this source code.\r\n */\r\n\r\nexport * from './src/common';\r\nexport * from './src/forum';"],"sourceRoot":""} \ No newline at end of file diff --git a/js/src/common/Application.ts b/js/src/common/Application.ts index 00e1b65ee..7fbc9ed38 100644 --- a/js/src/common/Application.ts +++ b/js/src/common/Application.ts @@ -65,7 +65,9 @@ export default abstract class Application { * A local cache that can be used to store data at the application level, so * that is persists between different routes. */ - cache = {}; + cache = { + notifications: null, + }; routes = {}; diff --git a/js/src/common/Model.ts b/js/src/common/Model.ts index 7956d3342..5634ee004 100644 --- a/js/src/common/Model.ts +++ b/js/src/common/Model.ts @@ -107,7 +107,7 @@ export default class Model { * @param [options] * @return {Promise} */ - save(attributes: any, options: any = {}): Promise { + save(attributes: any, options: any = {}): Promise<Model|Model[]> { const data = { type: this.data.type, id: this.data.id, @@ -162,7 +162,7 @@ export default class Model { // old data! We'll revert to that and let others handle the error. response => { this.pushData(oldData); - m.lazyRedraw(); + m.redraw(); throw response; } ); @@ -171,13 +171,13 @@ export default class Model { /** * Send a request to delete the resource. * - * @param {Object} data Data to send along with the DELETE request. + * @param {Object} body Data to send along with the DELETE request. * @param {Object} [options] * @return {Promise} * @public */ - delete(body, options = {}) { - if (!this.exists) return m.deferred.resolve().promise; + delete(body = {}, options = {}) { + if (!this.exists) return Promise.resolve(); return app.request(Object.assign({ method: 'DELETE', diff --git a/js/src/common/Session.ts b/js/src/common/Session.ts index 41819533a..748d7e740 100644 --- a/js/src/common/Session.ts +++ b/js/src/common/Session.ts @@ -24,7 +24,7 @@ export default class Session { /** * Attempt to log in a user. */ - login(body: { identification: string, password: string }, options = {}) { + login(body: { identification: string, password: string, remember?: string }, options = {}) { return app.request(Object.assign({ method: 'POST', url: `${app.forum.attribute('baseUrl')}/login`, diff --git a/js/src/common/Store.ts b/js/src/common/Store.ts index c7c54ad00..daaa90f1c 100644 --- a/js/src/common/Store.ts +++ b/js/src/common/Store.ts @@ -9,7 +9,7 @@ export default class Store { * The local data store. A tree of resource types to IDs, such that * accessing data[type][id] will return the model for that type/ID. */ - protected data: { [key: string]: { [key: number]: Model }} = {}; + data: { [key: string]: { [key: number]: Model }} = {}; /** * The model registry. A map of resource types to the model class that diff --git a/js/src/common/components/Modal.tsx b/js/src/common/components/Modal.tsx index 2c24ae1b8..6ed3d613d 100644 --- a/js/src/common/components/Modal.tsx +++ b/js/src/common/components/Modal.tsx @@ -1,3 +1,5 @@ +import Mithril from 'mithril'; + import Component, {ComponentProps} from '../Component'; import Button from './Button'; import RequestError from "../utils/RequestError"; diff --git a/js/src/common/components/ModalManager.tsx b/js/src/common/components/ModalManager.tsx index 3cc51719a..8233355e9 100644 --- a/js/src/common/components/ModalManager.tsx +++ b/js/src/common/components/ModalManager.tsx @@ -17,8 +17,6 @@ export default class ModalManager extends Component { super.oncreate(vnode); app.modal = this; - - window.vnode = vnode; } view() { @@ -44,7 +42,7 @@ export default class ModalManager extends Component { // if (app.current) app.current.retain = true; - m.redraw(true); + m.redraw(); if (!$('.modal-backdrop').length) { $('<div />').addClass('modal-backdrop') @@ -99,7 +97,7 @@ export default class ModalManager extends Component { app.current.retain = false; - m.lazyRedraw(); + m.redraw(); } /** @@ -109,7 +107,7 @@ export default class ModalManager extends Component { */ onready() { if (this.component && this.component.onready) { - this.component.onready(this.$()); + this.component.onready(); } } } diff --git a/js/src/common/models/User.ts b/js/src/common/models/User.ts index fcdc6e911..5068f5084 100644 --- a/js/src/common/models/User.ts +++ b/js/src/common/models/User.ts @@ -30,7 +30,7 @@ export default class User extends Model { canDelete = Model.attribute('canDelete') as () => boolean; avatarColor = null; - color = computed('username', 'avatarUrl', 'avatarColor', function(username, avatarUrl, avatarColor) { + color = computed(['username', 'avatarUrl', 'avatarColor'], function(username, avatarUrl, avatarColor) { // If we've already calculated and cached the dominant color of the user's // avatar, then we can return that in RGB format. If we haven't, we'll want // to calculate it. Unless the user doesn't have an avatar, in which case @@ -92,6 +92,6 @@ export default class User extends Model { Object.assign(preferences, newPreferences); - return this.save({preferences}); + return <Promise<User>> this.save({preferences}); } } diff --git a/js/src/common/utils/computed.ts b/js/src/common/utils/computed.ts index 08f9a4d3d..4ed7cf632 100644 --- a/js/src/common/utils/computed.ts +++ b/js/src/common/utils/computed.ts @@ -6,9 +6,8 @@ * @param {function} compute The function which computes the value using the * dependent values. */ -export default function computed(...dependentKeys: string[]|Function[]): () => any { - const keys = <string[]> dependentKeys.slice(0, -1); - const compute = <Function> dependentKeys.slice(-1)[0]; +export default function computed(dependentKeys: string|string[], compute: Function): () => any { + const keys = Array.from(dependentKeys); const dependentValues = {}; let computedValue; diff --git a/js/src/common/utils/patchMithril.ts b/js/src/common/utils/patchMithril.ts index 1363c86bc..637adadd0 100644 --- a/js/src/common/utils/patchMithril.ts +++ b/js/src/common/utils/patchMithril.ts @@ -1,9 +1,10 @@ +import m from 'mithril'; import prop from 'mithril/stream'; export default () => { - const mo = global.m; + const mo = window['m']; - const m = function (comp, ...args) { + const _m = function (comp, ...args) { const node = mo.apply(this, arguments); if (!node.attrs) node.attrs = {}; @@ -22,13 +23,13 @@ export default () => { return node; }; - Object.keys(mo).forEach(key => m[key] = mo[key]); + Object.keys(mo).forEach(key => _m[key] = mo[key]); - m.withAttr = (key: string, cb: Function) => function () { + _m.withAttr = (key: string, cb: Function) => function () { cb(this.getAttribute(key) || this[key]); }; - m.prop = prop; + _m.prop = prop; - global.m = m; + window['m'] = _m; } diff --git a/js/src/forum/Forum.ts b/js/src/forum/Forum.ts index e0939e748..ad5a0b781 100644 --- a/js/src/forum/Forum.ts +++ b/js/src/forum/Forum.ts @@ -4,8 +4,12 @@ import History from './utils/History'; import HeaderPrimary from './components/HeaderPrimary'; import HeaderSecondary from './components/HeaderSecondary'; +import Page from './components/Page'; import IndexPage from './components/IndexPage'; import PostsUserPage from './components/PostsUserPage'; +import User from "../common/models/User"; +import Post from "../common/models/Post"; +import Discussion from "../common/models/Discussion"; export default class Forum extends Application { routes = { @@ -26,6 +30,9 @@ export default class Forum extends Application { */ history: History = new History(); + previous: Page; + current: Page; + mount() { // Get the configured default route and update that route's path to be '/'. // Push the homepage as the first route, so that the user will always be @@ -72,7 +79,7 @@ export default class Forum extends Application { setupRoutes() { super.setupRoutes(); - this.route.discussion = (discussion, near) => { + this.route.discussion = (discussion: Discussion, near?: number): string => { const slug = discussion.slug(); return this.route(near && near !== 1 ? 'discussion.near' : 'discussion', { id: discussion.id() + (slug.trim() ? '-' + slug : ''), @@ -82,21 +89,15 @@ export default class Forum extends Application { /** * Generate a URL to a post. - * - * @param {Post} post - * @return {String} */ - this.route.post = post => { + this.route.post = (post: Post): string => { return this.route.discussion(post.discussion(), post.number()); }; /** * Generate a URL to a user. - * - * @param {User} user - * @return {String} */ - this.route.user = user => { + this.route.user = (user: User): string => { return this.route('user', { username: user.username() }); diff --git a/js/src/forum/components/DiscussionsSearchSource.tsx b/js/src/forum/components/DiscussionsSearchSource.tsx index 3ca478006..47a76a3bc 100644 --- a/js/src/forum/components/DiscussionsSearchSource.tsx +++ b/js/src/forum/components/DiscussionsSearchSource.tsx @@ -21,7 +21,7 @@ export default class DiscussionsSearchSource extends SearchSource { include: 'mostRelevantPost' }; - return app.store.find('discussions', params).then(results => this.results[query] = results); + return app.store.find<Discussion>('discussions', params).then(results => this.results[query] = results); } view(query: string) { diff --git a/js/src/forum/components/NotificationList.tsx b/js/src/forum/components/NotificationList.tsx index 271734757..bdaea43c5 100644 --- a/js/src/forum/components/NotificationList.tsx +++ b/js/src/forum/components/NotificationList.tsx @@ -158,7 +158,7 @@ export default class NotificationList extends Component { const params = app.cache.notifications ? {page: {offset: app.cache.notifications.length * 10}} : null; - return app.store.find('notifications', params) + return app.store.find<Notification>('notifications', params) .then(this.parseResults.bind(this)) .catch(() => {}) .then(() => { @@ -170,7 +170,7 @@ export default class NotificationList extends Component { /** * Parse results and append them to the notification list. */ - parseResults(results: Notification[]|any): Notification[]|any { + parseResults(results: Notification[]): Notification[] { app.cache.notifications = app.cache.notifications || []; if (results.length) app.cache.notifications.push(results); diff --git a/js/src/forum/components/UserPage.tsx b/js/src/forum/components/UserPage.tsx index 854d0827f..2461249ea 100644 --- a/js/src/forum/components/UserPage.tsx +++ b/js/src/forum/components/UserPage.tsx @@ -82,7 +82,7 @@ export default abstract class UserPage extends Page { this.username = lowercaseUsername; - app.store.all('users').some(user => { + app.store.all<User>('users').some(user => { if (user.username().toLowerCase() === lowercaseUsername && user.joinTime()) { this.show(user); return true; diff --git a/js/src/forum/components/UsersSearchSource.tsx b/js/src/forum/components/UsersSearchSource.tsx index c02e6d66e..963229997 100644 --- a/js/src/forum/components/UsersSearchSource.tsx +++ b/js/src/forum/components/UsersSearchSource.tsx @@ -27,7 +27,7 @@ export default class UsersSearchSource extends SearchSource { query = query.toLowerCase(); const results = (this.results[query] || []) - .concat(app.store.all<User>('users').filter((user: User) => [user.username(), user.displayName()].some(value => value.toLowerCase().substr(0, query.length) === query))) + .concat(app.store.all<User>('users').filter(user => [user.username(), user.displayName()].some(value => value.toLowerCase().substr(0, query.length) === query))) .filter((e, i, arr) => arr.lastIndexOf(e) === i) .sort((a, b) => a.displayName().localeCompare(b.displayName())); diff --git a/js/src/forum/utils/UserControls.ts b/js/src/forum/utils/UserControls.ts index 053b540b6..3ff102934 100644 --- a/js/src/forum/utils/UserControls.ts +++ b/js/src/forum/utils/UserControls.ts @@ -75,8 +75,8 @@ export default { /** * Delete the user. */ - deleteAction() { - if (confirm(app.translator.trans('core.forum.user_controls.delete_confirmation'))) { + deleteAction(this: User) { + if (confirm(app.translator.transText('core.forum.user_controls.delete_confirmation'))) { this.delete().then(() => { if (app.current instanceof UserPage && app.current.user === this) { app.history.back(); @@ -90,7 +90,7 @@ export default { /** * Edit the user. */ - editAction() { + editAction(this: User) { app.modal.show(new EditUserModal({user: this})); } };