text: !function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(exports,e,n){t.o(exports,e)||Object.defineProperty(exports,e,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.LS_ACCESS_TOKEN_KEY="gitment-comments-token",exports.LS_USER_KEY="gitment-user-info",exports.NOT_INITIALIZED_ERROR=new Error("Comments Not Initialized")},function(e,exports,t){"use strict";function n(e){return e instanceof Element?e:a(e)?document.getElementById(e):document.createElement("div")}function r(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"https://api.github.com",i=new XMLHttpRequest,a=localStorage.getItem(o.LS_ACCESS_TOKEN_KEY),u=""+r+t,c=null;"GET"!==e&&"DELETE"!==e||(u+=s.stringify(n));var l=new Promise(function(e,t){i.addEventListener("load",function(){var n=i.getResponseHeader("content-type"),r=i.responseText;if(!/json/.test(n))return void e(r);var o=i.responseText?JSON.parse(r):{};o.message?t(new Error(o.message)):e(o)}),i.addEventListener("error",function(e){return t(e)})});return i.open(e,u,!0),i.setRequestHeader("Accept","application/vnd.github.squirrel-girl-preview, application/vnd.github.html+json"),a&&"undefined"!=a&&i.setRequestHeader("Authorization","token "+a),"GET"!==e&&"DELETE"!==e&&(c=JSON.stringify(n),i.setRequestHeader("Content-Type","application/json")),i.send(c),l}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.http=exports.Query=exports.isString=void 0;var i=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();exports.getTargetContainer=n;var o=t(0),a=exports.isString=function(e){return"[object String]"===toString.call(e)},s=exports.Query={parse:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.search;if(!e)return{};var t="?"===e[0]?e.substring(1):e,n={};return t.split("&").forEach(function(e){var t=e.split("="),r=i(t,2),o=r[0],a=r[1];o&&(n[o]=a)}),n},stringify:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"?",n=Object.keys(e).map(function(t){return t+"="+encodeURIComponent(e[t]||"")}).join("&");return n?t+n:""}};exports.http={get:r("GET"),post:r("POST"),delete:r("DELETE"),put:r("PUT")}},function(e,exports,t){"use strict";var n=n||t(3);window.GitM=n;try{window.http=t(1).http}catch(e){}},function(e,exports,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){e[t]=function(n){var r=(0,s.getTargetContainer)(n),i=e.theme[t]||e.defaultTheme[t];return(0,o.autorun)(function(){var t=i(e.state,e);r.firstChild?r.replaceChild(t,r.firstChild):r.appendChild(t)}),r}}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=t(4),a=t(0),s=t(1),u=t(6),c=function(e){return e&&e.__esModule?e:{default:e}}(u),l=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this.defaultTheme=c.default,this.useTheme(c.default),Object.assign(this,{id:window.location.href,title:window.document.title,link:window.location.href,desc:"",labels:[],theme:c.default,oauth:{},perPage:20,maxCommentHeight:250},r),this.useTheme(this.theme);var i={};try{var u=localStorage.getItem(a.LS_USER_KEY);this.accessToken&&u&&Object.assign(i,JSON.parse(u),{fromCache:!0})}catch(e){localStorage.removeItem(a.LS_USER_KEY)}this.state=(0,o.observable)({user:i,error:null,meta:{},comments:void 0,reactions:[],commentReactions:{},currentPage:1});var l=s.Query.parse();if(l.code){var d=this.oauth,h=d.client_id,f=d.client_secret,p=l.code;delete l.code;var m=s.Query.stringify(l),v=""+window.location.origin+window.location.pathname+m+window.location.hash;history.replaceState({},"",v),Object.assign(this,{id:v,link:v},r),this.state.user.isLoggingIn=!0,s.http.post("https://api.oyoula.com/index/ghoauth",{code:p,client_id:h,client_secret:f},"").then(function(e){t.accessToken=e.access_token,t.update()}).catch(function(e){t.state.user.isLoggingIn=!1,alert(e)})}else this.update()}return i(e,[{key:"accessToken",get:function(){return localStorage.getItem(a.LS_ACCESS_TOKEN_KEY)},set:function(e){localStorage.setItem(a.LS_ACCESS_TOKEN_KEY,e)}},{key:"loginLink",get:function(){var e=this.oauth.redirect_uri||window.location.href,t=Object.assign({scope:"public_repo",redirect_uri:e},this.oauth);return"https://github.com/login/oauth/authorize"+s.Query.stringify(t)}}]),i(e,[{key:"init",value:function(){var e=this;return this.createIssue().then(function(){return e.loadComments()}).then(function(t){return e.state.error=null,t})}},{key:"useTheme",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.theme=t,Object.keys(this.theme).forEach(function(t){return r(e,t)})}},{key:"update",value:function(){var e=this;return Promise.all([this.loadMeta(),this.loadUserInfo()]).then(function(){return Promise.all([e.loadComments().then(function(){return e.loadCommentReactions()}),e.loadReactions()])}).catch(function(t){return e.state.error=t})}},{key:"markdown",value:function(e){return s.http.post("/markdown",{text:e,mode:"gfm"})}},{key:"createIssue",value:function(){var e=this,t=this.id,n=this.owner,r=this.repo,i=this.title,o=this.link,a=this.desc,u=this.labels;return console.log(t),s.http.post("/repos/"+n+"/"+r+"/issues",{title:i,labels:u.concat(["gitment",t]),body:o+"\n\n"+a}).then(function(t){return e.state.meta=t,t})}},{key:"getIssue",value:function(){return this.state.meta.id?Promise.resolve(this.state.meta):this.loadMeta()}},{key:"post",value:function(e){var t=this;return this.getIssue().then(function(t){return s.http.post(t.comments_url,{body:e},"")}).then(function(e){t.state.meta.comments++;var n=Math.ceil(t.state.meta.comments/t.perPage);return t.state.currentPage===n&&t.state.comments.push(e),e})}},{key:"loadMeta",value:function(){var e=this,t=this.id,n=this.owner,r=this.repo;return s.http.get("/repos/"+n+"/"+r+"/issues",{creator:n,title:t}).then(function(t){return t.length?(e.state.meta=t[0],t[0]):Promise.reject(a.NOT_INITIALIZED_ERROR)})}},{key:"loadComments",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.currentPage;return this.getIssue().then(function(n){return s.http.get(n.comments_url,{page:t,per_page:e.perPage},"")}).then(function(t){return e.state.comments=t,t})}},{key:"loadUserInfo",value:function(){var e=this;return this.accessToken?s.http.get("/user").then(function(t){return e.state.user=t,localStorage.setItem(a.LS_USER_KEY,JSON.stringify(t)),t}):(this.logout(),Promise.resolve({}))}},{key:"loadReactions",value:function(){var e=this;return this.accessToken?this.getIssue().then(function(e){return e.reactions.total_count?s.http.get(e.reactions.url,{},""):[]}).then(function(t){return e.state.reactions=t,t}):(this.state.reactions=[],Promise.resolve([]))}},{key:"loadCommentReactions",value:function(){var e=this;if(!this.accessToken)return this.state.commentReactions={},Promise.resolve([]);var t=this.state.comments,n={};return Promise.all(t.map(function(t){if(!t.reactions.total_count)return[];var n=e.owner,r=e.repo;return s.http.get("/repos/"+n+"/"+r+"/issues/comments/"+t.id+"/reactions",{})})).then(function(r){return t.forEach(function(e,t){n[e.id]=r[t]}),e.state.commentReactions=n,n})}},{key:"login",value:function(){window.location.href=this.loginLink}},{key:"logout",value:function(){localStorage.removeItem(a.LS_ACCESS_TOKEN_KEY),localStorage.removeItem(a.LS_USER_KEY),this.state.user={}}},{key:"goto",value:function(e){return this.state.currentPage=e,this.state.comments=void 0,this.loadComments(e)}},{key:"like",value:function(){var e=this;if(!this.accessToken)return alert("Login to Like"),Promise.reject();var t=this.owner,n=this.repo;return s.http.post("/repos/"+t+"/"+n+"/issues/"+this.state.meta.number+"/reactions",{content:"heart"}).then(function(t){e.state.reactions.push(t),e.state.meta.reactions.heart++})}},{key:"unlike",value:function(){var e=this;if(!this.accessToken)return Promise.reject();var t=this.state,n=t.user,r=t.reactions,i=r.findIndex(function(e){return e.user.login===n.login});return s.http.delete("/reactions/"+r[i].id).then(function(){r.splice(i,1),e.state.meta.reactions.heart--})}},{key:"likeAComment",value:function(e){var t=this;if(!this.accessToken)return alert("Login to Like"),Promise.reject();var n=this.owner,r=this.repo,i=this.state.comments.find(function(t){return t.id===e});return s.http.post("/repos/"+n+"/"+r+"/issues/comments/"+e+"/reactions",{content:"heart"}).then(function(n){t.state.commentReactions[e].push(n),i.reactions.heart++})}},{key:"unlikeAComment",value:function(e){if(!this.accessToken)return Promise.reject();var t=this.state.commentReactions[e],n=this.state.comments.find(function(t){return t.id===e}),r=this.state.user,i=t.findIndex(function(e){return e.user.login===r.login});return s.http.delete("/reactions/"+t[i].id).then(function(){t.splice(i,1),n.reactions.heart--})}}]),e}();e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function r(e,t){function n(){this.constructor=e}nn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function i(e){return e.interceptors&&e.interceptors.length>0}function o(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),Ie(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function a(e,t){var n=Et();try{var r=e.interceptors;if(r)for(var i=0,o=r.length;i<o&&(t=r[i](t),Te(!t||t.type,"Intercept handlers should return nothing or a change object"),t);i++);return t}finally{Tt(n)}}function s(e){return e.changeListeners&&e.changeListeners.length>0}function u(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),Ie(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function c(e,t){var n=Et(),r=e.changeListeners;if(r){r=r.slice();for(var i=0,o=r.length;i<o;i++)r[i](t);Tt(n)}}function l(){return!!Wn.spyListeners.length}function d(e){if(Wn.spyListeners.length)for(var t=Wn.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function h(e){d(Me({},e,{spyReportStart:!0}))}function f(e){d(e?Me({},e,sn):sn)}function p(e){return Wn.spyListeners.push(e),Ie(function(){var t=Wn.spyListeners.indexOf(e);-1!==t&&Wn.spyListeners.splice(t,1)})}function m(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function v(e){Te(!0!==e[un],"Illegal state: cannot recycle array as iterator"),Ve(e,un,!0);var t=-1;return Ve(e,"next",function(){return t++,{done:t>=this.length,value:t<this.length?this[t]:void 0}}),e}function g(e,t){Ve(e,m(),t)}function b(e){return{enumerable:!1,configurable:!1,get:function(){return this.get(e)},set:function(t){this.set(e,t)}}}function y(e){Object.defineProperty(fn.prototype,""+e,b(e))}function w(e){for(var t=ln;t<e;t++)y(t);ln=e}function x(e){return Re(e)&&mn(e.$mobx)}function _(e){return yn[e]}function O(e,t){Te("function"==typeof t,_("m026")),Te("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var n=function(){return S(e,t,this,arguments)};return n.originalFn=t,n.isMobxAction=!0,n}function S(e,t,n,r){var i=k(e,t,n,r);try{return t.apply(n,r)}finally{A(i)}}function k(e,t,n,r){var i=l()&&!!e,o=0;if(i){o=Date.now();var a=r&&r.length||0,s=new Array(a);if(a>0)for(var u=0;u<a;u++)s[u]=r[u];h({type:"action",name:e,fn:t,object:n,arguments:s})}var c=Et();return dt(),{prevDerivation:c,prevAllowStateChanges:I(!0),notifySpy:i,startTime:o}}function A(e){C(e.prevAllowStateChanges),ht(),Tt(e.prevDerivation),e.notifySpy&&f({time:Date.now()-e.startTime})}function E(e){Te(null===Wn.trackingDerivation,_("m028")),Wn.strictMode=e,Wn.allowStateChanges=!e}function T(){return Wn.strictMode}function j(e,t){var n,r=I(e);try{n=t()}finally{C(r)}return n}function I(e){var t=Wn.allowStateChanges;return Wn.allowStateChanges=e,t}function C(e){Wn.allowStateChanges=e}function L(e,t,n,r,i){function o(o,a,s,u,c){if(void 0===c&&(c=0),Te(i||M(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),s){Ne(o,"__mobxLazyInitializers")||De(o,"__mobxLazyInitializers",o.__mobxLazyInitializers&&o.__mobxLazyInitializers.slice()||[]);var l=s.value,d=s.initializer;return o.__mobxLazyInitializers.push(function(t){e(t,a,d?d.call(t):l,u,s)}),{enumerable:r,configurable:!0,get:function(){return!0!==this.__mobxDidRunLazyInitializers&&P(this),t.call(this,a)},set:function(e){!0!==this.__mobxDidRunLazyInitializers&&P(this),n.call(this,a,e)}}}var h={enumerable:r,configurable:!0,get:function(){return this.__mobxInitializedProps&&!0===this.__mobxInitializedProps[a]||R(this,a,void 0,e,u,s),t.call(this,a)},set:function(t){this.__mobxInitializedProps&&!0===this.__mobxInitializedProps[a]?n.call(this,a,t):R(this,a,t,e,u,s)}};return(arguments.length<3||5===arguments.length&&c<3)&&Object.defineProperty(o,a,h),h}return i?function(){if(M(arguments))return o.apply(null,arguments);var e=arguments,t=arguments.length;return function(n,r,i){return o(n,r,i,e,t)}}:o}function R(e,t,n,r,i,o){Ne(e,"__mobxInitializedProps")||De(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,i,o)}function P(e){!0!==e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers&&(De(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function M(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function N(e){return function(t,n,r){if(r&&"function"==typeof r.value)return r.value=O(e,r.value),r.enumerable=!1,r.configurable=!0,r;if(void 0!==r&&void 0!==r.get)throw new Error("[mobx] action is not expected to be used with getters");return wn(e).apply(this,arguments)}}function D(e,t,n){var r="string"==typeof e?e:e.name||"<unnamed action>",i="function"==typeof e?e:t,o="function"==typeof e?t:n;return Te("function"==typeof i,_("m002")),Te(0===i.length,_("m003")),Te("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),S(r,i,o,void 0)}function V(e){return"function"==typeof e&&!0===e.isMobxAction}function B(e,t,n){var r=function(){return S(t,n,e,arguments)};r.isMobxAction=!0,De(e,t,r)}function z(e,t){return U(e,t)}function U(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!==e)return t!==t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&H(e,t,n,r)}function H(e,t,n,r){e=K(e),t=K(t);var i=On.call(e);if(i!==On.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t)}var o="[object Array]"===i;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!("function"==typeof a&&a instanceof a&&"function"==typeof s&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];for(var u=n.length;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),o){if((u=e.length)!==t.length)return!1;for(;u--;)if(!U(e[u],t[u],n,r))return!1}else{var c,l=Object.keys(e);if(u=l.length,Object.keys(t).length!==u)return!1;for(;u--;)if(c=l[u],!G(t,c)||!U(e[c],t[c],n,r))return!1}return n.pop(),r.pop(),!0}function K(e){return x(e)?e.peek():zn(e)?e.entries():Ke(e)?qe(e.entries()):e}function G(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function q(e,t){return e===t}function W(e,t){return z(e,t)}function Y(e,t){return Ue(e,t)||q(e,t)}function J(e,t,n){function r(){o(s)}var i,o,a;"string"==typeof e?(i=e,o=t,a=n):(i=e.name||"Autorun@"+Ae(),o=e,a=t),Te("function"==typeof o,_("m004")),Te(!1===V(o),_("m005")),a&&(o=o.bind(a));var s=new tr(i,function(){this.track(r)});return s.schedule(),s.getDisposer()}function F(e,t,n,r){var i,o,a,s;return"string"==typeof e?(i=e,o=t,a=n,s=r):(i="When@"+Ae(),o=e,a=t,s=n),J(i,function(e){if(o.call(s)){e.dispose();var t=Et();a.call(s),Tt(t)}})}function X(e,t,n,r){function i(){a(l)}var o,a,s,u;"string"==typeof e?(o=e,a=t,s=n,u=r):(o=e.name||"AutorunAsync@"+Ae(),a=e,s=t,u=n),Te(!1===V(a),_("m006")),void 0===s&&(s=1),u&&(a=a.bind(u));var c=!1,l=new tr(o,function(){c||(c=!0,setTimeout(function(){c=!1,l.isDisposed||l.track(i)},s))});return l.schedule(),l.getDisposer()}function Q(e,t,n){function r(){if(!c.isDisposed){var n=!1;c.track(function(){var t=e(c);n=a||!u(o,t),o=t}),a&&i.fireImmediately&&t(o,c),a||!0!==n||t(o,c),a&&(a=!1)}}arguments.length>3&&Ee(_("m007")),ve(e)&&Ee(_("m008"));var i;i="object"==typeof n?n:{},i.name=i.name||e.name||t.name||"Reaction@"+Ae(),i.fireImmediately=!0===n||!0===i.fireImmediately,i.delay=i.delay||0,i.compareStructural=i.compareStructural||i.struct||!1,t=_n(i.name,i.context?t.bind(i.context):t),i.context&&(e=e.bind(i.context));var o,a=!0,s=!1,u=i.equals?i.equals:i.compareStructural||i.struct?Sn.structural:Sn.default,c=new tr(i.name,function(){a||i.delay<1?r():s||(s=!0,setTimeout(function(){s=!1,r()},i.delay))});return c.schedule(),c.getDisposer()}function Z(e,t){if(ue(e)&&e.hasOwnProperty("$mobx"))return e.$mobx;Te(Object.isExtensible(e),_("m035")),Pe(e)||(t=(e.constructor.name||"ObservableObject")+"@"+Ae()),t||(t="ObservableObject@"+Ae());var n=new En(e,t);return Ve(e,"$mobx",n),n}function ee(e,t,n,r){if(e.values[t]&&!An(e.values[t]))return Te("value"in n,"The property "+t+" in "+e.name+" is already observable, cannot redefine it as computed property"),void(e.target[t]=n.value);if("value"in n)if(ve(n.value)){var i=n.value;te(e,t,i.initialValue,i.enhancer)}else V(n.value)&&!0===n.value.autoBind?B(e.target,t,n.value.originalFn):An(n.value)?re(e,t,n.value):te(e,t,n.value,r);else ne(e,t,n.get,n.set,Sn.default,!0)}function te(e,t,n,r){if(ze(e.target,t),i(e)){var o=a(e,{object:e.target,name:t,type:"add",newValue:n});if(!o)return;n=o.newValue}n=(e.values[t]=new gn(n,r,e.name+"."+t,!1)).value,Object.defineProperty(e.target,t,ie(t)),se(e,e.target,t,n)}function ne(e,t,n,r,i,o){o&&ze(e.target,t),e.values[t]=new kn(n,e.target,i,e.name+"."+t,r),o&&Object.defineProperty(e.target,t,oe(t))}function re(e,t,n){var r=e.name+"."+t;n.name=r,n.scope||(n.scope=e.target),e.values[t]=n,Object.defineProperty(e.target,t,oe(t))}function ie(e){return Tn[e]||(Tn[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){ae(this,e,t)}})}function oe(e){return jn[e]||(jn[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:function(t){return this.$mobx.values[e].set(t)}})}function ae(e,t,n){var r=e.$mobx,o=r.values[t];if(i(r)){var u=a(r,{type:"update",object:e,name:t,newValue:n});if(!u)return;n=u.newValue}if((n=o.prepareNewValue(n))!==vn){var d=s(r),p=l(),u=d||p?{type:"update",object:e,oldValue:o.value,name:t,newValue:n}:null;p&&h(u),o.setNewValue(n),d&&c(r,u),p&&f()}}function se(e,t,n,r){var i=s(e),o=l(),a=i||o?{type:"add",object:t,name:n,newValue:r}:null;o&&h(a),i&&c(e,a),o&&f()}function ue(e){return!!Re(e)&&(P(e),In(e.$mobx))}function ce(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(x(e)||zn(e))throw new Error(_("m019"));if(ue(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return ue(e)||!!e.$mobx||an(e)||ir(e)||An(e)}function le(e){return Te(!!e,":("),L(function(t,n,r,i,o){ze(t,n),Te(!o||!o.get,_("m022")),te(Z(t,void 0),n,r,e)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){ae(this,e,t)},!0,!1)}function de(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return fe(e,be,t)}function he(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return fe(e,we,t)}function fe(e,t,n){Te(arguments.length>=2,_("m014")),Te("object"==typeof e,_("m015")),Te(!zn(e),_("m016")),n.forEach(function(e){Te("object"==typeof e,_("m017")),Te(!ce(e),_("m018"))});for(var r=Z(e),i={},o=n.length-1;o>=0;o--){var a=n[o];for(var s in a)if(!0!==i[s]&&Ne(a,s)){if(i[s]=!0,e===a&&!Be(e,s))continue;var u=Object.getOwnPropertyDescriptor(a,s);ee(r,s,u,t)}}return e}function pe(e){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return Cn.apply(null,arguments);if(Te(arguments.length<=1,_("m021")),Te(!ve(e),_("m020")),ce(e))return e;var t=be(e,void 0,void 0);return t!==e?t:Dn.box(e)}function me(e){Ee("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}function ve(e){return"object"==typeof e&&null!==e&&!0===e.isMobxModifierDescriptor}function ge(e,t){return Te(!ve(t),"Modifiers cannot be nested"),{isMobxModifierDescriptor:!0,initialValue:t,enhancer:e}}function be(e,t,n){return ve(e)&&Ee("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),ce(e)?e:Array.isArray(e)?Dn.array(e,n):Pe(e)?Dn.object(e,n):Ke(e)?Dn.map(e,n):e}function ye(e,t,n){return ve(e)&&Ee("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),void 0===e||null===e?e:ue(e)||x(e)||zn(e)?e:Array.isArray(e)?Dn.shallowArray(e,n):Pe(e)?Dn.shallowObject(e,n):Ke(e)?Dn.shallowMap(e,n):Ee("The shallow modifier / decorator can only used in combination with arrays, objects and maps")}function we(e){return e}function xe(e,t,n){if(z(e,t))return t;if(ce(e))return e;if(Array.isArray(e))return new fn(e,xe,n);if(Ke(e))return new Bn(e,xe,n);if(Pe(e)){var r={};return Z(r,n),fe(r,xe,[e]),r}return e}function _e(e,t,n){return z(e,t)?t:e}function Oe(e,t){void 0===t&&(t=void 0),dt();try{return e.apply(t)}finally{ht()}}function Se(e){return je("`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead"),Dn.map(e)}function ke(){return"undefined"!=typeof window?window:e}function Ae(){return++Wn.mobxGuid}function Ee(e,t){throw Te(!1,e,t),"X"}function Te(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}function je(e){return-1===Un.indexOf(e)&&(Un.push(e),console.error("[mobx] Deprecated: "+e),!0)}function Ie(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function Ce(e){var t=[];return e.forEach(function(e){-1===t.indexOf(e)&&t.push(e)}),t}function Le(e,t,n){return void 0===t&&(t=100),void 0===n&&(n=" - "),e?e.slice(0,t).join(n)+(e.length>t?" (... and "+(e.length-t)+"more)":""):""}function Re(e){return null!==e&&"object"==typeof e}function Pe(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function Me(){for(var e=arguments[0],t=1,n=arguments.length;t<n;t++){var r=arguments[t];for(var i in r)Ne(r,i)&&(e[i]=r[i])}return e}function Ne(e,t){return Kn.call(e,t)}function De(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Ve(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Be(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||!1!==n.configurable&&!1!==n.writable}function ze(e,t){Te(Be(e,t),"Cannot make property '"+t+"' observable, it is not configurable and writable in the target object")}function $e(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return Re(e)&&!0===e[n]}}function Ue(e,t){return"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}function He(e){return Array.isArray(e)||x(e)}function Ke(e){return void 0!==ke().Map&&e instanceof ke().Map}function Ge(e){return Pe(e)?Object.keys(e):Array.isArray(e)?e.map(function(e){return e[0]}):Ke(e)?Array.from(e.keys()):zn(e)?e.keys():Ee("Cannot get keys from "+e)}function qe(e){for(var t=[];;){var n=e.next();if(n.done)break;t.push(n.value)}return t}function We(){return"function"==typeof Symbol&&Symbol.toPrimitive||"@@toPrimitive"}function Ye(e){return null===e?null:"object"==typeof e?""+e:e}function Je(){Jn=!0,ke().__mobxInstanceCount--}function Fe(){je("Using `shareGlobalState` is not recommended, use peer dependencies instead. See https://github.com/mobxjs/mobx/issues/1082 for details."),Yn=!0;var e=ke(),t=Wn;if(e.__mobservableTrackingStack||e.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(e.__mobxGlobal&&e.__mobxGlobal.version!==t.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");e.__mobxGlobal?Wn=e.__mobxGlobal:e.__mobxGlobal=t}function Xe(){return Wn}function Qe(){Wn.resetId++;var e=new qn;for(var t in e)-1===Gn.indexOf(t)&&(Wn[t]=e[t]);Wn.allowStateChanges=!Wn.strictMode}function Ze(e,t){if("object"==typeof e&&null!==e){if(x(e))return Te(void 0===t,_("m036")),e.$mobx.atom;if(zn(e)){var n=e;if(void 0===t)return Ze(n._keys);var r=n._data[t]||n._hasMap[t];return Te(!!r,"the entry '"+t+"' does not exist in the observable map '"+tt(e)+"'"),r}if(P(e),t&&!e.$mobx&&e[t],ue(e)){if(!t)return Ee("please specify a property");var r=e.$mobx.values[t];return Te(!!r,"no observable property '"+t+"' found on the observable object '"+tt(e)+"'"),r}if(an(e)||An(e)||ir(e))return e}else if("function"==typeof e&&ir(e.$mobx))return e.$mobx;return Ee("Cannot obtain atom from "+e)}function et(e,t){return Te(e,"Expecting some object"),void 0!==t?et(Ze(e,t)):an(e)||An(e)||ir(e)?e:zn(e)?e:(P(e),e.$mobx?e.$mobx:void Te(!1,"Cannot obtain administration from "+e))}function tt(e,t){var n;return n=void 0!==t?Ze(e,t):ue(e)||zn(e)?et(e):Ze(e),n.name}function nt(e,t){return rt(Ze(e,t))}function rt(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=Ce(e.observing).map(rt)),t}function it(e,t){return ot(Ze(e,t))}function ot(e){var t={name:e.name};return at(e)&&(t.observers=st(e).map(ot)),t}function at(e){return e.observers&&e.observers.length>0}function st(e){return e.observers}function ut(e,t){var n=e.observers.length;n&&(e.observersIndexes[t.__mapid]=n),e.observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function ct(e,t){if(1===e.observers.length)e.observers.length=0,lt(e);else{var n=e.observers,r=e.observersIndexes,i=n.pop();if(i!==t){var o=r[t.__mapid]||0;o?r[i.__mapid]=o:delete r[i.__mapid],n[o]=i}delete r[t.__mapid]}}function lt(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,Wn.pendingUnobservations.push(e))}function dt(){Wn.inBatch++}function ht(){if(0==--Wn.inBatch){Nt();for(var e=Wn.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.length&&n.onBecomeUnobserved()}Wn.pendingUnobservations=[]}}function ft(e){var t=Wn.trackingDerivation;null!==t?t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e):0===e.observers.length&&lt(e)}function pt(e){if(e.lowestObserverState!==Qn.STALE){e.lowestObserverState=Qn.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Qn.UP_TO_DATE&&(r.isTracing!==Zn.NONE&&gt(r,e),r.onBecomeStale()),r.dependenciesState=Qn.STALE}}}function mt(e){if(e.lowestObserverState!==Qn.STALE){e.lowestObserverState=Qn.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Qn.POSSIBLY_STALE?r.dependenciesState=Qn.STALE:r.dependenciesState===Qn.UP_TO_DATE&&(e.lowestObserverState=Qn.UP_TO_DATE)}}}function vt(e){if(e.lowestObserverState===Qn.UP_TO_DATE){e.lowestObserverState=Qn.POSSIBLY_STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Qn.UP_TO_DATE&&(r.dependenciesState=Qn.POSSIBLY_STALE,r.isTracing!==Zn.NONE&&gt(r,e),r.onBecomeStale())}}}function gt(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===Zn.BREAK){var n=[];bt(nt(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof kn?e.derivation.toString():"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n    ")()}}function bt(e,t,n){if(t.length>=1e3)return void t.push("(and many more)");t.push(""+new Array(n).join("\t")+e.name),e.dependencies&&e.dependencies.forEach(function(e){return bt(e,t,n+1)})}function yt(e){return e instanceof er}function wt(e){switch(e.dependenciesState){case Qn.UP_TO_DATE:return!1;case Qn.NOT_TRACKING:case Qn.STALE:return!0;case Qn.POSSIBLY_STALE:for(var t=Et(),n=e.observing,r=n.length,i=0;i<r;i++){var o=n[i];if(An(o)){try{o.get()}catch(e){return Tt(t),!0}if(e.dependenciesState===Qn.STALE)return Tt(t),!0}}return jt(e),Tt(t),!1}}function xt(){return null!==Wn.trackingDerivation}function _t(e){var t=e.observers.length>0;Wn.computationDepth>0&&t&&Ee(_("m031")+e.name),!Wn.allowStateChanges&&t&&Ee(_(Wn.strictMode?"m030a":"m030b")+e.name)}function Ot(e,t,n){jt(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Wn.runId;var r=Wn.trackingDerivation;Wn.trackingDerivation=e;var i;try{i=t.call(n)}catch(e){i=new er(e)}return Wn.trackingDerivation=r,St(e),i}function St(e){for(var t=e.observing,n=e.observing=e.newObserving,r=Qn.UP_TO_DATE,i=0,o=e.unboundDepsCount,a=0;a<o;a++){var s=n[a];0===s.diffValue&&(s.diffValue=1,i!==a&&(n[i]=s),i++),s.dependenciesState>r&&(r=s.dependenciesState)}for(n.length=i,e.newObserving=null,o=t.length;o--;){var s=t[o];0===s.diffValue&&ct(s,e),s.diffValue=0}for(;i--;){var s=n[i];1===s.diffValue&&(s.diffValue=0,ut(s,e))}r!==Qn.UP_TO_DATE&&(e.dependenciesState=r,e.onBecomeStale())}function kt(e){var t=e.observing;e.observing=[];for(var n=t.length;n--;)ct(t[n],e);e.dependenciesState=Qn.NOT_TRACKING}function At(e){var t=Et(),n=e();return Tt(t),n}function Et(){var e=Wn.trackingDerivation;return Wn.trackingDerivation=null,e}function Tt(e){Wn.trackingDerivation=e}function jt(e){if(e.dependenciesState!==Qn.UP_TO_DATE){e.dependenciesState=Qn.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=Qn.UP_TO_DATE}}function It(e){return console.log(e),e}function Ct(e,t){return je("`whyRun` is deprecated in favor of `trace`"),e=Rt(arguments),e?An(e)||ir(e)?It(e.whyRun()):Ee(_("m025")):It(_("m024"))}function Lt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;"boolean"==typeof e[e.length-1]&&(n=e.pop());var r=Rt(e);if(!r)return Ee("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");r.isTracing===Zn.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled"),r.isTracing=n?Zn.BREAK:Zn.LOG}function Rt(e){switch(e.length){case 0:return Wn.trackingDerivation;case 1:return Ze(e[0]);case 2:return Ze(e[0],e[1])}}function Pt(e){Te(this&&this.$mobx&&ir(this.$mobx),"Invalid `this`"),Te(!this.$mobx.errorHandler,"Only one onErrorHandler can be registered"),this.$mobx.errorHandler=e}function Mt(e){return Wn.globalReactionErrorHandlers.push(e),function(){var t=Wn.globalReactionErrorHandlers.indexOf(e);t>=0&&Wn.globalReactionErrorHandlers.splice(t,1)}}function Nt(){Wn.inBatch>0||Wn.isRunningReactions||rr(Dt)}function Dt(){Wn.isRunningReactions=!0;for(var e=Wn.pendingReactions,t=0;e.length>0;){++t===nr&&(console.error("Reaction doesn't converge to a stable state after "+nr+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction()}Wn.isRunningReactions=!1}function Vt(e){var t=rr;rr=function(n){return e(function(){return t(n)})}}function Bt(e){return je("asReference is deprecated, use observable.ref instead"),Dn.ref(e)}function zt(e){return je("asStructure is deprecated. Use observable.struct, computed.struct or reaction options instead."),Dn.struct(e)}function $t(e){return je("asFlat is deprecated, use observable.shallow instead"),Dn.shallow(e)}function Ut(e){return je("asMap is deprecated, use observable.map or observable.shallowMap instead"),Dn.map(e||{})}function Ht(e){return L(function(t,n,r,i,o){Te(void 0!==o,_("m009")),Te("function"==typeof o.get,_("m010")),ne(Z(t,""),n,o.get,o.set,e,!1)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){this.$mobx.values[e].set(t)},!1,!1)}function Kt(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(!1===ue(e))return!1;if(!e.$mobx.values[t])return!1;var n=Ze(e,t);return An(n)}return An(e)}function Gt(e,t,n,r){return"function"==typeof n?Wt(e,t,n,r):qt(e,t,n)}function qt(e,t,n){return et(e).observe(t,n)}function Wt(e,t,n,r){return et(e,t).observe(n,r)}function Yt(e,t,n){return"function"==typeof n?Ft(e,t,n):Jt(e,t)}function Jt(e,t){return et(e).intercept(t)}function Ft(e,t,n){return et(e,t).intercept(n)}function Xt(e,t){return xt()||console.warn(_("m013")),sr(e,{context:t}).get()}function Qt(e,t,n){function r(r){return t&&n.push([e,r]),r}if(void 0===t&&(t=!0),void 0===n&&(n=[]),ce(e)){if(t&&null===n&&(n=[]),t&&null!==e&&"object"==typeof e)for(var i=0,o=n.length;i<o;i++)if(n[i][0]===e)return n[i][1];if(x(e)){var a=r([]),s=e.map(function(e){return Qt(e,t,n)});a.length=s.length;for(var i=0,o=s.length;i<o;i++)a[i]=s[i];return a}if(ue(e)){var a=r({});for(var u in e)a[u]=Qt(e[u],t,n);return a}if(zn(e)){var c=r({});return e.forEach(function(e,r){return c[r]=Qt(e,t,n)}),c}if(bn(e))return Qt(e.get(),t,n)}return e}function Zt(e,t){Te("function"==typeof e&&e.length<2,"createTransformer expects a function that accepts one argument");var n={},i=Wn.resetId,o=function(i){function o(t,n){var r=i.call(this,function(){return e(n)},void 0,Sn.default,"Transformer-"+e.name+"-"+t,void 0)||this;return r.sourceIdentifier=t,r.sourceObject=n,r}return r(o,i),o.prototype.onBecomeUnobserved=function(){var e=this.value;i.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],t&&t(e,this.sourceObject)},o}(kn);return function(e){i!==Wn.resetId&&(n={},i=Wn.resetId);var t=en(e),r=n[t];return r?r.get():(r=n[t]=new o(t,e),r.get())}}function en(e){if("string"==typeof e||"number"==typeof e)return e;if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object or primitive value, got: "+e);var t=e.$transformId;return void 0===t&&(t=Ae(),De(e,"$transformId",t)),t}function tn(e,t,n){var r;if(zn(e)||x(e)||bn(e))r=et(e);else{if(!ue(e))return Ee("Expected observable map, object or array as first array");if("string"!=typeof t)return Ee("InterceptReads can only be used with a specific property, not with an object in general");r=et(e,t)}return void 0!==r.dehancer?Ee("An intercept reader was already established"):(r.dehancer="function"==typeof t?t:n,function(){r.dehancer=void 0})}n.d(t,"extras",function(){return ur}),n.d(t,"Reaction",function(){return tr}),n.d(t,"untracked",function(){return At}),n.d(t,"IDerivationState",function(){return Qn}),n.d(t,"Atom",function(){return on}),n.d(t,"BaseAtom",function(){return rn}),n.d(t,"useStrict",function(){return E}),n.d(t,"isStrictModeEnabled",function(){return T}),n.d(t,"spy",function(){return p}),n.d(t,"comparer",function(){return Sn}),n.d(t,"asReference",function(){return Bt}),n.d(t,"asFlat",function(){return $t}),n.d(t,"asStructure",function(){return zt}),n.d(t,"asMap",function(){return Ut}),n.d(t,"isModifierDescriptor",function(){return ve}),n.d(t,"isObservableObject",function(){return ue}),n.d(t,"isBoxedObservable",function(){return bn}),n.d(t,"isObservableArray",function(){return x}),n.d(t,"ObservableMap",function(){return Bn}),n.d(t,"isObservableMap",function(){return zn}),n.d(t,"map",function(){return Se}),n.d(t,"transaction",function(){return Oe}),n.d(t,"observable",function(){return Dn}),n.d(t,"computed",function(){return sr}),n.d(t,"isObservable",function(){return ce}),n.d(t,"isComputed",function(){return Kt}),n.d(t,"extendObservable",function(){return de}),n.d(t,"extendShallowObservable",function(){return he}),n.d(t,"observe",function(){return Gt}),n.d(t,"intercept",function(){return Yt}),n.d(t,"autorun",function(){return J}),n.d(t,"autorunAsync",function(){return X}),n.d(t,"when",function(){return F}),n.d(t,"reaction",function(){return Q}),n.d(t,"action",function(){return _n}),n.d(t,"isAction",function(){return V}),n.d(t,"runInAction",function(){return D}),n.d(t,"expr",function(){return Xt}),n.d(t,"toJS",function(){return Qt}),n.d(t,"createTransformer",function(){return Zt}),n.d(t,"whyRun",function(){return Ct}),n.d(t,"trace",function(){return Lt}),n.d(t,"isArrayLike",function(){return He});/*! *****************************************************************************
  Copyright (c) Microsoft Corporation. All rights reserved.
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  this file except in compliance with the License. You may obtain a copy of the
  License at http://www.apache.org/licenses/LICENSE-2.0
  
  THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  MERCHANTABLITY OR NON-INFRINGEMENT.
  
  See the Apache Version 2.0 License for specific language governing permissions
  and limitations under the License.
  ***************************************************************************** */
  var nn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},rn=function(){function e(e){void 0===e&&(e="Atom@"+Ae()),this.name=e,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Qn.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){ft(this)},e.prototype.reportChanged=function(){dt(),pt(this),ht()},e.prototype.toString=function(){return this.name},e}(),on=function(e){function t(t,n,r){void 0===t&&(t="Atom@"+Ae()),void 0===n&&(n=Hn),void 0===r&&(r=Hn);var i=e.call(this,t)||this;return i.name=t,i.onBecomeObservedHandler=n,i.onBecomeUnobservedHandler=r,i.isPendingUnobservation=!1,i.isBeingTracked=!1,i}return r(t,e),t.prototype.reportObserved=function(){return dt(),e.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),ht(),!!Wn.trackingDerivation},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(rn),an=$e("Atom",rn),sn={spyReportEnd:!0},un="__$$iterating",cn=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,!1===e}(),ln=0,dn=function(){function e(){}return e}();!function(e,t){void 0!==Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):void 0!==e.prototype.__proto__?e.prototype.__proto__=t:e.prototype=t}(dn,Array.prototype),Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach(function(e){Object.defineProperty(dn.prototype,e,{configurable:!0,writable:!0,value:Array.prototype[e]})});var hn=function(){function e(e,t,n,r){this.array=n,this.owned=r,this.values=[],this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new rn(e||"ObservableArray@"+Ae()),this.enhancer=function(n,r){return t(n,r,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer?e.map(this.dehancer):e},e.prototype.intercept=function(e){return o(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),u(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray(t,0,n)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>ln&&w(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){var r=this;_t(this.atom);var o=this.values.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:void 0===t||null===t?0:Math.max(0,Math.min(t,o-e)),void 0===n&&(n=[]),i(this)){var s=a(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!s)return $n;t=s.removedCount,n=s.added}n=n.map(function(e){return r.enhancer(e,void 0)});var u=n.length-t;this.updateArrayLength(o,u);var c=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,c),this.dehanceValues(c)},e.prototype.spliceItemsIntoValues=function(e,t,n){if(n.length<1e4)return(i=this.values).splice.apply(i,[e,t].concat(n));var r=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),r;var i},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&l(),i=s(this),o=i||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&h(o),this.atom.reportChanged(),i&&c(this,o),r&&f()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&l(),i=s(this),o=i||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&h(o),this.atom.reportChanged(),i&&c(this,o),r&&f()},e}(),fn=function(e){function t(t,n,r,i){void 0===r&&(r="ObservableArray@"+Ae()),void 0===i&&(i=!1);var o=e.call(this)||this,a=new hn(r,n,o,i);return Ve(o,"$mobx",a),t&&t.length&&o.spliceWithArray(0,0,t),cn&&Object.defineProperty(a.array,"0",pn),o}return r(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),e.map(function(e){return x(e)?e.peek():e}))},t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},t.prototype.toJS=function(){return this.slice()},t.prototype.toJSON=function(){return this.toJS()},t.prototype.peek=function(){return this.$mobx.atom.reportObserved(),this.$mobx.dehanceValues(this.$mobx.values)},t.prototype.find=function(e,t,n){void 0===n&&(n=0);var r=this.findIndex.apply(this,arguments);return-1===r?void 0:this.get(r)},t.prototype.findIndex=function(e,t,n){void 0===n&&(n=0);for(var r=this.peek(),i=r.length,o=n;o<i;o++)if(e.call(t,r[o],o,this))return o;return-1},t.prototype.splice=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,t)}return this.$mobx.spliceWithArray(e,t,n)},t.prototype.spliceWithArray=function(e,t,n){return this.$mobx.spliceWithArray(e,t,n)},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,e),n.values.length},t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},t.prototype.shift=function(){return this.splice(0,1)[0]},t.prototype.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(0,0,e),n.values.length},t.prototype.reverse=function(){var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=this.$mobx.dehanceValues(this.$mobx.values).indexOf(e);return t>-1&&(this.splice(t,1),!0)},t.prototype.move=function(e,t){function n(e){if(e<0)throw new Error("[mobx.array] Index out of bounds: "+e+" is negative");var t=this.$mobx.values.length;if(e>=t)throw new Error("[mobx.array] Index out of bounds: "+e+" is not smaller than "+t)}if(n.call(this,e),n.call(this,t),e!==t){var r,i=this.$mobx.values;r=e<t?i.slice(0,e).concat(i.slice(e+1,t+1),[i[e]],i.slice(t+1)):i.slice(0,t).concat([i[e]],i.slice(t,e),i.slice(e+1)),this.replace(r)}},t.prototype.get=function(e){var t=this.$mobx;if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},t.prototype.set=function(e,t){var n=this.$mobx,r=n.values;if(e<r.length){_t(n.atom);var o=r[e];if(i(n)){var s=a(n,{type:"update",object:this,index:e,newValue:t});if(!s)return;t=s.newValue}t=n.enhancer(t,o);t!==o&&(r[e]=t,n.notifyArrayChildUpdate(e,t,o))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}},t}(dn);g(fn.prototype,function(){return v(this.slice())}),Object.defineProperty(fn.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(e){var t=Array.prototype[e];Te("function"==typeof t,"Base function not defined on Array prototype: '"+e+"'"),De(fn.prototype,e,function(){return t.apply(this.peek(),arguments)})}),function(e,t){for(var n=0;n<t.length;n++)De(e,t[n],e[t[n]])}(fn.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);var pn=b(0);w(1e3);var mn=$e("ObservableArrayAdministration",hn),vn={},gn=function(e){function t(t,n,r,i){void 0===r&&(r="ObservableValue@"+Ae()),void 0===i&&(i=!0);var o=e.call(this,r)||this;return o.enhancer=n,o.hasUnreportedChange=!1,o.dehancer=void 0,o.value=n(t,void 0,r),i&&l()&&d({type:"create",object:o,newValue:o.value}),o}return r(t,e),t.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.prototype.set=function(e){var t=this.value;if((e=this.prepareNewValue(e))!==vn){var n=l();n&&h({type:"update",object:this,newValue:e,oldValue:t}),this.setNewValue(e),n&&f()}},t.prototype.prepareNewValue=function(e){if(_t(this),i(this)){var t=a(this,{object:this,type:"update",newValue:e});if(!t)return vn;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.value!==e?e:vn},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),s(this)&&c(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(e){return o(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),u(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return Ye(this.get())},t}(rn);gn.prototype[We()]=gn.prototype.valueOf;var bn=$e("ObservableValue",gn),yn={m001:"It is not allowed to assign new values to @action fields",m002:"`runInAction` expects a function",m003:"`runInAction` expects a function without arguments",m004:"autorun expects a function",m005:"Warning: attempted to pass an action to autorun. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.",m006:"Warning: attempted to pass an action to autorunAsync. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.",m007:"reaction only accepts 2 or 3 arguments. If migrating from MobX 2, please provide an options object",m008:"wrapping reaction expression in `asReference` is no longer supported, use options object instead",m009:"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.",m010:"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'",m011:"First argument to `computed` should be an expression. If using computed as decorator, don't pass it arguments",m012:"computed takes one or two arguments if used as function",m013:"[mobx.expr] 'expr' should only be used inside other reactive functions.",m014:"extendObservable expected 2 or more arguments",m015:"extendObservable expects an object as first argument",m016:"extendObservable should not be used on maps, use map.merge instead",m017:"all arguments of extendObservable should be objects",m018:"extending an object with another observable (object) is not supported. Please construct an explicit propertymap, using `toJS` if need. See issue #540",m019:"[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.",m020:"modifiers can only be used for individual object properties",m021:"observable expects zero or one arguments",m022:"@observable can not be used on getters, use @computed instead",m024:"whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested its value.",m025:"whyRun can only be used on reactions and computed values",m026:"`action` can only be invoked on functions",m028:"It is not allowed to set `useStrict` when a derivation is running",m029:"INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row",m030a:"Since strict-mode is enabled, changing observed observable values outside actions is not allowed. Please wrap the code in an `action` if this change is intended. Tried to modify: ",m030b:"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, the render function of a React component? Tried to modify: ",m031:"Computed values are not allowed to cause side effects by changing observables that are already being observed. Tried to modify: ",m032:"* This computation is suspended (not in use by any reaction) and won't run automatically.\n\tDidn't expect this computation to be suspended at this point?\n\t  1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n\t  2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).",m033:"`observe` doesn't support the fire immediately property for observable maps.",m034:"`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead",m035:"Cannot make the designated object observable; it is not extensible",m036:"It is not possible to get index atoms from arrays",m037:'Hi there! I\'m sorry you have just run into an exception.\nIf your debugger ends up here, know that some reaction (like the render() of an observer component, autorun or reaction)\nthrew an exception and that mobx caught it, to avoid that it brings the rest of your application down.\nThe original cause of the exception (the code that caused this reaction to run (again)), is still in the stack.\n\nHowever, more interesting is the actual stack trace of the error itself.\nHopefully the error is an instanceof Error, because in that case you can inspect the original stack of the error from where it was thrown.\nSee `error.stack` property, or press the very subtle "(...)" link you see near the console.error message that probably brought you here.\nThat stack is more interesting than the stack of this console.error itself.\n\nIf the exception you see is an exception you created yourself, make sure to use `throw new Error("Oops")` instead of `throw "Oops"`,\nbecause the javascript environment will only preserve the original stack trace in the first form.\n\nYou can also make sure the debugger pauses the next time this very same exception is thrown by enabling "Pause on caught exception".\n(Note that it might pause on many other, unrelated exception as well).\n\nIf that all doesn\'t help you out, feel free to open an issue https://github.com/mobxjs/mobx/issues!\n',m038:"Missing items in this list?\n    1. Check whether all used values are properly marked as observable (use isObservable to verify)\n    2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n"},wn=L(function(e,t,n,r,i){var o=r&&1===r.length?r[0]:n.name||t||"<unnamed action>";De(e,t,_n(o,n))},function(e){return this[e]},function(){Te(!1,_("m001"))},!1,!0),xn=L(function(e,t,n){B(e,t,n)},function(e){return this[e]},function(){Te(!1,_("m001"))},!1,!1),_n=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?O(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?O(e,t):1===arguments.length&&"string"==typeof e?N(e):N(t).apply(null,arguments)};_n.bound=function(e,t,n){if("function"==typeof e){var r=O("<not yet bound action>",e);return r.autoBind=!0,r}return xn.apply(null,arguments)};var On=Object.prototype.toString,Sn={identity:q,structural:W,default:Y},kn=function(){function e(e,t,n,r,i){this.derivation=e,this.scope=t,this.equals=n,this.dependenciesState=Qn.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Qn.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+Ae(),this.value=new er(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Zn.NONE,this.name=r||"ComputedValue@"+Ae(),i&&(this.setter=O(r+"-setter",i))}return e.prototype.onBecomeStale=function(){vt(this)},e.prototype.onBecomeUnobserved=function(){kt(this),this.value=void 0},e.prototype.get=function(){Te(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),0===Wn.inBatch?(dt(),wt(this)&&(this.isTracing!==Zn.NONE&&console.log("[mobx.trace] '"+this.name+"' is being read outside a reactive context and doing a full recompute"),this.value=this.computeValue(!1)),ht()):(ft(this),wt(this)&&this.trackAndCompute()&&mt(this));var e=this.value;if(yt(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(yt(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){Te(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else Te(!1,"[ComputedValue '"+this.name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){l()&&d({object:this.scope,type:"compute",fn:this.derivation});var e=this.value,t=this.dependenciesState===Qn.NOT_TRACKING,n=this.value=this.computeValue(!0);return t||yt(e)||yt(n)||!this.equals(e,n)},e.prototype.computeValue=function(e){this.isComputing=!0,Wn.computationDepth++;var t;if(e)t=Ot(this,this.derivation,this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new er(e)}return Wn.computationDepth--,this.isComputing=!1,t},e.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return J(function(){var o=n.get();if(!r||t){var a=Et();e({type:"update",object:n,newValue:o,oldValue:i}),Tt(a)}r=!1,i=o})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return Ye(this.get())},e.prototype.whyRun=function(){var e=Boolean(Wn.trackingDerivation),t=Ce(this.isComputing?this.newObserving:this.observing).map(function(e){return e.name}),n=Ce(st(this).map(function(e){return e.name}));return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+(e?"[active] the value of this computation is needed by a reaction":this.isComputing?"[get] The value of this computed was requested outside a reaction":"[idle] not running at the moment")+"\n"+(this.dependenciesState===Qn.NOT_TRACKING?_("m032"):" * This computation will re-run if any of the following observables changes:\n    "+Le(t)+"\n    "+(this.isComputing&&e?" (... or any observable accessed during the remainder of the current run)":"")+"\n    "+_("m038")+"\n\n  * If the outcome of this computation changes, the following observers will be re-run:\n    "+Le(n)+"\n")},e}();kn.prototype[We()]=kn.prototype.valueOf;var An=$e("ComputedValue",kn),En=function(){function e(e,t){this.target=e,this.name=t,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,t){return Te(!0!==t,"`observe` doesn't support the fire immediately property for observable objects."),u(this,e)},e.prototype.intercept=function(e){return o(this,e)},e}(),Tn={},jn={},In=$e("ObservableObjectAdministration",En),Cn=le(be),Ln=le(ye),Rn=le(we),Pn=le(xe),Mn=le(_e),Nn={box:function(e,t){return arguments.length>2&&me("box"),new gn(e,be,t)},shallowBox:function(e,t){return arguments.length>2&&me("shallowBox"),new gn(e,we,t)},array:function(e,t){return arguments.length>2&&me("array"),new fn(e,be,t)},shallowArray:function(e,t){return arguments.length>2&&me("shallowArray"),new fn(e,we,t)},map:function(e,t){return arguments.length>2&&me("map"),new Bn(e,be,t)},shallowMap:function(e,t){return arguments.length>2&&me("shallowMap"),new Bn(e,we,t)},object:function(e,t){arguments.length>2&&me("object");var n={};return Z(n,t),de(n,e),n},shallowObject:function(e,t){arguments.length>2&&me("shallowObject");var n={};return Z(n,t),he(n,e),n},ref:function(){return arguments.length<2?ge(we,arguments[0]):Rn.apply(null,arguments)},shallow:function(){return arguments.length<2?ge(ye,arguments[0]):Ln.apply(null,arguments)},deep:function(){return arguments.length<2?ge(be,arguments[0]):Cn.apply(null,arguments)},struct:function(){return arguments.length<2?ge(xe,arguments[0]):Pn.apply(null,arguments)}},Dn=pe;Object.keys(Nn).forEach(function(e){return Dn[e]=Nn[e]}),Dn.deep.struct=Dn.struct,Dn.ref.struct=function(){return arguments.length<2?ge(_e,arguments[0]):Mn.apply(null,arguments)};var Vn={},Bn=function(){function e(e,t,n){void 0===t&&(t=be),void 0===n&&(n="ObservableMap@"+Ae()),this.enhancer=t,this.name=n,this.$mobx=Vn,this._data=Object.create(null),this._hasMap=Object.create(null),this._keys=new fn(void 0,we,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this.dehancer=void 0,this.merge(e)}return e.prototype._has=function(e){return void 0!==this._data[e]},e.prototype.has=function(e){return!!this.isValidKey(e)&&(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get())},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(i(this)){var r=a(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,i(this)){var n=a(this,{type:"delete",object:this,name:e});if(!n)return!1}if(this._has(e)){var r=l(),o=s(this),n=o||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;return r&&h(n),Oe(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1),t._data[e].setNewValue(void 0),t._data[e]=void 0}),o&&c(this,n),r&&f(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new gn(t,we,this.name+"."+e+"?",!1),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if((t=n.prepareNewValue(t))!==vn){var r=l(),i=s(this),o=i||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&h(o),n.setNewValue(t),i&&c(this,o),r&&f()}},e.prototype._addValue=function(e,t){var n=this;Oe(function(){var r=n._data[e]=new gn(t,n.enhancer,n.name+"."+e,!1);t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)});var r=l(),i=s(this),o=i||r?{type:"add",object:this,name:e,newValue:t}:null;r&&h(o),i&&c(this,o),r&&f()},e.prototype.get=function(e){return e=""+e,this.has(e)?this.dehanceValue(this._data[e].get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return v(this._keys.slice())},e.prototype.values=function(){return v(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return v(this._keys.map(function(t){return[t,e.get(t)]}))},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r,n)})},e.prototype.merge=function(e){var t=this;return zn(e)&&(e=e.toJS()),Oe(function(){Pe(e)?Object.keys(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)}):Ke(e)?e.forEach(function(e,n){return t.set(n,e)}):null!==e&&void 0!==e&&Ee("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;Oe(function(){At(function(){e.keys().forEach(e.delete,e)})})},e.prototype.replace=function(e){var t=this;return Oe(function(){var n=Ge(e);t.keys().filter(function(e){return-1===n.indexOf(e)}).forEach(function(e){return t.delete(e)}),t.merge(e)}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJS=function(){var e=this,t={};return this.keys().forEach(function(n){return t[n]=e.get(n)}),t},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null!==e&&void 0!==e&&("string"==typeof e||"number"==typeof e||"boolean"==typeof e)},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"', only strings, numbers and booleans are accepted as key in observable maps.")},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return Te(!0!==t,_("m033")),u(this,e)},e.prototype.intercept=function(e){return o(this,e)},e}();g(Bn.prototype,function(){return this.entries()});var zn=$e("ObservableMap",Bn),$n=[];Object.freeze($n);var Un=[],Hn=function(){},Kn=Object.prototype.hasOwnProperty,Gn=["mobxGuid","resetId","spyListeners","strictMode","runId"],qn=function(){function e(){this.version=5,this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[],this.globalReactionErrorHandlers=[]}return e}(),Wn=new qn,Yn=!1,Jn=!1,Fn=!1,Xn=ke();Xn.__mobxInstanceCount?(Xn.__mobxInstanceCount++,setTimeout(function(){Yn||Jn||Fn||(Fn=!0,console.warn("[mobx] Warning: there are multiple mobx instances active. This might lead to unexpected results. See https://github.com/mobxjs/mobx/issues/1082 for details."))},1)):Xn.__mobxInstanceCount=1;var Qn;!function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(Qn||(Qn={}));var Zn;!function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Zn||(Zn={}));var er=function(){function e(e){this.cause=e}return e}(),tr=function(){function e(e,t){void 0===e&&(e="Reaction@"+Ae()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=Qn.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+Ae(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Zn.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Wn.pendingReactions.push(this),Nt())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(dt(),this._isScheduled=!1,wt(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&l()&&d({object:this,type:"scheduled-reaction"})),ht())},e.prototype.track=function(e){dt();var t,n=l();n&&(t=Date.now(),h({object:this,type:"reaction",fn:e})),this._isRunning=!0;var r=Ot(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&kt(this),yt(r)&&this.reportExceptionInDerivation(r.cause),n&&f({time:Date.now()-t}),ht()},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)return void this.errorHandler(e,this);var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this,r=_("m037");console.error(n||r,e),l()&&d({type:"error",message:n,error:e,object:this}),Wn.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(dt(),kt(this),ht()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e.onError=Pt,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.whyRun=function(){var e=Ce(this._isRunning?this.newObserving:this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n    "+Le(e)+"\n    "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\t"+_("m038")+"\n"},e.prototype.trace=function(e){void 0===e&&(e=!1),Lt(this,e)},e}(),nr=100,rr=function(e){return e()},ir=$e("Reaction",tr),or=Ht(Sn.default),ar=Ht(Sn.structural),sr=function(e,t,n){if("string"==typeof t)return or.apply(null,arguments);Te("function"==typeof e,_("m011")),Te(arguments.length<3,_("m012"));var r="object"==typeof t?t:{};r.setter="function"==typeof t?t:r.setter;var i=r.equals?r.equals:r.compareStructural||r.struct?Sn.structural:Sn.default;return new kn(e,r.context,i,r.name||e.name||"",r.setter)};sr.struct=ar,sr.equals=Ht;var ur={allowStateChanges:j,deepEqual:z,getAtom:Ze,getDebugName:tt,getDependencyTree:nt,getAdministration:et,getGlobalState:Xe,getObserverTree:it,interceptReads:tn,isComputingDerivation:xt,isSpyEnabled:l,onReactionError:Mt,reserveArrayBuffer:w,resetGlobalState:Qe,isolateGlobalState:Je,shareGlobalState:Fe,spyReport:d,spyReportEnd:f,spyReportStart:h,setReactionScheduler:Vt},cr={Reaction:tr,untracked:At,Atom:on,BaseAtom:rn,useStrict:E,isStrictModeEnabled:T,spy:p,comparer:Sn,asReference:Bt,asFlat:$t,asStructure:zt,asMap:Ut,isModifierDescriptor:ve,isObservableObject:ue,isBoxedObservable:bn,isObservableArray:x,ObservableMap:Bn,isObservableMap:zn,map:Se,transaction:Oe,observable:Dn,computed:sr,isObservable:ce,isComputed:Kt,extendObservable:de,extendShallowObservable:he,observe:Gt,intercept:Yt,autorun:J,autorunAsync:X,when:F,reaction:Q,action:_n,isAction:V,runInAction:D,expr:Xt,toJS:Qt,createTransformer:Zt,whyRun:Ct,isArrayLike:He,extras:ur},lr=!1;for(var dr in cr)!function(e){var t=cr[e];Object.defineProperty(cr,e,{get:function(){return lr||(lr=!0,console.warn("Using default export (`import mobx from 'mobx'`) is deprecated and won’t work in mobx@4.0.0\nUse `import * as mobx from 'mobx'` instead")),t}})}(dr);"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:p,extras:ur}),t.default=cr}.call(t,n(5))},function(e,exports){var t;t=function(){return this}();try{t=t||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(t=window)}e.exports=t},function(e,exports,t){"use strict";function n(e,t){var n=e.meta,r=e.user,i=e.reactions,o=document.createElement("div");o.lang="zh-CN",o.className="gitm-container gitm-header-container";var a=document.createElement("span"),s=i.find(function(e){return"heart"===e.content&&e.user.login===r.login});a.className="gitm-header-like-btn",a.innerHTML="\n    "+u.heart+"\n    "+(s?"已喜欢":"喜欢")+"\n    "+(n.reactions&&n.reactions.heart?" • <strong>"+n.reactions.heart+"</strong> 人喜欢过":"")+"\n  ",s?(a.classList.add("liked"),a.onclick=function(){return t.unlike()}):(a.classList.remove("liked"),a.onclick=function(){return t.like()}),o.appendChild(a);var c=document.createElement("span");return c.innerHTML="\n    "+(n.comments?" • <strong>"+n.comments+"</strong> 条评论":"")+"\n  ",o.appendChild(c),o}function r(e,t){var n=e.meta,r=e.comments,i=e.commentReactions,o=e.currentPage,a=e.user,s=e.error,l=document.createElement("div");if(l.lang="zh-CN",l.className="gitm-container gitm-comments-container",s){var d=document.createElement("div");if(d.className="gitm-comments-error",s===c.NOT_INITIALIZED_ERROR&&a.login&&a.login.toLowerCase()===t.owner.toLowerCase()){var h=document.createElement("div"),f=document.createElement("button");f.className="gitm-comments-init-btn",f.onclick=function(){f.setAttribute("disabled",!0),t.init().catch(function(e){f.removeAttribute("disabled"),alert(e)})},f.innerText="数据初始化",h.appendChild(f),d.appendChild(h)}else d.innerText=s;return l.appendChild(d),l}if(void 0===r){var p=document.createElement("div");return p.innerText="加载中...",p.className="gitm-comments-loading",l.appendChild(p),l}if(!r.length){var m=document.createElement("div");return m.className="gitm-comments-empty",m.innerText="暂无数据",l.appendChild(m),l}var v=document.createElement("ul");if(v.className="gitm-comments-list",r.forEach(function(e){var n=new Date(e.created_at),r=new Date(e.updated_at),o=document.createElement("li");o.className="gitm-comment",o.innerHTML='\n      <a class="gitm-comment-avatar" href="'+e.user.html_url+'" target="_blank">\n        <img class="gitm-comment-avatar-img" src="'+e.user.avatar_url+'"/>\n      </a>\n      <div class="gitm-comment-main">\n        <div class="gitm-comment-header">\n          <a class="gitm-comment-name" href="'+e.user.html_url+'" target="_blank">\n            '+e.user.login+'\n          </a>\n          <span title="'+n+'">'+n.toLocaleString()+"</span>\n          "+(n.toString()!==r.toString()?' • <span title="comment was edited at '+r+'">编辑</span>':"")+'\n          <div class="gitm-comment-like-btn">'+u.heart+" "+(e.reactions.heart||"")+'</div>\n        </div>\n        <div class="gitm-comment-body gitm-markdown">'+e.body_html+"</div>\n      </div>\n    ";var s=o.querySelector(".gitm-comment-like-btn");i[e.id]&&i[e.id].find(function(e){return"heart"===e.content&&e.user.login===a.login})?(s.classList.add("liked"),s.onclick=function(){return t.unlikeAComment(e.id)}):(s.classList.remove("liked"),s.onclick=function(){return t.likeAComment(e.id)});var c=document.createElement("img"),l=o.querySelector(".gitm-comment-body");c.className="gitm-hidden",c.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",c.onload=function(){l.clientHeight>t.maxCommentHeight&&(l.classList.add("gitm-comment-body-folded"),l.style.maxHeight=t.maxCommentHeight+"px",l.title="点击展开",l.onclick=function(){l.classList.remove("gitm-comment-body-folded"),l.style.maxHeight="",l.title="",l.onclick=null})},o.appendChild(c),v.appendChild(o)}),l.appendChild(v),n){var g=Math.ceil(n.comments/t.perPage);if(g>1){var b=document.createElement("ul");if(b.className="gitm-comments-pagination",o>1){var y=document.createElement("li");y.className="gitm-comments-page-item",y.innerText="上一条",y.onclick=function(){return t.goto(o-1)},b.appendChild(y)}for(var w=1;w<=g;w++)!function(e){var n=document.createElement("li");n.className="gitm-comments-page-item",n.innerText=e,n.onclick=function(){return t.goto(e)},o===e&&n.classList.add("gitm-selected"),b.appendChild(n)}(w);if(o<g){var x=document.createElement("li");x.className="gitm-comments-page-item",x.innerText="下一条",x.onclick=function(){return t.goto(o+1)},b.appendChild(x)}l.appendChild(b)}}return l}function i(e,t){var n=e.user,r=e.error,i=document.createElement("div");i.lang="zh-CN",i.className="gitm-container gitm-editor-container";var o=n.login&&!r?"":"disabled",a=n.login?"":"登录后评论";i.innerHTML="\n      "+(n.login?'<a class="gitm-editor-avatar" href="'+n.html_url+'" target="_blank">\n            <img class="gitm-editor-avatar-img" src="'+n.avatar_url+'"/>\n          </a>':n.isLoggingIn?'<div class="gitm-editor-avatar">'+u.spinner+"</div>":'<a class="gitm-editor-avatar" href="'+t.loginLink+'" title="login with GitHub">\n              '+u.github+"\n            </a>")+'\n    </a>\n    <div class="gitm-editor-main">\n      <div class="gitm-editor-header">\n        <nav class="gitm-editor-tabs">\n          <button class="gitm-editor-tab gitm-selected">输入</button>\n          <button class="gitm-editor-tab">预览</button>\n        </nav>\n        <div class="gitm-editor-login">\n          '+(n.login?'<a class="gitm-editor-logout-link">退出</a>':n.isLoggingIn?"登录中...":'<a class="gitm-editor-login-link" href="'+t.loginLink+'">登录</a>')+'\n        </div>\n      </div>\n      <div class="gitm-editor-body">\n        <div class="gitm-editor-write-field">\n          <textarea placeholder="写评论" title="'+a+'" '+o+'></textarea>\n        </div>\n        <div class="gitm-editor-preview-field gitm-hidden">\n          <div class="gitm-editor-preview gitm-markdown"></div>\n        </div>\n      </div>\n    </div>\n    <div class="gitm-editor-footer">\n      <a class="gitment-editor-footer-tip" href="https://guides.github.com/features/mastering-markdown/" target="_blank">\n        支持"Markdown"语法格式\n      </a>\n      <button class="gitm-editor-submit" title="'+a+'" '+o+">提交</button>\n    </div>\n  ",n.login&&(i.querySelector(".gitm-editor-logout-link").onclick=function(){return t.logout()});var c=i.querySelector(".gitm-editor-write-field"),l=i.querySelector(".gitm-editor-preview-field"),d=c.querySelector("textarea");d.oninput=function(){d.style.height="auto";var e=window.getComputedStyle(d,null),t=parseInt(e.height,10),n=d.clientHeight,r=d.scrollHeight;n<r&&(d.style.height=t+r-n+"px")};var h=i.querySelectorAll(".gitm-editor-tab"),f=s(h,2),p=f[0],m=f[1];p.onclick=function(){p.classList.add("gitm-selected"),m.classList.remove("gitm-selected"),c.classList.remove("gitm-hidden"),l.classList.add("gitm-hidden"),d.focus()},m.onclick=function(){m.classList.add("gitm-selected"),p.classList.remove("gitm-selected"),l.classList.remove("gitm-hidden"),c.classList.add("gitm-hidden");var e=l.querySelector(".gitm-editor-preview"),n=d.value.trim();if(!n)return void(e.innerText="");e.innerText="加载中...",t.markdown(n).then(function(t){return e.innerHTML=t})};var v=i.querySelector(".gitm-editor-submit");return v.onclick=function(){v.innerText="提交中...",v.setAttribute("disabled",!0),t.post(d.value.trim()).then(function(e){d.value="",d.style.height="auto",v.removeAttribute("disabled"),v.innerText="提交"}).catch(function(e){alert(e),v.removeAttribute("disabled"),v.innerText="提交"})},i}function o(){}function a(e,t){var n=document.createElement("div");return n.lang="zh-CN",n.className="gitm-container gitm-root-container",n.appendChild(t.renderHeader(e,t)),n.appendChild(t.renderComments(e,t)),n.appendChild(t.renderEditor(e,t)),n}Object.defineProperty(exports,"__esModule",{value:!0});var s=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=t(7),c=t(0);exports.default={render:a,renderHeader:n,renderComments:r,renderEditor:i,renderFooter:o}},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.close='<svg class="gitment-close-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><path d="M37.304 11.282l1.414 1.414-26.022 26.02-1.414-1.413z"/><path d="M12.696 11.282l26.022 26.02-1.414 1.415-26.022-26.02z"/></svg>',exports.github='<svg class="gitment-github-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><path d="M25 10c-8.3 0-15 6.7-15 15 0 6.6 4.3 12.2 10.3 14.2.8.1 1-.3 1-.7v-2.6c-4.2.9-5.1-2-5.1-2-.7-1.7-1.7-2.2-1.7-2.2-1.4-.9.1-.9.1-.9 1.5.1 2.3 1.5 2.3 1.5 1.3 2.3 3.5 1.6 4.4 1.2.1-1 .5-1.6 1-2-3.3-.4-6.8-1.7-6.8-7.4 0-1.6.6-3 1.5-4-.2-.4-.7-1.9.1-4 0 0 1.3-.4 4.1 1.5 1.2-.3 2.5-.5 3.8-.5 1.3 0 2.6.2 3.8.5 2.9-1.9 4.1-1.5 4.1-1.5.8 2.1.3 3.6.1 4 1 1 1.5 2.4 1.5 4 0 5.8-3.5 7-6.8 7.4.5.5 1 1.4 1 2.8v4.1c0 .4.3.9 1 .7 6-2 10.2-7.6 10.2-14.2C40 16.7 33.3 10 25 10z"/></svg>',exports.heart='<svg class="gitment-heart-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><path d="M25 39.7l-.6-.5C11.5 28.7 8 25 8 19c0-5 4-9 9-9 4.1 0 6.4 2.3 8 4.1 1.6-1.8 3.9-4.1 8-4.1 5 0 9 4 9 9 0 6-3.5 9.7-16.4 20.2l-.6.5zM17 12c-3.9 0-7 3.1-7 7 0 5.1 3.2 8.5 15 18.1 11.8-9.6 15-13 15-18.1 0-3.9-3.1-7-7-7-3.5 0-5.4 2.1-6.9 3.8L25 17.1l-1.1-1.3C22.4 14.1 20.5 12 17 12z"/></svg>',exports.spinner='<svg class="gitment-spinner-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><path d="M25 18c-.6 0-1-.4-1-1V9c0-.6.4-1 1-1s1 .4 1 1v8c0 .6-.4 1-1 1z"/><path opacity=".3" d="M25 42c-.6 0-1-.4-1-1v-8c0-.6.4-1 1-1s1 .4 1 1v8c0 .6-.4 1-1 1z"/><path opacity=".3" d="M29 19c-.2 0-.3 0-.5-.1-.4-.3-.6-.8-.3-1.3l4-6.9c.3-.4.8-.6 1.3-.3.4.3.6.8.3 1.3l-4 6.9c-.2.2-.5.4-.8.4z"/><path opacity=".3" d="M17 39.8c-.2 0-.3 0-.5-.1-.4-.3-.6-.8-.3-1.3l4-6.9c.3-.4.8-.6 1.3-.3.4.3.6.8.3 1.3l-4 6.9c-.2.2-.5.4-.8.4z"/><path opacity=".93" d="M21 19c-.3 0-.6-.2-.8-.5l-4-6.9c-.3-.4-.1-1 .3-1.3.4-.3 1-.1 1.3.3l4 6.9c.3.4.1 1-.3 1.3-.2.2-.3.2-.5.2z"/><path opacity=".3" d="M33 39.8c-.3 0-.6-.2-.8-.5l-4-6.9c-.3-.4-.1-1 .3-1.3.4-.3 1-.1 1.3.3l4 6.9c.3.4.1 1-.3 1.3-.2.1-.3.2-.5.2z"/><path opacity=".65" d="M17 26H9c-.6 0-1-.4-1-1s.4-1 1-1h8c.6 0 1 .4 1 1s-.4 1-1 1z"/><path opacity=".3" d="M41 26h-8c-.6 0-1-.4-1-1s.4-1 1-1h8c.6 0 1 .4 1 1s-.4 1-1 1z"/><path opacity=".86" d="M18.1 21.9c-.2 0-.3 0-.5-.1l-6.9-4c-.4-.3-.6-.8-.3-1.3.3-.4.8-.6 1.3-.3l6.9 4c.4.3.6.8.3 1.3-.2.3-.5.4-.8.4z"/><path opacity=".3" d="M38.9 33.9c-.2 0-.3 0-.5-.1l-6.9-4c-.4-.3-.6-.8-.3-1.3.3-.4.8-.6 1.3-.3l6.9 4c.4.3.6.8.3 1.3-.2.3-.5.4-.8.4z"/><path opacity=".44" d="M11.1 33.9c-.3 0-.6-.2-.8-.5-.3-.4-.1-1 .3-1.3l6.9-4c.4-.3 1-.1 1.3.3.3.4.1 1-.3 1.3l-6.9 4c-.1.2-.3.2-.5.2z"/><path opacity=".3" d="M31.9 21.9c-.3 0-.6-.2-.8-.5-.3-.4-.1-1 .3-1.3l6.9-4c.4-.3 1-.1 1.3.3.3.4.1 1-.3 1.3l-6.9 4c-.2.2-.3.2-.5.2z"/></svg>'}]);