Файловый менеджер - Редактировать - /var/www/xthruster/html/wp-content/plugins/sitepress-multilingual-cms/dist/js/blockEditorNotices/app.js
Назад
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){var o=n(5),r=n(6),i=n(7),s=n(8);e.exports=function(e){return o(e)||r(e)||i(e)||s()}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.exports=function(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}},function(e,t,n){e.exports=n(9)},function(e,t,n){var o=n(1);e.exports=function(e){if(Array.isArray(e))return o(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t,n){var o=n(1);e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";n.r(t);var o=n(0),r=n.n(o),i=n(2),s=n.n(i),c=n(3),a=n.n(c);function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw i}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var d=function(){function e(){var t=this;s()(this,e),this.NOTICE_CLASS_STATUSES={"notice-success":"success",updated:"success","notice-warning":"warning","notice-error":"error",error:"error","notice-info":"info"},this.contentCreated=!1,this.convertOldStyledToOTGSNotices();var n=this.getNotices();n.forEach((function(e){e.innerHTML=e.outerHTML,e.classList.remove("notice"),e.classList.add("otgs-notice-wrap"),e.childNodes[0].classList.remove("notice","info","success","warning","error","notice-info","notice-success","notice-warning","notice-error")})),this.totalNumberOfNotices=n.length,this.addedNumberOfNotices=0,wp.data.subscribe((function(){return t.createBlockEditorNotices()})),wp.data.subscribe((function(){return t.hideCloseButtonOnAddingNotice()})),this.bindEvents()}return a()(e,[{key:"bindEvents",value:function(){var e=this;document.addEventListener("otgs-notice-dismiss",(function(t){e.closeNotice(t)}))}},{key:"hideCloseButtonOnAddingNotice",value:function(){var e=this,t=this.getAddedOTGSNotices(),n=t.length;n>this.addedNumberOfNotices&&(this.addedNumberOfNotices=n,t.forEach((function(t){var n=e.getComponentDismiss(t);n&&(n.style.visibility="hidden")})),n===this.totalNumberOfNotices&&document.dispatchEvent(new Event("otgs-notices-added")))}},{key:"getNoticeHTML",value:function(e){var t=[];return Object.values(e.childNodes).map((function(e){e.nodeType!==window.Node.ELEMENT_NODE?e.nodeValue.trim()&&t.push(e.nodeValue):e.classList.contains("notice-dismiss")||t.push(e.outerHTML)})),t.join("")}},{key:"getNoticeStatus",value:function(e){var t,n=u(e.classList);try{for(n.s();!(t=n.n()).done;){var o=t.value;if(this.NOTICE_CLASS_STATUSES.hasOwnProperty(o))return this.NOTICE_CLASS_STATUSES[o]}}catch(e){n.e(e)}finally{n.f()}}},{key:"createBlockEditorNotices",value:function(){var e=this;if(!this.contentCreated&&document.querySelector(".edit-post-layout__content")){this.contentCreated=!0;var t=this.getOTGSNotices().reverse();t.length>0&&t.forEach((function(t){var n=e.getNoticeStatus(t),o=e.getNoticeHTML(t),r=t.classList.contains("is-dismissible");wp.data.dispatch("core/notices").createNotice(n,o,{speak:!1,__unstableHTML:!0,isDismissible:r})}))}}},{key:"closeNotice",value:function(e){if(e.detail){var t=e.detail[0];if(void 0!==t){var n=this.getComponentDismiss(t);n&&(n.style.visibility="visible",n.click())}}}},{key:"getComponentDismiss",value:function(e){return e.closest(".components-notice").querySelector(".components-notice__dismiss")}},{key:"getAddedOTGSNotices",value:function(){return r()(document.querySelectorAll(".components-notice .otgs-notice"))}},{key:"getNotices",value:function(){return r()(document.querySelectorAll(".otgs-notice"))}},{key:"getOTGSNotices",value:function(){return r()(document.querySelectorAll(".otgs-notice-wrap"))}},{key:"getOldStyledAdminNotices",value:function(){return r()(document.querySelectorAll(["#wpbody-content > .icl-admin-message"].join(", ")))}},{key:"convertOldStyledToOTGSNotices",value:function(){this.getOldStyledAdminNotices().forEach((function(e){e.classList.contains("otgs-is-dismissible")&&(e.classList.remove("otgs-is-dismissible"),e.classList.add("is-dismissible")),e.classList.remove("message","updated","icl-admin-message","icl-admin-message-error","icl-admin-message-information","icl-admin-message-warning","update-nag"),e.classList.add("notice","otgs-notice")}))}}]),e}();document.addEventListener("DOMContentLoaded",(function(){new d}))}]);
| ver. 1.4 |
Github
|
.
| PHP 7.4.3-4ubuntu2.24 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка