508 lines
1022 KiB
JavaScript
508 lines
1022 KiB
JavaScript
/*! This file is auto-generated */
|
|||
|
|
"use strict";var wp;(wp||={}).editor=(()=>{var sae=Object.create;var T1=Object.defineProperty;var aae=Object.getOwnPropertyDescriptor;var lae=Object.getOwnPropertyNames;var cae=Object.getPrototypeOf,uae=Object.prototype.hasOwnProperty;var Zn=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Qc=(e,t)=>{for(var r in t)T1(e,r,{get:t[r],enumerable:!0})},PF=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of lae(t))!uae.call(e,n)&&n!==r&&T1(e,n,{get:()=>t[n],enumerable:!(o=aae(t,n))||o.enumerable});return e};var s=(e,t,r)=>(r=e!=null?sae(cae(e)):{},PF(t||!e||!e.__esModule?T1(r,"default",{value:e,enumerable:!0}):r,e)),dae=e=>PF(T1({},"__esModule",{value:!0}),e);var O=Ie((xAe,kF)=>{kF.exports=window.wp.data});var W=Ie((CAe,EF)=>{EF.exports=window.wp.coreData});var B=Ie((TAe,RF)=>{RF.exports=window.wp.element});var he=Ie((PAe,AF)=>{AF.exports=window.wp.compose});var mo=Ie((kAe,OF)=>{OF.exports=window.wp.hooks});var $=Ie((EAe,IF)=>{IF.exports=window.wp.blockEditor});var Xe=Ie((FAe,VF)=>{VF.exports=window.wp.blocks});var po=Ie((DAe,jF)=>{jF.exports=window.wp.date});var Ir=Ie((BAe,zF)=>{zF.exports=window.wp.url});var Yi=Ie((MAe,UF)=>{UF.exports=window.wp.deprecated});var lt=Ie((LAe,HF)=>{HF.exports=window.wp.preferences});var de=Ie((zAe,ZF)=>{ZF.exports=window.wp.primitives});var C=Ie((UAe,KF)=>{KF.exports=window.ReactJSXRuntime});var qv=Ie((VIe,XF)=>{XF.exports=window.wp.privateApis});var Xm=Ie((KIe,uD)=>{uD.exports=window.wp.a11y});var Qm=Ie((XIe,dD)=>{dD.exports=window.wp.apiFetch});var ct=Ie((QIe,fD)=>{fD.exports=window.wp.notices});var E=Ie((JIe,mD)=>{mD.exports=window.wp.i18n});var ft=Ie((i6e,_D)=>{_D.exports=window.wp.htmlEntities});var xD=Ie((l6e,wD)=>{"use strict";wD.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var Yd=Ie((b6e,RD)=>{RD.exports=window.wp.mediaUtils});var A=Ie((N6e,jD)=>{jD.exports=window.wp.components});var Ls=Ie((c3e,sB)=>{sB.exports=window.wp.patterns});var sy=Ie((v3e,dB)=>{dB.exports=window.wp.blob});var Jn=Ie((b3e,vB)=>{vB.exports=window.React});var s5=Ie((B3e,lM)=>{lM.exports=window.ReactDOM});var M_=Ie((m4e,B_)=>{var NM={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u1EA4:"A",\u1EAE:"A",\u1EB2:"A",\u1EB4:"A",\u1EB6:"A",\u00C6:"AE",\u1EA6:"A",\u1EB0:"A",\u0202:"A",\u1EA2:"A",\u1EA0:"A",\u1EA8:"A",\u1EAA:"A",\u1EAC:"A",\u00C7:"C",\u1E08:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u1EBE:"E",\u1E16:"E",\u1EC0:"E",\u1E14:"E",\u1E1C:"E",\u0206:"E",\u1EBA:"E",\u1EBC:"E",\u1EB8:"E",\u1EC2:"E",\u1EC4:"E",\u1EC6:"E",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u020A:"I",\u1EC8:"I",\u1ECA:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u1ED0:"O",\u1E4C:"O",\u1E52:"O",\u020E:"O",\u1ECE:"O",\u1ECC:"O",\u1ED4:"O",\u1ED6:"O",\u1ED8:"O",\u1EDC:"O",\u1EDE:"O",\u1EE0:"O",\u1EDA:"O",\u1EE2:"O",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u1EE6:"U",\u1EE4:"U",\u1EEC:"U",\u1EEE:"U",\u1EF0:"U",\u00DD:"Y",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u1EA5:"a",\u1EAF:"a",\u1EB3:"a",\u1EB5:"a",\u1EB7:"a",\u00E6:"ae",\u1EA7:"a",\u1EB1:"a",\u0203:"a",\u1EA3:"a",\u1EA1:"a",\u1EA9:"a",\u1EAB:"a",\u1EAD:"a",\u00E7:
|
||
|
|
<svg
|
||
|
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||
|
|
viewBox="0 0 0 0"
|
||
|
|
width="0"
|
||
|
|
height="0"
|
||
|
|
focusable="false"
|
||
|
|
role="none"
|
||
|
|
aria-hidden="true"
|
||
|
|
style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
|
||
|
|
>
|
||
|
|
<defs>
|
||
|
|
<filter id="${e}">
|
||
|
|
<!--
|
||
|
|
Use sRGB instead of linearRGB so transparency looks correct.
|
||
|
|
Use perceptual brightness to convert to grayscale.
|
||
|
|
-->
|
||
|
|
<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>
|
||
|
|
<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
|
||
|
|
<feComponentTransfer color-interpolation-filters="sRGB">
|
||
|
|
<feFuncR type="table" tableValues="${r.r.join(" ")}"></feFuncR>
|
||
|
|
<feFuncG type="table" tableValues="${r.g.join(" ")}"></feFuncG>
|
||
|
|
<feFuncB type="table" tableValues="${r.b.join(" ")}"></feFuncB>
|
||
|
|
<feFuncA type="table" tableValues="${r.a.join(" ")}"></feFuncA>
|
||
|
|
</feComponentTransfer>
|
||
|
|
<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
|
||
|
|
<feComposite in2="SourceGraphic" operator="in"></feComposite>
|
||
|
|
</filter>
|
||
|
|
</defs>
|
||
|
|
</svg>`}function Yl(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([0-9])([a-zA-Z])/g,"$1-$2").replace(/([a-zA-Z])([0-9])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function PI(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function $pe(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function kI(e,t="0"){let r=$pe(e);if(!r)return null;let o=PI(r?.top)||t,n=PI(r?.left)||t;return o===n?o:`${o} ${n}`}var L8={backgroundSize:"cover",backgroundPosition:"50% 50%"};function V8(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:L8.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:L8.backgroundPosition}),t}var j8={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};var ehe={button:"wp-element-button",caption:"wp-element-caption"},the={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"};function rhe(e={},t){return Rp.reduce((r,{path:o,valueKey:n,valueFunc:i,cssVarInfix:a})=>{let l=Pt(e,o,[]);return["default","theme","custom"].forEach(c=>{l[c]&&l[c].forEach(u=>{n&&!i?r.push(`--wp--preset--${a}--${Yl(u.slug)}: ${u[n]}`):i&&typeof i=="function"&&r.push(`--wp--preset--${a}--${Yl(u.slug)}: ${i(u,t)}`)})}),r},[])}function ohe(e="*",t={}){return Rp.reduce((r,{path:o,cssVarInfix:n,classes:i})=>{if(!i)return r;let a=Pt(t,o,[]);return["default","theme","custom"].forEach(l=>{a[l]&&a[l].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${Yl(c)}-${u}`,m=e.split(",").map(g=>`${g}${f}`).join(","),h=`var(--wp--preset--${n}--${Yl(c)})`;r+=`${m}{${d}: ${h} !important;}`})})}),r},"")}function nhe(e={}){return Rp.filter(t=>t.path.at(-1)==="duotone").flatMap(t=>{let r=Pt(e,t.path,{});return["default","theme"].filter(o=>r[o]).flatMap(o=>r[o].map(n=>M8(`wp-duotone-${n.slug}`,n.colors))).join("")})}function W8(e={},t,r){let o=[];return Object.keys(e).forEach(n=>{let i=t+Yl(n.replace("/","-")),a=e[n];if(a instanceof Object){let l=i+r;o=[...o,...W8(a,l,r)]}else o.push(`${i}: ${a}`)}),o}function ihe(e,t){let r=e.split(","),o=[];return r.
|
||
|
|
.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
|
||
|
|
.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
|
||
|
|
.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
|
||
|
|
.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
|
||
|
|
`),g+="}"),l.blockStyles&&c.forEach(({selector:v,duotoneSelector:y,styles:b,fallbackGapValue:_,hasLayoutSupport:S,featureSelectors:x,styleVariationSelectors:T,skipSelectorWrapper:R,name:F})=>{if(x){let V=U8(x,b);V=z8(V,e.settings,F),Object.entries(V).forEach(([M,k])=>{if(k.length){let I=k.join(";");g+=`:root :where(${M}){${I};}`}})}if(y){let V={};b?.filter&&(V.filter=b.filter,delete b.filter);let M=Ip(V);M.length&&(g+=`${y}{${M.join(";")};}`)}!n&&(Ra===v||S)&&(g+=H8({style:b,selector:v,hasBlockGapSupport:r,hasFallbackGapSupport:o,fallbackGapValue:_}));let D=Ip(b,v,d,e,i);if(D?.length){let V=R?v:`:root :where(${v})`;g+=`${V}{${D.join(";")};}`}b?.css&&(g+=EI(b.css,`:root :where(${v})`)),l.variationStyles&&T&&Object.entries(T).forEach(([V,M])=>{let k=b?.variations?.[V];if(k){if(x){let U=U8(x,k);U=z8(U,e.settings,F),Object.entries(U).forEach(([G,Y])=>{if(Y.length){let Z=ihe(G,M),L=Y.join(";");g+=`:root :where(${Z}){${L};}`}})}let I=Ip(k,M,d,e);if(I.length&&(g+=`:root :where(${M}){${I.join(";")};}`),k?.css&&(g+=EI(k.css,`:root :where(${M})`)),S&&k?.spacing?.blockGap){let U=M+v;g+=H8({style:k,selector:U,hasBlockGapSupport:!0,hasFallbackGapSupport:o,fallbackGapValue:_})}}});let z=Object.entries(b).filter(([V])=>V.startsWith(":"));z?.length&&z.forEach(([V,M])=>{let k=Ip(M);if(!k?.length)return;let U=`:root :where(${v.split(",").map(G=>G+V).join(",")}){${k.join(";")};}`;g+=U})}),l.layoutStyles&&(g=g+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",g=g+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",g=g+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),l.blockGap&&r){let v=kI(e?.styles?.spacing?.blockGap)||"0.5em";g=g+`:root :where(.wp-site-blocks) > * { margin-block-start: ${v}; margin-block-end: 0; }`,g=g+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",g=g+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return l.presets&&u.forEach(({selector:v,presets:y})=>{(Ra===v||Ny===v)&&(v="");let b=ohe(v,y);b.length>0&&(g+=b)}),g};function uhe(e,t){return RI(e,t).flatMap(({presets:o})=>nhe(o))}var dhe=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let r={root:t};return Object.entries(the).forEach(([o,n])=>{let i=Op(e,o);i&&(r[n]=i)}),r},fhe=(e,t)=>{let{getBlockStyles:r}=(0,G8.select)(en.store),o={};return e.forEach(n=>{let i=n.name,a=Op(n);if(!a)return;let l=Op(n,"filter.duotone");if(!l){let h=Op(n),g=(0,en.getBlockSupport)(n,"color.__experimentalDuotone",!1);l=g&&h&&Us(h,g)}let c=!!n?.supports?.layout||!!n?.supports?.__experimentalLayout,u=n?.supports?.spacing?.blockGap?.__experimentalDefault,d=r(i),f={};d?.forEach(h=>{let g=t?`-${t}`:"",v=`${h.name}${g}`,y=h8(v,a);f[v]=y});let m=dhe(n,a);o[i]={duotoneSelector:l??void 0,fallbackGapValue:u,featureSelectors:Object.keys(m).length?m:void 0,hasLayoutSupport:c,name:i,selector:a,styleVariationSelectors:d?.length?f:void 0}}),o};function mhe(e){let t=e.styles?.blocks,r=t?.["core/separator"];return r&&r.color?.background&&!r.color?.text&&!r.border?.color?{...e,styles:{...e.styles,blocks:{...t,"core/separator":{...r,color:{...r.color,text:r.color?.background}}}}}:e}function EI(e,t){let r="";return!e||e.trim()===""||e.split("&").forEach(n=>{if(!n||n.trim()==="")return;if(!n.includes("{"))r+=`:root :where(${t}){${n.trim()}}`;else{let a=n.replace("}","").split("{");if(a.length!==2)return;let[l,c]=a,u=l.match(/([>+~\s]*::[a-zA-Z-]+)/),d=u?u[1]:"",f=u?l.replace(d,"").trim():l.trim(),m;f===""?m=t:m=l.startsWith(" ")?Us(t,f):p8(t,f),r+=`:root :where(${m})${d}{${c.trim()}}`}}),r}function jy(e={},t=[],r={}){let{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i=!1,disableRootPadding:a=!1,styleOptions:l={}}=r,c=t.length>0?t:(0,en.getBlockTypes)(),u=mf(e,"spacing.blockGap"),d=o??u!==null,f=n??!d;if(!e?.styles||!e?.settings)return[[],{}];let m=mhe(e),h=fhe(c),g=lhe(m,h),v=che(m,h,d,f,i,a,l),y=uhe(m,h),b=[{css:g,isGlobalStyles:!0},{css:v,isGlobalStyles:!0},{css:m?.styles?.css??"",isGlobalStyles:!0},{assets:y,__unstableType:"
|
||
|
|
body{
|
||
|
|
padding: 24px;
|
||
|
|
min-height:${Math.round(c)}px;
|
||
|
|
display:flex;
|
||
|
|
align-items:center;
|
||
|
|
}
|
||
|
|
.is-root-container { width: 100%; }
|
||
|
|
`}]})})}):null},vz=uye;var yz=s(A(),1),bz=s(C(),1);function Tr({children:e,level:t=2}){return(0,bz.jsx)(yz.__experimentalHeading,{className:"global-styles-ui-subtitle",level:t,children:e})}var Yr=s(C(),1),dye={backgroundSize:"cover",backgroundPosition:"50% 50%"};function _b(e){if(!e)return e;let t=e.color||e.width;if(!e.style&&t)return{...e,style:"solid"};if(!(e.style&&!t))return e}function fye(e){return e&&((0,Nf.__experimentalHasSplitBorders)(e)?{top:_b(e.top),right:_b(e.right),bottom:_b(e.bottom),left:_b(e.left)}:_b(e))}var{useHasDimensionsPanel:mye,useHasTypographyPanel:pye,useHasBorderPanel:hye,useSettingsForBlockElement:gye,useHasColorPanel:vye,useHasFiltersPanel:yye,useHasImageSettingsPanel:bye,useHasBackgroundPanel:Sye,BackgroundPanel:_ye,BorderPanel:wye,ColorPanel:xye,TypographyPanel:Cye,DimensionsPanel:Tye,FiltersPanel:Pye,ImageSettingsPanel:kye,AdvancedPanel:Eye}=rt(_z.privateApis);function Rye({name:e,variation:t}){let{user:r,onChange:o}=(0,eh.useContext)(Br),n=[];t&&(n=["variations",t].concat(n));let i=n.join("."),[a]=Ee(i,e,"user",!1),[l,c]=Ee(i,e,"merged",!1),[u]=pe("",e,"user"),[d,f]=pe("",e),m=gye(d,e),h=(0,Sz.getBlockType)(e),g=!1;m?.spacing?.blockGap&&h?.supports?.spacing?.blockGap&&(h?.supports?.spacing?.__experimentalSkipSerialization===!0||h?.supports?.spacing?.__experimentalSkipSerialization?.some?.(L=>L==="blockGap"))&&(g=!0);let v=!1;m?.dimensions?.aspectRatio&&e==="core/group"&&(v=!0);let y=(0,eh.useMemo)(()=>{let L=structuredClone(m);return g&&(L.spacing.blockGap=!1),v&&(L.dimensions.aspectRatio=!1),L},[m,g,v]),b=Sb(e),_=Sye(y),S=pye(y),x=vye(y),T=hye(y),R=mye(y),F=yye(y),D=bye(e,u,y),z=!!b?.length&&!t,{canEditCSS:V}=(0,wz.useSelect)(L=>{let{getEntityRecord:j,__experimentalGetCurrentGlobalStylesId:H}=L(xz.store),X=H();return{canEditCSS:!!(X?j("root","globalStyles",X):void 0)?._links?.["wp:action-edit-css"]}},[]),M=t?b.find(L=>L.name===t):null,k=(0,eh.useMemo)(()=>({...l,layout:y.layout}),[l,y.layout]),I=(0,eh.useMemo)(()=>({...a,layout:u.layout}),[a,u.layout]),U=L=>{let j={...L};delete j.layout,c(j),L.layout!==u.layout&&f({...u,layout:L.layout})},G=L=>{f(L===void 0?{...d,lightbox:void 0}:{...d,lightbox:{...d.lightbox,...L}})},Y=L=>{let{settings:j,...H}=L;if(j?.typography){let X=Dy(r,i,H,e);X=Oy(X,"typography",{...u.typography,...j.typography},e),o(X)}else c(H)},Z=L=>{if(!L?.border){c(L);return}let{radius:j,...H}=L.border,X=fye(H),ae=(0,Nf.__experimentalHasSplitBorders)(X)?{color:null,style:null,width:null,...X}:{top:X,right:X,bottom:X,left:X};c({...L,border:{...ae,radius:j}})};return(0,Yr.jsxs)(Yr.Fragment,{children:[(0,Yr.jsx)(St,{title:t?M?.label:h?.title}),(0,Yr.jsx)(vz,{name:e,variation:t}),z&&(0,Yr.jsx)("div",{className:"global-styles-ui-screen-variations",children:(0,Yr.jsxs)(Nf.__experimentalVStack,{spacing:3,children:[(0,Yr.jsx)(Tr,{children:(0,th.__)("Style Variations")}),(0,Yr.jsx)(uz,{name:e})]})}),x&&(0,Yr.jsx)(xye,{inheritedValue:l,value:a,onChange:c,settings:y}),_&&(0,Yr.jsx)(_ye,{inheritedValue:l,value:a,onChange:c,settings:y,defaultValues:dye}),S&&(0,Yr.jsx)(Cye,{inheritedValue:l,value:a,onChange:Y,settings:y,isGlobalStyles:!0}),R&&(0,Yr.jsx)(Tye,{inheritedValue:k,value:I,onChange:U,settings:y,includeLayoutControls:!0}),T&&(0,Yr.jsx)(wye,{inheritedValue:l,value:a,onChange:Z,settings:y}),F&&(0,Yr.jsx)(Pye,{inheritedValue:k,value:I,onChange:c,settings:y,includeLayoutControls:!0}),D&&(0,Yr.jsx)(kye,{onChange:G,value:u,inheritedValue:y}),V&&(0,Yr.jsx)(Nf.PanelBody,{title:(0,th.__)("Advanced"),initialOpen:!1,children:(0,Yr.jsx)(Eye,{value:a,onChange:c,inheritedValue:l,help:(0,th.sprintf)((0,th.__)("Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value."),h?.title)})})]})}var R6=Rye;var Ax=s(E(),1),MU=s(A(),1),LU=s(B(),1);var Cz=s(A(),1);var Tz=s(C(),1);function Bu({children:e,className:t}){return(0,Tz.jsx)(Cz.__experimentalSpacer,{className:re("global-styles-ui-screen-body",t),padding:4,children:e})}var Mu=s(E(),1),Xl=s(A(),1);var oi=s(C(),1);function wb({parentMenu:e,element:t,label:r}){let o=
|
||
|
|
`),new k("",d,""),new k("",l,"]"),new k("",l," for "),new k("",T,""),new k("",u,""),new k("",l," a "),new k("",l," that "),new k(" ",b,""),new k("",l,". "),new k(".",l,""),new k(" ",l,", "),new k("",R,""),new k("",l," with "),new k("",l,"'"),new k("",l," from "),new k("",l," by "),new k("",F,""),new k("",D,""),new k(" the ",l,""),new k("",f,""),new k("",l,". The "),new k("",_,""),new k("",l," on "),new k("",l," as "),new k("",l," is "),new k("",g,""),new k("",c,"ing "),new k("",l,`
|
||
|
|
`),new k("",l,":"),new k(" ",l,". "),new k("",l,"ed "),new k("",M,""),new k("",z,""),new k("",h,""),new k("",l,"("),new k("",b,", "),new k("",v,""),new k("",l," at "),new k("",l,"ly "),new k(" the ",l," of "),new k("",m,""),new k("",y,""),new k(" ",b,", "),new k("",b,'"'),new k(".",l,"("),new k("",_," "),new k("",b,'">'),new k("",l,'="'),new k(" ",l,"."),new k(".com/",l,""),new k(" the ",l," of the "),new k("",b,"'"),new k("",l,". This "),new k("",l,","),new k(".",l," "),new k("",b,"("),new k("",b,"."),new k("",l," not "),new k(" ",l,'="'),new k("",l,"er "),new k(" ",_," "),new k("",l,"al "),new k(" ",_,""),new k("",l,"='"),new k("",_,'"'),new k("",b,". "),new k(" ",l,"("),new k("",l,"ful "),new k(" ",b,". "),new k("",l,"ive "),new k("",l,"less "),new k("",_,"'"),new k("",l,"est "),new k(" ",b,"."),new k("",_,'">'),new k(" ",l,"='"),new k("",b,","),new k("",l,"ize "),new k("",_,"."),new k("\xC2\xA0",l,""),new k(" ",l,","),new k("",b,'="'),new k("",_,'="'),new k("",l,"ous "),new k("",_,", "),new k("",b,"='"),new k(" ",b,","),new k(" ",_,'="'),new k(" ",_,", "),new k("",_,","),new k("",_,"("),new k("",_,". "),new k(" ",_,"."),new k("",_,"='"),new k(" ",_,". "),new k(" ",b,'="'),new k(" ",_,"='"),new k(" ",b,"='")];i.kTransforms=I,i.kNumTransforms=I.length;function U(G,Y){return G[Y]<192?(G[Y]>=97&&G[Y]<=122&&(G[Y]^=32),1):G[Y]<224?(G[Y+1]^=32,2):(G[Y+2]^=5,3)}i.transformDictionaryWord=function(G,Y,Z,L,j){var H=I[j].prefix,X=I[j].suffix,ae=I[j].transform,ne=ae<S?0:ae-(S-1),ue=0,Ye=Y,ye;ne>L&&(ne=L);for(var oe=0;oe<H.length;)G[Y++]=H[oe++];for(Z+=ne,L-=ne,ae<=y&&(L-=ae),ue=0;ue<L;ue++)G[Y++]=a.dictionary[Z+ue];if(ye=Y-L,ae===b)U(G,ye);else if(ae===_)for(;L>0;){var ge=U(G,ye);ye+=ge,L-=ge}for(var Re=0;Re<X.length;)G[Y++]=X[Re++];return Y-Ye}},{"./dictionary":6}],12:[function(o,n,i){n.exports=o("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)})();var Sx=(e=>typeof Zn<"u"?Zn:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof Zn<"u"?Zn:t)[r]}):e)(function(e){if(typeof Zn<"u")return Zn.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),aU=(function(){var e,t,r;return(function(){function o(n,i,a){function l(d,f){if(!i[d]){if(!n[d]){var m=typeof Sx=="function"&&Sx;if(!f&&m)return m(d,!0);if(c)return c(d,!0);var h=new Error("Cannot find module '"+d+"'");throw h.code="MODULE_NOT_FOUND",h}var g=i[d]={exports:{}};n[d][0].call(g.exports,function(v){var y=n[d][1][v];return l(y||v)},g,g.exports,o,n,i,a)}return i[d].exports}for(var c=typeof Sx=="function"&&Sx,u=0;u<a.length;u++)l(a[u]);return l}return o})()({1:[function(o,n,i){"use strict";var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function l(d,f){return Object.prototype.hasOwnProperty.call(d,f)}i.assign=function(d){for(var f=Array.prototype.slice.call(arguments,1);f.length;){var m=f.shift();if(m){if(typeof m!="object")throw new TypeError(m+"must be non-object");for(var h in m)l(m,h)&&(d[h]=m[h])}}return d},i.shrinkBuf=function(d,f){return d.length===f?d:d.subarray?d.subarray(0,f):(d.length=f,d)};var c={arraySet:function(d,f,m,h,g){if(f.subarray&&d.subarray){d.set(f.subarray(m,m+h),g);return}for(var v=0;v<h;v++)d[g+v]=f[m+v]},flattenChunks:function(d){var f,m,h,g,v,y;for(h=0,f=0,m=d.length;f<m;f++)h+=d[f].length;for(y=new Uint8Array(h),g=0,f=0,m=d.length;f<m;f++)v=d[f],y.set(v,g),g+=v.length;return y}},u={arraySet:function(d,f,m,h,g){for(var v=0;v<h;v++)d[g+v]=f[m+v]},flattenChunks:function(d){return[].concat.apply([],d)}};i.setTyped=function(d){d?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,c)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,u))},i.setTyped(a)},{}],2:[function(o,n,i){"use strict";var a=o("./common"),l=!0,c=!0;try{String.fromCharCode.apply(null,[0])}catch{l=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{c=!1}for(var u=new a.Buf8(256),d=0;d<256;d++)u[d]=d>=252?6:d>=248?5:d>=240?4:d>=224?3:d>=192?2:1;u[254]=u[254]=1,i.string2buf=function(m){var h,g,v,y,b,_=m.length,S=0;for(y=0;y<_;y++)g=m.charCodeAt(y),(g&64512)===55296&&y+1<_&&(v=m.charCodeAt
|
||
|
|
@font-face {
|
||
|
|
font-family: "${e}";
|
||
|
|
${i.join(`
|
||
|
|
`)}
|
||
|
|
src: url("${t}") format("${o}");
|
||
|
|
}`,globalThis.document.head.appendChild(n),n}var dbe=[0,1,0,0],fbe=[79,84,84,79],mbe=[119,79,70,70],pbe=[119,79,70,50];function wx(e,t){if(e.length===t.length){for(let r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function hbe(e){let t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];if(wx(t,dbe)||wx(t,fbe))return"SFNT";if(wx(t,mbe))return"WOFF";if(wx(t,pbe))return"WOFF2"}function gbe(e){if(!e.ok)throw new Error(`HTTP ${e.status} - ${e.statusText}`);return e}var Cx=class extends Zye{constructor(e,t={}){super(),this.name=e,this.options=t,this.metrics=!1}get src(){return this.__src}set src(e){this.__src=e,(async()=>(globalThis.document&&!this.options.skipStyleSheet&&await ube(this.name,e,this.options),this.loadFont(e)))()}async loadFont(e,t){fetch(e).then(r=>gbe(r)&&r.arrayBuffer()).then(r=>this.fromDataBuffer(r,t||e)).catch(r=>{let o=new _x("error",r,`Failed to load font at ${t||e}`);this.dispatch(o),this.onerror&&this.onerror(o)})}async fromDataBuffer(e,t){this.fontData=new DataView(e);let r=hbe(this.fontData);if(!r)throw new Error(`${t} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(r);let o=new _x("load",{font:this});this.dispatch(o),this.onload&&this.onload(o)}async parseBasicData(e){return lbe().then(t=>(e==="SFNT"&&(this.opentype=new Jye(this,this.fontData,t)),e==="WOFF"&&(this.opentype=new ebe(this,this.fontData,t)),e==="WOFF2"&&(this.opentype=new obe(this,this.fontData,t)),this.opentype))}getGlyphId(e){return this.opentype.tables.cmap.getGlyphId(e)}reverse(e){return this.opentype.tables.cmap.reverse(e)}supports(e){return this.getGlyphId(e)!==0}supportsVariation(e){return this.opentype.tables.cmap.supportsVariation(e)!==!1}measureText(e,t=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let r=document.createElement("div");r.textContent=e,r.style.fontFamily=this.name,r.style.fontSize=`${t}px`,r.style.color="transparent",r.style.background="transparent",r.style.top="0",r.style.left="0",r.style.position="absolute",document.body.appendChild(r);let o=r.getBoundingClientRect();document.body.removeChild(r);let n=this.opentype.tables["OS/2"];return o.fontSize=t,o.ascender=n.sTypoAscender,o.descender=n.sTypoDescender,o}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);let e=new _x("unload",{font:this});this.dispatch(e),this.onunload&&this.onunload(e)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);let e=new _x("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}};globalThis.Font=Cx;var $l=class extends pr{constructor(e,t,r){super(e),this.plaformID=t,this.encodingID=r}},vbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=0,this.length=e.uint16,this.language=e.uint16,this.glyphIdArray=[...new Array(256)].map(o=>e.uint8)}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=e&&e<=255}reverse(e){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}},ybe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=2,this.length=e.uint16,this.language=e.uint16,this.subHeaderKeys=[...new Array(256)].map(a=>e.uint16);let o=Math.max(...this.subHeaderKeys),n=e.currentPosition;we(this,"subHeaders",()=>(e.currentPosition=n,[...new Array(o)].map(a=>new bbe(e))));let i=n+o*8;we(this,"glyphIndexArray",()=>(e.currentPosition=i,[...new Array(o)].map(a=>e.uint16)))}supports(e){e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));let t=e&&255,r=e&&65280,o=this.subHeaders[r],n=this.subHeaders[o],i=n.firstCode,a=i+n.entryCount;return i<=t&&t<=a}reverse(e){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(e=!1){return e?this.subHeaders.map(t=>({firstCode:t.firstCode,last
|
||
|
|
.is-root-container {
|
||
|
|
display: flow-root;
|
||
|
|
}
|
||
|
|
`,QG=`
|
||
|
|
body {
|
||
|
|
position: relative;
|
||
|
|
padding: 32px !important;
|
||
|
|
}
|
||
|
|
|
||
|
|
${Ewe}
|
||
|
|
|
||
|
|
.editor-style-book__examples {
|
||
|
|
max-width: 1200px;
|
||
|
|
margin: 0 auto;
|
||
|
|
}
|
||
|
|
|
||
|
|
.editor-style-book__example {
|
||
|
|
max-width: 900px;
|
||
|
|
border-radius: 2px;
|
||
|
|
cursor: pointer;
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
gap: 40px;
|
||
|
|
padding: 16px;
|
||
|
|
width: 100%;
|
||
|
|
box-sizing: border-box;
|
||
|
|
scroll-margin-top: 32px;
|
||
|
|
scroll-margin-bottom: 32px;
|
||
|
|
margin: 0 auto 40px auto;
|
||
|
|
}
|
||
|
|
|
||
|
|
.editor-style-book__example.is-selected {
|
||
|
|
box-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
|
||
|
|
}
|
||
|
|
|
||
|
|
.editor-style-book__example.is-disabled-example {
|
||
|
|
pointer-events: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.editor-style-book__example:focus:not(:disabled) {
|
||
|
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
|
||
|
|
outline: 3px solid transparent;
|
||
|
|
}
|
||
|
|
|
||
|
|
.editor-style-book__duotone-example > div:first-child {
|
||
|
|
display: flex;
|
||
|
|
aspect-ratio: 16 / 9;
|
||
|
|
grid-row: span 1;
|
||
|
|
grid-column: span 2;
|
||
|
|
}
|
||
|
|
.editor-style-book__duotone-example img {
|
||
|
|
width: 100%;
|
||
|
|
height: 100%;
|
||
|
|
object-fit: cover;
|
||
|
|
}
|
||
|
|
.editor-style-book__duotone-example > div:not(:first-child) {
|
||
|
|
height: 20px;
|
||
|
|
border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
|
||
|
|
}
|
||
|
|
|
||
|
|
.editor-style-book__color-example {
|
||
|
|
border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
|
||
|
|
}
|
||
|
|
|
||
|
|
.editor-style-book__subcategory-title,
|
||
|
|
.editor-style-book__example-title {
|
||
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||
|
|
font-size: 13px;
|
||
|
|
font-weight: normal;
|
||
|
|
line-height: normal;
|
||
|
|
margin: 0;
|
||
|
|
text-align: left;
|
||
|
|
padding-top: 8px;
|
||
|
|
border-top: 1px solid color-mix( in srgb, currentColor 10%, transparent );
|
||
|
|
color: color-mix( in srgb, currentColor 60%, transparent );
|
||
|
|
}
|
||
|
|
|
||
|
|
.editor-style-book__subcategory-title {
|
||
|
|
font-size: 16px;
|
||
|
|
margin-bottom: 40px;
|
||
|
|
padding-bottom: 8px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.editor-style-book__example-preview {
|
||
|
|
width: 100%;
|
||
|
|
}
|
||
|
|
|
||
|
|
.editor-style-book__example-preview .block-editor-block-list__insertion-point,
|
||
|
|
.editor-style-book__example-preview .block-list-appender {
|
||
|
|
display: none;
|
||
|
|
}
|
||
|
|
:where(.is-root-container > .wp-block:first-child) {
|
||
|
|
margin-top: 0;
|
||
|
|
}
|
||
|
|
:where(.is-root-container > .wp-block:last-child) {
|
||
|
|
margin-bottom: 0;
|
||
|
|
}
|
||
|
|
`;var JG=s(Xe(),1);function Hb(e,t){if(!e?.slug||!t?.length)return;let r=e?.subcategories??[];if(r.length)return r.reduce((a,l)=>{let c=Hb(l,t);return c&&(a.subcategories||(a.subcategories=[]),a.subcategories=[...a.subcategories,c]),a},{title:e.title,slug:e.slug});let o=e?.blocks||[],n=e?.exclude||[],i=t.filter(a=>!n.includes(a.name)&&(a.category===e.slug||o.includes(a.name)));if(i.length)return{title:e.title,slug:e.slug,examples:i}}function n3(){let e=[...Jx,...o3].map(({slug:o})=>o),r=(0,JG.getCategories)().filter(({slug:o})=>!e.includes(o));return[...o3,...r]}var Ya=s(E(),1),jo=s(Xe(),1);var $G=s(A(),1),$x=s($(),1),i3=s(C(),1),Rwe=({colors:e,type:t,templateColumns:r="1fr 1fr",itemHeight:o="52px"})=>e?(0,i3.jsx)($G.__experimentalGrid,{templateColumns:r,rowGap:8,columnGap:16,children:e.map(n=>{let i=t==="gradients"?(0,$x.__experimentalGetGradientClass)(n.slug):(0,$x.getColorClassName)("background-color",n.slug),a=re("editor-style-book__color-example",i);return(0,i3.jsx)("div",{className:a,style:{height:o}},n.slug)})}):null,s3=Rwe;var a3=s(A(),1),Kf=s(C(),1),Awe=({duotones:e})=>e?(0,Kf.jsx)(a3.__experimentalGrid,{columns:2,rowGap:16,columnGap:16,children:e.map(t=>(0,Kf.jsxs)(a3.__experimentalGrid,{className:"editor-style-book__duotone-example",columns:2,rowGap:8,columnGap:8,children:[(0,Kf.jsx)("div",{children:(0,Kf.jsx)("img",{alt:`Duotone example: ${t.slug}`,src:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",style:{filter:`url(#wp-duotone-${t.slug})`}})}),t.colors.map(r=>(0,Kf.jsx)("div",{className:"editor-style-book__color-example",style:{backgroundColor:r}},r))]},t.slug))}):null,eW=Awe;var eC=s(C(),1);function Owe(e){if(!e)return[];let t=[];return Ch.forEach(r=>{let o=e[r.type],n=Array.isArray(o)?o.find(i=>i.slug===r.origin):void 0;if(n?.[r.type]){let i={name:r.slug,title:r.title,category:"colors"};r.type==="duotones"?(i.content=(0,eC.jsx)(eW,{duotones:n[r.type]}),t.push(i)):(i.content=(0,eC.jsx)(s3,{colors:n[r.type],type:r.type}),t.push(i))}}),t}function Iwe(e){let t=[],r=Array.isArray(e?.colors)?e.colors.find(i=>i.slug==="theme"):void 0;if(r){let i={name:"theme-colors",title:(0,Ya.__)("Colors"),category:"overview",content:(0,eC.jsx)(s3,{colors:r.colors,type:"colors",templateColumns:"repeat(auto-fill, minmax( 200px, 1fr ))",itemHeight:"32px"})};t.push(i)}let o=[];if((0,jo.getBlockType)("core/heading")){let i=(0,jo.createBlock)("core/heading",{content:(0,Ya.__)("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789X{(\u2026)},.-<>?!*&:/A@HELFO\u2122\xA9"),level:1});o.push(i)}if((0,jo.getBlockType)("core/paragraph")){let i=(0,jo.createBlock)("core/paragraph",{content:(0,Ya.__)("A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.")}),a=(0,jo.createBlock)("core/paragraph",{content:(0,Ya.__)("Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.")});if((0,jo.getBlockType)("core/group")){let l=(0,jo.createBlock)("core/group",{layout:{type:"grid",columnCount:2,minimumColumnWidth:"12rem"},style:{spacing:{blockGap:"1.5rem"}}},[i,a]);o.push(l)}else o.push(i)}return o.length&&t.push({name:"typography",title:(0,Ya.__)("Typography"),category:"overview",blocks:o}),["core/image","core/separator","core/buttons","core/pullquote","core/search"].forEach(i=>{let a=(0,jo.getBlockType)(i);if(a&&a.example){let l={name:i,title:a.title,cat
|
||
|
|
<style>
|
||
|
|
body {
|
||
|
|
margin: 0;
|
||
|
|
}
|
||
|
|
.editor-post-preview-button__interstitial-message {
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
height: 100vh;
|
||
|
|
width: 100vw;
|
||
|
|
}
|
||
|
|
@-webkit-keyframes paint {
|
||
|
|
0% {
|
||
|
|
stroke-dashoffset: 0;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
@-moz-keyframes paint {
|
||
|
|
0% {
|
||
|
|
stroke-dashoffset: 0;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
@-o-keyframes paint {
|
||
|
|
0% {
|
||
|
|
stroke-dashoffset: 0;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
@keyframes paint {
|
||
|
|
0% {
|
||
|
|
stroke-dashoffset: 0;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
.editor-post-preview-button__interstitial-message svg {
|
||
|
|
width: 192px;
|
||
|
|
height: 192px;
|
||
|
|
stroke: #555d66;
|
||
|
|
stroke-width: 0.75;
|
||
|
|
}
|
||
|
|
.editor-post-preview-button__interstitial-message svg .outer,
|
||
|
|
.editor-post-preview-button__interstitial-message svg .inner {
|
||
|
|
stroke-dasharray: 280;
|
||
|
|
stroke-dashoffset: 280;
|
||
|
|
-webkit-animation: paint 1.5s ease infinite alternate;
|
||
|
|
-moz-animation: paint 1.5s ease infinite alternate;
|
||
|
|
-o-animation: paint 1.5s ease infinite alternate;
|
||
|
|
animation: paint 1.5s ease infinite alternate;
|
||
|
|
}
|
||
|
|
p {
|
||
|
|
text-align: center;
|
||
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
`,t=(0,oK.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=(0,Jh.__)("Generating preview\u2026"),e.close()}function od({className:e,textContent:t,forceIsAutosaveable:r,role:o,onPreview:n}){let{postId:i,currentPostLink:a,previewLink:l,isSaveable:c,isViewable:u}=(0,FT.useSelect)(g=>{let v=g(w),_=g(nK.store).getPostType(v.getCurrentPostType("type"))?.viewable??!1;return _?{postId:v.getCurrentPostId(),currentPostLink:v.getCurrentPostAttribute("link"),previewLink:v.getEditedPostPreviewLink(),isSaveable:v.isEditedPostSaveable(),isViewable:_}:{isViewable:_}},[]),{__unstableSaveForPreview:d}=(0,FT.useDispatch)(w);if(!u)return null;let f=`wp-preview-${i}`;return(0,vs.jsx)(xc.Button,{variant:e?void 0:"tertiary",className:e||"editor-post-preview",href:l||a,target:f,accessibleWhenDisabled:!0,disabled:!c,onClick:async g=>{g.preventDefault();let v=window.open("",f);v.focus(),SCe(v.document);let y=await d({forceIsAutosaveable:r});v.location=y,n?.()},role:o,size:"compact",children:t||(0,vs.jsxs)(vs.Fragment,{children:[(0,Jh._x)("Preview","imperative verb"),(0,vs.jsx)(xc.VisuallyHidden,{as:"span",children:(0,Jh.__)("(opens in a new tab)")})]})})}var lK=s(A(),1),cK=s(B(),1),BT=s(O(),1),uK=s(he(),1);var Cc=s(E(),1),iK=s(O(),1),sK=s(he(),1);function DT(){let e=(0,sK.useViewportMatch)("medium","<"),{isPublished:t,isBeingScheduled:r,isSaving:o,isPublishing:n,hasPublishAction:i,isAutosaving:a,hasNonPostEntityChanges:l,postStatusHasChanged:c,postStatus:u,postType:d}=(0,iK.useSelect)(f=>{let{isCurrentPostPublished:m,isEditedPostBeingScheduled:h,isSavingPost:g,isPublishingPost:v,getCurrentPost:y,getCurrentPostType:b,isAutosavingPost:_,getPostEdits:S,getEditedPostAttribute:x}=f(w);return{isPublished:m(),isBeingScheduled:h(),isSaving:g(),isPublishing:v(),hasPublishAction:y()._links?.["wp:action-publish"]??!1,postType:b(),isAutosaving:_(),hasNonPostEntityChanges:f(w).hasNonPostEntityChanges(),postStatusHasChanged:!!S()?.status,postStatus:x("status")}},[]);return n?(0,Cc.__)("Publishing\u2026"):(t||r)&&o&&!a?(0,Cc.__)("Saving\u2026"):i?l||t||c&&!["future","publish"].includes(u)||!c&&u==="future"?(0,Cc.__)("Save"):r?(0,Cc.__)("Schedule"):(0,Cc.__)("Publish"):d===ur&&window?.__experimentalMediaEditor?(0,Cc.__)("Save"):e?(0,Cc.__)("Publish"):(0,Cc.__)("Submit for Review")}var $h=s(C(),1),aK=()=>{},_Ce=class extends cK.Component{constructor(e){super(e),this.createOnClick=this.createOnClick.bind(this),this.closeEntitiesSavedStates=this.closeEntitiesSavedStates.bind(this),this.state={entitiesSavedStatesCallback:!1}}createOnClick(e){return(...t)=>{let{hasNonPostEntityChanges:r,setEntitiesSavedStatesCallback:o}=this.props;return r&&o?(this.setState({entitiesSavedStatesCallback:()=>e(...t)}),o(()=>this.closeEntitiesSavedStates),aK):e(...t)}}closeEntitiesSavedStates(e){let{postType:t,postId:r}=this.props,{entitiesSavedStatesCallback:o}=this.state;this.setState({entitiesSavedStatesCallback:!1},()=>{e&&e.some(n=>n.kind==="postType"&&n.name===t&&n.key===r)&&o()})}render(){let{forceIsDirty:e,hasPublishAction:t,isBeingScheduled:r,isOpen:o,isPostSavingLocked:n,isPublishable:i,isPublished:a,isSaveable:l,isSaving:c,isAutoSaving:u,isToggle:d,savePostStatus:f,onSubmit:m=aK,onToggle:h,visibility:g,hasNonPostEntityChanges:v,isSavingNonPostEntityChanges:y,postStatus:b,postStatusHasChanged:_}=this.props,S=(c||!l||n||!i&&!e)&&(!v||y),x=(a||c||!l||!i&&!e)&&(!v||y),T="publish";_?T=b:t?g==="private"?T="private":r&&(T="future"):T="pending";let R=()=>{S||(m(),f(T))},F=()=>{x||h()},D={"aria-disabled":S,className:"editor-post-publish-button",isBusy:!u&&c,variant:"primary",onClick:this.createOnClick(R),"aria-haspopup":v?"dialog":void 0},z={"aria-disabled":x,"aria-expanded":o,className:"editor-post-publish-panel__toggle",isBusy:c&&a,variant:"primary",size:"compact",onClick:this.createOnClick(F),"aria-haspopup":v?"dialog":void 0},V=d?z:D;return(0,$h.jsx)($h.Fragment,{children:(0,$h.jsx)(lK.Button,{...V,className:`${V.className} editor-post-publish-button__button`,size:"compact",children:(0,$h.jsx)(DT,{})})})}},eg=(0,uK.compose)([(0,BT.withSelect)(e=>{let{i
|
||
|
|
.editor-avatar {
|
||
|
|
position: relative;
|
||
|
|
display: inline-flex;
|
||
|
|
align-items: center;
|
||
|
|
border-radius: ${Z4};
|
||
|
|
flex-shrink: 0;
|
||
|
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 2px) ${dd}, ${bk};
|
||
|
|
}
|
||
|
|
.editor-avatar__image {
|
||
|
|
box-sizing: border-box;
|
||
|
|
position: relative;
|
||
|
|
width: ${K4};
|
||
|
|
height: ${K4};
|
||
|
|
border-radius: ${Z4};
|
||
|
|
border: 0;
|
||
|
|
background-color: var(--wp-admin-theme-color, #3858e9);
|
||
|
|
overflow: hidden;
|
||
|
|
overflow: clip;
|
||
|
|
flex-shrink: 0;
|
||
|
|
font-size: 0;
|
||
|
|
color: ${dd};
|
||
|
|
}
|
||
|
|
.is-small > .editor-avatar__image {
|
||
|
|
width: ${X4};
|
||
|
|
height: ${X4};
|
||
|
|
}
|
||
|
|
.has-avatar-border-color > .editor-avatar__image {
|
||
|
|
border: var(--wp-admin-border-width-focus, 2px) solid var(--editor-avatar-outline-color);
|
||
|
|
background-clip: padding-box;
|
||
|
|
}
|
||
|
|
.has-avatar-border-color > .editor-avatar__image::after {
|
||
|
|
content: "";
|
||
|
|
position: absolute;
|
||
|
|
inset: 0;
|
||
|
|
border-radius: inherit;
|
||
|
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus, 2px) ${dd};
|
||
|
|
pointer-events: none;
|
||
|
|
z-index: 1;
|
||
|
|
}
|
||
|
|
.editor-avatar__img {
|
||
|
|
position: absolute;
|
||
|
|
inset: 0;
|
||
|
|
width: 100%;
|
||
|
|
height: 100%;
|
||
|
|
object-fit: cover;
|
||
|
|
border-radius: inherit;
|
||
|
|
opacity: 0;
|
||
|
|
}
|
||
|
|
.has-src > .editor-avatar__image > .editor-avatar__img {
|
||
|
|
opacity: 1;
|
||
|
|
}
|
||
|
|
.editor-avatar:not(.has-src) > .editor-avatar__image {
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
font-size: ${R$};
|
||
|
|
font-weight: ${J4};
|
||
|
|
border: 0;
|
||
|
|
background-clip: border-box;
|
||
|
|
}
|
||
|
|
.editor-avatar:not(.has-src) > .editor-avatar__image::after {
|
||
|
|
content: none;
|
||
|
|
}
|
||
|
|
.editor-avatar:not(.has-src).has-avatar-border-color > .editor-avatar__image {
|
||
|
|
background-color: var(--editor-avatar-outline-color);
|
||
|
|
}
|
||
|
|
.editor-avatar__name {
|
||
|
|
font-size: ${A$};
|
||
|
|
font-weight: ${J4};
|
||
|
|
line-height: ${O$};
|
||
|
|
color: var(--editor-avatar-name-color, ${dd});
|
||
|
|
min-width: 0;
|
||
|
|
padding-bottom: 2px; /* $grid-unit-05 / 2 */
|
||
|
|
overflow: hidden;
|
||
|
|
opacity: 0;
|
||
|
|
white-space: nowrap;
|
||
|
|
transition: opacity 0.15s cubic-bezier(0.15, 0, 0.15, 1);
|
||
|
|
}
|
||
|
|
.editor-avatar.is-badge {
|
||
|
|
display: inline-grid;
|
||
|
|
grid-template-columns: min-content 0fr;
|
||
|
|
column-gap: 0;
|
||
|
|
padding-inline-end: 0;
|
||
|
|
background-color: var(--wp-admin-theme-color, #3858e9);
|
||
|
|
transition:
|
||
|
|
grid-template-columns 0.3s cubic-bezier(0.15, 0, 0.15, 1),
|
||
|
|
column-gap 0.3s cubic-bezier(0.15, 0, 0.15, 1),
|
||
|
|
padding-inline-end 0.3s cubic-bezier(0.15, 0, 0.15, 1);
|
||
|
|
}
|
||
|
|
.editor-avatar.is-badge:hover {
|
||
|
|
grid-template-columns: min-content 1fr;
|
||
|
|
column-gap: ${Sk};
|
||
|
|
padding-inline-end: ${_k};
|
||
|
|
transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
|
||
|
|
}
|
||
|
|
.editor-avatar.is-badge:hover .editor-avatar__name {
|
||
|
|
opacity: 1;
|
||
|
|
transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
|
||
|
|
}
|
||
|
|
.editor-avatar.is-badge.has-avatar-border-color {
|
||
|
|
background-color: var(--editor-avatar-outline-color);
|
||
|
|
}
|
||
|
|
@media (prefers-reduced-motion: reduce) {
|
||
|
|
.editor-avatar.is-badge,
|
||
|
|
.editor-avatar__name {
|
||
|
|
transition: none;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
`;var N$=`
|
||
|
|
.block-canvas-cover {
|
||
|
|
position: absolute;
|
||
|
|
top: 0;
|
||
|
|
left: 0;
|
||
|
|
width: 100%;
|
||
|
|
height: 100%;
|
||
|
|
pointer-events: none;
|
||
|
|
z-index: 20000;
|
||
|
|
}
|
||
|
|
.block-canvas-cover .collaborators-overlay-full {
|
||
|
|
position: absolute;
|
||
|
|
top: 0;
|
||
|
|
left: 0;
|
||
|
|
width: 100%;
|
||
|
|
height: 100%;
|
||
|
|
}
|
||
|
|
.block-canvas-cover .collaborators-overlay-fixed {
|
||
|
|
position: fixed;
|
||
|
|
width: 100%;
|
||
|
|
height: 100%;
|
||
|
|
}
|
||
|
|
.collaborators-overlay-user {
|
||
|
|
position: absolute;
|
||
|
|
}
|
||
|
|
/* Cursor lines render below avatar labels across all users. The parent
|
||
|
|
.collaborators-overlay-user has no z-index so it does not create a
|
||
|
|
stacking context \u2014 children participate in the shared overlay context. */
|
||
|
|
.collaborators-overlay-user-cursor {
|
||
|
|
position: absolute;
|
||
|
|
z-index: 0;
|
||
|
|
width: ${E$};
|
||
|
|
border-radius: ${Q4};
|
||
|
|
outline: ${Q4} solid ${dd};
|
||
|
|
box-shadow: ${bk};
|
||
|
|
animation: collaborators-overlay-cursor-blink 1s infinite;
|
||
|
|
}
|
||
|
|
.collaborators-overlay-selection-rect {
|
||
|
|
position: absolute;
|
||
|
|
opacity: 0.15;
|
||
|
|
pointer-events: none;
|
||
|
|
border-radius: 2px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Overlay-specific positioning applied to the Avatar cursor label. */
|
||
|
|
.collaborators-overlay-user-label.editor-avatar {
|
||
|
|
position: absolute;
|
||
|
|
z-index: 1;
|
||
|
|
transform: translate(-11px, -100%);
|
||
|
|
margin-top: -${Sk};
|
||
|
|
pointer-events: auto;
|
||
|
|
overflow: visible;
|
||
|
|
width: max-content;
|
||
|
|
}
|
||
|
|
/* Avatar positioned above a highlighted block as a label. */
|
||
|
|
.collaborators-overlay-block-label.editor-avatar {
|
||
|
|
position: absolute;
|
||
|
|
z-index: 1;
|
||
|
|
transform: translateY(calc(-100% - ${_k}));
|
||
|
|
pointer-events: auto;
|
||
|
|
overflow: visible;
|
||
|
|
width: max-content;
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes collaborators-overlay-cursor-blink {
|
||
|
|
0%, 45% { opacity: 1; }
|
||
|
|
55%, 95% { opacity: 0; }
|
||
|
|
100% { opacity: 1; }
|
||
|
|
}
|
||
|
|
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-cursor {
|
||
|
|
animation: collaborators-overlay-cursor-highlight 0.6s ease-in-out 3;
|
||
|
|
}
|
||
|
|
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-label {
|
||
|
|
animation: collaborators-overlay-label-highlight 0.6s ease-in-out 3;
|
||
|
|
}
|
||
|
|
@keyframes collaborators-overlay-cursor-highlight {
|
||
|
|
0%, 100% {
|
||
|
|
transform: scale(1);
|
||
|
|
filter: drop-shadow(0 0 0 transparent);
|
||
|
|
}
|
||
|
|
50% {
|
||
|
|
transform: scale(1.2);
|
||
|
|
filter: drop-shadow(0 0 8px currentColor);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
@keyframes collaborators-overlay-label-highlight {
|
||
|
|
0%, 100% {
|
||
|
|
transform: translate(-11px, -100%) scale(1);
|
||
|
|
filter: drop-shadow(0 0 0 transparent);
|
||
|
|
}
|
||
|
|
50% {
|
||
|
|
transform: translate(-11px, -100%) scale(1.1);
|
||
|
|
filter: drop-shadow(0 0 6px currentColor);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
.block-editor-block-list__block.is-collaborator-selected:not(:focus)::after {
|
||
|
|
content: "";
|
||
|
|
position: absolute;
|
||
|
|
pointer-events: none;
|
||
|
|
top: 0;
|
||
|
|
right: 0;
|
||
|
|
bottom: 0;
|
||
|
|
left: 0;
|
||
|
|
outline-color: var(--collaborator-outline-color);
|
||
|
|
outline-style: solid;
|
||
|
|
outline-width: calc(var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
|
||
|
|
outline-offset: calc(-1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
|
||
|
|
box-shadow: inset 0 0 0 calc((var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1)) + 0.5px) rgba(${dd}, 0.7);
|
||
|
|
z-index: 1;
|
||
|
|
}
|
||
|
|
@media (prefers-reduced-motion: reduce) {
|
||
|
|
.collaborators-overlay-user-label,
|
||
|
|
.collaborators-overlay-user-cursor {
|
||
|
|
animation: none;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
`;function F$(e,t){let r=null,o=()=>{try{e()}catch{}r=setTimeout(o,t)};return r=setTimeout(o,t),()=>{r&&clearTimeout(r)}}var eN=s(W(),1),Ng=s(B(),1);var Ig=s(B(),1);function wk(e){let[t,r]=(0,Ig.useState)(0),o=(0,Ig.useRef)(null),n=(0,Ig.useCallback)(()=>(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(i=>i+1)},e),()=>{o.current&&clearTimeout(o.current)}),[e]);return[t,n]}var{useActiveCollaborators:vke,useResolvedSelection:yke}=N(eN.privateApis),{SelectionType:bke}=N(eN.privateApis);function D$(e,t,r,o,n){let i=(0,Ng.useRef)(new Set),a=vke(r??null,o??null),l=yke(r??null,o??null),[c,u]=(0,Ng.useState)([]),[d,f]=wk(n);return(0,Ng.useEffect)(()=>{if(!t){u([]);return}let m=i.current,h=new Set,g=a.filter(_=>{let S=_.editorState?.selection?.type===bke.WholeBlock;return!_.isMe&&S}).map(_=>{let S;try{({localClientId:S}=l(_.editorState?.selection))}catch{return null}return S?{blockId:S,color:_.isMe?"var(--wp-admin-theme-color)":ws(_.collaboratorInfo.id),userName:_.collaboratorInfo.name,avatarUrl:Nc(_.collaboratorInfo.avatar_urls)}:null}).filter(_=>!_||h.has(_.blockId)?!1:(h.add(_.blockId),!0)),v=new Set(g.map(_=>_.blockId));for(let _ of m)if(!v.has(_)){let S=$4(t,_);S&&(S.classList.remove("is-collaborator-selected"),S.style.removeProperty("--collaborator-outline-color")),m.delete(_)}let y=[],b=e?.getBoundingClientRect()??null;return g.forEach(_=>{let{color:S,blockId:x,userName:T,avatarUrl:R}=_,F=$4(t,x);if(F&&(F.classList.add("is-collaborator-selected"),F.style.setProperty("--collaborator-outline-color",S),m.add(x),b)){let D=F.getBoundingClientRect();y.push({blockId:x,userName:T,avatarUrl:R,color:S,x:D.left-b.left,y:D.top-b.top})}}),u(y),()=>{for(let _ of m){let S=$4(t,_);S&&(S.classList.remove("is-collaborator-selected"),S.style.removeProperty("--collaborator-outline-color"))}m.clear()}},[a,t,e,d,l]),{highlights:c,rerenderHighlightsAfterDelay:f}}var $4=(e,t)=>e.querySelector(`[data-block="${t}"]`);var rN=s(W(),1),z$=s(O(),1),Pk=s(B(),1),U$=s(lt(),1);var V$=s(W(),1);var Ske=500,xk=(e,t,r,o)=>e===null||!t?null:_ke(t,e,r,o)??null,_ke=(e,t,r,o)=>{let{node:n,offset:i}=tN(e,t,r),a=r.createRange();try{a.setStart(n,i)}catch{return null}a.collapse(!0);let l=a.getBoundingClientRect(),c=e.getBoundingClientRect(),u=0,d=0;l.x===0&&l.y===0&&l.width===0&&l.height===0?(u=c.left-o.left,d=c.top-o.top):(u=l.left-o.left,d=l.top-o.top);let f=l.height;if(f===0){let m=r.defaultView??window;f=parseInt(m.getComputedStyle(e).lineHeight,10)||c.height}return{x:u,y:d,height:f}},Ck=(e,t,r,o,n)=>{let i=t,a=r;i>a&&([i,a]=[a,i]);let l=tN(e,i,o),c=tN(e,a,o),u=o.createRange();try{u.setStart(l.node,l.offset),u.setEnd(c.node,c.offset)}catch{return null}let d=u.getClientRects(),f=[];for(let m of d){if(m.width===0&&m.height===0)continue;let h=m.left-n.left,g=m.top-n.top;f.some(y=>y.x===h&&y.y===g&&y.width===m.width&&y.height===m.height)||f.push({x:h,y:g,width:m.width,height:m.height})}return f.length>0?f:null},B$=(e,t,r)=>{let o=t.createRange();o.selectNodeContents(e);let n=o.getClientRects(),i=[];for(let a of n)a.width===0&&a.height===0||i.push({x:a.left-r.left,y:a.top-r.top,width:a.width,height:a.height});if(i.length===0){let a=e.getBoundingClientRect();a.width>0&&a.height>0&&i.push({x:a.left-r.left,y:a.top-r.top,width:a.width,height:a.height})}return i},M$=(e,t,r)=>{let o=r.querySelectorAll("[data-block]"),n=-1,i=-1;for(let l=0;l<o.length;l++){let c=o[l].getAttribute("data-block");c===e&&(n=l),c===t&&(i=l)}if(n===-1||i===-1)return[];n>i&&([n,i]=[i,n]);let a=[];for(let l=n+1;l<i;l++)a.push(o[l]);return a},tN=(e,t,r)=>{let o=r.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT),n=0,i=null,a=null,l=1;for(;a=o.nextNode();){if(l++,l>Ske)return i?{node:i,offset:0}:{node:e,offset:0};let c=a.nodeValue?.length??0;if(a.nodeType===Node.ELEMENT_NODE)if(a.nodeName==="BR"){if(n+1>=t){let u=o.nextNode();return u?.nodeType===Node.TEXT_NODE?{node:u,offset:0}:i?{node:i,offset:i.nodeValue?.length??0}:{node:e,offset:0}}n+=1;continue}else continue;if(c!==0){if(n+c>=t)return{node:a,offset:t-n};n+=c,a.nodeType===Node.TEXT_NODE&&(i=a)}}return i&&i.nodeValue?.
|
||
|
|
.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}
|
||
|
|
.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}
|
||
|
|
.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`,ue=[jd,Ur,qi].includes(g)&&!v&&!i&&!R,Ye=(0,Cs.useMemo)(()=>{if(!F.current)return b;let{ownerDocument:ze}=F.current,Ve=ze.documentElement.scrollTop||ze.body.scrollTop;return b+Ve},[b]),[ye,oe]=Pee(!v&&a==="post-only"&&!h),ge=(0,Cs.useMemo)(()=>[...y??[],{css:`:where(.block-editor-iframe__body){display:flow-root;${Ye?`min-height:${Ye}px;`:""}}.is-root-container{display:flow-root;${ue?"min-height:0!important;":""}}
|
||
|
|
${oe||""}
|
||
|
|
${ue?".block-editor-iframe__html{background:var(--wp-editor-canvas-background);display:flex;align-items:center;justify-content:center;min-height:100vh;}.block-editor-iframe__body{width:100%;}":""}`}],[y,ue,Ye,oe]),Re=(0,fn.__unstableUseTypewriter)();return o=(0,Zk.useMergeRefs)([F,o,a==="post-only"?Re:null,Yke({isEnabled:a==="template-locked"}),See({isEnabled:a==="template-locked"}),wee(),ye,Eee()]),(0,Ao.jsxs)("div",{className:re("editor-visual-editor","edit-post-visual-editor",n,{"has-padding":m||ue,"is-resizable":ue,"is-iframed":!t}),children:[(0,Ao.jsx)(Nee,{}),(0,Ao.jsx)(Eh,{enableResizing:ue,height:"100%",children:(0,Ao.jsxs)(Wke,{shouldIframe:!t,contentRef:o,styles:ge,height:"100%",iframeProps:{...r,style:{...r?.style,...D}},children:[T&&!x&&a==="post-only"&&!h&&(0,Ao.jsxs)(Ao.Fragment,{children:[(0,Ao.jsx)(Yk,{selector:".editor-visual-editor__post-title-wrapper",layout:V}),(0,Ao.jsx)(Yk,{selector:".block-editor-block-list__layout.is-root-container",layout:H}),U&&(0,Ao.jsx)(Yk,{css:ne}),Z&&(0,Ao.jsx)(Yk,{layout:L,css:Z})]}),a==="post-only"&&!h&&(0,Ao.jsx)("div",{className:re("editor-visual-editor__post-title-wrapper","edit-post-visual-editor__post-title-wrapper",{"has-global-padding":S}),contentEditable:!1,ref:X,style:{marginTop:"4rem"},children:(0,Ao.jsx)(BP,{ref:ae})}),(0,Ao.jsxs)(fn.RecursionProvider,{blockName:u,uniqueId:d,children:[(0,Ao.jsx)(fn.BlockList,{className:re("is-"+f.toLowerCase()+"-preview",a!=="post-only"||h?"wp-site-blocks":`${Y} wp-block-post-content`,{"has-global-padding":a==="post-only"&&!h&&S}),layout:j,dropZoneElement:t?F.current:F.current?.parentNode,__unstableDisableDropZone:a==="template-locked"}),a==="template-locked"&&(0,Ao.jsx)(vee,{contentRef:F})]})]})})]})}var Kk=qke;var Mg=s(E(),1),Xk=s(Wy(),1),Bee=[{name:"revision/diff-removed",title:(0,Mg.__)("Removed"),tagName:"del",className:"revision-diff-removed"},{name:"revision/diff-added",title:(0,Mg.__)("Added"),tagName:"ins",className:"revision-diff-added"},{name:"revision/diff-format-added",title:(0,Mg.__)("Format added"),tagName:"span",className:"revision-diff-format-added"},{name:"revision/diff-format-removed",title:(0,Mg.__)("Format removed"),tagName:"span",className:"revision-diff-format-removed"},{name:"revision/diff-format-changed",title:(0,Mg.__)("Format changed"),tagName:"span",className:"revision-diff-format-changed"}];function Mee(){for(let e of Bee)(0,Xk.registerFormatType)(e.name,{...e,attributes:{title:"title"},edit:()=>null})}function Lee(){for(let e of Bee)(0,Xk.unregisterFormatType)(e.name)}var Ui=s(B(),1),Qk=s(he(),1),jee=s(O(),1),Jk=s($(),1),H0=s(E(),1),zee=s(A(),1);var G0=s(C(),1),{useBlockElementRef:Zke}=N(Jk.privateApis);function Uee(e){let t=[];for(let r of e)r.__revisionDiffStatus?.status&&t.push({clientId:r.clientId,status:r.__revisionDiffStatus.status}),r.innerBlocks?.length&&t.push(...Uee(r.innerBlocks));return t}var Vee={added:(0,H0.__)("Go to added block"),removed:(0,H0.__)("Go to removed block"),modified:(0,H0.__)("Go to modified block")};function mN(e){if(!e)return null;let t=e.ownerDocument,r=t.documentElement.scrollHeight,o=e.getBoundingClientRect(),n=t.documentElement.scrollTop;return{top:(o.top+n)/r*100,height:o.height/r*100}}function Kke({clientId:e,status:t,subscribe:r}){let o=(0,Ui.useRef)();Zke(e,o);let[n,i]=(0,Ui.useState)(()=>mN(o.current));return(0,Ui.useEffect)(()=>r(()=>{i(mN(o.current))}),[r]),(0,Ui.useEffect)(()=>{i(mN(o.current))},[t]),n?(0,G0.jsx)(zee.Tooltip,{text:Vee[t],children:(0,G0.jsx)("button",{className:`revision-diff-marker is-${t}`,style:{top:`${n.top}%`,height:`${Math.max(n.height,.5)}%`},onClick:()=>o.current?.focus(),"aria-label":Vee[t]})}):null}function Hee(){let[e,t]=(0,Ui.useState)(!1),r=(0,Ui.useRef)(new Set),o=(0,jee.useSelect)(l=>l(Jk.store).getBlocks(),[]),n=(0,Ui.useMemo)(()=>Uee(o),[o]),i=(0,Ui.useCallback)(l=>(r.current.add(l),()=>r.current.delete(l)),[]),a=(0,Qk.useRefEffect)(l=>{let{ownerDocument:c}=l,{defaultView:u}=c,d=new u.ResizeObserver(()=>{r.current.forEach(f=>f())});return d.observe(c.body),()=>{d.disconnect()}},[]);return[(0,Qk.useMergeRefs)([a,t]),(0,G
|
||
|
|
<svg
|
||
|
|
xmlns="http://www.w3.org/2000/svg"
|
||
|
|
viewBox="0 0 0 0"
|
||
|
|
width="0"
|
||
|
|
height="0"
|
||
|
|
focusable="false"
|
||
|
|
role="none"
|
||
|
|
aria-hidden="true"
|
||
|
|
style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
|
||
|
|
>
|
||
|
|
<defs>
|
||
|
|
<filter id="revision-removed-filter" x="0" y="0" width="100%" height="100%">
|
||
|
|
<!-- Desaturate and add red tint -->
|
||
|
|
<feColorMatrix type="matrix"
|
||
|
|
values="0.5 0.3 0.2 0 0.15
|
||
|
|
0.2 0.2 0.1 0 0
|
||
|
|
0.2 0.2 0.1 0 0
|
||
|
|
0 0 0 0.8 0"/>
|
||
|
|
</filter>
|
||
|
|
</defs>
|
||
|
|
</svg>
|
||
|
|
`,Qke=`
|
||
|
|
.is-revision-added {
|
||
|
|
box-shadow: inset 0 0 0 9999px color-mix(in srgb, currentColor 5%, #00a32a 15%), 0 0 0 4px color-mix(in srgb, currentColor 5%, #00a32a 15%);
|
||
|
|
outline: 3px solid #00a32a;
|
||
|
|
outline-offset: 2px;
|
||
|
|
}
|
||
|
|
.is-revision-removed,
|
||
|
|
.revision-diff-removed {
|
||
|
|
text-decoration: line-through;
|
||
|
|
filter: url(#revision-removed-filter);
|
||
|
|
}
|
||
|
|
.is-revision-removed {
|
||
|
|
outline: 3px dashed #d63638;
|
||
|
|
outline-offset: 2px;
|
||
|
|
}
|
||
|
|
.is-revision-modified {
|
||
|
|
outline: 3px dotted #9a7000 !important;
|
||
|
|
outline-offset: 2px;
|
||
|
|
}
|
||
|
|
.revision-diff-added {
|
||
|
|
background-color: color-mix(in srgb, currentColor 5%, #00a32a 15%);
|
||
|
|
text-decoration: none;
|
||
|
|
}
|
||
|
|
.revision-diff-format-added {
|
||
|
|
text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #00a32a 70%);
|
||
|
|
text-decoration-thickness: 2px;
|
||
|
|
}
|
||
|
|
.revision-diff-format-removed {
|
||
|
|
text-decoration: underline wavy color-mix(in srgb, currentColor 20%, #d63638 80%);
|
||
|
|
text-decoration-thickness: 2px;
|
||
|
|
}
|
||
|
|
.revision-diff-format-changed {
|
||
|
|
text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #dba617 70%);
|
||
|
|
text-decoration-thickness: 2px;
|
||
|
|
}
|
||
|
|
`;function Jke(e){return t=>{let{block:r,className:o}=t,n=r?.__revisionDiffStatus?.status,i=re(o,{"is-revision-added":n==="added","is-revision-removed":n==="removed","is-revision-modified":n==="modified"});return(0,pi.jsx)(e,{...t,className:i})}}var $ke="editor/revisions-canvas/withRevisionDiffClasses";(0,Kee.addFilter)("editor.BlockListBlock",$ke,Jke);function e2e({showDiff:e}){return Gee({css:e?Qke:""}),Gee({assets:e?Xke:"",__unstableType:"svgs"}),null}function t2e({showDiff:e}){let[t,r]=Hee();return(0,pi.jsxs)(pi.Fragment,{children:[(0,pi.jsx)(Kk,{contentRef:t}),e&&r]})}function pN(){(0,Zee.useEffect)(()=>(Mee(),()=>{Lee()}),[]);let{revision:e,showDiff:t}=(0,qee.useSelect)(r=>{let{getCurrentRevision:o,isShowingRevisionDiff:n}=N(r(w));return{revision:o(),showDiff:n()}},[]);return e?(0,pi.jsxs)(pi.Fragment,{children:[(0,pi.jsx)(e2e,{showDiff:t}),(0,pi.jsx)("div",{className:"editor-revisions-canvas__content",children:(0,pi.jsx)(t2e,{showDiff:t})})]}):(0,pi.jsx)("div",{className:"editor-revisions-canvas__loading",children:(0,pi.jsx)(Wee.Spinner,{})})}var e2=s(O(),1),$k=s(B(),1),Ts=s(E(),1),Xee=s(ct(),1),Qee=s(W(),1),Jee=s(lt(),1);var{useOnCollaboratorJoin:r2e,useOnCollaboratorLeave:o2e,useOnPostSave:n2e}=N(Qee.privateApis),hN={COLLAB_POST_UPDATED:"collab-post-updated",COLLAB_USER_ENTERED:"collab-user-entered",COLLAB_USER_EXITED:"collab-user-exited"},gN=["publish","private","future"];function i2e(e,t,r){return r?(0,Ts.sprintf)((0,Ts.__)("Post published by %s."),e):gN.includes(t)?(0,Ts.sprintf)((0,Ts.__)("Post updated by %s."),e):(0,Ts.sprintf)((0,Ts.__)("Draft saved by %s."),e)}function $ee(e,t){let{postStatus:r,isCollaborationEnabled:o,showNotifications:n}=(0,e2.useSelect)(u=>{let{getCurrentPostAttribute:d,isCollaborationEnabledForCurrentPost:f}=N(u(w));return{postStatus:d("status"),isCollaborationEnabled:f(),showNotifications:u(Jee.store).get("core","showCollaborationNotifications")??!0}},[]),{createNotice:i}=(0,e2.useDispatch)(Xee.store),a=o&&n,l=a?e:null,c=a?t:null;r2e(l,c,(0,$k.useCallback)((u,d)=>{d&&u.collaboratorInfo.enteredAt<d.collaboratorInfo.enteredAt||i("info",(0,Ts.sprintf)((0,Ts.__)("%s has joined the post."),u.collaboratorInfo.name),{id:`${hN.COLLAB_USER_ENTERED}-${u.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i])),o2e(l,c,(0,$k.useCallback)(u=>{i("info",(0,Ts.sprintf)((0,Ts.__)("%s has left the post."),u.collaboratorInfo.name),{id:`${hN.COLLAB_USER_EXITED}-${u.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i])),n2e(l,c,(0,$k.useCallback)((u,d,f)=>{if(!r)return;let m=u.postStatus??r??"draft",h=f?.postStatus??r,g=!(h&&gN.includes(h))&&gN.includes(m),v=i2e(d.collaboratorInfo.name,m,g);i("info",v,{id:`${hN.COLLAB_POST_UPDATED}-${d.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i,r]))}var t2=s(O(),1),W0=s(A(),1),vN=s(E(),1),ete=s(B(),1);var Ps=s(C(),1),{Fill:slt,Slot:s2e}=(0,W0.createSlotFill)("ActionsPanel");function tte({setEntitiesSavedStatesCallback:e,closeEntitiesSavedStates:t,isEntitiesSavedStatesOpen:r,forceIsDirtyPublishPanel:o}){let{closePublishSidebar:n,togglePublishSidebar:i}=(0,t2.useDispatch)(w),{publishSidebarOpened:a,isPublishable:l,isDirty:c,hasOtherEntitiesChanges:u}=(0,t2.useSelect)(m=>{let{isPublishSidebarOpened:h,isEditedPostPublishable:g,isCurrentPostPublished:v,isEditedPostDirty:y,hasNonPostEntityChanges:b}=m(w),_=b();return{publishSidebarOpened:h(),isPublishable:!v()&&g(),isDirty:_||y(),hasOtherEntitiesChanges:_}},[]),d=(0,ete.useCallback)(()=>e(!0),[]),f;return a?f=(0,Ps.jsx)(oP,{onClose:n,forceIsDirty:o,PrePublishExtension:XC.Slot,PostPublishExtension:YC.Slot}):l&&!u?f=(0,Ps.jsx)("div",{className:"editor-layout__toggle-publish-panel",children:(0,Ps.jsx)(W0.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:i,"aria-expanded":!1,children:(0,vN.__)("Open publish panel")})}):f=(0,Ps.jsx)("div",{className:"editor-layout__toggle-entities-saved-states-panel",children:(0,Ps.jsx)(W0.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:d,"aria-expanded":!1,"aria-haspopup":"dialog",disabled:!c,accessibleWhenDisabled:!0,children:(0,vN.__)("O
|
||
|
|
/*! Bundled license information:
|
||
|
|
|
||
|
|
autosize/dist/autosize.js:
|
||
|
|
(*!
|
||
|
|
autosize 4.0.2
|
||
|
|
license: MIT
|
||
|
|
http://www.jacklmoore.com/autosize
|
||
|
|
*)
|
||
|
|
|
||
|
|
is-plain-object/dist/is-plain-object.mjs:
|
||
|
|
(*!
|
||
|
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||
|
|
*
|
||
|
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||
|
|
* Released under the MIT License.
|
||
|
|
*)
|
||
|
|
*/
|