From 0de0c8335396759b7874942a5b3a3412e27fd8e1 Mon Sep 17 00:00:00 2001 From: David Sevilla Martin Date: Sun, 5 Jan 2020 16:53:13 -0500 Subject: [PATCH] Fix listItems isSeparator function, add m() children to attrs, work on posts, subtree retainer --- js/dist/admin.js | 12 +- js/dist/admin.js.map | 2 +- js/dist/forum.js | 12 +- js/dist/forum.js.map | 2 +- js/src/common/Application.ts | 2 +- js/src/common/components/ModalManager.tsx | 4 +- js/src/common/components/Placeholder.tsx | 19 ++ js/src/common/helpers/listItems.tsx | 2 +- js/src/common/helpers/userOnline.tsx | 14 ++ js/src/common/models/User.ts | 2 +- js/src/common/utils/ItemList.ts | 3 +- js/src/common/utils/SubtreeRetainer.ts | 30 +++ js/src/common/utils/patchMithril.ts | 19 ++ js/src/forum/components/CommentPost.tsx | 151 +++++++++++++++ js/src/forum/components/Post.tsx | 118 ++++++++++++ js/src/forum/components/PostUser.tsx | 94 ++++++++++ js/src/forum/components/PostsUserPage.tsx | 8 +- js/src/forum/components/UsersSearchSource.tsx | 2 +- js/src/forum/utils/PostControls.tsx | 175 ++++++++++++++++++ 19 files changed, 645 insertions(+), 26 deletions(-) create mode 100644 js/src/common/components/Placeholder.tsx create mode 100644 js/src/common/helpers/userOnline.tsx create mode 100644 js/src/common/utils/SubtreeRetainer.ts create mode 100644 js/src/forum/components/CommentPost.tsx create mode 100644 js/src/forum/components/Post.tsx create mode 100644 js/src/forum/components/PostUser.tsx create mode 100644 js/src/forum/utils/PostControls.tsx diff --git a/js/dist/admin.js b/js/dist/admin.js index 3ae972216..b935f6e9a 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=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; +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(16);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(3),i=n(9),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(3);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(40),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(2))},function(t,e,n){"use strict";t.exports=n(42)(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(19);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; /**! * @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=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($), +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($), /** * 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(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;r1?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 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=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=k({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 k({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 O({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 P(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 A(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=A(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=k(e.offsets.popper),e.offsets.reference=k(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=P(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(A(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 k(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=O({},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=O({},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=k(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=O({},t.offsets.popper,P(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=k(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=A(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=O({},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(O({},t.Defaults.modifiers,i.modifiers)).forEach((function(e){r.options.modifiers[e]=O({},t.Defaults.modifiers[e]||{},i.modifiers?i.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return O({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(2))},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";t.exports=n(63)},,,,,,,function(t,e,n){(function(e){t.exports=e.jQuery=n(30)}).call(this,n(2))},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,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"),E=f.createElement("tr"),T={tr:f.createElement("tbody"),tbody:x,thead:x,tfoot:x,td:E,th:E,"*":f.createElement("div")},O=/complete|loaded|interactive/,k=/^[\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 P(t){return null!=t&&t==t.window}function A(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function D(t){return"object"==M(t)}function I(t){return D(t)&&!P(t)&&Object.getPrototypeOf(t)==Object.prototype}function z(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 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=k.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=P,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&&!A(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)&&!A(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?P(a)?a["inner"+n]:A(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 O(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(O(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=O(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 O,k=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",k||"*/*"),(k=w.mimeType||k)&&(k.indexOf(",")>-1&&(k=k.split(",",2)[0]),j.overrideMimeType&&j.overrideMimeType(k)),(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(O);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&&(O=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(32)}).call(this,n(2))},function(t,e,n){(function(e){t.exports=e.dayjs=n(33)}).call(this,n(2))},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&&k>=u&&(b=e[O],w=n[k],b.key===w.key);)b!==w&&h(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),O--,k--;for(;O>=f&&k>=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(;O>=f&&k>=u&&u!==k&&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<=--k&&y(t,p,i),p!==w&&h(t,p,w,r,i,o),null!=w.dom&&(i=w.dom),f++,b=e[--O],w=n[k],p=e[f],d=n[u];for(;O>=f&&k>=u&&b.key===w.key;)b!==w&&h(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),k--,b=e[--O],w=n[k];if(u>k)x(t,e,f,O+1);else if(f>O)c(t,n,u,k+1,r,i,o);else{var S,C,_=i,j=k-u+1,N=new Array(j),L=0,M=0,$=2147483647,P=0;for(M=0;M=u;M--){null==S&&(S=m(e,f,O+1));var A=S[(w=n[M]).key];null!=A&&($=A<$?A:-1,N[M-u]=A,b=e[A],e[A]=null,b!==w&&h(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),P++)}if(i=_,P!==O-f+1&&x(t,e,f,O+1),0===P)c(t,n,u,k+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=k;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=k;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 P(){this._=e}function A(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 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 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,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(6);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(5);t.exports=n(46)(window,r)},function(t,e,n){"use strict";(function(e){var r=n(3),i=n(8),o=n(10),a=n(6),s=n(7),u=n(47),c=n(15),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)}})),O="function"==typeof e?e:setTimeout,k=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-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); +*/!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 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,O=!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);O=!0,t(this).css(m),d&&d.call(this)},n>0&&(this.bind(T,b),setTimeout((function(){O||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(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)}]); + */!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(18);var r=n(77);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 c93c77773..f2731e2d9 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/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,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KA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AI,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 +{"version":3,"sources":["webpack://@flarum/core/webpack/bootstrap","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/core/./src/common/Component.ts","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","Component","element","props","view","vnode","Error","oninit","setProps","attrs","oncreate","dom","onbeforeupdate","onupdate","onbeforeremove","onremove","$","selector","$element","find","component","children","componentProps","initProps","constructor","g","Function","e","window","Vnode","tag","text","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","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","singleton","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","writable","concat","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","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","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","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","shouldNotUpdate","updateLifecycle","nodeValue","updateText","removeHTML","updateHTML","updateFragment","updateAttrs","updateElement","updateComponent","moveChildToFrag","contenteditable","contentEditable","content","stateResult","attrsResult","mask","reallyRemove","isLifecycleMethod","isFormAttribute","updateEvent","setAttributeNS","updateStyle","hasPropertyKey","nsLastIndex","uppercaseRegex","capital","normalizeKey","setProperty","EventDict","handleEvent","ev","namespace","namespaceURI","prevRedraw","schedule","subscriptions","rendering","pending","sync","root","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","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,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EA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AOzoC,IAAIoI,KAAI,SAASle,IACzB,IAAVA,IACH0/C,EAAQ/zC,SAAQ,SAASi0C,GAAUA,EAAO9pC,KAAI,MAC9C6pC,EAAU7pC,KAAI,OAKhB,OAAOyoC,EAGR,SAASL,EAAMC,GACd,OAAOK,GAAQ,WAAa,OAAOL,EAAQjgC,KAAI,SAASpd,GAAK,OAAOA,SAAUq9C,GAuC/E,SAAS9lB,EAAKv3B,GACb,MAAoB,YAAbA,EAAEo+C,QAAqC,WAAbp+C,EAAEo+C,QAAoC,aAAbp+C,EAAEo+C,OA9J7Dz/C,OAAOC,eAAes+C,EAAQ,OAAQ,CACrCp+C,IAAK,WAGJ,OAFAk/C,GAAcv6C,QAAQ40C,IAAI,mDAC1B2F,GAAa,EACNd,EAAO9S,QA6JmBpsC,EAAM,QAAck/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}","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 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","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\nimport Component from '../Component';\n\nexport default () => {\n const mo = window['m'];\n\n const _m = function (comp, ...args) {\n if (!arguments[1]) arguments[1] = {};\n\n if (comp.prototype && comp.prototype instanceof Component) {\n let children = args.slice(1);\n if (children.length === 1 && Array.isArray(children[0])) {\n children = children[0];\n }\n\n if (children) {\n Object.defineProperty(arguments[1], 'children', {\n writable: true,\n });\n\n arguments[1].children = (arguments[1].children || []).concat(children);\n }\n }\n\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 c9175abaa..d8bbf490b 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=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; +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(u);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(16);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(3),o=n(9),i=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,a={},s={}.hasOwnProperty;function c(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,!c(t.attrs)&&!c(n)){var u={};for(var l in n)s.call(n,l)&&(u[l]=n[l]);n=u}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],c=e[2];if(""===s&&""!==c)n=c;else if("#"===s)o.id=c;else if("."===s)r.push(c);else if("["===e[3][0]){var u=e[6];u&&(u=u.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===e[4]?r.push(u):o[e[4]]=""===u?u:u||!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(3);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(40),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(2))},function(t,e,n){"use strict";t.exports=n(42)(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&&c.pop();for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:{};switch(u=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(c=n-e+i,o(f.duration)){case"number":u=f.duration;break;case"function":u=f.duration(c)}window.requestAnimationFrame(m)}}(),a=n(19);var s=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},c=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=u({},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 c(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 @@ -23,12 +23,12 @@ flarum.core=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -var i}},{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 o=this._findContainer(e.container,t);return this._append(r,o),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,o=[],i=[];e.forEach((function(t){switch(t){case"hover":o.push("mouseenter"),i.push("mouseleave");break;case"focus":o.push("focus"),i.push("blur");break;case"click":o.push("click"),i.push("click")}})),o.forEach((function(e){var o=function(e){!0!==r._isOpening&&(e.usedByTooltip=!0,r._scheduleShow(t,n.delay,n,e))};r._events.push({event:e,func:o}),t.addEventListener(e,o)})),i.forEach((function(e){var o=function(e){!0!==e.usedByTooltip&&r._scheduleHide(t,n.delay,n,e)};r._events.push({event:e,func:o}),t.addEventListener(e,o),"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)||o(e)}}),!0)}))}},{key:"_scheduleShow",value:function(t,e,n){var r=this;this._isOpening=!0;var o=e&&e.show||e||0;this._showTimeout=window.setTimeout((function(){return r._show(t,n)}),o)}},{key:"_scheduleHide",value:function(t,e,n,r){var o=this;this._isOpening=!1;var i=e&&e.hide||e||0;window.clearTimeout(this._showTimeout),window.setTimeout((function(){if(!1!==o._isOpen&&document.body.contains(o._tooltipNode)){if("mouseleave"===r.type)if(o._setTooltipNodeEvent(r,t,e,n))return;o._hide(t,n)}}),i)}},{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,o){var i=e.relatedreference||e.toElement||e.relatedTarget;return!!t._tooltipNode.contains(i)&&(t._tooltipNode.addEventListener(e.type,(function r(i){var a=i.relatedreference||i.toElement||i.relatedTarget;t._tooltipNode.removeEventListener(e.type,r),n.contains(a)||t._scheduleHide(n,o.delay,o,i)})),!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),i(t,{duration:$.fx.speeds[e]||e,callback:n}),this},$.fn.extend=$.extend.bind($), +var i}},{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 o=this._findContainer(e.container,t);return this._append(r,o),this._popperOptions=u({},e.popperOptions,{placement:e.placement}),this._popperOptions.modifiers=u({},this._popperOptions.modifiers,{arrow:u({},this._popperOptions.modifiers&&this._popperOptions.modifiers.arrow,{element:e.arrowSelector}),offset:u({},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,o=[],i=[];e.forEach((function(t){switch(t){case"hover":o.push("mouseenter"),i.push("mouseleave");break;case"focus":o.push("focus"),i.push("blur");break;case"click":o.push("click"),i.push("click")}})),o.forEach((function(e){var o=function(e){!0!==r._isOpening&&(e.usedByTooltip=!0,r._scheduleShow(t,n.delay,n,e))};r._events.push({event:e,func:o}),t.addEventListener(e,o)})),i.forEach((function(e){var o=function(e){!0!==e.usedByTooltip&&r._scheduleHide(t,n.delay,n,e)};r._events.push({event:e,func:o}),t.addEventListener(e,o),"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)||o(e)}}),!0)}))}},{key:"_scheduleShow",value:function(t,e,n){var r=this;this._isOpening=!0;var o=e&&e.show||e||0;this._showTimeout=window.setTimeout((function(){return r._show(t,n)}),o)}},{key:"_scheduleHide",value:function(t,e,n,r){var o=this;this._isOpening=!1;var i=e&&e.hide||e||0;window.clearTimeout(this._showTimeout),window.setTimeout((function(){if(!1!==o._isOpen&&document.body.contains(o._tooltipNode)){if("mouseleave"===r.type)if(o._setTooltipNodeEvent(r,t,e,n))return;o._hide(t,n)}}),i)}},{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,o){var i=e.relatedreference||e.toElement||e.relatedTarget;return!!t._tooltipNode.contains(i)&&(t._tooltipNode.addEventListener(e.type,(function r(i){var a=i.relatedreference||i.toElement||i.relatedTarget;t._tooltipNode.removeEventListener(e.type,r),n.contains(a)||t._scheduleHide(n,o.delay,o,i)})),!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),i(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 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;r1?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=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){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 c(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function u(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=c(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?t:l(u(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"===c(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,c=i.commonAncestorContainer;if(t!==c&&e!==c||r.contains(o))return"BODY"===(s=(a=c).nodeName)||"HTML"!==s&&h(a.firstElementChild)!==a?h(c):c;var u=m(t);return u.host?v(u.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=T(t),a=T(e),s=l(t),u=c(e),f=parseFloat(u.borderTopWidth,10),p=parseFloat(u.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(u.marginTop,10),v=parseFloat(u.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"===c(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 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(u(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"===c(e,"position"))return!0;var r=u(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}},c=Object.keys(s).map((function(t){return E({key:t},s[t],{area:(e=s[t],e.width*e.height)});var e})).sort((function(t,e){return e.area-t.area})),u=c.filter((function(t){var e=t.width,r=t.height;return e>=n.clientWidth&&r>=n.clientHeight})),l=u.length>0?u[0].key:c[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 P(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 M(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 D(t,e,n){n=n.split("-")[0];var r=P(t),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",c=i?"height":"width",u=i?"width":"height";return o[a]=e[a]+e[c]/2-r[c]/2,o[s]=n===s?e[s]-r[u]:e[M(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=D(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 B(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function R(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 c=/\s*,\s*|\s+/,u=-1!==s?[a.slice(0,s).concat([a[s].split(c)[0]]),[a[s].split(c)[1]].concat(a.slice(s+1))]:[a];return(u=u.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),c=s?"left":"top",u=s?"width":"height",l={start:N({},c,i[c]),end:N({},c,i[c]+i[u]-a[u])};t.offsets.popper=E({},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],c=void 0;return c=Y(+n)?[+n,0]:Q(n,i,a,s),"left"===s?(i.top+=c[0],i.left-=c[1]):"right"===s?(i.top+=c[0],i.left+=c[1]):"top"===s?(i.left+=c[0],i.top-=c[1]):"bottom"===s&&(i.left+=c[0],i.top+=c[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=R("transform"),o=t.instance.popper.style,i=o.top,a=o.left,s=o[r];o.top="",o.left="",o[r]="";var c=S(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);o.top=i,o.left=a,o[r]=s,e.boundaries=c;var u=e.priority,l=t.offsets.popper,f={primary:function(t){var n=l[t];return l[t]c[t]&&!e.escapeWithReference&&(r=Math.min(l[n],c[t]-("right"===t?l.width:l.height))),N({},n,r)}};return u.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";l=E({},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",c=a?"left":"top",u=a?"width":"height";return n[s]i(r[s])&&(t.offsets.popper[c]=i(r[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!K(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,u=-1!==["left","right"].indexOf(o),l=u?"height":"width",f=u?"Top":"Left",p=f.toLowerCase(),d=u?"left":"top",h=u?"bottom":"right",m=P(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=c(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=(N(n={},p,Math.round(w)),N(n,d,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(B(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=M(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,c){if(r!==s||a.length===c+1)return t;r=t.placement.split("-")[0],o=M(r);var u=t.offsets.popper,l=t.offsets.reference,f=Math.floor,p="left"===r&&f(u.right)>f(l.left)||"right"===r&&f(u.left)f(l.top)||"bottom"===r&&f(u.top)f(n.right),m=f(u.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[c+1]),x&&(i=function(t){return"end"===t?"start":"start"===t?"end":t}(i)),t.placement=r+(i?"-"+i:""),t.offsets.popper=E({},t.offsets.popper,D(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=M(e),t.offsets.popper=C(o),t}},hide:{order:800,enabled:!0,fn:function(t){if(!K(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=E({},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(E({},t.Defaults.modifiers,o.modifiers)).forEach((function(e){r.options.modifiers[e]=E({},t.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return E({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 U.call(this)}},{key:"enableEventListeners",value:function(){return z.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(2))},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,c=[{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"}],u=c.length,l=0;l0&&(f=c[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(63)},function(t,e,n){var r=n(64),o=n(91),i=n(92),a="[object Null]",s="[object Undefined]",c=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?s:a:c&&c in Object(t)?o(t):i(t)}},function(t,e,n){var r=n(68),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(67)(Object,"create");t.exports=r},function(t,e,n){var r=n(75);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(132);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(30)}).call(this,n(2))},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=[],c=s.concat,u=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"),N={tr:f.createElement("tbody"),tbody:x,thead:x,tfoot:x,td:k,th:k,"*":f.createElement("div")},E=/complete|loaded|interactive/,C=/^[\w-]*$/,T={},O=T.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 P(t){return null==t?String(t):T[O.call(t)]||"object"}function M(t){return"function"==P(t)}function D(t){return null!=t&&t==t.window}function L(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function $(t){return"object"==P(t)}function I(t){return $(t)&&!D(t)&&Object.getPrototypeOf(t)==Object.prototype}function B(t){var e=!!t&&"length"in t&&t.length,n=r.type(t);return"function"!=n&&!D(t)&&("array"==n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function R(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 U(t){return t in d?d[t]:d[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function F(t,e){return"number"!=typeof e||h[R(t)]?e:e+"px"}function H(t){return"children"in t?l.call(t.children):r.map(t.childNodes,(function(t){if(1==t.nodeType)return t}))}function z(t,e){var n,r=t?t.length:0;for(n=0;n")),n===e&&(n=m.test(t)&&RegExp.$1),n in N||(n="*"),(s=N[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 z(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(M(t))return r(f).ready(t);if(_.isZ(t))return t;if(j(t))i=t,o=u.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=P,r.isFunction=M,r.isWindow=D,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(B(t))for(o=0;o0?r.fn.concat.apply([],a):a},r.each=function(t,e){var n,r;if(B(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 M(t)?this.not(this.not(t)):r(u.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(M(t)&&t.call!==e)this.each((function(e){t.call(this,e)||n.push(this)}));else{var o="string"==typeof t?this.filter(t):B(t)&&M(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 H(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 u.call(H(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=M(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=M(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)V(this,n,t[n]);else V(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){V(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 c="";if("string"==P(t))e||0===e?c=R(t)+":"+F(t,e):this.each((function(){this.style.removeProperty(R(t))}));else for(n in t)t[n]||0===t[n]?c+=R(n)+":"+F(n,t[n])+";":this.each((function(){this.style.removeProperty(R(n))}));return this.each((function(){this.style.cssText+=";"+c}))},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(K(t))}),U(t))},addClass:function(t){return t?this.each((function(e){if("className"in this){o=[];var n=K(this);W(this,t,e,n).split(/\s+/g).forEach((function(t){r(this).hasClass(t)||o.push(t)}),this),o.length&&K(this,n+(n?" ":"")+o.join(" "))}})):this},removeClass:function(t){return this.each((function(n){if("className"in this){if(t===e)return K(this,"");o=K(this),W(this,t,n,o).split(/\s+/g).forEach((function(t){o=o.replace(U(t)," ")})),K(this,o.trim())}}))},toggleClass:function(t,n){return t?this.each((function(o){var i=r(this);W(this,t,o,K(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?D(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=P(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)})),c=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 u=r.contains(f.documentElement,a);s.forEach((function(e){if(c)e=e.cloneNode(!0);else if(!a)return r(e).remove();a.insertBefore(e,n),u&&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=z.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={},c={},u="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&&!u&&t.e in l||!!e}function v(t){return f[t]||u&&l[t]||t}function g(t,r,o,i,a,c,u){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=c;var l=c||o;s.proxy=function(e){if(!(e=N(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,u))}))}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))}))}))}c.click=c.mousedown=c.mouseup=c.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 N(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 E(t){var e,r={originalEvent:t};for(e in t)x.test(e)||t[e]===n||(r[e]=t[e]);return N(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,c,u){var l,f,p=this;return t&&!a(t)?(e.each(t,(function(t,e){p.on(t,r,s,e,u)})),p):(a(r)||i(c)||!1===c||(c=s,s=r,r=n),c!==n&&!1!==s||(c=s,s=n),!1===c&&(c=w),p.each((function(n,i){u&&(l=function(t){return y(i,t.type,c),c.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(E(t),{currentTarget:a,liveFired:i}),(l||c).apply(a,[n].concat(o.call(arguments,1)))}),g(i,t,c,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):N(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=E(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(c[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),N(n)}}(e),function(e){var n,r,o=+new Date,i=t.document,a=/)<[^<]*)*<\/script>/gi,s=/^(?:text|application)\/javascript/i,c=/^(?:text|application)\/xml/i,u="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,c=n.jsonpCallback,u=(e.isFunction(c)?c():c)||"Zepto"+o++,l=i.createElement("script"),f=t[u],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[u]=f,a&&e.isFunction(f)&&f(a[0]),f=a=void 0})),!1===h(d,n)?(p("abort"),d):(t[u]=function(){a=arguments},l.src=n.url.replace(/\?(.+)=\?/,"?$1="+u),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:u,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,N=/\?.+=\?/.test(w.url);if(N&&(k="jsonp"),!1!==w.cache&&(o&&!0===o.cache||"script"!=k&&"jsonp"!=k)||(w.url=b(w.url,"_="+Date.now())),"jsonp"==k)return N||(w.url=b(w.url,w.jsonp?w.jsonp+"=?":!1===w.jsonp?"":"callback=?")),e.ajaxJSONP(w,x);var E,C=w.accepts[k],T={},O=function(t,e){T[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",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())&&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(E);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==u?"json":s.test(t)?"script":c.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 T)A.apply(S,T[r]);return w.timeout>0&&(E=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/),c=w(t,n,r),u=c.success;return s.length>1&&(c.url=s[0],o=s[1]),c.success=function(t){i.html(o?e("
").html(t.replace(a,"")).find(o):t),u&&u.apply(i,arguments)},e.ajax(c),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),c=e.isPlainObject(r);e.each(r,(function(r,u){a=e.type(u),i&&(r=o?i:i+"["+(c||"object"==a||"array"==a?r:"")+"]"),!i&&s?n.add(u.name,u.value):"array"==a||!o&&"object"==a?t(n,u,o,r):n.add(r,u)}))}(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(32)}).call(this,n(2))},function(t,e,n){(function(e){t.exports=e.dayjs=n(33)}).call(this,n(2))},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",c="year",u=/^(\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(u){return{M:a,y:c,w:i,d:o,h:r,m:n,s:e,ms:t,Q:s}[u]||String(u||"").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(u);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,c=n.createDocumentFragment();s=a.firstChild;)e.instance.push(s),c.appendChild(s);b(t,c,o)}function d(t,e,n,r,o,i){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)u(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,c=0,f=0;if(!a)for(;f=f&&C>=c&&(b=e[E],w=n[C],b.key===w.key);)b!==w&&h(t,b,w,r,o,i),null!=w.dom&&(o=w.dom),E--,C--;for(;E>=f&&C>=c&&(p=e[f],d=n[c],p.key===d.key);)f++,c++,p!==d&&h(t,p,d,r,g(e,f,o),i);for(;E>=f&&C>=c&&c!==C&&p.key===w.key&&b.key===d.key;)y(t,b,N=g(e,f,o)),b!==d&&h(t,b,d,r,N,i),++c<=--C&&y(t,p,o),p!==w&&h(t,p,w,r,o,i),null!=w.dom&&(o=w.dom),f++,b=e[--E],w=n[C],p=e[f],d=n[c];for(;E>=f&&C>=c&&b.key===w.key;)b!==w&&h(t,b,w,r,o,i),null!=w.dom&&(o=w.dom),C--,b=e[--E],w=n[C];if(c>C)x(t,e,f,E+1);else if(f>E)u(t,n,c,C+1,r,o,i);else{var T,O,_=o,S=C-c+1,A=new Array(S),j=0,P=0,M=2147483647,D=0;for(P=0;P=c;P--){null==T&&(T=m(e,f,E+1));var L=T[(w=n[P]).key];null!=L&&(M=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,P=C;P>=c;P--)d=n[P],-1===A[P-c]?l(t,d,r,i,o):O[j]===P-c?j--:y(t,d,o),null!=d.dom&&(o=n[P].dom);else for(P=C;P>=c;P--)d=n[P],-1===A[P-c]&&l(t,d,r,i,o),null!=d.dom&&(o=n[P].dom)}}else{var $=e.length$&&x(t,e,c,e.length),n.length>$&&u(t,n,c,n.length,r,o,i)}}}function h(t,e,n,o,a,c){var u=e.tag;if(u===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 u)switch(null!=n.attrs&&I(n.attrs,n,o),u){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?(N(t,e),p(t,n,r,o)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,c,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 c=0;c-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 P(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(A,j)}function M(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(P(r),String(o))}else{for(var r in n){var o;null!=(o=n[r])&&(o=String(o))!==String(e[r])&&t.style.setProperty(P(r),o)}for(var r in e)null!=e[r]&&null==n[r]&&t.style.removeProperty(P(r))}}function D(){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 D,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 D.prototype=Object.create(null),D.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=c(),s=t.namespaceURI;null==t.vnodes&&(t.textContent=""),n=r.normalizeChildren(Array.isArray(n)?n:[n]);var u=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=u}t.vnodes=n,null!=a&&c()!==a&&"function"==typeof a.focus&&a.focus();for(var l=0;l=0&&(o.splice(i,2),t(e,[],c)),null!=n&&(o.push(e,n),t(e,r(n),c))},redraw:c}}},function(t,e,n){"use strict";var r=n(6);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 c=new Error(i);c.code=t.target.status,c.response=s,o(c)}}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==c?f.send():"function"==typeof n.serialize?f.send(n.serialize(c)):c instanceof t.FormData?f.send(c):f.send(JSON.stringify(c))})),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(5);t.exports=n(46)(window,r)},function(t,e,n){"use strict";(function(e){var r=n(3),o=n(8),i=n(10),a=n(6),s=n(7),c=n(47),u=n(15),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,N=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:c(t)}})),E="function"==typeof e?e:setTimeout,C=i.resolve(),T=!1;if(f=null,null!=a){var O=s(a);if(!N.some((function(t){return t.check(O)})))throw new ReferenceError("Default route doesn't match any known routes")}function _(){T=!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})}u(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)c[111+p]="f"+p;for(p=0;p<=9;++p)c[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)&&(c[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 c[t.which]?c[t.which]:u[t.which]?u[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={},c)t>95&&t<112||c.hasOwnProperty(t)&&(s[c[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]||[],u(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=u(t,e,n),i={},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,o=a.exec(t);if(o&&o[2]in i&&(n=i[o[2]],r=o[3],t=o[1],r)){var s=Number(r);r=isNaN(s)?r.replace(/^["']|["']$/g,""):s}return e(t,n,r)}e.qsa=function(r,o){return c(o,(function(i,a,c){try{var l;!i&&a?i="*":s.test(i)&&(l=t(r).addClass(u),i="."+u+" "+i);var f=n(r,i)}catch(t){throw console.error("error performing selector: %o",o),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,o){return(!e||r(t,e))&&(!n||n.call(t,null,o)===t)}))}}(Zepto)},function(t,e){!function(t){var e={},n=t.fn.data,r=t.camelCase,o=t.expando="Zepto"+ +new Date,i=[];function a(n,a,s){var u=n[o]||(n[o]=++t.uuid),c=e[u]||(e[u]=function(e){var n={};return t.each(e.attributes||i,(function(e,o){0==o.name.indexOf("data-")&&(n[r(o.name.replace("data-",""))]=t.zepto.deserializeValue(o.value))})),n}(n));return void 0!==a&&(c[r(a)]=s),c}t.fn.data=function(i,s){return void 0===s?t.isPlainObject(i)?this.each((function(e,n){t.each(i,(function(t,e){a(n,t,e)}))})):0 in this?function(i,s){var u=i[o],c=u&&e[u];if(void 0===s)return c||a(i);if(c){if(s in c)return c[s];var l=r(s);if(l in c)return c[l]}return n.call(t(i),s)}(this[0],i):void 0:this.each((function(){a(this,i,s)}))},t.data=function(e,n,r){return t(e).data(n,r)},t.hasData=function(n){var r=n[o],i=r&&e[r];return!!i&&!t.isEmptyObject(i)},t.fn.removeData=function(n){return"string"==typeof n&&(n=n.split(/\s+/)),this.each((function(){var i=this[o],a=i&&e[i];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,o,i,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[o=p+"transition-property"]=m[i=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,o,i){return t.isFunction(n)&&(o=n,r=void 0,n=void 0),t.isFunction(r)&&(o=r,r=void 0),t.isPlainObject(n)&&(r=n.easing,o=n.complete,i=n.delay,n=n.duration),n&&(n=("number"==typeof n?n:t.fx.speeds[n]||t.fx.speeds._default)/1e3),i&&(i=parseFloat(i)/1e3),this.anim(e,n,r,o,i)},t.fn.anim=function(e,n,p,d,v){var g,y,b,w={},x="",k=this,E=t.fx.transitionEnd,N=!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",E=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[o]=y.join(", "),w[i]=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(E,b)}else t(this).unbind(E,b);N=!0,t(this).css(m),d&&d.call(this)},n>0&&(this.bind(E,b),setTimeout((function(){N||b.call(k)}),1e3*(n+v)+25)),this.size()&&this.get(0).clientLeft,this.css(w),n<=0&&setTimeout((function(){k.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,o=t.fn.toggle;function i(n,r,o,i,a){"function"!=typeof r||a||(a=r,r=e);var s={opacity:o};return i&&(s.scale=i,n.css(t.fx.cssPrefix+"transform-origin","0 0")),n.animate(s,r,null,a)}function a(e,n,o,a){return i(e,n,0,o,(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),i(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?o.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 i(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 o(){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*>/,c="Zepto"+ +new Date;function u(t,e){t=t.replace(/=#\]/g,'="#"]');var n,r,o=a.exec(t);if(o&&o[2]in i&&(n=i[o[2]],r=o[3],t=o[1],r)){var s=Number(r);r=isNaN(s)?r.replace(/^["']|["']$/g,""):s}return e(t,n,r)}e.qsa=function(r,o){return u(o,(function(i,a,u){try{var l;!i&&a?i="*":s.test(i)&&(l=t(r).addClass(c),i="."+c+" "+i);var f=n(r,i)}catch(t){throw console.error("error performing selector: %o",o),t}finally{l&&l.removeClass(c)}return a?e.uniq(t.map(f,(function(t,e){return a.call(t,e,f,u)}))):f}))},e.matches=function(t,e){return u(e,(function(e,n,o){return(!e||r(t,e))&&(!n||n.call(t,null,o)===t)}))}}(Zepto)},function(t,e){!function(t){var e={},n=t.fn.data,r=t.camelCase,o=t.expando="Zepto"+ +new Date,i=[];function a(n,a,s){var c=n[o]||(n[o]=++t.uuid),u=e[c]||(e[c]=function(e){var n={};return t.each(e.attributes||i,(function(e,o){0==o.name.indexOf("data-")&&(n[r(o.name.replace("data-",""))]=t.zepto.deserializeValue(o.value))})),n}(n));return void 0!==a&&(u[r(a)]=s),u}t.fn.data=function(i,s){return void 0===s?t.isPlainObject(i)?this.each((function(e,n){t.each(i,(function(t,e){a(n,t,e)}))})):0 in this?function(i,s){var c=i[o],u=c&&e[c];if(void 0===s)return u||a(i);if(u){if(s in u)return u[s];var l=r(s);if(l in u)return u[l]}return n.call(t(i),s)}(this[0],i):void 0:this.each((function(){a(this,i,s)}))},t.data=function(e,n,r){return t(e).data(n,r)},t.hasData=function(n){var r=n[o],i=r&&e[r];return!!i&&!t.isEmptyObject(i)},t.fn.removeData=function(n){return"string"==typeof n&&(n=n.split(/\s+/)),this.each((function(){var i=this[o],a=i&&e[i];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,o,i,a,s,c,u,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[o=p+"transition-property"]=m[i=p+"transition-duration"]=m[s=p+"transition-delay"]=m[a=p+"transition-timing-function"]=m[c=p+"animation-name"]=m[u=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,o,i){return t.isFunction(n)&&(o=n,r=void 0,n=void 0),t.isFunction(r)&&(o=r,r=void 0),t.isPlainObject(n)&&(r=n.easing,o=n.complete,i=n.delay,n=n.duration),n&&(n=("number"==typeof n?n:t.fx.speeds[n]||t.fx.speeds._default)/1e3),i&&(i=parseFloat(i)/1e3),this.anim(e,n,r,o,i)},t.fn.anim=function(e,n,p,d,v){var g,y,b,w={},x="",k=this,N=t.fx.transitionEnd,E=!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[c]=e,w[u]=n+"s",w[f]=v+"s",w[l]=p||"linear",N=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[o]=y.join(", "),w[i]=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(N,b)}else t(this).unbind(N,b);E=!0,t(this).css(m),d&&d.call(this)},n>0&&(this.bind(N,b),setTimeout((function(){E||b.call(k)}),1e3*(n+v)+25)),this.size()&&this.get(0).clientLeft,this.css(w),n<=0&&setTimeout((function(){k.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,o=t.fn.toggle;function i(n,r,o,i,a){"function"!=typeof r||a||(a=r,r=e);var s={opacity:o};return i&&(s.scale=i,n.css(t.fx.cssPrefix+"transform-origin","0 0")),n.animate(s,r,null,a)}function a(e,n,o,a){return i(e,n,0,o,(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),i(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?o.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 i(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(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")},o=t.document,i=function i(a,s){var u=this;if("string"==typeof a&&(a=o.querySelector(a)),!a)return!1;s.queries&&r("queries","responsive","option"),s.queryFlow&&r("queryFlow","mobileFirst","option");var c={},l=i.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[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;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(10&&c--,40==e.which&&c-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(24).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(23),o=n(25),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(2))},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(23),o=n(65),i="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",c="[object Proxy]";t.exports=function(t){if(!o(t))return!1;var e=r(t);return e==a||e==s||e==i||e==c}},function(t,e,n){var r=n(17),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(17);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(27);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(24),"Map");t.exports=r},function(t,e,n){var r=n(28);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(28);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(28);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(28);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(17),a=n(66),s=1/0,c=r?r.prototype:void 0,u=c?c.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 u?u.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}(),_=n(1);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}(_.a),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(),M.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}(N);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(){var t;(null===(t=this.component)||void 0===t?void 0:t.onready)&&this.component.onready()},e}(_.a),ct=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:E,users:D,discussions:j,posts:I,groups:B,notifications:R}),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 U(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 U(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}(),ut=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}(_.a),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}(_.a),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}(_.a),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 Nt),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(),c=r.offset().top,u=c+r.outerHeight(),l=i.offset().top,f=l+i.outerHeight();lu&&(a=s-u+f+parseInt(r.css("padding-bottom"),10)),void 0!==a&&r.animate({scrollTop:a},100)}},e}(_.a),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 O;if(t.add("search",Et.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}(_.a),Tt=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}(_.a),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 Mt&&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}(_.a),Pt=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}(_.a),Mt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o=this.loadLimit,m.redraw(),t},e}(Mt),Ft=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';\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","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 = 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}","/**\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 \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 {name};\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_]+}|)', '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(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","/**\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 = $('
')\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 {\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 {\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 {\r\n private items: { [key: string]: Item } = {};\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[] = [];\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 {\r\n element: HTMLElement;\r\n\r\n props = {};\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 ;\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 \r\n {iconName ? icon(iconName, {className: 'Badge-icon'}) : m.trust(' ')}\r\n \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', );\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 {\n const preferences = this.preferences();\n\n Object.assign(preferences, newPreferences);\n\n return > 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>|
)/g, '$1  ')\r\n .replace(/]*>/ig, ' ');\r\n\r\n const dom = $('
').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
{m.trust(' ')}
;\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 extends Component {\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 ;\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 ? {children} : '',\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
  • ;\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
  • 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 :
  • \r\n {item}\r\n
  • ;\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;', `
    `);\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';\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 {\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 \r\n );\r\n }\r\n\r\n return (\r\n
    \r\n \r\n {children}\r\n \r\n
      \r\n {listItems(controls.concat(dismissControl))}\r\n
    \r\n
    \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 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\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();\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.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'), );\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';\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 +{"version":3,"sources":["webpack://@flarum/core/webpack/bootstrap","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/core/./src/common/Component.ts","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/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/common/components/Placeholder.tsx","webpack://@flarum/core/./src/forum/utils/PostControls.tsx","webpack://@flarum/core/./src/common/utils/SubtreeRetainer.ts","webpack://@flarum/core/./src/forum/components/Post.tsx","webpack://@flarum/core/./src/forum/components/PostUser.tsx","webpack://@flarum/core/./src/common/helpers/userOnline.tsx","webpack://@flarum/core/./src/forum/components/CommentPost.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","Component","element","props","view","vnode","Error","oninit","setProps","attrs","oncreate","dom","onbeforeupdate","onupdate","onbeforeremove","onremove","$","selector","$element","find","component","children","componentProps","initProps","constructor","g","Function","e","window","Vnode","tag","text","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","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","singleton","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","writable","concat","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","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","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","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","shouldNotUpdate","updateLifecycle","nodeValue","updateText","removeHTML","updateHTML","updateFragment","updateAttrs","updateElement","updateComponent","moveChildToFrag","contenteditable","contentEditable","content","stateResult","attrsResult","mask","reallyRemove","isLifecycleMethod","isFormAttribute","updateEvent","setAttributeNS","updateStyle","hasPropertyKey","nsLastIndex","uppercaseRegex","capital","normalizeKey","setProperty","EventDict","handleEvent","ev","namespace","namespaceURI","prevRedraw","schedule","subscriptions","rendering","pending","sync","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","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","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","Placeholder","restoreAction","hideAction","EditPostComposer","composer","discussionList","removeDiscussion","viewingDiscussion","SubtreeRetainer","controlsOpen","subtree","PostControls","actionItems","footerItems","$actions","$controls","PostUser","cardVisible","card","userOnline","showCard","hideCard","CommentPost","revealContent","postUser","isEditing","headerItems","configPreview","isInitialized","preview","updatePreview","s9e","TextFormatter","updateInterval","onunload","toggleContent","PostEdited","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,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE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MA,GAAiB,IAATA,EAAaA,OAAO3kE,KAOtCjC,KAAKsS,MAAM0lB,KAAO,SAACA,GACjB,OAAO,EAAK1lB,MAAM89C,WAAWp4B,EAAKo4B,aAAcp4B,EAAKisB,WAMvDjkD,KAAKsS,MAAMg3B,KAAO,SAACA,GACjB,OAAO,EAAKh3B,MAAM,OAAQ,CACxBslB,SAAU0R,EAAK1R,e,GAxFUkgC,ICXpB,IACX5mD,OAAQA,GCGG,GAAA/S,OAAA,KAAc0oE,GAAQ,CACjC,uBAAwB5F,GACxB7V,MAAOA,KCNLlD,GAAM,IAAIkD,GAGhBxpD,OAAOsmD,IAAMA,GAEbA,GAAI6P,IAAIpQ,UAAU,eAAe,WAE7B,IAAMmf,EAAaC,OAAOD,WAE1B3oE,OAAOiM,KAAK08D,GAAYz8D,SAAQ,SAAArM,GACV8oE,EAAW9oE,SAWrC6oE,GAAO3e,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 = 144);\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}","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<T extends ComponentProps = any> {\n element: HTMLElement;\n\n props = <T> {};\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","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\nimport Component from '../Component';\n\nexport default () => {\n const mo = window['m'];\n\n const _m = function (comp, ...args) {\n if (!arguments[1]) arguments[1] = {};\n\n if (comp.prototype && comp.prototype instanceof Component) {\n let children = args.slice(1);\n if (children.length === 1 && Array.isArray(children[0])) {\n children = children[0];\n }\n\n if (children) {\n Object.defineProperty(arguments[1], 'children', {\n writable: true,\n });\n\n arguments[1].children = (arguments[1].children || []).concat(children);\n }\n }\n\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> {\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<T = any> {\n private items: { [key: string]: Item<T> } = {};\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<T>[] = [];\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 // @ts-ignore\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","/**\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';\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<T extends ButtonProps = ButtonProps> extends Component<T> {\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 <button {...attrs}>{this.getButtonContent(iconName, attrs.loading, children)}</button>;\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 ? <span className=\"Button-label\">{children}</span> : '',\n loading ? LoadingIndicator.component({size: 'tiny', className: 'LoadingIndicator--inline'}) : ''\n ];\n }\n}\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';\n\nexport function isSeparator(item) {\n return item?.tag === 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 <li> 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 : <li className={classNames([\n (item.itemName ? 'item-' + item.itemName : ''),\n className,\n (active ? 'active' : '')\n ])}\n key={item.itemName}>\n {item}\n </li>;\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;', `<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?.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';\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';\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 Component, {ComponentProps} from '../Component';\n\nexport interface PlaceholderProps extends ComponentProps {\n text: string\n}\n\n/**\n * The `Placeholder` component displays a muted text with some call to action,\n * usually used as an empty state.\n */\nexport default class Placeholder extends Component<PlaceholderProps> {\n view() {\n return (\n <div className=\"Placeholder\">\n <p>{this.props.text}</p>\n </div>\n );\n }\n}\n","import {Vnode} from \"mithril\";\n\n// import EditPostComposer from '../components/EditPostComposer';\nimport Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\nimport ItemList from '../../common/utils/ItemList';\nimport Post from \"../../common/models/Post\";\nimport PostComponent from \"../../forum/components/Post\";\n\n/**\n * The `PostControls` utility constructs a list of buttons for a post which\n * perform actions on it.\n */\nexport default {\n /**\n * Get a list of controls for a post.\n *\n * @param {Post} post\n * @param {*} context The parent component under which the controls menu will\n * be displayed.\n * @public\n */\n controls(post: Post, context) {\n const items = new ItemList();\n\n ['user', 'moderation', 'destructive'].forEach(section => {\n const controls = this[section + 'Controls'](post, context).toArray();\n\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 post pertaining to the current user (e.g. report).\n *\n * @param {Post} post\n * @param {*} context The parent component under which the controls menu will\n * be displayed.\n * @protected\n */\n userControls(post: Post, context) {\n return new ItemList();\n },\n\n /**\n * Get controls for a post pertaining to moderation (e.g. edit).\n *\n * @param {Post} post\n * @param {*} context The parent component under which the controls menu will\n * be displayed.\n * @protected\n */\n moderationControls(post: Post, context) {\n const items = new ItemList();\n\n if (post.contentType() === 'comment' && post.canEdit()) {\n if (!post.isHidden()) {\n items.add('edit', Button.component({\n icon: 'fas fa-pencil-alt',\n onclick: this.editAction.bind(post)\n }, app.translator.trans('core.forum.post_controls.edit_button')));\n }\n }\n\n return items;\n },\n\n /**\n * Get controls for a post that are destructive (e.g. delete).\n *\n * @param {Post} post\n * @param {*} context The parent component under which the controls menu will\n * be displayed.\n * @protected\n */\n destructiveControls(post: Post, context) {\n const items = new ItemList();\n\n if (post.contentType() === 'comment' && !post.isHidden()) {\n if (post.canHide()) {\n items.add('hide', Button.component({\n icon: 'far fa-trash-alt',\n children: app.translator.trans('core.forum.post_controls.delete_button'),\n onclick: this.hideAction.bind(post)\n }));\n }\n } else {\n if (post.contentType() === 'comment' && post.canHide()) {\n items.add('restore', Button.component({\n icon: 'fas fa-reply',\n children: app.translator.trans('core.forum.post_controls.restore_button'),\n onclick: this.restoreAction.bind(post)\n }));\n }\n if (post.canDelete()) {\n items.add('delete', Button.component({\n icon: 'fas fa-times',\n children: app.translator.trans('core.forum.post_controls.delete_forever_button'),\n onclick: this.deleteAction.bind(post, context)\n }));\n }\n }\n\n return items;\n },\n\n /**\n * Open the composer to edit a post.\n */\n editAction(this: Post) {\n return new Promise<EditPostComposer>(resolve => {\n const component = new EditPostComposer({ post: this });\n\n app.composer.load(component);\n app.composer.show();\n\n resolve(component);\n });\n },\n\n /**\n * Hide a post.\n */\n hideAction(this: Post) {\n this.pushAttributes({ hiddenAt: new Date(), hiddenUser: app.session.user });\n\n return this.save({ isHidden: true }).then(() => m.redraw());\n },\n\n /**\n * Restore a post.\n */\n restoreAction(this: Post) {\n this.pushAttributes({ hiddenAt: null, hiddenUser: null });\n\n return this.save({ isHidden: false }).then(() => m.redraw());\n },\n\n /**\n * Delete a post.\n */\n deleteAction(this: Post, context: PostComponent) {\n if (context) context.loading = true;\n\n return this.delete()\n .then(() => {\n const discussion = this.discussion();\n\n discussion.removePost(this.id());\n\n // If this was the last post in the discussion, then we will assume that\n // the whole discussion was deleted too.\n if (!discussion.postIds().length) {\n // If there is a discussion list in the cache, remove this discussion.\n if (app.cache.discussionList) {\n app.cache.discussionList.removeDiscussion(discussion);\n }\n\n if (app.viewingDiscussion(discussion)) {\n app.history.back();\n }\n }\n })\n .catch(() => {})\n .then(() => {\n if (context) context.loading = false;\n m.redraw();\n });\n }\n};\n","export default class SubtreeRetainer {\n callbacks: Function[];\n data = {};\n\n constructor(...callbacks: Function[]) {\n this.callbacks = callbacks;\n }\n\n check(...callbacks: Function[]) {\n this.callbacks.concat(...callbacks);\n }\n\n /**\n * Return whether the component should redraw.\n */\n update(): boolean {\n let update = false;\n\n this.callbacks.forEach((callback, i) => {\n const result = callback();\n\n if (result !== this.data[i]) {\n this.data[i] = result;\n update = true;\n }\n });\n\n return update;\n }\n}\n","import Component, {ComponentProps} from '../../common/Component';\nimport Dropdown from '../../common/components/Dropdown';\nimport PostControls from '../utils/PostControls';\nimport listItems from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport SubtreeRetainer from \"../../common/utils/SubtreeRetainer\";\nimport PostModel from '../../common/models/Post';\n\nexport interface PostProps extends ComponentProps {\n post: PostModel\n}\n\n/**\n * The `Post` component displays a single post. The basic post template just\n * includes a controls dropdown; subclasses must implement `content` and `attrs`\n * methods.\n *\n * @abstract\n */\nexport default class Post<T extends PostProps = PostProps> extends Component<PostProps> {\n loading = false;\n controlsOpen = false;\n\n subtree: SubtreeRetainer;\n\n oninit(vnode) {\n super.oninit(vnode);\n\n /**\n * Set up a subtree retainer so that the post will not be redrawn\n * unless new data comes in.\n */\n this.subtree = new SubtreeRetainer(\n () => this.props.post.freshness,\n () => {\n const user = this.props.post.user();\n return user?.freshness;\n },\n () => this.controlsOpen\n );\n }\n\n view() {\n const controls = PostControls.controls(this.props.post, this).toArray();\n const attrs = this.attrs();\n\n attrs.className = classNames('Post', this.loading && 'Post--loading', attrs.className);\n\n return (\n <article {...attrs}>\n <div>\n {this.content()}\n <aside className=\"Post-actions\">\n <ul>\n {listItems(this.actionItems().toArray())}\n {controls.length ? <li>\n <Dropdown\n className=\"Post-controls\"\n buttonClassName=\"Button Button--icon Button--flat\"\n menuClassName=\"Dropdown-menu--right\"\n icon=\"fas fa-ellipsis-h\"\n onshow={() => this.$('.Post-actions').addClass('open')}\n onhide={() => this.$('.Post-actions').removeClass('open')}>\n {controls}\n </Dropdown>\n </li> : ''}\n </ul>\n </aside>\n <footer className=\"Post-footer\"><ul>{listItems(this.footerItems().toArray())}</ul></footer>\n </div>\n );\n </article>\n );\n }\n\n onbeforeupdate(vnode) {\n super.onbeforeupdate(vnode);\n\n return this.subtree.update();\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n const $actions = this.$('.Post-actions');\n const $controls = this.$('.Post-controls');\n\n $actions.toggleClass('open', $controls.hasClass('open'));\n }\n\n /**\n * Get attributes for the post element.\n */\n attrs(): ComponentProps {\n return {};\n }\n\n /**\n * Get the post's content.\n */\n content() {\n return [];\n }\n\n /**\n * Build an item list for the post's actions.\n */\n actionItems() {\n return new ItemList();\n }\n\n /**\n * Build an item list for the post's footer.\n */\n footerItems() {\n return new ItemList();\n }\n}\n","import Component from '../../common/Component';\nimport UserCard from './UserCard';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport userOnline from '../../common/helpers/userOnline';\nimport listItems from '../../common/helpers/listItems';\nimport {PostProps} from \"./Post\";\n\n/**\n * The `PostUser` component shows the avatar and username of a post's author.\n */\nexport default class PostUser extends Component<PostProps> {\n /**\n * Whether or not the user hover card is visible.\n */\n cardVisible = false;\n\n view() {\n const post = this.props.post;\n const user = post.user();\n\n if (!user) {\n return (\n <div className=\"PostUser\">\n <h3>{avatar(user, {className: 'PostUser-avatar'})} {username(user)}</h3>\n </div>\n );\n }\n\n let card = '';\n\n if (!post.isHidden() && this.cardVisible) {\n card = UserCard.component({\n user,\n className: 'UserCard--popover',\n controlsButtonClassName: 'Button Button--icon Button--flat'\n });\n }\n\n return (\n <div className=\"PostUser\">\n <h3>\n <m.route.Link href={app.route.user(user)}>\n {avatar(user, {className: 'PostUser-avatar'})}\n {userOnline(user)}\n {username(user)}\n </m.route.Link>\n </h3>\n <ul className=\"PostUser-badges badges\">\n {listItems(user.badges().toArray())}\n </ul>\n {card}\n </div>\n );\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n let timeout;\n\n this.$()\n .on('mouseover', 'h3 a, .UserCard', () => {\n clearTimeout(timeout);\n timeout = setTimeout(this.showCard.bind(this), 500);\n })\n .on('mouseout', 'h3 a, .UserCard', () => {\n clearTimeout(timeout);\n timeout = setTimeout(this.hideCard.bind(this), 250);\n });\n }\n\n /**\n * Show the user card.\n */\n showCard() {\n this.cardVisible = true;\n\n m.redraw();\n\n setTimeout(() => this.$('.UserCard').addClass('in'));\n }\n\n /**\n * Hide the user card.\n */\n hideCard() {\n this.$('.UserCard').removeClass('in')\n .one('transitionend webkitTransitionEnd oTransitionEnd', () => {\n this.cardVisible = false;\n m.redraw();\n });\n }\n}\n","import icon from './icon';\nimport User from '../models/User';\n\n/**\n * The `useronline` helper displays a green circle if the user is online\n *\n * @param {User} user\n * @return {Object}\n */\nexport default function userOnline(user: User) {\n if (user.lastSeenAt() && user.isOnline()) {\n return <span className=\"UserOnline\">{icon('fas fa-circle')}</span>;\n }\n}\n","import Post from './Post';\nimport PostUser from './PostUser';\n// import PostMeta from './PostMeta';\n// import PostEdited from './PostEdited';\n// import EditPostComposer from './EditPostComposer';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\nimport Button from '../../common/components/Button';\n\n/**\n * The `CommentPost` component displays a standard `comment`-typed post. This\n * includes a number of item lists (controls, header, and footer) surrounding\n * the post's HTML content.\n */\nexport default class CommentPost extends Post {\n /**\n * If the post has been hidden, then this flag determines whether or not its\n * content has been expanded.\n */\n revealContent: boolean = false;\n\n postUser: PostUser;\n\n oninit(vnode) {\n super.oninit(vnode);\n\n // Create an instance of the component that displays the post's author so\n // that we can force the post to rerender when the user card is shown.\n this.postUser = PostUser.component({post: this.props.post});\n\n this.subtree.check(\n () => this.postUser.cardVisible,\n () => this.isEditing()\n );\n }\n\n content() {\n // Note: we avoid using JSX for the <ul> below because it results in some\n // weirdness in Mithril.js 0.1.x (see flarum/core#975). This workaround can\n // be reverted when we upgrade to Mithril 1.0.\n return super.content().concat([\n <header className=\"Post-header\">{m('ul', listItems(this.headerItems().toArray()))}</header>,\n <div className=\"Post-body\">\n {this.isEditing()\n ? <div className=\"Post-preview\" config={this.configPreview.bind(this)}/>\n : m.trust(this.props.post.contentHtml())}\n </div>\n ]);\n }\n\n onupdate(vnode) {\n super.onupdate(vnode);\n\n const contentHtml = this.isEditing() ? '' : this.props.post.contentHtml();\n\n // TODO: idk what this is supposed to be\n\n // If the post content has changed since the last render, we'll run through\n // all of the <script> tags in the content and evaluate them. This is\n // necessary because TextFormatter outputs them for e.g. syntax highlighting.\n if (vnode.contentHtml !== contentHtml) {\n this.$('.Post-body script').each(function() {\n eval.call(window, $(this).text());\n });\n }\n\n vnode.contentHtml = contentHtml;\n }\n\n isEditing() {\n return false; // TODO\n // return app.composer?.component instanceof EditPostComposer &&\n // app.composer.component.props.post === this.props.post;\n }\n\n attrs() {\n const post = this.props.post;\n const attrs = super.attrs();\n\n attrs.className = (attrs.className || '') + ' ' + classNames({\n 'CommentPost': true,\n 'Post--hidden': post.isHidden(),\n 'Post--edited': post.isEdited(),\n 'revealContent': this.revealContent,\n 'editing': this.isEditing()\n });\n\n return attrs;\n }\n\n // TODO change so it works\n configPreview(element, isInitialized, context) {\n if (isInitialized) return;\n\n // Every 50ms, if the composer content has changed, then update the post's\n // body with a preview.\n let preview;\n const updatePreview = () => {\n const content = app.composer.component.content();\n\n if (preview === content) return;\n\n preview = content;\n\n s9e.TextFormatter.preview(preview || '', element);\n };\n updatePreview();\n\n const updateInterval = setInterval(updatePreview, 50);\n context.onunload = () => clearInterval(updateInterval);\n }\n\n /**\n * Toggle the visibility of a hidden post's content.\n */\n toggleContent() {\n this.revealContent = !this.revealContent;\n }\n\n /**\n * Build an item list for the post's header.\n *\n * @return {ItemList}\n */\n headerItems() {\n const items = new ItemList();\n const post = this.props.post;\n const props = {post};\n\n items.add('user', this.postUser, 100);\n // items.add('meta', PostMeta.component(props));\n\n if (post.isEdited() && !post.isHidden()) {\n items.add('edited', PostEdited.component(props));\n }\n\n // If the post is hidden, add a button that allows toggling the visibility\n // of the post's content.\n if (post.isHidden()) {\n items.add('toggle', (\n Button.component({\n className: 'Button Button--default Button--more',\n icon: 'fas fa-ellipsis-h',\n onclick: this.toggleContent.bind(this)\n })\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';\nimport Placeholder from '../../common/components/Placeholder';\nimport 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 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 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 7fbc9ed38..1de63b544 100644 --- a/js/src/common/Application.ts +++ b/js/src/common/Application.ts @@ -1,4 +1,4 @@ -import Mithril from "mithril"; +import Mithril from 'mithril'; import Bus from './Bus'; import Translator from './Translator'; diff --git a/js/src/common/components/ModalManager.tsx b/js/src/common/components/ModalManager.tsx index 8233355e9..d222fc826 100644 --- a/js/src/common/components/ModalManager.tsx +++ b/js/src/common/components/ModalManager.tsx @@ -1,6 +1,6 @@ import MicroModal from 'micromodal'; -import Component from "../Component"; +import Component from '../Component'; import Modal from './Modal'; /** @@ -106,7 +106,7 @@ export default class ModalManager extends Component { * @protected */ onready() { - if (this.component && this.component.onready) { + if (this.component?.onready) { this.component.onready(); } } diff --git a/js/src/common/components/Placeholder.tsx b/js/src/common/components/Placeholder.tsx new file mode 100644 index 000000000..aaf41d945 --- /dev/null +++ b/js/src/common/components/Placeholder.tsx @@ -0,0 +1,19 @@ +import Component, {ComponentProps} from '../Component'; + +export interface PlaceholderProps extends ComponentProps { + text: string +} + +/** + * The `Placeholder` component displays a muted text with some call to action, + * usually used as an empty state. + */ +export default class Placeholder extends Component<PlaceholderProps> { + view() { + return ( + <div className="Placeholder"> + <p>{this.props.text}</p> + </div> + ); + } +} diff --git a/js/src/common/helpers/listItems.tsx b/js/src/common/helpers/listItems.tsx index 227cf72fe..80f53fce5 100644 --- a/js/src/common/helpers/listItems.tsx +++ b/js/src/common/helpers/listItems.tsx @@ -1,7 +1,7 @@ import Separator from '../components/Separator'; export function isSeparator(item) { - return item && item.component === Separator; + return item?.tag === Separator; } export function withoutUnnecessarySeparators(items) { diff --git a/js/src/common/helpers/userOnline.tsx b/js/src/common/helpers/userOnline.tsx new file mode 100644 index 000000000..c6dff7026 --- /dev/null +++ b/js/src/common/helpers/userOnline.tsx @@ -0,0 +1,14 @@ +import icon from './icon'; +import User from '../models/User'; + +/** + * The `useronline` helper displays a green circle if the user is online + * + * @param {User} user + * @return {Object} + */ +export default function userOnline(user: User) { + if (user.lastSeenAt() && user.isOnline()) { + return <span className="UserOnline">{icon('fas fa-circle')}</span>; + } +} diff --git a/js/src/common/models/User.ts b/js/src/common/models/User.ts index 5068f5084..45a05d672 100644 --- a/js/src/common/models/User.ts +++ b/js/src/common/models/User.ts @@ -3,7 +3,7 @@ import stringToColor from '../utils/stringToColor'; import ItemList from '../utils/ItemList'; import computed from '../utils/computed'; import GroupBadge from '../components/GroupBadge'; -import Group from "./Group"; +import Group from './Group'; export default class User extends Model { username = Model.attribute('username') as () => string; diff --git a/js/src/common/utils/ItemList.ts b/js/src/common/utils/ItemList.ts index b01c270c9..940c60f75 100644 --- a/js/src/common/utils/ItemList.ts +++ b/js/src/common/utils/ItemList.ts @@ -39,7 +39,7 @@ export default class ItemList<T = any> { * Get the content of an item. */ get(key: any): T { - return this.items[key].content; + return this.items[key]?.content; } /** @@ -66,6 +66,7 @@ export default class ItemList<T = any> { if (this.items[i] !== null && this.items[i] instanceof Item) { this.items[i].content = Object(this.items[i].content); + // @ts-ignore this.items[i].content.itemName = i; items.push(this.items[i]); this.items[i].key = items.length; diff --git a/js/src/common/utils/SubtreeRetainer.ts b/js/src/common/utils/SubtreeRetainer.ts new file mode 100644 index 000000000..0d7be4baf --- /dev/null +++ b/js/src/common/utils/SubtreeRetainer.ts @@ -0,0 +1,30 @@ +export default class SubtreeRetainer { + callbacks: Function[]; + data = {}; + + constructor(...callbacks: Function[]) { + this.callbacks = callbacks; + } + + check(...callbacks: Function[]) { + this.callbacks.concat(...callbacks); + } + + /** + * Return whether the component should redraw. + */ + update(): boolean { + let update = false; + + this.callbacks.forEach((callback, i) => { + const result = callback(); + + if (result !== this.data[i]) { + this.data[i] = result; + update = true; + } + }); + + return update; + } +} diff --git a/js/src/common/utils/patchMithril.ts b/js/src/common/utils/patchMithril.ts index 637adadd0..bf740f272 100644 --- a/js/src/common/utils/patchMithril.ts +++ b/js/src/common/utils/patchMithril.ts @@ -1,10 +1,29 @@ import m from 'mithril'; import prop from 'mithril/stream'; +import Component from '../Component'; + export default () => { const mo = window['m']; const _m = function (comp, ...args) { + if (!arguments[1]) arguments[1] = {}; + + if (comp.prototype && comp.prototype instanceof Component) { + let children = args.slice(1); + if (children.length === 1 && Array.isArray(children[0])) { + children = children[0]; + } + + if (children) { + Object.defineProperty(arguments[1], 'children', { + writable: true, + }); + + arguments[1].children = (arguments[1].children || []).concat(children); + } + } + const node = mo.apply(this, arguments); if (!node.attrs) node.attrs = {}; diff --git a/js/src/forum/components/CommentPost.tsx b/js/src/forum/components/CommentPost.tsx new file mode 100644 index 000000000..a3b19402f --- /dev/null +++ b/js/src/forum/components/CommentPost.tsx @@ -0,0 +1,151 @@ +import Post from './Post'; +import PostUser from './PostUser'; +// import PostMeta from './PostMeta'; +// import PostEdited from './PostEdited'; +// import EditPostComposer from './EditPostComposer'; +import ItemList from '../../common/utils/ItemList'; +import listItems from '../../common/helpers/listItems'; +import Button from '../../common/components/Button'; + +/** + * The `CommentPost` component displays a standard `comment`-typed post. This + * includes a number of item lists (controls, header, and footer) surrounding + * the post's HTML content. + */ +export default class CommentPost extends Post { + /** + * If the post has been hidden, then this flag determines whether or not its + * content has been expanded. + */ + revealContent: boolean = false; + + postUser: PostUser; + + oninit(vnode) { + super.oninit(vnode); + + // Create an instance of the component that displays the post's author so + // that we can force the post to rerender when the user card is shown. + this.postUser = PostUser.component({post: this.props.post}); + + this.subtree.check( + () => this.postUser.cardVisible, + () => this.isEditing() + ); + } + + content() { + // Note: we avoid using JSX for the <ul> below because it results in some + // weirdness in Mithril.js 0.1.x (see flarum/core#975). This workaround can + // be reverted when we upgrade to Mithril 1.0. + return super.content().concat([ + <header className="Post-header">{m('ul', listItems(this.headerItems().toArray()))}</header>, + <div className="Post-body"> + {this.isEditing() + ? <div className="Post-preview" config={this.configPreview.bind(this)}/> + : m.trust(this.props.post.contentHtml())} + </div> + ]); + } + + onupdate(vnode) { + super.onupdate(vnode); + + const contentHtml = this.isEditing() ? '' : this.props.post.contentHtml(); + + // TODO: idk what this is supposed to be + + // If the post content has changed since the last render, we'll run through + // all of the <script> tags in the content and evaluate them. This is + // necessary because TextFormatter outputs them for e.g. syntax highlighting. + if (vnode.contentHtml !== contentHtml) { + this.$('.Post-body script').each(function() { + eval.call(window, $(this).text()); + }); + } + + vnode.contentHtml = contentHtml; + } + + isEditing() { + return false; // TODO + // return app.composer?.component instanceof EditPostComposer && + // app.composer.component.props.post === this.props.post; + } + + attrs() { + const post = this.props.post; + const attrs = super.attrs(); + + attrs.className = (attrs.className || '') + ' ' + classNames({ + 'CommentPost': true, + 'Post--hidden': post.isHidden(), + 'Post--edited': post.isEdited(), + 'revealContent': this.revealContent, + 'editing': this.isEditing() + }); + + return attrs; + } + + // TODO change so it works + configPreview(element, isInitialized, context) { + if (isInitialized) return; + + // Every 50ms, if the composer content has changed, then update the post's + // body with a preview. + let preview; + const updatePreview = () => { + const content = app.composer.component.content(); + + if (preview === content) return; + + preview = content; + + s9e.TextFormatter.preview(preview || '', element); + }; + updatePreview(); + + const updateInterval = setInterval(updatePreview, 50); + context.onunload = () => clearInterval(updateInterval); + } + + /** + * Toggle the visibility of a hidden post's content. + */ + toggleContent() { + this.revealContent = !this.revealContent; + } + + /** + * Build an item list for the post's header. + * + * @return {ItemList} + */ + headerItems() { + const items = new ItemList(); + const post = this.props.post; + const props = {post}; + + items.add('user', this.postUser, 100); + // items.add('meta', PostMeta.component(props)); + + if (post.isEdited() && !post.isHidden()) { + items.add('edited', PostEdited.component(props)); + } + + // If the post is hidden, add a button that allows toggling the visibility + // of the post's content. + if (post.isHidden()) { + items.add('toggle', ( + Button.component({ + className: 'Button Button--default Button--more', + icon: 'fas fa-ellipsis-h', + onclick: this.toggleContent.bind(this) + }) + )); + } + + return items; + } +} diff --git a/js/src/forum/components/Post.tsx b/js/src/forum/components/Post.tsx new file mode 100644 index 000000000..e565e61f4 --- /dev/null +++ b/js/src/forum/components/Post.tsx @@ -0,0 +1,118 @@ +import Component, {ComponentProps} from '../../common/Component'; +import Dropdown from '../../common/components/Dropdown'; +import PostControls from '../utils/PostControls'; +import listItems from '../../common/helpers/listItems'; +import ItemList from '../../common/utils/ItemList'; +import SubtreeRetainer from "../../common/utils/SubtreeRetainer"; +import PostModel from '../../common/models/Post'; + +export interface PostProps extends ComponentProps { + post: PostModel +} + +/** + * The `Post` component displays a single post. The basic post template just + * includes a controls dropdown; subclasses must implement `content` and `attrs` + * methods. + * + * @abstract + */ +export default class Post<T extends PostProps = PostProps> extends Component<PostProps> { + loading = false; + controlsOpen = false; + + subtree: SubtreeRetainer; + + oninit(vnode) { + super.oninit(vnode); + + /** + * Set up a subtree retainer so that the post will not be redrawn + * unless new data comes in. + */ + this.subtree = new SubtreeRetainer( + () => this.props.post.freshness, + () => { + const user = this.props.post.user(); + return user?.freshness; + }, + () => this.controlsOpen + ); + } + + view() { + const controls = PostControls.controls(this.props.post, this).toArray(); + const attrs = this.attrs(); + + attrs.className = classNames('Post', this.loading && 'Post--loading', attrs.className); + + return ( + <article {...attrs}> + <div> + {this.content()} + <aside className="Post-actions"> + <ul> + {listItems(this.actionItems().toArray())} + {controls.length ? <li> + <Dropdown + className="Post-controls" + buttonClassName="Button Button--icon Button--flat" + menuClassName="Dropdown-menu--right" + icon="fas fa-ellipsis-h" + onshow={() => this.$('.Post-actions').addClass('open')} + onhide={() => this.$('.Post-actions').removeClass('open')}> + {controls} + </Dropdown> + </li> : ''} + </ul> + </aside> + <footer className="Post-footer"><ul>{listItems(this.footerItems().toArray())}</ul></footer> + </div> + ); + </article> + ); + } + + onbeforeupdate(vnode) { + super.onbeforeupdate(vnode); + + return this.subtree.update(); + } + + oncreate(vnode) { + super.oncreate(vnode); + + const $actions = this.$('.Post-actions'); + const $controls = this.$('.Post-controls'); + + $actions.toggleClass('open', $controls.hasClass('open')); + } + + /** + * Get attributes for the post element. + */ + attrs(): ComponentProps { + return {}; + } + + /** + * Get the post's content. + */ + content() { + return []; + } + + /** + * Build an item list for the post's actions. + */ + actionItems() { + return new ItemList(); + } + + /** + * Build an item list for the post's footer. + */ + footerItems() { + return new ItemList(); + } +} diff --git a/js/src/forum/components/PostUser.tsx b/js/src/forum/components/PostUser.tsx new file mode 100644 index 000000000..bc0f520c5 --- /dev/null +++ b/js/src/forum/components/PostUser.tsx @@ -0,0 +1,94 @@ +import Component from '../../common/Component'; +import UserCard from './UserCard'; +import avatar from '../../common/helpers/avatar'; +import username from '../../common/helpers/username'; +import userOnline from '../../common/helpers/userOnline'; +import listItems from '../../common/helpers/listItems'; +import {PostProps} from "./Post"; + +/** + * The `PostUser` component shows the avatar and username of a post's author. + */ +export default class PostUser extends Component<PostProps> { + /** + * Whether or not the user hover card is visible. + */ + cardVisible = false; + + view() { + const post = this.props.post; + const user = post.user(); + + if (!user) { + return ( + <div className="PostUser"> + <h3>{avatar(user, {className: 'PostUser-avatar'})} {username(user)}</h3> + </div> + ); + } + + let card = ''; + + if (!post.isHidden() && this.cardVisible) { + card = UserCard.component({ + user, + className: 'UserCard--popover', + controlsButtonClassName: 'Button Button--icon Button--flat' + }); + } + + return ( + <div className="PostUser"> + <h3> + <m.route.Link href={app.route.user(user)}> + {avatar(user, {className: 'PostUser-avatar'})} + {userOnline(user)} + {username(user)} + </m.route.Link> + </h3> + <ul className="PostUser-badges badges"> + {listItems(user.badges().toArray())} + </ul> + {card} + </div> + ); + } + + oncreate(vnode) { + super.oncreate(vnode); + + let timeout; + + this.$() + .on('mouseover', 'h3 a, .UserCard', () => { + clearTimeout(timeout); + timeout = setTimeout(this.showCard.bind(this), 500); + }) + .on('mouseout', 'h3 a, .UserCard', () => { + clearTimeout(timeout); + timeout = setTimeout(this.hideCard.bind(this), 250); + }); + } + + /** + * Show the user card. + */ + showCard() { + this.cardVisible = true; + + m.redraw(); + + setTimeout(() => this.$('.UserCard').addClass('in')); + } + + /** + * Hide the user card. + */ + hideCard() { + this.$('.UserCard').removeClass('in') + .one('transitionend webkitTransitionEnd oTransitionEnd', () => { + this.cardVisible = false; + m.redraw(); + }); + } +} diff --git a/js/src/forum/components/PostsUserPage.tsx b/js/src/forum/components/PostsUserPage.tsx index ba48120ec..47f4188fc 100644 --- a/js/src/forum/components/PostsUserPage.tsx +++ b/js/src/forum/components/PostsUserPage.tsx @@ -1,9 +1,9 @@ import UserPage from './UserPage'; import LoadingIndicator from '../../common/components/LoadingIndicator'; import Button from '../../common/components/Button'; -// import Placeholder from '../../common/components/Placeholder'; -// import CommentPost from './CommentPost'; -import Post from "../../common/models/Post"; +import Placeholder from '../../common/components/Placeholder'; +import CommentPost from './CommentPost'; +import Post from '../../common/models/Post'; /** * The `PostsUserPage` component shows a user's activity feed inside of their @@ -43,8 +43,6 @@ export default class PostsUserPage extends UserPage { } content() { - return <p>test</p>; - if (this.posts.length === 0 && ! this.loading) { return ( <div className="PostsUserPage"> diff --git a/js/src/forum/components/UsersSearchSource.tsx b/js/src/forum/components/UsersSearchSource.tsx index 963229997..62f05302b 100644 --- a/js/src/forum/components/UsersSearchSource.tsx +++ b/js/src/forum/components/UsersSearchSource.tsx @@ -1,7 +1,7 @@ import highlight from '../../common/helpers/highlight'; import avatar from '../../common/helpers/avatar'; import username from '../../common/helpers/username'; -import SearchSource from "./SearchSource"; +import SearchSource from './SearchSource'; import User from '../../common/models/User'; /** diff --git a/js/src/forum/utils/PostControls.tsx b/js/src/forum/utils/PostControls.tsx new file mode 100644 index 000000000..3d12b121a --- /dev/null +++ b/js/src/forum/utils/PostControls.tsx @@ -0,0 +1,175 @@ +import {Vnode} from "mithril"; + +// import EditPostComposer from '../components/EditPostComposer'; +import Button from '../../common/components/Button'; +import Separator from '../../common/components/Separator'; +import ItemList from '../../common/utils/ItemList'; +import Post from "../../common/models/Post"; +import PostComponent from "../../forum/components/Post"; + +/** + * The `PostControls` utility constructs a list of buttons for a post which + * perform actions on it. + */ +export default { + /** + * Get a list of controls for a post. + * + * @param {Post} post + * @param {*} context The parent component under which the controls menu will + * be displayed. + * @public + */ + controls(post: Post, context) { + const items = new ItemList(); + + ['user', 'moderation', 'destructive'].forEach(section => { + const controls = this[section + 'Controls'](post, context).toArray(); + + if (controls.length) { + controls.forEach(item => items.add(item.itemName, item)); + items.add(section + 'Separator', Separator.component()); + } + }); + + return items; + }, + + /** + * Get controls for a post pertaining to the current user (e.g. report). + * + * @param {Post} post + * @param {*} context The parent component under which the controls menu will + * be displayed. + * @protected + */ + userControls(post: Post, context) { + return new ItemList(); + }, + + /** + * Get controls for a post pertaining to moderation (e.g. edit). + * + * @param {Post} post + * @param {*} context The parent component under which the controls menu will + * be displayed. + * @protected + */ + moderationControls(post: Post, context) { + const items = new ItemList(); + + if (post.contentType() === 'comment' && post.canEdit()) { + if (!post.isHidden()) { + items.add('edit', Button.component({ + icon: 'fas fa-pencil-alt', + onclick: this.editAction.bind(post) + }, app.translator.trans('core.forum.post_controls.edit_button'))); + } + } + + return items; + }, + + /** + * Get controls for a post that are destructive (e.g. delete). + * + * @param {Post} post + * @param {*} context The parent component under which the controls menu will + * be displayed. + * @protected + */ + destructiveControls(post: Post, context) { + const items = new ItemList(); + + if (post.contentType() === 'comment' && !post.isHidden()) { + if (post.canHide()) { + items.add('hide', Button.component({ + icon: 'far fa-trash-alt', + children: app.translator.trans('core.forum.post_controls.delete_button'), + onclick: this.hideAction.bind(post) + })); + } + } else { + if (post.contentType() === 'comment' && post.canHide()) { + items.add('restore', Button.component({ + icon: 'fas fa-reply', + children: app.translator.trans('core.forum.post_controls.restore_button'), + onclick: this.restoreAction.bind(post) + })); + } + if (post.canDelete()) { + items.add('delete', Button.component({ + icon: 'fas fa-times', + children: app.translator.trans('core.forum.post_controls.delete_forever_button'), + onclick: this.deleteAction.bind(post, context) + })); + } + } + + return items; + }, + + /** + * Open the composer to edit a post. + */ + editAction(this: Post) { + return new Promise<EditPostComposer>(resolve => { + const component = new EditPostComposer({ post: this }); + + app.composer.load(component); + app.composer.show(); + + resolve(component); + }); + }, + + /** + * Hide a post. + */ + hideAction(this: Post) { + this.pushAttributes({ hiddenAt: new Date(), hiddenUser: app.session.user }); + + return this.save({ isHidden: true }).then(() => m.redraw()); + }, + + /** + * Restore a post. + */ + restoreAction(this: Post) { + this.pushAttributes({ hiddenAt: null, hiddenUser: null }); + + return this.save({ isHidden: false }).then(() => m.redraw()); + }, + + /** + * Delete a post. + */ + deleteAction(this: Post, context: PostComponent) { + if (context) context.loading = true; + + return this.delete() + .then(() => { + const discussion = this.discussion(); + + discussion.removePost(this.id()); + + // If this was the last post in the discussion, then we will assume that + // the whole discussion was deleted too. + if (!discussion.postIds().length) { + // If there is a discussion list in the cache, remove this discussion. + if (app.cache.discussionList) { + app.cache.discussionList.removeDiscussion(discussion); + } + + if (app.viewingDiscussion(discussion)) { + app.history.back(); + } + } + }) + .catch(() => {}) + .then(() => { + if (context) context.loading = false; + m.redraw(); + }); + } +};