Read more: %1$s"),t||(0,ot.__)("(no title)")),{a:(0,Je.jsx)("a",{className:"wp-block-latest-posts__read-more",href:e.link,rel:"noopener noreferrer",onClick:I}),span:(0,Je.jsx)("span",{className:"screen-reader-text"})})]}):o;return(0,Je.jsxs)("li",{children:[l&&(0,Je.jsx)("div",{className:s,children:w?(0,Je.jsx)("a",{href:e.link,rel:"noreferrer noopener",onClick:I,children:c}):c}),(0,Je.jsx)("a",{className:"wp-block-latest-posts__post-title",href:e.link,rel:"noreferrer noopener",dangerouslySetInnerHTML:t?{__html:t}:void 0,onClick:I,children:t?null:(0,ot.__)("(no title)")}),h&&n&&(0,Je.jsx)("div",{className:"wp-block-latest-posts__post-author",children:(0,ot.sprintf)((0,ot.__)("by %s"),n.name)}),g&&e.date_gmt&&(0,Je.jsx)("time",{dateTime:(0,Aa.format)("c",e.date_gmt),className:"wp-block-latest-posts__post-date",children:(0,Aa.dateI18n)(F,e.date_gmt)}),m&&"excerpt"===p&&(0,Je.jsx)("div",{className:"wp-block-latest-posts__post-excerpt",children:u}),m&&"full_post"===p&&(0,Je.jsx)("div",{className:"wp-block-latest-posts__post-full-content",dangerouslySetInnerHTML:{__html:e.content.raw.trim()}})]},e.id)}))})]})},deprecated:Cp},Ap=()=>et({name:Dp,metadata:Mp,settings:zp}),Rp={A:"upper-alpha",a:"lower-alpha",I:"upper-roman",i:"lower-roman"};function Hp(e){const{values:t,start:o,reversed:n,ordered:a,type:r,...i}=e,s=document.createElement(a?"ol":"ul");s.innerHTML=t,o&&s.setAttribute("start",o),n&&s.setAttribute("reversed",!0),r&&s.setAttribute("type",r);const[l]=(0,Ke.rawHandler)({HTML:s.outerHTML});return[{...i,...l.attributes},l.innerBlocks]}const Lp={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0},color:{gradients:!0,link:!0},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,values:o,type:n,reversed:a,start:r}=e,i=t?"ol":"ul";return(0,Je.jsx)(i,{...nt.useBlockProps.save({type:n,reversed:a,start:r}),children:(0,Je.jsx)(nt.RichText.Content,{value:o,multiline:"li"})})},migrate:lo,isEligible:({style:e})=>e?.typography?.fontFamily},Vp={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,values:o,type:n,reversed:a,start:r}=e,i=t?"ol":"ul";return(0,Je.jsx)(i,{...nt.useBlockProps.save({type:n,reversed:a,start:r}),children:(0,Je.jsx)(nt.RichText.Content,{value:o,multiline:"li"})})},migrate:Hp},Fp={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},isEligible:({type:e})=>!!e,save({attributes:e}){const{ordered:t,type:o,reversed:n,start:a}=e,r=t?"ol":"ul";return(0,Je.jsx)(r,{...nt.useBlockProps.save({type:o,reversed:n,start:a}),children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})},migrate:function(e){const{type:t}=e;return t&&Rp[t]?{...e,type:Rp[t]}:e}},Ep={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalOnMerge:"true",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,type:o,reversed:n,start:a}=e,r=t?"ol":"ul";return(0,Je.jsx)(r,{...nt.useBlockProps.save({reversed:n,start:a,style:{listStyleType:t&&"decimal"!==o?o:void 0}}),children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})}},Op=[Ep,Fp,Vp,Lp],$p=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM15.4697 14.9697L18.4393 12L15.4697 9.03033L16.5303 7.96967L20.0303 11.4697L20.5607 12L20.0303 12.5303L16.5303 16.0303L15.4697 14.9697Z"})}),Gp=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z"})}),Up=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})}),qp=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),Wp=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M3.8 15.8h8.9v-1.5H3.8v1.5zm0-7h8.9V7.2H3.8v1.6zm14.7-2.1V10h1V5.3l-2.2.7.3 1 .9-.3zm1.2 6.1c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5H20v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3 0-.8-.3-1.1z"})}),Zp=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM5 6.7V10h1V5.3L3.8 6l.4 1 .8-.3zm-.4 5.7c-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-1c.3-.6.8-1.4.9-2.1.1-.3 0-.8-.2-1.1-.5-.6-1.3-.5-1.7-.4z"})}),Qp=window.wp.deprecated;var Kp=o.n(Qp);const Yp=({setAttributes:e,reversed:t,start:o,type:n})=>(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.PanelBody,{title:(0,ot.__)("Settings"),children:[(0,Je.jsx)(tt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("List style"),options:[{label:(0,ot.__)("Numbers"),value:"decimal"},{label:(0,ot.__)("Uppercase letters"),value:"upper-alpha"},{label:(0,ot.__)("Lowercase letters"),value:"lower-alpha"},{label:(0,ot.__)("Uppercase Roman numerals"),value:"upper-roman"},{label:(0,ot.__)("Lowercase Roman numerals"),value:"lower-roman"}],value:n,onChange:t=>e({type:t})}),(0,Je.jsx)(tt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Start value"),type:"number",onChange:t=>{const o=parseInt(t,10);e({start:isNaN(o)?void 0:o})},value:Number.isInteger(o)?o.toString(10):"",step:"1"}),(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Reverse order"),checked:t||!1,onChange:t=>{e({reversed:t||void 0})}})]})});const Jp=(0,st.forwardRef)((function(e,t){const{ordered:o,...n}=e,a=o?"ol":"ul";return(0,Je.jsx)(a,{ref:t,...n})})),Xp={name:"core/list-item"},em=[["core/list-item"]];function tm({clientId:e}){const t=function(e){const{replaceBlocks:t,selectionChange:o}=(0,it.useDispatch)(nt.store),{getBlockRootClientId:n,getBlockAttributes:a,getBlock:r}=(0,it.useSelect)(nt.store);return(0,st.useCallback)((()=>{const i=n(e),s=a(i),l=(0,Ke.createBlock)("core/list-item",s),{innerBlocks:c}=r(e);t([i],[l,...c]),o(c[c.length-1].clientId)}),[e])}(e),o=(0,it.useSelect)((t=>{const{getBlockRootClientId:o,getBlockName:n}=t(nt.store);return"core/list-item"===n(o(e))}),[e]);return(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)(tt.ToolbarButton,{icon:(0,ot.isRTL)()?$p:Gp,title:(0,ot.__)("Outdent"),description:(0,ot.__)("Outdent list item"),disabled:!o,onClick:t})})}function om({phrasingContentSchema:e}){const t={...e,ul:{},ol:{attributes:["type","start","reversed"]}};return["ul","ol"].forEach((e=>{t[e].children={li:{children:t}}})),t}function nm(e){return e.flatMap((({name:e,attributes:t,innerBlocks:o=[]})=>"core/list-item"===e?[t.content,...nm(o)]:nm(o)))}const am={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph","core/heading"],transform:e=>{let t=[];if(e.length>1)t=e.map((({content:e})=>(0,Ke.createBlock)("core/list-item",{content:e})));else if(1===e.length){const o=(0,Ho.create)({html:e[0].content});t=(0,Ho.split)(o,"\n").map((e=>(0,Ke.createBlock)("core/list-item",{content:(0,Ho.toHTMLString)({value:e})})))}return(0,Ke.createBlock)("core/list",{anchor:e.anchor},t)}},{type:"raw",selector:"ol,ul",schema:e=>({ol:om(e).ol,ul:om(e).ul}),transform:function e(t){const o=t.getAttribute("type"),n={ordered:"OL"===t.tagName,anchor:""===t.id?void 0:t.id,start:t.getAttribute("start")?parseInt(t.getAttribute("start"),10):void 0,reversed:!!t.hasAttribute("reversed")||void 0,type:o&&Rp[o]?Rp[o]:void 0},a=Array.from(t.children).map((t=>{const o=Array.from(t.childNodes).filter((e=>e.nodeType!==e.TEXT_NODE||0!==e.textContent.trim().length));o.reverse();const[n,...a]=o;if(!("UL"===n?.tagName||"OL"===n?.tagName))return(0,Ke.createBlock)("core/list-item",{content:t.innerHTML});const r=a.map((e=>e.nodeType===e.TEXT_NODE?e.textContent:e.outerHTML));r.reverse();const i={content:r.join("").trim()},s=[e(n)];return(0,Ke.createBlock)("core/list-item",i,s)}));return(0,Ke.createBlock)("core/list",n,a)}},...["*","-"].map((e=>({type:"prefix",prefix:e,transform:e=>(0,Ke.createBlock)("core/list",{},[(0,Ke.createBlock)("core/list-item",{content:e})])}))),...["1.","1)"].map((e=>({type:"prefix",prefix:e,transform:e=>(0,Ke.createBlock)("core/list",{ordered:!0},[(0,Ke.createBlock)("core/list-item",{content:e})])})))],to:[...["core/paragraph","core/heading"].map((e=>({type:"block",blocks:[e],transform:(t,o)=>nm(o).map((t=>(0,Ke.createBlock)(e,{content:t})))})))]},rm=am,im={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/list",title:"List",category:"text",allowedBlocks:["core/list-item"],description:"An organized collection of items displayed in a specific order.",keywords:["bullet list","ordered list","numbered list"],textdomain:"default",attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,html:!1,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalOnMerge:!0,__experimentalSlashInserter:!0,interactivity:{clientNavigation:!0}},selectors:{border:".wp-block-list:not(.wp-block-list .wp-block-list)"},editorStyle:"wp-block-list-editor",style:"wp-block-list"},{name:sm}=im,lm={icon:Np,example:{innerBlocks:[{name:"core/list-item",attributes:{content:(0,ot.__)("Alice.")}},{name:"core/list-item",attributes:{content:(0,ot.__)("The White Rabbit.")}},{name:"core/list-item",attributes:{content:(0,ot.__)("The Cheshire Cat.")}},{name:"core/list-item",attributes:{content:(0,ot.__)("The Mad Hatter.")}},{name:"core/list-item",attributes:{content:(0,ot.__)("The Queen of Hearts.")}}]},transforms:rm,edit:function({attributes:e,setAttributes:t,clientId:o,style:n}){const{ordered:a,type:r,reversed:i,start:s}=e,l=(0,nt.useBlockProps)({style:{...st.Platform.isNative&&n,listStyleType:a&&"decimal"!==r?r:void 0}}),c=(0,nt.useInnerBlocksProps)(l,{defaultBlock:Xp,directInsert:!0,template:em,templateLock:!1,templateInsertUpdatesSelection:!0,...st.Platform.isNative&&{marginVertical:8,marginHorizontal:8,renderAppender:!1},__experimentalCaptureToolbars:!0});!function(e,t){const o=(0,it.useRegistry)(),{updateBlockAttributes:n,replaceInnerBlocks:a}=(0,it.useDispatch)(nt.store);(0,st.useEffect)((()=>{if(!e.values)return;const[r,i]=Hp(e);Kp()("Value attribute on the list block",{since:"6.0",version:"6.5",alternative:"inner blocks"}),o.batch((()=>{n(t,r),a(t,i)}))}),[e.values])}(e,o);const u=(0,Je.jsxs)(nt.BlockControls,{group:"block",children:[(0,Je.jsx)(tt.ToolbarButton,{icon:(0,ot.isRTL)()?Up:qp,title:(0,ot.__)("Unordered"),description:(0,ot.__)("Convert to unordered list"),isActive:!1===a,onClick:()=>{t({ordered:!1})}}),(0,Je.jsx)(tt.ToolbarButton,{icon:(0,ot.isRTL)()?Wp:Zp,title:(0,ot.__)("Ordered"),description:(0,ot.__)("Convert to ordered list"),isActive:!0===a,onClick:()=>{t({ordered:!0})}}),(0,Je.jsx)(tm,{clientId:o})]});return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Jp,{ordered:a,reversed:i,start:s,...c}),u,a&&(0,Je.jsx)(Yp,{setAttributes:t,reversed:i,start:s,type:r})]})},save:function({attributes:e}){const{ordered:t,type:o,reversed:n,start:a}=e,r=t?"ol":"ul";return(0,Je.jsx)(r,{...nt.useBlockProps.save({reversed:n,start:a,style:{listStyleType:t&&"decimal"!==o?o:void 0}}),children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})},deprecated:Op},cm=()=>et({name:sm,metadata:im,settings:lm}),um=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M12 11v1.5h8V11h-8zm-6-1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),dm=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM20.0303 9.03033L17.0607 12L20.0303 14.9697L18.9697 16.0303L15.4697 12.5303L14.9393 12L15.4697 11.4697L18.9697 7.96967L20.0303 9.03033Z"})}),pm=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-8-3.5l3 3-3 3 1 1 4-4-4-4-1 1z"})});function mm(e){const{replaceBlocks:t,selectionChange:o,multiSelect:n}=(0,it.useDispatch)(nt.store),{getBlock:a,getPreviousBlockClientId:r,getSelectionStart:i,getSelectionEnd:s,hasMultiSelection:l,getMultiSelectedBlockClientIds:c}=(0,it.useSelect)(nt.store);return(0,st.useCallback)((()=>{const u=l(),d=u?c():[e],p=d.map((e=>(0,Ke.cloneBlock)(a(e)))),m=r(e),g=(0,Ke.cloneBlock)(a(m));g.innerBlocks?.length||(g.innerBlocks=[(0,Ke.createBlock)("core/list")]),g.innerBlocks[g.innerBlocks.length-1].innerBlocks.push(...p);const h=i(),x=s();return t([m,...d],[g]),u?n(p[0].clientId,p[p.length-1].clientId):o(p[0].clientId,x.attributeKey,x.clientId===h.clientId?h.offset:x.offset,x.offset),!0}),[e])}function gm(){const e=(0,it.useRegistry)(),{moveBlocksToPosition:t,removeBlock:o,insertBlock:n,updateBlockListSettings:a}=(0,it.useDispatch)(nt.store),{getBlockRootClientId:r,getBlockName:i,getBlockOrder:s,getBlockIndex:l,getSelectedBlockClientIds:c,getBlock:u,getBlockListSettings:d}=(0,it.useSelect)(nt.store);return(0,st.useCallback)(((p=c())=>{if(Array.isArray(p)||(p=[p]),!p.length)return;const m=p[0];if("core/list-item"!==i(m))return;const g=function(e){const t=r(e),o=r(t);if(o&&"core/list-item"===i(o))return o}(m);if(!g)return;const h=r(m),x=p[p.length-1],_=s(h).slice(l(x)+1);return e.batch((()=>{if(_.length){let e=s(m)[0];if(!e){const t=(0,Ke.cloneBlock)(u(h),{},[]);e=t.clientId,n(t,0,m,!1),a(e,d(h))}t(_,h,e)}if(t(p,h,r(g),l(g)+1),!s(h).length){o(h,!1)}})),!0}),[])}function hm(e,t){const o=(0,it.useRegistry)(),{getPreviousBlockClientId:n,getNextBlockClientId:a,getBlockOrder:r,getBlockRootClientId:i,getBlockName:s}=(0,it.useSelect)(nt.store),{mergeBlocks:l,moveBlocksToPosition:c}=(0,it.useDispatch)(nt.store),u=gm();function d(e){const t=r(e);return t.length?d(t[t.length-1]):e}function p(e){const t=i(e),o=i(t);if(o&&"core/list-item"===s(o))return o}function m(e){const t=a(e);if(t)return t;const o=p(e);return o?m(o):void 0}function g(e){const t=r(e);return t.length?r(t[0])[0]:m(e)}return a=>{function s(e,t){o.batch((()=>{const[o]=r(t);o&&(n(t)!==e||r(e).length?c(r(o),o,i(e)):c([o],t,e)),l(e,t)}))}if(a){const o=g(e);if(!o)return void t(a);p(o)?u(o):s(e,o)}else{const o=n(e);if(p(e))u(e);else if(o){s(d(o),e)}else t(a)}}}function xm({clientId:e}){const t=mm(e),o=gm(),{canIndent:n,canOutdent:a}=(0,it.useSelect)((t=>{const{getBlockIndex:o,getBlockRootClientId:n,getBlockName:a}=t(nt.store);return{canIndent:o(e)>0,canOutdent:"core/list-item"===a(n(n(e)))}}),[e]);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.ToolbarButton,{icon:(0,ot.isRTL)()?$p:Gp,title:(0,ot.__)("Outdent"),description:(0,ot.__)("Outdent list item"),disabled:!a,onClick:()=>o()}),(0,Je.jsx)(tt.ToolbarButton,{icon:(0,ot.isRTL)()?dm:pm,title:(0,ot.__)("Indent"),description:(0,ot.__)("Indent list item"),disabled:!n,onClick:()=>t()})]})}const _m={to:[{type:"block",blocks:["core/paragraph"],transform:(e,t=[])=>[(0,Ke.createBlock)("core/paragraph",e),...t.map((e=>(0,Ke.cloneBlock)(e)))]}]},bm=_m,ym={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/list-item",title:"List Item",category:"text",parent:["core/list"],allowedBlocks:["core/list"],description:"An individual item within a list.",textdomain:"default",attributes:{placeholder:{type:"string"},content:{type:"rich-text",source:"rich-text",selector:"li",role:"content"}},supports:{anchor:!0,className:!1,splitting:!0,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},color:{gradients:!0,link:!0,background:!0,__experimentalDefaultControls:{text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},selectors:{root:".wp-block-list > li",border:".wp-block-list:not(.wp-block-list .wp-block-list) > li"}},{name:fm}=ym,vm={icon:um,edit:function({attributes:e,setAttributes:t,clientId:o,mergeBlocks:n}){const{placeholder:a,content:r}=e,i=(0,nt.useBlockProps)(),s=(0,nt.useInnerBlocksProps)(i,{renderAppender:!1,__unstableDisableDropZone:!0}),l=function(e){const{replaceBlocks:t,selectionChange:o}=(0,it.useDispatch)(nt.store),{getBlock:n,getBlockRootClientId:a,getBlockIndex:r,getBlockName:i}=(0,it.useSelect)(nt.store),s=(0,st.useRef)(e);s.current=e;const l=gm();return(0,ut.useRefEffect)((e=>{function c(e){if(e.defaultPrevented||e.keyCode!==wo.ENTER)return;const{content:c,clientId:u}=s.current;if(c.length)return;if(e.preventDefault(),"core/list-item"===i(a(a(s.current.clientId))))return void l();const d=n(a(u)),p=r(u),m=(0,Ke.cloneBlock)({...d,innerBlocks:d.innerBlocks.slice(0,p)}),g=(0,Ke.createBlock)((0,Ke.getDefaultBlockName)()),h=[...d.innerBlocks[p].innerBlocks[0]?.innerBlocks||[],...d.innerBlocks.slice(p+1)],x=h.length?[(0,Ke.cloneBlock)({...d,innerBlocks:h})]:[];t(d.clientId,[m,g,...x],1),o(g.clientId)}return e.addEventListener("keydown",c),()=>{e.removeEventListener("keydown",c)}}),[])}({content:r,clientId:o}),c=function(e){const{getSelectionStart:t,getSelectionEnd:o,getBlockIndex:n}=(0,it.useSelect)(nt.store),a=mm(e),r=gm();return(0,ut.useRefEffect)((i=>{function s(i){const{keyCode:s,shiftKey:l,altKey:c,metaKey:u,ctrlKey:d}=i;if(i.defaultPrevented||s!==wo.SPACE&&s!==wo.TAB||c||u||d)return;const p=t(),m=o();0===p.offset&&0===m.offset&&(l?s===wo.TAB&&r()&&i.preventDefault():0!==n(e)&&a()&&i.preventDefault())}return i.addEventListener("keydown",s),()=>{i.removeEventListener("keydown",s)}}),[e,a])}(o),u=hm(o,n);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)("li",{...s,children:[(0,Je.jsx)(nt.RichText,{ref:(0,ut.useMergeRefs)([l,c]),identifier:"content",tagName:"div",onChange:e=>t({content:e}),value:r,"aria-label":(0,ot.__)("List text"),placeholder:a||(0,ot.__)("List"),onMerge:u}),s.children]}),(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(xm,{clientId:o})})]})},save:function({attributes:e}){return(0,Je.jsxs)("li",{...nt.useBlockProps.save(),children:[(0,Je.jsx)(nt.RichText.Content,{value:e.content}),(0,Je.jsx)(nt.InnerBlocks.Content,{})]})},merge:(e,t)=>({...e,content:e.content+t.content}),transforms:bm,[Ot(nt.privateApis).requiresWrapperOnCopy]:!0},km=()=>et({name:fm,metadata:ym,settings:vm}),wm=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M11 14.5l1.1 1.1 3-3 .5-.5-.6-.6-3-3-1 1 1.7 1.7H5v1.5h7.7L11 14.5zM16.8 5h-7c-1.1 0-2 .9-2 2v1.5h1.5V7c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v10c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5v-1.5H7.8V17c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z"})});const Cm={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/loginout",title:"Login/out",category:"theme",description:"Show login & logout links.",keywords:["login","logout","form"],textdomain:"default",attributes:{displayLoginAsForm:{type:"boolean",default:!1},redirectToCurrent:{type:"boolean",default:!0}},example:{viewportWidth:350},supports:{className:!0,color:{background:!0,text:!1,gradients:!0,link:!0},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},interactivity:{clientNavigation:!0}},style:"wp-block-loginout"},{name:jm}=Cm,Sm={icon:wm,edit:function({attributes:e,setAttributes:t}){const{displayLoginAsForm:o,redirectToCurrent:n}=e,a=mt();return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{t({displayLoginAsForm:!1,redirectToCurrent:!0})},dropdownMenuProps:a,children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Display login as form"),isShownByDefault:!0,hasValue:()=>o,onDeselect:()=>t({displayLoginAsForm:!1}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Display login as form"),checked:o,onChange:()=>t({displayLoginAsForm:!o})})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Redirect to current URL"),isShownByDefault:!0,hasValue:()=>!n,onDeselect:()=>t({redirectToCurrent:!0}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Redirect to current URL"),checked:n,onChange:()=>t({redirectToCurrent:!n})})})]})}),(0,Je.jsx)("div",{...(0,nt.useBlockProps)({className:"logged-in"}),children:(0,Je.jsx)("a",{href:"#login-pseudo-link",children:(0,ot.__)("Log out")})})]})}},Bm=()=>et({name:jm,metadata:Cm,settings:Sm}),Tm=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z"})}),Nm="full",Pm=[["core/paragraph",{placeholder:(0,ot._x)("Content…","content placeholder")}]],Im=(e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${100*t.x}% ${100*t.y}%`:"50% 50%"}:{},Mm=(e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{},Dm=50,zm=()=>{},Am=e=>{if(!e.customBackgroundColor)return e;const t={color:{background:e.customBackgroundColor}},{customBackgroundColor:o,...n}=e;return{...n,style:t}},Rm=e=>e.align?e:{...e,align:"wide"},Hm={align:{type:"string",default:"wide"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:""},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},isStackedOnMobile:{type:"boolean",default:!1}},Lm={...Hm,isStackedOnMobile:{type:"boolean",default:!0},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},mediaSizeSlug:{type:"string"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},Vm={...Lm,mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:"",role:"content"},mediaId:{type:"number",role:"content"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src",role:"content"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href",role:"content"},mediaType:{type:"string",role:"content"}},Fm={...Vm,align:{type:"string",default:"none"},useFeaturedImage:{type:"boolean",default:!1}},Em={anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0}},Om={...Em,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},$m={attributes:Fm,supports:{...Om,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},interactivity:{clientNavigation:!0}},usesContext:["postId","postType"],save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:a,mediaUrl:r,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Nm,x=g||void 0,_=ft({[`wp-image-${s}`]:s&&"image"===a,[`size-${h}`]:s&&"image"===a});let b=r?(0,Je.jsx)("img",{src:r,alt:o,className:_||null}):null;p&&(b=(0,Je.jsx)("a",{className:d,href:p,target:m,rel:x,children:b}));const y={image:()=>b,video:()=>(0,Je.jsx)("video",{controls:!0,src:r})},f=ft({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Mm(r,u):{};let k;i!==Dm&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:f,style:w}),children:[(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[a]||zm)()})]}):(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:f,style:w}),children:[(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[a]||zm)()}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})}},Gm={attributes:Vm,supports:Om,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:a,mediaUrl:r,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Nm,x=g||void 0,_=ft({[`wp-image-${s}`]:s&&"image"===a,[`size-${h}`]:s&&"image"===a});let b=(0,Je.jsx)("img",{src:r,alt:o,className:_||null});p&&(b=(0,Je.jsx)("a",{className:d,href:p,target:m,rel:x,children:b}));const y={image:()=>b,video:()=>(0,Je.jsx)("video",{controls:!0,src:r})},f=ft({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Mm(r,u):{};let k;i!==Dm&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:f,style:w}),children:[(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[a]||zm)()})]}):(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:f,style:w}),children:[(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[a]||zm)()}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Rm,isEligible(e,t,{block:o}){const{attributes:n}=o;return void 0===e.align&&!!n.className?.includes("alignwide")}},Um={attributes:Lm,supports:Em,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:a,mediaUrl:r,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Nm,x=g||void 0,_=ft({[`wp-image-${s}`]:s&&"image"===a,[`size-${h}`]:s&&"image"===a});let b=(0,Je.jsx)("img",{src:r,alt:o,className:_||null});p&&(b=(0,Je.jsx)("a",{className:d,href:p,target:m,rel:x,children:b}));const y={image:()=>b,video:()=>(0,Je.jsx)("video",{controls:!0,src:r})},f=ft({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Im(r,u):{};let k;i!==Dm&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:f,style:w}),children:[(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[a]||zm)()})]}):(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:f,style:w}),children:[(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[a]||zm)()}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Rm},qm={attributes:Lm,supports:Em,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:a,mediaUrl:r,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Nm,x=g||void 0,_=ft({[`wp-image-${s}`]:s&&"image"===a,[`size-${h}`]:s&&"image"===a});let b=(0,Je.jsx)("img",{src:r,alt:o,className:_||null});p&&(b=(0,Je.jsx)("a",{className:d,href:p,target:m,rel:x,children:b}));const y={image:()=>b,video:()=>(0,Je.jsx)("video",{controls:!0,src:r})},f=ft({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Im(r,u):{};let k;i!==Dm&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:f,style:w}),children:[(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[a]||zm)()}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Rm},Wm={attributes:{...Hm,isStackedOnMobile:{type:"boolean",default:!0},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:(0,ut.compose)(Am,Rm),save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,isStackedOnMobile:n,mediaAlt:a,mediaPosition:r,mediaType:i,mediaUrl:s,mediaWidth:l,mediaId:c,verticalAlignment:u,imageFill:d,focalPoint:p,linkClass:m,href:g,linkTarget:h,rel:x}=e,_=x||void 0;let b=(0,Je.jsx)("img",{src:s,alt:a,className:c&&"image"===i?`wp-image-${c}`:null});g&&(b=(0,Je.jsx)("a",{className:m,href:g,target:h,rel:_,children:b}));const y={image:()=>b,video:()=>(0,Je.jsx)("video",{controls:!0,src:s})},f=(0,nt.getColorClassName)("background-color",t),v=ft({"has-media-on-the-right":"right"===r,"has-background":f||o,[f]:f,"is-stacked-on-mobile":n,[`is-vertically-aligned-${u}`]:u,"is-image-fill":d}),k=d?Im(s,p):{};let w;l!==Dm&&(w="right"===r?`auto ${l}%`:`${l}% auto`);const C={backgroundColor:f?void 0:o,gridTemplateColumns:w};return(0,Je.jsxs)("div",{className:v,style:C,children:[(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:k,children:(y[i]||zm)()}),(0,Je.jsx)("div",{className:"wp-block-media-text__content",children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})]})}},Zm={attributes:{...Hm,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:(0,ut.compose)(Am,Rm),save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,isStackedOnMobile:n,mediaAlt:a,mediaPosition:r,mediaType:i,mediaUrl:s,mediaWidth:l,mediaId:c,verticalAlignment:u,imageFill:d,focalPoint:p}=e,m={image:()=>(0,Je.jsx)("img",{src:s,alt:a,className:c&&"image"===i?`wp-image-${c}`:null}),video:()=>(0,Je.jsx)("video",{controls:!0,src:s})},g=(0,nt.getColorClassName)("background-color",t),h=ft({"has-media-on-the-right":"right"===r,[g]:g,"is-stacked-on-mobile":n,[`is-vertically-aligned-${u}`]:u,"is-image-fill":d}),x=d?Im(s,p):{};let _;l!==Dm&&(_="right"===r?`auto ${l}%`:`${l}% auto`);const b={backgroundColor:g?void 0:o,gridTemplateColumns:_};return(0,Je.jsxs)("div",{className:h,style:b,children:[(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:x,children:(m[i]||zm)()}),(0,Je.jsx)("div",{className:"wp-block-media-text__content",children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})]})}},Qm={attributes:{...Hm,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"}},migrate:Rm,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,isStackedOnMobile:n,mediaAlt:a,mediaPosition:r,mediaType:i,mediaUrl:s,mediaWidth:l}=e,c={image:()=>(0,Je.jsx)("img",{src:s,alt:a}),video:()=>(0,Je.jsx)("video",{controls:!0,src:s})},u=(0,nt.getColorClassName)("background-color",t),d=ft({"has-media-on-the-right":"right"===r,[u]:u,"is-stacked-on-mobile":n});let p;l!==Dm&&(p="right"===r?`auto ${l}%`:`${l}% auto`);const m={backgroundColor:u?void 0:o,gridTemplateColumns:p};return(0,Je.jsxs)("div",{className:d,style:m,children:[(0,Je.jsx)("figure",{className:"wp-block-media-text__media",children:(c[i]||zm)()}),(0,Je.jsx)("div",{className:"wp-block-media-text__content",children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})]})}},Km=[$m,Gm,Um,qm,Wm,Zm,Qm],Ym=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})}),Jm=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})}),Xm=(0,Je.jsxs)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Je.jsx)(Ye.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,Je.jsx)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})]});function eg(e,t){return e?{objectPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{}}const tg=["image","video"],og=()=>{},ng=(0,st.forwardRef)((({isSelected:e,isStackedOnMobile:t,...o},n)=>{const a=(0,ut.useViewportMatch)("small","<");return(0,Je.jsx)(tt.ResizableBox,{ref:n,showHandle:e&&(!a||!t),...o})}));function ag({mediaId:e,mediaUrl:t,onSelectMedia:o,toggleUseFeaturedImage:n,useFeaturedImage:a}){return(0,Je.jsx)(nt.BlockControls,{group:"other",children:(0,Je.jsx)(nt.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:tg,accept:"image/*,video/*",onSelect:o,onToggleFeaturedImage:n,useFeaturedImage:a,onReset:()=>o(void 0)})})}function rg({className:e,mediaUrl:t,onSelectMedia:o,toggleUseFeaturedImage:n}){const{createErrorNotice:a}=(0,it.useDispatch)(Rt.store);return(0,Je.jsx)(nt.MediaPlaceholder,{icon:(0,Je.jsx)(nt.BlockIcon,{icon:Xm}),labels:{title:(0,ot.__)("Media area")},className:e,onSelect:o,accept:"image/*,video/*",onToggleFeaturedImage:n,allowedTypes:tg,onError:e=>{a(e,{type:"snackbar"})},disableMediaButtons:t})}const ig=(0,st.forwardRef)((function(e,t){const{className:o,commitWidthChange:n,focalPoint:a,imageFill:r,isSelected:i,isStackedOnMobile:s,mediaAlt:l,mediaId:c,mediaPosition:u,mediaType:d,mediaUrl:p,mediaWidth:m,onSelectMedia:g,onWidthChange:h,enableResize:x,toggleUseFeaturedImage:_,useFeaturedImage:b,featuredImageURL:y,featuredImageAlt:f,refMedia:v}=e,k=!c&&(0,lt.isBlobURL)(p),{toggleSelection:w}=(0,it.useDispatch)(nt.store);if(p||y||b){const C=()=>{w(!1)},j=(e,t,o)=>{h(parseInt(o.style.width))},S=(e,t,o)=>{w(!0),n(parseInt(o.style.width))},B={right:x&&"left"===u,left:x&&"right"===u},T="image"===d&&r?eg(p||y,a):{},N={image:()=>b&&y?(0,Je.jsx)("img",{ref:v,src:y,alt:f,style:T}):p&&(0,Je.jsx)("img",{ref:v,src:p,alt:l,style:T}),video:()=>(0,Je.jsx)("video",{controls:!0,ref:v,src:p})};return(0,Je.jsxs)(ng,{as:"figure",className:ft(o,"editor-media-container__resizer",{"is-transient":k}),size:{width:m+"%"},minWidth:"10%",maxWidth:"100%",enable:B,onResizeStart:C,onResize:j,onResizeStop:S,axis:"x",isSelected:i,isStackedOnMobile:s,ref:t,children:[(0,Je.jsx)(ag,{onSelectMedia:g,mediaUrl:b&&y?y:p,mediaId:c,toggleUseFeaturedImage:_}),(N[d]||og)(),k&&(0,Je.jsx)(tt.Spinner,{}),!b&&(0,Je.jsx)(rg,{...e}),!y&&b&&(0,Je.jsx)(tt.Placeholder,{className:"wp-block-media-text--placeholder-image",style:T,withIllustration:!0})]})}return(0,Je.jsx)(rg,{...e})})),{ResolutionTool:sg}=Ot(nt.privateApis),lg=e=>Math.max(15,Math.min(e,85));function cg(e,t){return e?.media_details?.sizes?.[t]?.source_url}function ug({image:e,value:t,onChange:o}){const{imageSizes:n}=(0,it.useSelect)((e=>{const{getSettings:t}=e(nt.store);return{imageSizes:t().imageSizes}}),[]);if(!n?.length)return null;const a=n.filter((({slug:t})=>cg(e,t))).map((({name:e,slug:t})=>({value:t,label:e})));return(0,Je.jsx)(sg,{value:t,defaultValue:Nm,options:a,onChange:o})}const dg=function({attributes:e,isSelected:t,setAttributes:o,context:{postId:n,postType:a}}){const{focalPoint:r,href:i,imageFill:s,isStackedOnMobile:l,linkClass:c,linkDestination:u,linkTarget:d,mediaAlt:p,mediaId:m,mediaPosition:g,mediaType:h,mediaUrl:x,mediaWidth:_,mediaSizeSlug:b,rel:y,verticalAlignment:f,allowedBlocks:v,useFeaturedImage:k}=e,[w]=(0,ct.useEntityProp)("postType",a,"featured_media",n),{featuredImageMedia:C}=(0,it.useSelect)((e=>({featuredImageMedia:w&&k?e(ct.store).getMedia(w,{context:"view"}):void 0})),[w,k]),{image:j}=(0,it.useSelect)((e=>({image:m&&t?e(ct.store).getMedia(m,{context:"view"}):null})),[t,m]),S=k?C?.source_url:"",B=k?C?.alt_text:"",T=(0,st.useRef)(),N=e=>{const{style:t}=T.current,{x:o,y:n}=e;t.objectPosition=`${100*o}% ${100*n}%`},[P,I]=(0,st.useState)(null),M=function({attributes:{linkDestination:e,href:t},setAttributes:o}){return n=>{if(!n||!n.url)return void o({mediaAlt:void 0,mediaId:void 0,mediaType:void 0,mediaUrl:void 0,mediaLink:void 0,href:void 0,focalPoint:void 0,useFeaturedImage:!1});let a,r;(0,lt.isBlobURL)(n.url)&&(n.type=(0,lt.getBlobTypeByURL)(n.url)),a=n.media_type?"image"===n.media_type?"image":"video":n.type,"image"===a&&(r=n.sizes?.large?.url||n.media_details?.sizes?.large?.source_url);let i=t;"media"===e&&(i=n.url),"attachment"===e&&(i=n.link),o({mediaAlt:n.alt,mediaId:n.id,mediaType:a,mediaUrl:r||n.url,mediaLink:n.link||void 0,href:i,focalPoint:void 0,useFeaturedImage:!1})}}({attributes:e,setAttributes:o}),D=e=>{o({mediaWidth:lg(e)}),I(null)},z=ft({"has-media-on-the-right":"right"===g,"is-selected":t,"is-stacked-on-mobile":l,[`is-vertically-aligned-${f}`]:f,"is-image-fill-element":s}),A=`${P||_}%`,R="right"===g?`1fr ${A}`:`${A} 1fr`,H={gridTemplateColumns:R,msGridColumns:R},L=mt(),V=(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{o({isStackedOnMobile:!0,imageFill:!1,mediaAlt:"",focalPoint:void 0,mediaWidth:50,mediaSizeSlug:void 0})},dropdownMenuProps:L,children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Media width"),isShownByDefault:!0,hasValue:()=>50!==_,onDeselect:()=>o({mediaWidth:50}),children:(0,Je.jsx)(tt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Media width"),value:P||_,onChange:D,min:15,max:85})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Stack on mobile"),isShownByDefault:!0,hasValue:()=>!l,onDeselect:()=>o({isStackedOnMobile:!0}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Stack on mobile"),checked:l,onChange:()=>o({isStackedOnMobile:!l})})}),"image"===h&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Crop image to fill"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>o({imageFill:!1}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Crop image to fill"),checked:!!s,onChange:()=>o({imageFill:!s})})}),s&&(x||S)&&"image"===h&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Focal point"),isShownByDefault:!0,hasValue:()=>!!r,onDeselect:()=>o({focalPoint:void 0}),children:(0,Je.jsx)(tt.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Focal point"),url:k&&S?S:x,value:r,onChange:e=>o({focalPoint:e}),onDragStart:N,onDrag:N})}),"image"===h&&x&&!k&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Alternative text"),isShownByDefault:!0,hasValue:()=>!!p,onDeselect:()=>o({mediaAlt:""}),children:(0,Je.jsx)(tt.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Alternative text"),value:p,onChange:e=>{o({mediaAlt:e})},help:(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.ExternalLink,{href:(0,ot.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,ot.__)("Describe the purpose of the image.")}),(0,Je.jsx)("br",{}),(0,ot.__)("Leave empty if decorative.")]})})}),"image"===h&&!k&&(0,Je.jsx)(ug,{image:j,value:b,onChange:e=>{const t=cg(j,e);if(!t)return null;o({mediaUrl:t,mediaSizeSlug:e})}})]}),F=(0,nt.useBlockProps)({className:z,style:H}),E=(0,nt.useInnerBlocksProps)({className:"wp-block-media-text__content"},{template:Pm,allowedBlocks:v}),O=(0,nt.useBlockEditingMode)();return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.InspectorControls,{children:V}),(0,Je.jsxs)(nt.BlockControls,{group:"block",children:["default"===O&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockVerticalAlignmentControl,{onChange:e=>{o({verticalAlignment:e})},value:f}),(0,Je.jsx)(tt.ToolbarButton,{icon:Ym,title:(0,ot.__)("Show media on left"),isActive:"left"===g,onClick:()=>o({mediaPosition:"left"})}),(0,Je.jsx)(tt.ToolbarButton,{icon:Jm,title:(0,ot.__)("Show media on right"),isActive:"right"===g,onClick:()=>o({mediaPosition:"right"})})]}),"image"===h&&!k&&(0,Je.jsx)(nt.__experimentalImageURLInputUI,{url:i||"",onChangeUrl:e=>{o(e)},linkDestination:u,mediaType:h,mediaUrl:j&&j.source_url,mediaLink:j&&j.link,linkTarget:d,linkClass:c,rel:y})]}),(0,Je.jsxs)("div",{...F,children:["right"===g&&(0,Je.jsx)("div",{...E}),(0,Je.jsx)(ig,{className:"wp-block-media-text__media",onSelectMedia:M,onWidthChange:e=>{I(lg(e))},commitWidthChange:D,refMedia:T,enableResize:"default"===O,toggleUseFeaturedImage:()=>{o({imageFill:!1,mediaType:"image",mediaId:void 0,mediaUrl:void 0,mediaAlt:void 0,mediaLink:void 0,linkDestination:void 0,linkTarget:void 0,linkClass:void 0,rel:void 0,href:void 0,useFeaturedImage:!k})},focalPoint:r,imageFill:s,isSelected:t,isStackedOnMobile:l,mediaAlt:p,mediaId:m,mediaPosition:g,mediaType:h,mediaUrl:x,mediaWidth:_,useFeaturedImage:k,featuredImageURL:S,featuredImageAlt:B}),"right"!==g&&(0,Je.jsx)("div",{...E})]})]})},pg=()=>{};const mg={from:[{type:"block",blocks:["core/image"],transform:({alt:e,url:t,id:o,anchor:n})=>(0,Ke.createBlock)("core/media-text",{mediaAlt:e,mediaId:o,mediaUrl:t,mediaType:"image",anchor:n})},{type:"block",blocks:["core/video"],transform:({src:e,id:t,anchor:o})=>(0,Ke.createBlock)("core/media-text",{mediaId:t,mediaUrl:e,mediaType:"video",anchor:o})},{type:"block",blocks:["core/cover"],transform:({align:e,alt:t,anchor:o,backgroundType:n,customGradient:a,customOverlayColor:r,gradient:i,id:s,overlayColor:l,style:c,textColor:u,url:d},p)=>{let m={};return a?m={style:{color:{gradient:a}}}:r&&(m={style:{color:{background:r}}}),c?.color?.text&&(m.style={color:{...m.style?.color,text:c.color.text}}),(0,Ke.createBlock)("core/media-text",{align:e,anchor:o,backgroundColor:l,gradient:i,mediaAlt:t,mediaId:s,mediaType:n,mediaUrl:d,textColor:u,...m},p)}}],to:[{type:"block",blocks:["core/image"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"image"===e,transform:({mediaAlt:e,mediaId:t,mediaUrl:o,anchor:n})=>(0,Ke.createBlock)("core/image",{alt:e,id:t,url:o,anchor:n})},{type:"block",blocks:["core/video"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"video"===e,transform:({mediaId:e,mediaUrl:t,anchor:o})=>(0,Ke.createBlock)("core/video",{id:e,src:t,anchor:o})},{type:"block",blocks:["core/cover"],transform:({align:e,anchor:t,backgroundColor:o,focalPoint:n,gradient:a,mediaAlt:r,mediaId:i,mediaType:s,mediaUrl:l,style:c,textColor:u},d)=>{const p={};c?.color?.gradient?p.customGradient=c.color.gradient:c?.color?.background&&(p.customOverlayColor=c.color.background),c?.color?.text&&(p.style={color:{text:c.color.text}});const m={align:e,alt:r,anchor:t,backgroundType:s,dimRatio:l?50:100,focalPoint:n,gradient:a,id:i,overlayColor:o,textColor:u,url:l,...p};return(0,Ke.createBlock)("core/cover",m,d)}}]},gg=mg,hg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/media-text",title:"Media & Text",category:"media",description:"Set media and words side-by-side for a richer layout.",keywords:["image","video"],textdomain:"default",attributes:{align:{type:"string",default:"none"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:"",role:"content"},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number",role:"content"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src",role:"content"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href",role:"content"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},mediaType:{type:"string",role:"content"},mediaWidth:{type:"number",default:50},mediaSizeSlug:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"},allowedBlocks:{type:"array"},useFeaturedImage:{type:"boolean",default:!1}},usesContext:["postId","postType"],supports:{anchor:!0,align:["wide","full"],html:!1,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-media-text-editor",style:"wp-block-media-text"},{name:xg}=hg,_g={icon:Tm,example:{viewportWidth:601,attributes:{mediaType:"image",mediaUrl:"https://s.w.org/images/core/5.3/Biologia_Centrali-Americana_-_Cantorchilus_semibadius_1902.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,ot.__)("The wren
Earns his living
Noiselessly.")}},{name:"core/paragraph",attributes:{content:(0,ot.__)("— Kobayashi Issa (一茶)")}}]},transforms:gg,edit:dg,save:function({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:a,mediaUrl:r,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Nm,x=g||void 0,_=ft({[`wp-image-${s}`]:s&&"image"===a,[`size-${h}`]:s&&"image"===a}),b=c?eg(r,u):{};let y=r?(0,Je.jsx)("img",{src:r,alt:o,className:_||null,style:b}):null;p&&(y=(0,Je.jsx)("a",{className:d,href:p,target:m,rel:x,children:y}));const f={image:()=>y,video:()=>(0,Je.jsx)("video",{controls:!0,src:r})},v=ft({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill-element":c});let k;50!==i&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:v,style:w}),children:[(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Je.jsx)("figure",{className:"wp-block-media-text__media",children:(f[a]||pg)()})]}):(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:v,style:w}),children:[(0,Je.jsx)("figure",{className:"wp-block-media-text__media",children:(f[a]||pg)()}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},deprecated:Km},bg=()=>et({name:xg,metadata:hg,settings:_g});const yg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/missing",title:"Unsupported",category:"text",description:"Your site doesn’t include support for this block.",textdomain:"default",attributes:{originalName:{type:"string"},originalUndelimitedContent:{type:"string"},originalContent:{type:"string",source:"raw"}},supports:{className:!1,customClassName:!1,inserter:!1,html:!1,reusable:!1,interactivity:{clientNavigation:!0}}},{name:fg}=yg,vg={name:fg,__experimentalLabel(e,{context:t}){if("accessibility"===t){const{originalName:t}=e,o=t?(0,Ke.getBlockType)(t):void 0;return o?o.settings.title||t:""}},edit:function({attributes:e,clientId:t}){const{originalName:o,originalUndelimitedContent:n}=e,a=!!n,{hasFreeformBlock:r,hasHTMLBlock:i}=(0,it.useSelect)((e=>{const{canInsertBlockType:o,getBlockRootClientId:n}=e(nt.store);return{hasFreeformBlock:o("core/freeform",n(t)),hasHTMLBlock:o("core/html",n(t))}}),[t]),{replaceBlock:s}=(0,it.useDispatch)(nt.store),l=[];let c;const u=(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,onClick:function(){s(t,(0,Ke.createBlock)("core/html",{content:n}))},variant:"primary",children:(0,ot.__)("Keep as HTML")},"convert");return!a||r||o?a&&i?(c=(0,ot.sprintf)((0,ot.__)('Your site doesn’t include support for the "%s" block. You can leave it as-is, convert it to custom HTML, or remove it.'),o),l.push(u)):c=(0,ot.sprintf)((0,ot.__)('Your site doesn’t include support for the "%s" block. You can leave it as-is or remove it.'),o):i?(c=(0,ot.__)("It appears you are trying to use the deprecated Classic block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."),l.push(u)):c=(0,ot.__)("It appears you are trying to use the deprecated Classic block. You can leave this block intact, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."),(0,Je.jsxs)("div",{...(0,nt.useBlockProps)({className:"has-warning"}),children:[(0,Je.jsx)(nt.Warning,{actions:l,children:c}),(0,Je.jsx)(st.RawHTML,{children:(0,xc.safeHTML)(n)})]})},save:function({attributes:e}){return(0,Je.jsx)(st.RawHTML,{children:e.originalContent})}},kg=()=>et({name:fg,metadata:yg,settings:vg}),wg=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"})}),Cg=(0,ot.__)("Read more");const jg={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/more"===e.dataset.block,transform(e){const{customText:t,noTeaser:o}=e.dataset,n={};return t&&(n.customText=t),""===o&&(n.noTeaser=!0),(0,Ke.createBlock)("core/more",n)}}]},Sg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/more",title:"More",category:"design",description:"Content before this block will be shown in the excerpt on your archives page.",keywords:["read more"],textdomain:"default",attributes:{customText:{type:"string",default:""},noTeaser:{type:"boolean",default:!1}},supports:{customClassName:!1,className:!1,html:!1,multiple:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-more-editor"},{name:Bg}=Sg,Tg={icon:wg,example:{},__experimentalLabel(e,{context:t}){const o=e?.metadata?.name;return"list-view"===t&&o?o:"accessibility"===t?e.customText:void 0},transforms:jg,edit:function({attributes:{customText:e,noTeaser:t},insertBlocksAfter:o,setAttributes:n}){const a={width:`${(e||Cg).length+1.2}em`},r=mt();return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsx)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{n({noTeaser:!1})},dropdownMenuProps:r,children:(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Hide excerpt"),isShownByDefault:!0,hasValue:()=>t,onDeselect:()=>n({noTeaser:!1}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Hide the excerpt on the full content page"),checked:!!t,onChange:()=>n({noTeaser:!t}),help:e=>e?(0,ot.__)("The excerpt is hidden."):(0,ot.__)("The excerpt is visible.")})})})}),(0,Je.jsx)("div",{...(0,nt.useBlockProps)(),children:(0,Je.jsx)("input",{"aria-label":(0,ot.__)("“Read more” link text"),type:"text",value:e,placeholder:Cg,onChange:e=>{n({customText:e.target.value})},onKeyDown:({keyCode:e})=>{e===wo.ENTER&&o([(0,Ke.createBlock)((0,Ke.getDefaultBlockName)())])},style:a})})]})},save:function({attributes:{customText:e,noTeaser:t}}){const o=e?`\x3c!--more ${e}--\x3e`:"\x3c!--more--\x3e",n=t?"\x3c!--noteaser--\x3e":"";return(0,Je.jsx)(st.RawHTML,{children:[o,n].filter(Boolean).join("\n")})}},Ng=()=>et({name:Bg,metadata:Sg,settings:Tg}),Pg=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})}),Ig=window.wp.a11y;const Mg=(0,st.forwardRef)((function({icon:e,size:t=24,...o},n){return(0,st.cloneElement)(e,{width:t,height:t,...o,ref:n})})),Dg=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})}),zg={name:"core/navigation-link"},Ag=["core/navigation-link/page","core/navigation-link"],Rg={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"},Hg=["postType","wp_navigation",Rg];function Lg(e){const t=(0,ct.useResourcePermissions)({kind:"postType",name:"wp_navigation",id:e}),{navigationMenu:o,isNavigationMenuResolved:n,isNavigationMenuMissing:a}=(0,it.useSelect)((t=>function(e,t){if(!t)return{isNavigationMenuResolved:!1,isNavigationMenuMissing:!0};const{getEntityRecord:o,getEditedEntityRecord:n,hasFinishedResolution:a}=e(ct.store),r=["postType","wp_navigation",t],i=o(...r),s=n(...r),l=a("getEditedEntityRecord",r),c="publish"===s.status||"draft"===s.status;return{isNavigationMenuResolved:l,isNavigationMenuMissing:l&&(!i||!c),navigationMenu:c?s:null}}(t,e)),[e]),{canCreate:r,canUpdate:i,canDelete:s,isResolving:l,hasResolved:c}=t,{records:u,isResolving:d,hasResolved:p}=(0,ct.useEntityRecords)("postType","wp_navigation",Rg);return{navigationMenu:o,isNavigationMenuResolved:n,isNavigationMenuMissing:a,navigationMenus:u,isResolvingNavigationMenus:d,hasResolvedNavigationMenus:p,canSwitchNavigationMenu:e?u?.length>1:u?.length>0,canUserCreateNavigationMenus:r,isResolvingCanUserCreateNavigationMenus:l,hasResolvedCanUserCreateNavigationMenus:c,canUserUpdateNavigationMenu:i,hasResolvedCanUserUpdateNavigationMenu:e?c:void 0,canUserDeleteNavigationMenu:s,hasResolvedCanUserDeleteNavigationMenu:e?c:void 0}}function Vg(e){const{records:t,isResolving:o,hasResolved:n}=(0,ct.useEntityRecords)("root","menu",{per_page:-1,context:"view"}),{records:a,isResolving:r,hasResolved:i}=(0,ct.useEntityRecords)("postType","page",{parent:0,order:"asc",orderby:"id",per_page:-1,context:"view"}),{records:s,hasResolved:l}=(0,ct.useEntityRecords)("root","menuItem",{menus:e,per_page:-1,context:"view"},{enabled:!!e});return{pages:a,isResolvingPages:r,hasResolvedPages:i,hasPages:!(!i||!a?.length),menus:t,isResolvingMenus:o,hasResolvedMenus:n,hasMenus:!(!n||!t?.length),menuItems:s,hasResolvedMenuItems:l}}const Fg=({isVisible:e=!0})=>(0,Je.jsx)("div",{"aria-hidden":!e||void 0,className:"wp-block-navigation-placeholder__preview",children:(0,Je.jsxs)("div",{className:"wp-block-navigation-placeholder__actions__indicator",children:[(0,Je.jsx)(Mg,{icon:Pg}),(0,ot.__)("Navigation")]})}),Eg=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});const Og=function({currentMenuId:e,onSelectNavigationMenu:t,onSelectClassicMenu:o,onCreateNew:n,actionLabel:a,createNavigationMenuIsSuccess:r,createNavigationMenuIsError:i}){const s=(0,ot.__)("Create from '%s'"),[l,c]=(0,st.useState)(!1);a=a||s;const{menus:u}=Vg(),{navigationMenus:d,isResolvingNavigationMenus:p,hasResolvedNavigationMenus:m,canUserCreateNavigationMenus:g,canSwitchNavigationMenu:h,isNavigationMenuMissing:x}=Lg(e),[_]=(0,ct.useEntityProp)("postType","wp_navigation","title"),b=(0,st.useMemo)((()=>d?.map((({id:e,title:t,status:o},n)=>{const r=function(e,t,o){return e?"publish"===o?(0,tn.decodeEntities)(e):(0,ot.sprintf)((0,ot.__)("%1$s (%2$s)"),(0,tn.decodeEntities)(e),o):(0,ot.sprintf)((0,ot.__)("(no title %s)"),t)}(t?.rendered,n+1,o);return{value:e,label:r,ariaLabel:(0,ot.sprintf)(a,r),disabled:l||p||!m}}))||[]),[d,a,p,m,l]),y=!!d?.length,f=!!u?.length,v=!!h,k=!!g,w=y&&!e,C=!y&&m,j=m&&null===e,S=e&&x;let B="";B=p?(0,ot.__)("Loading…"):w||C||j||S?(0,ot.__)("Choose or create a Navigation Menu"):_,(0,st.useEffect)((()=>{l&&(r||i)&&c(!1)}),[m,r,g,i,l,j,C,w]);const T=(0,Je.jsx)(tt.DropdownMenu,{label:B,icon:Eg,toggleProps:{size:"small"},children:({onClose:a})=>(0,Je.jsxs)(Je.Fragment,{children:[v&&y&&(0,Je.jsx)(tt.MenuGroup,{label:(0,ot.__)("Menus"),children:(0,Je.jsx)(tt.MenuItemsChoice,{value:e,onSelect:e=>{t(e),a()},choices:b})}),k&&f&&(0,Je.jsx)(tt.MenuGroup,{label:(0,ot.__)("Import Classic Menus"),children:u?.map((e=>{const t=(0,tn.decodeEntities)(e.name);return(0,Je.jsx)(tt.MenuItem,{onClick:async()=>{c(!0),await o(e),c(!1),a()},"aria-label":(0,ot.sprintf)(s,t),disabled:l||p||!m,children:t},e.id)}))}),g&&(0,Je.jsx)(tt.MenuGroup,{label:(0,ot.__)("Tools"),children:(0,Je.jsx)(tt.MenuItem,{onClick:async()=>{c(!0),await n(),c(!1),a()},disabled:l||p||!m,children:(0,ot.__)("Create new Menu")})})]})});return T};function $g({isSelected:e,currentMenuId:t,clientId:o,canUserCreateNavigationMenus:n=!1,isResolvingCanUserCreateNavigationMenus:a,onSelectNavigationMenu:r,onSelectClassicMenu:i,onCreateEmpty:s}){const{isResolvingMenus:l,hasResolvedMenus:c}=Vg();(0,st.useEffect)((()=>{e&&(l&&(0,Ig.speak)((0,ot.__)("Loading navigation block setup options…")),c&&(0,Ig.speak)((0,ot.__)("Navigation block setup options ready.")))}),[c,l,e]);const u=l&&a;return(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsxs)(tt.Placeholder,{className:"wp-block-navigation-placeholder",children:[(0,Je.jsx)(Fg,{isVisible:!e}),(0,Je.jsx)("div",{"aria-hidden":!e||void 0,className:"wp-block-navigation-placeholder__controls",children:(0,Je.jsxs)("div",{className:"wp-block-navigation-placeholder__actions",children:[(0,Je.jsxs)("div",{className:"wp-block-navigation-placeholder__actions__indicator",children:[(0,Je.jsx)(Mg,{icon:Pg})," ",(0,ot.__)("Navigation")]}),(0,Je.jsx)("hr",{}),u&&(0,Je.jsx)(tt.Spinner,{}),(0,Je.jsx)(Og,{currentMenuId:t,clientId:o,onSelectNavigationMenu:r,onSelectClassicMenu:i}),(0,Je.jsx)("hr",{}),n&&(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:s,children:(0,ot.__)("Start empty")})]})})]})})}const Gg=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"})});function Ug({icon:e}){return"menu"===e?(0,Je.jsx)(Mg,{icon:Gg}):(0,Je.jsxs)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,Je.jsx)(Ye.Rect,{x:"4",y:"7.5",width:"16",height:"1.5"}),(0,Je.jsx)(Ye.Rect,{x:"4",y:"15",width:"16",height:"1.5"})]})}function qg({children:e,id:t,isOpen:o,isResponsive:n,onToggle:a,isHiddenByDefault:r,overlayBackgroundColor:i,overlayTextColor:s,hasIcon:l,icon:c}){if(!n)return e;const u=ft("wp-block-navigation__responsive-container",{"has-text-color":!!s.color||!!s?.class,[(0,nt.getColorClassName)("color",s?.slug)]:!!s?.slug,"has-background":!!i.color||i?.class,[(0,nt.getColorClassName)("background-color",i?.slug)]:!!i?.slug,"is-menu-open":o,"hidden-by-default":r}),d={color:!s?.slug&&s?.color,backgroundColor:!i?.slug&&i?.color&&i.color},p=ft("wp-block-navigation__responsive-container-open",{"always-shown":r}),m=`${t}-modal`,g={className:"wp-block-navigation__responsive-dialog",...o&&{role:"dialog","aria-modal":!0,"aria-label":(0,ot.__)("Menu")}};return(0,Je.jsxs)(Je.Fragment,{children:[!o&&(0,Je.jsxs)(tt.Button,{__next40pxDefaultSize:!0,"aria-haspopup":"true","aria-label":l&&(0,ot.__)("Open menu"),className:p,onClick:()=>a(!0),children:[l&&(0,Je.jsx)(Ug,{icon:c}),!l&&(0,ot.__)("Menu")]}),(0,Je.jsx)("div",{className:u,style:d,id:m,children:(0,Je.jsx)("div",{className:"wp-block-navigation__responsive-close",tabIndex:"-1",children:(0,Je.jsxs)("div",{...g,children:[(0,Je.jsxs)(tt.Button,{__next40pxDefaultSize:!0,className:"wp-block-navigation__responsive-container-close","aria-label":l&&(0,ot.__)("Close menu"),onClick:()=>a(!1),children:[l&&(0,Je.jsx)(Mg,{icon:Dg}),!l&&(0,ot.__)("Close")]}),(0,Je.jsx)("div",{className:"wp-block-navigation__responsive-container-content",id:`${m}-content`,children:e})]})})})]})}function Wg({clientId:e,hasCustomPlaceholder:t,orientation:o,templateLock:n}){const{isImmediateParentOfSelectedBlock:a,selectedBlockHasChildren:r,isSelected:i}=(0,it.useSelect)((t=>{const{getBlockCount:o,hasSelectedInnerBlock:n,getSelectedBlockClientId:a}=t(nt.store),r=a();return{isImmediateParentOfSelectedBlock:n(e,!1),selectedBlockHasChildren:!!o(r),isSelected:r===e}}),[e]),[s,l,c]=(0,ct.useEntityBlockEditor)("postType","wp_navigation"),u=i||a&&!r,d=(0,st.useMemo)((()=>(0,Je.jsx)(Fg,{})),[]),p=!t&&!!!s?.length&&!i,m=(0,nt.useInnerBlocksProps)({className:"wp-block-navigation__container"},{value:s,onInput:l,onChange:c,prioritizedInserterBlocks:Ag,defaultBlock:zg,directInsert:!0,orientation:o,templateLock:n,renderAppender:!!(i||a&&!r||u)&&nt.InnerBlocks.ButtonBlockAppender,placeholder:p?d:void 0,__experimentalCaptureToolbars:!0,__unstableDisableLayoutClassNames:!0});return(0,Je.jsx)("div",{...m})}function Zg(){const[e,t]=(0,ct.useEntityProp)("postType","wp_navigation","title");return(0,Je.jsx)(tt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Menu name"),value:e,onChange:t})}const Qg=(e,t,o)=>{if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){if(!t.hasOwnProperty(n))return!1;if(o&&o(n,e))return!0;if(!Qg(e[n],t[n],o))return!1}return!0}return!1},Kg={};function Yg({blocks:e,createNavigationMenu:t,hasSelection:o}){const n=(0,st.useRef)();(0,st.useEffect)((()=>{n?.current||(n.current=e)}),[e]);const a=function(e,t){return!Qg(e,t,((e,t)=>{if("core/page-list"===t?.name&&"innerBlocks"===e)return!0}))}(n?.current,e),r=(0,st.useContext)(tt.Disabled.Context),i=(0,nt.useInnerBlocksProps)({className:"wp-block-navigation__container"},{renderAppender:!!o&&void 0,defaultBlock:zg,directInsert:!0}),{isSaving:s,hasResolvedAllNavigationMenus:l}=(0,it.useSelect)((e=>{if(r)return Kg;const{hasFinishedResolution:t,isSavingEntityRecord:o}=e(ct.store);return{isSaving:o("postType","wp_navigation"),hasResolvedAllNavigationMenus:t("getEntityRecords",Hg)}}),[r]);(0,st.useEffect)((()=>{!r&&!s&&l&&o&&a&&t(null,e)}),[e,t,r,s,l,a,o]);const c=s?tt.Disabled:"div";return(0,Je.jsx)(c,{...i})}function Jg({onDelete:e}){const[t,o]=(0,st.useState)(!1),n=(0,ct.useEntityId)("postType","wp_navigation"),{deleteEntityRecord:a}=(0,it.useDispatch)(ct.store);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,className:"wp-block-navigation-delete-menu-button",variant:"secondary",isDestructive:!0,onClick:()=>{o(!0)},children:(0,ot.__)("Delete menu")}),t&&(0,Je.jsx)(tt.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{a("postType","wp_navigation",n,{force:!0}),e()},onCancel:()=>{o(!1)},confirmButtonText:(0,ot.__)("Delete"),size:"medium",children:(0,ot.__)("Are you sure you want to delete this Navigation Menu?")})]})}const Xg=function({name:e,message:t=""}={}){const o=(0,st.useRef)(),{createWarningNotice:n,removeNotice:a}=(0,it.useDispatch)(Rt.store);return[(0,st.useCallback)((a=>{o.current||(o.current=e,n(a||t,{id:o.current,type:"snackbar"}))}),[o,n,t,e]),(0,st.useCallback)((()=>{o.current&&(a(o.current),o.current=null)}),[o,a])]};function eh({setAttributes:e,hasIcon:t,icon:o}){return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Show icon button"),help:(0,ot.__)("Configure the visual appearance of the button that toggles the overlay menu."),onChange:t=>e({hasIcon:t}),checked:t}),(0,Je.jsxs)(tt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"wp-block-navigation__overlay-menu-icon-toggle-group",label:(0,ot.__)("Icon"),value:o,onChange:t=>e({icon:t}),isBlock:!0,children:[(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"handle","aria-label":(0,ot.__)("handle"),label:(0,Je.jsx)(Ug,{icon:"handle"})}),(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"menu","aria-label":(0,ot.__)("menu"),label:(0,Je.jsx)(Ug,{icon:"menu"})})]})]})}function th(e){if(!e)return null;const t=oh(function(e,t="id",o="parent"){const n=Object.create(null),a=[];for(const r of e)n[r[t]]={...r,children:[]},r[o]?(n[r[o]]=n[r[o]]||{},n[r[o]].children=n[r[o]].children||[],n[r[o]].children.push(n[r[t]])):a.push(n[r[t]]);return a}(e));return(0,Ns.applyFilters)("blocks.navigation.__unstableMenuItemsToBlocks",t,e)}function oh(e,t=0){let o={};const n=[...e].sort(((e,t)=>e.menu_order-t.menu_order)),a=n.map((e=>{if("block"===e.type){const[t]=(0,Ke.parse)(e.content.raw);return t||(0,Ke.createBlock)("core/freeform",{content:e.content})}const n=e.children?.length?"core/navigation-submenu":"core/navigation-link",a=function({title:e,xfn:t,classes:o,attr_title:n,object:a,object_id:r,description:i,url:s,type:l,target:c},u,d){a&&"post_tag"===a&&(a="tag");return{label:e?.rendered||"",...a?.length&&{type:a},kind:l?.replace("_","-")||"custom",url:s||"",...t?.length&&t.join(" ").trim()&&{rel:t.join(" ").trim()},...o?.length&&o.join(" ").trim()&&{className:o.join(" ").trim()},...n?.length&&{title:n},...r&&"custom"!==a&&{id:r},...i?.length&&{description:i},..."_blank"===c&&{opensInNewTab:!0},..."core/navigation-submenu"===u&&{isTopLevelItem:0===d},..."core/navigation-link"===u&&{isTopLevelLink:0===d}}}(e,n,t),{innerBlocks:r=[],mapping:i={}}=e.children?.length?oh(e.children,t+1):{};o={...o,...i};const s=(0,Ke.createBlock)(n,a,r);return o[e.id]=s.clientId,s}));return{innerBlocks:a,mapping:o}}const nh="success",ah="error",rh="pending";let ih=null;const sh=function(e,{throwOnError:t=!1}={}){const o=(0,it.useRegistry)(),{editEntityRecord:n}=(0,it.useDispatch)(ct.store),[a,r]=(0,st.useState)("idle"),[i,s]=(0,st.useState)(null),l=(0,st.useCallback)((async(t,a,r="publish")=>{let i,s;try{s=await o.resolveSelect(ct.store).getMenuItems({menus:t,per_page:-1,context:"view"})}catch(e){throw new Error((0,ot.sprintf)((0,ot.__)('Unable to fetch classic menu "%s" from API.'),a),{cause:e})}if(null===s)throw new Error((0,ot.sprintf)((0,ot.__)('Unable to fetch classic menu "%s" from API.'),a));const{innerBlocks:l}=th(s);try{i=await e(a,l,r),await n("postType","wp_navigation",i.id,{status:"publish"},{throwOnError:!0})}catch(e){throw new Error((0,ot.sprintf)((0,ot.__)('Unable to create Navigation Menu "%s".'),a),{cause:e})}return i}),[e,n,o]);return{convert:(0,st.useCallback)((async(e,o,n)=>{if(ih!==e)return ih=e,e&&o?(r(rh),s(null),await l(e,o,n).then((e=>(r(nh),ih=null,e))).catch((e=>{if(s(e?.message),r(ah),ih=null,t)throw new Error((0,ot.sprintf)((0,ot.__)('Unable to create Navigation Menu "%s".'),o),{cause:e})}))):(s("Unable to convert menu. Missing menu details."),void r(ah))}),[l,t]),status:a,error:i}};function lh(e,t){return e&&t?e+"//"+t:null}const ch=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),uh=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),dh=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),ph=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.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-17.6 1L10 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"})}),mh=e=>"header"===e?ch:"footer"===e?uh:"sidebar"===e?dh:ph;const gh=["postType","wp_navigation",{status:"draft",per_page:-1}],hh=["postType","wp_navigation",{per_page:-1,status:"publish"}];function xh(e){const t=(0,st.useContext)(tt.Disabled.Context),o=function(e){return(0,it.useSelect)((t=>{if(!e)return;const{getBlock:o,getBlockParentsByBlockName:n}=t(nt.store),a=n(e,"core/template-part",!0);if(!a?.length)return;const{getCurrentTheme:r,getEditedEntityRecord:i}=t(ct.store),s=r(),l=(s?.default_template_part_areas||[]).map((e=>({...e,icon:mh(e.icon)})));for(const e of a){const t=o(e),{theme:n=s?.stylesheet,slug:a}=t.attributes,r=i("postType","wp_template_part",lh(n,a));if(r?.area)return l.find((e=>"uncategorized"!==e.area&&e.area===r.area))?.label}}),[e])}(t?void 0:e),n=(0,it.useRegistry)();return(0,st.useCallback)((async()=>{if(t)return"";const{getEntityRecords:e}=n.resolveSelect(ct.store),[a,r]=await Promise.all([e(...gh),e(...hh)]),i=o?(0,ot.sprintf)((0,ot.__)("%s menu"),o):(0,ot.__)("Menu"),s=[...a,...r].reduce(((e,t)=>t?.title?.raw?.startsWith(i)?e+1:e),0);return(s>0?`${i} ${s+1}`:i)||""}),[t,o,n])}const _h="success",bh="error",yh="pending",fh="idle";const vh=[];function kh(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function wh(e,t,o){if(!e)return;t(kh(e).color);let n=e,a=kh(n).backgroundColor;for(;"rgba(0, 0, 0, 0)"===a&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,a=kh(n).backgroundColor;o(a)}function Ch(e,t){const{textColor:o,customTextColor:n,backgroundColor:a,customBackgroundColor:r,overlayTextColor:i,customOverlayTextColor:s,overlayBackgroundColor:l,customOverlayBackgroundColor:c,style:u}=e,d={};return t&&s?d.customTextColor=s:t&&i?d.textColor=i:n?d.customTextColor=n:o?d.textColor=o:u?.color?.text&&(d.customTextColor=u.color.text),t&&c?d.customBackgroundColor=c:t&&l?d.backgroundColor=l:r?d.customBackgroundColor=r:a?d.backgroundColor=a:u?.color?.background&&(d.customTextColor=u.color.background),d}function jh(e){return{className:ft("wp-block-navigation__submenu-container",{"has-text-color":!(!e.textColor&&!e.customTextColor),[`has-${e.textColor}-color`]:!!e.textColor,"has-background":!(!e.backgroundColor&&!e.customBackgroundColor),[`has-${e.backgroundColor}-background-color`]:!!e.backgroundColor}),style:{color:e.customTextColor,backgroundColor:e.customBackgroundColor}}}const Sh=({className:e="",disabled:t,isMenuItem:o=!1})=>{let n=tt.Button;return o&&(n=tt.MenuItem),(0,Je.jsx)(n,{variant:"link",disabled:t,className:e,href:(0,vt.addQueryArgs)("edit.php",{post_type:"wp_navigation"}),children:(0,ot.__)("Manage menus")})};const Bh=function({onCreateNew:e,isNotice:t=!1}){const[o,n]=(0,st.useState)(!1),a=(0,st.createInterpolateElement)((0,ot.__)("Navigation Menu has been deleted or is unavailable. "),{button:(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,onClick:()=>{n(!0),e()},variant:"link",disabled:o,accessibleWhenDisabled:!0})});return t?(0,Je.jsx)(tt.Notice,{status:"warning",isDismissible:!1,children:a}):(0,Je.jsx)(nt.Warning,{children:a})},Th=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z"})}),Nh=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Ph={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},Ih=["core/navigation-link","core/navigation-submenu"];function Mh({block:e,onClose:t,expandedState:o,expand:n,setInsertedBlock:a}){const{insertBlock:r,replaceBlock:i,replaceInnerBlocks:s}=(0,it.useDispatch)(nt.store),l=e.clientId,c=!Ih.includes(e.name);return(0,Je.jsx)(tt.MenuItem,{icon:Th,disabled:c,onClick:()=>{const c=!1,u=(0,Ke.createBlock)("core/navigation-link");if("core/navigation-submenu"===e.name)r(u,e.innerBlocks.length,l,c);else{const t=(0,Ke.createBlock)("core/navigation-submenu",e.attributes,e.innerBlocks);i(l,t),s(t.clientId,[u],c)}a(u),o[e.clientId]||n(e.clientId),t()},children:(0,ot.__)("Add submenu link")})}function Dh(e){const{block:t}=e,{clientId:o}=t,{moveBlocksDown:n,moveBlocksUp:a,removeBlocks:r}=(0,it.useDispatch)(nt.store),i=(0,ot.sprintf)((0,ot.__)("Remove %s"),(0,nt.BlockTitle)({clientId:o,maximumLength:25})),s=(0,it.useSelect)((e=>{const{getBlockRootClientId:t}=e(nt.store);return t(o)}),[o]);return(0,Je.jsx)(tt.DropdownMenu,{icon:Eg,label:(0,ot.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Ph,noIcons:!0,...e,children:({onClose:l})=>(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)(tt.MenuGroup,{children:[(0,Je.jsx)(tt.MenuItem,{icon:Nh,onClick:()=>{a([o],s),l()},children:(0,ot.__)("Move up")}),(0,Je.jsx)(tt.MenuItem,{icon:Qd,onClick:()=>{n([o],s),l()},children:(0,ot.__)("Move down")}),(0,Je.jsx)(Mh,{block:t,onClose:l,expanded:!0,expandedState:e.expandedState,expand:e.expand,setInsertedBlock:e.setInsertedBlock})]}),(0,Je.jsx)(tt.MenuGroup,{children:(0,Je.jsx)(tt.MenuItem,{onClick:()=>{r([o],!1),l()},children:i})})]})})}const zh=window.wp.escapeHtml,Ah=(e={},t,o={})=>{const{label:n="",kind:a="",type:r=""}=o,{title:i="",url:s="",opensInNewTab:l,id:c,kind:u=a,type:d=r}=e,p=i.replace(/http(s?):\/\//gi,""),m=s.replace(/http(s?):\/\//gi,""),g=i&&i!==n&&p!==m?(0,zh.escapeHTML)(i):n||(0,zh.escapeHTML)(m),h="post_tag"===d?"tag":d.replace("-","_"),x=["post","page","tag","category"].indexOf(h)>-1,_=!u&&!x||"custom"===u?"custom":u;t({...s&&{url:encodeURI((0,vt.safeDecodeURI)(s))},...g&&{label:g},...void 0!==l&&{opensInNewTab:l},...c&&Number.isInteger(c)&&{id:c},..._&&{kind:_},...h&&"URL"!==h&&{type:h}})},Rh=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})}),Hh=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})}),Lh=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),{PrivateQuickInserter:Vh}=Ot(nt.privateApis);function Fh(e,t){switch(e){case"post":case"page":return{type:"post",subtype:e};case"category":return{type:"term",subtype:"category"};case"tag":return{type:"term",subtype:"post_tag"};case"post_format":return{type:"post-format"};default:return"taxonomy"===t?{type:"term",subtype:e}:"post-type"===t?{type:"post",subtype:e}:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}}}function Eh({clientId:e,onBack:t}){const{rootBlockClientId:o}=(0,it.useSelect)((t=>{const{getBlockRootClientId:o}=t(nt.store);return{rootBlockClientId:o(e)}}),[e]),n=(0,ut.useFocusOnMount)("firstElement"),a=(0,ut.useInstanceId)(nt.LinkControl,"link-ui-block-inserter__title"),r=(0,ut.useInstanceId)(nt.LinkControl,"link-ui-block-inserter__description");return e?(0,Je.jsxs)("div",{className:"link-ui-block-inserter",role:"dialog","aria-labelledby":a,"aria-describedby":r,ref:n,children:[(0,Je.jsxs)(tt.VisuallyHidden,{children:[(0,Je.jsx)("h2",{id:a,children:(0,ot.__)("Add block")}),(0,Je.jsx)("p",{id:r,children:(0,ot.__)("Choose a block to add to your Navigation.")})]}),(0,Je.jsx)(tt.Button,{className:"link-ui-block-inserter__back",icon:(0,ot.isRTL)()?Rh:Hh,onClick:e=>{e.preventDefault(),t()},size:"small",children:(0,ot.__)("Back")}),(0,Je.jsx)(Vh,{rootClientId:o,clientId:e,isAppender:!1,prioritizePatterns:!1,selectBlockOnInsert:!0,hasSearch:!1})]}):null}const Oh=(0,st.forwardRef)((function(e,t){const{label:o,url:n,opensInNewTab:a,type:r,kind:i}=e.link,s=r||"page",[l,c]=(0,st.useState)(!1),[u,d]=(0,st.useState)(!1),{saveEntityRecord:p}=(0,it.useDispatch)(ct.store),m=(0,ct.useResourcePermissions)({kind:"postType",name:s}),g=(0,st.useMemo)((()=>({url:n,opensInNewTab:a,title:o&&(0,xc.__unstableStripHTML)(o)})),[o,a,n]),h=(0,ut.useInstanceId)(Oh,"link-ui-link-control__title"),x=(0,ut.useInstanceId)(Oh,"link-ui-link-control__description");return(0,Je.jsxs)(tt.Popover,{ref:t,placement:"bottom",onClose:e.onClose,anchor:e.anchor,shift:!0,children:[!l&&(0,Je.jsxs)("div",{role:"dialog","aria-labelledby":h,"aria-describedby":x,children:[(0,Je.jsxs)(tt.VisuallyHidden,{children:[(0,Je.jsx)("h2",{id:h,children:(0,ot.__)("Add link")}),(0,Je.jsx)("p",{id:x,children:(0,ot.__)("Search for and add a link to your Navigation.")})]}),(0,Je.jsx)(nt.LinkControl,{hasTextControl:!0,hasRichPreviews:!0,value:g,showInitialSuggestions:!0,withCreateSuggestion:m.canCreate,createSuggestion:async function(e){const t=await p("postType",s,{title:e,status:"draft"});return{id:t.id,type:s,title:(0,tn.decodeEntities)(t.title.rendered),url:t.link,kind:"post-type"}},createSuggestionButtonText:e=>{let t;return t="post"===r?(0,ot.__)("Create draft post: %s"):(0,ot.__)("Create draft page: %s"),(0,st.createInterpolateElement)((0,ot.sprintf)(t,e),{mark:(0,Je.jsx)("mark",{})})},noDirectEntry:!!r,noURLSuggestion:!!r,suggestionsQuery:Fh(r,i),onChange:e.onChange,onRemove:e.onRemove,onCancel:e.onCancel,renderControlBottom:()=>!g?.url?.length&&(0,Je.jsx)($h,{focusAddBlockButton:u,setAddingBlock:()=>{c(!0),d(!1)}})})]}),l&&(0,Je.jsx)(Eh,{clientId:e.clientId,onBack:()=>{c(!1),d(!0)}})]})})),$h=({setAddingBlock:e,focusAddBlockButton:t})=>{const o=(0,st.useRef)();return(0,st.useEffect)((()=>{t&&o.current?.focus()}),[t]),(0,Je.jsx)(tt.__experimentalVStack,{className:"link-ui-tools",children:(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,ref:o,icon:Lh,onClick:t=>{t.preventDefault(),e(!0)},"aria-haspopup":"listbox",children:(0,ot.__)("Add block")})})},Gh=(0,ot.__)("Switch to '%s'"),Uh=["core/navigation-link","core/navigation-submenu"],{PrivateListView:qh}=Ot(nt.privateApis);function Wh({block:e,insertedBlock:t,setInsertedBlock:o}){const{updateBlockAttributes:n}=(0,it.useDispatch)(nt.store),a=Uh?.includes(t?.name),r=t?.clientId===e.clientId;if(!(a&&r))return null;return(0,Je.jsx)(Oh,{clientId:t?.clientId,link:t?.attributes,onClose:()=>{o(null)},onChange:e=>{var a;Ah(e,(a=t?.clientId,e=>{a&&n(a,e)}),t?.attributes),o(null)},onCancel:()=>{o(null)}})}const Zh=({clientId:e,currentMenuId:t,isLoading:o,isNavigationMenuMissing:n,onCreateNew:a})=>{const r=(0,it.useSelect)((t=>!!t(nt.store).getBlockCount(e)),[e]),{navigationMenu:i}=Lg(t);if(t&&n)return(0,Je.jsx)(Bh,{onCreateNew:a,isNotice:!0});if(o)return(0,Je.jsx)(tt.Spinner,{});const s=i?(0,ot.sprintf)((0,ot.__)("Structure for Navigation Menu: %s"),i?.title||(0,ot.__)("Untitled menu")):(0,ot.__)("You have not yet created any menus. Displaying a list of your Pages");return(0,Je.jsxs)("div",{className:"wp-block-navigation__menu-inspector-controls",children:[!r&&(0,Je.jsx)("p",{className:"wp-block-navigation__menu-inspector-controls__empty-message",children:(0,ot.__)("This Navigation Menu is empty.")}),(0,Je.jsx)(qh,{rootClientId:e,isExpanded:!0,description:s,showAppender:!0,blockSettingsMenu:Dh,additionalBlockContent:Wh})]})},Qh=e=>{const{createNavigationMenuIsSuccess:t,createNavigationMenuIsError:o,currentMenuId:n=null,onCreateNew:a,onSelectClassicMenu:r,onSelectNavigationMenu:i,isManageMenusButtonDisabled:s,blockEditingMode:l}=e;return(0,Je.jsx)(nt.InspectorControls,{group:"list",children:(0,Je.jsxs)(tt.PanelBody,{title:null,children:[(0,Je.jsxs)(tt.__experimentalHStack,{className:"wp-block-navigation-off-canvas-editor__header",children:[(0,Je.jsx)(tt.__experimentalHeading,{className:"wp-block-navigation-off-canvas-editor__title",level:2,children:(0,ot.__)("Menu")}),"default"===l&&(0,Je.jsx)(Og,{currentMenuId:n,onSelectClassicMenu:r,onSelectNavigationMenu:i,onCreateNew:a,createNavigationMenuIsSuccess:t,createNavigationMenuIsError:o,actionLabel:Gh,isManageMenusButtonDisabled:s})]}),(0,Je.jsx)(Zh,{...e})]})})};function Kh({id:e,children:t}){return(0,Je.jsx)(tt.VisuallyHidden,{children:(0,Je.jsx)("div",{id:e,className:"wp-block-navigation__description",children:t})})}function Yh({id:e}){const[t]=(0,ct.useEntityProp)("postType","wp_navigation","title"),o=(0,ot.sprintf)((0,ot.__)('Navigation Menu: "%s"'),t);return(0,Je.jsx)(Kh,{id:e,children:o})}function Jh({textColor:e,setTextColor:t,backgroundColor:o,setBackgroundColor:n,overlayTextColor:a,setOverlayTextColor:r,overlayBackgroundColor:i,setOverlayBackgroundColor:s,clientId:l,navRef:c}){const[u,d]=(0,st.useState)(),[p,m]=(0,st.useState)(),[g,h]=(0,st.useState)(),[x,_]=(0,st.useState)(),b="web"===st.Platform.OS;(0,st.useEffect)((()=>{if(!b)return;wh(c.current,m,d);const e=c.current?.querySelector('[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]');e&&(a.color||i.color)&&wh(e,_,h)}),[b,a.color,i.color,c]);const y=(0,nt.__experimentalUseMultipleOriginColorsAndGradients)();return y.hasColorsOrGradients?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:e.color,label:(0,ot.__)("Text"),onColorChange:t,resetAllFilter:()=>t(),clearable:!0},{colorValue:o.color,label:(0,ot.__)("Background"),onColorChange:n,resetAllFilter:()=>n(),clearable:!0},{colorValue:a.color,label:(0,ot.__)("Submenu & overlay text"),onColorChange:r,resetAllFilter:()=>r(),clearable:!0},{colorValue:i.color,label:(0,ot.__)("Submenu & overlay background"),onColorChange:s,resetAllFilter:()=>s(),clearable:!0}],panelId:l,...y,gradients:[],disableCustomGradients:!0}),b&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.ContrastChecker,{backgroundColor:u,textColor:p}),(0,Je.jsx)(nt.ContrastChecker,{backgroundColor:g,textColor:x})]})]}):null}const Xh=(0,nt.withColors)({textColor:"color"},{backgroundColor:"color"},{overlayBackgroundColor:"color"},{overlayTextColor:"color"})((function({attributes:e,setAttributes:t,clientId:o,isSelected:n,className:a,backgroundColor:r,setBackgroundColor:i,textColor:s,setTextColor:l,overlayBackgroundColor:c,setOverlayBackgroundColor:u,overlayTextColor:d,setOverlayTextColor:p,hasSubmenuIndicatorSetting:m=!0,customPlaceholder:g=null,__unstableLayoutClassNames:h}){const{openSubmenusOnClick:x,overlayMenu:_,showSubmenuIcon:b,templateLock:y,layout:{justifyContent:f,orientation:v="horizontal",flexWrap:k="wrap"}={},hasIcon:w,icon:C="handle"}=e,j=e.ref,S=(0,st.useCallback)((e=>{t({ref:e})}),[t]),B=`navigationMenu/${j}`,T=(0,nt.useHasRecursion)(B),N=(0,nt.useBlockEditingMode)(),{menus:P}=Vg(),[I,M]=Xg({name:"block-library/core/navigation/status"}),[D,z]=Xg({name:"block-library/core/navigation/classic-menu-conversion"}),[A,R]=Xg({name:"block-library/core/navigation/permissions/update"}),{create:H,status:L,error:V,value:F,isPending:E,isSuccess:O,isError:$}=function(e){const[t,o]=(0,st.useState)(fh),[n,a]=(0,st.useState)(null),[r,i]=(0,st.useState)(null),{saveEntityRecord:s,editEntityRecord:l}=(0,it.useDispatch)(ct.store),c=xh(e),u=(0,st.useCallback)((async(e=null,t=[],n)=>{if(e&&"string"!=typeof e)throw i("Invalid title supplied when creating Navigation Menu."),o(bh),new Error("Value of supplied title argument was not a string.");o(yh),a(null),i(null),e||(e=await c().catch((e=>{throw i(e?.message),o(bh),new Error("Failed to create title when saving new Navigation Menu.",{cause:e})})));const r={title:e,content:(0,Ke.serialize)(t),status:n};return s("postType","wp_navigation",r).then((e=>(a(e),o(_h),"publish"!==n&&l("postType","wp_navigation",e.id,{status:"publish"}),e))).catch((e=>{throw i(e?.message),o(bh),new Error("Unable to save new Navigation Menu",{cause:e})}))}),[s,l,c]);return{create:u,status:t,value:n,error:r,isIdle:t===fh,isPending:t===yh,isSuccess:t===_h,isError:t===bh}}(o),G=async()=>{await H("")},{hasUncontrolledInnerBlocks:U,uncontrolledInnerBlocks:q,isInnerBlockSelected:W,innerBlocks:Z}=function(e){return(0,it.useSelect)((t=>{const{getBlock:o,getBlocks:n,hasSelectedInnerBlock:a}=t(nt.store),r=o(e).innerBlocks,i=!!r?.length,s=i?vh:n(e);return{innerBlocks:i?r:s,hasUncontrolledInnerBlocks:i,uncontrolledInnerBlocks:r,controlledInnerBlocks:s,isInnerBlockSelected:a(e,!0)}}),[e])}(o),Q=!!Z.find((e=>"core/navigation-submenu"===e.name)),{replaceInnerBlocks:K,selectBlock:Y,__unstableMarkNextChangeAsNotPersistent:J}=(0,it.useDispatch)(nt.store),[X,ee]=(0,st.useState)(!1),[te,oe]=(0,st.useState)(!1),{hasResolvedNavigationMenus:ne,isNavigationMenuResolved:ae,isNavigationMenuMissing:re,canUserUpdateNavigationMenu:ie,hasResolvedCanUserUpdateNavigationMenu:se,canUserDeleteNavigationMenu:le,hasResolvedCanUserDeleteNavigationMenu:ce,canUserCreateNavigationMenus:ue,isResolvingCanUserCreateNavigationMenus:de,hasResolvedCanUserCreateNavigationMenus:pe}=Lg(j),me=ne&&re,{convert:ge,status:he,error:xe}=sh(H),_e=he===rh,be=(0,st.useCallback)(((e,t={focusNavigationBlock:!1})=>{const{focusNavigationBlock:n}=t;S(e),n&&Y(o)}),[Y,o,S]),ye=!re&&ae,fe=U&&!ye,{getNavigationFallbackId:ve}=Ot((0,it.useSelect)(ct.store)),ke=j||fe?null:ve();(0,st.useEffect)((()=>{j||fe||!ke||(J(),S(ke))}),[j,S,fe,ke,J]);const we=(0,st.useRef)(),Ce="nav",je=!j&&!E&&!_e&&ne&&0===P?.length&&!U,Se=!ne||E||_e||!(!j||ye||_e),Be=e.style?.typography?.textDecoration,Te=(0,it.useSelect)((e=>e(nt.store).__unstableHasActiveBlockOverlayActive(o)),[o]),Ne="never"!==_,Pe=(0,nt.useBlockProps)({ref:we,className:ft(a,{"items-justified-right":"right"===f,"items-justified-space-between":"space-between"===f,"items-justified-left":"left"===f,"items-justified-center":"center"===f,"is-vertical":"vertical"===v,"no-wrap":"nowrap"===k,"is-responsive":Ne,"has-text-color":!!s.color||!!s?.class,[(0,nt.getColorClassName)("color",s?.slug)]:!!s?.slug,"has-background":!!r.color||r.class,[(0,nt.getColorClassName)("background-color",r?.slug)]:!!r?.slug,[`has-text-decoration-${Be}`]:Be,"block-editor-block-content-overlay":Te},h),style:{color:!s?.slug&&s?.color,backgroundColor:!r?.slug&&r?.color}}),Ie=async e=>ge(e.id,e.name,"draft"),Me=e=>{be(e)};(0,st.useEffect)((()=>{M(),E&&(0,Ig.speak)((0,ot.__)("Creating Navigation Menu.")),O&&(be(F?.id,{focusNavigationBlock:!0}),I((0,ot.__)("Navigation Menu successfully created."))),$&&I((0,ot.__)("Failed to create Navigation Menu."))}),[L,V,F?.id,$,O,E,be,M,I]),(0,st.useEffect)((()=>{z(),he===rh&&(0,Ig.speak)((0,ot.__)("Classic menu importing.")),he===nh&&(D((0,ot.__)("Classic menu imported successfully.")),be(F?.id,{focusNavigationBlock:!0})),he===ah&&D((0,ot.__)("Classic menu import failed."))}),[he,xe,z,D,F?.id,be]),(0,st.useEffect)((()=>{n||W||R(),(n||W)&&(j&&!me&&se&&!ie&&A((0,ot.__)("You do not have permission to edit this Menu. Any changes made will not be saved.")),j||!pe||ue||A((0,ot.__)("You do not have permission to create Navigation Menus.")))}),[n,W,ie,se,ue,pe,j,R,A,me]);const De=ue||ie,ze=ft("wp-block-navigation__overlay-menu-preview",{open:te}),Ae=b||x?"":(0,ot.__)('The current menu options offer reduced accessibility for users and are not recommended. Enabling either "Open on Click" or "Show arrow" offers enhanced accessibility by allowing keyboard users to browse submenus selectively.'),Re=(0,st.useRef)(!0);(0,st.useEffect)((()=>{!Re.current&&Ae&&(0,Ig.speak)(Ae),Re.current=!1}),[Ae]);const He=(0,ut.useInstanceId)(eh,"overlay-menu-preview"),Le=(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.InspectorControls,{children:m&&(0,Je.jsxs)(tt.PanelBody,{title:(0,ot.__)("Display"),children:[Ne&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)(tt.Button,{__next40pxDefaultSize:!0,className:ze,onClick:()=>{oe(!te)},"aria-label":(0,ot.__)("Overlay menu controls"),"aria-controls":He,"aria-expanded":te,children:[w&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Ug,{icon:C}),(0,Je.jsx)(Mg,{icon:Dg})]}),!w&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("span",{children:(0,ot.__)("Menu")}),(0,Je.jsx)("span",{children:(0,ot.__)("Close")})]})]}),(0,Je.jsx)("div",{id:He,children:te&&(0,Je.jsx)(eh,{setAttributes:t,hasIcon:w,icon:C,hidden:!te})})]}),(0,Je.jsxs)(tt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Overlay Menu"),"aria-label":(0,ot.__)("Configure overlay menu"),value:_,help:(0,ot.__)("Collapses the navigation options in a menu icon opening an overlay."),onChange:e=>t({overlayMenu:e}),isBlock:!0,children:[(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"never",label:(0,ot.__)("Off")}),(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"mobile",label:(0,ot.__)("Mobile")}),(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"always",label:(0,ot.__)("Always")})]}),Q&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("h3",{children:(0,ot.__)("Submenus")}),(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:x,onChange:e=>{t({openSubmenusOnClick:e,...e&&{showSubmenuIcon:!0}})},label:(0,ot.__)("Open on click")}),(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:b,onChange:e=>{t({showSubmenuIcon:e})},disabled:e.openSubmenusOnClick,label:(0,ot.__)("Show arrow")}),Ae&&(0,Je.jsx)("div",{children:(0,Je.jsx)(tt.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:Ae})})]})]})}),(0,Je.jsx)(nt.InspectorControls,{group:"color",children:(0,Je.jsx)(Jh,{textColor:s,setTextColor:l,backgroundColor:r,setBackgroundColor:i,overlayTextColor:d,setOverlayTextColor:p,overlayBackgroundColor:c,setOverlayBackgroundColor:u,clientId:o,navRef:we})})]}),Ve=`${o}-desc`,Fe="always"===_,Ee=!De||!ne;if(fe&&!E)return(0,Je.jsxs)(Ce,{...Pe,"aria-describedby":je?void 0:Ve,children:[(0,Je.jsx)(Kh,{id:Ve,children:(0,ot.__)("Unsaved Navigation Menu.")}),(0,Je.jsx)(Qh,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:$,currentMenuId:j,isNavigationMenuMissing:re,isManageMenusButtonDisabled:Ee,onCreateNew:G,onSelectClassicMenu:Ie,onSelectNavigationMenu:Me,isLoading:Se,blockEditingMode:N}),"default"===N&&Le,(0,Je.jsx)(qg,{id:o,onToggle:ee,isOpen:X,hasIcon:w,icon:C,isResponsive:Ne,isHiddenByDefault:Fe,overlayBackgroundColor:c,overlayTextColor:d,children:(0,Je.jsx)(Yg,{createNavigationMenu:H,blocks:q,hasSelection:n||W})})]});if(j&&re)return(0,Je.jsxs)(Ce,{...Pe,children:[(0,Je.jsx)(Qh,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:$,currentMenuId:j,isNavigationMenuMissing:re,isManageMenusButtonDisabled:Ee,onCreateNew:G,onSelectClassicMenu:Ie,onSelectNavigationMenu:Me,isLoading:Se,blockEditingMode:N}),(0,Je.jsx)(Bh,{onCreateNew:G})]});if(ye&&T)return(0,Je.jsx)("div",{...Pe,children:(0,Je.jsx)(nt.Warning,{children:(0,ot.__)("Block cannot be rendered inside itself.")})});const Oe=g||$g;return je&&g?(0,Je.jsx)(Ce,{...Pe,children:(0,Je.jsx)(Oe,{isSelected:n,currentMenuId:j,clientId:o,canUserCreateNavigationMenus:ue,isResolvingCanUserCreateNavigationMenus:de,onSelectNavigationMenu:Me,onSelectClassicMenu:Ie,onCreateEmpty:G})}):(0,Je.jsx)(ct.EntityProvider,{kind:"postType",type:"wp_navigation",id:j,children:(0,Je.jsxs)(nt.RecursionProvider,{uniqueId:B,children:[(0,Je.jsx)(Qh,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:$,currentMenuId:j,isNavigationMenuMissing:re,isManageMenusButtonDisabled:Ee,onCreateNew:G,onSelectClassicMenu:Ie,onSelectNavigationMenu:Me,isLoading:Se,blockEditingMode:N}),"default"===N&&Le,"default"===N&&ye&&(0,Je.jsxs)(nt.InspectorControls,{group:"advanced",children:[se&&ie&&(0,Je.jsx)(Zg,{}),ce&&le&&(0,Je.jsx)(Jg,{onDelete:()=>{K(o,[]),I((0,ot.__)("Navigation Menu successfully deleted."))}}),(0,Je.jsx)(Sh,{disabled:Ee,className:"wp-block-navigation-manage-menus-button"})]}),(0,Je.jsxs)(Ce,{...Pe,"aria-describedby":je||Se?void 0:Ve,children:[Se&&!Fe&&(0,Je.jsx)("div",{className:"wp-block-navigation__loading-indicator-container",children:(0,Je.jsx)(tt.Spinner,{className:"wp-block-navigation__loading-indicator"})}),(!Se||Fe)&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Yh,{id:Ve}),(0,Je.jsx)(qg,{id:o,onToggle:ee,hasIcon:w,icon:C,isOpen:X,isResponsive:Ne,isHiddenByDefault:Fe,overlayBackgroundColor:c,overlayTextColor:d,children:ye&&(0,Je.jsx)(Wg,{clientId:o,hasCustomPlaceholder:!!g,templateLock:y,orientation:v})})]})]})]})})}));const ex={fontStyle:"var:preset|font-style|",fontWeight:"var:preset|font-weight|",textDecoration:"var:preset|text-decoration|",textTransform:"var:preset|text-transform|"},tx=({navigationMenuId:e,...t})=>({...t,ref:e}),ox=e=>{if(e.layout)return e;const{itemsJustification:t,orientation:o,...n}=e;return(t||o)&&Object.assign(n,{layout:{type:"flex",...t&&{justifyContent:t},...o&&{orientation:o}}}),n},nx={attributes:{navigationMenuId:{type:"number"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"mobile"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},save:()=>(0,Je.jsx)(nt.InnerBlocks.Content,{}),isEligible:({navigationMenuId:e})=>!!e,migrate:tx},ax={attributes:{navigationMenuId:{type:"number"},orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save:()=>(0,Je.jsx)(nt.InnerBlocks.Content,{}),isEligible:({itemsJustification:e,orientation:t})=>!!e||!!t,migrate:(0,ut.compose)(tx,ox)},rx={attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save:()=>(0,Je.jsx)(nt.InnerBlocks.Content,{}),migrate:(0,ut.compose)(tx,ox,lo),isEligible:({style:e})=>e?.typography?.fontFamily},ix=[nx,ax,rx,{attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},isResponsive:{type:"boolean",default:"false"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0}},isEligible:e=>e.isResponsive,migrate:(0,ut.compose)(tx,ox,lo,(function(e){return delete e.isResponsive,{...e,overlayMenu:"mobile"}})),save:()=>(0,Je.jsx)(nt.InnerBlocks.Content,{})},{attributes:{orientation:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,fontSize:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,color:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},save:()=>(0,Je.jsx)(nt.InnerBlocks.Content,{}),isEligible(e){if(!e.style||!e.style.typography)return!1;for(const t in ex){const o=e.style.typography[t];if(o&&o.startsWith(ex[t]))return!0}return!1},migrate:(0,ut.compose)(tx,ox,lo,(function(e){var t;return{...e,style:{...e.style,typography:Object.fromEntries(Object.entries(null!==(t=e.style.typography)&&void 0!==t?t:{}).map((([e,t])=>{const o=ex[e];if(o&&t.startsWith(o)){const n=t.slice(o.length);return"textDecoration"===e&&"strikethrough"===n?[e,"line-through"]:[e,n]}return[e,t]})))}}}))},{attributes:{className:{type:"string"},textColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean"}},isEligible:e=>e.rgbTextColor||e.rgbBackgroundColor,supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0},migrate:(0,ut.compose)(tx,(e=>{const{rgbTextColor:t,rgbBackgroundColor:o,...n}=e;return{...n,customTextColor:e.textColor?void 0:e.rgbTextColor,customBackgroundColor:e.backgroundColor?void 0:e.rgbBackgroundColor}})),save:()=>(0,Je.jsx)(nt.InnerBlocks.Content,{})}],sx=ix,lx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation",title:"Navigation",category:"theme",allowedBlocks:["core/navigation-link","core/search","core/social-links","core/page-list","core/spacer","core/home-link","core/site-title","core/site-logo","core/navigation-submenu","core/loginout","core/buttons"],description:"A collection of blocks that allow visitors to get around your site.",keywords:["menu","navigation","links"],textdomain:"default",attributes:{ref:{type:"number"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"mobile"},icon:{type:"string",default:"handle"},hasIcon:{type:"boolean",default:!0},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"},maxNestingLevel:{type:"number",default:5},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},providesContext:{textColor:"textColor",customTextColor:"customTextColor",backgroundColor:"backgroundColor",customBackgroundColor:"customBackgroundColor",overlayTextColor:"overlayTextColor",customOverlayTextColor:"customOverlayTextColor",overlayBackgroundColor:"overlayBackgroundColor",customOverlayBackgroundColor:"customOverlayBackgroundColor",fontSize:"fontSize",customFontSize:"customFontSize",showSubmenuIcon:"showSubmenuIcon",openSubmenusOnClick:"openSubmenusOnClick",style:"style",maxNestingLevel:"maxNestingLevel"},supports:{align:["wide","full"],ariaLabel:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalLetterSpacing:!0,__experimentalTextDecoration:!0,__experimentalSkipSerialization:["textDecoration"],__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,allowVerticalAlignment:!1,allowSizingOnChildren:!0,default:{type:"flex"}},interactivity:!0,renaming:!1},editorStyle:"wp-block-navigation-editor",style:"wp-block-navigation"},{name:cx}=lx,ux={icon:Pg,example:{attributes:{overlayMenu:"never"},innerBlocks:[{name:"core/navigation-link",attributes:{label:(0,ot.__)("Home"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,ot.__)("About"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,ot.__)("Contact"),url:"https://make.wordpress.org/"}}]},edit:Xh,save:function({attributes:e}){if(!e.ref)return(0,Je.jsx)(nt.InnerBlocks.Content,{})},__experimentalLabel:({ref:e})=>{if(!e)return;const t=(0,it.select)(ct.store).getEditedEntityRecord("postType","wp_navigation",e);return t?.title?(0,tn.decodeEntities)(t.title):void 0},deprecated:sx},dx=()=>et({name:cx,metadata:lx,settings:ux}),px={name:"core/navigation-link"};function mx({attributes:e,setAttributes:t,setIsLabelFieldFocused:o}){const{label:n,url:a,description:r,title:i,rel:s}=e;return(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!n,label:(0,ot.__)("Text"),onDeselect:()=>t({label:""}),isShownByDefault:!0,children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Text"),value:n?(0,xc.__unstableStripHTML)(n):"",onChange:e=>{t({label:e})},autoComplete:"off",onFocus:()=>o(!0),onBlur:()=>o(!1)})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!a,label:(0,ot.__)("Link"),onDeselect:()=>t({url:""}),isShownByDefault:!0,children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Link"),value:a?(0,vt.safeDecodeURI)(a):"",onChange:o=>{Ah({url:o},t,e)},autoComplete:"off",type:"url"})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!r,label:(0,ot.__)("Description"),onDeselect:()=>t({description:""}),isShownByDefault:!0,children:(0,Je.jsx)(tt.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Description"),value:r||"",onChange:e=>{t({description:e})},help:(0,ot.__)("The description will be displayed in the menu if the current theme supports it.")})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!i,label:(0,ot.__)("Title attribute"),onDeselect:()=>t({title:""}),isShownByDefault:!0,children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Title attribute"),value:i||"",onChange:e=>{t({title:e})},autoComplete:"off",help:(0,ot.__)("Additional information to help clarify the purpose of the link.")})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,ot.__)("Rel attribute"),onDeselect:()=>t({rel:""}),isShownByDefault:!0,children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Rel attribute"),value:s||"",onChange:e=>{t({rel:e})},autoComplete:"off",help:(0,ot.__)("The relationship of the linked URL as space-separated link types.")})})]})}const gx=(0,Je.jsxs)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Je.jsx)(Ye.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,Je.jsx)(Ye.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),hx=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),xx=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z"})});function _x(e){switch(e){case"post":return kp;case"page":return gx;case"tag":return hx;case"category":return en;default:return xx}}function bx(e,t){if("core/navigation-link"!==t)return e;if(e.variations){const t=(e,t)=>e.type===t.type,o=e.variations.map((e=>({...e,...!e.icon&&{icon:_x(e.name)},...!e.isActive&&{isActive:t}})));return{...e,variations:o}}return e}const yx={from:[{type:"block",blocks:["core/site-logo"],transform:()=>(0,Ke.createBlock)("core/navigation-link")},{type:"block",blocks:["core/spacer"],transform:()=>(0,Ke.createBlock)("core/navigation-link")},{type:"block",blocks:["core/home-link"],transform:()=>(0,Ke.createBlock)("core/navigation-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,Ke.createBlock)("core/navigation-link")},{type:"block",blocks:["core/search"],transform:()=>(0,Ke.createBlock)("core/navigation-link")},{type:"block",blocks:["core/page-list"],transform:()=>(0,Ke.createBlock)("core/navigation-link")},{type:"block",blocks:["core/buttons"],transform:()=>(0,Ke.createBlock)("core/navigation-link")}],to:[{type:"block",blocks:["core/navigation-submenu"],transform:(e,t)=>(0,Ke.createBlock)("core/navigation-submenu",e,t)},{type:"block",blocks:["core/spacer"],transform:()=>(0,Ke.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],transform:()=>(0,Ke.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],transform:()=>(0,Ke.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,Ke.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],transform:()=>(0,Ke.createBlock)("core/search",{showLabel:!1,buttonUseIcon:!0,buttonPosition:"button-inside"})},{type:"block",blocks:["core/page-list"],transform:()=>(0,Ke.createBlock)("core/page-list")},{type:"block",blocks:["core/buttons"],transform:({label:e,url:t,rel:o,title:n,opensInNewTab:a})=>(0,Ke.createBlock)("core/buttons",{},[(0,Ke.createBlock)("core/button",{text:e,url:t,rel:o,title:n,linkTarget:a?"_blank":void 0})])}]},fx=yx,vx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation-link",title:"Custom Link",category:"design",parent:["core/navigation"],allowedBlocks:["core/navigation-link","core/navigation-submenu","core/page-list"],description:"Add a page, link, or another item to your navigation.",textdomain:"default",attributes:{label:{type:"string"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"},title:{type:"string"},kind:{type:"string"},isTopLevelLink:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","style"],supports:{reusable:!1,html:!1,__experimentalSlashInserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},renaming:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-navigation-link-editor",style:"wp-block-navigation-link"},{name:kx}=vx,wx={icon:su,__experimentalLabel:({label:e})=>e,merge:(e,{label:t=""})=>({...e,label:e.label+t}),edit:function({attributes:e,isSelected:t,setAttributes:o,insertBlocksAfter:n,mergeBlocks:a,onReplace:r,context:i,clientId:s}){const{id:l,label:c,type:u,url:d,description:p,kind:m}=e,[g,h]=((e,t,o)=>{const n="post-type"===e||"post"===t||"page"===t,a=Number.isInteger(o),r=(0,it.useSelect)((e=>{if(!n)return null;const{getEntityRecord:a}=e(ct.store);return a("postType",t,o)?.status}),[n,t,o]);return[n&&a&&r&&"trash"===r,"draft"===r]})(m,u,l),{maxNestingLevel:x}=i,{replaceBlock:_,__unstableMarkNextChangeAsNotPersistent:b,selectBlock:y,selectPreviousBlock:f}=(0,it.useDispatch)(nt.store),[v,k]=(0,st.useState)(t&&!d),[w,C]=(0,st.useState)(null),[j,S]=(0,st.useState)(null),B=(0,st.useRef)(null),T=(e=>{const[t,o]=(0,st.useState)(!1);return(0,st.useEffect)((()=>{const{ownerDocument:t}=e.current;function n(e){r(e)}function a(){o(!1)}function r(t){e.current.contains(t.target)?o(!0):o(!1)}return t.addEventListener("dragstart",n),t.addEventListener("dragend",a),t.addEventListener("dragenter",r),()=>{t.removeEventListener("dragstart",n),t.removeEventListener("dragend",a),t.removeEventListener("dragenter",r)}}),[e]),t})(B),N=(0,ot.__)("Add label…"),P=(0,st.useRef)(),I=(0,st.useRef)(),M=(0,ut.usePrevious)(d),[D,z]=(0,st.useState)(!1),{isAtMaxNesting:A,isTopLevelLink:R,isParentOfSelectedBlock:H,hasChildren:L}=(0,it.useSelect)((e=>{const{getBlockCount:t,getBlockName:o,getBlockRootClientId:n,hasSelectedInnerBlock:a,getBlockParentsByBlockName:r}=e(nt.store);return{isAtMaxNesting:r(s,["core/navigation-link","core/navigation-submenu"]).length>=x,isTopLevelLink:"core/navigation"===o(n(s)),isParentOfSelectedBlock:a(s,!0),hasChildren:!!t(s)}}),[s,x]),{getBlocks:V}=(0,it.useSelect)(nt.store),F=()=>{let t=V(s);0===t.length&&(t=[(0,Ke.createBlock)("core/navigation-link")],y(t[0].clientId));const o=(0,Ke.createBlock)("core/navigation-submenu",e,t);_(s,o)};(0,st.useEffect)((()=>{L&&(b(),F())}),[L]),(0,st.useEffect)((()=>{!M&&d&&v&&(0,vt.isURL)((0,vt.prependHTTP)(c))&&/^.+\.[a-z]+/.test(c)&&function(){P.current.focus();const{ownerDocument:e}=P.current,{defaultView:t}=e,o=t.getSelection(),n=e.createRange();n.selectNodeContents(P.current),o.removeAllRanges(),o.addRange(n)}()}),[M,d,v,c]);const{textColor:E,customTextColor:O,backgroundColor:$,customBackgroundColor:G}=Ch(i,!R),U=(0,nt.useBlockProps)({ref:(0,ut.useMergeRefs)([S,B]),className:ft("wp-block-navigation-item",{"is-editing":t||H,"is-dragging-within":T,"has-link":!!d,"has-child":L,"has-text-color":!!E||!!O,[(0,nt.getColorClassName)("color",E)]:!!E,"has-background":!!$||G,[(0,nt.getColorClassName)("background-color",$)]:!!$}),style:{color:!E&&O,backgroundColor:!$&&G},onKeyDown:function(e){wo.isKeyboardEvent.primary(e,"k")&&(e.preventDefault(),e.stopPropagation(),k(!0),C(P.current))}}),q=(0,nt.useInnerBlocksProps)({...U,className:"remove-outline"},{defaultBlock:px,directInsert:!0,renderAppender:!1});(!d||g||h)&&(U.onClick=()=>{k(!0),C(P.current)});const W=ft("wp-block-navigation-item__content",{"wp-block-navigation-link__placeholder":!d||g||h}),Z=function(e){let t="";switch(e){case"post":t=(0,ot.__)("Select post");break;case"page":t=(0,ot.__)("Select page");break;case"category":t=(0,ot.__)("Select category");break;case"tag":t=(0,ot.__)("Select tag");break;default:t=(0,ot.__)("Add link")}return t}(u),Q=`(${g?(0,ot.__)("Invalid"):(0,ot.__)("Draft")})`;return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsxs)(tt.ToolbarGroup,{children:[(0,Je.jsx)(tt.ToolbarButton,{name:"link",icon:Co,title:(0,ot.__)("Link"),shortcut:wo.displayShortcut.primary("k"),onClick:e=>{k(!0),C(e.currentTarget)}}),!A&&(0,Je.jsx)(tt.ToolbarButton,{name:"submenu",icon:Th,title:(0,ot.__)("Add submenu"),onClick:F})]})}),(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsx)(mx,{attributes:e,setAttributes:o,setIsLabelFieldFocused:z})}),(0,Je.jsxs)("div",{...U,children:[(0,Je.jsxs)("a",{className:W,children:[d?(0,Je.jsxs)(Je.Fragment,{children:[!g&&!h&&!D&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.RichText,{ref:P,identifier:"label",className:"wp-block-navigation-item__label",value:c,onChange:e=>o({label:e}),onMerge:a,onReplace:r,__unstableOnSplitAtEnd:()=>n((0,Ke.createBlock)("core/navigation-link")),"aria-label":(0,ot.__)("Navigation link text"),placeholder:N,withoutInteractiveFormatting:!0}),p&&(0,Je.jsx)("span",{className:"wp-block-navigation-item__description",children:p})]}),(g||h||D)&&(0,Je.jsx)("div",{className:ft("wp-block-navigation-link__placeholder-text","wp-block-navigation-link__label",{"is-invalid":g,"is-draft":h}),children:(0,Je.jsx)("span",{children:`${(0,tn.decodeEntities)(c)} ${g||h?Q:""}`.trim()})})]}):(0,Je.jsx)("div",{className:"wp-block-navigation-link__placeholder-text",children:(0,Je.jsx)("span",{children:Z})}),v&&(0,Je.jsx)(Oh,{ref:I,clientId:s,link:e,onClose:()=>{if(!d)return I.current.contains(window.document.activeElement)&&f(s,!0),void r([]);k(!1),w?(w.focus(),C(null)):P.current?P.current.focus():f(s,!0)},anchor:j,onRemove:function(){o({url:void 0,label:void 0,id:void 0,kind:void 0,type:void 0,opensInNewTab:!1}),k(!1)},onChange:t=>{Ah(t,o,e)}})]}),(0,Je.jsx)("div",{...q})]})]})},save:function(){return(0,Je.jsx)(nt.InnerBlocks.Content,{})},example:{attributes:{label:(0,ot._x)("Example Link","navigation link preview example"),url:"https://example.com"}},deprecated:[{isEligible:e=>e.nofollow,attributes:{label:{type:"string"},type:{type:"string"},nofollow:{type:"boolean"},description:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"}},migrate:({nofollow:e,...t})=>({rel:e?"nofollow":"",...t}),save:()=>(0,Je.jsx)(nt.InnerBlocks.Content,{})}],transforms:fx},Cx=()=>((0,Ns.addFilter)("blocks.registerBlockType","core/navigation-link",bx),et({name:kx,metadata:vx,settings:wx})),jx=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m13.955 20.748 8-17.5-.91-.416L19.597 6H13.5v1.5h5.411l-1.6 3.5H13.5v1.5h3.126l-1.6 3.5H13.5l.028 1.5h.812l-1.295 2.832.91.416ZM17.675 16l-.686 1.5h4.539L21.5 16h-3.825Zm2.286-5-.686 1.5H21.5V11h-1.54ZM2 12c0 3.58 2.42 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.48 0-4.5-1.52-4.5-4S5.52 7.5 8 7.5h3.5V6H8c-3.58 0-6 2.42-6 6Z"})}),Sx=()=>(0,Je.jsx)(tt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,Je.jsx)(tt.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})}),Bx=["core/navigation-link","core/navigation-submenu","core/page-list"],Tx={name:"core/navigation-link"};const Nx={to:[{type:"block",blocks:["core/navigation-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:e=>(0,Ke.createBlock)("core/navigation-link",e)},{type:"block",blocks:["core/spacer"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Ke.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Ke.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Ke.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Ke.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Ke.createBlock)("core/search")}]},Px=Nx,Ix={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation-submenu",title:"Submenu",category:"design",parent:["core/navigation"],description:"Add a submenu to your navigation.",textdomain:"default",attributes:{label:{type:"string"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"},title:{type:"string"},kind:{type:"string"},isTopLevelItem:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","openSubmenusOnClick","style"],supports:{reusable:!1,html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-navigation-submenu-editor",style:"wp-block-navigation-submenu"},{name:Mx}=Ix,Dx={icon:({context:e})=>"list-view"===e?gx:Th,__experimentalLabel(e,{context:t}){const{label:o}=e,n=e?.metadata?.name;return"list-view"===t&&(n||o)&&e?.metadata?.name||o},edit:function({attributes:e,isSelected:t,setAttributes:o,mergeBlocks:n,onReplace:a,context:r,clientId:i}){const{label:s,url:l,description:c,rel:u,title:d}=e,{showSubmenuIcon:p,maxNestingLevel:m,openSubmenusOnClick:g}=r,{__unstableMarkNextChangeAsNotPersistent:h,replaceBlock:x,selectBlock:_}=(0,it.useDispatch)(nt.store),[b,y]=(0,st.useState)(!1),[f,v]=(0,st.useState)(null),[k,w]=(0,st.useState)(null),C=(0,st.useRef)(null),j=(e=>{const[t,o]=(0,st.useState)(!1);return(0,st.useEffect)((()=>{const{ownerDocument:t}=e.current;function n(e){r(e)}function a(){o(!1)}function r(t){e.current.contains(t.target)?o(!0):o(!1)}return t.addEventListener("dragstart",n),t.addEventListener("dragend",a),t.addEventListener("dragenter",r),()=>{t.removeEventListener("dragstart",n),t.removeEventListener("dragend",a),t.removeEventListener("dragenter",r)}}),[]),t})(C),S=(0,ot.__)("Add text…"),B=(0,st.useRef)(),T=mt(),{parentCount:N,isParentOfSelectedBlock:P,isImmediateParentOfSelectedBlock:I,hasChildren:M,selectedBlockHasChildren:D,onlyDescendantIsEmptyLink:z}=(0,it.useSelect)((e=>{const{hasSelectedInnerBlock:t,getSelectedBlockClientId:o,getBlockParentsByBlockName:n,getBlock:a,getBlockCount:r,getBlockOrder:s}=e(nt.store);let l;const c=s(o());if(1===c?.length){const e=a(c[0]);l="core/navigation-link"===e?.name&&!e?.attributes?.label}return{parentCount:n(i,"core/navigation-submenu").length,isParentOfSelectedBlock:t(i,!0),isImmediateParentOfSelectedBlock:t(i,!1),hasChildren:!!r(i),selectedBlockHasChildren:!!c?.length,onlyDescendantIsEmptyLink:l}}),[i]),A=(0,ut.usePrevious)(M);(0,st.useEffect)((()=>{g||l||y(!0)}),[]),(0,st.useEffect)((()=>{t||y(!1)}),[t]),(0,st.useEffect)((()=>{b&&l&&(0,vt.isURL)((0,vt.prependHTTP)(s))&&/^.+\.[a-z]+/.test(s)&&function(){B.current.focus();const{ownerDocument:e}=B.current,{defaultView:t}=e,o=t.getSelection(),n=e.createRange();n.selectNodeContents(B.current),o.removeAllRanges(),o.addRange(n)}()}),[l]);const{textColor:R,customTextColor:H,backgroundColor:L,customBackgroundColor:V}=Ch(r,N>0),F=(0,nt.useBlockProps)({ref:(0,ut.useMergeRefs)([w,C]),className:ft("wp-block-navigation-item",{"is-editing":t||P,"is-dragging-within":j,"has-link":!!l,"has-child":M,"has-text-color":!!R||!!H,[(0,nt.getColorClassName)("color",R)]:!!R,"has-background":!!L||V,[(0,nt.getColorClassName)("background-color",L)]:!!L,"open-on-click":g}),style:{color:!R&&H,backgroundColor:!L&&V},onKeyDown:function(e){wo.isKeyboardEvent.primary(e,"k")&&(e.preventDefault(),e.stopPropagation(),y(!0),v(B.current))}}),E=Ch(r,!0),O=N>=m?Bx.filter((e=>"core/navigation-submenu"!==e)):Bx,$=jh(E),G=(0,nt.useInnerBlocksProps)($,{allowedBlocks:O,defaultBlock:Tx,directInsert:!0,__experimentalCaptureToolbars:!0,renderAppender:!!(t||I&&!D||M)&&nt.InnerBlocks.ButtonBlockAppender}),U=g?"button":"a";function q(){const t=(0,Ke.createBlock)("core/navigation-link",e);x(i,t)}(0,st.useEffect)((()=>{!M&&A&&(h(),q())}),[M,A]);const W=!D||z;return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsxs)(tt.ToolbarGroup,{children:[!g&&(0,Je.jsx)(tt.ToolbarButton,{name:"link",icon:Co,title:(0,ot.__)("Link"),shortcut:wo.displayShortcut.primary("k"),onClick:e=>{y(!0),v(e.currentTarget)}}),(0,Je.jsx)(tt.ToolbarButton,{name:"revert",icon:jx,title:(0,ot.__)("Convert to Link"),onClick:q,className:"wp-block-navigation__submenu__revert",disabled:!W})]})}),(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{o({label:"",url:"",description:"",title:"",rel:""})},dropdownMenuProps:T,children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Text"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>o({label:""}),children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:s||"",onChange:e=>{o({label:e})},label:(0,ot.__)("Text"),autoComplete:"off"})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Link"),isShownByDefault:!0,hasValue:()=>!!l,onDeselect:()=>o({url:""}),children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:l||"",onChange:e=>{o({url:e})},label:(0,ot.__)("Link"),autoComplete:"off",type:"url"})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Description"),isShownByDefault:!0,hasValue:()=>!!c,onDeselect:()=>o({description:""}),children:(0,Je.jsx)(tt.TextareaControl,{__nextHasNoMarginBottom:!0,value:c||"",onChange:e=>{o({description:e})},label:(0,ot.__)("Description"),help:(0,ot.__)("The description will be displayed in the menu if the current theme supports it.")})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Title attribute"),isShownByDefault:!0,hasValue:()=>!!d,onDeselect:()=>o({title:""}),children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:d||"",onChange:e=>{o({title:e})},label:(0,ot.__)("Title attribute"),autoComplete:"off",help:(0,ot.__)("Additional information to help clarify the purpose of the link.")})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Rel attribute"),isShownByDefault:!0,hasValue:()=>!!u,onDeselect:()=>o({rel:""}),children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:u||"",onChange:e=>{o({rel:e})},label:(0,ot.__)("Rel attribute"),autoComplete:"off",help:(0,ot.__)("The relationship of the linked URL as space-separated link types.")})})]})}),(0,Je.jsxs)("div",{...F,children:[(0,Je.jsxs)(U,{className:"wp-block-navigation-item__content",children:[(0,Je.jsx)(nt.RichText,{ref:B,identifier:"label",className:"wp-block-navigation-item__label",value:s,onChange:e=>o({label:e}),onMerge:n,onReplace:a,"aria-label":(0,ot.__)("Navigation link text"),placeholder:S,withoutInteractiveFormatting:!0,onClick:()=>{g||l||(y(!0),v(B.current))}}),c&&(0,Je.jsx)("span",{className:"wp-block-navigation-item__description",children:c}),!g&&b&&(0,Je.jsx)(Oh,{clientId:i,link:e,onClose:()=>{y(!1),f?(f.focus(),v(null)):_(i)},anchor:k,onRemove:()=>{o({url:""}),(0,Ig.speak)((0,ot.__)("Link removed."),"assertive")},onChange:t=>{Ah(t,o,e)}})]}),(p||g)&&(0,Je.jsx)("span",{className:"wp-block-navigation__submenu-icon",children:(0,Je.jsx)(Sx,{})}),(0,Je.jsx)("div",{...G})]})]})},example:{attributes:{label:(0,ot._x)("About","Example link text for Navigation Submenu"),type:"page"}},save:function(){return(0,Je.jsx)(nt.InnerBlocks.Content,{})},transforms:Px},zx=()=>et({name:Mx,metadata:Ix,settings:Dx}),Ax=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M17.5 9V6a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v3H8V6a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v3h1.5Zm0 6.5V18a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2v-2.5H8V18a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5v-2.5h1.5ZM4 13h16v-1.5H4V13Z"})});const Rx={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/nextpage"===e.dataset.block,transform:()=>(0,Ke.createBlock)("core/nextpage",{})}]},Hx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/nextpage",title:"Page Break",category:"design",description:"Separate your content into a multi-page experience.",keywords:["next page","pagination"],parent:["core/post-content"],textdomain:"default",supports:{customClassName:!1,className:!1,html:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-nextpage-editor"},{name:Lx}=Hx,Vx={icon:Ax,example:{},transforms:Rx,edit:function(){return(0,Je.jsx)("div",{...(0,nt.useBlockProps)(),children:(0,Je.jsx)("span",{children:(0,ot.__)("Page break")})})},save:function(){return(0,Je.jsx)(st.RawHTML,{children:"\x3c!--nextpage--\x3e"})}},Fx=()=>et({name:Lx,metadata:Hx,settings:Vx}),Ex=new WeakMap;function Ox(){const e=(0,it.useRegistry)();if(!Ex.has(e)){const t=new Map;Ex.set(e,$x.bind(null,t))}return Ex.get(e)}function $x(e,{name:t,blocks:o}){const n=[...o];for(;n.length;){const o=n.shift();for(const e of null!==(a=o.innerBlocks)&&void 0!==a?a:[]){var a;n.unshift(e)}"core/pattern"===o.name&&Gx(e,t,o.attributes.slug)}}function Gx(e,t,o){if(e.has(t)||e.set(t,new Set),e.get(t).add(o),Ux(e,t))throw new TypeError(`Pattern ${t} has a circular dependency and cannot be rendered.`)}function Ux(e,t,o=new Set,n=new Set){var a;o.add(t),n.add(t);const r=null!==(a=e.get(t))&&void 0!==a?a:new Set;for(const t of r)if(o.has(t)){if(n.has(t))return!0}else if(Ux(e,t,o,n))return!0;return n.delete(t),!1}const qx=({attributes:e,clientId:t})=>{const o=(0,it.useRegistry)(),n=(0,it.useSelect)((t=>t(nt.store).__experimentalGetParsedPattern(e.slug)),[e.slug]),a=(0,it.useSelect)((e=>e(ct.store).getCurrentTheme()?.stylesheet),[]),{replaceBlocks:r,setBlockEditingMode:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,it.useDispatch)(nt.store),{getBlockRootClientId:l,getBlockEditingMode:c}=(0,it.useSelect)(nt.store),[u,d]=(0,st.useState)(!1),p=Ox();(0,st.useEffect)((()=>{if(!u&&n?.blocks){try{p(n)}catch(e){return void d(!0)}window.queueMicrotask((()=>{const e=l(t),u=n.blocks.map((e=>(0,Ke.cloneBlock)(function(e){return e.innerBlocks.find((e=>"core/template-part"===e.name))&&(e.innerBlocks=e.innerBlocks.map((e=>("core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=a),e)))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=a),e}(e))));1===u.length&&n.categories?.length>0&&(u[0].attributes={...u[0].attributes,metadata:{...u[0].attributes.metadata,categories:n.categories,patternName:n.name,name:u[0].attributes.metadata.name||n.title}});const d=c(e);o.batch((()=>{s(),i(e,"default"),s(),r(t,u),s(),i(e,d)}))}))}}),[t,u,n,s,r,c,i,l]);const m=(0,nt.useBlockProps)();return u?(0,Je.jsx)("div",{...m,children:(0,Je.jsx)(nt.Warning,{children:(0,ot.sprintf)((0,ot.__)('Pattern "%s" cannot be rendered inside itself.'),n?.name)})}):(0,Je.jsx)("div",{...m})},Wx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/pattern",title:"Pattern Placeholder",category:"theme",description:"Show a block pattern.",supports:{html:!1,inserter:!1,renaming:!1,interactivity:{clientNavigation:!0}},textdomain:"default",attributes:{slug:{type:"string"}}},{name:Zx}=Wx,Qx={edit:qx},Kx=()=>et({name:Zx,metadata:Wx,settings:Qx}),Yx=(0,Je.jsxs)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Je.jsx)(Ye.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,Je.jsx)(Ye.Path,{d:"M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z"}),(0,Je.jsx)(Ye.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})]});function Jx(e,t){for(const o of e){if(o.attributes.id===t)return o;if(o.innerBlocks&&o.innerBlocks.length){const e=Jx(o.innerBlocks,t);if(e)return e}}return null}function Xx(e=[],t=null){let o=function(e=[]){const t={},o=[];return e.forEach((({id:e,title:n,link:a,type:r,parent:i})=>{var s;const l=null!==(s=t[e]?.innerBlocks)&&void 0!==s?s:[];t[e]=(0,Ke.createBlock)("core/navigation-link",{id:e,label:n.rendered,url:a,type:r,kind:"post-type"},l),i?(t[i]||(t[i]={innerBlocks:[]}),t[i].innerBlocks.push(t[e])):o.push(t[e])})),o}(e);if(t){const e=Jx(o,t);e&&e.innerBlocks&&(o=e.innerBlocks)}const n=e=>{e.forEach(((e,t,o)=>{const{attributes:a,innerBlocks:r}=e;if(0!==r.length){n(r);const e=(0,Ke.createBlock)("core/navigation-submenu",a,r);o[t]=e}}))};return n(o),o}function e_({clientId:e,pages:t,parentClientId:o,parentPageID:n}){const{replaceBlock:a,selectBlock:r}=(0,it.useDispatch)(nt.store);return()=>{const i=Xx(t,n);a(e,i),r(o)}}const t_=(0,ot.__)("This Navigation Menu displays your website's pages. Editing it will enable you to add, delete, or reorder pages. However, new pages will no longer be added automatically.");function o_({onClick:e,onClose:t,disabled:o}){return(0,Je.jsxs)(tt.Modal,{onRequestClose:t,title:(0,ot.__)("Edit Page List"),className:"wp-block-page-list-modal",aria:{describedby:(0,ut.useInstanceId)(o_,"wp-block-page-list-modal__description")},children:[(0,Je.jsx)("p",{id:(0,ut.useInstanceId)(o_,"wp-block-page-list-modal__description"),children:t_}),(0,Je.jsxs)("div",{className:"wp-block-page-list-modal-buttons",children:[(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,ot.__)("Cancel")}),(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,variant:"primary",accessibleWhenDisabled:!0,disabled:o,onClick:e,children:(0,ot.__)("Edit")})]})]})}const n_=()=>{};function a_({blockProps:e,innerBlocksProps:t,hasResolvedPages:o,blockList:n,pages:a,parentPageID:r}){if(!o)return(0,Je.jsx)("div",{...e,children:(0,Je.jsx)("div",{className:"wp-block-page-list__loading-indicator-container",children:(0,Je.jsx)(tt.Spinner,{className:"wp-block-page-list__loading-indicator"})})});if(null===a)return(0,Je.jsx)("div",{...e,children:(0,Je.jsx)(tt.Notice,{status:"warning",isDismissible:!1,children:(0,ot.__)("Page List: Cannot retrieve Pages.")})});if(0===a.length)return(0,Je.jsx)("div",{...e,children:(0,Je.jsx)(tt.Notice,{status:"info",isDismissible:!1,children:(0,ot.__)("Page List: Cannot retrieve Pages.")})});if(0===n.length){const t=a.find((e=>e.id===r));return t?.title?.rendered?(0,Je.jsx)("div",{...e,children:(0,Je.jsx)(nt.Warning,{children:(0,ot.sprintf)((0,ot.__)('Page List: "%s" page has no children.'),t.title.rendered)})}):(0,Je.jsx)("div",{...e,children:(0,Je.jsx)(tt.Notice,{status:"warning",isDismissible:!1,children:(0,ot.__)("Page List: Cannot retrieve Pages.")})})}return a.length>0?(0,Je.jsx)("ul",{...t}):void 0}const r_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/page-list",title:"Page List",category:"widgets",allowedBlocks:["core/page-list-item"],description:"Display a list of all pages.",keywords:["menu","navigation"],textdomain:"default",attributes:{parentPageID:{type:"integer",default:0},isNested:{type:"boolean",default:!1}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],supports:{reusable:!1,html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},color:{text:!0,background:!0,link:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},spacing:{padding:!0,margin:!0,__experimentalDefaultControls:{padding:!1,margin:!1}}},editorStyle:"wp-block-page-list-editor",style:"wp-block-page-list"},{name:i_}=r_,s_={icon:Yx,example:{},edit:function({context:e,clientId:t,attributes:o,setAttributes:n}){const{parentPageID:a}=o,[r,i]=(0,st.useState)(!1),s=(0,st.useCallback)((()=>i(!0)),[]),l=mt(),{records:c,hasResolved:u}=(0,ct.useEntityRecords)("postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}),d="showSubmenuIcon"in e&&c?.length>0&&c?.length<=100,p=(0,st.useMemo)((()=>{if(null===c)return new Map;const e=c.sort(((e,t)=>e.menu_order===t.menu_order?e.title.rendered.localeCompare(t.title.rendered):e.menu_order-t.menu_order));return e.reduce(((e,t)=>{const{parent:o}=t;return e.has(o)?e.get(o).push(t):e.set(o,[t]),e}),new Map)}),[c]),m=(0,nt.useBlockProps)({className:ft("wp-block-page-list",{"has-text-color":!!e.textColor,[(0,nt.getColorClassName)("color",e.textColor)]:!!e.textColor,"has-background":!!e.backgroundColor,[(0,nt.getColorClassName)("background-color",e.backgroundColor)]:!!e.backgroundColor}),style:{...e.style?.color}}),g=(0,st.useMemo)((function e(t=0,o=0){const n=p.get(t);return n?.length?n.reduce(((t,n)=>{const a=p.has(n.id),r={value:n.id,label:"— ".repeat(o)+n.title.rendered,rawName:n.title.rendered};return t.push(r),a&&t.push(...e(n.id,o+1)),t}),[]):[]}),[p]),h=(0,st.useMemo)((function e(t=a){const o=p.get(t);return o?.length?o.reduce(((t,o)=>{const n=p.has(o.id),a={id:o.id,label:""!==o.title?.rendered?.trim()?o.title?.rendered:(0,ot.__)("(no title)"),title:""!==o.title?.rendered?.trim()?o.title?.rendered:(0,ot.__)("(no title)"),link:o.url,hasChildren:n};let r=null;const i=e(o.id);return r=(0,Ke.createBlock)("core/page-list-item",a,i),t.push(r),t}),[]):[]}),[p,a]),{isNested:x,hasSelectedChild:_,parentClientId:b,hasDraggedChild:y,isChildOfNavigation:f}=(0,it.useSelect)((e=>{const{getBlockParentsByBlockName:o,hasSelectedInnerBlock:n,hasDraggedInnerBlock:a}=e(nt.store),r=o(t,"core/navigation-submenu",!0),i=o(t,"core/navigation",!0);return{isNested:r.length>0,isChildOfNavigation:i.length>0,hasSelectedChild:n(t,!0),hasDraggedChild:a(t,!0),parentClientId:i[0]}}),[t]),v=e_({clientId:t,pages:c,parentClientId:b,parentPageID:a}),k=(0,nt.useInnerBlocksProps)(m,{renderAppender:!1,__unstableDisableDropZone:!0,templateLock:!f&&"all",onInput:n_,onChange:n_,value:h}),{selectBlock:w}=(0,it.useDispatch)(nt.store);return(0,st.useEffect)((()=>{(_||y)&&(s(),w(b))}),[_,y,b,w,s]),(0,st.useEffect)((()=>{n({isNested:x})}),[x,n]),(0,Je.jsxs)(Je.Fragment,{children:[(g.length>0||d)&&(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{n({parentPageID:0})},dropdownMenuProps:l,children:[g.length>0&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Parent Page"),hasValue:()=>0!==a,onDeselect:()=>n({parentPageID:0}),isShownByDefault:!0,children:(0,Je.jsx)(tt.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,ot.__)("Parent"),value:a,options:g,onChange:e=>n({parentPageID:null!=e?e:0}),help:(0,ot.__)("Choose a page to show only its subpages.")})}),d&&(0,Je.jsxs)("div",{style:{gridColumn:"1 / -1"},children:[(0,Je.jsx)("p",{children:t_}),(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,variant:"primary",accessibleWhenDisabled:!0,disabled:!u,onClick:v,children:(0,ot.__)("Edit")})]})]})}),d&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{group:"other",children:(0,Je.jsx)(tt.ToolbarButton,{title:(0,ot.__)("Edit"),onClick:s,children:(0,ot.__)("Edit")})}),r&&(0,Je.jsx)(o_,{onClick:v,onClose:()=>i(!1),disabled:!u})]}),(0,Je.jsx)(a_,{blockProps:m,innerBlocksProps:k,hasResolvedPages:u,blockList:h,pages:c,parentPageID:a})]})}},l_=()=>et({name:i_,metadata:r_,settings:s_}),c_=()=>(0,Je.jsx)(tt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,Je.jsx)(tt.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})});const u_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/page-list-item",title:"Page List Item",category:"widgets",parent:["core/page-list"],description:"Displays a page inside a list of all pages.",keywords:["page","menu","navigation"],textdomain:"default",attributes:{id:{type:"number"},label:{type:"string"},title:{type:"string"},link:{type:"string"},hasChildren:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],supports:{reusable:!1,html:!1,lock:!1,inserter:!1,__experimentalToolbar:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-page-list-editor",style:"wp-block-page-list"},{name:d_}=u_,p_={__experimentalLabel:({label:e})=>e,icon:gx,example:{},edit:function({context:e,attributes:t}){const{id:o,label:n,link:a,hasChildren:r,title:i}=t,s="showSubmenuIcon"in e,l=(0,it.useSelect)((e=>{if(!e(ct.store).canUser("read",{kind:"root",name:"site"}))return;const t=e(ct.store).getEntityRecord("root","site");return"page"===t?.show_on_front&&t?.page_on_front}),[]),c=jh(Ch(e,!0)),u=(0,nt.useBlockProps)(c,{className:"wp-block-pages-list__item"}),d=(0,nt.useInnerBlocksProps)(u);return(0,Je.jsxs)("li",{className:ft("wp-block-pages-list__item",{"has-child":r,"wp-block-navigation-item":s,"open-on-click":e.openSubmenusOnClick,"open-on-hover-click":!e.openSubmenusOnClick&&e.showSubmenuIcon,"menu-item-home":o===l}),children:[r&&e.openSubmenusOnClick?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("button",{type:"button",className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle","aria-expanded":"false",children:(0,tn.decodeEntities)(n)}),(0,Je.jsx)("span",{className:"wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon",children:(0,Je.jsx)(c_,{})})]}):(0,Je.jsx)("a",{className:ft("wp-block-pages-list__item__link",{"wp-block-navigation-item__content":s}),href:a,children:(0,tn.decodeEntities)(i)}),r&&(0,Je.jsxs)(Je.Fragment,{children:[!e.openSubmenusOnClick&&e.showSubmenuIcon&&(0,Je.jsx)("button",{className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon","aria-expanded":"false",type:"button",children:(0,Je.jsx)(c_,{})}),(0,Je.jsx)("ul",{...d})]})]},o)}},m_=()=>et({name:d_,metadata:u_,settings:p_}),g_=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})}),h_={className:!1},x_={align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:""},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},fontSize:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]},style:{type:"object"}},__=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customFontSize)return e;const t={};(e.customTextColor||e.customBackgroundColor)&&(t.color={}),e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customFontSize&&(t.typography={fontSize:e.customFontSize});const{customTextColor:o,customBackgroundColor:n,customFontSize:a,...r}=e;return{...r,style:t}},{style:b_,...y_}=x_,f_=[{supports:h_,attributes:{...y_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},save({attributes:e}){const{align:t,content:o,dropCap:n,direction:a}=e,r=ft({"has-drop-cap":t!==((0,ot.isRTL)()?"left":"right")&&"center"!==t&&n,[`has-text-align-${t}`]:t});return(0,Je.jsx)("p",{...nt.useBlockProps.save({className:r,dir:a}),children:(0,Je.jsx)(nt.RichText.Content,{value:o})})}},{supports:h_,attributes:{...y_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:__,save({attributes:e}){const{align:t,content:o,dropCap:n,backgroundColor:a,textColor:r,customBackgroundColor:i,customTextColor:s,fontSize:l,customFontSize:c,direction:u}=e,d=(0,nt.getColorClassName)("color",r),p=(0,nt.getColorClassName)("background-color",a),m=(0,nt.getFontSizeClass)(l),g=ft({"has-text-color":r||s,"has-background":a||i,"has-drop-cap":n,[`has-text-align-${t}`]:t,[m]:m,[d]:d,[p]:p}),h={backgroundColor:p?void 0:i,color:d?void 0:s,fontSize:m?void 0:c};return(0,Je.jsx)(nt.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:o,dir:u})}},{supports:h_,attributes:{...y_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:__,save({attributes:e}){const{align:t,content:o,dropCap:n,backgroundColor:a,textColor:r,customBackgroundColor:i,customTextColor:s,fontSize:l,customFontSize:c,direction:u}=e,d=(0,nt.getColorClassName)("color",r),p=(0,nt.getColorClassName)("background-color",a),m=(0,nt.getFontSizeClass)(l),g=ft({"has-text-color":r||s,"has-background":a||i,"has-drop-cap":n,[m]:m,[d]:d,[p]:p}),h={backgroundColor:p?void 0:i,color:d?void 0:s,fontSize:m?void 0:c,textAlign:t};return(0,Je.jsx)(nt.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:o,dir:u})}},{supports:h_,attributes:{...y_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"},width:{type:"string"}},migrate:__,save({attributes:e}){const{width:t,align:o,content:n,dropCap:a,backgroundColor:r,textColor:i,customBackgroundColor:s,customTextColor:l,fontSize:c,customFontSize:u}=e,d=(0,nt.getColorClassName)("color",i),p=(0,nt.getColorClassName)("background-color",r),m=c&&`is-${c}-text`,g=ft({[`align${t}`]:t,"has-background":r||s,"has-drop-cap":a,[m]:m,[d]:d,[p]:p}),h={backgroundColor:p?void 0:s,color:d?void 0:l,fontSize:m?void 0:u,textAlign:o};return(0,Je.jsx)(nt.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:n})}},{supports:h_,attributes:{...y_,fontSize:{type:"number"}},save({attributes:e}){const{width:t,align:o,content:n,dropCap:a,backgroundColor:r,textColor:i,fontSize:s}=e,l=ft({[`align${t}`]:t,"has-background":r,"has-drop-cap":a}),c={backgroundColor:r,color:i,fontSize:s,textAlign:o};return(0,Je.jsx)("p",{style:c,className:l||void 0,children:n})},migrate:e=>__({...e,customFontSize:Number.isFinite(e.fontSize)?e.fontSize:void 0,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.backgroundColor&&"#"===e.backgroundColor[0]?e.backgroundColor:void 0})},{supports:h_,attributes:{...x_,content:{type:"string",source:"html",default:""}},save:({attributes:e})=>(0,Je.jsx)(st.RawHTML,{children:e.content}),migrate:e=>e}],v_=f_,k_=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z"})});function w_(e){const{batch:t}=(0,it.useRegistry)(),{moveBlocksToPosition:o,replaceInnerBlocks:n,duplicateBlocks:a,insertBlock:r}=(0,it.useDispatch)(nt.store),{getBlockRootClientId:i,getBlockIndex:s,getBlockOrder:l,getBlockName:c,getBlock:u,getNextBlockClientId:d,canInsertBlockType:p}=(0,it.useSelect)(nt.store),m=(0,st.useRef)(e);return m.current=e,(0,ut.useRefEffect)((e=>{function g(e){if(e.defaultPrevented)return;if(e.keyCode!==wo.ENTER)return;const{content:g,clientId:h}=m.current;if(g.length)return;const x=i(h);if(!(0,Ke.hasBlockSupport)(c(x),"__experimentalOnEnter",!1))return;const _=l(x),b=_.indexOf(h);if(b===_.length-1){let t=x;for(;!p(c(h),i(t));)t=i(t);return void("string"==typeof t&&(e.preventDefault(),o([h],x,i(t),s(t)+1)))}const y=(0,Ke.getDefaultBlockName)();if(!p(y,i(x)))return;e.preventDefault();const f=u(x);t((()=>{a([x]);const e=s(x);n(x,f.innerBlocks.slice(0,b)),n(d(x),f.innerBlocks.slice(b+1)),r((0,Ke.createBlock)(y),e+1,i(x),!0)}))}return e.addEventListener("keydown",g),()=>{e.removeEventListener("keydown",g)}}),[])}function C_({direction:e,setDirection:t}){return(0,ot.isRTL)()&&(0,Je.jsx)(tt.ToolbarButton,{icon:k_,title:(0,ot._x)("Left to right","editor button"),isActive:"ltr"===e,onClick:()=>{t("ltr"===e?void 0:"ltr")}})}function j_(e){return e===((0,ot.isRTL)()?"left":"right")||"center"===e}function S_({clientId:e,attributes:t,setAttributes:o,name:n}){const[a]=(0,nt.useSettings)("typography.dropCap");if(!a)return null;const{align:r,dropCap:i}=t;let s;s=j_(r)?(0,ot.__)("Not available for aligned text."):i?(0,ot.__)("Showing large initial letter."):(0,ot.__)("Show a large initial letter.");const l=(0,Ke.getBlockSupport)(n,"typography.defaultControls.dropCap",!1);return(0,Je.jsx)(nt.InspectorControls,{group:"typography",children:(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!i,label:(0,ot.__)("Drop cap"),isShownByDefault:l,onDeselect:()=>o({dropCap:void 0}),resetAllFilter:()=>({dropCap:void 0}),panelId:e,children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Drop cap"),checked:!!i,onChange:()=>o({dropCap:!i}),help:s,disabled:j_(r)})})})}const B_=function({attributes:e,mergeBlocks:t,onReplace:o,onRemove:n,setAttributes:a,clientId:r,isSelected:i,name:s}){const{align:l,content:c,direction:u,dropCap:d,placeholder:p}=e,m=(0,nt.useBlockProps)({ref:w_({clientId:r,content:c}),className:ft({"has-drop-cap":!j_(l)&&d,[`has-text-align-${l}`]:l}),style:{direction:u}}),g=(0,nt.useBlockEditingMode)();return(0,Je.jsxs)(Je.Fragment,{children:["default"===g&&(0,Je.jsxs)(nt.BlockControls,{group:"block",children:[(0,Je.jsx)(nt.AlignmentControl,{value:l,onChange:e=>a({align:e,dropCap:!j_(e)&&d})}),(0,Je.jsx)(C_,{direction:u,setDirection:e=>a({direction:e})})]}),i&&(0,Je.jsx)(S_,{name:s,clientId:r,attributes:e,setAttributes:a}),(0,Je.jsx)(nt.RichText,{identifier:"content",tagName:"p",...m,value:c,onChange:e=>a({content:e}),onMerge:t,onReplace:o,onRemove:n,"aria-label":nt.RichText.isEmpty(c)?(0,ot.__)("Empty block; start writing or type forward slash to choose a block"):(0,ot.__)("Block: Paragraph"),"data-empty":nt.RichText.isEmpty(c),placeholder:p||(0,ot.__)("Type / to choose a block"),"data-custom-placeholder":!!p||void 0,__unstableEmbedURLOnPaste:!0,__unstableAllowPrefixTransformations:!0})]})};const{name:T_}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/paragraph",title:"Paragraph",category:"text",description:"Start with the basic building block of all narrative.",keywords:["text"],textdomain:"default",attributes:{align:{type:"string"},content:{type:"rich-text",source:"rich-text",selector:"p",role:"content"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{splitting:!0,anchor:!0,className:!1,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalSelector:"p",__unstablePasteTextInline:!0,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"},N_={from:[{type:"raw",priority:20,selector:"p",schema:({phrasingContentSchema:e,isPaste:t})=>({p:{children:e,attributes:t?[]:["style","id"]}}),transform(e){const t=(0,Ke.getBlockAttributes)(T_,e.outerHTML),{textAlign:o}=e.style||{};return"left"!==o&&"center"!==o&&"right"!==o||(t.align=o),(0,Ke.createBlock)(T_,t)}}]},P_=N_,I_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/paragraph",title:"Paragraph",category:"text",description:"Start with the basic building block of all narrative.",keywords:["text"],textdomain:"default",attributes:{align:{type:"string"},content:{type:"rich-text",source:"rich-text",selector:"p",role:"content"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{splitting:!0,anchor:!0,className:!1,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalSelector:"p",__unstablePasteTextInline:!0,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"},{name:M_}=I_,D_={icon:g_,example:{attributes:{content:(0,ot.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}},__experimentalLabel(e,{context:t}){const o=e?.metadata?.name;if("list-view"===t&&o)return o;if("accessibility"===t){if(o)return o;const{content:t}=e;return t&&0!==t.length?t:(0,ot.__)("Empty")}},transforms:P_,deprecated:v_,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:B_,save:function({attributes:e}){const{align:t,content:o,dropCap:n,direction:a}=e,r=ft({"has-drop-cap":t!==((0,ot.isRTL)()?"left":"right")&&"center"!==t&&n,[`has-text-align-${t}`]:t});return(0,Je.jsx)("p",{...nt.useBlockProps.save({className:r,dir:a}),children:(0,Je.jsx)(nt.RichText.Content,{value:o})})}},z_=()=>et({name:M_,metadata:I_,settings:D_}),A_=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z",fillRule:"evenodd",clipRule:"evenodd"})}),R_={who:"authors",per_page:100};const H_=function({isSelected:e,context:{postType:t,postId:o,queryId:n},attributes:a,setAttributes:r}){const i=Number.isFinite(n),{authorId:s,authorDetails:l,authors:c,supportsAuthor:u}=(0,it.useSelect)((e=>{var n;const{getEditedEntityRecord:a,getUser:r,getUsers:i,getPostType:s}=e(ct.store),l=a("postType",t,o)?.author;return{authorId:l,authorDetails:l?r(l):null,authors:i(R_),supportsAuthor:null!==(n=s(t)?.supports?.author)&&void 0!==n&&n}}),[t,o]),{editEntityRecord:d}=(0,it.useDispatch)(ct.store),{textAlign:p,showAvatar:m,showBio:g,byline:h,isLink:x,linkTarget:_}=a,b=[],y=l?.name||(0,ot.__)("Post Author");l?.avatar_urls&&Object.keys(l.avatar_urls).forEach((e=>{b.push({value:e,label:`${e} x ${e}`})}));const f=(0,nt.useBlockProps)({className:ft({[`has-text-align-${p}`]:p})}),v=c?.length?c.map((({id:e,name:t})=>({value:e,label:t}))):[],k=e=>{d("postType",t,o,{author:e})},w=v.length>=25,C=!!o&&!i&&v.length>0;return u||void 0===t?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsx)(tt.PanelBody,{title:(0,ot.__)("Settings"),children:(0,Je.jsxs)(tt.__experimentalVStack,{spacing:4,className:"wp-block-post-author__inspector-settings",children:[C&&(w&&(0,Je.jsx)(tt.ComboboxControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Author"),options:v,value:s,onChange:k,allowReset:!1})||(0,Je.jsx)(tt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Author"),value:s,options:v,onChange:k})),(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Show avatar"),checked:m,onChange:()=>r({showAvatar:!m})}),m&&(0,Je.jsx)(tt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Avatar size"),value:a.avatarSize,options:b,onChange:e=>{r({avatarSize:Number(e)})}}),(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Show bio"),checked:g,onChange:()=>r({showBio:!g})}),(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Link author name to author page"),checked:x,onChange:()=>r({isLink:!x})}),x&&(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Open in new tab"),onChange:e=>r({linkTarget:e?"_blank":"_self"}),checked:"_blank"===_})]})})}),(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(nt.AlignmentControl,{value:p,onChange:e=>{r({textAlign:e})}})}),(0,Je.jsxs)("div",{...f,children:[m&&l?.avatar_urls&&(0,Je.jsx)("div",{className:"wp-block-post-author__avatar",children:(0,Je.jsx)("img",{width:a.avatarSize,src:l.avatar_urls[a.avatarSize],alt:l.name})}),(0,Je.jsxs)("div",{className:"wp-block-post-author__content",children:[(!nt.RichText.isEmpty(h)||e)&&(0,Je.jsx)(nt.RichText,{identifier:"byline",className:"wp-block-post-author__byline","aria-label":(0,ot.__)("Post author byline text"),placeholder:(0,ot.__)("Write byline…"),value:h,onChange:e=>r({byline:e})}),(0,Je.jsx)("p",{className:"wp-block-post-author__name",children:x?(0,Je.jsx)("a",{href:"#post-author-pseudo-link",onClick:e=>e.preventDefault(),children:y}):y}),g&&(0,Je.jsx)("p",{className:"wp-block-post-author__bio",dangerouslySetInnerHTML:{__html:l?.description}})]})]})]}):(0,Je.jsx)("div",{...f,children:(0,ot.sprintf)((0,ot.__)("This post type (%s) does not support the author."),t)})},L_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-author",title:"Author",category:"theme",description:"Display post author details such as name, avatar, and bio.",textdomain:"default",attributes:{textAlign:{type:"string"},avatarSize:{type:"number",default:48},showAvatar:{type:"boolean",default:!0},showBio:{type:"boolean"},byline:{type:"string"},isLink:{type:"boolean",default:!1,role:"content"},linkTarget:{type:"string",default:"_self",role:"content"}},usesContext:["postType","postId","queryId"],supports:{html:!1,spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDuotone:".wp-block-post-author__avatar img",__experimentalDefaultControls:{background:!0,text:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},editorStyle:"wp-block-post-author-editor",style:"wp-block-post-author"},{name:V_}=L_,F_={icon:A_,example:{viewportWidth:350,attributes:{showBio:!0,byline:(0,ot.__)("Posted by")}},edit:H_},E_=()=>et({name:V_,metadata:L_,settings:F_});const O_=function({context:{postType:e,postId:t},attributes:{textAlign:o,isLink:n,linkTarget:a},setAttributes:r}){const{authorName:i,supportsAuthor:s}=(0,it.useSelect)((o=>{var n;const{getEditedEntityRecord:a,getUser:r,getPostType:i}=o(ct.store),s=a("postType",e,t)?.author;return{authorName:s?r(s):null,supportsAuthor:null!==(n=i(e)?.supports?.author)&&void 0!==n&&n}}),[e,t]),l=(0,nt.useBlockProps)({className:ft({[`has-text-align-${o}`]:o})}),c=i?.name||(0,ot.__)("Author Name"),u=n?(0,Je.jsx)("a",{href:"#author-pseudo-link",onClick:e=>e.preventDefault(),className:"wp-block-post-author-name__link",children:c}):c,d=mt();return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(nt.AlignmentControl,{value:o,onChange:e=>{r({textAlign:e})}})}),(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{r({isLink:!1,linkTarget:"_self"})},dropdownMenuProps:d,children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Link to author archive"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>r({isLink:!1}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Link to author archive"),onChange:()=>r({isLink:!n}),checked:n})}),n&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_self"!==a,onDeselect:()=>r({linkTarget:"_self"}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Open in new tab"),onChange:e=>r({linkTarget:e?"_blank":"_self"}),checked:"_blank"===a})})]})}),(0,Je.jsx)("div",{...l,children:s||void 0===e?u:(0,ot.sprintf)((0,ot.__)("This post type (%s) does not support the author."),e)})]})},$_={from:[{type:"block",blocks:["core/post-author"],transform:({textAlign:e})=>(0,Ke.createBlock)("core/post-author-name",{textAlign:e})}],to:[{type:"block",blocks:["core/post-author"],transform:({textAlign:e})=>(0,Ke.createBlock)("core/post-author",{textAlign:e})}]},G_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-author-name",title:"Author Name",category:"theme",description:"The author name.",textdomain:"default",attributes:{textAlign:{type:"string"},isLink:{type:"boolean",default:!1,role:"content"},linkTarget:{type:"string",default:"_self",role:"content"}},usesContext:["postType","postId"],example:{viewportWidth:350},supports:{html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-post-author-name"},{name:U_}=G_,q_={icon:A_,transforms:$_,edit:O_},W_=()=>et({name:U_,metadata:G_,settings:q_});const Z_=function({context:{postType:e,postId:t},attributes:{textAlign:o},setAttributes:n}){const{authorDetails:a}=(0,it.useSelect)((o=>{const{getEditedEntityRecord:n,getUser:a}=o(ct.store),r=n("postType",e,t)?.author;return{authorDetails:r?a(r):null}}),[e,t]),r=(0,nt.useBlockProps)({className:ft({[`has-text-align-${o}`]:o})}),i=a?.description||(0,ot.__)("Author Biography");return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(nt.AlignmentControl,{value:o,onChange:e=>{n({textAlign:e})}})}),(0,Je.jsx)("div",{...r,dangerouslySetInnerHTML:{__html:i}})]})},Q_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-author-biography",title:"Author Biography",category:"theme",description:"The author biography.",textdomain:"default",attributes:{textAlign:{type:"string"}},usesContext:["postType","postId"],example:{viewportWidth:350},supports:{spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-post-author-biography"},{name:K_}=Q_,Y_={icon:A_,edit:Z_},J_=()=>et({name:K_,metadata:Q_,settings:Y_}),X_=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})}),eb=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]];const tb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/post-comment",title:"Comment (deprecated)",category:"theme",allowedBlocks:["core/avatar","core/comment-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link"],description:"This block is deprecated. Please use the Comments block instead.",textdomain:"default",attributes:{commentId:{type:"number"}},providesContext:{commentId:"commentId"},supports:{html:!1,inserter:!1,interactivity:{clientNavigation:!0}}},{name:ob}=tb,nb={icon:_p,edit:function({attributes:{commentId:e},setAttributes:t}){const[o,n]=(0,st.useState)(e),a=(0,nt.useBlockProps)(),r=(0,nt.useInnerBlocksProps)(a,{template:eb});return e?(0,Je.jsx)("div",{...r}):(0,Je.jsx)("div",{...a,children:(0,Je.jsxs)(tt.Placeholder,{icon:X_,label:(0,ot._x)("Post Comment","block title"),instructions:(0,ot.__)("To show a comment, input the comment ID."),children:[(0,Je.jsx)(tt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e,onChange:e=>n(parseInt(e))}),(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{t({commentId:o})},children:(0,ot.__)("Save")})]})})},save:function(){const e=nt.useBlockProps.save(),t=nt.useInnerBlocksProps.save(e);return(0,Je.jsx)("div",{...t})}},ab=()=>et({name:ob,metadata:tb,settings:nb}),rb=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-2.2 6.6H7l1.6-2.2c.3-.4.5-.7.6-.9.1-.2.2-.4.2-.5 0-.2-.1-.3-.1-.4-.1-.1-.2-.1-.4-.1s-.4 0-.6.1c-.3.1-.5.3-.7.4l-.2.2-.2-1.2.1-.1c.3-.2.5-.3.8-.4.3-.1.6-.1.9-.1.3 0 .6.1.9.2.2.1.4.3.6.5.1.2.2.5.2.7 0 .3-.1.6-.2.9-.1.3-.4.7-.7 1.1l-.5.6h1.6v1.2z"})});const ib={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/post-comments-count",title:"Comments Count",category:"theme",description:"Display a post's comments count.",textdomain:"default",attributes:{textAlign:{type:"string"}},usesContext:["postId"],supports:{html:!1,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},interactivity:{clientNavigation:!0}},style:"wp-block-post-comments-count"},{name:sb}=ib,lb={icon:rb,edit:function({attributes:e,context:t,setAttributes:o}){const{textAlign:n}=e,{postId:a}=t,[r,i]=(0,st.useState)(),s=(0,nt.useBlockProps)({className:ft({[`has-text-align-${n}`]:n})});(0,st.useEffect)((()=>{if(!a)return;const e=a;tr()({path:(0,vt.addQueryArgs)("/wp/v2/comments",{post:a}),parse:!1}).then((t=>{e===a&&i(t.headers.get("X-WP-Total"))}))}),[a]);const l=a&&void 0!==r,c={...s.style,textDecoration:l?s.style?.textDecoration:void 0};return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(nt.AlignmentControl,{value:n,onChange:e=>{o({textAlign:e})}})}),(0,Je.jsx)("div",{...s,style:c,children:l?r:(0,Je.jsx)(nt.Warning,{children:(0,ot.__)("Post Comments Count block: post not found.")})})]})}},cb=()=>et({name:sb,metadata:ib,settings:lb}),ub=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-.5 6.6H6.7l-1.2 1.2v-6.3h7v5.1z"})});const db={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-comments-form",title:"Comments Form",category:"theme",description:"Display a post's comments form.",textdomain:"default",attributes:{textAlign:{type:"string"}},usesContext:["postId","postType"],supports:{html:!1,color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},editorStyle:"wp-block-post-comments-form-editor",style:["wp-block-post-comments-form","wp-block-buttons","wp-block-button"],example:{attributes:{textAlign:"center"}}},{name:pb}=db,mb={icon:ub,edit:function e({attributes:t,context:o,setAttributes:n}){const{textAlign:a}=t,{postId:r,postType:i}=o,s=(0,ut.useInstanceId)(e),l=(0,ot.sprintf)("comments-form-edit-%d-desc",s),c=(0,nt.useBlockProps)({className:ft({[`has-text-align-${a}`]:a}),"aria-describedby":l});return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(nt.AlignmentControl,{value:a,onChange:e=>{n({textAlign:e})}})}),(0,Je.jsxs)("div",{...c,children:[(0,Je.jsx)(ua,{postId:r,postType:i}),(0,Je.jsx)(tt.VisuallyHidden,{id:l,children:(0,ot.__)("Comments form disabled in editor.")})]})]})}},gb=()=>et({name:pb,metadata:db,settings:mb});const hb=function({context:e,attributes:t,setAttributes:o}){const{textAlign:n}=t,{postType:a,postId:r}=e,[i,s]=(0,st.useState)(),l=(0,nt.useBlockProps)({className:ft({[`has-text-align-${n}`]:n})});(0,st.useEffect)((()=>{if(!r)return;const e=r;tr()({path:(0,vt.addQueryArgs)("/wp/v2/comments",{post:r}),parse:!1}).then((t=>{e===r&&s(t.headers.get("X-WP-Total"))}))}),[r]);const c=(0,it.useSelect)((e=>e(ct.store).getEditedEntityRecord("postType",a,r)),[a,r]);if(!c)return null;const{link:u}=c;let d;if(void 0!==i){const e=parseInt(i);d=0===e?(0,ot.__)("No comments"):(0,ot.sprintf)((0,ot._n)("%s comment","%s comments",e),e.toLocaleString())}return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(nt.AlignmentControl,{value:n,onChange:e=>{o({textAlign:e})}})}),(0,Je.jsx)("div",{...l,children:u&&void 0!==d?(0,Je.jsx)("a",{href:u+"#comments",onClick:e=>e.preventDefault(),children:d}):(0,Je.jsx)(nt.Warning,{children:(0,ot.__)("Post Comments Link block: post not found.")})})]})},xb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/post-comments-link",title:"Comments Link",category:"theme",description:"Displays the link to the current post comments.",textdomain:"default",usesContext:["postType","postId"],attributes:{textAlign:{type:"string"}},supports:{html:!1,color:{link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-post-comments-link"},{name:_b}=xb,bb={edit:hb,icon:rb},yb=()=>et({name:_b,metadata:xb,settings:bb}),fb=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"})});function vb({parentLayout:e,layoutClassNames:t,userCanEdit:o,postType:n,postId:a}){const[,,r]=(0,ct.useEntityProp)("postType",n,"content",a),i=(0,nt.useBlockProps)({className:t}),s=(0,st.useMemo)((()=>r?.raw?(0,Ke.parse)(r.raw):[]),[r?.raw]),l=(0,nt.__experimentalUseBlockPreview)({blocks:s,props:i,layout:e});return o?(0,Je.jsx)("div",{...l}):r?.protected?(0,Je.jsx)("div",{...i,children:(0,Je.jsx)(nt.Warning,{children:(0,ot.__)("This content is password protected.")})}):(0,Je.jsx)("div",{...i,dangerouslySetInnerHTML:{__html:r?.rendered}})}function kb({context:e={}}){const{postType:t,postId:o}=e,[n,a,r]=(0,ct.useEntityBlockEditor)("postType",t,{id:o}),i=(0,it.useSelect)((e=>e(ct.store).getEntityRecord("postType",t,o)),[t,o]),s=!!i?.content?.raw||n?.length,l=(0,nt.useInnerBlocksProps)((0,nt.useBlockProps)({className:"entry-content"}),{value:n,onInput:a,onChange:r,template:s?void 0:[["core/paragraph"]]});return(0,Je.jsx)("div",{...l})}function wb(e){const{context:{queryId:t,postType:o,postId:n}={},layoutClassNames:a}=e,r=dt("postType",o,n);if(void 0===r)return null;const i=Number.isFinite(t);return r&&!i?(0,Je.jsx)(kb,{...e}):(0,Je.jsx)(vb,{parentLayout:e.parentLayout,layoutClassNames:a,userCanEdit:r,postType:o,postId:n})}function Cb({layoutClassNames:e}){const t=(0,nt.useBlockProps)({className:e});return(0,Je.jsxs)("div",{...t,children:[(0,Je.jsx)("p",{children:(0,ot.__)("This is the Content block, it will display all the blocks in any single post or page.")}),(0,Je.jsx)("p",{children:(0,ot.__)("That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types.")}),(0,Je.jsx)("p",{children:(0,ot.__)("If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well.")})]})}function jb(){const e=(0,nt.useBlockProps)();return(0,Je.jsx)("div",{...e,children:(0,Je.jsx)(nt.Warning,{children:(0,ot.__)("Block cannot be rendered inside itself.")})})}const Sb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-content",title:"Content",category:"theme",description:"Displays the contents of a post or page.",textdomain:"default",usesContext:["postId","postType","queryId"],example:{viewportWidth:350},supports:{align:["wide","full"],html:!1,layout:!0,background:{backgroundImage:!0,backgroundSize:!0,__experimentalDefaultControls:{backgroundImage:!0}},dimensions:{minHeight:!0},spacing:{blockGap:!0,padding:!0,margin:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!1,text:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-post-content",editorStyle:"wp-block-post-content-editor"},{name:Bb}=Sb,Tb={icon:fb,edit:function({context:e,__unstableLayoutClassNames:t,__unstableParentLayout:o}){const{postId:n,postType:a}=e,r=(0,nt.useHasRecursion)(n);return n&&a&&r?(0,Je.jsx)(jb,{}):(0,Je.jsx)(nt.RecursionProvider,{uniqueId:n,children:n&&a?(0,Je.jsx)(wb,{context:e,parentLayout:o,layoutClassNames:t}):(0,Je.jsx)(Cb,{layoutClassNames:t})})}},Nb=()=>et({name:Bb,metadata:Sb,settings:Tb});function Pb(e){return/(?:^|[^\\])[aAgh]/.test(e)}const Ib={attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:lo,isEligible:({style:e})=>e?.typography?.fontFamily},Mb=[Ib],Db=[{name:"post-date-modified",title:(0,ot.__)("Modified Date"),description:(0,ot.__)("Display a post's last updated date."),attributes:{displayType:"modified"},scope:["block","inserter"],isActive:e=>"modified"===e.displayType,icon:za}],zb=Db,Ab={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-date",title:"Date",category:"theme",description:"Display the publish date for an entry such as a post or page.",textdomain:"default",attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1,role:"content"},displayType:{type:"string",default:"date"}},usesContext:["postId","postType","queryId"],example:{viewportWidth:350},supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}}},{name:Rb}=Ab,Hb={icon:za,edit:function({attributes:{textAlign:e,format:t,isLink:o,displayType:n},context:{postId:a,postType:r,queryId:i},setAttributes:s}){const l=(0,nt.useBlockProps)({className:ft({[`has-text-align-${e}`]:e,"wp-block-post-date__modified-date":"modified"===n})}),c=mt(),[u,d]=(0,st.useState)(null),p=(0,st.useMemo)((()=>({anchor:u})),[u]),m=Number.isFinite(i),g=(0,Aa.getSettings)(),[h=g.formats.date]=(0,ct.useEntityProp)("root","site","date_format"),[x=g.formats.time]=(0,ct.useEntityProp)("root","site","time_format"),[_,b]=(0,ct.useEntityProp)("postType",r,n,a),y=(0,it.useSelect)((e=>r?e(ct.store).getPostType(r):null),[r]),f="date"===n?(0,ot.__)("Post Date"):(0,ot.__)("Post Modified Date");let v=_?(0,Je.jsx)("time",{dateTime:(0,Aa.dateI18n)("c",_),ref:d,children:"human-diff"===t?(0,Aa.humanTimeDiff)(_):(0,Aa.dateI18n)(t||h,_)}):f;return o&&_&&(v=(0,Je.jsx)("a",{href:"#post-date-pseudo-link",onClick:e=>e.preventDefault(),children:v})),(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)(nt.BlockControls,{group:"block",children:[(0,Je.jsx)(nt.AlignmentControl,{value:e,onChange:e=>{s({textAlign:e})}}),_&&"date"===n&&!m&&(0,Je.jsx)(tt.ToolbarGroup,{children:(0,Je.jsx)(tt.Dropdown,{popoverProps:p,renderContent:({onClose:e})=>(0,Je.jsx)(nt.__experimentalPublishDateTimePicker,{currentDate:_,onChange:b,is12Hour:Pb(x),onClose:e,dateOrder:(0,ot._x)("dmy","date order")}),renderToggle:({isOpen:e,onToggle:t})=>(0,Je.jsx)(tt.ToolbarButton,{"aria-expanded":e,icon:Ys,title:(0,ot.__)("Change Date"),onClick:t,onKeyDown:o=>{e||o.keyCode!==wo.DOWN||(o.preventDefault(),t())}})})})]}),(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{s({format:void 0,isLink:!1,displayType:"date"})},dropdownMenuProps:c,children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:(0,ot.__)("Date Format"),onDeselect:()=>s({format:void 0}),isShownByDefault:!0,children:(0,Je.jsx)(nt.__experimentalDateFormatPicker,{format:t,defaultFormat:h,onChange:e=>s({format:e})})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!1!==o,label:y?.labels.singular_name?(0,ot.sprintf)((0,ot.__)("Link to %s"),y.labels.singular_name.toLowerCase()):(0,ot.__)("Link to post"),onDeselect:()=>s({isLink:!1}),isShownByDefault:!0,children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:y?.labels.singular_name?(0,ot.sprintf)((0,ot.__)("Link to %s"),y.labels.singular_name.toLowerCase()):(0,ot.__)("Link to post"),onChange:()=>s({isLink:!o}),checked:o})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>"date"!==n,label:(0,ot.__)("Display last modified date"),onDeselect:()=>s({displayType:"date"}),isShownByDefault:!0,children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Display last modified date"),onChange:e=>s({displayType:e?"modified":"date"}),checked:"modified"===n,help:(0,ot.__)("Only shows if the post has been modified")})})]})}),(0,Je.jsx)("div",{...l,children:v})]})},deprecated:Mb,variations:zb},Lb=()=>et({name:Rb,metadata:Ab,settings:Hb}),Vb=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z"})});const Fb={from:[{type:"block",blocks:["core/post-content"],transform:()=>(0,Ke.createBlock)("core/post-excerpt")}],to:[{type:"block",blocks:["core/post-content"],transform:()=>(0,Ke.createBlock)("core/post-content")}]},Eb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-excerpt",title:"Excerpt",category:"theme",description:"Display the excerpt.",textdomain:"default",attributes:{textAlign:{type:"string"},moreText:{type:"string"},showMoreOnNewLine:{type:"boolean",default:!0},excerptLength:{type:"number",default:55}},usesContext:["postId","postType","queryId"],example:{viewportWidth:350},supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},editorStyle:"wp-block-post-excerpt-editor",style:"wp-block-post-excerpt"},{name:Ob}=Eb,$b={icon:Vb,transforms:Fb,edit:function({attributes:{textAlign:e,moreText:t,showMoreOnNewLine:o,excerptLength:n},setAttributes:a,isSelected:r,context:{postId:i,postType:s,queryId:l}}){const c=Number.isFinite(l),u=dt("postType",s,i),[d,p,{rendered:m,protected:g}={}]=(0,ct.useEntityProp)("postType",s,"excerpt",i),h=mt(),x=(0,it.useSelect)((e=>"page"===s||!!e(ct.store).getPostType(s)?.supports?.excerpt),[s]),_=u&&!c&&x,b=(0,nt.useBlockProps)({className:ft({[`has-text-align-${e}`]:e})}),y=(0,ot._x)("words","Word count type. Do not translate!"),f=(0,st.useMemo)((()=>{if(!m)return"";const e=(new window.DOMParser).parseFromString(m,"text/html");return e.body.textContent||e.body.innerText||""}),[m]);if(!s||!i)return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsx)(nt.AlignmentToolbar,{value:e,onChange:e=>a({textAlign:e})})}),(0,Je.jsx)("div",{...b,children:(0,Je.jsx)("p",{children:(0,ot.__)("This block will display the excerpt.")})})]});if(g&&!u)return(0,Je.jsx)("div",{...b,children:(0,Je.jsx)(nt.Warning,{children:(0,ot.__)("The content is currently protected and does not have the available excerpt.")})});const v=(0,Je.jsx)(nt.RichText,{identifier:"moreText",className:"wp-block-post-excerpt__more-link",tagName:"a","aria-label":(0,ot.__)("“Read more” link text"),placeholder:(0,ot.__)('Add "read more" link text'),value:t,onChange:e=>a({moreText:e}),withoutInteractiveFormatting:!0}),k=ft("wp-block-post-excerpt__excerpt",{"is-inline":!o}),w=(d||f).trim();let C="";if("words"===y)C=w.split(" ",n).join(" ");else if("characters_excluding_spaces"===y){const e=w.split("",n).join(""),t=e.length-e.replaceAll(" ","").length;C=w.split("",n+t).join("")}else"characters_including_spaces"===y&&(C=w.split("",n).join(""));const j=C!==w,S=_?(0,Je.jsx)(nt.RichText,{className:k,"aria-label":(0,ot.__)("Excerpt text"),value:r?w:(j?C+"…":w)||(0,ot.__)("No excerpt found"),onChange:p,tagName:"p"}):(0,Je.jsx)("p",{className:k,children:j?C+"…":w||(0,ot.__)("No excerpt found")});return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsx)(nt.AlignmentToolbar,{value:e,onChange:e=>a({textAlign:e})})}),(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{a({showMoreOnNewLine:!0,excerptLength:55})},dropdownMenuProps:h,children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!0!==o,label:(0,ot.__)("Show link on new line"),onDeselect:()=>a({showMoreOnNewLine:!0}),isShownByDefault:!0,children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Show link on new line"),checked:o,onChange:e=>a({showMoreOnNewLine:e})})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>55!==n,label:(0,ot.__)("Max number of words"),onDeselect:()=>a({excerptLength:55}),isShownByDefault:!0,children:(0,Je.jsx)(tt.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Max number of words"),value:n,onChange:e=>{a({excerptLength:e})},min:"10",max:"100"})})]})}),(0,Je.jsxs)("div",{...b,children:[S,!o&&" ",o?(0,Je.jsx)("p",{className:"wp-block-post-excerpt__more-text",children:v}):v]})]})}},Gb=()=>et({name:Ob,metadata:Eb,settings:$b}),Ub=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"})}),qb=(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"cover",label:(0,ot._x)("Cover","Scale option for Image dimension control")}),(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"contain",label:(0,ot._x)("Contain","Scale option for Image dimension control")}),(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"fill",label:(0,ot._x)("Fill","Scale option for Image dimension control")})]}),Wb="cover",Zb={cover:(0,ot.__)("Image is scaled and cropped to fill the entire space without being distorted."),contain:(0,ot.__)("Image is scaled to fill the space without clipping nor distorting."),fill:(0,ot.__)("Image will be stretched and distorted to completely fill the space.")},Qb=({clientId:e,attributes:{aspectRatio:t,width:o,height:n,scale:a},setAttributes:r})=>{const[i,s,l,c]=(0,nt.useSettings)("spacing.units","dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),u=(0,tt.__experimentalUseCustomUnits)({availableUnits:i||["px","%","vw","em","rem"]}),d=(e,t)=>{const o=parseFloat(t);isNaN(o)&&t||r({[e]:o<0?"0":t})},p=(0,ot._x)("Scale","Image scaling options"),m=n||t&&"auto"!==t,g=l?.map((({name:e,ratio:t})=>({label:e,value:t}))),h=s?.map((({name:e,ratio:t})=>({label:e,value:t}))),x=[{label:(0,ot._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...c?h:[],...g||[]];return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:(0,ot.__)("Aspect ratio"),onDeselect:()=>r({aspectRatio:void 0}),resetAllFilter:()=>({aspectRatio:void 0}),isShownByDefault:!0,panelId:e,children:(0,Je.jsx)(tt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Aspect ratio"),value:t,options:x,onChange:e=>r({aspectRatio:e})})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!n,label:(0,ot.__)("Height"),onDeselect:()=>r({height:void 0}),resetAllFilter:()=>({height:void 0}),isShownByDefault:!0,panelId:e,children:(0,Je.jsx)(tt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,ot.__)("Height"),labelPosition:"top",value:n||"",min:0,onChange:e=>d("height",e),units:u})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!o,label:(0,ot.__)("Width"),onDeselect:()=>r({width:void 0}),resetAllFilter:()=>({width:void 0}),isShownByDefault:!0,panelId:e,children:(0,Je.jsx)(tt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,ot.__)("Width"),labelPosition:"top",value:o||"",min:0,onChange:e=>d("width",e),units:u})}),m&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!a&&a!==Wb,label:p,onDeselect:()=>r({scale:Wb}),resetAllFilter:()=>({scale:Wb}),isShownByDefault:!0,panelId:e,children:(0,Je.jsx)(tt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:p,value:a,help:Zb[a],onChange:e=>r({scale:e}),isBlock:!0,children:qb})})]})},Kb=(0,ut.compose)([(0,nt.withColors)({overlayColor:"background-color"})])((({clientId:e,attributes:t,setAttributes:o,overlayColor:n,setOverlayColor:a})=>{const{dimRatio:r}=t,{gradientValue:i,setGradient:s}=(0,nt.__experimentalUseGradient)(),l=(0,nt.__experimentalUseMultipleOriginColorsAndGradients)();return l.hasColorsOrGradients?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:n.color,gradientValue:i,label:(0,ot.__)("Overlay"),onColorChange:a,onGradientChange:s,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0}),clearable:!0}],panelId:e,...l}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>void 0!==r,label:(0,ot.__)("Overlay opacity"),onDeselect:()=>o({dimRatio:0}),resetAllFilter:()=>({dimRatio:0}),isShownByDefault:!0,panelId:e,children:(0,Je.jsx)(tt.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Overlay opacity"),value:r,onChange:e=>o({dimRatio:e}),min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0})})]}):null}));const Yb=(0,ut.compose)([(0,nt.withColors)({overlayColor:"background-color"})])((({attributes:e,overlayColor:t})=>{const{dimRatio:o}=e,{gradientClass:n,gradientValue:a}=(0,nt.__experimentalUseGradient)(),r=(0,nt.__experimentalUseMultipleOriginColorsAndGradients)(),i=(0,nt.__experimentalUseBorderProps)(e),s={backgroundColor:t.color,backgroundImage:a,...i.style};return r.hasColorsOrGradients&&o?(0,Je.jsx)("span",{"aria-hidden":"true",className:ft("wp-block-post-featured-image__overlay",(l=o,void 0===l?null:"has-background-dim-"+10*Math.round(l/10)),{[t.class]:t.class,"has-background-dim":void 0!==o,"has-background-gradient":a,[n]:n},i.className),style:s}):null;var l})),Jb=["image"],{ResolutionTool:Xb}=Ot(nt.privateApis);function ey({image:e,value:t,onChange:o}){const{imageSizes:n}=(0,it.useSelect)((e=>{const{getSettings:t}=e(nt.store);return{imageSizes:t().imageSizes}}),[]);if(!n?.length)return null;const a=n.filter((({slug:t})=>e?.media_details?.sizes?.[t]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e})));return(0,Je.jsx)(Xb,{value:t,defaultValue:"full",options:a,onChange:o})}const ty={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-featured-image",title:"Featured Image",category:"theme",description:"Display a post's featured image.",textdomain:"default",attributes:{isLink:{type:"boolean",default:!1,role:"content"},aspectRatio:{type:"string"},width:{type:"string"},height:{type:"string"},scale:{type:"string",default:"cover"},sizeSlug:{type:"string"},rel:{type:"string",attribute:"rel",default:"",role:"content"},linkTarget:{type:"string",default:"_self",role:"content"},overlayColor:{type:"string"},customOverlayColor:{type:"string"},dimRatio:{type:"number",default:0},gradient:{type:"string"},customGradient:{type:"string"},useFirstImageFromPost:{type:"boolean",default:!1}},usesContext:["postId","postType","queryId"],example:{viewportWidth:350},supports:{align:["left","right","center","wide","full"],color:{text:!1,background:!1},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}},filter:{duotone:!0},shadow:{__experimentalSkipSerialization:!0},html:!1,spacing:{margin:!0,padding:!0},interactivity:{clientNavigation:!0}},selectors:{border:".wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay",shadow:".wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder",filter:{duotone:".wp-block-post-featured-image img, .wp-block-post-featured-image .wp-block-post-featured-image__placeholder, .wp-block-post-featured-image .components-placeholder__illustration, .wp-block-post-featured-image .components-placeholder::before"}},editorStyle:"wp-block-post-featured-image-editor",style:"wp-block-post-featured-image"},{name:oy}=ty,ny={icon:Ub,edit:function({clientId:e,attributes:t,setAttributes:o,context:{postId:n,postType:a,queryId:r}}){const i=Number.isFinite(r),{isLink:s,aspectRatio:l,height:c,width:u,scale:d,sizeSlug:p,rel:m,linkTarget:g,useFirstImageFromPost:h}=t,[x,_]=(0,st.useState)(),[b,y]=(0,ct.useEntityProp)("postType",a,"featured_media",n),[f]=(0,ct.useEntityProp)("postType",a,"content",n),v=(0,st.useMemo)((()=>{if(b)return b;if(!h)return;const e=/).)*)?}\s+)?-->/.exec(f);return e?.groups?.attrs&&JSON.parse(e.groups.attrs)?.id}),[b,h,f]),{media:k,postType:w,postPermalink:C}=(0,it.useSelect)((e=>{const{getMedia:t,getPostType:o,getEditedEntityRecord:r}=e(ct.store);return{media:v&&t(v,{context:"view"}),postType:a&&o(a),postPermalink:r("postType",a,n)?.link}}),[v,a,n]),j=k?.media_details?.sizes?.[p]?.source_url||k?.source_url,S=(0,nt.useBlockProps)({style:{width:u,height:c,aspectRatio:l},className:ft({"is-transient":x})}),B=(0,nt.__experimentalUseBorderProps)(t),T=(0,nt.__experimentalGetShadowClassesAndStyles)(t),N=(0,nt.useBlockEditingMode)(),P=e=>(0,Je.jsx)(tt.Placeholder,{className:ft("block-editor-media-placeholder",B.className),withIllustration:!0,style:{height:!!l&&"100%",width:!!l&&"100%",...B.style,...T.style},children:e}),I=e=>{e?.id&&y(e.id),e?.url&&(0,lt.isBlobURL)(e.url)&&_(e.url)};(0,st.useEffect)((()=>{j&&x&&_()}),[j,x]);const{createErrorNotice:M}=(0,it.useDispatch)(Rt.store),D=e=>{M(e,{type:"snackbar"}),_()},z=mt(),A="default"===N&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.InspectorControls,{group:"color",children:(0,Je.jsx)(Kb,{attributes:t,setAttributes:o,clientId:e})}),(0,Je.jsx)(nt.InspectorControls,{group:"dimensions",children:(0,Je.jsx)(Qb,{clientId:e,attributes:t,setAttributes:o,media:k})}),(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{o({isLink:!1,linkTarget:"_self",rel:""})},dropdownMenuProps:z,children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:w?.labels.singular_name?(0,ot.sprintf)((0,ot.__)("Link to %s"),w.labels.singular_name):(0,ot.__)("Link to post"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>o({isLink:!1}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:w?.labels.singular_name?(0,ot.sprintf)((0,ot.__)("Link to %s"),w.labels.singular_name):(0,ot.__)("Link to post"),onChange:()=>o({isLink:!s}),checked:s})}),s&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_self"!==g,onDeselect:()=>o({linkTarget:"_self"}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Open in new tab"),onChange:e=>o({linkTarget:e?"_blank":"_self"}),checked:"_blank"===g})}),s&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Link rel"),isShownByDefault:!0,hasValue:()=>!!m,onDeselect:()=>o({rel:""}),children:(0,Je.jsx)(tt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Link rel"),value:m,onChange:e=>o({rel:e})})}),(0,Je.jsx)(ey,{image:k,value:p,onChange:e=>o({sizeSlug:e})})]})})]});let R;if(!v&&(i||!n))return(0,Je.jsxs)(Je.Fragment,{children:[A,(0,Je.jsxs)("div",{...S,children:[s?(0,Je.jsx)("a",{href:C,target:g,children:P()}):P(),(0,Je.jsx)(Yb,{attributes:t,setAttributes:o,clientId:e})]})]});const H=(0,ot.__)("Add a featured image"),L={...B.style,...T.style,height:l?"100%":c,width:!!l&&"100%",objectFit:!(!c&&!l)&&d};return R=v||x?k||x?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("img",{className:B.className,src:x||j,alt:k&&k?.alt_text?(0,ot.sprintf)((0,ot.__)("Featured image: %s"),k.alt_text):(0,ot.__)("Featured image"),style:L}),x&&(0,Je.jsx)(tt.Spinner,{})]}):P():(0,Je.jsx)(nt.MediaPlaceholder,{onSelect:I,accept:"image/*",allowedTypes:Jb,onError:D,placeholder:P,mediaLibraryButton:({open:e})=>(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,icon:Jd,variant:"primary",label:H,showTooltip:!0,tooltipPosition:"top center",onClick:t=>{t.preventDefault(),e()}})}),(0,Je.jsxs)(Je.Fragment,{children:[!x&&A,!!k&&!i&&(0,Je.jsx)(nt.BlockControls,{group:"other",children:(0,Je.jsx)(nt.MediaReplaceFlow,{mediaId:v,mediaURL:j,allowedTypes:Jb,accept:"image/*",onSelect:I,onError:D,onReset:()=>y(0)})}),(0,Je.jsxs)("figure",{...S,children:[s?(0,Je.jsx)("a",{href:C,target:g,children:R}):R,(0,Je.jsx)(Yb,{attributes:t,setAttributes:o,clientId:e})]})]})}},ay=()=>et({name:oy,metadata:ty,settings:ny});const ry=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})}),iy=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})}),sy=[{isDefault:!0,name:"post-next",title:(0,ot.__)("Next Post"),description:(0,ot.__)("Displays the post link that follows the current post."),icon:ry,attributes:{type:"next"},scope:["inserter","transform"],example:{attributes:{label:(0,ot.__)("Next post"),arrow:"arrow"}}},{name:"post-previous",title:(0,ot.__)("Previous Post"),description:(0,ot.__)("Displays the post link that precedes the current post."),icon:iy,attributes:{type:"previous"},scope:["inserter","transform"],example:{attributes:{label:(0,ot.__)("Previous post"),arrow:"arrow"}}}];sy.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.type===t.type)}));const ly=sy,cy={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-navigation-link",title:"Post Navigation Link",category:"theme",description:"Displays the next or previous post link that is adjacent to the current post.",textdomain:"default",attributes:{textAlign:{type:"string"},type:{type:"string",default:"next"},label:{type:"string"},showTitle:{type:"boolean",default:!1},linkLabel:{type:"boolean",default:!1},arrow:{type:"string",default:"none"},taxonomy:{type:"string",default:""}},usesContext:["postType"],supports:{reusable:!1,html:!1,color:{link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-post-navigation-link"},{name:uy}=cy,dy={edit:function({context:{postType:e},attributes:{type:t,label:o,showTitle:n,textAlign:a,linkLabel:r,arrow:i,taxonomy:s},setAttributes:l}){const c="next"===t;let u=c?(0,ot.__)("Next"):(0,ot.__)("Previous");const d={none:"",arrow:c?"→":"←",chevron:c?"»":"«"}[i];n&&(u=c?(0,ot.__)("Next: "):(0,ot.__)("Previous: "));const p=c?(0,ot.__)("Next post"):(0,ot.__)("Previous post"),m=(0,nt.useBlockProps)({className:ft({[`has-text-align-${a}`]:a})}),g=(0,it.useSelect)((t=>{const{getTaxonomies:o}=t(ct.store);return o({type:e,per_page:-1})}),[e]);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.PanelBody,{children:[(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Display the title as a link"),help:(0,ot.__)("If you have entered a custom label, it will be prepended before the title."),checked:!!n,onChange:()=>l({showTitle:!n})}),n&&(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Include the label as part of the link"),checked:!!r,onChange:()=>l({linkLabel:!r})}),(0,Je.jsxs)(tt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Arrow"),value:i,onChange:e=>{l({arrow:e})},help:(0,ot.__)("A decorative arrow for the next and previous link."),isBlock:!0,children:[(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"none",label:(0,ot._x)("None","Arrow option for Next/Previous link")}),(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,ot._x)("Arrow","Arrow option for Next/Previous link")}),(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,ot._x)("Chevron","Arrow option for Next/Previous link")})]})]})}),(0,Je.jsx)(nt.InspectorControls,{group:"advanced",children:(0,Je.jsx)(tt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Filter by taxonomy"),value:s,options:[{label:(0,ot.__)("Unfiltered"),value:""},...(null!=g?g:[]).filter((({visibility:e})=>!!e?.publicly_queryable)).map((e=>({value:e.slug,label:e.name})))],onChange:e=>l({taxonomy:e}),help:(0,ot.__)("Only link to posts that have the same taxonomy terms as the current post. For example the same tags or categories.")})}),(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsx)(nt.AlignmentToolbar,{value:a,onChange:e=>{l({textAlign:e})}})}),(0,Je.jsxs)("div",{...m,children:[!c&&d&&(0,Je.jsx)("span",{className:`wp-block-post-navigation-link__arrow-previous is-arrow-${i}`,children:d}),(0,Je.jsx)(nt.RichText,{tagName:"a",identifier:"label","aria-label":p,placeholder:u,value:o,withoutInteractiveFormatting:!0,onChange:e=>l({label:e})}),n&&(0,Je.jsx)("a",{href:"#post-navigation-pseudo-link",onClick:e=>e.preventDefault(),children:(0,ot.__)("An example title")}),c&&d&&(0,Je.jsx)("span",{className:`wp-block-post-navigation-link__arrow-next is-arrow-${i}`,"aria-hidden":!0,children:d})]})]})},variations:ly,example:{attributes:{label:(0,ot.__)("Next post"),arrow:"arrow"}}},py=()=>et({name:uy,metadata:cy,settings:dy}),my=[["core/post-title"],["core/post-date"],["core/post-excerpt"]];function gy({classList:e}){const t=(0,nt.useInnerBlocksProps)({className:ft("wp-block-post",e)},{template:my,__unstableDisableLayoutClassNames:!0});return(0,Je.jsx)("li",{...t})}const hy=(0,st.memo)((function({blocks:e,blockContextId:t,classList:o,isHidden:n,setActiveBlockContextId:a}){const r=(0,nt.__experimentalUseBlockPreview)({blocks:e,props:{className:ft("wp-block-post",o)}}),i=()=>{a(t)},s={display:n?"none":void 0};return(0,Je.jsx)("li",{...r,tabIndex:0,role:"button",onClick:i,onKeyPress:i,style:s})}));const xy={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-template",title:"Post Template",category:"theme",ancestor:["core/query"],description:"Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.",textdomain:"default",usesContext:["queryId","query","displayLayout","templateSlug","previewPostType","enhancedPagination","postType"],supports:{reusable:!1,html:!1,align:["wide","full"],layout:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{margin:!0,padding:!0,blockGap:{__experimentalDefault:"1.25em"},__experimentalDefaultControls:{blockGap:!0,padding:!1,margin:!1}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0}},style:"wp-block-post-template",editorStyle:"wp-block-post-template-editor"},{name:_y}=xy,by={icon:Xa,edit:function({setAttributes:e,clientId:t,context:{query:{perPage:o,offset:n=0,postType:a,order:r,orderBy:i,author:s,search:l,exclude:c,sticky:u,inherit:d,taxQuery:p,parents:m,pages:g,format:h,...x}={},templateSlug:_,previewPostType:b},attributes:{layout:y},__unstableLayoutClassNames:f}){const{type:v,columnCount:k=3}=y||{},[w,C]=(0,st.useState)(),{posts:j,blocks:S}=(0,it.useSelect)((e=>{const{getEntityRecords:g,getTaxonomies:y}=e(ct.store),{getBlocks:f}=e(nt.store),v=d&&_?.startsWith("category-")&&g("taxonomy","category",{context:"view",per_page:1,_fields:["id"],slug:_.replace("category-","")}),k=d&&_?.startsWith("tag-")&&g("taxonomy","post_tag",{context:"view",per_page:1,_fields:["id"],slug:_.replace("tag-","")}),w={offset:n||0,order:r,orderby:i};if(p&&!d){const e=y({type:a,per_page:-1,context:"view"}),t=Object.entries(p).reduce(((t,[o,n])=>{const a=e?.find((({slug:e})=>e===o));return a?.rest_base&&(t[a?.rest_base]=n),t}),{});Object.keys(t).length&&Object.assign(w,t)}o&&(w.per_page=o),s&&(w.author=s),l&&(w.search=l),c?.length&&(w.exclude=c),m?.length&&(w.parent=m),h?.length&&(w.format=h),u&&"ignore"!==u&&(w.sticky="only"===u),"ignore"===u&&(delete w.sticky,w.ignore_sticky=!0);let C=a;d&&(_?.startsWith("archive-")?(w.postType=_.replace("archive-",""),C=w.postType):v?w.categories=v[0]?.id:k?w.tags=k[0]?.id:_?.startsWith("taxonomy-post_format")&&(w.format=_.replace("taxonomy-post_format-post-format-","")));return{posts:g("postType",b||C,{...w,...x}),blocks:f(t)}}),[o,n,r,i,t,s,l,a,c,u,d,_,p,m,h,x,b]),B=(0,st.useMemo)((()=>j?.map((e=>{var t;return{postType:e.type,postId:e.id,classList:null!==(t=e.class_list)&&void 0!==t?t:""}}))),[j]),T=(0,nt.useBlockProps)({className:ft(f,{[`columns-${k}`]:"grid"===v&&k})});if(!j)return(0,Je.jsx)("p",{...T,children:(0,Je.jsx)(tt.Spinner,{})});if(!j.length)return(0,Je.jsxs)("p",{...T,children:[" ",(0,ot.__)("No results found.")]});const N=t=>e({layout:{...y,...t}}),P=[{icon:Np,title:(0,ot._x)("List view","Post template block display setting"),onClick:()=>N({type:"default"}),isActive:"default"===v||"constrained"===v},{icon:Zu,title:(0,ot._x)("Grid view","Post template block display setting"),onClick:()=>N({type:"grid",columnCount:k}),isActive:"grid"===v}];return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsx)(tt.ToolbarGroup,{controls:P})}),(0,Je.jsx)("ul",{...T,children:B&&B.map((e=>(0,Je.jsxs)(nt.BlockContextProvider,{value:e,children:[e.postId===(w||B[0]?.postId)?(0,Je.jsx)(gy,{classList:e.classList}):null,(0,Je.jsx)(hy,{blocks:S,blockContextId:e.postId,classList:e.classList,setActiveBlockContextId:C,isHidden:e.postId===(w||B[0]?.postId)})]},e.postId)))})]})},save:function(){return(0,Je.jsx)(nt.InnerBlocks.Content,{})}},yy=()=>et({name:_y,metadata:xy,settings:by}),fy=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M20 4H4v1.5h16V4zm-2 9h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM4 9.5h9V8H4v1.5zM9 13H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3z",fillRule:"evenodd",clipRule:"evenodd"})}),vy=[];const ky=["core/bold","core/image","core/italic","core/link","core/strikethrough","core/text-color"];const wy=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M8.1 12.3c.1.1.3.3.5.3.2.1.4.1.6.1.2 0 .4 0 .6-.1.2-.1.4-.2.5-.3l3-3c.3-.3.5-.7.5-1.1 0-.4-.2-.8-.5-1.1L9.7 3.5c-.1-.2-.3-.3-.5-.3H5c-.4 0-.8.4-.8.8v4.2c0 .2.1.4.2.5l3.7 3.6zM5.8 4.8h3.1l3.4 3.4v.1l-3 3 .5.5-.7-.5-3.3-3.4V4.8zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})}),Cy={category:fy,post_tag:wy};function jy(e,t){if("core/post-terms"!==t)return e;const o=e.variations.map((e=>{var t;return{...e,icon:null!==(t=Cy[e.name])&&void 0!==t?t:fy}}));return{...e,variations:o}}const Sy={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-terms",title:"Post Terms",category:"theme",description:"Post terms.",textdomain:"default",attributes:{term:{type:"string"},textAlign:{type:"string"},separator:{type:"string",default:", "},prefix:{type:"string",default:""},suffix:{type:"string",default:""}},usesContext:["postId","postType"],example:{viewportWidth:350},supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-post-terms"},{name:By}=Sy,Ty={icon:fy,edit:function({attributes:e,clientId:t,context:o,isSelected:n,setAttributes:a,insertBlocksAfter:r}){const{term:i,textAlign:s,separator:l,prefix:c,suffix:u}=e,{postId:d,postType:p}=o,m=(0,it.useSelect)((e=>{if(!i)return{};const{getTaxonomy:t}=e(ct.store),o=t(i);return o?.visibility?.publicly_queryable?o:{}}),[i]),{postTerms:g,hasPostTerms:h,isLoading:x}=function({postId:e,term:t}){const{slug:o}=t;return(0,it.useSelect)((n=>{const a=t?.visibility?.publicly_queryable;if(!a)return{postTerms:vy,isLoading:!1,hasPostTerms:!1};const{getEntityRecords:r,isResolving:i}=n(ct.store),s=["taxonomy",o,{post:e,per_page:-1,context:"view"}],l=r(...s);return{postTerms:l,isLoading:i("getEntityRecords",s),hasPostTerms:!!l?.length}}),[e,t?.visibility?.publicly_queryable,o])}({postId:d,term:m}),_=d&&p,b=(0,nt.useBlockDisplayInformation)(t),y=(0,nt.useBlockProps)({className:ft({[`has-text-align-${s}`]:s,[`taxonomy-${i}`]:i})});return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsx)(nt.AlignmentToolbar,{value:s,onChange:e=>{a({textAlign:e})}})}),(0,Je.jsx)(nt.InspectorControls,{group:"advanced",children:(0,Je.jsx)(tt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,ot.__)("Separator"),value:l||"",onChange:e=>{a({separator:e})},help:(0,ot.__)("Enter character(s) used to separate terms.")})}),(0,Je.jsxs)("div",{...y,children:[x&&_&&(0,Je.jsx)(tt.Spinner,{}),!x&&(n||c)&&(0,Je.jsx)(nt.RichText,{identifier:"prefix",allowedFormats:ky,className:"wp-block-post-terms__prefix","aria-label":(0,ot.__)("Prefix"),placeholder:(0,ot.__)("Prefix")+" ",value:c,onChange:e=>a({prefix:e}),tagName:"span"}),(!_||!i)&&(0,Je.jsx)("span",{children:b.title}),_&&!x&&h&&g.map((e=>(0,Je.jsx)("a",{href:e.link,onClick:e=>e.preventDefault(),rel:"tag",children:(0,tn.decodeEntities)(e.name)},e.id))).reduce(((e,t)=>(0,Je.jsxs)(Je.Fragment,{children:[e,(0,Je.jsx)("span",{className:"wp-block-post-terms__separator",children:l||" "}),t]}))),_&&!x&&!h&&(m?.labels?.no_terms||(0,ot.__)("Term items not found.")),!x&&(n||u)&&(0,Je.jsx)(nt.RichText,{identifier:"suffix",allowedFormats:ky,className:"wp-block-post-terms__suffix","aria-label":(0,ot.__)("Suffix"),placeholder:" "+(0,ot.__)("Suffix"),value:u,onChange:e=>a({suffix:e}),tagName:"span",__unstableOnSplitAtEnd:()=>r((0,Ke.createBlock)((0,Ke.getDefaultBlockName)()))})]})]})}},Ny=()=>((0,Ns.addFilter)("blocks.registerBlockType","core/template-part",jy),et({name:By,metadata:Sy,settings:Ty})),Py=window.wp.wordcount;const Iy=function({attributes:e,setAttributes:t,context:o}){const{textAlign:n}=e,{postId:a,postType:r}=o,[i]=(0,ct.useEntityProp)("postType",r,"content",a),[s]=(0,ct.useEntityBlockEditor)("postType",r,{id:a}),l=(0,st.useMemo)((()=>{let e;e=i instanceof Function?i({blocks:s}):s?(0,Ke.__unstableSerializeAndClean)(s):i;const t=(0,ot._x)("words","Word count type. Do not translate!"),o=Math.max(1,Math.round((0,Py.count)(e||"",t)/189));return(0,ot.sprintf)((0,ot._n)("%s minute","%s minutes",o),o)}),[i,s]),c=(0,nt.useBlockProps)({className:ft({[`has-text-align-${n}`]:n})});return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(nt.AlignmentControl,{value:n,onChange:e=>{t({textAlign:e})}})}),(0,Je.jsx)("div",{...c,children:l})]})},My=(0,Je.jsx)(tt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,Je.jsx)(tt.Path,{d:"M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16.5c-4.1 0-7.5-3.4-7.5-7.5S7.9 4.5 12 4.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5zM12 7l-1 5c0 .3.2.6.4.8l4.2 2.8-2.7-4.1L12 7z"})}),Dy={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/post-time-to-read",title:"Time to Read",category:"theme",description:"Show minutes required to finish reading the post.",textdomain:"default",usesContext:["postId","postType"],attributes:{textAlign:{type:"string"}},supports:{color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},html:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0}}},{name:zy}=Dy,Ay={icon:My,edit:Iy,example:{}},Ry=()=>et({name:zy,metadata:Dy,settings:Ay});const Hy={attributes:{textAlign:{type:"string"},level:{type:"number",default:2},isLink:{type:"boolean",default:!1},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},spacing:{margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0}},save:()=>null,migrate:lo,isEligible:({style:e})=>e?.typography?.fontFamily},Ly=[Hy],Vy={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-title",title:"Title",category:"theme",description:"Displays the title of a post, page, or any other content-type.",textdomain:"default",usesContext:["postId","postType","queryId"],attributes:{textAlign:{type:"string"},level:{type:"number",default:2},levelOptions:{type:"array"},isLink:{type:"boolean",default:!1,role:"content"},rel:{type:"string",attribute:"rel",default:"",role:"content"},linkTarget:{type:"string",default:"_self",role:"content"}},example:{viewportWidth:350},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-post-title"},{name:Fy}=Vy,Ey={icon:Rr,edit:function({attributes:{level:e,levelOptions:t,textAlign:o,isLink:n,rel:a,linkTarget:r},setAttributes:i,context:{postType:s,postId:l,queryId:c},insertBlocksAfter:u}){const d=0===e?"p":`h${e}`,p=Number.isFinite(c),m=(0,it.useSelect)((e=>!p&&e(ct.store).canUser("update",{kind:"postType",name:s,id:l})),[p,s,l]),[g="",h,x]=(0,ct.useEntityProp)("postType",s,"title",l),[_]=(0,ct.useEntityProp)("postType",s,"link",l),b=()=>{u((0,Ke.createBlock)((0,Ke.getDefaultBlockName)()))},y=(0,nt.useBlockProps)({className:ft({[`has-text-align-${o}`]:o})}),f=(0,nt.useBlockEditingMode)();let v=(0,Je.jsx)(d,{...y,children:(0,ot.__)("Title")});return s&&l&&(v=m?(0,Je.jsx)(nt.PlainText,{tagName:d,placeholder:(0,ot.__)("No title"),value:g,onChange:h,__experimentalVersion:2,__unstableOnSplitAtEnd:b,...y}):(0,Je.jsx)(d,{...y,dangerouslySetInnerHTML:{__html:x?.rendered}})),n&&s&&l&&(v=m?(0,Je.jsx)(d,{...y,children:(0,Je.jsx)(nt.PlainText,{tagName:"a",href:_,target:r,rel:a,placeholder:g.length?null:(0,ot.__)("No title"),value:g,onChange:h,__experimentalVersion:2,__unstableOnSplitAtEnd:b})}):(0,Je.jsx)(d,{...y,children:(0,Je.jsx)("a",{href:_,target:r,rel:a,onClick:e=>e.preventDefault(),dangerouslySetInnerHTML:{__html:x?.rendered}})})),(0,Je.jsxs)(Je.Fragment,{children:["default"===f&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)(nt.BlockControls,{group:"block",children:[(0,Je.jsx)(nt.HeadingLevelDropdown,{value:e,options:t,onChange:e=>i({level:e})}),(0,Je.jsx)(nt.AlignmentControl,{value:o,onChange:e=>{i({textAlign:e})}})]}),(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.PanelBody,{title:(0,ot.__)("Settings"),children:[(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Make title a link"),onChange:()=>i({isLink:!n}),checked:n}),n&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Open in new tab"),onChange:e=>i({linkTarget:e?"_blank":"_self"}),checked:"_blank"===r}),(0,Je.jsx)(tt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Link rel"),value:a,onChange:e=>i({rel:e})})]})]})})]}),v]})},deprecated:Ly},Oy=()=>et({name:Fy,metadata:Vy,settings:Ey}),$y=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z"})});const Gy={from:[{type:"block",blocks:["core/code","core/paragraph"],transform:({content:e,anchor:t})=>(0,Ke.createBlock)("core/preformatted",{content:e,anchor:t})},{type:"raw",isMatch:e=>"PRE"===e.nodeName&&!(1===e.children.length&&"CODE"===e.firstChild.nodeName),schema:({phrasingContentSchema:e})=>({pre:{children:e}})}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,Ke.createBlock)("core/paragraph",e)},{type:"block",blocks:["core/code"],transform:e=>(0,Ke.createBlock)("core/code",e)}]},Uy=Gy,qy={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/preformatted",title:"Preformatted",category:"text",description:"Add text that respects your spacing and tabs, and also allows styling.",textdomain:"default",attributes:{content:{type:"rich-text",source:"rich-text",selector:"pre",__unstablePreserveWhiteSpace:!0,role:"content"}},supports:{anchor:!0,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-preformatted"},{name:Wy}=qy,Zy={icon:$y,example:{attributes:{content:(0,ot.__)("EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\nWindow, very small in the distance, illuminated.\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;")}},transforms:Uy,edit:function({attributes:e,mergeBlocks:t,setAttributes:o,onRemove:n,insertBlocksAfter:a,style:r}){const{content:i}=e,s=(0,nt.useBlockProps)({style:r});return(0,Je.jsx)(nt.RichText,{tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:i,onChange:e=>{o({content:e})},onRemove:n,"aria-label":(0,ot.__)("Preformatted text"),placeholder:(0,ot.__)("Write preformatted text…"),onMerge:t,...s,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>a((0,Ke.createBlock)((0,Ke.getDefaultBlockName)()))})},save:function({attributes:e}){const{content:t}=e;return(0,Je.jsx)("pre",{...nt.useBlockProps.save(),children:(0,Je.jsx)(nt.RichText.Content,{value:t})})},merge:(e,t)=>({content:e.content+"\n\n"+t.content})},Qy=()=>et({name:Wy,metadata:qy,settings:Zy}),Ky=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z"})}),Yy="is-style-solid-color",Jy={value:{type:"string",source:"html",selector:"blockquote",multiline:"p"},citation:{type:"string",source:"html",selector:"cite",default:""},mainColor:{type:"string"},customMainColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}};function Xy(e){if(!e)return;const t=e.match(/border-color:([^;]+)[;]?/);return t&&t[1]?t[1]:void 0}function ef(e){const t=`${e=e||""}`.split("
");return t.shift(),t.pop(),t.join("
")}const tf={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",role:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",role:"content"},textAlign:{type:"string"}},save({attributes:e}){const{textAlign:t,citation:o,value:n}=e,a=!nt.RichText.isEmpty(o);return(0,Je.jsx)("figure",{...nt.useBlockProps.save({className:ft({[`has-text-align-${t}`]:t})}),children:(0,Je.jsxs)("blockquote",{children:[(0,Je.jsx)(nt.RichText.Content,{value:n,multiline:!0}),a&&(0,Je.jsx)(nt.RichText.Content,{tagName:"cite",value:o})]})})},migrate:({value:e,...t})=>({value:ef(e),...t})},of={attributes:{...Jy},save({attributes:e}){const{mainColor:t,customMainColor:o,customTextColor:n,textColor:a,value:r,citation:i,className:s}=e,l=s?.includes(Yy);let c,u;if(l){const e=(0,nt.getColorClassName)("background-color",t);c=ft({"has-background":e||o,[e]:e}),u={backgroundColor:e?void 0:o}}else o&&(u={borderColor:o});const d=(0,nt.getColorClassName)("color",a),p=ft({"has-text-color":a||n,[d]:d}),m=d?void 0:{color:n};return(0,Je.jsx)("figure",{...nt.useBlockProps.save({className:c,style:u}),children:(0,Je.jsxs)("blockquote",{className:p,style:m,children:[(0,Je.jsx)(nt.RichText.Content,{value:r,multiline:!0}),!nt.RichText.isEmpty(i)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,mainColor:o,customMainColor:n,customTextColor:a,...r}){const i=t?.includes(Yy);let s;return n&&(s=i?{color:{background:n}}:{border:{color:n}}),a&&s&&(s.color={...s.color,text:a}),{value:ef(e),className:t,backgroundColor:i?o:void 0,borderColor:i?void 0:o,textAlign:i?"left":void 0,style:s,...r}}},nf={attributes:{...Jy,figureStyle:{source:"attribute",selector:"figure",attribute:"style"}},save({attributes:e}){const{mainColor:t,customMainColor:o,textColor:n,customTextColor:a,value:r,citation:i,className:s,figureStyle:l}=e,c=s?.includes(Yy);let u,d;if(c){const e=(0,nt.getColorClassName)("background-color",t);u=ft({"has-background":e||o,[e]:e}),d={backgroundColor:e?void 0:o}}else if(o)d={borderColor:o};else if(t){d={borderColor:Xy(l)}}const p=(0,nt.getColorClassName)("color",n),m=(n||a)&&ft("has-text-color",{[p]:p}),g=p?void 0:{color:a};return(0,Je.jsx)("figure",{className:u,style:d,children:(0,Je.jsxs)("blockquote",{className:m,style:g,children:[(0,Je.jsx)(nt.RichText.Content,{value:r,multiline:!0}),!nt.RichText.isEmpty(i)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,figureStyle:o,mainColor:n,customMainColor:a,customTextColor:r,...i}){const s=t?.includes(Yy);let l;if(a&&(l=s?{color:{background:a}}:{border:{color:a}}),r&&l&&(l.color={...l.color,text:r}),!s&&n&&o){const n=Xy(o);if(n)return{value:ef(e),...i,className:t,style:{border:{color:n}}}}return{value:ef(e),className:t,backgroundColor:s?n:void 0,borderColor:s?void 0:n,textAlign:s?"left":void 0,style:l,...i}}},af={attributes:Jy,save({attributes:e}){const{mainColor:t,customMainColor:o,textColor:n,customTextColor:a,value:r,citation:i,className:s}=e,l=s?.includes(Yy);let c,u;if(l)c=(0,nt.getColorClassName)("background-color",t),c||(u={backgroundColor:o});else if(o)u={borderColor:o};else if(t){var d;const e=null!==(d=(0,it.select)(nt.store).getSettings().colors)&&void 0!==d?d:[];u={borderColor:(0,nt.getColorObjectByAttributeValues)(e,t).color}}const p=(0,nt.getColorClassName)("color",n),m=n||a?ft("has-text-color",{[p]:p}):void 0,g=p?void 0:{color:a};return(0,Je.jsx)("figure",{className:c,style:u,children:(0,Je.jsxs)("blockquote",{className:m,style:g,children:[(0,Je.jsx)(nt.RichText.Content,{value:r,multiline:!0}),!nt.RichText.isEmpty(i)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,mainColor:o,customMainColor:n,customTextColor:a,...r}){const i=t?.includes(Yy);let s={};return n&&(s=i?{color:{background:n}}:{border:{color:n}}),a&&s&&(s.color={...s.color,text:a}),{value:ef(e),className:t,backgroundColor:i?o:void 0,borderColor:i?void 0:o,textAlign:i?"left":void 0,style:s,...r}}},rf={attributes:{...Jy},save({attributes:e}){const{value:t,citation:o}=e;return(0,Je.jsxs)("blockquote",{children:[(0,Je.jsx)(nt.RichText.Content,{value:t,multiline:!0}),!nt.RichText.isEmpty(o)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"cite",value:o})]})},migrate:({value:e,...t})=>({value:ef(e),...t})},sf={attributes:{...Jy,citation:{type:"string",source:"html",selector:"footer"},align:{type:"string",default:"none"}},save({attributes:e}){const{value:t,citation:o,align:n}=e;return(0,Je.jsxs)("blockquote",{className:`align${n}`,children:[(0,Je.jsx)(nt.RichText.Content,{value:t,multiline:!0}),!nt.RichText.isEmpty(o)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"footer",value:o})]})},migrate:({value:e,...t})=>({value:ef(e),...t})},lf=[tf,of,nf,af,rf,sf],cf="web"===st.Platform.OS;const uf=function({attributes:e,setAttributes:t,isSelected:o,insertBlocksAfter:n}){const{textAlign:a,citation:r,value:i}=e,s=(0,nt.useBlockProps)({className:ft({[`has-text-align-${a}`]:a})}),l=!nt.RichText.isEmpty(r)||o;return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(nt.AlignmentControl,{value:a,onChange:e=>{t({textAlign:e})}})}),(0,Je.jsx)("figure",{...s,children:(0,Je.jsxs)("blockquote",{children:[(0,Je.jsx)(nt.RichText,{identifier:"value",tagName:"p",value:i,onChange:e=>t({value:e}),"aria-label":(0,ot.__)("Pullquote text"),placeholder:(0,ot.__)("Add quote"),textAlign:"center"}),l&&(0,Je.jsx)(nt.RichText,{identifier:"citation",tagName:cf?"cite":void 0,style:{display:"block"},value:r,"aria-label":(0,ot.__)("Pullquote citation text"),placeholder:(0,ot.__)("Add citation"),onChange:e=>t({citation:e}),className:"wp-block-pullquote__citation",__unstableMobileNoFocusOnMount:!0,textAlign:"center",__unstableOnSplitAtEnd:()=>n((0,Ke.createBlock)((0,Ke.getDefaultBlockName)()))})]})})]})};const df={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,Ke.createBlock)("core/pullquote",{value:(0,Ho.toHTMLString)({value:(0,Ho.join)(e.map((({content:e})=>(0,Ho.create)({html:e}))),"\n")}),anchor:e.anchor})},{type:"block",blocks:["core/heading"],transform:({content:e,anchor:t})=>(0,Ke.createBlock)("core/pullquote",{value:e,anchor:t})}],to:[{type:"block",blocks:["core/paragraph"],transform:({value:e,citation:t})=>{const o=[];return e&&o.push((0,Ke.createBlock)("core/paragraph",{content:e})),t&&o.push((0,Ke.createBlock)("core/paragraph",{content:t})),0===o.length?(0,Ke.createBlock)("core/paragraph",{content:""}):o}},{type:"block",blocks:["core/heading"],transform:({value:e,citation:t})=>{if(!e)return(0,Ke.createBlock)("core/heading",{content:t});const o=(0,Ke.createBlock)("core/heading",{content:e});return t?[o,(0,Ke.createBlock)("core/heading",{content:t})]:o}}]},pf=df,mf={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/pullquote",title:"Pullquote",category:"text",description:"Give special visual emphasis to a quote from your text.",textdomain:"default",attributes:{value:{type:"rich-text",source:"rich-text",selector:"p",role:"content"},citation:{type:"rich-text",source:"rich-text",selector:"cite",role:"content"},textAlign:{type:"string"}},supports:{anchor:!0,align:["left","right","wide","full"],background:{backgroundImage:!0,backgroundSize:!0,__experimentalDefaultControls:{backgroundImage:!0}},color:{gradients:!0,background:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},dimensions:{minHeight:!0,__experimentalDefaultControls:{minHeight:!1}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},__experimentalStyle:{typography:{fontSize:"1.5em",lineHeight:"1.6"}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-pullquote-editor",style:"wp-block-pullquote"},{name:gf}=mf,hf={icon:Ky,example:{attributes:{value:(0,ot.__)("One of the hardest things to do in technology is disrupt yourself."),citation:(0,ot.__)("Matt Mullenweg")}},transforms:pf,edit:uf,save:function({attributes:e}){const{textAlign:t,citation:o,value:n}=e,a=!nt.RichText.isEmpty(o);return(0,Je.jsx)("figure",{...nt.useBlockProps.save({className:ft({[`has-text-align-${t}`]:t})}),children:(0,Je.jsxs)("blockquote",{children:[(0,Je.jsx)(nt.RichText.Content,{tagName:"p",value:n}),a&&(0,Je.jsx)(nt.RichText.Content,{tagName:"cite",value:o})]})})},deprecated:lf},xf=()=>et({name:gf,metadata:mf,settings:hf}),_f=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z"})}),bf=e=>{const t=e?.reduce(((e,t)=>{const{mapById:o,mapByName:n,names:a}=e;return o[t.id]=t,n[t.name]=t,a.push(t.name),e}),{mapById:{},mapByName:{},names:[]});return{entities:e,...t}},yf=(e,t)=>{const o=t.split(".");let n=e;return o.forEach((e=>{n=n?.[e]})),n},ff=(e,t)=>(e||[]).map((e=>({...e,name:(0,tn.decodeEntities)(yf(e,t))}))),vf=e=>{const t=(0,it.useSelect)((t=>{const{getTaxonomies:o,getPostType:n}=t(ct.store);return n(e)?.taxonomies?.length>0?o({type:e,per_page:-1}):[]}),[e]);return(0,st.useMemo)((()=>t?.filter((({visibility:e})=>!!e?.publicly_queryable))),[t])};function kf(e,t){return!e||e.includes(t)}const wf=e=>(0,it.useSelect)((t=>{const{getClientIdsOfDescendants:o,getBlockName:n}=t(nt.store),a={};return o(e).forEach((e=>{const t=n(e),o=Object.is((0,Ke.getBlockSupport)(t,"interactivity"),!0),r=(0,Ke.getBlockSupport)(t,"interactivity.clientNavigation");o||r?"core/post-content"===t&&(a.hasPostContentBlock=!0):a.hasBlocksFromPlugins=!0})),a.hasUnsupportedBlocks=a.hasBlocksFromPlugins||a.hasPostContentBlock,a}),[e]);function Cf({enhancedPagination:e,setAttributes:t,clientId:o}){const{hasUnsupportedBlocks:n}=wf(o),a=window.__experimentalFullPageClientSideNavigation;let r=(0,ot.__)("Reload the full page—instead of just the posts list—when visitors navigate between pages.");return a?r=(0,ot.__)("Experimental full-page client-side navigation setting enabled."):n&&(r=(0,ot.__)("Enhancement disabled because there are non-compatible blocks inside the Query block.")),(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Reload full page"),help:r,checked:!e&&!a,disabled:n||a,onChange:e=>{t({enhancedPagination:!e})}})})}const jf=[{label:(0,ot.__)("Newest to oldest"),value:"date/desc"},{label:(0,ot.__)("Oldest to newest"),value:"date/asc"},{label:(0,ot.__)("A → Z"),value:"title/asc"},{label:(0,ot.__)("Z → A"),value:"title/desc"}];const Sf=function({order:e,orderBy:t,orderByOptions:o=jf,onChange:n}){return(0,Je.jsx)(tt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Order by"),value:`${t}/${e}`,options:o,onChange:e=>{const[t,o]=e.split("/");n({order:o,orderBy:t})}})},Bf={who:"authors",per_page:-1,_fields:"id,name",context:"view"};const Tf=function({value:e,onChange:t}){const o=(0,it.useSelect)((e=>{const{getUsers:t}=e(ct.store);return t(Bf)}),[]);if(!o)return null;const n=bf(o),a=(e?e.toString().split(","):[]).reduce(((e,t)=>{const o=n.mapById[t];return o&&e.push({id:t,value:o.name}),e}),[]);return(0,Je.jsx)(tt.FormTokenField,{label:(0,ot.__)("Authors"),value:a,suggestions:n.names,onChange:e=>{const o=Array.from(e.reduce(((e,t)=>{const o=((e,t)=>{const o=t?.id||e[t]?.id;if(o)return o})(n.mapByName,t);return o&&e.add(o),e}),new Set));t({author:o.join(",")})},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})},Nf=[],Pf={order:"asc",_fields:"id,title",context:"view"};const If=function({parents:e,postType:t,onChange:o}){const[n,a]=(0,st.useState)(""),[r,i]=(0,st.useState)(Nf),[s,l]=(0,st.useState)(Nf),c=(0,ut.useDebounce)(a,250),{searchResults:u,searchHasResolved:d}=(0,it.useSelect)((o=>{if(!n)return{searchResults:Nf,searchHasResolved:!0};const{getEntityRecords:a,hasFinishedResolution:r}=o(ct.store),i=["postType",t,{...Pf,search:n,orderby:"relevance",exclude:e,per_page:20}];return{searchResults:a(...i),searchHasResolved:r("getEntityRecords",i)}}),[n,e]),p=(0,it.useSelect)((o=>{if(!e?.length)return Nf;const{getEntityRecords:n}=o(ct.store);return n("postType",t,{...Pf,include:e,per_page:e.length})}),[e]);(0,st.useEffect)((()=>{if(e?.length||i(Nf),!p?.length)return;const t=bf(ff(p,"title.rendered")),o=e.reduce(((e,o)=>{const n=t.mapById[o];return n&&e.push({id:o,value:n.name}),e}),[]);i(o)}),[e,p]);const m=(0,st.useMemo)((()=>u?.length?bf(ff(u,"title.rendered")):Nf),[u]);return(0,st.useEffect)((()=>{d&&l(m.names)}),[m.names,d]),(0,Je.jsx)(tt.FormTokenField,{__next40pxDefaultSize:!0,label:(0,ot.__)("Parents"),value:r,onInputChange:c,suggestions:s,onChange:e=>{const t=Array.from(e.reduce(((e,t)=>{const o=((e,t)=>{const o=t?.id||e?.[t]?.id;if(o)return o})(m.mapByName,t);return o&&e.add(o),e}),new Set));l(Nf),o({parents:t})},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0})},Mf=[],Df={order:"asc",_fields:"id,name",context:"view"},zf=(e,t)=>{const o=t?.id||e?.find((e=>e.name===t))?.id;if(o)return o;const n=t.toLocaleLowerCase();return e?.find((e=>e.name.toLocaleLowerCase()===n))?.id};function Af({onChange:e,query:t}){const{postType:o,taxQuery:n}=t,a=vf(o);return a&&0!==a.length?(0,Je.jsx)(tt.__experimentalVStack,{spacing:4,children:a.map((t=>{const o=n?.[t.slug]||[];return(0,Je.jsx)(Rf,{taxonomy:t,termIds:o,onChange:o=>e({taxQuery:{...n,[t.slug]:o}})},t.slug)}))}):null}function Rf({taxonomy:e,termIds:t,onChange:o}){const[n,a]=(0,st.useState)(""),[r,i]=(0,st.useState)(Mf),[s,l]=(0,st.useState)(Mf),c=(0,ut.useDebounce)(a,250),{searchResults:u,searchHasResolved:d}=(0,it.useSelect)((o=>{if(!n)return{searchResults:Mf,searchHasResolved:!0};const{getEntityRecords:a,hasFinishedResolution:r}=o(ct.store),i=["taxonomy",e.slug,{...Df,search:n,orderby:"name",exclude:t,per_page:20}];return{searchResults:a(...i),searchHasResolved:r("getEntityRecords",i)}}),[n,t]),p=(0,it.useSelect)((o=>{if(!t?.length)return Mf;const{getEntityRecords:n}=o(ct.store);return n("taxonomy",e.slug,{...Df,include:t,per_page:t.length})}),[t]);(0,st.useEffect)((()=>{if(t?.length||i(Mf),!p?.length)return;const e=t.reduce(((e,t)=>{const o=p.find((e=>e.id===t));return o&&e.push({id:t,value:o.name}),e}),[]);i(e)}),[t,p]),(0,st.useEffect)((()=>{d&&l(u.map((e=>e.name)))}),[u,d]);return(0,Je.jsx)("div",{className:"block-library-query-inspector__taxonomy-control",children:(0,Je.jsx)(tt.FormTokenField,{label:e.name,value:r,onInputChange:c,suggestions:s,displayTransform:tn.decodeEntities,onChange:e=>{const t=new Set;for(const o of e){const e=zf(u,o);e&&t.add(e)}l(Mf),o(Array.from(t))},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})})}const Hf=[{value:"aside",label:(0,ot.__)("Aside")},{value:"audio",label:(0,ot.__)("Audio")},{value:"chat",label:(0,ot.__)("Chat")},{value:"gallery",label:(0,ot.__)("Gallery")},{value:"image",label:(0,ot.__)("Image")},{value:"link",label:(0,ot.__)("Link")},{value:"quote",label:(0,ot.__)("Quote")},{value:"standard",label:(0,ot.__)("Standard")},{value:"status",label:(0,ot.__)("Status")},{value:"video",label:(0,ot.__)("Video")}].sort(((e,t)=>{const o=e.label.toUpperCase(),n=t.label.toUpperCase();return on?1:0}));function Lf(e,t){return e.map((e=>t.find((t=>t.label.toLocaleLowerCase()===e.toLocaleLowerCase()))?.value)).filter(Boolean)}function Vf({onChange:e,query:{format:t}}){const o=Array.isArray(t)?t:[t],{supportedFormats:n}=(0,it.useSelect)((e=>({supportedFormats:e(ct.store).getThemeSupports().formats})),[]),a=Hf.filter((e=>n.includes(e.value))),r=o.map((e=>a.find((t=>t.value===e))?.label)).filter(Boolean),i=a.filter((e=>!o.includes(e.value))).map((e=>e.label));return(0,Je.jsx)(tt.FormTokenField,{label:(0,ot.__)("Formats"),value:r,suggestions:i,onChange:t=>{e({format:Lf(t,a)})},__experimentalShowHowTo:!1,__experimentalExpandOnFocus:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}const Ff=[{label:(0,ot.__)("Include"),value:""},{label:(0,ot.__)("Ignore"),value:"ignore"},{label:(0,ot.__)("Exclude"),value:"exclude"},{label:(0,ot.__)("Only"),value:"only"}];function Ef({value:e,onChange:t}){return(0,Je.jsx)(tt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Sticky posts"),options:Ff,value:e,onChange:t,help:(0,ot.__)("Sticky posts always appear first, regardless of their publish date.")})}const Of=({perPage:e,offset:t=0,onChange:o})=>(0,Je.jsx)(tt.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Items per page"),min:1,max:100,onChange:e=>{isNaN(e)||e<1||e>100||o({perPage:e,offset:t})},value:parseInt(e,10)}),$f=({offset:e=0,onChange:t})=>(0,Je.jsx)(tt.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,ot.__)("Offset"),value:e,min:0,onChange:e=>{isNaN(e)||e<0||e>100||t({offset:e})}}),Gf=({pages:e,onChange:t})=>(0,Je.jsx)(tt.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,ot.__)("Max pages to show"),value:e,min:0,onChange:e=>{isNaN(e)||e<0||t({pages:e})},help:(0,ot.__)("Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero).")});function Uf(e){const{attributes:t,setQuery:o,setDisplayLayout:n,isSingular:a}=e,{query:r,displayLayout:i}=t,{order:s,orderBy:l,author:c,pages:u,postType:d,perPage:p,offset:m,sticky:g,inherit:h,taxQuery:x,parents:_,format:b}=r,y=function(e){return(0,it.useSelect)((t=>t(Ke.store).getActiveBlockVariation("core/query",e)?.allowedControls),[e])}(t),f="post"===d,{postTypesTaxonomiesMap:v,postTypesSelectOptions:k,postTypeFormatSupportMap:w}=(()=>{const e=(0,it.useSelect)((e=>{const{getPostTypes:t}=e(ct.store),o=["attachment"],n=t({per_page:-1})?.filter((({viewable:e,slug:t})=>e&&!o.includes(t)));return n}),[]);return{postTypesTaxonomiesMap:(0,st.useMemo)((()=>{if(e?.length)return e.reduce(((e,t)=>(e[t.slug]=t.taxonomies,e)),{})}),[e]),postTypesSelectOptions:(0,st.useMemo)((()=>(e||[]).map((({labels:e,slug:t})=>({label:e.singular_name,value:t})))),[e]),postTypeFormatSupportMap:(0,st.useMemo)((()=>e?.length?e.reduce(((e,t)=>(e[t.slug]=t.supports?.["post-formats"]||!1,e)),{}):{}),[e])}})(),C=vf(d),j=function(e){return(0,it.useSelect)((t=>{const o=t(ct.store).getPostType(e);return o?.viewable&&o?.hierarchical}),[e])}(d),S=e=>{const t={postType:e},n=v[e],a=Object.entries(x||{}).reduce(((e,[t,o])=>(n.includes(t)&&(e[t]=o),e)),{});t.taxQuery=Object.keys(a).length?a:void 0,"post"!==e&&(t.sticky=""),t.parents=[];w[e]||(t.format=[]),o(t)},[B,T]=(0,st.useState)(r.search),N=(0,st.useCallback)((0,ut.debounce)((()=>{r.search!==B&&o({search:B})}),250),[B,r.search]);(0,st.useEffect)((()=>(N(),N.cancel)),[B,N]);const P=function(e){const t=(0,it.useSelect)((t=>{const o=t(ct.store).getPostType(e);return!!o?.supports?.["page-attributes"]}),[e]);return(0,st.useMemo)((()=>{const e=[{label:(0,ot.__)("Newest to oldest"),value:"date/desc"},{label:(0,ot.__)("Oldest to newest"),value:"date/asc"},{label:(0,ot.__)("A → Z"),value:"title/asc"},{label:(0,ot.__)("Z → A"),value:"title/desc"}];return t&&e.push({label:(0,ot.__)("Ascending by order"),value:"menu_order/asc"},{label:(0,ot.__)("Descending by order"),value:"menu_order/desc"}),e}),[t])}(d),I=!a&&kf(y,"inherit"),M=!h&&kf(y,"postType"),D=(0,ot.__)("Post type"),z=(0,ot.__)("Select the type of content to display: posts, pages, or custom post types."),A=!1,R=!h&&kf(y,"order"),H=!h&&f&&kf(y,"sticky"),L=I||M||R||H,V=!!C?.length&&kf(y,"taxQuery"),F=kf(y,"author"),E=kf(y,"search"),O=kf(y,"parents")&&j,$=w[d],G=(0,it.useSelect)((e=>{if(!$||!kf(y,"format"))return!1;const t=e(ct.store).getThemeSupports();return t.formats&&t.formats.length>0&&t.formats.some((e=>"standard"!==e))}),[y,$]),U=V||F||E||O||G,q=mt(),W=kf(y,"postCount"),Z=kf(y,"offset"),Q=kf(y,"pages"),K=W||Z||Q;return(0,Je.jsxs)(Je.Fragment,{children:[L&&(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{o({postType:"post",order:"desc",orderBy:"date",sticky:"",inherit:!0})},dropdownMenuProps:q,children:[I&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!h,label:(0,ot.__)("Query type"),onDeselect:()=>o({inherit:!0}),isShownByDefault:!0,children:(0,Je.jsxs)(tt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Query type"),isBlock:!0,onChange:e=>{o({inherit:"default"===e})},help:h?(0,ot.__)("Display a list of posts or custom post types based on the current template."):(0,ot.__)("Display a list of posts or custom post types based on specific criteria."),value:h?"default":"custom",children:[(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"default",label:(0,ot.__)("Default")}),(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"custom",label:(0,ot.__)("Custom")})]})}),M&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>"post"!==d,label:D,onDeselect:()=>S("post"),isShownByDefault:!0,children:k.length>2?(0,Je.jsx)(tt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,options:k,value:d,label:D,onChange:S,help:z}):(0,Je.jsx)(tt.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,value:d,label:D,onChange:S,help:z,children:k.map((e=>(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:e.value,label:e.label},e.value)))})}),A,R&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>"desc"!==s||"date"!==l,label:(0,ot.__)("Order by"),onDeselect:()=>o({order:"desc",orderBy:"date"}),isShownByDefault:!0,children:(0,Je.jsx)(Sf,{order:s,orderBy:l,orderByOptions:P,onChange:o})}),H&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!g,label:(0,ot.__)("Sticky posts"),onDeselect:()=>o({sticky:""}),isShownByDefault:!0,children:(0,Je.jsx)(Ef,{value:g,onChange:e=>o({sticky:e})})})]}),!h&&K&&(0,Je.jsxs)(tt.__experimentalToolsPanel,{className:"block-library-query-toolspanel__display",label:(0,ot.__)("Display"),resetAll:()=>{o({offset:0,pages:0})},dropdownMenuProps:q,children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Items per page"),hasValue:()=>p>0,children:(0,Je.jsx)(Of,{perPage:p,offset:m,onChange:o})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Offset"),hasValue:()=>m>0,onDeselect:()=>o({offset:0}),children:(0,Je.jsx)($f,{offset:m,onChange:o})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Max pages to show"),hasValue:()=>u>0,onDeselect:()=>o({pages:0}),children:(0,Je.jsx)(Gf,{pages:u,onChange:o})})]}),!h&&U&&(0,Je.jsxs)(tt.__experimentalToolsPanel,{className:"block-library-query-toolspanel__filters",label:(0,ot.__)("Filters"),resetAll:()=>{o({author:"",parents:[],search:"",taxQuery:null,format:[]}),T("")},dropdownMenuProps:q,children:[V&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Taxonomies"),hasValue:()=>Object.values(x||{}).some((e=>!!e.length)),onDeselect:()=>o({taxQuery:null}),children:(0,Je.jsx)(Af,{onChange:o,query:r})}),F&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!c,label:(0,ot.__)("Authors"),onDeselect:()=>o({author:""}),children:(0,Je.jsx)(Tf,{value:c,onChange:o})}),E&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!B,label:(0,ot.__)("Keyword"),onDeselect:()=>T(""),children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Keyword"),value:B,onChange:T})}),O&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!_?.length,label:(0,ot.__)("Parents"),onDeselect:()=>o({parents:[]}),children:(0,Je.jsx)(If,{parents:_,postType:d,onChange:o})}),G&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!b?.length,label:(0,ot.__)("Formats"),onDeselect:()=>o({format:[]}),children:(0,Je.jsx)(Vf,{onChange:o,query:r})})]})]})}const qf="wp-block-query-enhanced-pagination-modal__description";function Wf({clientId:e,attributes:{enhancedPagination:t},setAttributes:o}){const[n,a]=(0,st.useState)(!1),{hasBlocksFromPlugins:r,hasPostContentBlock:i,hasUnsupportedBlocks:s}=wf(e);(0,st.useEffect)((()=>{t&&s&&!window.__experimentalFullPageClientSideNavigation&&(o({enhancedPagination:!1}),a(!0))}),[t,s,o]);const l=()=>{a(!1)};let c=(0,ot.__)('If you still want to prevent full page reloads, remove that block, then disable "Reload full page" again in the Query Block settings.');return r?c=(0,ot.__)("Currently, avoiding full page reloads is not possible when non-interactive or non-client Navigation compatible blocks from plugins are present inside the Query block.")+" "+c:i&&(c=(0,ot.__)("Currently, avoiding full page reloads is not possible when a Content block is present inside the Query block.")+" "+c),n&&(0,Je.jsx)(tt.Modal,{title:(0,ot.__)("Query block: Reload full page enabled"),className:"wp-block-query__enhanced-pagination-modal",aria:{describedby:qf},role:"alertdialog",focusOnMount:"firstElement",isDismissible:!1,onRequestClose:l,children:(0,Je.jsxs)(tt.__experimentalVStack,{alignment:"right",spacing:5,children:[(0,Je.jsx)("span",{id:qf,children:c}),(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:l,children:(0,ot.__)("OK")})]})})}function Zf(e=""){return e=(e=hc()(e)).trim().toLowerCase()}function Qf(e,t){const o=Zf(t),n=Zf(e.title);let a=0;if(o===n)a+=30;else if(n.startsWith(o))a+=20;else{o.split(" ").every((e=>n.includes(e)))&&(a+=10)}return a}function Kf(e=[],t=""){if(!t)return e;const o=e.map((e=>[e,Qf(e,t)])).filter((([,e])=>e>0));return o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))}function Yf({clientId:e,attributes:t,setIsPatternSelectionModalOpen:o}){return(0,Je.jsx)(tt.Modal,{overlayClassName:"block-library-query-pattern__selection-modal",title:(0,ot.__)("Choose a pattern"),onRequestClose:()=>o(!1),isFullScreen:!0,children:(0,Je.jsx)(Xf,{clientId:e,attributes:t})})}function Jf(e,t){const o=function(e,t){return(0,it.useSelect)((o=>{const n=o(Ke.store).getActiveBlockVariation("core/query",t)?.name;if(!n)return"core/query";const{getBlockRootClientId:a,getPatternsByBlockTypes:r}=o(nt.store);return r(`core/query/${n}`,a(e)).length>0?`core/query/${n}`:"core/query"}),[e,t])}(e,t);return((e,t)=>(0,it.useSelect)((o=>{const{getBlockRootClientId:n,getPatternsByBlockTypes:a}=o(nt.store),r=n(e);return a(t,r)}),[t,e]))(e,o)}function Xf({clientId:e,attributes:t,showTitlesAsTooltip:o=!1,showSearch:n=!0}){const[a,r]=(0,st.useState)(""),{replaceBlock:i,selectBlock:s}=(0,it.useDispatch)(nt.store),l=Jf(e,t),c=(0,st.useMemo)((()=>({previewPostType:t.query.postType})),[t.query.postType]),u=(0,st.useMemo)((()=>Kf(l,a)),[l,a]);return(0,Je.jsxs)("div",{className:"block-library-query-pattern__selection-content",children:[n&&(0,Je.jsx)("div",{className:"block-library-query-pattern__selection-search",children:(0,Je.jsx)(tt.SearchControl,{__nextHasNoMarginBottom:!0,onChange:r,value:a,label:(0,ot.__)("Search"),placeholder:(0,ot.__)("Search")})}),(0,Je.jsx)(nt.BlockContextProvider,{value:c,children:(0,Je.jsx)(nt.__experimentalBlockPatternsList,{blockPatterns:u,onClickPattern:(o,n)=>{const{newBlocks:a,queryClientIds:r}=((e,t)=>{const{query:{postType:o,inherit:n},namespace:a}=t,r=e.map((e=>(0,Ke.cloneBlock)(e))),i=[],s=[...r];for(;s.length>0;){const e=s.shift();"core/query"===e.name&&(e.attributes.query={...e.attributes.query,postType:o,inherit:n},a&&(e.attributes.namespace=a),i.push(e.clientId)),e.innerBlocks?.forEach((e=>{s.push(e)}))}return{newBlocks:r,queryClientIds:i}})(n,t);i(e,a),r[0]&&s(r[0])},showTitlesAsTooltip:o})})]})}function ev({clientId:e,attributes:t}){return Jf(e,t).length?(0,Je.jsx)(tt.ToolbarGroup,{className:"wp-block-template-part__block-control-group",children:(0,Je.jsx)(tt.__experimentalDropdownContentWrapper,{children:(0,Je.jsx)(tt.Dropdown,{contentClassName:"block-editor-block-settings-menu__popover",focusOnMount:"firstElement",expandOnMobile:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,Je.jsx)(tt.ToolbarButton,{"aria-haspopup":"true","aria-expanded":e,onClick:t,children:(0,ot.__)("Change design")}),renderContent:()=>(0,Je.jsx)(Xf,{clientId:e,attributes:t,showSearch:!1,showTitlesAsTooltip:!0})})})}):null}const tv=[["core/post-template"]];function ov({attributes:e,setAttributes:t,clientId:o,context:n,name:a}){const{queryId:r,query:i,displayLayout:s,enhancedPagination:l,tagName:c="div",query:{inherit:u}={}}=e,{templateSlug:d}=n,{isSingular:p}=function(e){if(!e)return{isSingular:!0};let t=!1,o="wp"===e?"custom":e;const n=e.includes("-")?e.split("-",1)[0]:e;return(e.includes("-")?e.split("-").slice(1).join("-"):"")&&(o=n),t=["404","blank","single","page","custom"].includes(o),{isSingular:t,templateType:o}}(d),{__unstableMarkNextChangeAsNotPersistent:m}=(0,it.useDispatch)(nt.store),g=(0,ut.useInstanceId)(ov),h=(0,nt.useBlockProps)(),x=(0,nt.useInnerBlocksProps)(h,{template:tv}),{postsPerPage:_}=(0,it.useSelect)((e=>{const{getSettings:t}=e(nt.store),{getEntityRecord:o,getEntityRecordEdits:n,canUser:a}=e(ct.store),r=a("read",{kind:"root",name:"site"})?+o("root","site")?.posts_per_page:+t().postsPerPage;return{postsPerPage:+n("root","site")?.posts_per_page||r||3}}),[]),b=(0,st.useCallback)((e=>t({query:{...i,...e}})),[i,t]);(0,st.useEffect)((()=>{const e={};(u&&i.perPage!==_||!i.perPage&&_)&&(e.perPage=_),p&&i.inherit&&(e.inherit=!1),Object.keys(e).length&&(m(),b(e))}),[i.perPage,i.inherit,_,u,p,m,b]),(0,st.useEffect)((()=>{Number.isFinite(r)||(m(),t({queryId:g}))}),[r,g,m,t]);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Wf,{attributes:e,setAttributes:t,clientId:o}),(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsx)(Uf,{name:a,attributes:e,setQuery:b,setDisplayLayout:e=>t({displayLayout:{...s,...e}}),setAttributes:t,clientId:o,isSingular:p})}),(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsx)(ev,{attributes:e,clientId:o})}),(0,Je.jsxs)(nt.InspectorControls,{group:"advanced",children:[(0,Je.jsx)(tt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("HTML element"),options:[{label:(0,ot.__)("Default ()"),value:"div"},{label:"
",value:"main"},{label:"",value:"section"},{label:"