Pleroma/priv/static/packs/containers/media_container.js

27 lines
685 KiB
JavaScript
Raw Normal View History

2020-01-22 16:00:23 +01:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{10:function(e,t,a){var n;
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
!function(){"use strict";var a={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var o=r.apply(null,n);o&&e.push(o)}else if("object"===i)for(var s in n)a.call(n,s)&&n[s]&&e.push(s)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},100:function(e,t,a){"use strict";a.r(t),a.d(t,"timeAgoString",function(){return _}),a.d(t,"default",function(){return v});var n,r,i,o=a(0),s=a(2),l=a(7),f=a(1),c=a(13),u=a(3),d=a.n(u),h=a(6),p=Object(h.f)({just_now:{id:"relative_time.just_now",defaultMessage:"now"},seconds:{id:"relative_time.seconds",defaultMessage:"{number}s"},minutes:{id:"relative_time.minutes",defaultMessage:"{number}m"},hours:{id:"relative_time.hours",defaultMessage:"{number}h"},days:{id:"relative_time.days",defaultMessage:"{number}d"},moments_remaining:{id:"time_remaining.moments",defaultMessage:"Moments remaining"},seconds_remaining:{id:"time_remaining.seconds",defaultMessage:"{number, plural, one {# second} other {# seconds}} left"},minutes_remaining:{id:"time_remaining.minutes",defaultMessage:"{number, plural, one {# minute} other {# minutes}} left"},hours_remaining:{id:"time_remaining.hours",defaultMessage:"{number, plural, one {# hour} other {# hours}} left"},days_remaining:{id:"time_remaining.days",defaultMessage:"{number, plural, one {# day} other {# days}} left"}}),g={hour12:!1,year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"},m={month:"short",day:"numeric"},b=864e5,_=function(e,t,a,n){var r=a-t.getTime();return r<1e4?e.formatMessage(p.just_now):r<7*b?r<6e4?e.formatMessage(p.seconds,{number:Math.floor(r/1e3)}):r<36e5?e.formatMessage(p.minutes,{number:Math.floor(r/6e4)}):r<b?e.formatMessage(p.hours,{number:Math.floor(r/36e5)}):e.formatMessage(p.days,{number:Math.floor(r/b)}):t.getFullYear()===n?e.formatDate(t,m):e.formatDate(t,Object(c.default)({},m,{year:"numeric"}))},v=Object(h.g)((i=r=function(e){function t(){for(var t,a=arguments.length,n=new Array(a),r=0;r<a;r++)n[r]=arguments[r];return t=e.call.apply(e,[this].concat(n))||this,Object(f.a)(Object(s.a)(t),"state",{now:t.props.intl.now()}),t}Object(l.a)(t,e);var a=t.prototype;return a.shouldComponentUpdate=function(e,t){return this.props.timestamp!==e.timestamp||this.props.intl.locale!==e.intl.locale||this.state.now!==t.now},a.componentWillReceiveProps=function(e){this.props.timestamp!==e.timestamp&&this.setState({now:this.props.intl.now()})},a.componentDidMount=function(){this._scheduleNextUpdate(this.props,this.state)},a.componentWillUpdate=function(e,t){this._scheduleNextUpdate(e,t)},a.componentWillUnmount=function(){clearTimeout(this._timer)},a._scheduleNextUpdate=function(e,t){var a=this;clearTimeout(this._timer);var n=e.timestamp,r=new Date(n).getTime()-t.now,i=function(e){switch(e){case"second":return 1e3;case"minute":return 6e4;case"hour":return 36e5;case"day":return b;default:return 2147483647}}(function(e){var t=Math.abs(e);return t<6e4?"second":t<36e5?"minute":t<b?"hour":"day"}(r)),o=Math.abs(r%i),s=r<0?Math.max(1e4,i-o):Math.max(1e4,o);this._timer=setTimeout(function(){a.setState({now:a.props.intl.now()})},s)},a.render=function(){var e=this.props,t=e.timestamp,a=e.intl,n=e.year,r=e.futureDate,i=new Date(t),s=r?function(e,t,a){var n=t.getTime()-a;return n<1e4?e.formatMessage(p.moments_remaining):n<6e4?e.formatMessage(p.seconds_remaining,{number:Math.floor(n/1e3)}):n<36e5?e.formatMessage(p.minutes_remaining,{number:Math.floor(n/6e4)}):n<b?e.formatMessage(p.hours_remaining,{number:Math.floor(n/36e5)}):e.formatMessage(p.days_remaining,{number:Math.floor(n/b)})}(a,i,this.state.now):_(a,i,this.state.now,n);return Object(o.a)("time",{dateTime:t,title:a.formatDate(i,g)},void 0,s)},t}(d.a.Component),Object(f.a)(r,"defaultProps",{year:(new Date).getFullYear()}),n=i))||n},102:function(e,t,a){"use strict";t.__esModule=!0,t.default=void 0;var n=!("undefined"==typeof window||!window.document||!window.document.createElement);t.default=
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},328:function(e,t,a){"use strict";var n=a(38),r=a(230),i=a(329),o=a(330),s=a(235);function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method=e.method?e.method.toLowerCase():"get";var t=[o,void 0],a=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)a=a.then(t.shift(),t.shift());return a},l.prototype.getUri=function(e){return e=s(this.defaults,e),r(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],function(e){l.prototype[e]=function(t,a){return this.request(n.merge(a||{},{method:e,url:t}))}}),n.forEach(["post","put","patch"],function(e){l.prototype[e]=function(t,a,r){return this.request(n.merge(r||{},{method:e,url:t,data:a}))}}),e.exports=l},329:function(e,t,a){"use strict";var n=a(38);function r(){this.handlers=[]}r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},330:function(e,t,a){"use strict";var n=a(38),r=a(331),i=a(231),o=a(232),s=a(338),l=a(339);function f(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return f(e),e.baseURL&&!s(e.url)&&(e.url=l(e.baseURL,e.url)),e.headers=e.headers||{},e.data=r(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||o.adapter)(e).then(function(t){return f(e),t.data=r(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(f(e),t&&t.response&&(t.response.data=r(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},331:function(e,t,a){"use strict";var n=a(38);e.exports=function(e,t,a){return n.forEach(a,function(a){e=a(e,t)}),e}},332:function(e,t,a){"use strict";var n=a(38);e.exports=function(e,t){n.forEach(e,function(a,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=a,delete e[n])})}},333:function(e,t,a){"use strict";var n=a(234);e.exports=function(e,t,a){var r=a.config.validateStatus;!r||r(a.status)?e(a):t(n("Request failed with status code "+a.status,a.config,null,a.request,a))}},334:function(e,t,a){"use strict";e.exports=function(e,t,a,n,r){return e.config=t,a&&(e.code=a),e.request=n,e.response=r,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},335:function(e,t,a){"use strict";var n=a(38),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,a,i,o={};return e?(n.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),a=n.trim(e.substr(i+1)),t){if(o[t]&&r.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([a]):o[t]?o[t]+", "+a:a}}),o):o}},336:function(e,t,a){"use strict";var n=a(38);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),a=document.createElement("a");function r(e){var n=e;return t&&(a.setAttribute("href",n),n=a.href),a.setAttribute("href",n),{href:a.href,protocol:a.protocol?a.protocol.replace(/:$/,""):"",host:a.host,search:a.search?a.search.replace(/^\?/,""):"",hash:a.hash?a.hash.replace(/^#/,""):"",hostname:a.hostname,port:a.port,pathname:"/"=
/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/var n=/["'&<>]/;e.exports=function(e){var t,a=""+e,r=n.exec(a);if(!r)return a;var i="",o=0,s=0;for(o=r.index;o<a.length;o++){switch(a.charCodeAt(o)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#39;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}s!==o&&(i+=a.substring(s,o)),s=o+1,i+=t}return s!==o?i+a.substring(s,o):i}},51:function(e,t,a){"use strict";a.d(t,"a",function(){return m});var n=a(0),r=a(13),i=a(2),o=a(7),s=a(1),l=a(3),f=a.n(l),c=a(88),u=a(34),d=a.n(u),h=a(10),p=a.n(h),g=a(27),m=function(e){function t(){for(var t,a=arguments.length,n=new Array(a),r=0;r<a;r++)n[r]=arguments[r];return t=e.call.apply(e,[this].concat(n))||this,Object(s.a)(Object(i.a)(t),"handleClick",function(e){e.preventDefault(),t.props.disabled||t.props.onClick(e)}),Object(s.a)(Object(i.a)(t),"handleKeyPress",function(e){t.props.onKeyPress&&!t.props.disabled&&t.props.onKeyPress(e)}),Object(s.a)(Object(i.a)(t),"handleMouseDown",function(e){!t.props.disabled&&t.props.onMouseDown&&t.props.onMouseDown(e)}),Object(s.a)(Object(i.a)(t),"handleKeyDown",function(e){!t.props.disabled&&t.props.onKeyDown&&t.props.onKeyDown(e)}),t}return Object(o.a)(t,e),t.prototype.render=function(){var e=this,t=Object(r.default)({fontSize:this.props.size+"px",width:1.28571429*this.props.size+"px",height:1.28571429*this.props.size+"px",lineHeight:this.props.size+"px"},this.props.style,{},this.props.active?this.props.activeStyle:{}),a=this.props,i=a.active,o=a.animate,s=a.className,l=a.disabled,f=a.expanded,u=a.icon,h=a.inverted,m=a.overlay,b=a.pressed,_=a.tabIndex,v=a.title,y=p()(s,"icon-button",{active:i,disabled:l,inverted:h,overlayed:m});return o?Object(n.a)(c.a,{defaultStyle:{rotate:i?-360:0},style:{rotate:o?d()(i?-360:0,{stiffness:120,damping:7}):0}},void 0,function(a){var r=a.rotate;return Object(n.a)("button",{"aria-label":v,"aria-pressed":b,"aria-expanded":f,title:v,className:y,onClick:e.handleClick,onMouseDown:e.handleMouseDown,onKeyDown:e.handleKeyDown,onKeyPress:e.handleKeyPress,style:t,tabIndex:_,disabled:l},void 0,Object(n.a)(g.a,{id:u,style:{transform:"rotate("+r+"deg)"},fixedWidth:!0,"aria-hidden":"true"}))}):Object(n.a)("button",{"aria-label":v,"aria-pressed":b,"aria-expanded":f,title:v,className:y,onClick:this.handleClick,onMouseDown:this.handleMouseDown,onKeyDown:this.handleKeyDown,onKeyPress:this.handleKeyPress,style:t,tabIndex:_,disabled:l},void 0,Object(n.a)(g.a,{id:u,fixedWidth:!0,"aria-hidden":"true"}))},t}(f.a.PureComponent);Object(s.a)(m,"defaultProps",{size:18,active:!1,disabled:!1,animate:!1,overlay:!1,tabIndex:"0"})},52:function(e,t,a){"use strict";a.r(t),function(e){a.d(t,"buildCustomEmojis",function(){return f}),a.d(t,"categoriesFromEmojis",function(){return c});var n=a(20),r=a(79),i=a.n(r),o=a(73),s=new(a.n(o).a)(Object.keys(i.a)),l=e.env.CDN_HOST||"";t.default=function(e,t){void 0===t&&(t={});for(var a=Object.keys(t).length?"<&:":"<&",r="",o=a,f=0,c=function(){for(var c=void 0,u=0,d=void 0;u<e.length&&-1===(d=o.indexOf(e[u]))&&(f||!(c=s.search(e.slice(u))));)u+=e.codePointAt(u)<65536?1:2;var h=void 0,p="";if(u===e.length)return"break";if(":"===e[u])(function(){if(!(h=e.indexOf(":",u+1)+1))return!1;var a=e.indexOf("<",u+1);if(!(-1===a||a>=h))return!1;var r=e.slice(u,h);if(r in t){var i=n.a?t[r].url:t[r].static_url;return p='<img draggable="false" class="emojione custom-emoji" alt="'+r+'" title="'+r+'" src="'+i+'" data-original="'+t[r].url+'" data-static="'+t[r].static_url+'" />',!0}return!1})()||(h=++u);else if(d>=0){if(!(h=e.indexOf(">;"[d],u+1)+1))return"break";0===d&&(f?"/"===e[u+1]?--f||(o=a):"/"!==e[h-2]&&f++:e.startsWith('<span class="invisible">',u)&&(f=1,o="<&")),u=h}else{var g=i.a[c],m=g.filename,b=g.shortCode;p='<img draggable="false" class="emojione" alt="'+c+'" title="'+(b?":"+b+":":"")+'" src="'+l+"/emoji/"+m+'.svg" />',h=u+c.length,65038===e.codePointAt(h)&&(h+=1)}r+=e.slice(0,u)+p,e=e.slice(h)};;){if("break"===c())break}return r+e};var f=function(e){var t=[];return e.forEach(function(e){var a=e.get("shortcode"),r=n.a?e.get("url"):e.get("static_url"),i=a.replace(":","");t.push({id:i,name
2018-08-12 15:29:30 +02:00
//# sourceMappingURL=media_container.js.map