mixit/compiler/dist/mastodon/main.js

1 line
41 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!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}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="",n(n.s=81)}([function(t,e,n){var r=n(19)("wks"),o=n(13),i=n(1).Symbol,s="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=s&&i[t]||(s?i:o)("Symbol."+t))}).store=r},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){t.exports=!n(3)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(5),o=n(36),i=n(17),s=Object.defineProperty;e.f=n(2)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(8);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(4),o=n(18);t.exports=n(2)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(1),o=n(7),i=n(6),s=n(13)("src"),a=n(49),u=(""+a).split("toString");n(12).inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,n,a){var c="function"==typeof n;c&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(c&&(i(n,s)||o(n,s,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:a?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[s]||a.call(this)})},function(t,e,n){var r=n(52),o=n(16);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(1),o=n(12),i=n(7),s=n(9),a=n(38),u=function(t,e,n){var c,l,f,p,v=t&u.F,h=t&u.G,d=t&u.S,y=t&u.P,g=t&u.B,m=h?r:d?r[e]||(r[e]={}):(r[e]||{}).prototype,_=h?o:o[e]||(o[e]={}),b=_.prototype||(_.prototype={});for(c in h&&(n=e),n)f=((l=!v&&m&&void 0!==m[c])?m:n)[c],p=g&&l?a(f,r):y&&"function"==typeof f?a(Function.call,f):f,m&&s(m,c,f,t&u.U),_[c]!=f&&i(_,c,p),y&&b[c]!=f&&(b[c]=f)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(42),o=n(26);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(8);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(12),o=n(1),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(20)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!1},function(t,e,n){"use strict";var r=n(1),o=n(6),i=n(15),s=n(65),a=n(17),u=n(3),c=n(29).f,l=n(30).f,f=n(4).f,p=n(67).trim,v=r.Number,h=v,d=v.prototype,y="Number"==i(n(28)(d)),g="trim"in String.prototype,m=function(t){var e=a(t,!1);if("string"==typeof e&&e.length>2){var n,r,o,i=(e=g?e.trim():p(e,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var s,u=e.slice(2),c=0,l=u.length;c<l;c++)if((s=u.charCodeAt(c))<48||s>o)return NaN;return parseInt(u,r)}}return+e};if(!v(" 0o1")||!v("0b1")||v("+0x1")){v=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof v&&(y?u(function(){d.valueOf.call(n)}):"Number"!=i(n))?s(new h(m(e)),n,v):m(e)};for(var _,b=n(2)?c(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;b.length>x;x++)o(h,_=b[x])&&!o(v,_)&&f(v,_,l(h,_));v.prototype=d,d.constructor=v,n(9)(r,"Number",v)}},function(t,e,n){"use strict";var r=n(1),o=n(6),i=n(2),s=n(11),a=n(9),u=n(50).KEY,c=n(3),l=n(19),f=n(23),p=n(13),v=n(0),h=n(40),d=n(41),y=n(51),g=n(55),m=n(5),_=n(8),b=n(10),x=n(17),w=n(18),S=n(28),k=n(58),O=n(30),C=n(4),E=n(14),M=O.f,j=C.f,P=k.f,N=r.Symbol,T=r.JSON,A=T&&T.stringify,I=v("_hidden"),R=v("toPrimitive"),L={}.propertyIsEnumerable,K=l("symbol-registry"),D=l("symbols"),F=l("op-symbols"),$=Object.prototype,B="function"==typeof N,V=r.QObject,G=!V||!V.prototype||!V.prototype.findChild,H=i&&c(function(){return 7!=S(j({},"a",{get:function(){return j(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=M($,e);r&&delete $[e],j(t,e,n),r&&t!==$&&j($,e,r)}:j,U=function(t){var e=D[t]=S(N.prototype);return e._k=t,e},z=B&&"symbol"==typeof N.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof N},J=function(t,e,n){return t===$&&J(F,e,n),m(t),e=x(e,!0),m(n),o(D,e)?(n.enumerable?(o(t,I)&&t[I][e]&&(t[I][e]=!1),n=S(n,{enumerable:w(0,!1)})):(o(t,I)||j(t,I,w(1,{})),t[I][e]=!0),H(t,e,n)):j(t,e,n)},W=function(t,e){m(t);for(var n,r=y(e=b(e)),o=0,i=r.length;i>o;)J(t,n=r[o++],e[n]);return t},X=function(t){var e=L.call(this,t=x(t,!0));return!(this===$&&o(D,t)&&!o(F,t))&&(!(e||!o(this,t)||!o(D,t)||o(this,I)&&this[I][t])||e)},Y=function(t,e){if(t=b(t),e=x(e,!0),t!==$||!o(D,e)||o(F,e)){var n=M(t,e);return!n||!o(D,e)||o(t,I)&&t[I][e]||(n.enumerable=!0),n}},q=function(t){for(var e,n=P(b(t)),r=[],i=0;n.length>i;)o(D,e=n[i++])||e==I||e==u||r.push(e);return r},Q=function(t){for(var e,n=t===$,r=P(n?F:b(t)),i=[],s=0;r.length>s;)!o(D,e=r[s++])||n&&!o($,e)||i.push(D[e]);return i};B||(a((N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===$&&e.call(F,n),o(this,I)&&o(this[I],t)&&(this[I][t]=!1),H(this,t,w(1,n))};return i&&G&&H($,t,{configurable:!0,set:e}),U(t)}).prototype,"toString",function(){return this._k}),O.f=Y,C.f=J,n(29).f=k.f=q,n(27).f=X,n(44).f=Q,i&&!n(20)&&a($,"propertyIsEnumerable",X,!0),h.f=function(t){return U(v(t))}),s(s.G+s.W+s.F*!B,{Symbol:N});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Z.length>tt;)v(Z[tt++]);for(var et=E(v.store),nt=0;et.length>nt;)d(et[nt++]);s(s.S+s.F*!B,"Symbol",{for:function(t){return o(K,t+="")?K[t]:K[t]=N(t)},keyFor:function(t){if(!z(t))throw TypeError(t+" is not a symbol!");for(var e in K)if(K[e]===t)return e},useSetter:function(){G=!0},useSimple:function(){G=!1}}),s(s.S+s.F*!B,"Object",{create:function(t,e){return void 0===e?S(t):W(S(t),e)},defineProperty:J,defineProperties:W,getOwnPropertyDescriptor:Y,getOwnPropertyNames:q,getOwnPropertySymbols:Q}),T&&s(s.S+s.F*(!B||c(function(){var t=N();return"[null]"!=A([t])||"{}"!=A({a:t})||"{}"!=A(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(_(e)||void 0!==t)&&!z(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!z(e))return e}),r[1]=e,A.apply(T,r)}}),N.prototype[R]||n(7)(N.prototype,R,N.prototype.valueOf),f(N,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e,n){var r=n(4).f,o=n(6),i=n(0)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(19)("keys"),o=n(13);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(5),o=n(56),i=n(26),s=n(25)("IE_PROTO"),a=function(){},u=function(){var t,e=n(37)("iframe"),r=i.length;for(e.style.display="none",n(57).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=r(t),n=new a,a.prototype=null,n[s]=t):n=u(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(42),o=n(26).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(27),o=n(18),i=n(10),s=n(17),a=n(6),u=n(36),c=Object.getOwnPropertyDescriptor;e.f=n(2)?c:function(t,e){if(t=i(t),e=s(e,!0),u)try{return c(t,e)}catch(t){}if(a(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){for(var r=n(32),o=n(14),i=n(9),s=n(1),a=n(7),u=n(33),c=n(0),l=c("iterator"),f=c("toStringTag"),p=u.Array,v={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(v),d=0;d<h.length;d++){var y,g=h[d],m=v[g],_=s[g],b=_&&_.prototype;if(b&&(b[l]||a(b,l,p),b[f]||a(b,f,g),u[g]=p,m))for(y in r)b[y]||i(b,y,r[y],!0)}},function(t,e,n){"use strict";var r=n(59),o=n(60),i=n(33),s=n(10);t.exports=n(61)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports={}},function(t,e,n){"use strict";var r=n(5);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var r,o,i=n(34),s=RegExp.prototype.exec,a=String.prototype.replace,u=s,c=(r=/a/,o=/b*/g,s.call(r,"a"),s.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),l=void 0!==/()??/.exec("")[1];(c||l)&&(u=function(t){var e,n,r,o,u=this;return l&&(n=new RegExp("^"+u.source+"$(?!\\s)",i.call(u))),c&&(e=u.lastIndex),r=s.call(u,t),c&&r&&(u.lastIndex=u.global?r.index+r[0].length:e),l&&r&&r.length>1&&a.call(r[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)}),r}),t.exports=u},function(t,e,n){t.exports=!n(2)&&!n(3)(function(){return 7!=Object.defineProperty(n(37)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(8),o=n(1).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(39);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){e.f=n(0)},function(t,e,n){var r=n(1),o=n(12),i=n(20),s=n(40),a=n(4).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e,n){var r=n(6),o=n(10),i=n(53)(!1),s=n(25)("IE_PROTO");t.exports=function(t,e){var n,a=o(t),u=0,c=[];for(n in a)n!=s&&r(a,n)&&c.push(n);for(;e.length>u;)r(a,n=e[u++])&&(~i(c,n)||c.push(n));return c}},function(t,e,n){var r=n(24),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(16);t.exports=function(t){return Object(r(t))}},function(t,e,n){"use strict";var r=n(47),o={};o[n(0)("toStringTag")]="z",o+""!="[object z]"&&n(9)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(15),o=n(0)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){var r=n(45),o=n(14);n(64)("keys",function(){return function(t){return o(r(t))}})},function(t,e,n){t.exports=n(19)("native-function-to-string",Function.toString)},function(t,e,n){var r=n(13)("meta"),o=n(8),i=n(6),s=n(4).f,a=0,u=Object.isExtensible||function(){return!0},c=!n(3)(function(){return u(Object.preventExtensions({}))}),l=function(t){s(t,r,{value:{i:"O"+ ++a,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return c&&f.NEED&&u(t)&&!i(t,r)&&l(t),t}}},function(t,e,n){var r=n(14),o=n(44),i=n(27);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var s,a=n(t),u=i.f,c=0;a.length>c;)u.call(t,s=a[c++])&&e.push(s);return e}},function(t,e,n){var r=n(15);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(10),o=n(43),i=n(54);t.exports=function(t){return function(e,n,s){var a,u=r(e),c=o(u.length),l=i(s,c);if(t&&n!=n){for(;c>l;)if((a=u[l++])!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(24),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(15);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(4),o=n(5),i=n(14);t.exports=n(2)?Object.defineProperties:function(t,e){o(t);for(var n,s=i(e),a=s.length,u=0;a>u;)r.f(t,n=s[u++],e[n]);return t}},function(t,e,n){var r=n(1).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(10),o=n(29).f,i={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return s.slice()}}(t):o(r(t))}},function(t,e,n){var r=n(0)("unscopables"),o=Array.prototype;null==o[r]&&n(7)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r=n(20),o=n(11),i=n(9),s=n(7),a=n(33),u=n(62),c=n(23),l=n(63),f=n(0)("iterator"),p=!([].keys&&"next"in[].keys()),v=function(){return this};t.exports=function(t,e,n,h,d,y,g){u(n,e,h);var m,_,b,x=function(t){if(!p&&t in O)return O[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},w=e+" Iterator",S="values"==d,k=!1,O=t.prototype,C=O[f]||O["@@iterator"]||d&&O[d],E=C||x(d),M=d?S?x("entries"):E:void 0,j="Array"==e&&O.entries||C;if(j&&(b=l(j.call(new t)))!==Object.prototype&&b.next&&(c(b,w,!0),r||"function"==typeof b[f]||s(b,f,v)),S&&C&&"values"!==C.name&&(k=!0,E=function(){return C.call(this)}),r&&!g||!p&&!k&&O[f]||s(O,f,E),a[e]=E,a[w]=v,d)if(m={values:S?E:x("values"),keys:y?E:x("keys"),entries:M},g)for(_ in m)_ in O||i(O,_,m[_]);else o(o.P+o.F*(p||k),e,m);return m}},function(t,e,n){"use strict";var r=n(28),o=n(18),i=n(23),s={};n(7)(s,n(0)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(s,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(6),o=n(45),i=n(25)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var r=n(11),o=n(12),i=n(3);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],s={};s[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",s)}},function(t,e,n){var r=n(8),o=n(66).set;t.exports=function(t,e,n){var i,s=e.constructor;return s!==n&&"function"==typeof s&&(i=s.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},function(t,e,n){var r=n(8),o=n(5),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(38)(Function.call,n(30).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){var r=n(11),o=n(16),i=n(3),s=n(68),a="["+s+"]",u=RegExp("^"+a+a+"*"),c=RegExp(a+a+"*$"),l=function(t,e,n){var o={},a=i(function(){return!!s[t]()||"…"!="…"[t]()}),u=o[t]=a?e(f):s[t];n&&(o[n]=u),r(r.P+r.F*a,"String",o)},f=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(c,"")),t};t.exports=l},function(t,e){t.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},function(t,e,n){var r=n(4).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(2)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e,n){"use strict";n(71);var r=n(5),o=n(34),i=n(2),s=/./.toString,a=function(t){n(9)(RegExp.prototype,"toString",t,!0)};n(3)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?a(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):"toString"!=s.name&&a(function(){return s.call(this)})},function(t,e,n){n(2)&&"g"!=/./g.flags&&n(4).f(RegExp.prototype,"flags",{configurable:!0,get:n(34)})},function(t,e,n){"use strict";var r=n(73),o=n(5),i=n(74),s=n(75),a=n(43),u=n(77),c=n(35),l=n(3),f=Math.min,p=[].push,v=!l(function(){RegExp(4294967295,"y")});n(78)("split",2,function(t,e,n,l){var h;return h="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,e){var o=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(o,t,e);for(var i,s,a,u=[],l=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,v=void 0===e?4294967295:e>>>0,h=new RegExp(t.source,l+"g");(i=c.call(h,o))&&!((s=h.lastIndex)>f&&(u.push(o.slice(f,i.index)),i.length>1&&i.index<o.length&&p.apply(u,i.slice(1)),a=i[0].length,f=s,u.length>=v));)h.lastIndex===i.index&&h.lastIndex++;return f===o.length?!a&&h.test("")||u.push(""):u.push(o.slice(f)),u.length>v?u.slice(0,v):u}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var o=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):h.call(String(o),n,r)},function(t,e){var r=l(h,t,this,e,h!==n);if(r.done)return r.value;var c=o(t),p=String(this),d=i(c,RegExp),y=c.unicode,g=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(v?"y":"g"),m=new d(v?c:"^(?:"+c.source+")",g),_=void 0===e?4294967295:e>>>0;if(0===_)return[];if(0===p.length)return null===u(m,p)?[p]:[];for(var b=0,x=0,w=[];x<p.length;){m.lastIndex=v?x:0;var S,k=u(m,v?p:p.slice(x));if(null===k||(S=f(a(m.lastIndex+(v?0:x)),p.length))===b)x=s(p,x,y);else{if(w.push(p.slice(b,x)),w.length===_)return w;for(var O=1;O<=k.length-1;O++)if(w.push(k[O]),w.length===_)return w;x=b=S}}return w.push(p.slice(b)),w}]})},function(t,e,n){var r=n(8),o=n(15),i=n(0)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){var r=n(5),o=n(39),i=n(0)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||null==(n=r(s)[i])?e:o(n)}},function(t,e,n){"use strict";var r=n(76)(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r=n(24),o=n(16);t.exports=function(t){return function(e,n){var i,s,a=String(o(e)),u=r(n),c=a.length;return u<0||u>=c?t?"":void 0:(i=a.charCodeAt(u))<55296||i>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):i:t?a.slice(u,u+2):s-56320+(i-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(47),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var i=n.call(t,e);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e,n){"use strict";n(79);var r=n(9),o=n(7),i=n(3),s=n(16),a=n(0),u=n(35),c=a("species"),l=!i(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),f=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=a(t),v=!i(function(){var e={};return e[p]=function(){return 7},7!=""[t](e)}),h=v?!i(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[p](""),!e}):void 0;if(!v||!h||"replace"===t&&!l||"split"===t&&!f){var d=/./[p],y=n(s,p,""[t],function(t,e,n,r,o){return e.exec===u?v&&!o?{done:!0,value:d.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),g=y[0],m=y[1];r(String.prototype,t,g),o(RegExp.prototype,p,2==e?function(t,e){return m.call(t,this,e)}:function(t){return m.call(t,this)})}}},function(t,e,n){"use strict";var r=n(35);n(11)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(t,e,n){n(41)("asyncIterator")},function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"mastodon"},[n("service-header",{on:{move:t.passMove},scopedSlots:t._u([{key:"title",fn:function(){return[t._v("Mastodon: "),n("span",{domProps:{innerHTML:t._s(t.parseEmojis(t.account.display_name,t.account.emojis))}}),t._v(t._s(t.server?"@"+t.server:""))]},proxy:!0},{key:"settings",fn:function(){return[n("setting-boolean",{attrs:{id:"reconnect",title:"Reconnect",value:t.reconnect},on:{change:t.setOptionCouple}}),n("setting-boolean",{attrs:{id:"reblog",title:"Show reblogs",value:t.reblog},on:{change:t.setOptionCouple}}),n("setting-boolean",{attrs:{id:"reply",title:"Show replies",value:t.reply},on:{change:t.setOptionCouple}}),n("setting-int",{attrs:{id:"buffer",title:"Buffer size",value:t.buffer},on:{change:t.setOptionCouple}}),n("setting-boolean",{attrs:{id:"showMedia",title:"Show medias",value:t.showMedia},on:{change:t.setOptionCouple}})]},proxy:!0}])}),t.server&&t.token?n("client",t._b({on:{error:t.emitError}},"client",t.$props,!1)):n("div",{staticClass:"auth"},[n("form",{on:{submit:function(e){return e.preventDefault(),t.setServer(e)}}},[n("p",[n("label",{attrs:{for:"server"}},[t._v("Server:")]),n("input",{directives:[{name:"model",rawName:"v-model",value:t.newServer,expression:"newServer"}],attrs:{id:"server",required:""},domProps:{value:t.newServer},on:{input:function(e){e.target.composing||(t.newServer=e.target.value)}}})]),n("p",[n("label",{attrs:{for:"token"}},[t._v("Token:")]),n("input",{directives:[{name:"model",rawName:"v-model",value:t.newToken,expression:"newToken"}],attrs:{id:"token",required:""},domProps:{value:t.newToken},on:{input:function(e){e.target.composing||(t.newToken=e.target.value)}}})]),n("p",[n("input",{attrs:{type:"submit",value:"Connect"}})])])])],1)};r._withStripped=!0;n(22),n(31),n(32),n(46),n(48),n(21),n(69),n(70);function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i={methods:{emitError:function(t){this.$emit("error",t.toString())}}},s={methods:{saveOptions:function(t){this.$emit("save",t)},setOption:function(t,e){var n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){o(t,e,n[e])})}return t}({},this.$props);n[t]=e,this.saveOptions(n)},setOptionCouple:function(t){this.setOption(t.name,t.value)}}},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"service-header"},[n("div",{staticClass:"title",on:{click:function(e){t.showSettings=!t.showSettings}}},[t._t("title")],2),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showSettings,expression:"showSettings"}],staticClass:"settings"},[n("input",{staticClass:"position",on:{keyup:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:e.ctrlKey?e.shiftKey||e.altKey||e.metaKey?null:t.onMove("x",-1):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:e.ctrlKey?e.shiftKey||e.altKey||e.metaKey?null:t.onMove("x",1):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?null:"button"in e&&0!==e.button?null:e.ctrlKey?e.shiftKey||e.altKey||e.metaKey?null:t.onMove("y",-1):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])?null:"button"in e&&2!==e.button?null:e.ctrlKey?e.shiftKey||e.altKey||e.metaKey?null:t.onMove("y",1):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:e.altKey?e.ctrlKey||e.shiftKey||e.metaKey?null:t.onMove("h",-1):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:e.altKey?e.ctrlKey||e.shiftKey||e.metaKey?null:t.onMove("h",1):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?null:"button"in e&&0!==e.button?null:e.altKey?e.ctrlKey||e.shiftKey||e.metaKey?null:t.onMove("w",-1):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])?null:"button"in e&&2!==e.button?null:e.altKey?e.ctrlKey||e.shiftKey||e.metaKey?null:t.onMove("w",1):null}]}}),t._t("settings")],2)])};a._withStripped=!0;function u(t,e,n,r,o,i,s,a){var u,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),s?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=u):o&&(u=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),u)if(c.functional){c._injectStyles=u;var l=c.render;c.render=function(t,e){return u.call(e),l(t,e)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,u):[u]}return{exports:t,options:c}}var c=u({data:function(){return{showSettings:!1}},methods:{onMove:function(t,e){this.$emit("move",{type:t,direction:e})}}},a,[],!1,null,null,null);c.options.__file="src/core/serviceHeader.vue";var l=c.exports,f=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",{staticClass:"setting"},[n("label",{attrs:{for:t.id}},[t._v(t._s(t.title)+":")]),n("input",{attrs:{id:t.id,type:"checkbox"},domProps:{checked:t.value},on:{change:function(e){return e.stopPropagation(),t.sendChange(e.target.checked)}}})])};f._withStripped=!0;var p=u({props:{id:String,title:String},methods:{sendChange:function(t){this.$emit("change",{name:this.id,value:t})}}},void 0,void 0,!1,null,null,null);p.options.__file="src/core/input/baseSetting.vue";var v=p.exports,h=u({extends:v,props:{value:Boolean}},f,[],!1,null,null,null);h.options.__file="src/core/input/settingBoolean.vue";var d=h.exports,y=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",{staticClass:"setting"},[n("label",{attrs:{for:t.id}},[t._v(t._s(t.title)+":")]),n("input",{attrs:{id:t.id,type:"number",step:"1"},domProps:{value:t.value},on:{keyup:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.sendChange(parseInt(e.target.value))}}})])};y._withStripped=!0;var g=u({extends:v,props:{value:Number}},y,[],!1,null,null,null);g.options.__file="src/core/input/settingInt.vue";var m=g.exports,_=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",{staticClass:"setting"},[n("label",{attrs:{for:t.id}},[t._v(t._s(t.title)+":")]),n("input",{attrs:{id:t.id,type:"text"},domProps:{value:t.value},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.sendChange(e.target.value)}}})])};_._withStripped=!0;var b=u({extends:v,props:{value:String}},_,[],!1,null,null,null);b.options.__file="src/core/input/settingString.vue";var x=u({mixins:[i,s],components:{serviceHeader:l,settingBoolean:d,settingInt:m,settingString:b.exports},methods:{passMove:function(t){this.$emit("move",t)}}},void 0,void 0,!1,null,null,null);x.options.__file="src/core/baseService.vue";var w=x.exports,S=(n(72),n(80),{methods:{parseEmojis:function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var a=i.value;t=t.split(":".concat(a.shortcode,":")).join('<img draggable="false" class="icon" alt="'.concat(a.shortcode,'" title="').concat(a.shortcode,'" src="').concat(a.static_url,'">'))}}catch(t){r=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}return t}}}),k=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"client",on:{"&scroll":function(e){return t.onScroll(e)}}},[n("div",{staticClass:"statues"},[t.notifications.length>0?n("div",{staticClass:"header"},[t._v("Accueil")]):t._e(),t.statues.length>0?n("div",{staticClass:"list"},[t._l(t.statues,function(e){return[t.showStatus(e)?n("status",{key:e.id,attrs:{status:e,now:t.now,showMedia:t.showMedia},on:{mark:t.onStatusMark}}):t._e()]}),n("div",{directives:[{name:"show",rawName:"v-show",value:t.loadingOlder,expression:"loadingOlder"}],staticClass:"status"},[n("div",{staticClass:"service-loader"})])],2):n("div",{staticClass:"service-loader"})]),t.notifications.length>0?n("div",{staticClass:"notifications"},[n("div",{staticClass:"header"},[t._v("Notifications"),n("span",{staticClass:"date",on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.onNotificationsClear(e)}}},[t._v("❌")])]),n("div",{staticClass:"list"},t._l(t.notifications,function(e){return n("notification",{key:e.id,attrs:{notification:e,now:t.now,showMedia:t.showMedia},on:{dismiss:t.onNotificationDismiss,mark:t.onStatusMark}})}),1)]):t._e()])};k._withStripped=!0;var O=function(){var t=this.$createElement;return(this._self._c||t)("span",[this._v(this._s(this.timeSince))])};O._withStripped=!0;var C={props:{now:{type:Number|Date,default:Date.now}}},E={created:function(){var t=this;setInterval(function(){t.now=Date.now()},3e4)},data:function(){return{now:Date.now()}}},M=u({mixins:[C],props:["date"],computed:{timeSince:function(){var t=Math.floor((this.now-new Date(this.date))/1e3),e=Math.floor(t/31536e3);return e>1?e+" years":(e=Math.floor(t/2592e3))>1?e+" months":(e=Math.floor(t/86400))>1?e+" days":(e=Math.floor(t/3600))>1?e+" hours":(e=Math.floor(t/60))>1?e+" minutes":Math.floor(t)+" seconds"}}},O,[],!1,null,null,null);M.options.__file="src/core/fromNow.vue";var j=M.exports,P=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"status"},[t.withAccount?n("account",{attrs:{account:t.status.account,showMedia:t.showMedia}}):t._e(),t.status.reblog?n("span",{staticClass:"text-icon letter"},[t._v("⟳")]):t._e(),n("a",{staticClass:"date",attrs:{target:"_blank",href:t.status.uri}},[n("from-now",{attrs:{date:t.status.created_at,now:t.now}})],1),n("div",{staticClass:"content"},[t.status.reblog?n("status",{staticClass:"reblog",attrs:{status:t.status.reblog,now:t.now,showMedia:t.showMedia}}):[t.status.spoiler_text?n("div",{staticClass:"spoiler",on:{click:function(e){e.stopPropagation(),e.preventDefault(),t.status.sensitive=!t.status.sensitive}}},[t._v(t._s(t.status.spoiler_text||"Spoiler")+" "+t._s(t.status.sensitive?"→":"↓"))]):t._e(),t.status.spoiler_text&&t.status.sensitive?t._e():n("div",[n("div",{staticClass:"text",domProps:{innerHTML:t._s(t.parseEmojis(t.status.content,t.status.emojis))}}),t._l(t.status.media_attachments,function(e){return n("a",{staticClass:"media",attrs:{href:e.url,target:"_blank"}},[t.showMedia?["image"==e.type||"gifv"==e.type?n("img",{attrs:{src:e.preview_url,alt:e.description,title:e.description}}):t._e(),"gifv"==e.type?n("div",{staticClass:"gif"},[t._v("GIF")]):t._e()]:[t._v("Hidden media")]],2)})],2)]],2),t.status.reblog?t._e():n("div",{staticClass:"meta"},[n("a",{staticClass:"replies",on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.makeReply(t.status)}}},[n("span",{staticClass:"text-icon"},[t._v("✉")]),t._v(t._s(t.status.replies_count))]),n("a",{staticClass:"reblogs",class:{colored:t.status.reblogged},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.makeReblog(t.status)}}},[n("span",{staticClass:"text-icon"},[t._v("⟳")]),t._v(t._s(t.status.reblogs_count))]),n("a",{staticClass:"favourites",class:{colored:t.status.favourited},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.makeFav(t.status)}}},[n("span",{staticClass:"text-icon"},[t._v("⚝")]),t._v(t._s(t.status.favourites_count))]),t.status.in_reply_to_id?n("a",{staticClass:"fil",on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.showReply(t.status.in_reply_to_id)}}},[t._v("Voir le fil")]):t._e()])],1)])};P._withStripped=!0;var N=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("a",{staticClass:"account",attrs:{target:"_blank",href:t.account.url}},[t.showMedia?n("div",{staticClass:"avatar",style:t.avatarStyle(t.account.avatar_static)}):t._e(),n("div",{staticClass:"name",domProps:{innerHTML:t._s(t.parseEmojis(t.account.display_name,t.account.emojis))}}),n("div",{staticClass:"acct"},[t._v("@"+t._s(t.account.acct))])])};N._withStripped=!0;var T=u({props:{account:Object,showMedia:{type:Boolean,default:!0}},mixins:[S],methods:{avatarStyle:function(t){return{"background-image":"url(".concat(t,")")}}}},N,[],!1,null,null,null);T.options.__file="src/mastodon/account.vue";var A=T.exports,I=u({name:"status",mixins:[C,S],components:{account:A,fromNow:j},props:{status:Object,showMedia:{type:Boolean,default:!0},withAccount:{type:Boolean,default:!0}},methods:{showReply:function(t){console.error(t)},makeReply:function(t){console.error(t.id)},emitMark:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.$emit("mark",{id:t.id,type:(r?"un":"")+e,callback:n})},makeReblog:function(t){this.emitMark(t,"reblog",function(){t.reblogs_count+=t.reblogged?-1:1,t.reblogged=!t.reblogged},t.reblogged)},makeFav:function(t){this.emitMark(t,"favourite",function(){t.favourites_count+=t.favourited?-1:1,t.favourited=!t.favourited},t.favourited)}}},P,[],!1,null,null,null);I.options.__file="src/mastodon/status.vue";var R=I.exports,L=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"notification"},[n("account",{attrs:{account:t.notification.account,showMedia:t.showMedia}}),"mention"==t.notification.type?n("span",{staticClass:"colored text-icon letter"},[t._v("✉")]):t._e(),"reblog"==t.notification.type?n("span",{staticClass:"colored text-icon letter"},[t._v("⟳")]):t._e(),"favourite"==t.notification.type?n("span",{staticClass:"colored text-icon letter"},[t._v("⚝")]):t._e(),n("from-now",{staticClass:"date",attrs:{date:t.notification.created_at,now:t.now}}),n("div",{staticClass:"content"},["follow"==t.notification.type?[t._v("Vous suit")]:t.notification.status?n("status",{staticClass:"reblog",attrs:{status:t.notification.status,now:t.now,showMedia:t.showMedia,withAccount:"mention"!=t.notification.type},on:{mark:t.passMark}}):t._e()],2),n("a",{staticClass:"date",staticStyle:{"margin-top":"-1em"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.makeDismiss(e)}}},[t._v("❌")])],1)};L._withStripped=!0;var K=u({props:{notification:Object,showMedia:{type:Boolean,default:!0}},mixins:[C],components:{fromNow:j,account:A,status:R},methods:{makeDismiss:function(){this.$emit("dismiss",this.notification.id)},passMark:function(t){this.$emit("mark",t)}}},L,[],!1,null,null,null);K.options.__file="src/mastodon/notification.vue";var D=u({mixins:[E,i],components:{status:R,notification:K.exports},props:{server:String,token:String,timeout:Number,reconnect:Boolean,buffer:Number,reblog:Boolean,reply:Boolean,showMedia:Boolean},data:function(){return{rest:axios.create({baseURL:"https://".concat(this.server,"/api/v1/"),timeout:this.timeout,headers:{Authorization:"Bearer "+this.token}}),statues:[],notifications:[],now:Date.now(),loadingOlder:!1}},methods:{onScroll:function(t){var e=this;!this.loadingOlder&&t.target.scrollHeight-t.target.clientHeight-t.target.scrollTop-100<0?(this.loadingOlder=!0,this.rest.get("/timelines/home",{params:{limit:this.buffer,max_id:this.statues[this.statues.length-1].id}}).then(function(t){e.statues.push.apply(e.statues,t.data),e.loadingOlder=!1}).catch(this.emitError)):t.target.scrollTop<20&&this.statues.splice(this.buffer)},removeStatus:function(t){for(var e=this.statues.length-1;e>=0;e--)if(this.statues[e].id===t){this.statues.splice(e,1);break}},removeNotification:function(t){for(var e=this.notifications.length-1;e>=0;e--)if(this.notifications[e].id===t){this.notifications.splice(e,1);break}},showStatus:function(t){return(!t.in_reply_to_id||this.reply)&&(!t.reblog||this.reblog)},onStatusMark:function(t){this.rest.post("/statuses/".concat(t.id,"/").concat(t.type)).then(t.callback).catch(this.emitError)},onNotificationDismiss:function(t){var e=this;this.rest.post("/notifications/dismiss",{id:t}).then(function(){return e.removeNotification(t)}).catch(this.emitError)},onNotificationsClear:function(){var t=this;this.rest.post("/notifications/clear").then(function(){return t.notifications.splice(0,t.notifications.length)}).catch(this.emitError)},setupStream:function(){var t=this,e=new WebSocket("wss://".concat(this.server,"/api/v1/streaming?access_token=").concat(this.token,"&stream=user"));e.onmessage=function(e){e=JSON.parse(e.data);var n=JSON.parse(e.payload);switch(e.event){case"update":t.statues.unshift(n);break;case"notification":t.notifications.unshift(n);break;case"delete":t.removeStatus(n)}},e.onerror=this.emitError,e.onclose=function(){t.emitError("Mastodon stream disconnected !"+(t.reconnect?" Reconnecting...":"")),t.reconnect&&setTimeout(function(){return t.setupStream()},t.timeout)}}},created:function(){var t=this;this.rest.get("/timelines/home",{params:{limit:this.buffer}}).then(function(e){return t.statues.push.apply(t.statues,e.data)}).catch(this.emitError),this.rest.get("/notifications",{params:{limit:this.buffer}}).then(function(e){return t.notifications.push.apply(t.notifications,e.data)}).catch(this.emitError),this.setupStream()}},k,[],!1,null,null,null);function F(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}D.options.__file="src/mastodon/client.vue";var $=u({name:"mastodon",extends:w,mixins:[S],components:{client:D.exports},props:{server:String,token:String,timeout:{default:5e3,type:Number},reconnect:{default:!1,type:Boolean},buffer:{default:20,type:Number},reblog:{default:!0,type:Boolean},reply:{default:!1,type:Boolean},showMedia:{default:!0,type:Boolean}},data:function(){return{newServer:this.server,newToken:this.token,account:{display_name:"Loading...",emojis:[]}}},methods:{setServer:function(){var t=this;axios.get("https://".concat(this.newServer,"/api/v1/accounts/verify_credentials"),{headers:{Authorization:"Bearer "+this.newToken},timeout:this.timeout}).then(function(){return t.saveOptions(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){F(t,e,n[e])})}return t}({},t.$props,{server:t.newServer,token:t.newToken}))}).catch(this.emitError)}},created:function(){var t=this;this.server&&this.token?axios.get("https://".concat(this.server,"/api/v1/accounts/verify_credentials"),{headers:{Authorization:"Bearer "+this.token},timeout:this.timeout}).then(function(e){return t.account=e.data}).catch(function(e){t.emitError(e),t.account.display_name="Failed"}):this.account.display_name="First connection"}},r,[],!1,null,null,null);$.options.__file="src/mastodon/main.vue";var B=$.exports;Vue.component(B.name,B)}]);