%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/tif-dev/wp-content/plugins/lazy-blocks/controls/gallery/
Upload File :
Create Path :
Current File : //var/www/tif-dev/wp-content/plugins/lazy-blocks/controls/gallery/script.min.js

!function(){"use strict";var e={1043:function(e,t){function r(e){return r="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},r(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}function a(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}var u=wp.i18n.__,s=wp.element.Component,p=wp.components,f=p.BaseControl,m=p.Button,d=p.DropZone,y=p.withNotices,b=wp.compose,h=b.compose,g=b.withInstanceId,w=wp.blockEditor,v=w.MediaPlaceholder,E=w.MediaUpload,_=wp.data.withSelect,S=["image"],O=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}}),t&&i(e,t)}(b,e);var t,r,s,p,y=(s=b,p=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}}(),function(){var e,t=c(s);if(p){var r=c(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function b(){var e;n(this,b);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=y.call.apply(y,[this].concat(r))).state={hasError:!1},e.onUploadError=e.onUploadError.bind(l(e)),e}return t=b,(r=[{key:"onUploadError",value:function(e){var t=this.props.noticeOperations;t.removeAllNotices(),t.createErrorNotice(e)}},{key:"render",value:function(){var e=this,t=this.props,r=t.label,n=t.value,o=t.help,i=t.imagesPreviewData,a=t.noticeOperations,l=t.noticeUI,c=t.onChange,s=void 0===c?function(){}:c,p=t.mediaUpload;return wp.element.createElement(f,{label:r,help:o},wp.element.createElement("div",{className:"lzb-gutenberg-gallery-wrap"},n&&Object.keys(n).length?"":wp.element.createElement(v,{icon:"format-gallery",labels:{title:r,name:u("images","lazy-blocks")},onSelect:function(t){e.setState({hasError:!1}),s(t)},notices:l,accept:"image/*",allowedTypes:S,disableMaxUploadErrorMessages:!0,multiple:!0,onError:this.onUploadError}),n&&Object.keys(n).length?wp.element.createElement(E,{onSelect:function(t){e.setState({hasError:!1}),s(t)},allowedTypes:S,multiple:!0,gallery:!0,value:n.map((function(e){return e.id})),render:function(t){var r=t.open;return wp.element.createElement("div",{className:"lzb-gutenberg-gallery",onClick:r,role:"presentation"},wp.element.createElement(d,{onFilesDrop:function(t){var r=n||[];p({allowedTypes:S,filesList:t,onFileChange:function(t){e.setState({hasError:!1}),s(r.concat(t))},onError:function(t){e.setState({hasError:!0}),a.createErrorNotice(t)}})}}),wp.element.createElement("div",{className:"lzb-gutenberg-gallery-button"},wp.element.createElement(m,{isSecondary:!0,isSmall:!0},u("Edit Gallery","lazy-blocks"))),n.map((function(e){return wp.element.createElement("div",{className:"lzb-gutenberg-gallery-item",key:e.id||e.url},i[e.id]&&i[e.id].url?wp.element.createElement("img",{src:i[e.id].url,alt:i[e.id].alt}):"")})))}}):""))}}])&&o(t.prototype,r),b}(s);t.Z=h([g,y,_((function(e,t){var r=e("core/block-editor").getSettings().mediaUpload,n=e("core").getMedia,o=t.value,i=t.previewSize,a={};return o&&Object.keys(o).length&&o.forEach((function(e){if(!a[e.id]){var t=n(e.id)||!1;t&&(a[e.id]={alt:t.alt_text,url:t.source_url},t.media_details&&t.media_details.sizes&&t.media_details.sizes[i]&&(a[e.id].url=t.media_details.sizes[i].source_url))}})),{mediaUpload:r,imagesPreviewData:a}}))])(O)}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}!function(){var e=r(1043);function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}function i(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)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}(e)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function l(e){return l="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},l(e)}var c=wp.hooks.addFilter,u=wp.i18n.__,s=wp.element.Component,p=wp.components,f=p.PanelBody,m=p.SelectControl,d=wp.compose,y=d.withInstanceId,b=d.compose,h=wp.data.withSelect;c("lzb.editor.control.gallery.render","lzb.editor",(function(t,r){return wp.element.createElement(e.Z,{label:r.data.label,help:r.data.help,previewSize:r.data.preview_size,value:r.getValue(),onChange:function(e){var t=e.map((function(e){return{alt:e.alt||"",title:e.title||"",caption:e.caption||"",description:e.description||"",id:e.id||"",link:e.link||"",url:e.url||"",sizes:e.sizes||""}}));r.onChange(t)}})})),c("lzb.editor.control.gallery.getValue","lzb.editor",(function(e){if("string"==typeof e)try{e=JSON.parse(decodeURI(e))}catch(t){e=[]}return e})),c("lzb.editor.control.gallery.updateValue","lzb.editor",(function(e){return("object"===l(e)||Array.isArray(e))&&(e=encodeURI(JSON.stringify(e))),e}));var g=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}}),t&&o(e,t)}(d,e);var r,l,c,s,p=(c=d,s=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}}(),function(){var e,t=a(c);if(s){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return i(this,e)});function d(){return t(this,d),p.apply(this,arguments)}return r=d,(l=[{key:"render",value:function(){var e=this.props,t=e.imageSizes,r=e.imageDimensions,n=e.updateData,o=e.data;return wp.element.createElement(f,null,wp.element.createElement(m,{label:u("Preview Size","lazy-blocks"),options:t.map((function(e){var t=e.name;return r[e.slug]&&(t+=" (".concat(r[e.slug].width," × ").concat(r[e.slug].height,")")),{label:t,value:e.slug}})),value:o.preview_size||"medium",onChange:function(e){return n({preview_size:e})}}))}}])&&n(r.prototype,l),d}(s),w=b([y,h((function(e){var t=(0,e("core/block-editor").getSettings)();return{imageSizes:t.imageSizes||[{name:u("Medium","lazy-blocks"),slug:"medium"}],imageDimensions:t.imageDimensions||{medium:{width:300,height:300}}}}))])(g);c("lzb.constructor.control.gallery.settings","lzb.constructor",(function(e,t){return wp.element.createElement(w,t)}))}()}();

Zerion Mini Shell 1.0