mediacms/static/js/liked.js

1 line
11 KiB
JavaScript
Raw Normal View History

!function(){"use strict";var t={1513:function(t,e,n){var r=n(2667),o=(n(5101),n(5466)),i=n(3074),u=n.n(i),a=n(8204),c=n(4426),s=n(9174),l=n(5261),f=(n(6116),n(2259)),p=n(612),h=n(5464);function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function m(t,e){return(m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function b(t,e){return!e||"object"!==y(e)&&"function"!=typeof e?v(t):e}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n(8170);var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(a,t);var e,n,r,i,u=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=g(r);if(i){var n=g(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return b(this,t)});function a(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=u.call(this,t,"author-liked")).state={resultsCount:null},e.getCountFunc=e.getCountFunc.bind(v(e)),e}return e=a,(n=[{key:"getCountFunc",value:function(t){this.setState({resultsCount:t})}},{key:"pageContent",value:function(){return[this.state.author?o.createElement(p.Z,{key:"ProfilePagesHeader",author:this.state.author,type:"liked"}):null,this.state.author?o.createElement(h.Z,{key:"ProfilePagesContent"},o.createElement(s._,{title:this.props.title+(null!==this.state.resultsCount?" ("+this.state.resultsCount+")":""),className:"items-list-ver"},o.createElement(l.J,{itemsCountCallback:this.getCountFunc,requestUrl:c.Z.get("api-user-liked"),hideAuthor:!c.Z.get("config-media-item").displayAuthor,hideViews:!c.Z.get("config-media-item").displayViews,hideDate:!c.Z.get("config-media-item").displayPublishDate,canEdit:!1}))):null]}}])&&d(e.prototype,n),a}(f.G);f.G.propTypes={title:u().string.isRequired},f.G.defaultProps={title:"Liked media"};var k=n(8024);function P(t){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function O(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function C(t,e,n){return e&&O(t.prototype,e),n&&O(t,n),t}function D(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&R(t,e)}function R(t,e){return(R=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function j(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=x(t);if(e){var o=x(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return S(this,n)}}function S(t,e){return!e||"object"!==P(e)&&"function"!=typ