laipower/wp-content/plugins/gp-premium/dist/editor.js

1 line
3.2 KiB
JavaScript
Raw Normal View History

!function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,(i=o.key,c=void 0,c=function(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,"string");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i),"symbol"===e(c)?c:String(c)),o)}var i,c}function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}var o=window.wp.element,i=window.wp.i18n,c=window.wp.plugins,l=window.wp.editPost,u=window.wp.htmlEntities;function a(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var o,i=r(t);if(n){var c=r(this).constructor;o=Reflect.construct(i,arguments,c)}else o=i.apply(this,arguments);return function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(this,o)}}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)}(f,e);var r,c,p=a(f);function f(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),p.apply(this,arguments)}return r=f,(c=[{key:"render",value:function(){var e=gpPremiumEditor.activeElements;return!e||e.length<1?null:gpPremiumEditor.postTypeIsPublic?(0,o.createElement)(l.PluginDocumentSettingPanel,{name:"generatepress-elements-info",title:(0,i.__)("Active Elements","gp-premium"),className:"gpp-element-info-panel gpp-element-panel-label"},(0,o.createElement)(o.Fragment,null,(0,o.createElement)("ul",{className:"gpp-active-elements"},Object.keys(e).map((function(t,n){return(0,o.createElement)("li",{key:"gpp-active-block-element-".concat(n)},(0,o.createElement)("a",{href:e[t].url+"&action=edit"},(0,u.decodeEntities)(e[t].name))," ",(0,o.createElement)("span",{className:"gpp-active-element-type"},"- ",e[t].type))}))),(0,o.createElement)("a",{href:gpPremiumEditor.elementsUrl,className:"components-button is-secondary"},(0,i.__)("All Elements","gp-premium")))):null}}])&&t(r.prototype,c),Object.defineProperty(r,"prototype",{writable:!1}),f}(o.Component);(0,c.registerPlugin)("generatepress-elements-info-panel",{icon:null,render:p})}();