hugo-theme-even/static/lib/gitment/gitment-0.0.3.min.js

1 line
73 KiB
JavaScript
Raw Normal View History

2018-03-11 06:47:13 +00:00
var Gitment=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={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},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=5)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.LS_ACCESS_TOKEN_KEY="gitment-comments-token",t.LS_USER_KEY="gitment-user-info",t.NOT_INITIALIZED_ERROR=new Error("Comments Not Initialized")},function(e,t,n){"use strict";(function(n){function r(e){return function(t,n,r){return r&&"function"==typeof r.value?(r.value=V(e,r.value),r.enumerable=!1,r.configurable=!0,r):Kt(e).apply(this,arguments)}}function i(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 wt("function"==typeof i,vt("m002")),wt(0===i.length,vt("m003")),wt("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),z(r,i,o,void 0)}function o(e){return"function"==typeof e&&!0===e.isMobxAction}function a(e,t,n){var r=function(){return z(t,n,e,arguments)};r.isMobxAction=!0,Ct(e,t,r)}function s(e,t,n){function r(){a(u)}var i,a,s;"string"==typeof e?(i=e,a=t,s=n):(i=e.name||"Autorun@"+bt(),a=e,s=t),wt("function"==typeof a,vt("m004")),wt(!1===o(a),vt("m005")),s&&(a=a.bind(s));var u=new fn(i,function(){this.track(r)});return u.schedule(),u.getDisposer()}function u(e,t,n,r){var i,o,a,u;return"string"==typeof e?(i=e,o=t,a=n,u=r):(i="When@"+bt(),o=e,a=t,u=n),s(i,function(e){if(o.call(u)){e.dispose();var t=te();a.call(u),ne(t)}})}function c(e,t,n,r){function i(){s(h)}var a,s,u,c;"string"==typeof e?(a=e,s=t,u=n,c=r):(a=e.name||"AutorunAsync@"+bt(),s=e,u=t,c=n),wt(!1===o(s),vt("m006")),void 0===u&&(u=1),c&&(s=s.bind(c));var l=!1,h=new fn(a,function(){l||(l=!0,setTimeout(function(){l=!1,h.isDisposed||h.track(i)},u))});return h.schedule(),h.getDisposer()}function l(e,t,n){function r(){if(!u.isDisposed){var n=!1;u.track(function(){var t=e(u);n=Tt(i.compareStructural,o,t),o=t}),a&&i.fireImmediately&&t(o,u),a||!0!==n||t(o,u),a&&(a=!1)}}arguments.length>3&&yt(vt("m007")),Ve(e)&&yt(vt("m008"));var i;i="object"===(void 0===n?"undefined":Ut(n))?n:{},i.name=i.name||e.name||t.name||"Reaction@"+bt(),i.fireImmediately=!0===n||!0===i.fireImmediately,i.delay=i.delay||0,i.compareStructural=i.compareStructural||i.struct||!1,t=Yt(i.name,i.context?t.bind(i.context):t),i.context&&(e=e.bind(i.context));var o,a=!0,s=!1,u=new fn(i.name,function(){a||i.delay<1?r():s||(s=!0,setTimeout(function(){s=!1,r()},i.delay))});return u.schedule(),u.getDisposer()}function h(e){return ct(function(t,n,r,i,o){wt(void 0!==o,vt("m009")),wt("function"==typeof o.get,vt("m010")),Ze(Fe(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 d(e,t){wt("function"==typeof e&&e.length<2,"createTransformer expects a function that accepts one argument");var n={},r=pn.resetId,i=function(r){function i(t,n){var i=r.call(this,function(){return e(n)},void 0,!1,"Transformer-"+e.name+"-"+t,void 0)||this;return i.sourceIdentifier=t,i.sourceObject=n,i}return Ht(i,r),i.prototype.onBecomeUnobserved=function(){var e=this.value;r.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],t&&t(e,this.sourceObject)},i}(sn);return function(e){r!==pn.resetId&&(n={},r=pn.resetId);var t=p(e),o=n[t];return o?o.get():(o=n[t]=new i(t,e),o.get())}}function p(e){if("string"==typeof e||"number"==typeof e)return e;if(null===e||"object"!==(void 0===e?"undefined":Ut(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=bt(),Ct(e,"$transformId",t)),t}function f(e,t){return J()||console.warn(vt("m013")),Jt(e,{context:t}).get()}function m(e){f