Read more: %1$s"),t||(0,tt.__)("(no title)")),{a:(0,Ye.jsx)("a",{className:"wp-block-latest-posts__read-more",href:e.link,rel:"noopener noreferrer",onClick:M}),span:(0,Ye.jsx)("span",{className:"screen-reader-text"})})]}):o;return(0,Ye.jsxs)("li",{children:[l&&(0,Ye.jsx)("div",{className:s,children:k?(0,Ye.jsx)("a",{href:e.link,rel:"noreferrer noopener",onClick:M,children:c}):c}),(0,Ye.jsx)("a",{className:"wp-block-latest-posts__post-title",href:e.link,rel:"noreferrer noopener",dangerouslySetInnerHTML:t?{__html:t}:void 0,onClick:M,children:t?null:(0,tt.__)("(no title)")}),g&&n&&(0,Ye.jsx)("div",{className:"wp-block-latest-posts__post-author",children:(0,tt.sprintf)((0,tt.__)("by %s"),n.name)}),m&&e.date_gmt&&(0,Ye.jsx)("time",{dateTime:(0,Mr.format)("c",e.date_gmt),className:"wp-block-latest-posts__post-date",children:(0,Mr.dateI18n)(E,e.date_gmt)}),p&&"excerpt"===d&&(0,Ye.jsx)("div",{className:"wp-block-latest-posts__post-excerpt",children:h}),p&&"full_post"===d&&(0,Ye.jsx)("div",{className:"wp-block-latest-posts__post-full-content",dangerouslySetInnerHTML:{__html:e.content.raw.trim()}})]},e.id)}))})]})},deprecated:_p},Tp=()=>Xe({name:Sp,metadata:jp,settings:Bp}),Np={A:"upper-alpha",a:"lower-alpha",I:"upper-roman",i:"lower-roman"};function Ip(e){const{values:t,start:o,reversed:n,ordered:r,type:a,...i}=e,s=document.createElement(r?"ol":"ul");s.innerHTML=t,o&&s.setAttribute("start",o),n&&s.setAttribute("reversed",!0),a&&s.setAttribute("type",a);const[l]=(0,Qe.rawHandler)({HTML:s.outerHTML});return[{...i,...l.attributes},l.innerBlocks]}const Pp={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:r,start:a}=e,i=t?"ol":"ul";return(0,Ye.jsx)(i,{...ot.useBlockProps.save({type:n,reversed:r,start:a}),children:(0,Ye.jsx)(ot.RichText.Content,{value:o,multiline:"li"})})},migrate:so,isEligible:({style:e})=>e?.typography?.fontFamily},Mp={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:r,start:a}=e,i=t?"ol":"ul";return(0,Ye.jsx)(i,{...ot.useBlockProps.save({type:n,reversed:r,start:a}),children:(0,Ye.jsx)(ot.RichText.Content,{value:o,multiline:"li"})})},migrate:Ip},zp={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:r}=e,a=t?"ol":"ul";return(0,Ye.jsx)(a,{...ot.useBlockProps.save({type:o,reversed:n,start:r}),children:(0,Ye.jsx)(ot.InnerBlocks.Content,{})})},migrate:function(e){const{type:t}=e;return t&&Np[t]?{...e,type:Np[t]}:e}},Dp={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:r}=e,a=t?"ol":"ul";return(0,Ye.jsx)(a,{...ot.useBlockProps.save({reversed:n,start:r,style:{listStyleType:t&&"decimal"!==o?o:void 0}}),children:(0,Ye.jsx)(ot.InnerBlocks.Content,{})})}},Ap=[Dp,zp,Mp,Pp],Rp=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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"})}),Hp=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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"})}),Lp=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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"})}),Fp=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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"})}),Vp=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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"})}),Ep=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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"})}),Op=window.wp.deprecated;var $p=o.n(Op);const Gp=({setAttributes:e,reversed:t,start:o,type:n})=>(0,Ye.jsx)(ot.InspectorControls,{children:(0,Ye.jsxs)(et.PanelBody,{title:(0,tt.__)("Settings"),children:[(0,Ye.jsx)(et.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,tt.__)("List style"),options:[{label:(0,tt.__)("Numbers"),value:"decimal"},{label:(0,tt.__)("Uppercase letters"),value:"upper-alpha"},{label:(0,tt.__)("Lowercase letters"),value:"lower-alpha"},{label:(0,tt.__)("Uppercase Roman numerals"),value:"upper-roman"},{label:(0,tt.__)("Lowercase Roman numerals"),value:"lower-roman"}],value:n,onChange:t=>e({type:t})}),(0,Ye.jsx)(et.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,tt.__)("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,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Reverse order"),checked:t||!1,onChange:t=>{e({reversed:t||void 0})}})]})});const Up=(0,_t.forwardRef)((function(e,t){const{ordered:o,...n}=e,r=o?"ol":"ul";return(0,Ye.jsx)(r,{ref:t,...n})})),qp={name:"core/list-item"},Wp=[["core/list-item"]];function Zp({clientId:e}){const t=function(e){const{replaceBlocks:t,selectionChange:o}=(0,gt.useDispatch)(ot.store),{getBlockRootClientId:n,getBlockAttributes:r,getBlock:a}=(0,gt.useSelect)(ot.store);return(0,_t.useCallback)((()=>{const i=n(e),s=r(i),l=(0,Qe.createBlock)("core/list-item",s),{innerBlocks:c}=a(e);t([i],[l,...c]),o(c[c.length-1].clientId)}),[e])}(e),o=(0,gt.useSelect)((t=>{const{getBlockRootClientId:o,getBlockName:n}=t(ot.store);return"core/list-item"===n(o(e))}),[e]);return(0,Ye.jsx)(Ye.Fragment,{children:(0,Ye.jsx)(et.ToolbarButton,{icon:(0,tt.isRTL)()?Rp:Hp,title:(0,tt.__)("Outdent"),description:(0,tt.__)("Outdent list item"),disabled:!o,onClick:t})})}function Qp({phrasingContentSchema:e}){const t={...e,ul:{},ol:{attributes:["type","start","reversed"]}};return["ul","ol"].forEach((e=>{t[e].children={li:{children:t}}})),t}function Kp(e){return e.flatMap((({name:e,attributes:t,innerBlocks:o=[]})=>"core/list-item"===e?[t.content,...Kp(o)]:Kp(o)))}const Yp={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph","core/heading"],transform:e=>{let t=[];if(e.length>1)t=e.map((({content:e})=>(0,Qe.createBlock)("core/list-item",{content:e})));else if(1===e.length){const o=(0,Ao.create)({html:e[0].content});t=(0,Ao.split)(o,"\n").map((e=>(0,Qe.createBlock)("core/list-item",{content:(0,Ao.toHTMLString)({value:e})})))}return(0,Qe.createBlock)("core/list",{anchor:e.anchor},t)}},{type:"raw",selector:"ol,ul",schema:e=>({ol:Qp(e).ol,ul:Qp(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&&Np[o]?Np[o]:void 0},r=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,...r]=o;if(!("UL"===n?.tagName||"OL"===n?.tagName))return(0,Qe.createBlock)("core/list-item",{content:t.innerHTML});const a=r.map((e=>e.nodeType===e.TEXT_NODE?e.textContent:e.outerHTML));a.reverse();const i={content:a.join("").trim()},s=[e(n)];return(0,Qe.createBlock)("core/list-item",i,s)}));return(0,Qe.createBlock)("core/list",n,r)}},...["*","-"].map((e=>({type:"prefix",prefix:e,transform:e=>(0,Qe.createBlock)("core/list",{},[(0,Qe.createBlock)("core/list-item",{content:e})])}))),...["1.","1)"].map((e=>({type:"prefix",prefix:e,transform:e=>(0,Qe.createBlock)("core/list",{ordered:!0},[(0,Qe.createBlock)("core/list-item",{content:e})])})))],to:[...["core/paragraph","core/heading"].map((e=>({type:"block",blocks:[e],transform:(t,o)=>Kp(o).map((t=>(0,Qe.createBlock)(e,{content:t})))})))]},Jp=Yp,Xp={$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:em}=Xp,tm={icon:kp,example:{innerBlocks:[{name:"core/list-item",attributes:{content:(0,tt.__)("Alice.")}},{name:"core/list-item",attributes:{content:(0,tt.__)("The White Rabbit.")}},{name:"core/list-item",attributes:{content:(0,tt.__)("The Cheshire Cat.")}},{name:"core/list-item",attributes:{content:(0,tt.__)("The Mad Hatter.")}},{name:"core/list-item",attributes:{content:(0,tt.__)("The Queen of Hearts.")}}]},transforms:Jp,edit:function({attributes:e,setAttributes:t,clientId:o,style:n}){const{ordered:r,type:a,reversed:i,start:s}=e,l=(0,ot.useBlockProps)({style:{..._t.Platform.isNative&&n,listStyleType:r&&"decimal"!==a?a:void 0}}),c=(0,ot.useInnerBlocksProps)(l,{defaultBlock:qp,directInsert:!0,template:Wp,templateLock:!1,templateInsertUpdatesSelection:!0,..._t.Platform.isNative&&{marginVertical:8,marginHorizontal:8,renderAppender:!1},__experimentalCaptureToolbars:!0});!function(e,t){const o=(0,gt.useRegistry)(),{updateBlockAttributes:n,replaceInnerBlocks:r}=(0,gt.useDispatch)(ot.store);(0,_t.useEffect)((()=>{if(!e.values)return;const[a,i]=Ip(e);$p()("Value attribute on the list block",{since:"6.0",version:"6.5",alternative:"inner blocks"}),o.batch((()=>{n(t,a),r(t,i)}))}),[e.values])}(e,o);const u=(0,Ye.jsxs)(ot.BlockControls,{group:"block",children:[(0,Ye.jsx)(et.ToolbarButton,{icon:(0,tt.isRTL)()?Lp:Fp,title:(0,tt.__)("Unordered"),description:(0,tt.__)("Convert to unordered list"),isActive:!1===r,onClick:()=>{t({ordered:!1})}}),(0,Ye.jsx)(et.ToolbarButton,{icon:(0,tt.isRTL)()?Vp:Ep,title:(0,tt.__)("Ordered"),description:(0,tt.__)("Convert to ordered list"),isActive:!0===r,onClick:()=>{t({ordered:!0})}}),(0,Ye.jsx)(Zp,{clientId:o})]});return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(Up,{ordered:r,reversed:i,start:s,...c}),u,r&&(0,Ye.jsx)(Gp,{setAttributes:t,reversed:i,start:s,type:a})]})},save:function({attributes:e}){const{ordered:t,type:o,reversed:n,start:r}=e,a=t?"ol":"ul";return(0,Ye.jsx)(a,{...ot.useBlockProps.save({reversed:n,start:r,style:{listStyleType:t&&"decimal"!==o?o:void 0}}),children:(0,Ye.jsx)(ot.InnerBlocks.Content,{})})},deprecated:Ap},om=()=>Xe({name:em,metadata:Xp,settings:tm}),nm=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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"})}),rm=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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"})}),am=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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 im(e){const{replaceBlocks:t,selectionChange:o,multiSelect:n}=(0,gt.useDispatch)(ot.store),{getBlock:r,getPreviousBlockClientId:a,getSelectionStart:i,getSelectionEnd:s,hasMultiSelection:l,getMultiSelectedBlockClientIds:c}=(0,gt.useSelect)(ot.store);return(0,_t.useCallback)((()=>{const u=l(),d=u?c():[e],p=d.map((e=>(0,Qe.cloneBlock)(r(e)))),m=a(e),g=(0,Qe.cloneBlock)(r(m));g.innerBlocks?.length||(g.innerBlocks=[(0,Qe.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 sm(){const e=(0,gt.useRegistry)(),{moveBlocksToPosition:t,removeBlock:o,insertBlock:n,updateBlockListSettings:r}=(0,gt.useDispatch)(ot.store),{getBlockRootClientId:a,getBlockName:i,getBlockOrder:s,getBlockIndex:l,getSelectedBlockClientIds:c,getBlock:u,getBlockListSettings:d}=(0,gt.useSelect)(ot.store);return(0,_t.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=a(e),o=a(t);if(o&&"core/list-item"===i(o))return o}(m);if(!g)return;const h=a(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,Qe.cloneBlock)(u(h),{},[]);e=t.clientId,n(t,0,m,!1),r(e,d(h))}t(_,h,e)}if(t(p,h,a(g),l(g)+1),!s(h).length){o(h,!1)}})),!0}),[])}function lm(e,t){const o=(0,gt.useRegistry)(),{getPreviousBlockClientId:n,getNextBlockClientId:r,getBlockOrder:a,getBlockRootClientId:i,getBlockName:s}=(0,gt.useSelect)(ot.store),{mergeBlocks:l,moveBlocksToPosition:c}=(0,gt.useDispatch)(ot.store),u=sm();function d(e){const t=a(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=r(e);if(t)return t;const o=p(e);return o?m(o):void 0}function g(e){const t=a(e);return t.length?a(t[0])[0]:m(e)}return r=>{function s(e,t){o.batch((()=>{const[o]=a(t);o&&(n(t)!==e||a(e).length?c(a(o),o,i(e)):c([o],t,e)),l(e,t)}))}if(r){const o=g(e);if(!o)return void t(r);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(r)}}}function cm({clientId:e}){const t=im(e),o=sm(),{canIndent:n,canOutdent:r}=(0,gt.useSelect)((t=>{const{getBlockIndex:o,getBlockRootClientId:n,getBlockName:r}=t(ot.store);return{canIndent:o(e)>0,canOutdent:"core/list-item"===r(n(n(e)))}}),[e]);return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(et.ToolbarButton,{icon:(0,tt.isRTL)()?Rp:Hp,title:(0,tt.__)("Outdent"),description:(0,tt.__)("Outdent list item"),disabled:!r,onClick:()=>o()}),(0,Ye.jsx)(et.ToolbarButton,{icon:(0,tt.isRTL)()?rm:am,title:(0,tt.__)("Indent"),description:(0,tt.__)("Indent list item"),disabled:!n,onClick:()=>t()})]})}const um={to:[{type:"block",blocks:["core/paragraph"],transform:(e,t=[])=>[(0,Qe.createBlock)("core/paragraph",e),...t.map((e=>(0,Qe.cloneBlock)(e)))]}]},dm=um,pm={$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:mm}=pm,gm={icon:nm,edit:function({attributes:e,setAttributes:t,clientId:o,mergeBlocks:n}){const{placeholder:r,content:a}=e,i=(0,ot.useBlockProps)(),s=(0,ot.useInnerBlocksProps)(i,{renderAppender:!1,__unstableDisableDropZone:!0}),l=function(e){const{replaceBlocks:t,selectionChange:o}=(0,gt.useDispatch)(ot.store),{getBlock:n,getBlockRootClientId:r,getBlockIndex:a,getBlockName:i}=(0,gt.useSelect)(ot.store),s=(0,_t.useRef)(e);s.current=e;const l=sm();return(0,Ut.useRefEffect)((e=>{function c(e){if(e.defaultPrevented||e.keyCode!==vo.ENTER)return;const{content:c,clientId:u}=s.current;if(c.length)return;if(e.preventDefault(),"core/list-item"===i(r(r(s.current.clientId))))return void l();const d=n(r(u)),p=a(u),m=(0,Qe.cloneBlock)({...d,innerBlocks:d.innerBlocks.slice(0,p)}),g=(0,Qe.createBlock)((0,Qe.getDefaultBlockName)()),h=[...d.innerBlocks[p].innerBlocks[0]?.innerBlocks||[],...d.innerBlocks.slice(p+1)],x=h.length?[(0,Qe.cloneBlock)({...d,innerBlocks:h})]:[];t(d.clientId,[m,g,...x],1),o(g.clientId)}return e.addEventListener("keydown",c),()=>{e.removeEventListener("keydown",c)}}),[])}({content:a,clientId:o}),c=function(e){const{getSelectionStart:t,getSelectionEnd:o,getBlockIndex:n}=(0,gt.useSelect)(ot.store),r=im(e),a=sm();return(0,Ut.useRefEffect)((i=>{function s(i){const{keyCode:s,shiftKey:l,altKey:c,metaKey:u,ctrlKey:d}=i;if(i.defaultPrevented||s!==vo.SPACE&&s!==vo.TAB||c||u||d)return;const p=t(),m=o();0===p.offset&&0===m.offset&&(l?s===vo.TAB&&a()&&i.preventDefault():0!==n(e)&&r()&&i.preventDefault())}return i.addEventListener("keydown",s),()=>{i.removeEventListener("keydown",s)}}),[e,r])}(o),u=lm(o,n);return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsxs)("li",{...s,children:[(0,Ye.jsx)(ot.RichText,{ref:(0,Ut.useMergeRefs)([l,c]),identifier:"content",tagName:"div",onChange:e=>t({content:e}),value:a,"aria-label":(0,tt.__)("List text"),placeholder:r||(0,tt.__)("List"),onMerge:u}),s.children]}),(0,Ye.jsx)(ot.BlockControls,{group:"block",children:(0,Ye.jsx)(cm,{clientId:o})})]})},save:function({attributes:e}){return(0,Ye.jsxs)("li",{...ot.useBlockProps.save(),children:[(0,Ye.jsx)(ot.RichText.Content,{value:e.content}),(0,Ye.jsx)(ot.InnerBlocks.Content,{})]})},merge:(e,t)=>({...e,content:e.content+t.content}),transforms:dm,[Ht(ot.privateApis).requiresWrapperOnCopy]:!0},hm=()=>Xe({name:mm,metadata:pm,settings:gm}),xm=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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 _m={$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:bm}=_m,ym={icon:xm,edit:function({attributes:e,setAttributes:t}){const{displayLoginAsForm:o,redirectToCurrent:n}=e;return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.InspectorControls,{children:(0,Ye.jsxs)(et.PanelBody,{title:(0,tt.__)("Settings"),children:[(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display login as form"),checked:o,onChange:()=>t({displayLoginAsForm:!o})}),(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Redirect to current URL"),checked:n,onChange:()=>t({redirectToCurrent:!n})})]})}),(0,Ye.jsx)("div",{...(0,ot.useBlockProps)({className:"logged-in"}),children:(0,Ye.jsx)("a",{href:"#login-pseudo-link",children:(0,tt.__)("Log out")})})]})}},fm=()=>Xe({name:bm,metadata:_m,settings:ym}),vm=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.Path,{d:"M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z"})}),km="full",wm="media",Cm="attachment",jm=[["core/paragraph",{placeholder:(0,tt._x)("Content…","content placeholder")}]],Sm=(e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${100*t.x}% ${100*t.y}%`:"50% 50%"}:{},Bm=(e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{},Tm=50,Nm=()=>{},Im=e=>{if(!e.customBackgroundColor)return e;const t={color:{background:e.customBackgroundColor}},{customBackgroundColor:o,...n}=e;return{...n,style:t}},Pm=e=>e.align?e:{...e,align:"wide"},Mm={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}},zm={...Mm,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"}},Dm={...zm,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"}},Am={...Dm,align:{type:"string",default:"none"},useFeaturedImage:{type:"boolean",default:!1}},Rm={anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0}},Hm={...Rm,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}}},Lm={attributes:Am,supports:{...Hm,__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:r,mediaUrl:a,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||km,x=g||void 0,_=dt({[`wp-image-${s}`]:s&&"image"===r,[`size-${h}`]:s&&"image"===r});let b=a?(0,Ye.jsx)("img",{src:a,alt:o,className:_||null}):null;p&&(b=(0,Ye.jsx)("a",{className:d,href:p,target:m,rel:x,children:b}));const y={image:()=>b,video:()=>(0,Ye.jsx)("video",{controls:!0,src:a})},f=dt({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Bm(a,u):{};let k;i!==Tm&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,Ye.jsxs)("div",{...ot.useBlockProps.save({className:f,style:w}),children:[(0,Ye.jsx)("div",{...ot.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Ye.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[r]||Nm)()})]}):(0,Ye.jsxs)("div",{...ot.useBlockProps.save({className:f,style:w}),children:[(0,Ye.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[r]||Nm)()}),(0,Ye.jsx)("div",{...ot.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})}},Fm={attributes:Dm,supports:Hm,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:r,mediaUrl:a,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||km,x=g||void 0,_=dt({[`wp-image-${s}`]:s&&"image"===r,[`size-${h}`]:s&&"image"===r});let b=(0,Ye.jsx)("img",{src:a,alt:o,className:_||null});p&&(b=(0,Ye.jsx)("a",{className:d,href:p,target:m,rel:x,children:b}));const y={image:()=>b,video:()=>(0,Ye.jsx)("video",{controls:!0,src:a})},f=dt({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Bm(a,u):{};let k;i!==Tm&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,Ye.jsxs)("div",{...ot.useBlockProps.save({className:f,style:w}),children:[(0,Ye.jsx)("div",{...ot.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Ye.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[r]||Nm)()})]}):(0,Ye.jsxs)("div",{...ot.useBlockProps.save({className:f,style:w}),children:[(0,Ye.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[r]||Nm)()}),(0,Ye.jsx)("div",{...ot.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Pm,isEligible(e,t,{block:o}){const{attributes:n}=o;return void 0===e.align&&!!n.className?.includes("alignwide")}},Vm={attributes:zm,supports:Rm,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:r,mediaUrl:a,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||km,x=g||void 0,_=dt({[`wp-image-${s}`]:s&&"image"===r,[`size-${h}`]:s&&"image"===r});let b=(0,Ye.jsx)("img",{src:a,alt:o,className:_||null});p&&(b=(0,Ye.jsx)("a",{className:d,href:p,target:m,rel:x,children:b}));const y={image:()=>b,video:()=>(0,Ye.jsx)("video",{controls:!0,src:a})},f=dt({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Sm(a,u):{};let k;i!==Tm&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,Ye.jsxs)("div",{...ot.useBlockProps.save({className:f,style:w}),children:[(0,Ye.jsx)("div",{...ot.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Ye.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[r]||Nm)()})]}):(0,Ye.jsxs)("div",{...ot.useBlockProps.save({className:f,style:w}),children:[(0,Ye.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[r]||Nm)()}),(0,Ye.jsx)("div",{...ot.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Pm},Em={attributes:zm,supports:Rm,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:r,mediaUrl:a,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||km,x=g||void 0,_=dt({[`wp-image-${s}`]:s&&"image"===r,[`size-${h}`]:s&&"image"===r});let b=(0,Ye.jsx)("img",{src:a,alt:o,className:_||null});p&&(b=(0,Ye.jsx)("a",{className:d,href:p,target:m,rel:x,children:b}));const y={image:()=>b,video:()=>(0,Ye.jsx)("video",{controls:!0,src:a})},f=dt({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Sm(a,u):{};let k;i!==Tm&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return(0,Ye.jsxs)("div",{...ot.useBlockProps.save({className:f,style:w}),children:[(0,Ye.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[r]||Nm)()}),(0,Ye.jsx)("div",{...ot.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Pm},Om={attributes:{...Mm,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)(Im,Pm),save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,isStackedOnMobile:n,mediaAlt:r,mediaPosition:a,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,Ye.jsx)("img",{src:s,alt:r,className:c&&"image"===i?`wp-image-${c}`:null});g&&(b=(0,Ye.jsx)("a",{className:m,href:g,target:h,rel:_,children:b}));const y={image:()=>b,video:()=>(0,Ye.jsx)("video",{controls:!0,src:s})},f=(0,ot.getColorClassName)("background-color",t),v=dt({"has-media-on-the-right":"right"===a,"has-background":f||o,[f]:f,"is-stacked-on-mobile":n,[`is-vertically-aligned-${u}`]:u,"is-image-fill":d}),k=d?Sm(s,p):{};let w;l!==Tm&&(w="right"===a?`auto ${l}%`:`${l}% auto`);const C={backgroundColor:f?void 0:o,gridTemplateColumns:w};return(0,Ye.jsxs)("div",{className:v,style:C,children:[(0,Ye.jsx)("figure",{className:"wp-block-media-text__media",style:k,children:(y[i]||Nm)()}),(0,Ye.jsx)("div",{className:"wp-block-media-text__content",children:(0,Ye.jsx)(ot.InnerBlocks.Content,{})})]})}},$m={attributes:{...Mm,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)(Im,Pm),save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,isStackedOnMobile:n,mediaAlt:r,mediaPosition:a,mediaType:i,mediaUrl:s,mediaWidth:l,mediaId:c,verticalAlignment:u,imageFill:d,focalPoint:p}=e,m={image:()=>(0,Ye.jsx)("img",{src:s,alt:r,className:c&&"image"===i?`wp-image-${c}`:null}),video:()=>(0,Ye.jsx)("video",{controls:!0,src:s})},g=(0,ot.getColorClassName)("background-color",t),h=dt({"has-media-on-the-right":"right"===a,[g]:g,"is-stacked-on-mobile":n,[`is-vertically-aligned-${u}`]:u,"is-image-fill":d}),x=d?Sm(s,p):{};let _;l!==Tm&&(_="right"===a?`auto ${l}%`:`${l}% auto`);const b={backgroundColor:g?void 0:o,gridTemplateColumns:_};return(0,Ye.jsxs)("div",{className:h,style:b,children:[(0,Ye.jsx)("figure",{className:"wp-block-media-text__media",style:x,children:(m[i]||Nm)()}),(0,Ye.jsx)("div",{className:"wp-block-media-text__content",children:(0,Ye.jsx)(ot.InnerBlocks.Content,{})})]})}},Gm={attributes:{...Mm,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"}},migrate:Pm,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,isStackedOnMobile:n,mediaAlt:r,mediaPosition:a,mediaType:i,mediaUrl:s,mediaWidth:l}=e,c={image:()=>(0,Ye.jsx)("img",{src:s,alt:r}),video:()=>(0,Ye.jsx)("video",{controls:!0,src:s})},u=(0,ot.getColorClassName)("background-color",t),d=dt({"has-media-on-the-right":"right"===a,[u]:u,"is-stacked-on-mobile":n});let p;l!==Tm&&(p="right"===a?`auto ${l}%`:`${l}% auto`);const m={backgroundColor:u?void 0:o,gridTemplateColumns:p};return(0,Ye.jsxs)("div",{className:d,style:m,children:[(0,Ye.jsx)("figure",{className:"wp-block-media-text__media",children:(c[i]||Nm)()}),(0,Ye.jsx)("div",{className:"wp-block-media-text__content",children:(0,Ye.jsx)(ot.InnerBlocks.Content,{})})]})}},Um=[Lm,Fm,Vm,Em,Om,$m,Gm],qm=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})}),Wm=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})}),Zm=(0,Ye.jsxs)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Ye.jsx)(Ke.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,Ye.jsx)(Ke.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 Qm(e,t){return e?{objectPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{}}const Km=["image","video"],Ym=()=>{},Jm=(0,_t.forwardRef)((({isSelected:e,isStackedOnMobile:t,...o},n)=>{const r=(0,Ut.useViewportMatch)("small","<");return(0,Ye.jsx)(et.ResizableBox,{ref:n,showHandle:e&&(!r||!t),...o})}));function Xm({mediaId:e,mediaUrl:t,onSelectMedia:o,toggleUseFeaturedImage:n,useFeaturedImage:r}){return(0,Ye.jsx)(ot.BlockControls,{group:"other",children:(0,Ye.jsx)(ot.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:Km,accept:"image/*,video/*",onSelect:o,onToggleFeaturedImage:n,useFeaturedImage:r,onReset:()=>o(void 0)})})}function eg({className:e,mediaUrl:t,onSelectMedia:o,toggleUseFeaturedImage:n}){const{createErrorNotice:r}=(0,gt.useDispatch)(Pt.store);return(0,Ye.jsx)(ot.MediaPlaceholder,{icon:(0,Ye.jsx)(ot.BlockIcon,{icon:Zm}),labels:{title:(0,tt.__)("Media area")},className:e,onSelect:o,accept:"image/*,video/*",onToggleFeaturedImage:n,allowedTypes:Km,onError:e=>{r(e,{type:"snackbar"})},disableMediaButtons:t})}const tg=(0,_t.forwardRef)((function(e,t){const{className:o,commitWidthChange:n,focalPoint:r,imageFill:a,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,It.isBlobURL)(p),{toggleSelection:w}=(0,gt.useDispatch)(ot.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&&a?Qm(p||y,r):{},N={image:()=>b&&y?(0,Ye.jsx)("img",{ref:v,src:y,alt:f,style:T}):p&&(0,Ye.jsx)("img",{ref:v,src:p,alt:l,style:T}),video:()=>(0,Ye.jsx)("video",{controls:!0,ref:v,src:p})};return(0,Ye.jsxs)(Jm,{as:"figure",className:dt(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,Ye.jsx)(Xm,{onSelectMedia:g,mediaUrl:b&&y?y:p,mediaId:c,toggleUseFeaturedImage:_}),(N[d]||Ym)(),k&&(0,Ye.jsx)(et.Spinner,{}),!b&&(0,Ye.jsx)(eg,{...e}),!y&&b&&(0,Ye.jsx)(et.Placeholder,{className:"wp-block-media-text--placeholder-image",style:T,withIllustration:!0})]})}return(0,Ye.jsx)(eg,{...e})})),{ResolutionTool:og}=Ht(ot.privateApis),ng=e=>Math.max(15,Math.min(e,85));function rg(e,t){return e?.media_details?.sizes?.[t]?.source_url}const ag=function({attributes:e,isSelected:t,setAttributes:o,context:{postId:n,postType:r}}){const{focalPoint:a,href:i,imageFill:s,isStackedOnMobile:l,linkClass:c,linkDestination:u,linkTarget:d,mediaAlt:p,mediaId:m,mediaPosition:g,mediaType:h,mediaUrl:x,mediaWidth:_,rel:b,verticalAlignment:y,allowedBlocks:f,useFeaturedImage:v}=e,k=e.mediaSizeSlug||km,[w]=(0,mt.useEntityProp)("postType",r,"featured_media",n),C=(0,gt.useSelect)((e=>w&&e(mt.store).getMedia(w,{context:"view"})),[w]),j=v?C?.source_url:"",S=v?C?.alt_text:"",{imageSizes:B,image:T}=(0,gt.useSelect)((e=>{const{getSettings:o}=e(ot.store);return{image:m&&t?e(mt.store).getMedia(m,{context:"view"}):null,imageSizes:o()?.imageSizes}}),[t,m]),N=(0,_t.useRef)(),I=e=>{const{style:t}=N.current,{x:o,y:n}=e;t.objectPosition=`${100*o}% ${100*n}%`},[P,M]=(0,_t.useState)(null),z=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});let r,a;(0,It.isBlobURL)(n.url)&&(n.type=(0,It.getBlobTypeByURL)(n.url)),r=n.media_type?"image"===n.media_type?"image":"video":n.type,"image"===r&&(a=n.sizes?.large?.url||n.media_details?.sizes?.large?.source_url);let i=t;e===wm&&(i=n.url),e===Cm&&(i=n.link),o({mediaAlt:n.alt,mediaId:n.id,mediaType:r,mediaUrl:a||n.url,mediaLink:n.link||void 0,href:i,focalPoint:void 0})}}({attributes:e,setAttributes:o}),D=e=>{o({mediaWidth:ng(e)}),M(null)},A=dt({"has-media-on-the-right":"right"===g,"is-selected":t,"is-stacked-on-mobile":l,[`is-vertically-aligned-${y}`]:y,"is-image-fill-element":s}),R=`${P||_}%`,H="right"===g?`1fr ${R}`:`${R} 1fr`,L={gridTemplateColumns:H,msGridColumns:H},F=B.filter((({slug:e})=>rg(T,e))).map((({name:e,slug:t})=>({value:t,label:e}))),V=Zt(),E=(0,Ye.jsxs)(et.__experimentalToolsPanel,{label:(0,tt.__)("Settings"),resetAll:()=>{o({isStackedOnMobile:!0,imageFill:!1,mediaAlt:"",focalPoint:void 0,mediaWidth:50,mediaSizeSlug:void 0})},dropdownMenuProps:V,children:[(0,Ye.jsx)(et.__experimentalToolsPanelItem,{label:(0,tt.__)("Media width"),isShownByDefault:!0,hasValue:()=>50!==_,onDeselect:()=>o({mediaWidth:50}),children:(0,Ye.jsx)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Media width"),value:P||_,onChange:D,min:15,max:85})}),(0,Ye.jsx)(et.__experimentalToolsPanelItem,{label:(0,tt.__)("Stack on mobile"),isShownByDefault:!0,hasValue:()=>!l,onDeselect:()=>o({isStackedOnMobile:!0}),children:(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Stack on mobile"),checked:l,onChange:()=>o({isStackedOnMobile:!l})})}),"image"===h&&(0,Ye.jsx)(et.__experimentalToolsPanelItem,{label:(0,tt.__)("Crop image to fill"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>o({imageFill:!1}),children:(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Crop image to fill"),checked:!!s,onChange:()=>o({imageFill:!s})})}),s&&(x||j)&&"image"===h&&(0,Ye.jsx)(et.__experimentalToolsPanelItem,{label:(0,tt.__)("Focal point"),isShownByDefault:!0,hasValue:()=>!!a,onDeselect:()=>o({focalPoint:void 0}),children:(0,Ye.jsx)(et.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Focal point"),url:v&&j?j:x,value:a,onChange:e=>o({focalPoint:e}),onDragStart:I,onDrag:I})}),"image"===h&&x&&!v&&(0,Ye.jsx)(et.__experimentalToolsPanelItem,{label:(0,tt.__)("Alternative text"),isShownByDefault:!0,hasValue:()=>!!p,onDeselect:()=>o({mediaAlt:""}),children:(0,Ye.jsx)(et.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Alternative text"),value:p,onChange:e=>{o({mediaAlt:e})},help:(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(et.ExternalLink,{href:(0,tt.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,tt.__)("Describe the purpose of the image.")}),(0,Ye.jsx)("br",{}),(0,tt.__)("Leave empty if decorative.")]})})}),"image"===h&&!v&&(0,Ye.jsx)(og,{value:k,options:F,onChange:e=>{const t=rg(T,e);if(!t)return null;o({mediaUrl:t,mediaSizeSlug:e})}})]}),O=(0,ot.useBlockProps)({className:A,style:L}),$=(0,ot.useInnerBlocksProps)({className:"wp-block-media-text__content"},{template:jm,allowedBlocks:f}),G=(0,ot.useBlockEditingMode)();return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.InspectorControls,{children:E}),(0,Ye.jsxs)(ot.BlockControls,{group:"block",children:["default"===G&&(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.BlockVerticalAlignmentControl,{onChange:e=>{o({verticalAlignment:e})},value:y}),(0,Ye.jsx)(et.ToolbarButton,{icon:qm,title:(0,tt.__)("Show media on left"),isActive:"left"===g,onClick:()=>o({mediaPosition:"left"})}),(0,Ye.jsx)(et.ToolbarButton,{icon:Wm,title:(0,tt.__)("Show media on right"),isActive:"right"===g,onClick:()=>o({mediaPosition:"right"})})]}),"image"===h&&!v&&(0,Ye.jsx)(ot.__experimentalImageURLInputUI,{url:i||"",onChangeUrl:e=>{o(e)},linkDestination:u,mediaType:h,mediaUrl:T&&T.source_url,mediaLink:T&&T.link,linkTarget:d,linkClass:c,rel:b})]}),(0,Ye.jsxs)("div",{...O,children:["right"===g&&(0,Ye.jsx)("div",{...$}),(0,Ye.jsx)(tg,{className:"wp-block-media-text__media",onSelectMedia:z,onWidthChange:e=>{M(ng(e))},commitWidthChange:D,refMedia:N,enableResize:"default"===G,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:!v})},focalPoint:a,imageFill:s,isSelected:t,isStackedOnMobile:l,mediaAlt:p,mediaId:m,mediaPosition:g,mediaType:h,mediaUrl:x,mediaWidth:_,useFeaturedImage:v,featuredImageURL:j,featuredImageAlt:S}),"right"!==g&&(0,Ye.jsx)("div",{...$})]})]})},ig=()=>{};const sg={from:[{type:"block",blocks:["core/image"],transform:({alt:e,url:t,id:o,anchor:n})=>(0,Qe.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,Qe.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:r,customOverlayColor:a,gradient:i,id:s,overlayColor:l,style:c,textColor:u,url:d},p)=>{let m={};return r?m={style:{color:{gradient:r}}}:a&&(m={style:{color:{background:a}}}),c?.color?.text&&(m.style={color:{...m.style?.color,text:c.color.text}}),(0,Qe.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,Qe.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,Qe.createBlock)("core/video",{id:e,src:t,anchor:o})},{type:"block",blocks:["core/cover"],transform:({align:e,anchor:t,backgroundColor:o,focalPoint:n,gradient:r,mediaAlt:a,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:a,anchor:t,backgroundType:s,dimRatio:l?50:100,focalPoint:n,gradient:r,id:i,overlayColor:o,textColor:u,url:l,...p};return(0,Qe.createBlock)("core/cover",m,d)}}]},lg=sg,cg={$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:ug}=cg,dg={icon:vm,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,tt.__)("The wren
Earns his living
Noiselessly.")}},{name:"core/paragraph",attributes:{content:(0,tt.__)("— Kobayashi Issa (一茶)")}}]},transforms:lg,edit:ag,save:function({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:r,mediaUrl:a,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||km,x=g||void 0,_=dt({[`wp-image-${s}`]:s&&"image"===r,[`size-${h}`]:s&&"image"===r}),b=c?Qm(a,u):{};let y=a?(0,Ye.jsx)("img",{src:a,alt:o,className:_||null,style:b}):null;p&&(y=(0,Ye.jsx)("a",{className:d,href:p,target:m,rel:x,children:y}));const f={image:()=>y,video:()=>(0,Ye.jsx)("video",{controls:!0,src:a})},v=dt({"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,Ye.jsxs)("div",{...ot.useBlockProps.save({className:v,style:w}),children:[(0,Ye.jsx)("div",{...ot.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Ye.jsx)("figure",{className:"wp-block-media-text__media",children:(f[r]||ig)()})]}):(0,Ye.jsxs)("div",{...ot.useBlockProps.save({className:v,style:w}),children:[(0,Ye.jsx)("figure",{className:"wp-block-media-text__media",children:(f[r]||ig)()}),(0,Ye.jsx)("div",{...ot.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},deprecated:Um},pg=()=>Xe({name:ug,metadata:cg,settings:dg});const mg={$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:gg}=mg,hg={name:gg,__experimentalLabel(e,{context:t}){if("accessibility"===t){const{originalName:t}=e,o=t?(0,Qe.getBlockType)(t):void 0;return o?o.settings.title||t:""}},edit:function({attributes:e,clientId:t}){const{originalName:o,originalUndelimitedContent:n}=e,r=!!n,{hasFreeformBlock:a,hasHTMLBlock:i}=(0,gt.useSelect)((e=>{const{canInsertBlockType:o,getBlockRootClientId:n}=e(ot.store);return{hasFreeformBlock:o("core/freeform",n(t)),hasHTMLBlock:o("core/html",n(t))}}),[t]),{replaceBlock:s}=(0,gt.useDispatch)(ot.store),l=[];let c;const u=(0,Ye.jsx)(et.Button,{__next40pxDefaultSize:!0,onClick:function(){s(t,(0,Qe.createBlock)("core/html",{content:n}))},variant:"primary",children:(0,tt.__)("Keep as HTML")},"convert");return!r||a||o?r&&i?(c=(0,tt.sprintf)((0,tt.__)('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,tt.sprintf)((0,tt.__)('Your site doesn’t include support for the "%s" block. You can leave it as-is or remove it.'),o):i?(c=(0,tt.__)("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,tt.__)("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,Ye.jsxs)("div",{...(0,ot.useBlockProps)({className:"has-warning"}),children:[(0,Ye.jsx)(ot.Warning,{actions:l,children:c}),(0,Ye.jsx)(_t.RawHTML,{children:(0,uc.safeHTML)(n)})]})},save:function({attributes:e}){return(0,Ye.jsx)(_t.RawHTML,{children:e.originalContent})}},xg=()=>Xe({name:gg,metadata:mg,settings:hg}),_g=(0,Ye.jsx)(Ke.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ye.jsx)(Ke.Path,{d:"M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"})}),bg=(0,tt.__)("Read more");const yg={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,Qe.createBlock)("core/more",n)}}]},fg={$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:vg}=fg,kg={icon:_g,example:{},__experimentalLabel(e,{context:t}){const o=e?.metadata?.name;return"list-view"===t&&o?o:"accessibility"===t?e.customText:void 0},transforms:yg,edit:function({attributes:{customText:e,noTeaser:t},insertBlocksAfter:o,setAttributes:n}){const r={width:`${(e||bg).length+1.2}em`};return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.InspectorControls,{children:(0,Ye.jsx)(et.PanelBody,{children:(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Hide the excerpt on the full content page"),checked:!!t,onChange:()=>n({noTeaser:!t}),help:e=>e?(0,tt.__)("The excerpt is hidden."):(0,tt.__)("The excerpt is visible.")})})}),(0,Ye.jsx)("div",{...(0,ot.useBlockProps)(),children:(0,Ye.jsx)("input",{"aria-label":(0,tt.__)("“Read more” link text"),type:"text",value:e,placeholder:bg,onChange:e=>{n({customText:e.target.value})},onKeyDown:({keyCode:e})=>{e===vo.ENTER&&o([(0,Qe.createBlock)((0,Qe.getDefaultBlockName)())])},style:r})})]})},save:function({attributes:{customText:e,noTeaser:t}}){const o=e?`\x3c!--more ${e}--\x3e`:"\x3c!--more--\x3e",n=t?"\x3c!--noteaser--\x3e":"";return(0,Ye.jsx)(_t.RawHTML,{children:[o,n].filter(Boolean).join("\n")})}},wg=()=>Xe({name:vg,metadata:fg,settings:kg}),Cg=(0,Ye.jsx)(Ke.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ye.jsx)(Ke.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"})}),jg=window.wp.a11y;const Sg=(0,_t.forwardRef)((function({icon:e,size:t=24,...o},n){return(0,_t.cloneElement)(e,{width:t,height:t,...o,ref:n})})),Bg=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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"})}),Tg={name:"core/navigation-link"},Ng=["core/navigation-link/page","core/navigation-link"],Ig={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"},Pg=["postType","wp_navigation",Ig];function Mg(e){const t=(0,mt.useResourcePermissions)({kind:"postType",name:"wp_navigation",id:e}),{navigationMenu:o,isNavigationMenuResolved:n,isNavigationMenuMissing:r}=(0,gt.useSelect)((t=>function(e,t){if(!t)return{isNavigationMenuResolved:!1,isNavigationMenuMissing:!0};const{getEntityRecord:o,getEditedEntityRecord:n,hasFinishedResolution:r}=e(mt.store),a=["postType","wp_navigation",t],i=o(...a),s=n(...a),l=r("getEditedEntityRecord",a),c="publish"===s.status||"draft"===s.status;return{isNavigationMenuResolved:l,isNavigationMenuMissing:l&&(!i||!c),navigationMenu:c?s:null}}(t,e)),[e]),{canCreate:a,canUpdate:i,canDelete:s,isResolving:l,hasResolved:c}=t,{records:u,isResolving:d,hasResolved:p}=(0,mt.useEntityRecords)("postType","wp_navigation",Ig);return{navigationMenu:o,isNavigationMenuResolved:n,isNavigationMenuMissing:r,navigationMenus:u,isResolvingNavigationMenus:d,hasResolvedNavigationMenus:p,canSwitchNavigationMenu:e?u?.length>1:u?.length>0,canUserCreateNavigationMenus:a,isResolvingCanUserCreateNavigationMenus:l,hasResolvedCanUserCreateNavigationMenus:c,canUserUpdateNavigationMenu:i,hasResolvedCanUserUpdateNavigationMenu:e?c:void 0,canUserDeleteNavigationMenu:s,hasResolvedCanUserDeleteNavigationMenu:e?c:void 0}}function zg(e){const{records:t,isResolving:o,hasResolved:n}=(0,mt.useEntityRecords)("root","menu",{per_page:-1,context:"view"}),{records:r,isResolving:a,hasResolved:i}=(0,mt.useEntityRecords)("postType","page",{parent:0,order:"asc",orderby:"id",per_page:-1,context:"view"}),{records:s,hasResolved:l}=(0,mt.useEntityRecords)("root","menuItem",{menus:e,per_page:-1,context:"view"},{enabled:!!e});return{pages:r,isResolvingPages:a,hasResolvedPages:i,hasPages:!(!i||!r?.length),menus:t,isResolvingMenus:o,hasResolvedMenus:n,hasMenus:!(!n||!t?.length),menuItems:s,hasResolvedMenuItems:l}}const Dg=({isVisible:e=!0})=>(0,Ye.jsx)("div",{"aria-hidden":!e||void 0,className:"wp-block-navigation-placeholder__preview",children:(0,Ye.jsxs)("div",{className:"wp-block-navigation-placeholder__actions__indicator",children:[(0,Ye.jsx)(Sg,{icon:Cg}),(0,tt.__)("Navigation")]})}),Ag=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});const Rg=function({currentMenuId:e,onSelectNavigationMenu:t,onSelectClassicMenu:o,onCreateNew:n,actionLabel:r,createNavigationMenuIsSuccess:a,createNavigationMenuIsError:i}){const s=(0,tt.__)("Create from '%s'"),[l,c]=(0,_t.useState)(!1);r=r||s;const{menus:u}=zg(),{navigationMenus:d,isResolvingNavigationMenus:p,hasResolvedNavigationMenus:m,canUserCreateNavigationMenus:g,canSwitchNavigationMenu:h}=Mg(),[x]=(0,mt.useEntityProp)("postType","wp_navigation","title"),_=(0,_t.useMemo)((()=>d?.map((({id:e,title:t,status:o},n)=>{const a=function(e,t,o){return e?"publish"===o?(0,Xo.decodeEntities)(e):(0,tt.sprintf)((0,tt.__)("%1$s (%2$s)"),(0,Xo.decodeEntities)(e),o):(0,tt.sprintf)((0,tt.__)("(no title %s)"),t)}(t?.rendered,n+1,o);return{value:e,label:a,ariaLabel:(0,tt.sprintf)(r,a),disabled:l||p||!m}}))||[]),[d,r,p,m,l]),b=!!d?.length,y=!!u?.length,f=!!h,v=!!g,k=b&&!e,w=!b&&m,C=m&&null===e;let j="";j=p?(0,tt.__)("Loading…"):k||w||C?(0,tt.__)("Choose or create a Navigation Menu"):x,(0,_t.useEffect)((()=>{l&&(a||i)&&c(!1)}),[m,a,g,i,l,C,w,k]);const S=(0,Ye.jsx)(et.DropdownMenu,{label:j,icon:Ag,toggleProps:{size:"small"},children:({onClose:r})=>(0,Ye.jsxs)(Ye.Fragment,{children:[f&&b&&(0,Ye.jsx)(et.MenuGroup,{label:(0,tt.__)("Menus"),children:(0,Ye.jsx)(et.MenuItemsChoice,{value:e,onSelect:e=>{t(e),r()},choices:_})}),v&&y&&(0,Ye.jsx)(et.MenuGroup,{label:(0,tt.__)("Import Classic Menus"),children:u?.map((e=>{const t=(0,Xo.decodeEntities)(e.name);return(0,Ye.jsx)(et.MenuItem,{onClick:async()=>{c(!0),await o(e),c(!1),r()},"aria-label":(0,tt.sprintf)(s,t),disabled:l||p||!m,children:t},e.id)}))}),g&&(0,Ye.jsx)(et.MenuGroup,{label:(0,tt.__)("Tools"),children:(0,Ye.jsx)(et.MenuItem,{onClick:async()=>{c(!0),await n(),c(!1),r()},disabled:l||p||!m,children:(0,tt.__)("Create new Menu")})})]})});return S};function Hg({isSelected:e,currentMenuId:t,clientId:o,canUserCreateNavigationMenus:n=!1,isResolvingCanUserCreateNavigationMenus:r,onSelectNavigationMenu:a,onSelectClassicMenu:i,onCreateEmpty:s}){const{isResolvingMenus:l,hasResolvedMenus:c}=zg();(0,_t.useEffect)((()=>{e&&(l&&(0,jg.speak)((0,tt.__)("Loading navigation block setup options…")),c&&(0,jg.speak)((0,tt.__)("Navigation block setup options ready.")))}),[c,l,e]);const u=l&&r;return(0,Ye.jsx)(Ye.Fragment,{children:(0,Ye.jsxs)(et.Placeholder,{className:"wp-block-navigation-placeholder",children:[(0,Ye.jsx)(Dg,{isVisible:!e}),(0,Ye.jsx)("div",{"aria-hidden":!e||void 0,className:"wp-block-navigation-placeholder__controls",children:(0,Ye.jsxs)("div",{className:"wp-block-navigation-placeholder__actions",children:[(0,Ye.jsxs)("div",{className:"wp-block-navigation-placeholder__actions__indicator",children:[(0,Ye.jsx)(Sg,{icon:Cg})," ",(0,tt.__)("Navigation")]}),(0,Ye.jsx)("hr",{}),u&&(0,Ye.jsx)(et.Spinner,{}),(0,Ye.jsx)(Rg,{currentMenuId:t,clientId:o,onSelectNavigationMenu:a,onSelectClassicMenu:i}),(0,Ye.jsx)("hr",{}),n&&(0,Ye.jsx)(et.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:s,children:(0,tt.__)("Start empty")})]})})]})})}const Lg=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"})});function Fg({icon:e}){return"menu"===e?(0,Ye.jsx)(Sg,{icon:Lg}):(0,Ye.jsxs)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,Ye.jsx)(Ke.Rect,{x:"4",y:"7.5",width:"16",height:"1.5"}),(0,Ye.jsx)(Ke.Rect,{x:"4",y:"15",width:"16",height:"1.5"})]})}function Vg({children:e,id:t,isOpen:o,isResponsive:n,onToggle:r,isHiddenByDefault:a,overlayBackgroundColor:i,overlayTextColor:s,hasIcon:l,icon:c}){if(!n)return e;const u=dt("wp-block-navigation__responsive-container",{"has-text-color":!!s.color||!!s?.class,[(0,ot.getColorClassName)("color",s?.slug)]:!!s?.slug,"has-background":!!i.color||i?.class,[(0,ot.getColorClassName)("background-color",i?.slug)]:!!i?.slug,"is-menu-open":o,"hidden-by-default":a}),d={color:!s?.slug&&s?.color,backgroundColor:!i?.slug&&i?.color&&i.color},p=dt("wp-block-navigation__responsive-container-open",{"always-shown":a}),m=`${t}-modal`,g={className:"wp-block-navigation__responsive-dialog",...o&&{role:"dialog","aria-modal":!0,"aria-label":(0,tt.__)("Menu")}};return(0,Ye.jsxs)(Ye.Fragment,{children:[!o&&(0,Ye.jsxs)(et.Button,{__next40pxDefaultSize:!0,"aria-haspopup":"true","aria-label":l&&(0,tt.__)("Open menu"),className:p,onClick:()=>r(!0),children:[l&&(0,Ye.jsx)(Fg,{icon:c}),!l&&(0,tt.__)("Menu")]}),(0,Ye.jsx)("div",{className:u,style:d,id:m,children:(0,Ye.jsx)("div",{className:"wp-block-navigation__responsive-close",tabIndex:"-1",children:(0,Ye.jsxs)("div",{...g,children:[(0,Ye.jsxs)(et.Button,{__next40pxDefaultSize:!0,className:"wp-block-navigation__responsive-container-close","aria-label":l&&(0,tt.__)("Close menu"),onClick:()=>r(!1),children:[l&&(0,Ye.jsx)(Sg,{icon:Bg}),!l&&(0,tt.__)("Close")]}),(0,Ye.jsx)("div",{className:"wp-block-navigation__responsive-container-content",id:`${m}-content`,children:e})]})})})]})}function Eg({clientId:e,hasCustomPlaceholder:t,orientation:o,templateLock:n}){const{isImmediateParentOfSelectedBlock:r,selectedBlockHasChildren:a,isSelected:i}=(0,gt.useSelect)((t=>{const{getBlockCount:o,hasSelectedInnerBlock:n,getSelectedBlockClientId:r}=t(ot.store),a=r();return{isImmediateParentOfSelectedBlock:n(e,!1),selectedBlockHasChildren:!!o(a),isSelected:a===e}}),[e]),[s,l,c]=(0,mt.useEntityBlockEditor)("postType","wp_navigation"),u=i||r&&!a,d=(0,_t.useMemo)((()=>(0,Ye.jsx)(Dg,{})),[]),p=!t&&!!!s?.length&&!i,m=(0,ot.useInnerBlocksProps)({className:"wp-block-navigation__container"},{value:s,onInput:l,onChange:c,prioritizedInserterBlocks:Ng,defaultBlock:Tg,directInsert:!0,orientation:o,templateLock:n,renderAppender:!!(i||r&&!a||u)&&ot.InnerBlocks.ButtonBlockAppender,placeholder:p?d:void 0,__experimentalCaptureToolbars:!0,__unstableDisableLayoutClassNames:!0});return(0,Ye.jsx)("div",{...m})}function Og(){const[e,t]=(0,mt.useEntityProp)("postType","wp_navigation","title");return(0,Ye.jsx)(et.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,tt.__)("Menu name"),value:e,onChange:t})}const $g=(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(!$g(e[n],t[n],o))return!1}return!0}return!1},Gg={};function Ug({blocks:e,createNavigationMenu:t,hasSelection:o}){const n=(0,_t.useRef)();(0,_t.useEffect)((()=>{n?.current||(n.current=e)}),[e]);const r=function(e,t){return!$g(e,t,((e,t)=>{if("core/page-list"===t?.name&&"innerBlocks"===e)return!0}))}(n?.current,e),a=(0,_t.useContext)(et.Disabled.Context),i=(0,ot.useInnerBlocksProps)({className:"wp-block-navigation__container"},{renderAppender:!!o&&void 0,defaultBlock:Tg,directInsert:!0}),{isSaving:s,hasResolvedAllNavigationMenus:l}=(0,gt.useSelect)((e=>{if(a)return Gg;const{hasFinishedResolution:t,isSavingEntityRecord:o}=e(mt.store);return{isSaving:o("postType","wp_navigation"),hasResolvedAllNavigationMenus:t("getEntityRecords",Pg)}}),[a]);(0,_t.useEffect)((()=>{!a&&!s&&l&&o&&r&&t(null,e)}),[e,t,a,s,l,r,o]);const c=s?et.Disabled:"div";return(0,Ye.jsx)(c,{...i})}function qg({onDelete:e}){const[t,o]=(0,_t.useState)(!1),n=(0,mt.useEntityId)("postType","wp_navigation"),{deleteEntityRecord:r}=(0,gt.useDispatch)(mt.store);return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(et.Button,{__next40pxDefaultSize:!0,className:"wp-block-navigation-delete-menu-button",variant:"secondary",isDestructive:!0,onClick:()=>{o(!0)},children:(0,tt.__)("Delete menu")}),t&&(0,Ye.jsx)(et.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{r("postType","wp_navigation",n,{force:!0}),e()},onCancel:()=>{o(!1)},confirmButtonText:(0,tt.__)("Delete"),size:"medium",children:(0,tt.__)("Are you sure you want to delete this Navigation Menu?")})]})}const Wg=function({name:e,message:t=""}={}){const o=(0,_t.useRef)(),{createWarningNotice:n,removeNotice:r}=(0,gt.useDispatch)(Pt.store);return[(0,_t.useCallback)((r=>{o.current||(o.current=e,n(r||t,{id:o.current,type:"snackbar"}))}),[o,n,t,e]),(0,_t.useCallback)((()=>{o.current&&(r(o.current),o.current=null)}),[o,r])]};function Zg({setAttributes:e,hasIcon:t,icon:o}){return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show icon button"),help:(0,tt.__)("Configure the visual appearance of the button that toggles the overlay menu."),onChange:t=>e({hasIcon:t}),checked:t}),(0,Ye.jsxs)(et.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"wp-block-navigation__overlay-menu-icon-toggle-group",label:(0,tt.__)("Icon"),value:o,onChange:t=>e({icon:t}),isBlock:!0,children:[(0,Ye.jsx)(et.__experimentalToggleGroupControlOption,{value:"handle","aria-label":(0,tt.__)("handle"),label:(0,Ye.jsx)(Fg,{icon:"handle"})}),(0,Ye.jsx)(et.__experimentalToggleGroupControlOption,{value:"menu","aria-label":(0,tt.__)("menu"),label:(0,Ye.jsx)(Fg,{icon:"menu"})})]})]})}function Qg(e){if(!e)return null;const t=Kg(function(e,t="id",o="parent"){const n=Object.create(null),r=[];for(const a of e)n[a[t]]={...a,children:[]},a[o]?(n[a[o]]=n[a[o]]||{},n[a[o]].children=n[a[o]].children||[],n[a[o]].children.push(n[a[t]])):r.push(n[a[t]]);return r}(e));return(0,ws.applyFilters)("blocks.navigation.__unstableMenuItemsToBlocks",t,e)}function Kg(e,t=0){let o={};const n=[...e].sort(((e,t)=>e.menu_order-t.menu_order)),r=n.map((e=>{if("block"===e.type){const[t]=(0,Qe.parse)(e.content.raw);return t||(0,Qe.createBlock)("core/freeform",{content:e.content})}const n=e.children?.length?"core/navigation-submenu":"core/navigation-link",r=function({title:e,xfn:t,classes:o,attr_title:n,object:r,object_id:a,description:i,url:s,type:l,target:c},u,d){r&&"post_tag"===r&&(r="tag");return{label:e?.rendered||"",...r?.length&&{type:r},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},...a&&"custom"!==r&&{id:a},...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:a=[],mapping:i={}}=e.children?.length?Kg(e.children,t+1):{};o={...o,...i};const s=(0,Qe.createBlock)(n,r,a);return o[e.id]=s.clientId,s}));return{innerBlocks:r,mapping:o}}const Yg="success",Jg="error",Xg="pending";let eh=null;const th=function(e,{throwOnError:t=!1}={}){const o=(0,gt.useRegistry)(),{editEntityRecord:n}=(0,gt.useDispatch)(mt.store),[r,a]=(0,_t.useState)("idle"),[i,s]=(0,_t.useState)(null),l=(0,_t.useCallback)((async(t,r,a="publish")=>{let i,s;try{s=await o.resolveSelect(mt.store).getMenuItems({menus:t,per_page:-1,context:"view"})}catch(e){throw new Error((0,tt.sprintf)((0,tt.__)('Unable to fetch classic menu "%s" from API.'),r),{cause:e})}if(null===s)throw new Error((0,tt.sprintf)((0,tt.__)('Unable to fetch classic menu "%s" from API.'),r));const{innerBlocks:l}=Qg(s);try{i=await e(r,l,a),await n("postType","wp_navigation",i.id,{status:"publish"},{throwOnError:!0})}catch(e){throw new Error((0,tt.sprintf)((0,tt.__)('Unable to create Navigation Menu "%s".'),r),{cause:e})}return i}),[e,n,o]);return{convert:(0,_t.useCallback)((async(e,o,n)=>{if(eh!==e)return eh=e,e&&o?(a(Xg),s(null),await l(e,o,n).then((e=>(a(Yg),eh=null,e))).catch((e=>{if(s(e?.message),a(Jg),eh=null,t)throw new Error((0,tt.sprintf)((0,tt.__)('Unable to create Navigation Menu "%s".'),o),{cause:e})}))):(s("Unable to convert menu. Missing menu details."),void a(Jg))}),[l,t]),status:r,error:i}};function oh(e,t){return e&&t?e+"//"+t:null}const nh=["postType","wp_navigation",{status:"draft",per_page:-1}],rh=["postType","wp_navigation",{per_page:-1,status:"publish"}];function ah(e){const t=(0,_t.useContext)(et.Disabled.Context),o=function(e){return(0,gt.useSelect)((t=>{if(!e)return;const{getBlock:o,getBlockParentsByBlockName:n}=t(ot.store),r=n(e,"core/template-part",!0);if(!r?.length)return;const a=t("core/editor").__experimentalGetDefaultTemplatePartAreas(),{getCurrentTheme:i,getEditedEntityRecord:s}=t(mt.store);for(const e of r){const t=o(e),{theme:n=i()?.stylesheet,slug:r}=t.attributes,l=s("postType","wp_template_part",oh(n,r));if(l?.area)return a.find((e=>"uncategorized"!==e.area&&e.area===l.area))?.label}}),[e])}(t?void 0:e),n=(0,gt.useRegistry)();return(0,_t.useCallback)((async()=>{if(t)return"";const{getEntityRecords:e}=n.resolveSelect(mt.store),[r,a]=await Promise.all([e(...nh),e(...rh)]),i=o?(0,tt.sprintf)((0,tt.__)("%s navigation"),o):(0,tt.__)("Navigation"),s=[...r,...a].reduce(((e,t)=>t?.title?.raw?.startsWith(i)?e+1:e),0);return(s>0?`${i} ${s+1}`:i)||""}),[t,o,n])}const ih="success",sh="error",lh="pending",ch="idle";const uh=[];function dh(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function ph(e,t,o){if(!e)return;t(dh(e).color);let n=e,r=dh(n).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,r=dh(n).backgroundColor;o(r)}function mh(e,t){const{textColor:o,customTextColor:n,backgroundColor:r,customBackgroundColor:a,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:a?d.customBackgroundColor=a:r?d.backgroundColor=r:u?.color?.background&&(d.customTextColor=u.color.background),d}function gh(e){return{className:dt("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 hh=({className:e="",disabled:t,isMenuItem:o=!1})=>{let n=et.Button;return o&&(n=et.MenuItem),(0,Ye.jsx)(n,{variant:"link",disabled:t,className:e,href:(0,pt.addQueryArgs)("edit.php",{post_type:"wp_navigation"}),children:(0,tt.__)("Manage menus")})};const xh=function({onCreateNew:e,isNotice:t=!1}){const o=(0,_t.createInterpolateElement)((0,tt.__)("Navigation Menu has been deleted or is unavailable. "),{button:(0,Ye.jsx)(et.Button,{__next40pxDefaultSize:!0,onClick:e,variant:"link"})});return t?(0,Ye.jsx)(et.Notice,{status:"warning",isDismissible:!1,children:o}):(0,Ye.jsx)(ot.Warning,{children:o})},_h=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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"})}),bh=(0,Ye.jsx)(Ke.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ye.jsx)(Ke.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),yh=(0,Ye.jsx)(Ke.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ye.jsx)(Ke.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),fh={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},vh=["core/navigation-link","core/navigation-submenu"];function kh({block:e,onClose:t,expandedState:o,expand:n,setInsertedBlock:r}){const{insertBlock:a,replaceBlock:i,replaceInnerBlocks:s}=(0,gt.useDispatch)(ot.store),l=e.clientId,c=!vh.includes(e.name);return(0,Ye.jsx)(et.MenuItem,{icon:_h,disabled:c,onClick:()=>{const c=(0,Qe.createBlock)("core/navigation-link");if("core/navigation-submenu"===e.name)a(c,e.innerBlocks.length,l,false);else{const t=(0,Qe.createBlock)("core/navigation-submenu",e.attributes,e.innerBlocks);i(l,t),s(t.clientId,[c],false)}r(c),o[e.clientId]||n(e.clientId),t()},children:(0,tt.__)("Add submenu link")})}function wh(e){const{block:t}=e,{clientId:o}=t,{moveBlocksDown:n,moveBlocksUp:r,removeBlocks:a}=(0,gt.useDispatch)(ot.store),i=(0,tt.sprintf)((0,tt.__)("Remove %s"),(0,ot.BlockTitle)({clientId:o,maximumLength:25})),s=(0,gt.useSelect)((e=>{const{getBlockRootClientId:t}=e(ot.store);return t(o)}),[o]);return(0,Ye.jsx)(et.DropdownMenu,{icon:Ag,label:(0,tt.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:fh,noIcons:!0,...e,children:({onClose:l})=>(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsxs)(et.MenuGroup,{children:[(0,Ye.jsx)(et.MenuItem,{icon:bh,onClick:()=>{r([o],s),l()},children:(0,tt.__)("Move up")}),(0,Ye.jsx)(et.MenuItem,{icon:yh,onClick:()=>{n([o],s),l()},children:(0,tt.__)("Move down")}),(0,Ye.jsx)(kh,{block:t,onClose:l,expanded:!0,expandedState:e.expandedState,expand:e.expand,setInsertedBlock:e.setInsertedBlock})]}),(0,Ye.jsx)(et.MenuGroup,{children:(0,Ye.jsx)(et.MenuItem,{onClick:()=>{a([o],!1),l()},children:i})})]})})}const Ch=window.wp.escapeHtml,jh=(e={},t,o={})=>{const{label:n="",kind:r="",type:a=""}=o,{title:i="",url:s="",opensInNewTab:l,id:c,kind:u=r,type:d=a}=e,p=i.replace(/http(s?):\/\//gi,""),m=s.replace(/http(s?):\/\//gi,""),g=i&&i!==n&&p!==m?(0,Ch.escapeHTML)(i):n||(0,Ch.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,pt.safeDecodeURI)(s))},...g&&{label:g},...void 0!==l&&{opensInNewTab:l},...c&&Number.isInteger(c)&&{id:c},..._&&{kind:_},...h&&"URL"!==h&&{type:h}})},Sh=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})}),Bh=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})}),Th=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),{PrivateQuickInserter:Nh}=Ht(ot.privateApis);function Ih(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 Ph({clientId:e,onBack:t,onSelectBlock:o}){const{rootBlockClientId:n}=(0,gt.useSelect)((t=>{const{getBlockRootClientId:o}=t(ot.store);return{rootBlockClientId:o(e)}}),[e]),r=(0,Ut.useFocusOnMount)("firstElement"),a=(0,Ut.useInstanceId)(ot.__experimentalLinkControl,"link-ui-block-inserter__title"),i=(0,Ut.useInstanceId)(ot.__experimentalLinkControl,"link-ui-block-inserter__description");return e?(0,Ye.jsxs)("div",{className:"link-ui-block-inserter",role:"dialog","aria-labelledby":a,"aria-describedby":i,ref:r,children:[(0,Ye.jsxs)(et.VisuallyHidden,{children:[(0,Ye.jsx)("h2",{id:a,children:(0,tt.__)("Add block")}),(0,Ye.jsx)("p",{id:i,children:(0,tt.__)("Choose a block to add to your Navigation.")})]}),(0,Ye.jsx)(et.Button,{className:"link-ui-block-inserter__back",icon:(0,tt.isRTL)()?Sh:Bh,onClick:e=>{e.preventDefault(),t()},size:"small",children:(0,tt.__)("Back")}),(0,Ye.jsx)(Nh,{rootClientId:n,clientId:e,isAppender:!1,prioritizePatterns:!1,selectBlockOnInsert:!0,hasSearch:!1,onSelect:o})]}):null}const Mh=(0,_t.forwardRef)((function(e,t){const{label:o,url:n,opensInNewTab:r,type:a,kind:i}=e.link,s=a||"page",[l,c]=(0,_t.useState)(!1),[u,d]=(0,_t.useState)(!1),{saveEntityRecord:p}=(0,gt.useDispatch)(mt.store),m=(0,mt.useResourcePermissions)({kind:"postType",name:s}),g=(0,_t.useMemo)((()=>({url:n,opensInNewTab:r,title:o&&(0,uc.__unstableStripHTML)(o)})),[o,r,n]),h=(0,Ut.useInstanceId)(Mh,"link-ui-link-control__title"),x=(0,Ut.useInstanceId)(Mh,"link-ui-link-control__description"),{onClose:_}=e;return(0,Ye.jsxs)(et.Popover,{ref:t,placement:"bottom",onClose:e.onClose,anchor:e.anchor,shift:!0,children:[!l&&(0,Ye.jsxs)("div",{role:"dialog","aria-labelledby":h,"aria-describedby":x,children:[(0,Ye.jsxs)(et.VisuallyHidden,{children:[(0,Ye.jsx)("h2",{id:h,children:(0,tt.__)("Add link")}),(0,Ye.jsx)("p",{id:x,children:(0,tt.__)("Search for and add a link to your Navigation.")})]}),(0,Ye.jsx)(ot.__experimentalLinkControl,{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,Xo.decodeEntities)(t.title.rendered),url:t.link,kind:"post-type"}},createSuggestionButtonText:e=>{let t;return t="post"===a?(0,tt.__)("Create draft post: %s"):(0,tt.__)("Create draft page: %s"),(0,_t.createInterpolateElement)((0,tt.sprintf)(t,e),{mark:(0,Ye.jsx)("mark",{})})},noDirectEntry:!!a,noURLSuggestion:!!a,suggestionsQuery:Ih(a,i),onChange:e.onChange,onRemove:e.onRemove,onCancel:e.onCancel,renderControlBottom:()=>!g?.url?.length&&(0,Ye.jsx)(zh,{focusAddBlockButton:u,setAddingBlock:()=>{c(!0),d(!1)}})})]}),l&&(0,Ye.jsx)(Ph,{clientId:e.clientId,onBack:()=>{c(!1),d(!0)},onSelectBlock:_})]})})),zh=({setAddingBlock:e,focusAddBlockButton:t})=>{const o=(0,_t.useRef)();return(0,_t.useEffect)((()=>{t&&o.current?.focus()}),[t]),(0,Ye.jsx)(et.__experimentalVStack,{className:"link-ui-tools",children:(0,Ye.jsx)(et.Button,{__next40pxDefaultSize:!0,ref:o,icon:Th,onClick:t=>{t.preventDefault(),e(!0)},"aria-haspopup":"listbox",children:(0,tt.__)("Add block")})})},Dh=(0,tt.__)("Switch to '%s'"),Ah=["core/navigation-link","core/navigation-submenu"],{PrivateListView:Rh}=Ht(ot.privateApis);function Hh({block:e,insertedBlock:t,setInsertedBlock:o}){const{updateBlockAttributes:n}=(0,gt.useDispatch)(ot.store),r=Ah?.includes(t?.name),a=t?.clientId===e.clientId;if(!(r&&a))return null;return(0,Ye.jsx)(Mh,{clientId:t?.clientId,link:t?.attributes,onClose:()=>{o(null)},onChange:e=>{var r;jh(e,(r=t?.clientId,e=>{r&&n(r,e)}),t?.attributes),o(null)},onCancel:()=>{o(null)}})}const Lh=({clientId:e,currentMenuId:t,isLoading:o,isNavigationMenuMissing:n,onCreateNew:r})=>{const a=(0,gt.useSelect)((t=>!!t(ot.store).getBlockCount(e)),[e]),{navigationMenu:i}=Mg(t);if(t&&n)return(0,Ye.jsx)(xh,{onCreateNew:r,isNotice:!0});if(o)return(0,Ye.jsx)(et.Spinner,{});const s=i?(0,tt.sprintf)((0,tt.__)("Structure for Navigation Menu: %s"),i?.title||(0,tt.__)("Untitled menu")):(0,tt.__)("You have not yet created any menus. Displaying a list of your Pages");return(0,Ye.jsxs)("div",{className:"wp-block-navigation__menu-inspector-controls",children:[!a&&(0,Ye.jsx)("p",{className:"wp-block-navigation__menu-inspector-controls__empty-message",children:(0,tt.__)("This Navigation Menu is empty.")}),(0,Ye.jsx)(Rh,{rootClientId:e,isExpanded:!0,description:s,showAppender:!0,blockSettingsMenu:wh,additionalBlockContent:Hh})]})},Fh=e=>{const{createNavigationMenuIsSuccess:t,createNavigationMenuIsError:o,currentMenuId:n=null,onCreateNew:r,onSelectClassicMenu:a,onSelectNavigationMenu:i,isManageMenusButtonDisabled:s,blockEditingMode:l}=e;return(0,Ye.jsx)(ot.InspectorControls,{group:"list",children:(0,Ye.jsxs)(et.PanelBody,{title:null,children:[(0,Ye.jsxs)(et.__experimentalHStack,{className:"wp-block-navigation-off-canvas-editor__header",children:[(0,Ye.jsx)(et.__experimentalHeading,{className:"wp-block-navigation-off-canvas-editor__title",level:2,children:(0,tt.__)("Menu")}),"default"===l&&(0,Ye.jsx)(Rg,{currentMenuId:n,onSelectClassicMenu:a,onSelectNavigationMenu:i,onCreateNew:r,createNavigationMenuIsSuccess:t,createNavigationMenuIsError:o,actionLabel:Dh,isManageMenusButtonDisabled:s})]}),(0,Ye.jsx)(Lh,{...e})]})})};function Vh({id:e,children:t}){return(0,Ye.jsx)(et.VisuallyHidden,{children:(0,Ye.jsx)("div",{id:e,className:"wp-block-navigation__description",children:t})})}function Eh({id:e}){const[t]=(0,mt.useEntityProp)("postType","wp_navigation","title"),o=(0,tt.sprintf)((0,tt.__)('Navigation Menu: "%s"'),t);return(0,Ye.jsx)(Vh,{id:e,children:o})}function Oh({textColor:e,setTextColor:t,backgroundColor:o,setBackgroundColor:n,overlayTextColor:r,setOverlayTextColor:a,overlayBackgroundColor:i,setOverlayBackgroundColor:s,clientId:l,navRef:c}){const[u,d]=(0,_t.useState)(),[p,m]=(0,_t.useState)(),[g,h]=(0,_t.useState)(),[x,_]=(0,_t.useState)(),b="web"===_t.Platform.OS;(0,_t.useEffect)((()=>{if(!b)return;ph(c.current,m,d);const e=c.current?.querySelector('[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]');e&&(r.color||i.color)&&ph(e,_,h)}),[b,r.color,i.color,c]);const y=(0,ot.__experimentalUseMultipleOriginColorsAndGradients)();return y.hasColorsOrGradients?(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:e.color,label:(0,tt.__)("Text"),onColorChange:t,resetAllFilter:()=>t()},{colorValue:o.color,label:(0,tt.__)("Background"),onColorChange:n,resetAllFilter:()=>n()},{colorValue:r.color,label:(0,tt.__)("Submenu & overlay text"),onColorChange:a,resetAllFilter:()=>a()},{colorValue:i.color,label:(0,tt.__)("Submenu & overlay background"),onColorChange:s,resetAllFilter:()=>s()}],panelId:l,...y,gradients:[],disableCustomGradients:!0}),b&&(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.ContrastChecker,{backgroundColor:u,textColor:p}),(0,Ye.jsx)(ot.ContrastChecker,{backgroundColor:g,textColor:x})]})]}):null}const $h=(0,ot.withColors)({textColor:"color"},{backgroundColor:"color"},{overlayBackgroundColor:"color"},{overlayTextColor:"color"})((function({attributes:e,setAttributes:t,clientId:o,isSelected:n,className:r,backgroundColor:a,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,_t.useCallback)((e=>{t({ref:e})}),[t]),B=`navigationMenu/${j}`,T=(0,ot.useHasRecursion)(B),N=(0,ot.useBlockEditingMode)(),{menus:I}=zg(),[P,M]=Wg({name:"block-library/core/navigation/status"}),[z,D]=Wg({name:"block-library/core/navigation/classic-menu-conversion"}),[A,R]=Wg({name:"block-library/core/navigation/permissions/update"}),{create:H,status:L,error:F,value:V,isPending:E,isSuccess:O,isError:$}=function(e){const[t,o]=(0,_t.useState)(ch),[n,r]=(0,_t.useState)(null),[a,i]=(0,_t.useState)(null),{saveEntityRecord:s,editEntityRecord:l}=(0,gt.useDispatch)(mt.store),c=ah(e),u=(0,_t.useCallback)((async(e=null,t=[],n)=>{if(e&&"string"!=typeof e)throw i("Invalid title supplied when creating Navigation Menu."),o(sh),new Error("Value of supplied title argument was not a string.");o(lh),r(null),i(null),e||(e=await c().catch((e=>{throw i(e?.message),o(sh),new Error("Failed to create title when saving new Navigation Menu.",{cause:e})})));const a={title:e,content:(0,Qe.serialize)(t),status:n};return s("postType","wp_navigation",a).then((e=>(r(e),o(ih),"publish"!==n&&l("postType","wp_navigation",e.id,{status:"publish"}),e))).catch((e=>{throw i(e?.message),o(sh),new Error("Unable to save new Navigation Menu",{cause:e})}))}),[s,l,c]);return{create:u,status:t,value:n,error:a,isIdle:t===ch,isPending:t===lh,isSuccess:t===ih,isError:t===sh}}(o),G=async()=>{await H("")},{hasUncontrolledInnerBlocks:U,uncontrolledInnerBlocks:q,isInnerBlockSelected:W,innerBlocks:Z}=function(e){return(0,gt.useSelect)((t=>{const{getBlock:o,getBlocks:n,hasSelectedInnerBlock:r}=t(ot.store),a=o(e).innerBlocks,i=!!a?.length,s=i?uh:n(e);return{innerBlocks:i?a:s,hasUncontrolledInnerBlocks:i,uncontrolledInnerBlocks:a,controlledInnerBlocks:s,isInnerBlockSelected:r(e,!0)}}),[e])}(o),Q=!!Z.find((e=>"core/navigation-submenu"===e.name)),{replaceInnerBlocks:K,selectBlock:Y,__unstableMarkNextChangeAsNotPersistent:J}=(0,gt.useDispatch)(ot.store),X=(0,_t.useRef)(),[ee,te]=function(e){const[t,o]=(0,_t.useState)(!1);return(0,_t.useEffect)((()=>{if(!e.current)return;const o=e.current.ownerDocument.documentElement;return t?o.classList.add("has-modal-open"):o.classList.remove("has-modal-open"),()=>{o?.classList.remove("has-modal-open")}}),[e,t]),[t,o]}(X),[oe,ne]=(0,_t.useState)(!1),{hasResolvedNavigationMenus:re,isNavigationMenuResolved:ae,isNavigationMenuMissing:ie,canUserUpdateNavigationMenu:se,hasResolvedCanUserUpdateNavigationMenu:le,canUserDeleteNavigationMenu:ce,hasResolvedCanUserDeleteNavigationMenu:ue,canUserCreateNavigationMenus:de,isResolvingCanUserCreateNavigationMenus:pe,hasResolvedCanUserCreateNavigationMenus:me}=Mg(j),ge=re&&ie,{convert:he,status:xe,error:_e}=th(H),be=xe===Xg,ye=(0,_t.useCallback)(((e,t={focusNavigationBlock:!1})=>{const{focusNavigationBlock:n}=t;S(e),n&&Y(o)}),[Y,o,S]),fe=!ie&&ae,ve=U&&!fe,{getNavigationFallbackId:ke}=Ht((0,gt.useSelect)(mt.store)),we=j||ve?null:ke();(0,_t.useEffect)((()=>{j||ve||!we||(J(),S(we))}),[j,S,ve,we,J]);const Ce="nav",je=!j&&!E&&!be&&re&&0===I?.length&&!U,Se=!re||E||be||!(!j||fe||be),Be=e.style?.typography?.textDecoration,Te=(0,gt.useSelect)((e=>e(ot.store).__unstableHasActiveBlockOverlayActive(o)),[o]),Ne="never"!==_,Ie=(0,ot.useBlockProps)({ref:X,className:dt(r,{"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,ot.getColorClassName)("color",s?.slug)]:!!s?.slug,"has-background":!!a.color||a.class,[(0,ot.getColorClassName)("background-color",a?.slug)]:!!a?.slug,[`has-text-decoration-${Be}`]:Be,"block-editor-block-content-overlay":Te},h),style:{color:!s?.slug&&s?.color,backgroundColor:!a?.slug&&a?.color}}),Pe=async e=>he(e.id,e.name,"draft"),Me=e=>{ye(e)};(0,_t.useEffect)((()=>{M(),E&&(0,jg.speak)((0,tt.__)("Creating Navigation Menu.")),O&&(ye(V?.id,{focusNavigationBlock:!0}),P((0,tt.__)("Navigation Menu successfully created."))),$&&P((0,tt.__)("Failed to create Navigation Menu."))}),[L,F,V?.id,$,O,E,ye,M,P]),(0,_t.useEffect)((()=>{D(),xe===Xg&&(0,jg.speak)((0,tt.__)("Classic menu importing.")),xe===Yg&&(z((0,tt.__)("Classic menu imported successfully.")),ye(V?.id,{focusNavigationBlock:!0})),xe===Jg&&z((0,tt.__)("Classic menu import failed."))}),[xe,_e,D,z,V?.id,ye]),(0,_t.useEffect)((()=>{n||W||R(),(n||W)&&(j&&!ge&&le&&!se&&A((0,tt.__)("You do not have permission to edit this Menu. Any changes made will not be saved.")),j||!me||de||A((0,tt.__)("You do not have permission to create Navigation Menus.")))}),[n,W,se,le,de,me,j,R,A,ge]);const ze=de||se,De=dt("wp-block-navigation__overlay-menu-preview",{open:oe}),Ae=b||x?"":(0,tt.__)('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,_t.useRef)(!0);(0,_t.useEffect)((()=>{!Re.current&&Ae&&(0,jg.speak)(Ae),Re.current=!1}),[Ae]);const He=(0,Ut.useInstanceId)(Zg,"overlay-menu-preview"),Le=(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.InspectorControls,{children:m&&(0,Ye.jsxs)(et.PanelBody,{title:(0,tt.__)("Display"),children:[Ne&&(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsxs)(et.Button,{__next40pxDefaultSize:!0,className:De,onClick:()=>{ne(!oe)},"aria-label":(0,tt.__)("Overlay menu controls"),"aria-controls":He,"aria-expanded":oe,children:[w&&(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(Fg,{icon:C}),(0,Ye.jsx)(Sg,{icon:Bg})]}),!w&&(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)("span",{children:(0,tt.__)("Menu")}),(0,Ye.jsx)("span",{children:(0,tt.__)("Close")})]})]}),(0,Ye.jsx)("div",{id:He,children:oe&&(0,Ye.jsx)(Zg,{setAttributes:t,hasIcon:w,icon:C,hidden:!oe})})]}),(0,Ye.jsxs)(et.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,tt.__)("Overlay Menu"),"aria-label":(0,tt.__)("Configure overlay menu"),value:_,help:(0,tt.__)("Collapses the navigation options in a menu icon opening an overlay."),onChange:e=>t({overlayMenu:e}),isBlock:!0,children:[(0,Ye.jsx)(et.__experimentalToggleGroupControlOption,{value:"never",label:(0,tt.__)("Off")}),(0,Ye.jsx)(et.__experimentalToggleGroupControlOption,{value:"mobile",label:(0,tt.__)("Mobile")}),(0,Ye.jsx)(et.__experimentalToggleGroupControlOption,{value:"always",label:(0,tt.__)("Always")})]}),Q&&(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)("h3",{children:(0,tt.__)("Submenus")}),(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,checked:x,onChange:e=>{t({openSubmenusOnClick:e,...e&&{showSubmenuIcon:!0}})},label:(0,tt.__)("Open on click")}),(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,checked:b,onChange:e=>{t({showSubmenuIcon:e})},disabled:e.openSubmenusOnClick,label:(0,tt.__)("Show arrow")}),Ae&&(0,Ye.jsx)("div",{children:(0,Ye.jsx)(et.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:Ae})})]})]})}),(0,Ye.jsx)(ot.InspectorControls,{group:"color",children:(0,Ye.jsx)(Oh,{textColor:s,setTextColor:l,backgroundColor:a,setBackgroundColor:i,overlayTextColor:d,setOverlayTextColor:p,overlayBackgroundColor:c,setOverlayBackgroundColor:u,clientId:o,navRef:X})})]}),Fe=`${o}-desc`,Ve="always"===_,Ee=!ze||!re;if(ve&&!E)return(0,Ye.jsxs)(Ce,{...Ie,"aria-describedby":je?void 0:Fe,children:[(0,Ye.jsx)(Vh,{id:Fe,children:(0,tt.__)("Unsaved Navigation Menu.")}),(0,Ye.jsx)(Fh,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:$,currentMenuId:j,isNavigationMenuMissing:ie,isManageMenusButtonDisabled:Ee,onCreateNew:G,onSelectClassicMenu:Pe,onSelectNavigationMenu:Me,isLoading:Se,blockEditingMode:N}),"default"===N&&Le,(0,Ye.jsx)(Vg,{id:o,onToggle:te,isOpen:ee,hasIcon:w,icon:C,isResponsive:Ne,isHiddenByDefault:Ve,overlayBackgroundColor:c,overlayTextColor:d,children:(0,Ye.jsx)(Ug,{createNavigationMenu:H,blocks:q,hasSelection:n||W})})]});if(j&&ie)return(0,Ye.jsxs)(Ce,{...Ie,children:[(0,Ye.jsx)(Fh,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:$,currentMenuId:j,isNavigationMenuMissing:ie,isManageMenusButtonDisabled:Ee,onCreateNew:G,onSelectClassicMenu:Pe,onSelectNavigationMenu:Me,isLoading:Se,blockEditingMode:N}),(0,Ye.jsx)(xh,{onCreateNew:G})]});if(fe&&T)return(0,Ye.jsx)("div",{...Ie,children:(0,Ye.jsx)(ot.Warning,{children:(0,tt.__)("Block cannot be rendered inside itself.")})});const Oe=g||Hg;return je&&g?(0,Ye.jsx)(Ce,{...Ie,children:(0,Ye.jsx)(Oe,{isSelected:n,currentMenuId:j,clientId:o,canUserCreateNavigationMenus:de,isResolvingCanUserCreateNavigationMenus:pe,onSelectNavigationMenu:Me,onSelectClassicMenu:Pe,onCreateEmpty:G})}):(0,Ye.jsx)(mt.EntityProvider,{kind:"postType",type:"wp_navigation",id:j,children:(0,Ye.jsxs)(ot.RecursionProvider,{uniqueId:B,children:[(0,Ye.jsx)(Fh,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:$,currentMenuId:j,isNavigationMenuMissing:ie,isManageMenusButtonDisabled:Ee,onCreateNew:G,onSelectClassicMenu:Pe,onSelectNavigationMenu:Me,isLoading:Se,blockEditingMode:N}),"default"===N&&Le,"default"===N&&fe&&(0,Ye.jsxs)(ot.InspectorControls,{group:"advanced",children:[le&&se&&(0,Ye.jsx)(Og,{}),ue&&ce&&(0,Ye.jsx)(qg,{onDelete:()=>{K(o,[]),P((0,tt.__)("Navigation Menu successfully deleted."))}}),(0,Ye.jsx)(hh,{disabled:Ee,className:"wp-block-navigation-manage-menus-button"})]}),(0,Ye.jsxs)(Ce,{...Ie,"aria-describedby":je||Se?void 0:Fe,children:[Se&&!Ve&&(0,Ye.jsx)("div",{className:"wp-block-navigation__loading-indicator-container",children:(0,Ye.jsx)(et.Spinner,{className:"wp-block-navigation__loading-indicator"})}),(!Se||Ve)&&(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(Eh,{id:Fe}),(0,Ye.jsx)(Vg,{id:o,onToggle:te,hasIcon:w,icon:C,isOpen:ee,isResponsive:Ne,isHiddenByDefault:Ve,overlayBackgroundColor:c,overlayTextColor:d,children:fe&&(0,Ye.jsx)(Eg,{clientId:o,hasCustomPlaceholder:!!g,templateLock:y,orientation:v})})]})]})]})})}));const Gh={fontStyle:"var:preset|font-style|",fontWeight:"var:preset|font-weight|",textDecoration:"var:preset|text-decoration|",textTransform:"var:preset|text-transform|"},Uh=({navigationMenuId:e,...t})=>({...t,ref:e}),qh=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},Wh={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,Ye.jsx)(ot.InnerBlocks.Content,{}),isEligible:({navigationMenuId:e})=>!!e,migrate:Uh},Zh={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,Ye.jsx)(ot.InnerBlocks.Content,{}),isEligible:({itemsJustification:e,orientation:t})=>!!e||!!t,migrate:(0,Ut.compose)(Uh,qh)},Qh={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,Ye.jsx)(ot.InnerBlocks.Content,{}),migrate:(0,Ut.compose)(Uh,qh,so),isEligible:({style:e})=>e?.typography?.fontFamily},Kh=[Wh,Zh,Qh,{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)(Uh,qh,so,(function(e){return delete e.isResponsive,{...e,overlayMenu:"mobile"}})),save:()=>(0,Ye.jsx)(ot.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,Ye.jsx)(ot.InnerBlocks.Content,{}),isEligible(e){if(!e.style||!e.style.typography)return!1;for(const t in Gh){const o=e.style.typography[t];if(o&&o.startsWith(Gh[t]))return!0}return!1},migrate:(0,Ut.compose)(Uh,qh,so,(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=Gh[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)(Uh,(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,Ye.jsx)(ot.InnerBlocks.Content,{})}],Yh=Kh,Jh={$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:Xh}=Jh,ex={icon:Cg,example:{attributes:{overlayMenu:"never"},innerBlocks:[{name:"core/navigation-link",attributes:{label:(0,tt.__)("Home"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,tt.__)("About"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,tt.__)("Contact"),url:"https://make.wordpress.org/"}}]},edit:$h,save:function({attributes:e}){if(!e.ref)return(0,Ye.jsx)(ot.InnerBlocks.Content,{})},deprecated:Yh},tx=()=>Xe({name:Xh,metadata:Jh,settings:ex}),ox={name:"core/navigation-link"};function nx({attributes:e,setAttributes:t,setIsLabelFieldFocused:o}){const{label:n,url:r,description:a,title:i,rel:s}=e;return(0,Ye.jsxs)(et.PanelBody,{title:(0,tt.__)("Settings"),children:[(0,Ye.jsx)(et.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:n?(0,uc.__unstableStripHTML)(n):"",onChange:e=>{t({label:e})},label:(0,tt.__)("Text"),autoComplete:"off",onFocus:()=>o(!0),onBlur:()=>o(!1)}),(0,Ye.jsx)(et.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:r?(0,pt.safeDecodeURI)(r):"",onChange:o=>{jh({url:o},t,e)},label:(0,tt.__)("Link"),autoComplete:"off"}),(0,Ye.jsx)(et.TextareaControl,{__nextHasNoMarginBottom:!0,value:a||"",onChange:e=>{t({description:e})},label:(0,tt.__)("Description"),help:(0,tt.__)("The description will be displayed in the menu if the current theme supports it.")}),(0,Ye.jsx)(et.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:i||"",onChange:e=>{t({title:e})},label:(0,tt.__)("Title attribute"),autoComplete:"off",help:(0,tt.__)("Additional information to help clarify the purpose of the link.")}),(0,Ye.jsx)(et.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:s||"",onChange:e=>{t({rel:e})},label:(0,tt.__)("Rel attribute"),autoComplete:"off",help:(0,tt.__)("The relationship of the linked URL as space-separated link types.")})]})}const rx=(0,Ye.jsxs)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Ye.jsx)(Ke.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,Ye.jsx)(Ke.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"})]}),ax=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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"})}),ix=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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 sx(e){switch(e){case"post":return hp;case"page":return rx;case"tag":return ax;case"category":return Jo;default:return ix}}function lx(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:sx(e.name)},...!e.isActive&&{isActive:t}})));return{...e,variations:o}}return e}const cx={from:[{type:"block",blocks:["core/site-logo"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/spacer"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/home-link"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/search"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/page-list"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/buttons"],transform:()=>(0,Qe.createBlock)("core/navigation-link")}],to:[{type:"block",blocks:["core/navigation-submenu"],transform:(e,t)=>(0,Qe.createBlock)("core/navigation-submenu",e,t)},{type:"block",blocks:["core/spacer"],transform:()=>(0,Qe.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],transform:()=>(0,Qe.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],transform:()=>(0,Qe.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,Qe.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],transform:()=>(0,Qe.createBlock)("core/search",{showLabel:!1,buttonUseIcon:!0,buttonPosition:"button-inside"})},{type:"block",blocks:["core/page-list"],transform:()=>(0,Qe.createBlock)("core/page-list")},{type:"block",blocks:["core/buttons"],transform:({label:e,url:t,rel:o,title:n,opensInNewTab:r})=>(0,Qe.createBlock)("core/buttons",{},[(0,Qe.createBlock)("core/button",{text:e,url:t,rel:o,title:n,linkTarget:r?"_blank":void 0})])}]},ux=cx,dx={$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:px}=dx,mx={icon:ou,__experimentalLabel:({label:e})=>e,merge:(e,{label:t=""})=>({...e,label:e.label+t}),edit:function({attributes:e,isSelected:t,setAttributes:o,insertBlocksAfter:n,mergeBlocks:r,onReplace:a,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,r=Number.isInteger(o),a=(0,gt.useSelect)((e=>{if(!n)return null;const{getEntityRecord:r}=e(mt.store);return r("postType",t,o)?.status}),[n,t,o]);return[n&&r&&a&&"trash"===a,"draft"===a]})(m,u,l),{maxNestingLevel:x}=i,{replaceBlock:_,__unstableMarkNextChangeAsNotPersistent:b,selectBlock:y,selectPreviousBlock:f}=(0,gt.useDispatch)(ot.store),[v,k]=(0,_t.useState)(t&&!d),[w,C]=(0,_t.useState)(null),[j,S]=(0,_t.useState)(null),B=(0,_t.useRef)(null),T=(e=>{const[t,o]=(0,_t.useState)(!1);return(0,_t.useEffect)((()=>{const{ownerDocument:t}=e.current;function n(e){a(e)}function r(){o(!1)}function a(t){e.current.contains(t.target)?o(!0):o(!1)}return t.addEventListener("dragstart",n),t.addEventListener("dragend",r),t.addEventListener("dragenter",a),()=>{t.removeEventListener("dragstart",n),t.removeEventListener("dragend",r),t.removeEventListener("dragenter",a)}}),[e]),t})(B),N=(0,tt.__)("Add label…"),I=(0,_t.useRef)(),P=(0,_t.useRef)(),M=(0,Ut.usePrevious)(d),[z,D]=(0,_t.useState)(!1),{isAtMaxNesting:A,isTopLevelLink:R,isParentOfSelectedBlock:H,hasChildren:L}=(0,gt.useSelect)((e=>{const{getBlockCount:t,getBlockName:o,getBlockRootClientId:n,hasSelectedInnerBlock:r,getBlockParentsByBlockName:a}=e(ot.store);return{isAtMaxNesting:a(s,["core/navigation-link","core/navigation-submenu"]).length>=x,isTopLevelLink:"core/navigation"===o(n(s)),isParentOfSelectedBlock:r(s,!0),hasChildren:!!t(s)}}),[s,x]),{getBlocks:F}=(0,gt.useSelect)(ot.store),V=()=>{let t=F(s);0===t.length&&(t=[(0,Qe.createBlock)("core/navigation-link")],y(t[0].clientId));const o=(0,Qe.createBlock)("core/navigation-submenu",e,t);_(s,o)};(0,_t.useEffect)((()=>{L&&(b(),V())}),[L]),(0,_t.useEffect)((()=>{!M&&d&&v&&(0,pt.isURL)((0,pt.prependHTTP)(c))&&/^.+\.[a-z]+/.test(c)&&function(){I.current.focus();const{ownerDocument:e}=I.current,{defaultView:t}=e,o=t.getSelection(),n=e.createRange();n.selectNodeContents(I.current),o.removeAllRanges(),o.addRange(n)}()}),[M,d,v,c]);const{textColor:E,customTextColor:O,backgroundColor:$,customBackgroundColor:G}=mh(i,!R),U=(0,ot.useBlockProps)({ref:(0,Ut.useMergeRefs)([S,B]),className:dt("wp-block-navigation-item",{"is-editing":t||H,"is-dragging-within":T,"has-link":!!d,"has-child":L,"has-text-color":!!E||!!O,[(0,ot.getColorClassName)("color",E)]:!!E,"has-background":!!$||G,[(0,ot.getColorClassName)("background-color",$)]:!!$}),style:{color:!E&&O,backgroundColor:!$&&G},onKeyDown:function(e){vo.isKeyboardEvent.primary(e,"k")&&(e.preventDefault(),e.stopPropagation(),k(!0),C(I.current))}}),q=(0,ot.useInnerBlocksProps)({...U,className:"remove-outline"},{defaultBlock:ox,directInsert:!0,renderAppender:!1});(!d||g||h)&&(U.onClick=()=>{k(!0),C(I.current)});const W=dt("wp-block-navigation-item__content",{"wp-block-navigation-link__placeholder":!d||g||h}),Z=function(e){let t="";switch(e){case"post":t=(0,tt.__)("Select post");break;case"page":t=(0,tt.__)("Select page");break;case"category":t=(0,tt.__)("Select category");break;case"tag":t=(0,tt.__)("Select tag");break;default:t=(0,tt.__)("Add link")}return t}(u),Q=`(${g?(0,tt.__)("Invalid"):(0,tt.__)("Draft")})`,K=g||h?(0,tt.__)("This item has been deleted, or is a draft"):(0,tt.__)("This item is missing a link");return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.BlockControls,{children:(0,Ye.jsxs)(et.ToolbarGroup,{children:[(0,Ye.jsx)(et.ToolbarButton,{name:"link",icon:ko,title:(0,tt.__)("Link"),shortcut:vo.displayShortcut.primary("k"),onClick:e=>{k(!0),C(e.currentTarget)}}),!A&&(0,Ye.jsx)(et.ToolbarButton,{name:"submenu",icon:_h,title:(0,tt.__)("Add submenu"),onClick:V})]})}),(0,Ye.jsx)(ot.InspectorControls,{children:(0,Ye.jsx)(nx,{attributes:e,setAttributes:o,setIsLabelFieldFocused:D})}),(0,Ye.jsxs)("div",{...U,children:[(0,Ye.jsxs)("a",{className:W,children:[d?(0,Ye.jsxs)(Ye.Fragment,{children:[!g&&!h&&!z&&(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.RichText,{ref:I,identifier:"label",className:"wp-block-navigation-item__label",value:c,onChange:e=>o({label:e}),onMerge:r,onReplace:a,__unstableOnSplitAtEnd:()=>n((0,Qe.createBlock)("core/navigation-link")),"aria-label":(0,tt.__)("Navigation link text"),placeholder:N,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}),p&&(0,Ye.jsx)("span",{className:"wp-block-navigation-item__description",children:p})]}),(g||h||z)&&(0,Ye.jsx)("div",{className:"wp-block-navigation-link__placeholder-text wp-block-navigation-link__label",children:(0,Ye.jsx)(et.Tooltip,{text:K,children:(0,Ye.jsx)("span",{"aria-label":(0,tt.__)("Navigation link text"),children:`${(0,Xo.decodeEntities)(c)} ${g||h?Q:""}`.trim()})})})]}):(0,Ye.jsx)("div",{className:"wp-block-navigation-link__placeholder-text",children:(0,Ye.jsx)(et.Tooltip,{text:K,children:(0,Ye.jsx)("span",{children:Z})})}),v&&(0,Ye.jsx)(Mh,{ref:P,clientId:s,link:e,onClose:()=>{if(!d)return P.current.contains(window.document.activeElement)&&f(s,!0),void a([]);k(!1),w?(w.focus(),C(null)):I.current?I.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=>{jh(t,o,e)}})]}),(0,Ye.jsx)("div",{...q})]})]})},save:function(){return(0,Ye.jsx)(ot.InnerBlocks.Content,{})},example:{attributes:{label:(0,tt._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,Ye.jsx)(ot.InnerBlocks.Content,{})}],transforms:ux},gx=()=>((0,ws.addFilter)("blocks.registerBlockType","core/navigation-link",lx),Xe({name:px,metadata:dx,settings:mx})),hx=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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"})}),xx=()=>(0,Ye.jsx)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,Ye.jsx)(et.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})}),_x=["core/navigation-link","core/navigation-submenu","core/page-list"],bx={name:"core/navigation-link"};const yx={to:[{type:"block",blocks:["core/navigation-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:e=>(0,Qe.createBlock)("core/navigation-link",e)},{type:"block",blocks:["core/spacer"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Qe.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Qe.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Qe.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Qe.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Qe.createBlock)("core/search")}]},fx=yx,vx={$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:kx}=vx,wx={icon:({context:e})=>"list-view"===e?rx:_h,__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:r,context:a,clientId:i}){const{label:s,url:l,description:c,rel:u,title:d}=e,{showSubmenuIcon:p,maxNestingLevel:m,openSubmenusOnClick:g}=a,{__unstableMarkNextChangeAsNotPersistent:h,replaceBlock:x,selectBlock:_}=(0,gt.useDispatch)(ot.store),[b,y]=(0,_t.useState)(!1),[f,v]=(0,_t.useState)(null),[k,w]=(0,_t.useState)(null),C=(0,_t.useRef)(null),j=(e=>{const[t,o]=(0,_t.useState)(!1);return(0,_t.useEffect)((()=>{const{ownerDocument:t}=e.current;function n(e){a(e)}function r(){o(!1)}function a(t){e.current.contains(t.target)?o(!0):o(!1)}return t.addEventListener("dragstart",n),t.addEventListener("dragend",r),t.addEventListener("dragenter",a),()=>{t.removeEventListener("dragstart",n),t.removeEventListener("dragend",r),t.removeEventListener("dragenter",a)}}),[]),t})(C),S=(0,tt.__)("Add text…"),B=(0,_t.useRef)(),{parentCount:T,isParentOfSelectedBlock:N,isImmediateParentOfSelectedBlock:I,hasChildren:P,selectedBlockHasChildren:M,onlyDescendantIsEmptyLink:z}=(0,gt.useSelect)((e=>{const{hasSelectedInnerBlock:t,getSelectedBlockClientId:o,getBlockParentsByBlockName:n,getBlock:r,getBlockCount:a,getBlockOrder:s}=e(ot.store);let l;const c=s(o());if(1===c?.length){const e=r(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:!!a(i),selectedBlockHasChildren:!!c?.length,onlyDescendantIsEmptyLink:l}}),[i]),D=(0,Ut.usePrevious)(P);(0,_t.useEffect)((()=>{g||l||y(!0)}),[]),(0,_t.useEffect)((()=>{t||y(!1)}),[t]),(0,_t.useEffect)((()=>{b&&l&&(0,pt.isURL)((0,pt.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:A,customTextColor:R,backgroundColor:H,customBackgroundColor:L}=mh(a,T>0),F=(0,ot.useBlockProps)({ref:(0,Ut.useMergeRefs)([w,C]),className:dt("wp-block-navigation-item",{"is-editing":t||N,"is-dragging-within":j,"has-link":!!l,"has-child":P,"has-text-color":!!A||!!R,[(0,ot.getColorClassName)("color",A)]:!!A,"has-background":!!H||L,[(0,ot.getColorClassName)("background-color",H)]:!!H,"open-on-click":g}),style:{color:!A&&R,backgroundColor:!H&&L},onKeyDown:function(e){vo.isKeyboardEvent.primary(e,"k")&&(e.preventDefault(),e.stopPropagation(),y(!0),v(B.current))}}),V=mh(a,!0),E=T>=m?_x.filter((e=>"core/navigation-submenu"!==e)):_x,O=gh(V),$=(0,ot.useInnerBlocksProps)(O,{allowedBlocks:E,defaultBlock:bx,directInsert:!0,__experimentalCaptureToolbars:!0,renderAppender:!!(t||I&&!M||P)&&ot.InnerBlocks.ButtonBlockAppender}),G=g?"button":"a";function U(){const t=(0,Qe.createBlock)("core/navigation-link",e);x(i,t)}(0,_t.useEffect)((()=>{!P&&D&&(h(),U())}),[P,D]);const q=!M||z;return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.BlockControls,{children:(0,Ye.jsxs)(et.ToolbarGroup,{children:[!g&&(0,Ye.jsx)(et.ToolbarButton,{name:"link",icon:ko,title:(0,tt.__)("Link"),shortcut:vo.displayShortcut.primary("k"),onClick:e=>{y(!0),v(e.currentTarget)}}),(0,Ye.jsx)(et.ToolbarButton,{name:"revert",icon:hx,title:(0,tt.__)("Convert to Link"),onClick:U,className:"wp-block-navigation__submenu__revert",disabled:!q})]})}),(0,Ye.jsx)(ot.InspectorControls,{children:(0,Ye.jsxs)(et.PanelBody,{title:(0,tt.__)("Settings"),children:[(0,Ye.jsx)(et.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:s||"",onChange:e=>{o({label:e})},label:(0,tt.__)("Text"),autoComplete:"off"}),(0,Ye.jsx)(et.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:l||"",onChange:e=>{o({url:e})},label:(0,tt.__)("Link"),autoComplete:"off"}),(0,Ye.jsx)(et.TextareaControl,{__nextHasNoMarginBottom:!0,value:c||"",onChange:e=>{o({description:e})},label:(0,tt.__)("Description"),help:(0,tt.__)("The description will be displayed in the menu if the current theme supports it.")}),(0,Ye.jsx)(et.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:d||"",onChange:e=>{o({title:e})},label:(0,tt.__)("Title attribute"),autoComplete:"off",help:(0,tt.__)("Additional information to help clarify the purpose of the link.")}),(0,Ye.jsx)(et.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:u||"",onChange:e=>{o({rel:e})},label:(0,tt.__)("Rel attribute"),autoComplete:"off",help:(0,tt.__)("The relationship of the linked URL as space-separated link types.")})]})}),(0,Ye.jsxs)("div",{...F,children:[(0,Ye.jsxs)(G,{className:"wp-block-navigation-item__content",children:[(0,Ye.jsx)(ot.RichText,{ref:B,identifier:"label",className:"wp-block-navigation-item__label",value:s,onChange:e=>o({label:e}),onMerge:n,onReplace:r,"aria-label":(0,tt.__)("Navigation link text"),placeholder:S,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"],onClick:()=>{g||l||(y(!0),v(B.current))}}),!g&&b&&(0,Ye.jsx)(Mh,{clientId:i,link:e,onClose:()=>{y(!1),f?(f.focus(),v(null)):_(i)},anchor:k,onRemove:()=>{o({url:""}),(0,jg.speak)((0,tt.__)("Link removed."),"assertive")},onChange:t=>{jh(t,o,e)}})]}),(p||g)&&(0,Ye.jsx)("span",{className:"wp-block-navigation__submenu-icon",children:(0,Ye.jsx)(xx,{})}),(0,Ye.jsx)("div",{...$})]})]})},save:function(){return(0,Ye.jsx)(ot.InnerBlocks.Content,{})},transforms:fx},Cx=()=>Xe({name:kx,metadata:vx,settings:wx}),jx=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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 Sx={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/nextpage"===e.dataset.block,transform:()=>(0,Qe.createBlock)("core/nextpage",{})}]},Bx={$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:Tx}=Bx,Nx={icon:jx,example:{},transforms:Sx,edit:function(){return(0,Ye.jsx)("div",{...(0,ot.useBlockProps)(),children:(0,Ye.jsx)("span",{children:(0,tt.__)("Page break")})})},save:function(){return(0,Ye.jsx)(_t.RawHTML,{children:"\x3c!--nextpage--\x3e"})}},Ix=()=>Xe({name:Tx,metadata:Bx,settings:Nx}),Px=new WeakMap;function Mx(){const e=(0,gt.useRegistry)();if(!Px.has(e)){const t=new Map;Px.set(e,zx.bind(null,t))}return Px.get(e)}function zx(e,{name:t,blocks:o}){const n=[...o];for(;n.length;){const o=n.shift();for(const e of null!==(r=o.innerBlocks)&&void 0!==r?r:[]){var r;n.unshift(e)}"core/pattern"===o.name&&Dx(e,t,o.attributes.slug)}}function Dx(e,t,o){if(e.has(t)||e.set(t,new Set),e.get(t).add(o),Ax(e,t))throw new TypeError(`Pattern ${t} has a circular dependency and cannot be rendered.`)}function Ax(e,t,o=new Set,n=new Set){var r;o.add(t),n.add(t);const a=null!==(r=e.get(t))&&void 0!==r?r:new Set;for(const t of a)if(o.has(t)){if(n.has(t))return!0}else if(Ax(e,t,o,n))return!0;return n.delete(t),!1}const Rx=({attributes:e,clientId:t})=>{const o=(0,gt.useRegistry)(),n=(0,gt.useSelect)((t=>t(ot.store).__experimentalGetParsedPattern(e.slug)),[e.slug]),r=(0,gt.useSelect)((e=>e(mt.store).getCurrentTheme()?.stylesheet),[]),{replaceBlocks:a,setBlockEditingMode:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,gt.useDispatch)(ot.store),{getBlockRootClientId:l,getBlockEditingMode:c}=(0,gt.useSelect)(ot.store),[u,d]=(0,_t.useState)(!1),p=Mx();(0,_t.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,Qe.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=r),e)))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=r),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(),a(t,u),s(),i(e,d)}))}))}}),[t,u,n,s,a,c,i,l]);const m=(0,ot.useBlockProps)();return u?(0,Ye.jsx)("div",{...m,children:(0,Ye.jsx)(ot.Warning,{children:(0,tt.sprintf)((0,tt.__)('Pattern "%s" cannot be rendered inside itself.'),n?.name)})}):(0,Ye.jsx)("div",{...m})},Hx={$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:Lx}=Hx,Fx={edit:Rx},Vx=()=>Xe({name:Lx,metadata:Hx,settings:Fx}),Ex=(0,Ye.jsxs)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Ye.jsx)(Ke.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,Ye.jsx)(Ke.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,Ye.jsx)(Ke.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})]});function Ox(e,t){for(const o of e){if(o.attributes.id===t)return o;if(o.innerBlocks&&o.innerBlocks.length){const e=Ox(o.innerBlocks,t);if(e)return e}}return null}function $x(e=[],t=null){let o=function(e=[]){const t={},o=[];return e.forEach((({id:e,title:n,link:r,type:a,parent:i})=>{var s;const l=null!==(s=t[e]?.innerBlocks)&&void 0!==s?s:[];t[e]=(0,Qe.createBlock)("core/navigation-link",{id:e,label:n.rendered,url:r,type:a,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=Ox(o,t);e&&e.innerBlocks&&(o=e.innerBlocks)}const n=e=>{e.forEach(((e,t,o)=>{const{attributes:r,innerBlocks:a}=e;if(0!==a.length){n(a);const e=(0,Qe.createBlock)("core/navigation-submenu",r,a);o[t]=e}}))};return n(o),o}function Gx({clientId:e,pages:t,parentClientId:o,parentPageID:n}){const{replaceBlock:r,selectBlock:a}=(0,gt.useDispatch)(ot.store);return()=>{const i=$x(t,n);r(e,i),a(o)}}const Ux=(0,tt.__)("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 qx({onClick:e,onClose:t,disabled:o}){return(0,Ye.jsxs)(et.Modal,{onRequestClose:t,title:(0,tt.__)("Edit Page List"),className:"wp-block-page-list-modal",aria:{describedby:(0,Ut.useInstanceId)(qx,"wp-block-page-list-modal__description")},children:[(0,Ye.jsx)("p",{id:(0,Ut.useInstanceId)(qx,"wp-block-page-list-modal__description"),children:Ux}),(0,Ye.jsxs)("div",{className:"wp-block-page-list-modal-buttons",children:[(0,Ye.jsx)(et.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,tt.__)("Cancel")}),(0,Ye.jsx)(et.Button,{__next40pxDefaultSize:!0,variant:"primary",accessibleWhenDisabled:!0,disabled:o,onClick:e,children:(0,tt.__)("Edit")})]})]})}const Wx=()=>{};function Zx({blockProps:e,innerBlocksProps:t,hasResolvedPages:o,blockList:n,pages:r,parentPageID:a}){if(!o)return(0,Ye.jsx)("div",{...e,children:(0,Ye.jsx)("div",{className:"wp-block-page-list__loading-indicator-container",children:(0,Ye.jsx)(et.Spinner,{className:"wp-block-page-list__loading-indicator"})})});if(null===r)return(0,Ye.jsx)("div",{...e,children:(0,Ye.jsx)(et.Notice,{status:"warning",isDismissible:!1,children:(0,tt.__)("Page List: Cannot retrieve Pages.")})});if(0===r.length)return(0,Ye.jsx)("div",{...e,children:(0,Ye.jsx)(et.Notice,{status:"info",isDismissible:!1,children:(0,tt.__)("Page List: Cannot retrieve Pages.")})});if(0===n.length){const t=r.find((e=>e.id===a));return t?.title?.rendered?(0,Ye.jsx)("div",{...e,children:(0,Ye.jsx)(ot.Warning,{children:(0,tt.sprintf)((0,tt.__)('Page List: "%s" page has no children.'),t.title.rendered)})}):(0,Ye.jsx)("div",{...e,children:(0,Ye.jsx)(et.Notice,{status:"warning",isDismissible:!1,children:(0,tt.__)("Page List: Cannot retrieve Pages.")})})}return r.length>0?(0,Ye.jsx)("ul",{...t}):void 0}const Qx={$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}},editorStyle:"wp-block-page-list-editor",style:"wp-block-page-list"},{name:Kx}=Qx,Yx={icon:Ex,example:{},edit:function({context:e,clientId:t,attributes:o,setAttributes:n}){const{parentPageID:r}=o,[a,i]=(0,_t.useState)(!1),s=(0,_t.useCallback)((()=>i(!0)),[]),{records:l,hasResolved:c}=(0,mt.useEntityRecords)("postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}),u="showSubmenuIcon"in e&&l?.length>0&&l?.length<=100,d=(0,_t.useMemo)((()=>{if(null===l)return new Map;const e=l.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)}),[l]),p=(0,ot.useBlockProps)({className:dt("wp-block-page-list",{"has-text-color":!!e.textColor,[(0,ot.getColorClassName)("color",e.textColor)]:!!e.textColor,"has-background":!!e.backgroundColor,[(0,ot.getColorClassName)("background-color",e.backgroundColor)]:!!e.backgroundColor}),style:{...e.style?.color}}),m=(0,_t.useMemo)((function e(t=0,o=0){const n=d.get(t);return n?.length?n.reduce(((t,n)=>{const r=d.has(n.id),a={value:n.id,label:"— ".repeat(o)+n.title.rendered,rawName:n.title.rendered};return t.push(a),r&&t.push(...e(n.id,o+1)),t}),[]):[]}),[d]),g=(0,_t.useMemo)((function e(t=r){const o=d.get(t);return o?.length?o.reduce(((t,o)=>{const n=d.has(o.id),r={id:o.id,label:""!==o.title?.rendered?.trim()?o.title?.rendered:(0,tt.__)("(no title)"),title:""!==o.title?.rendered?.trim()?o.title?.rendered:(0,tt.__)("(no title)"),link:o.url,hasChildren:n};let a=null;const i=e(o.id);return a=(0,Qe.createBlock)("core/page-list-item",r,i),t.push(a),t}),[]):[]}),[d,r]),{isNested:h,hasSelectedChild:x,parentClientId:_,hasDraggedChild:b,isChildOfNavigation:y}=(0,gt.useSelect)((e=>{const{getBlockParentsByBlockName:o,hasSelectedInnerBlock:n,hasDraggedInnerBlock:r}=e(ot.store),a=o(t,"core/navigation-submenu",!0),i=o(t,"core/navigation",!0);return{isNested:a.length>0,isChildOfNavigation:i.length>0,hasSelectedChild:n(t,!0),hasDraggedChild:r(t,!0),parentClientId:i[0]}}),[t]),f=Gx({clientId:t,pages:l,parentClientId:_,parentPageID:r}),v=(0,ot.useInnerBlocksProps)(p,{renderAppender:!1,__unstableDisableDropZone:!0,templateLock:!y&&"all",onInput:Wx,onChange:Wx,value:g}),{selectBlock:k}=(0,gt.useDispatch)(ot.store);return(0,_t.useEffect)((()=>{(x||b)&&(s(),k(_))}),[x,b,_,k,s]),(0,_t.useEffect)((()=>{n({isNested:h})}),[h,n]),(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsxs)(ot.InspectorControls,{children:[m.length>0&&(0,Ye.jsx)(et.PanelBody,{children:(0,Ye.jsx)(et.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,tt.__)("Parent"),value:r,options:m,onChange:e=>n({parentPageID:null!=e?e:0}),help:(0,tt.__)("Choose a page to show only its subpages.")})}),u&&(0,Ye.jsxs)(et.PanelBody,{title:(0,tt.__)("Edit this menu"),children:[(0,Ye.jsx)("p",{children:Ux}),(0,Ye.jsx)(et.Button,{__next40pxDefaultSize:!0,variant:"primary",accessibleWhenDisabled:!0,disabled:!c,onClick:f,children:(0,tt.__)("Edit")})]})]}),u&&(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.BlockControls,{group:"other",children:(0,Ye.jsx)(et.ToolbarButton,{title:(0,tt.__)("Edit"),onClick:s,children:(0,tt.__)("Edit")})}),a&&(0,Ye.jsx)(qx,{onClick:f,onClose:()=>i(!1),disabled:!c})]}),(0,Ye.jsx)(Zx,{blockProps:p,innerBlocksProps:v,hasResolvedPages:c,blockList:g,pages:l,parentPageID:r})]})}},Jx=()=>Xe({name:Kx,metadata:Qx,settings:Yx}),Xx=()=>(0,Ye.jsx)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,Ye.jsx)(et.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})});const e_={$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:t_}=e_,o_={__experimentalLabel:({label:e})=>e,icon:rx,example:{},edit:function({context:e,attributes:t}){const{id:o,label:n,link:r,hasChildren:a,title:i}=t,s="showSubmenuIcon"in e,l=(0,gt.useSelect)((e=>{if(!e(mt.store).canUser("read",{kind:"root",name:"site"}))return;const t=e(mt.store).getEntityRecord("root","site");return"page"===t?.show_on_front&&t?.page_on_front}),[]),c=gh(mh(e,!0)),u=(0,ot.useBlockProps)(c,{className:"wp-block-pages-list__item"}),d=(0,ot.useInnerBlocksProps)(u);return(0,Ye.jsxs)("li",{className:dt("wp-block-pages-list__item",{"has-child":a,"wp-block-navigation-item":s,"open-on-click":e.openSubmenusOnClick,"open-on-hover-click":!e.openSubmenusOnClick&&e.showSubmenuIcon,"menu-item-home":o===l}),children:[a&&e.openSubmenusOnClick?(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)("button",{type:"button",className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle","aria-expanded":"false",children:(0,Xo.decodeEntities)(n)}),(0,Ye.jsx)("span",{className:"wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon",children:(0,Ye.jsx)(Xx,{})})]}):(0,Ye.jsx)("a",{className:dt("wp-block-pages-list__item__link",{"wp-block-navigation-item__content":s}),href:r,children:(0,Xo.decodeEntities)(i)}),a&&(0,Ye.jsxs)(Ye.Fragment,{children:[!e.openSubmenusOnClick&&e.showSubmenuIcon&&(0,Ye.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,Ye.jsx)(Xx,{})}),(0,Ye.jsx)("ul",{...d})]})]},o)}},n_=()=>Xe({name:t_,metadata:e_,settings:o_}),r_=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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"})}),a_={className:!1},i_={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"}},s_=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:r,...a}=e;return{...a,style:t}},{style:l_,...c_}=i_,u_=[{supports:a_,attributes:{...c_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},save({attributes:e}){const{align:t,content:o,dropCap:n,direction:r}=e,a=dt({"has-drop-cap":t!==((0,tt.isRTL)()?"left":"right")&&"center"!==t&&n,[`has-text-align-${t}`]:t});return(0,Ye.jsx)("p",{...ot.useBlockProps.save({className:a,dir:r}),children:(0,Ye.jsx)(ot.RichText.Content,{value:o})})}},{supports:a_,attributes:{...c_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:s_,save({attributes:e}){const{align:t,content:o,dropCap:n,backgroundColor:r,textColor:a,customBackgroundColor:i,customTextColor:s,fontSize:l,customFontSize:c,direction:u}=e,d=(0,ot.getColorClassName)("color",a),p=(0,ot.getColorClassName)("background-color",r),m=(0,ot.getFontSizeClass)(l),g=dt({"has-text-color":a||s,"has-background":r||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,Ye.jsx)(ot.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:o,dir:u})}},{supports:a_,attributes:{...c_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:s_,save({attributes:e}){const{align:t,content:o,dropCap:n,backgroundColor:r,textColor:a,customBackgroundColor:i,customTextColor:s,fontSize:l,customFontSize:c,direction:u}=e,d=(0,ot.getColorClassName)("color",a),p=(0,ot.getColorClassName)("background-color",r),m=(0,ot.getFontSizeClass)(l),g=dt({"has-text-color":a||s,"has-background":r||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,Ye.jsx)(ot.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:o,dir:u})}},{supports:a_,attributes:{...c_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"},width:{type:"string"}},migrate:s_,save({attributes:e}){const{width:t,align:o,content:n,dropCap:r,backgroundColor:a,textColor:i,customBackgroundColor:s,customTextColor:l,fontSize:c,customFontSize:u}=e,d=(0,ot.getColorClassName)("color",i),p=(0,ot.getColorClassName)("background-color",a),m=c&&`is-${c}-text`,g=dt({[`align${t}`]:t,"has-background":a||s,"has-drop-cap":r,[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,Ye.jsx)(ot.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:n})}},{supports:a_,attributes:{...c_,fontSize:{type:"number"}},save({attributes:e}){const{width:t,align:o,content:n,dropCap:r,backgroundColor:a,textColor:i,fontSize:s}=e,l=dt({[`align${t}`]:t,"has-background":a,"has-drop-cap":r}),c={backgroundColor:a,color:i,fontSize:s,textAlign:o};return(0,Ye.jsx)("p",{style:c,className:l||void 0,children:n})},migrate:e=>s_({...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:a_,attributes:{...i_,content:{type:"string",source:"html",default:""}},save:({attributes:e})=>(0,Ye.jsx)(_t.RawHTML,{children:e.content}),migrate:e=>e}],d_=u_,p_=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,Ye.jsx)(Ke.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 m_(e){const{batch:t}=(0,gt.useRegistry)(),{moveBlocksToPosition:o,replaceInnerBlocks:n,duplicateBlocks:r,insertBlock:a}=(0,gt.useDispatch)(ot.store),{getBlockRootClientId:i,getBlockIndex:s,getBlockOrder:l,getBlockName:c,getBlock:u,getNextBlockClientId:d,canInsertBlockType:p}=(0,gt.useSelect)(ot.store),m=(0,_t.useRef)(e);return m.current=e,(0,Ut.useRefEffect)((e=>{function g(e){if(e.defaultPrevented)return;if(e.keyCode!==vo.ENTER)return;const{content:g,clientId:h}=m.current;if(g.length)return;const x=i(h);if(!(0,Qe.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,Qe.getDefaultBlockName)();if(!p(y,i(x)))return;e.preventDefault();const f=u(x);t((()=>{r([x]);const e=s(x);n(x,f.innerBlocks.slice(0,b)),n(d(x),f.innerBlocks.slice(b+1)),a((0,Qe.createBlock)(y),e+1,i(x),!0)}))}return e.addEventListener("keydown",g),()=>{e.removeEventListener("keydown",g)}}),[])}function g_({direction:e,setDirection:t}){return(0,tt.isRTL)()&&(0,Ye.jsx)(et.ToolbarButton,{icon:p_,title:(0,tt._x)("Left to right","editor button"),isActive:"ltr"===e,onClick:()=>{t("ltr"===e?void 0:"ltr")}})}function h_(e){return e===((0,tt.isRTL)()?"left":"right")||"center"===e}function x_({clientId:e,attributes:t,setAttributes:o}){const[n]=(0,ot.useSettings)("typography.dropCap");if(!n)return null;const{align:r,dropCap:a}=t;let i;return i=h_(r)?(0,tt.__)("Not available for aligned text."):a?(0,tt.__)("Showing large initial letter."):(0,tt.__)("Toggle to show a large initial letter."),(0,Ye.jsx)(et.__experimentalToolsPanelItem,{hasValue:()=>!!a,label:(0,tt.__)("Drop cap"),onDeselect:()=>o({dropCap:void 0}),resetAllFilter:()=>({dropCap:void 0}),panelId:e,children:(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Drop cap"),checked:!!a,onChange:()=>o({dropCap:!a}),help:i,disabled:!!h_(r)})})}const __=function({attributes:e,mergeBlocks:t,onReplace:o,onRemove:n,setAttributes:r,clientId:a}){const{align:i,content:s,direction:l,dropCap:c,placeholder:u}=e,d=(0,ot.useBlockProps)({ref:m_({clientId:a,content:s}),className:dt({"has-drop-cap":!h_(i)&&c,[`has-text-align-${i}`]:i}),style:{direction:l}}),p=(0,ot.useBlockEditingMode)();return(0,Ye.jsxs)(Ye.Fragment,{children:["default"===p&&(0,Ye.jsxs)(ot.BlockControls,{group:"block",children:[(0,Ye.jsx)(ot.AlignmentControl,{value:i,onChange:e=>r({align:e,dropCap:!h_(e)&&c})}),(0,Ye.jsx)(g_,{direction:l,setDirection:e=>r({direction:e})})]}),(0,Ye.jsx)(ot.InspectorControls,{group:"typography",children:(0,Ye.jsx)(x_,{clientId:a,attributes:e,setAttributes:r})}),(0,Ye.jsx)(ot.RichText,{identifier:"content",tagName:"p",...d,value:s,onChange:e=>r({content:e}),onMerge:t,onReplace:o,onRemove:n,"aria-label":ot.RichText.isEmpty(s)?(0,tt.__)("Empty block; start writing or type forward slash to choose a block"):(0,tt.__)("Block: Paragraph"),"data-empty":ot.RichText.isEmpty(s),placeholder:u||(0,tt.__)("Type / to choose a block"),"data-custom-placeholder":!!u||void 0,__unstableEmbedURLOnPaste:!0,__unstableAllowPrefixTransformations:!0})]})};const{name:b_}={$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"},y_={from:[{type:"raw",priority:20,selector:"p",schema:({phrasingContentSchema:e,isPaste:t})=>({p:{children:e,attributes:t?[]:["style","id"]}}),transform(e){const t=(0,Qe.getBlockAttributes)(b_,e.outerHTML),{textAlign:o}=e.style||{};return"left"!==o&&"center"!==o&&"right"!==o||(t.align=o),(0,Qe.createBlock)(b_,t)}}]},f_=y_,v_={$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:k_}=v_,w_={icon:r_,example:{attributes:{content:(0,tt.__)("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,tt.__)("Empty")}},transforms:f_,deprecated:d_,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:__,save:function({attributes:e}){const{align:t,content:o,dropCap:n,direction:r}=e,a=dt({"has-drop-cap":t!==((0,tt.isRTL)()?"left":"right")&&"center"!==t&&n,[`has-text-align-${t}`]:t});return(0,Ye.jsx)("p",{...ot.useBlockProps.save({className:a,dir:r}),children:(0,Ye.jsx)(ot.RichText.Content,{value:o})})}},C_=()=>Xe({name:k_,metadata:v_,settings:w_}),j_=(0,Ye.jsx)(Ke.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ye.jsx)(Ke.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"})}),S_={who:"authors",per_page:100};const B_=function({isSelected:e,context:{postType:t,postId:o,queryId:n},attributes:r,setAttributes:a}){const i=Number.isFinite(n),{authorId:s,authorDetails:l,authors:c}=(0,gt.useSelect)((e=>{const{getEditedEntityRecord:n,getUser:r,getUsers:a}=e(mt.store),i=n("postType",t,o)?.author;return{authorId:i,authorDetails:i?r(i):null,authors:a(S_)}}),[t,o]),{editEntityRecord:u}=(0,gt.useDispatch)(mt.store),{textAlign:d,showAvatar:p,showBio:m,byline:g,isLink:h,linkTarget:x}=r,_=[],b=l?.name||(0,tt.__)("Post Author");l?.avatar_urls&&Object.keys(l.avatar_urls).forEach((e=>{_.push({value:e,label:`${e} x ${e}`})}));const y=(0,ot.useBlockProps)({className:dt({[`has-text-align-${d}`]:d})}),f=c?.length?c.map((({id:e,name:t})=>({value:e,label:t}))):[],v=e=>{u("postType",t,o,{author:e})},k=f.length>=25,w=!!o&&!i&&f.length>0;return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.InspectorControls,{children:(0,Ye.jsx)(et.PanelBody,{title:(0,tt.__)("Settings"),children:(0,Ye.jsxs)(et.__experimentalVStack,{spacing:4,className:"wp-block-post-author__inspector-settings",children:[w&&(k&&(0,Ye.jsx)(et.ComboboxControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,tt.__)("Author"),options:f,value:s,onChange:v,allowReset:!1})||(0,Ye.jsx)(et.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,tt.__)("Author"),value:s,options:f,onChange:v})),(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show avatar"),checked:p,onChange:()=>a({showAvatar:!p})}),p&&(0,Ye.jsx)(et.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,tt.__)("Avatar size"),value:r.avatarSize,options:_,onChange:e=>{a({avatarSize:Number(e)})}}),(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show bio"),checked:m,onChange:()=>a({showBio:!m})}),(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link author name to author page"),checked:h,onChange:()=>a({isLink:!h})}),h&&(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>a({linkTarget:e?"_blank":"_self"}),checked:"_blank"===x})]})})}),(0,Ye.jsx)(ot.BlockControls,{group:"block",children:(0,Ye.jsx)(ot.AlignmentControl,{value:d,onChange:e=>{a({textAlign:e})}})}),(0,Ye.jsxs)("div",{...y,children:[p&&l?.avatar_urls&&(0,Ye.jsx)("div",{className:"wp-block-post-author__avatar",children:(0,Ye.jsx)("img",{width:r.avatarSize,src:l.avatar_urls[r.avatarSize],alt:l.name})}),(0,Ye.jsxs)("div",{className:"wp-block-post-author__content",children:[(!ot.RichText.isEmpty(g)||e)&&(0,Ye.jsx)(ot.RichText,{identifier:"byline",className:"wp-block-post-author__byline","aria-label":(0,tt.__)("Post author byline text"),placeholder:(0,tt.__)("Write byline…"),value:g,onChange:e=>a({byline:e})}),(0,Ye.jsx)("p",{className:"wp-block-post-author__name",children:h?(0,Ye.jsx)("a",{href:"#post-author-pseudo-link",onClick:e=>e.preventDefault(),children:b}):b}),m&&(0,Ye.jsx)("p",{className:"wp-block-post-author__bio",dangerouslySetInnerHTML:{__html:l?.description}})]})]})]})},T_={$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},linkTarget:{type:"string",default:"_self"}},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:N_}=T_,I_={icon:j_,example:{viewportWidth:350,attributes:{showBio:!0,byline:(0,tt.__)("Posted by")}},edit:B_},P_=()=>Xe({name:N_,metadata:T_,settings:I_});const M_=function({context:{postType:e,postId:t},attributes:{textAlign:o,isLink:n,linkTarget:r},setAttributes:a}){const{authorName:i}=(0,gt.useSelect)((o=>{const{getEditedEntityRecord:n,getUser:r}=o(mt.store),a=n("postType",e,t)?.author;return{authorName:a?r(a):null}}),[e,t]),s=(0,ot.useBlockProps)({className:dt({[`has-text-align-${o}`]:o})}),l=i?.name||(0,tt.__)("Author Name"),c=n?(0,Ye.jsx)("a",{href:"#author-pseudo-link",onClick:e=>e.preventDefault(),className:"wp-block-post-author-name__link",children:l}):l;return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.BlockControls,{group:"block",children:(0,Ye.jsx)(ot.AlignmentControl,{value:o,onChange:e=>{a({textAlign:e})}})}),(0,Ye.jsx)(ot.InspectorControls,{children:(0,Ye.jsxs)(et.PanelBody,{title:(0,tt.__)("Settings"),children:[(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link to author archive"),onChange:()=>a({isLink:!n}),checked:n}),n&&(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>a({linkTarget:e?"_blank":"_self"}),checked:"_blank"===r})]})}),(0,Ye.jsxs)("div",{...s,children:[" ",c," "]})]})},z_={from:[{type:"block",blocks:["core/post-author"],transform:({textAlign:e})=>(0,Qe.createBlock)("core/post-author-name",{textAlign:e})}],to:[{type:"block",blocks:["core/post-author"],transform:({textAlign:e})=>(0,Qe.createBlock)("core/post-author",{textAlign:e})}]},D_={$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},linkTarget:{type:"string",default:"_self"}},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:A_}=D_,R_={icon:j_,transforms:z_,edit:M_},H_=()=>Xe({name:A_,metadata:D_,settings:R_});const L_=function({context:{postType:e,postId:t},attributes:{textAlign:o},setAttributes:n}){const{authorDetails:r}=(0,gt.useSelect)((o=>{const{getEditedEntityRecord:n,getUser:r}=o(mt.store),a=n("postType",e,t)?.author;return{authorDetails:a?r(a):null}}),[e,t]),a=(0,ot.useBlockProps)({className:dt({[`has-text-align-${o}`]:o})}),i=r?.description||(0,tt.__)("Author Biography");return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.BlockControls,{group:"block",children:(0,Ye.jsx)(ot.AlignmentControl,{value:o,onChange:e=>{n({textAlign:e})}})}),(0,Ye.jsx)("div",{...a,dangerouslySetInnerHTML:{__html:i}})]})},F_={$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:V_}=F_,E_={icon:j_,edit:L_},O_=()=>Xe({name:V_,metadata:F_,settings:E_}),$_=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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"})}),G_=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]];const U_={$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:q_}=U_,W_={icon:up,edit:function({attributes:{commentId:e},setAttributes:t}){const[o,n]=(0,_t.useState)(e),r=(0,ot.useBlockProps)(),a=(0,ot.useInnerBlocksProps)(r,{template:G_});return e?(0,Ye.jsx)("div",{...a}):(0,Ye.jsx)("div",{...r,children:(0,Ye.jsxs)(et.Placeholder,{icon:$_,label:(0,tt._x)("Post Comment","block title"),instructions:(0,tt.__)("To show a comment, input the comment ID."),children:[(0,Ye.jsx)(et.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e,onChange:e=>n(parseInt(e))}),(0,Ye.jsx)(et.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{t({commentId:o})},children:(0,tt.__)("Save")})]})})},save:function(){const e=ot.useBlockProps.save(),t=ot.useInnerBlocksProps.save(e);return(0,Ye.jsx)("div",{...t})}},Z_=()=>Xe({name:q_,metadata:U_,settings:W_}),Q_=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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 K_={$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}},interactivity:{clientNavigation:!0}}},{name:Y_}=K_,J_={icon:Q_,edit:function({attributes:e,context:t,setAttributes:o}){const{textAlign:n}=e,{postId:r}=t,[a,i]=(0,_t.useState)(),s=(0,ot.useBlockProps)({className:dt({[`has-text-align-${n}`]:n})});(0,_t.useEffect)((()=>{if(!r)return;const e=r;Jr()({path:(0,pt.addQueryArgs)("/wp/v2/comments",{post:r}),parse:!1}).then((t=>{e===r&&i(t.headers.get("X-WP-Total"))}))}),[r]);const l=r&&void 0!==a,c={...s.style,textDecoration:l?s.style?.textDecoration:void 0};return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.BlockControls,{group:"block",children:(0,Ye.jsx)(ot.AlignmentControl,{value:n,onChange:e=>{o({textAlign:e})}})}),(0,Ye.jsx)("div",{...s,style:c,children:l?a:(0,Ye.jsx)(ot.Warning,{children:(0,tt.__)("Post Comments Count block: post not found.")})})]})}},X_=()=>Xe({name:Y_,metadata:K_,settings:J_}),eb=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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 tb={$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"]},{name:ob}=tb,nb={icon:eb,edit:function e({attributes:t,context:o,setAttributes:n}){const{textAlign:r}=t,{postId:a,postType:i}=o,s=(0,Ut.useInstanceId)(e),l=(0,tt.sprintf)("comments-form-edit-%d-desc",s),c=(0,ot.useBlockProps)({className:dt({[`has-text-align-${r}`]:r}),"aria-describedby":l});return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.BlockControls,{group:"block",children:(0,Ye.jsx)(ot.AlignmentControl,{value:r,onChange:e=>{n({textAlign:e})}})}),(0,Ye.jsxs)("div",{...c,children:[(0,Ye.jsx)(sr,{postId:a,postType:i}),(0,Ye.jsx)(et.VisuallyHidden,{id:l,children:(0,tt.__)("Comments form disabled in editor.")})]})]})}},rb=()=>Xe({name:ob,metadata:tb,settings:nb});const ab=function({context:e,attributes:t,setAttributes:o}){const{textAlign:n}=t,{postType:r,postId:a}=e,[i,s]=(0,_t.useState)(),l=(0,ot.useBlockProps)({className:dt({[`has-text-align-${n}`]:n})});(0,_t.useEffect)((()=>{if(!a)return;const e=a;Jr()({path:(0,pt.addQueryArgs)("/wp/v2/comments",{post:a}),parse:!1}).then((t=>{e===a&&s(t.headers.get("X-WP-Total"))}))}),[a]);const c=(0,gt.useSelect)((e=>e(mt.store).getEditedEntityRecord("postType",r,a)),[r,a]);if(!c)return null;const{link:u}=c;let d;if(void 0!==i){const e=parseInt(i);d=0===e?(0,tt.__)("No comments"):(0,tt.sprintf)((0,tt._n)("%s comment","%s comments",e),e.toLocaleString())}return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.BlockControls,{group:"block",children:(0,Ye.jsx)(ot.AlignmentControl,{value:n,onChange:e=>{o({textAlign:e})}})}),(0,Ye.jsx)("div",{...l,children:u&&void 0!==d?(0,Ye.jsx)("a",{href:u+"#comments",onClick:e=>e.preventDefault(),children:d}):(0,Ye.jsx)(ot.Warning,{children:(0,tt.__)("Post Comments Link block: post not found.")})})]})},ib={$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}}},{name:sb}=ib,lb={edit:ab,icon:Q_},cb=()=>Xe({name:sb,metadata:ib,settings:lb}),ub=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"})});function db({parentLayout:e,layoutClassNames:t,userCanEdit:o,postType:n,postId:r}){const[,,a]=(0,mt.useEntityProp)("postType",n,"content",r),i=(0,ot.useBlockProps)({className:t}),s=(0,_t.useMemo)((()=>a?.raw?(0,Qe.parse)(a.raw):[]),[a?.raw]),l=(0,ot.__experimentalUseBlockPreview)({blocks:s,props:i,layout:e});return o?(0,Ye.jsx)("div",{...l}):a?.protected?(0,Ye.jsx)("div",{...i,children:(0,Ye.jsx)(ot.Warning,{children:(0,tt.__)("This content is password protected.")})}):(0,Ye.jsx)("div",{...i,dangerouslySetInnerHTML:{__html:a?.rendered}})}function pb({context:e={}}){const{postType:t,postId:o}=e,[n,r,a]=(0,mt.useEntityBlockEditor)("postType",t,{id:o}),i=(0,gt.useSelect)((e=>e(mt.store).getEntityRecord("postType",t,o)),[t,o]),s=!!i?.content?.raw||n?.length,l=(0,ot.useInnerBlocksProps)((0,ot.useBlockProps)({className:"entry-content"}),{value:n,onInput:r,onChange:a,template:s?void 0:[["core/paragraph"]]});return(0,Ye.jsx)("div",{...l})}function mb(e){const{context:{queryId:t,postType:o,postId:n}={},layoutClassNames:r}=e,a=qt("postType",o,n);if(void 0===a)return null;const i=Number.isFinite(t);return a&&!i?(0,Ye.jsx)(pb,{...e}):(0,Ye.jsx)(db,{parentLayout:e.parentLayout,layoutClassNames:r,userCanEdit:a,postType:o,postId:n})}function gb({layoutClassNames:e}){const t=(0,ot.useBlockProps)({className:e});return(0,Ye.jsxs)("div",{...t,children:[(0,Ye.jsx)("p",{children:(0,tt.__)("This is the Content block, it will display all the blocks in any single post or page.")}),(0,Ye.jsx)("p",{children:(0,tt.__)("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,Ye.jsx)("p",{children:(0,tt.__)("If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well.")})]})}function hb(){const e=(0,ot.useBlockProps)();return(0,Ye.jsx)("div",{...e,children:(0,Ye.jsx)(ot.Warning,{children:(0,tt.__)("Block cannot be rendered inside itself.")})})}const xb={$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,__experimentalDefaultControls:{margin:!1,padding:!1}},color:{gradients:!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}}},style:"wp-block-post-content",editorStyle:"wp-block-post-content-editor"},{name:_b}=xb,bb={icon:ub,edit:function({context:e,__unstableLayoutClassNames:t,__unstableParentLayout:o}){const{postId:n,postType:r}=e,a=(0,ot.useHasRecursion)(n);return n&&r&&a?(0,Ye.jsx)(hb,{}):(0,Ye.jsx)(ot.RecursionProvider,{uniqueId:n,children:n&&r?(0,Ye.jsx)(mb,{context:e,parentLayout:o,layoutClassNames:t}):(0,Ye.jsx)(gb,{layoutClassNames:t})})}},yb=()=>Xe({name:_b,metadata:xb,settings:bb});function fb(e){return/(?:^|[^\\])[aAgh]/.test(e)}const vb={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:so,isEligible:({style:e})=>e?.typography?.fontFamily},kb=[vb],wb=[{name:"post-date-modified",title:(0,tt.__)("Modified Date"),description:(0,tt.__)("Display a post's last updated date."),attributes:{displayType:"modified"},scope:["block","inserter"],isActive:e=>"modified"===e.displayType,icon:Pr}],Cb=wb,jb={$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},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:Sb}=jb,Bb={icon:Pr,edit:function({attributes:{textAlign:e,format:t,isLink:o,displayType:n},context:{postId:r,postType:a,queryId:i},setAttributes:s}){const l=(0,ot.useBlockProps)({className:dt({[`has-text-align-${e}`]:e,"wp-block-post-date__modified-date":"modified"===n})}),[c,u]=(0,_t.useState)(null),d=(0,_t.useMemo)((()=>({anchor:c})),[c]),p=Number.isFinite(i),m=(0,Mr.getSettings)(),[g=m.formats.date]=(0,mt.useEntityProp)("root","site","date_format"),[h=m.formats.time]=(0,mt.useEntityProp)("root","site","time_format"),[x,_]=(0,mt.useEntityProp)("postType",a,n,r),b=(0,gt.useSelect)((e=>a?e(mt.store).getPostType(a):null),[a]),y="date"===n?(0,tt.__)("Post Date"):(0,tt.__)("Post Modified Date");let f=x?(0,Ye.jsx)("time",{dateTime:(0,Mr.dateI18n)("c",x),ref:u,children:"human-diff"===t?(0,Mr.humanTimeDiff)(x):(0,Mr.dateI18n)(t||g,x)}):y;return o&&x&&(f=(0,Ye.jsx)("a",{href:"#post-date-pseudo-link",onClick:e=>e.preventDefault(),children:f})),(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsxs)(ot.BlockControls,{group:"block",children:[(0,Ye.jsx)(ot.AlignmentControl,{value:e,onChange:e=>{s({textAlign:e})}}),x&&"date"===n&&!p&&(0,Ye.jsx)(et.ToolbarGroup,{children:(0,Ye.jsx)(et.Dropdown,{popoverProps:d,renderContent:({onClose:e})=>(0,Ye.jsx)(ot.__experimentalPublishDateTimePicker,{currentDate:x,onChange:_,is12Hour:fb(h),onClose:e,dateOrder:(0,tt._x)("dmy","date order")}),renderToggle:({isOpen:e,onToggle:t})=>(0,Ye.jsx)(et.ToolbarButton,{"aria-expanded":e,icon:Us,title:(0,tt.__)("Change Date"),onClick:t,onKeyDown:o=>{e||o.keyCode!==vo.DOWN||(o.preventDefault(),t())}})})})]}),(0,Ye.jsx)(ot.InspectorControls,{children:(0,Ye.jsxs)(et.PanelBody,{title:(0,tt.__)("Settings"),children:[(0,Ye.jsx)(ot.__experimentalDateFormatPicker,{format:t,defaultFormat:g,onChange:e=>s({format:e})}),(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:b?.labels.singular_name?(0,tt.sprintf)((0,tt.__)("Link to %s"),b.labels.singular_name.toLowerCase()):(0,tt.__)("Link to post"),onChange:()=>s({isLink:!o}),checked:o}),(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display last modified date"),onChange:e=>s({displayType:e?"modified":"date"}),checked:"modified"===n,help:(0,tt.__)("Only shows if the post has been modified")})]})}),(0,Ye.jsx)("div",{...l,children:f})]})},deprecated:kb,variations:Cb},Tb=()=>Xe({name:Sb,metadata:jb,settings:Bb}),Nb=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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 Ib={from:[{type:"block",blocks:["core/post-content"],transform:()=>(0,Qe.createBlock)("core/post-excerpt")}],to:[{type:"block",blocks:["core/post-content"],transform:()=>(0,Qe.createBlock)("core/post-content")}]},Pb={$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:Mb}=Pb,zb={icon:Nb,transforms:Ib,edit:function({attributes:{textAlign:e,moreText:t,showMoreOnNewLine:o,excerptLength:n},setAttributes:r,isSelected:a,context:{postId:i,postType:s,queryId:l}}){const c=Number.isFinite(l),u=qt("postType",s,i),[d,p,{rendered:m,protected:g}={}]=(0,mt.useEntityProp)("postType",s,"excerpt",i),h=(0,gt.useSelect)((e=>"page"===s||!!e(mt.store).getPostType(s)?.supports?.excerpt),[s]),x=u&&!c&&h,_=(0,ot.useBlockProps)({className:dt({[`has-text-align-${e}`]:e})}),b=(0,tt._x)("words","Word count type. Do not translate!"),y=(0,_t.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,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.BlockControls,{children:(0,Ye.jsx)(ot.AlignmentToolbar,{value:e,onChange:e=>r({textAlign:e})})}),(0,Ye.jsx)("div",{..._,children:(0,Ye.jsx)("p",{children:(0,tt.__)("This block will display the excerpt.")})})]});if(g&&!u)return(0,Ye.jsx)("div",{..._,children:(0,Ye.jsx)(ot.Warning,{children:(0,tt.__)("The content is currently protected and does not have the available excerpt.")})});const f=(0,Ye.jsx)(ot.RichText,{identifier:"moreText",className:"wp-block-post-excerpt__more-link",tagName:"a","aria-label":(0,tt.__)("“Read more” link text"),placeholder:(0,tt.__)('Add "read more" link text'),value:t,onChange:e=>r({moreText:e}),withoutInteractiveFormatting:!0}),v=dt("wp-block-post-excerpt__excerpt",{"is-inline":!o}),k=(d||y).trim();let w="";if("words"===b)w=k.split(" ",n).join(" ");else if("characters_excluding_spaces"===b){const e=k.split("",n).join(""),t=e.length-e.replaceAll(" ","").length;w=k.split("",n+t).join("")}else"characters_including_spaces"===b&&(w=k.split("",n).join(""));const C=w!==k,j=x?(0,Ye.jsx)(ot.RichText,{className:v,"aria-label":(0,tt.__)("Excerpt text"),value:a?k:(C?w+"…":k)||(0,tt.__)("No excerpt found"),onChange:p,tagName:"p"}):(0,Ye.jsx)("p",{className:v,children:C?w+"…":k||(0,tt.__)("No excerpt found")});return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.BlockControls,{children:(0,Ye.jsx)(ot.AlignmentToolbar,{value:e,onChange:e=>r({textAlign:e})})}),(0,Ye.jsx)(ot.InspectorControls,{children:(0,Ye.jsxs)(et.PanelBody,{title:(0,tt.__)("Settings"),children:[(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show link on new line"),checked:o,onChange:e=>r({showMoreOnNewLine:e})}),(0,Ye.jsx)(et.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,tt.__)("Max number of words"),value:n,onChange:e=>{r({excerptLength:e})},min:"10",max:"100"})]})}),(0,Ye.jsxs)("div",{..._,children:[j,!o&&" ",o?(0,Ye.jsx)("p",{className:"wp-block-post-excerpt__more-text",children:f}):f]})]})}},Db=()=>Xe({name:Mb,metadata:Pb,settings:zb}),Ab=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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"})}),Rb=(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(et.__experimentalToggleGroupControlOption,{value:"cover",label:(0,tt._x)("Cover","Scale option for Image dimension control")}),(0,Ye.jsx)(et.__experimentalToggleGroupControlOption,{value:"contain",label:(0,tt._x)("Contain","Scale option for Image dimension control")}),(0,Ye.jsx)(et.__experimentalToggleGroupControlOption,{value:"fill",label:(0,tt._x)("Fill","Scale option for Image dimension control")})]}),Hb="cover",Lb={cover:(0,tt.__)("Image is scaled and cropped to fill the entire space without being distorted."),contain:(0,tt.__)("Image is scaled to fill the space without clipping nor distorting."),fill:(0,tt.__)("Image will be stretched and distorted to completely fill the space.")},Fb=({clientId:e,attributes:{aspectRatio:t,width:o,height:n,scale:r,sizeSlug:a},setAttributes:i,media:s})=>{const[l,c,u,d]=(0,ot.useSettings)("spacing.units","dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),p=(0,et.__experimentalUseCustomUnits)({availableUnits:l||["px","%","vw","em","rem"]}),m=(0,gt.useSelect)((e=>e(ot.store).getSettings().imageSizes),[]).filter((({slug:e})=>s?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),g=(e,t)=>{const o=parseFloat(t);isNaN(o)&&t||i({[e]:o<0?"0":t})},h=(0,tt._x)("Scale","Image scaling options"),x=n||t&&"auto"!==t,_=u?.map((({name:e,ratio:t})=>({label:e,value:t}))),b=c?.map((({name:e,ratio:t})=>({label:e,value:t}))),y=[{label:(0,tt._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...d?b:[],..._||[]];return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(et.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:(0,tt.__)("Aspect ratio"),onDeselect:()=>i({aspectRatio:void 0}),resetAllFilter:()=>({aspectRatio:void 0}),isShownByDefault:!0,panelId:e,children:(0,Ye.jsx)(et.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,tt.__)("Aspect ratio"),value:t,options:y,onChange:e=>i({aspectRatio:e})})}),(0,Ye.jsx)(et.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!n,label:(0,tt.__)("Height"),onDeselect:()=>i({height:void 0}),resetAllFilter:()=>({height:void 0}),isShownByDefault:!0,panelId:e,children:(0,Ye.jsx)(et.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,tt.__)("Height"),labelPosition:"top",value:n||"",min:0,onChange:e=>g("height",e),units:p})}),(0,Ye.jsx)(et.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!o,label:(0,tt.__)("Width"),onDeselect:()=>i({width:void 0}),resetAllFilter:()=>({width:void 0}),isShownByDefault:!0,panelId:e,children:(0,Ye.jsx)(et.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,tt.__)("Width"),labelPosition:"top",value:o||"",min:0,onChange:e=>g("width",e),units:p})}),x&&(0,Ye.jsx)(et.__experimentalToolsPanelItem,{hasValue:()=>!!r&&r!==Hb,label:h,onDeselect:()=>i({scale:Hb}),resetAllFilter:()=>({scale:Hb}),isShownByDefault:!0,panelId:e,children:(0,Ye.jsx)(et.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:h,value:r,help:Lb[r],onChange:e=>i({scale:e}),isBlock:!0,children:Rb})}),!!m.length&&(0,Ye.jsx)(et.__experimentalToolsPanelItem,{hasValue:()=>!!a,label:(0,tt.__)("Resolution"),onDeselect:()=>i({sizeSlug:void 0}),resetAllFilter:()=>({sizeSlug:void 0}),isShownByDefault:!1,panelId:e,children:(0,Ye.jsx)(et.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,tt.__)("Resolution"),value:a||"full",options:m,onChange:e=>i({sizeSlug:e}),help:(0,tt.__)("Select the size of the source image.")})})]})},Vb=(0,Ut.compose)([(0,ot.withColors)({overlayColor:"background-color"})])((({clientId:e,attributes:t,setAttributes:o,overlayColor:n,setOverlayColor:r})=>{const{dimRatio:a}=t,{gradientValue:i,setGradient:s}=(0,ot.__experimentalUseGradient)(),l=(0,ot.__experimentalUseMultipleOriginColorsAndGradients)();return l.hasColorsOrGradients?(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:n.color,gradientValue:i,label:(0,tt.__)("Overlay"),onColorChange:r,onGradientChange:s,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0})}],panelId:e,...l}),(0,Ye.jsx)(et.__experimentalToolsPanelItem,{hasValue:()=>void 0!==a,label:(0,tt.__)("Overlay opacity"),onDeselect:()=>o({dimRatio:0}),resetAllFilter:()=>({dimRatio:0}),isShownByDefault:!0,panelId:e,children:(0,Ye.jsx)(et.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Overlay opacity"),value:a,onChange:e=>o({dimRatio:e}),min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0})})]}):null}));const Eb=(0,Ut.compose)([(0,ot.withColors)({overlayColor:"background-color"})])((({attributes:e,overlayColor:t})=>{const{dimRatio:o}=e,{gradientClass:n,gradientValue:r}=(0,ot.__experimentalUseGradient)(),a=(0,ot.__experimentalUseMultipleOriginColorsAndGradients)(),i=(0,ot.__experimentalUseBorderProps)(e),s={backgroundColor:t.color,backgroundImage:r,...i.style};return a.hasColorsOrGradients&&o?(0,Ye.jsx)("span",{"aria-hidden":"true",className:dt("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":r,[n]:n},i.className),style:s}):null;var l})),Ob=["image"];const $b={onClick:e=>e.preventDefault(),"aria-disabled":!0};const Gb={$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},aspectRatio:{type:"string"},width:{type:"string"},height:{type:"string"},scale:{type:"string",default:"cover"},sizeSlug:{type:"string"},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"},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:Ub}=Gb,qb={icon:Ab,edit:function({clientId:e,attributes:t,setAttributes:o,context:{postId:n,postType:r,queryId:a}}){const i=Number.isFinite(a),{isLink:s,aspectRatio:l,height:c,width:u,scale:d,sizeSlug:p,rel:m,linkTarget:g,useFirstImageFromPost:h}=t,[x,_]=(0,_t.useState)(),[b,y]=(0,mt.useEntityProp)("postType",r,"featured_media",n),[f]=(0,mt.useEntityProp)("postType",r,"content",n),v=(0,_t.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,gt.useSelect)((e=>{const{getMedia:t,getPostType:o,getEditedEntityRecord:a}=e(mt.store);return{media:v&&t(v,{context:"view"}),postType:r&&o(r),postPermalink:a("postType",r,n)?.link}}),[v,r,n]),j=function(e,t){return e?.media_details?.sizes?.[t]?.source_url||e?.source_url}(k,p),S=(0,ot.useBlockProps)({style:{width:u,height:c,aspectRatio:l},className:dt({"is-transient":x})}),B=(0,ot.__experimentalUseBorderProps)(t),T=(0,ot.__experimentalGetShadowClassesAndStyles)(t),N=(0,ot.useBlockEditingMode)(),I=e=>(0,Ye.jsx)(et.Placeholder,{className:dt("block-editor-media-placeholder",B.className),withIllustration:!0,style:{height:!!l&&"100%",width:!!l&&"100%",...B.style,...T.style},children:e}),P=e=>{e?.id&&y(e.id),e?.url&&(0,It.isBlobURL)(e.url)&&_(e.url)};(0,_t.useEffect)((()=>{j&&x&&_()}),[j,x]);const{createErrorNotice:M}=(0,gt.useDispatch)(Pt.store),z=e=>{M(e,{type:"snackbar"}),_()},D="default"===N&&(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.InspectorControls,{group:"color",children:(0,Ye.jsx)(Vb,{attributes:t,setAttributes:o,clientId:e})}),(0,Ye.jsx)(ot.InspectorControls,{group:"dimensions",children:(0,Ye.jsx)(Fb,{clientId:e,attributes:t,setAttributes:o,media:k})}),(0,Ye.jsx)(ot.InspectorControls,{children:(0,Ye.jsxs)(et.PanelBody,{title:(0,tt.__)("Settings"),children:[(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:w?.labels.singular_name?(0,tt.sprintf)((0,tt.__)("Link to %s"),w.labels.singular_name):(0,tt.__)("Link to post"),onChange:()=>o({isLink:!s}),checked:s}),s&&(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>o({linkTarget:e?"_blank":"_self"}),checked:"_blank"===g}),(0,Ye.jsx)(et.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link rel"),value:m,onChange:e=>o({rel:e})})]})]})})]});let A;if(!v&&(i||!n))return(0,Ye.jsxs)(Ye.Fragment,{children:[D,(0,Ye.jsxs)("div",{...S,children:[s?(0,Ye.jsx)("a",{href:C,target:g,...$b,children:I()}):I(),(0,Ye.jsx)(Eb,{attributes:t,setAttributes:o,clientId:e})]})]});const R=(0,tt.__)("Add a featured image"),H={...B.style,...T.style,height:l?"100%":c,width:!!l&&"100%",objectFit:!(!c&&!l)&&d};return A=v||x?k||x?(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)("img",{className:B.className,src:x||j,alt:k&&k?.alt_text?(0,tt.sprintf)((0,tt.__)("Featured image: %s"),k.alt_text):(0,tt.__)("Featured image"),style:H}),x&&(0,Ye.jsx)(et.Spinner,{})]}):I():(0,Ye.jsx)(ot.MediaPlaceholder,{onSelect:P,accept:"image/*",allowedTypes:Ob,onError:z,placeholder:I,mediaLibraryButton:({open:e})=>(0,Ye.jsx)(et.Button,{__next40pxDefaultSize:!0,icon:Wd,variant:"primary",label:R,showTooltip:!0,tooltipPosition:"top center",onClick:()=>{e()}})}),(0,Ye.jsxs)(Ye.Fragment,{children:[!x&&D,!!k&&!i&&(0,Ye.jsx)(ot.BlockControls,{group:"other",children:(0,Ye.jsx)(ot.MediaReplaceFlow,{mediaId:v,mediaURL:j,allowedTypes:Ob,accept:"image/*",onSelect:P,onError:z,onReset:()=>y(0)})}),(0,Ye.jsxs)("figure",{...S,children:[s?(0,Ye.jsx)("a",{href:C,target:g,...$b,children:A}):A,(0,Ye.jsx)(Eb,{attributes:t,setAttributes:o,clientId:e})]})]})}},Wb=()=>Xe({name:Ub,metadata:Gb,settings:qb});const Zb=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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"})}),Qb=(0,Ye.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ye.jsx)(Ke.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"})}),Kb=[{isDefault:!0,name:"post-next",title:(0,tt.__)("Next post"),description:(0,tt.__)("Displays the post link that follows the current post."),icon:Zb,attributes:{type:"next"},scope:["inserter","transform"]},{name:"post-previous",title:(0,tt.__)("Previous post"),description:(0,tt.__)("Displays the post link that precedes the current post."),icon:Qb,attributes:{type:"previous"},scope:["inserter","transform"]}];Kb.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.type===t.type)}));const Yb=Kb,Jb={$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:Xb}=Jb,ey={edit:function({context:{postType:e},attributes:{type:t,label:o,showTitle:n,textAlign:r,linkLabel:a,arrow:i,taxonomy:s},setAttributes:l}){const c="next"===t;let u=c?(0,tt.__)("Next"):(0,tt.__)("Previous");const d={none:"",arrow:c?"→":"←",chevron:c?"»":"«"}[i];n&&(u=c?(0,tt.__)("Next: "):(0,tt.__)("Previous: "));const p=c?(0,tt.__)("Next post"):(0,tt.__)("Previous post"),m=(0,ot.useBlockProps)({className:dt({[`has-text-align-${r}`]:r})}),g=(0,gt.useSelect)((t=>{const{getTaxonomies:o}=t(mt.store);return o({type:e,per_page:-1})}),[e]);return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.InspectorControls,{children:(0,Ye.jsxs)(et.PanelBody,{children:[(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display the title as a link"),help:(0,tt.__)("If you have entered a custom label, it will be prepended before the title."),checked:!!n,onChange:()=>l({showTitle:!n})}),n&&(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Include the label as part of the link"),checked:!!a,onChange:()=>l({linkLabel:!a})}),(0,Ye.jsxs)(et.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,tt.__)("Arrow"),value:i,onChange:e=>{l({arrow:e})},help:(0,tt.__)("A decorative arrow for the next and previous link."),isBlock:!0,children:[(0,Ye.jsx)(et.__experimentalToggleGroupControlOption,{value:"none",label:(0,tt._x)("None","Arrow option for Next/Previous link")}),(0,Ye.jsx)(et.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,tt._x)("Arrow","Arrow option for Next/Previous link")}),(0,Ye.jsx)(et.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,tt._x)("Chevron","Arrow option for Next/Previous link")})]})]})}),(0,Ye.jsx)(ot.InspectorControls,{group:"advanced",children:(0,Ye.jsx)(et.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,tt.__)("Filter by taxonomy"),value:s,options:[{label:(0,tt.__)("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,tt.__)("Only link to posts that have the same taxonomy terms as the current post. For example the same tags or categories.")})}),(0,Ye.jsx)(ot.BlockControls,{children:(0,Ye.jsx)(ot.AlignmentToolbar,{value:r,onChange:e=>{l({textAlign:e})}})}),(0,Ye.jsxs)("div",{...m,children:[!c&&d&&(0,Ye.jsx)("span",{className:`wp-block-post-navigation-link__arrow-previous is-arrow-${i}`,children:d}),(0,Ye.jsx)(ot.RichText,{tagName:"a",identifier:"label","aria-label":p,placeholder:u,value:o,allowedFormats:["core/bold","core/italic"],onChange:e=>l({label:e})}),n&&(0,Ye.jsx)("a",{href:"#post-navigation-pseudo-link",onClick:e=>e.preventDefault(),children:(0,tt.__)("An example title")}),c&&d&&(0,Ye.jsx)("span",{className:`wp-block-post-navigation-link__arrow-next is-arrow-${i}`,"aria-hidden":!0,children:d})]})]})},variations:Yb},ty=()=>Xe({name:Xb,metadata:Jb,settings:ey}),oy=[["core/post-title"],["core/post-date"],["core/post-excerpt"]];function ny({classList:e}){const t=(0,ot.useInnerBlocksProps)({className:dt("wp-block-post",e)},{template:oy,__unstableDisableLayoutClassNames:!0});return(0,Ye.jsx)("li",{...t})}const ry=(0,_t.memo)((function({blocks:e,blockContextId:t,classList:o,isHidden:n,setActiveBlockContextId:r}){const a=(0,ot.__experimentalUseBlockPreview)({blocks:e,props:{className:dt("wp-block-post",o)}}),i=()=>{r(t)},s={display:n?"none":void 0};return(0,Ye.jsx)("li",{...a,tabIndex:0,role:"button",onClick:i,onKeyPress:i,style:s})}));const ay={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-template",title:"Post Template",category:"theme",parent:["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"],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:{blockGap:{__experimentalDefault:"1.25em"},__experimentalDefaultControls:{blockGap:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-post-template",editorStyle:"wp-block-post-template-editor"},{name:iy}=ay,sy={icon:Kr,edit:function({setAttributes:e,clientId:t,context:{query:{perPage:o,offset:n=0,postType:r,order:a,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,_t.useState)(),{posts:j,blocks:S}=(0,gt.useSelect)((e=>{const{getEntityRecords:g,getTaxonomies:y}=e(mt.store),{getBlocks:f}=e(ot.store),v=d&&_?.startsWith("category-")&&g("taxonomy","category",{context:"view",per_page:1,_fields:["id"],slug:_.replace("category-","")}),k={offset:n||0,order:a,orderby:i};if(p&&!d){const e=y({type:r,per_page:-1,context:"view"}),t=Object.entries(p).reduce(((t,[o,n])=>{const r=e?.find((({slug:e})=>e===o));return r?.rest_base&&(t[r?.rest_base]=n),t}),{});Object.keys(t).length&&Object.assign(k,t)}o&&(k.per_page=o),s&&(k.author=s),l&&(k.search=l),c?.length&&(k.exclude=c),m?.length&&(k.parent=m),h?.length&&(k.format=h),u&&(k.sticky="only"===u),d&&(_?.startsWith("archive-")?(k.postType=_.replace("archive-",""),r=k.postType):v&&(k.categories=v[0]?.id));return{posts:g("postType",b||r,{...k,...x}),blocks:f(t)}}),[o,n,a,i,t,s,l,r,c,u,d,_,p,m,h,x,b]),B=(0,_t.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,ot.useBlockProps)({className:dt(f,{[`columns-${k}`]:"grid"===v&&k})});if(!j)return(0,Ye.jsx)("p",{...T,children:(0,Ye.jsx)(et.Spinner,{})});if(!j.length)return(0,Ye.jsxs)("p",{...T,children:[" ",(0,tt.__)("No results found.")]});const N=t=>e({layout:{...y,...t}}),I=[{icon:kp,title:(0,tt._x)("List view","Post template block display setting"),onClick:()=>N({type:"default"}),isActive:"default"===v||"constrained"===v},{icon:$u,title:(0,tt._x)("Grid view","Post template block display setting"),onClick:()=>N({type:"grid",columnCount:k}),isActive:"grid"===v}];return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.BlockControls,{children:(0,Ye.jsx)(et.ToolbarGroup,{controls:I})}),(0,Ye.jsx)("ul",{...T,children:B&&B.map((e=>(0,Ye.jsxs)(ot.BlockContextProvider,{value:e,children:[e.postId===(w||B[0]?.postId)?(0,Ye.jsx)(ny,{classList:e.classList}):null,(0,Ye.jsx)(ry,{blocks:S,blockContextId:e.postId,classList:e.classList,setActiveBlockContextId:C,isHidden:e.postId===(w||B[0]?.postId)})]},e.postId)))})]})},save:function(){return(0,Ye.jsx)(ot.InnerBlocks.Content,{})}},ly=()=>Xe({name:iy,metadata:ay,settings:sy}),cy=(0,Ye.jsx)(Ke.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ye.jsx)(Ke.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"})}),uy=[];const dy=["core/bold","core/image","core/italic","core/link","core/strikethrough","core/text-color"];const py=(0,Ye.jsx)(Ke.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ye.jsx)(Ke.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"})}),my={category:cy,post_tag:py};function gy(e,t){if("core/post-terms"!==t)return e;const o=e.variations.map((e=>{var t;return{...e,icon:null!==(t=my[e.name])&&void 0!==t?t:cy}}));return{...e,variations:o}}const hy={$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:xy}=hy,_y={icon:cy,edit:function({attributes:e,clientId:t,context:o,isSelected:n,setAttributes:r,insertBlocksAfter:a}){const{term:i,textAlign:s,separator:l,prefix:c,suffix:u}=e,{postId:d,postType:p}=o,m=(0,gt.useSelect)((e=>{if(!i)return{};const{getTaxonomy:t}=e(mt.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,gt.useSelect)((n=>{const r=t?.visibility?.publicly_queryable;if(!r)return{postTerms:uy,isLoading:!1,hasPostTerms:!1};const{getEntityRecords:a,isResolving:i}=n(mt.store),s=["taxonomy",o,{post:e,per_page:-1,context:"view"}],l=a(...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,ot.useBlockDisplayInformation)(t),y=(0,ot.useBlockProps)({className:dt({[`has-text-align-${s}`]:s,[`taxonomy-${i}`]:i})});return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.BlockControls,{children:(0,Ye.jsx)(ot.AlignmentToolbar,{value:s,onChange:e=>{r({textAlign:e})}})}),(0,Ye.jsx)(ot.InspectorControls,{group:"advanced",children:(0,Ye.jsx)(et.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,tt.__)("Separator"),value:l||"",onChange:e=>{r({separator:e})},help:(0,tt.__)("Enter character(s) used to separate terms.")})}),(0,Ye.jsxs)("div",{...y,children:[x&&_&&(0,Ye.jsx)(et.Spinner,{}),!x&&(n||c)&&(0,Ye.jsx)(ot.RichText,{identifier:"prefix",allowedFormats:dy,className:"wp-block-post-terms__prefix","aria-label":(0,tt.__)("Prefix"),placeholder:(0,tt.__)("Prefix")+" ",value:c,onChange:e=>r({prefix:e}),tagName:"span"}),(!_||!i)&&(0,Ye.jsx)("span",{children:b.title}),_&&!x&&h&&g.map((e=>(0,Ye.jsx)("a",{href:e.link,onClick:e=>e.preventDefault(),children:(0,Xo.decodeEntities)(e.name)},e.id))).reduce(((e,t)=>(0,Ye.jsxs)(Ye.Fragment,{children:[e,(0,Ye.jsx)("span",{className:"wp-block-post-terms__separator",children:l||" "}),t]}))),_&&!x&&!h&&(m?.labels?.no_terms||(0,tt.__)("Term items not found.")),!x&&(n||u)&&(0,Ye.jsx)(ot.RichText,{identifier:"suffix",allowedFormats:dy,className:"wp-block-post-terms__suffix","aria-label":(0,tt.__)("Suffix"),placeholder:" "+(0,tt.__)("Suffix"),value:u,onChange:e=>r({suffix:e}),tagName:"span",__unstableOnSplitAtEnd:()=>a((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))})]})]})}},by=()=>((0,ws.addFilter)("blocks.registerBlockType","core/template-part",gy),Xe({name:xy,metadata:hy,settings:_y})),yy=window.wp.wordcount;const fy=function({attributes:e,setAttributes:t,context:o}){const{textAlign:n}=e,{postId:r,postType:a}=o,[i]=(0,mt.useEntityProp)("postType",a,"content",r),[s]=(0,mt.useEntityBlockEditor)("postType",a,{id:r}),l=(0,_t.useMemo)((()=>{let e;e=i instanceof Function?i({blocks:s}):s?(0,Qe.__unstableSerializeAndClean)(s):i;const t=(0,tt._x)("words","Word count type. Do not translate!"),o=Math.max(1,Math.round((0,yy.count)(e||"",t)/189));return(0,tt.sprintf)((0,tt._n)("%s minute","%s minutes",o),o)}),[i,s]),c=(0,ot.useBlockProps)({className:dt({[`has-text-align-${n}`]:n})});return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.BlockControls,{group:"block",children:(0,Ye.jsx)(ot.AlignmentControl,{value:n,onChange:e=>{t({textAlign:e})}})}),(0,Ye.jsx)("div",{...c,children:l})]})},vy=(0,Ye.jsx)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,Ye.jsx)(et.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"})}),ky={$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:wy}=ky,Cy={icon:vy,edit:fy},jy=()=>Xe({name:wy,metadata:ky,settings:Cy});const Sy={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:so,isEligible:({style:e})=>e?.typography?.fontFamily},By=[Sy],Ty={$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},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"}},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:Ny}=Ty,Iy={icon:za,edit:function({attributes:{level:e,levelOptions:t,textAlign:o,isLink:n,rel:r,linkTarget:a},setAttributes:i,context:{postType:s,postId:l,queryId:c},insertBlocksAfter:u}){const d=0===e?"p":`h${e}`,p=Number.isFinite(c),m=(0,gt.useSelect)((e=>!p&&e(mt.store).canUser("update",{kind:"postType",name:s,id:l})),[p,s,l]),[g="",h,x]=(0,mt.useEntityProp)("postType",s,"title",l),[_]=(0,mt.useEntityProp)("postType",s,"link",l),b=()=>{u((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))},y=(0,ot.useBlockProps)({className:dt({[`has-text-align-${o}`]:o})}),f=(0,ot.useBlockEditingMode)();let v=(0,Ye.jsx)(d,{...y,children:(0,tt.__)("Title")});return s&&l&&(v=m?(0,Ye.jsx)(ot.PlainText,{tagName:d,placeholder:(0,tt.__)("No title"),value:g,onChange:h,__experimentalVersion:2,__unstableOnSplitAtEnd:b,...y}):(0,Ye.jsx)(d,{...y,dangerouslySetInnerHTML:{__html:x?.rendered}})),n&&s&&l&&(v=m?(0,Ye.jsx)(d,{...y,children:(0,Ye.jsx)(ot.PlainText,{tagName:"a",href:_,target:a,rel:r,placeholder:g.length?null:(0,tt.__)("No title"),value:g,onChange:h,__experimentalVersion:2,__unstableOnSplitAtEnd:b})}):(0,Ye.jsx)(d,{...y,children:(0,Ye.jsx)("a",{href:_,target:a,rel:r,onClick:e=>e.preventDefault(),dangerouslySetInnerHTML:{__html:x?.rendered}})})),(0,Ye.jsxs)(Ye.Fragment,{children:["default"===f&&(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsxs)(ot.BlockControls,{group:"block",children:[(0,Ye.jsx)(ot.HeadingLevelDropdown,{value:e,options:t,onChange:e=>i({level:e})}),(0,Ye.jsx)(ot.AlignmentControl,{value:o,onChange:e=>{i({textAlign:e})}})]}),(0,Ye.jsx)(ot.InspectorControls,{children:(0,Ye.jsxs)(et.PanelBody,{title:(0,tt.__)("Settings"),children:[(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Make title a link"),onChange:()=>i({isLink:!n}),checked:n}),n&&(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>i({linkTarget:e?"_blank":"_self"}),checked:"_blank"===a}),(0,Ye.jsx)(et.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link rel"),value:r,onChange:e=>i({rel:e})})]})]})})]}),v]})},deprecated:By},Py=()=>Xe({name:Ny,metadata:Ty,settings:Iy}),My=(0,Ye.jsx)(Ke.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ye.jsx)(Ke.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 zy={from:[{type:"block",blocks:["core/code","core/paragraph"],transform:({content:e,anchor:t})=>(0,Qe.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,Qe.createBlock)("core/paragraph",e)},{type:"block",blocks:["core/code"],transform:e=>(0,Qe.createBlock)("core/code",e)}]},Dy=zy,Ay={$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:Ry}=Ay,Hy={icon:My,example:{attributes:{content:(0,tt.__)("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:Dy,edit:function({attributes:e,mergeBlocks:t,setAttributes:o,onRemove:n,insertBlocksAfter:r,style:a}){const{content:i}=e,s=(0,ot.useBlockProps)({style:a});return(0,Ye.jsx)(ot.RichText,{tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:i,onChange:e=>{o({content:e})},onRemove:n,"aria-label":(0,tt.__)("Preformatted text"),placeholder:(0,tt.__)("Write preformatted text…"),onMerge:t,...s,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>r((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))})},save:function({attributes:e}){const{content:t}=e;return(0,Ye.jsx)("pre",{...ot.useBlockProps.save(),children:(0,Ye.jsx)(ot.RichText.Content,{value:t})})},merge:(e,t)=>({content:e.content+"\n\n"+t.content})},Ly=()=>Xe({name:Ry,metadata:Ay,settings:Hy}),Fy=(0,Ye.jsx)(Ke.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ye.jsx)(Ke.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"})}),Vy="is-style-solid-color",Ey={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 Oy(e){if(!e)return;const t=e.match(/border-color:([^;]+)[;]?/);return t&&t[1]?t[1]:void 0}function $y(e){const t=`${e=e||""}`.split("
");return t.shift(),t.pop(),t.join("
")}const Gy={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,r=!ot.RichText.isEmpty(o);return(0,Ye.jsx)("figure",{...ot.useBlockProps.save({className:dt({[`has-text-align-${t}`]:t})}),children:(0,Ye.jsxs)("blockquote",{children:[(0,Ye.jsx)(ot.RichText.Content,{value:n,multiline:!0}),r&&(0,Ye.jsx)(ot.RichText.Content,{tagName:"cite",value:o})]})})},migrate:({value:e,...t})=>({value:$y(e),...t})},Uy={attributes:{...Ey},save({attributes:e}){const{mainColor:t,customMainColor:o,customTextColor:n,textColor:r,value:a,citation:i,className:s}=e,l=s?.includes(Vy);let c,u;if(l){const e=(0,ot.getColorClassName)("background-color",t);c=dt({"has-background":e||o,[e]:e}),u={backgroundColor:e?void 0:o}}else o&&(u={borderColor:o});const d=(0,ot.getColorClassName)("color",r),p=dt({"has-text-color":r||n,[d]:d}),m=d?void 0:{color:n};return(0,Ye.jsx)("figure",{...ot.useBlockProps.save({className:c,style:u}),children:(0,Ye.jsxs)("blockquote",{className:p,style:m,children:[(0,Ye.jsx)(ot.RichText.Content,{value:a,multiline:!0}),!ot.RichText.isEmpty(i)&&(0,Ye.jsx)(ot.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,mainColor:o,customMainColor:n,customTextColor:r,...a}){const i=t?.includes(Vy);let s;return n&&(s=i?{color:{background:n}}:{border:{color:n}}),r&&s&&(s.color={...s.color,text:r}),{value:$y(e),className:t,backgroundColor:i?o:void 0,borderColor:i?void 0:o,textAlign:i?"left":void 0,style:s,...a}}},qy={attributes:{...Ey,figureStyle:{source:"attribute",selector:"figure",attribute:"style"}},save({attributes:e}){const{mainColor:t,customMainColor:o,textColor:n,customTextColor:r,value:a,citation:i,className:s,figureStyle:l}=e,c=s?.includes(Vy);let u,d;if(c){const e=(0,ot.getColorClassName)("background-color",t);u=dt({"has-background":e||o,[e]:e}),d={backgroundColor:e?void 0:o}}else if(o)d={borderColor:o};else if(t){d={borderColor:Oy(l)}}const p=(0,ot.getColorClassName)("color",n),m=(n||r)&&dt("has-text-color",{[p]:p}),g=p?void 0:{color:r};return(0,Ye.jsx)("figure",{className:u,style:d,children:(0,Ye.jsxs)("blockquote",{className:m,style:g,children:[(0,Ye.jsx)(ot.RichText.Content,{value:a,multiline:!0}),!ot.RichText.isEmpty(i)&&(0,Ye.jsx)(ot.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,figureStyle:o,mainColor:n,customMainColor:r,customTextColor:a,...i}){const s=t?.includes(Vy);let l;if(r&&(l=s?{color:{background:r}}:{border:{color:r}}),a&&l&&(l.color={...l.color,text:a}),!s&&n&&o){const n=Oy(o);if(n)return{value:$y(e),...i,className:t,style:{border:{color:n}}}}return{value:$y(e),className:t,backgroundColor:s?n:void 0,borderColor:s?void 0:n,textAlign:s?"left":void 0,style:l,...i}}},Wy={attributes:Ey,save({attributes:e}){const{mainColor:t,customMainColor:o,textColor:n,customTextColor:r,value:a,citation:i,className:s}=e,l=s?.includes(Vy);let c,u;if(l)c=(0,ot.getColorClassName)("background-color",t),c||(u={backgroundColor:o});else if(o)u={borderColor:o};else if(t){var d;const e=null!==(d=(0,gt.select)(ot.store).getSettings().colors)&&void 0!==d?d:[];u={borderColor:(0,ot.getColorObjectByAttributeValues)(e,t).color}}const p=(0,ot.getColorClassName)("color",n),m=n||r?dt("has-text-color",{[p]:p}):void 0,g=p?void 0:{color:r};return(0,Ye.jsx)("figure",{className:c,style:u,children:(0,Ye.jsxs)("blockquote",{className:m,style:g,children:[(0,Ye.jsx)(ot.RichText.Content,{value:a,multiline:!0}),!ot.RichText.isEmpty(i)&&(0,Ye.jsx)(ot.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,mainColor:o,customMainColor:n,customTextColor:r,...a}){const i=t?.includes(Vy);let s={};return n&&(s=i?{color:{background:n}}:{border:{color:n}}),r&&s&&(s.color={...s.color,text:r}),{value:$y(e),className:t,backgroundColor:i?o:void 0,borderColor:i?void 0:o,textAlign:i?"left":void 0,style:s,...a}}},Zy={attributes:{...Ey},save({attributes:e}){const{value:t,citation:o}=e;return(0,Ye.jsxs)("blockquote",{children:[(0,Ye.jsx)(ot.RichText.Content,{value:t,multiline:!0}),!ot.RichText.isEmpty(o)&&(0,Ye.jsx)(ot.RichText.Content,{tagName:"cite",value:o})]})},migrate:({value:e,...t})=>({value:$y(e),...t})},Qy={attributes:{...Ey,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,Ye.jsxs)("blockquote",{className:`align${n}`,children:[(0,Ye.jsx)(ot.RichText.Content,{value:t,multiline:!0}),!ot.RichText.isEmpty(o)&&(0,Ye.jsx)(ot.RichText.Content,{tagName:"footer",value:o})]})},migrate:({value:e,...t})=>({value:$y(e),...t})},Ky=[Gy,Uy,qy,Wy,Zy,Qy],Yy="web"===_t.Platform.OS;const Jy=function({attributes:e,setAttributes:t,isSelected:o,insertBlocksAfter:n}){const{textAlign:r,citation:a,value:i}=e,s=(0,ot.useBlockProps)({className:dt({[`has-text-align-${r}`]:r})}),l=!ot.RichText.isEmpty(a)||o;return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ot.BlockControls,{group:"block",children:(0,Ye.jsx)(ot.AlignmentControl,{value:r,onChange:e=>{t({textAlign:e})}})}),(0,Ye.jsx)("figure",{...s,children:(0,Ye.jsxs)("blockquote",{children:[(0,Ye.jsx)(ot.RichText,{identifier:"value",tagName:"p",value:i,onChange:e=>t({value:e}),"aria-label":(0,tt.__)("Pullquote text"),placeholder:(0,tt.__)("Add quote"),textAlign:"center"}),l&&(0,Ye.jsx)(ot.RichText,{identifier:"citation",tagName:Yy?"cite":void 0,style:{display:"block"},value:a,"aria-label":(0,tt.__)("Pullquote citation text"),placeholder:(0,tt.__)("Add citation"),onChange:e=>t({citation:e}),className:"wp-block-pullquote__citation",__unstableMobileNoFocusOnMount:!0,textAlign:"center",__unstableOnSplitAtEnd:()=>n((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))})]})})]})};const Xy={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,Qe.createBlock)("core/pullquote",{value:(0,Ao.toHTMLString)({value:(0,Ao.join)(e.map((({content:e})=>(0,Ao.create)({html:e}))),"\n")}),anchor:e.anchor})},{type:"block",blocks:["core/heading"],transform:({content:e,anchor:t})=>(0,Qe.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,Qe.createBlock)("core/paragraph",{content:e})),t&&o.push((0,Qe.createBlock)("core/paragraph",{content:t})),0===o.length?(0,Qe.createBlock)("core/paragraph",{content:""}):o}},{type:"block",blocks:["core/heading"],transform:({value:e,citation:t})=>{if(!e)return(0,Qe.createBlock)("core/heading",{content:t});const o=(0,Qe.createBlock)("core/heading",{content:e});return t?[o,(0,Qe.createBlock)("core/heading",{content:t})]:o}}]},ef=Xy,tf={$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:of}=tf,nf={icon:Fy,example:{attributes:{value:(0,tt.__)("One of the hardest things to do in technology is disrupt yourself."),citation:(0,tt.__)("Matt Mullenweg")}},transforms:ef,edit:Jy,save:function({attributes:e}){const{textAlign:t,citation:o,value:n}=e,r=!ot.RichText.isEmpty(o);return(0,Ye.jsx)("figure",{...ot.useBlockProps.save({className:dt({[`has-text-align-${t}`]:t})}),children:(0,Ye.jsxs)("blockquote",{children:[(0,Ye.jsx)(ot.RichText.Content,{tagName:"p",value:n}),r&&(0,Ye.jsx)(ot.RichText.Content,{tagName:"cite",value:o})]})})},deprecated:Ky},rf=()=>Xe({name:of,metadata:tf,settings:nf}),af=(0,Ye.jsx)(Ke.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ye.jsx)(Ke.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"})}),sf=e=>{const t=e?.reduce(((e,t)=>{const{mapById:o,mapByName:n,names:r}=e;return o[t.id]=t,n[t.name]=t,r.push(t.name),e}),{mapById:{},mapByName:{},names:[]});return{entities:e,...t}},lf=(e,t)=>{const o=t.split(".");let n=e;return o.forEach((e=>{n=n?.[e]})),n},cf=(e,t)=>(e||[]).map((e=>({...e,name:(0,Xo.decodeEntities)(lf(e,t))}))),uf=()=>{const e=(0,gt.useSelect)((e=>{const{getPostTypes:t}=e(mt.store),o=["attachment"],n=t({per_page:-1})?.filter((({viewable:e,slug:t})=>e&&!o.includes(t)));return n}),[]);return{postTypesTaxonomiesMap:(0,_t.useMemo)((()=>{if(e?.length)return e.reduce(((e,t)=>(e[t.slug]=t.taxonomies,e)),{})}),[e]),postTypesSelectOptions:(0,_t.useMemo)((()=>(e||[]).map((({labels:e,slug:t})=>({label:e.singular_name,value:t})))),[e]),postTypeFormatSupportMap:(0,_t.useMemo)((()=>e?.length?e.reduce(((e,t)=>(e[t.slug]=t.supports?.["post-formats"]||!1,e)),{}):{}),[e])}},df=e=>{const t=(0,gt.useSelect)((t=>{const{getTaxonomies:o,getPostType:n}=t(mt.store);return n(e)?.taxonomies?.length>0?o({type:e,per_page:-1}):[]}),[e]);return(0,_t.useMemo)((()=>t?.filter((({visibility:e})=>!!e?.publicly_queryable))),[t])};function pf(e,t){return!e||e.includes(t)}function mf(e,t){const o=(0,gt.useSelect)((e=>e(Qe.store).getActiveBlockVariation("core/query",t)?.name),[t]),n=`core/query/${o}`;return(0,gt.useSelect)((t=>{if(!o)return!1;const{getBlockRootClientId:r,getPatternsByBlockTypes:a}=t(ot.store),i=r(e);return a(n,i).length>0}),[e,o,n])?n:"core/query"}const gf=(e,t)=>(0,gt.useSelect)((o=>{const{getBlockRootClientId:n,getPatternsByBlockTypes:r}=o(ot.store),a=n(e);return r(t,a)}),[t,e]),hf=e=>(0,gt.useSelect)((t=>{const{getClientIdsOfDescendants:o,getBlockName:n}=t(ot.store),r={};return o(e).forEach((e=>{const t=n(e),o=Object.is((0,Qe.getBlockSupport)(t,"interactivity"),!0),a=(0,Qe.getBlockSupport)(t,"interactivity.clientNavigation");o||a?"core/post-content"===t&&(r.hasPostContentBlock=!0):r.hasBlocksFromPlugins=!0})),r.hasUnsupportedBlocks=r.hasBlocksFromPlugins||r.hasPostContentBlock,r}),[e]);function xf({enhancedPagination:e,setAttributes:t,clientId:o}){const{hasUnsupportedBlocks:n}=hf(o),r=window.__experimentalFullPageClientSideNavigation;let a=(0,tt.__)("Browsing between pages requires a full page reload.");return r?a=(0,tt.__)("Experimental full-page client-side navigation setting enabled."):e?a=(0,tt.__)("Reload the full page—instead of just the posts list—when visitors navigate between pages."):n&&(a=(0,tt.__)("Enhancement disabled because there are non-compatible blocks inside the Query block.")),(0,Ye.jsx)(Ye.Fragment,{children:(0,Ye.jsx)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Reload full page"),help:a,checked:!e&&!r,disabled:n||r,onChange:e=>{t({enhancedPagination:!e})}})})}function _f({openPatternSelectionModal:e,name:t,clientId:o}){const n=!!gf(o,t).length;return(0,Ye.jsx)(Ye.Fragment,{children:n&&(0,Ye.jsx)(et.ToolbarGroup,{className:"wp-block-template-part__block-control-group",children:(0,Ye.jsx)(et.ToolbarButton,{onClick:e,children:(0,tt.__)("Replace")})})})}const bf=[{label:(0,tt.__)("Newest to oldest"),value:"date/desc"},{label:(0,tt.__)("Oldest to newest"),value:"date/asc"},{label:(0,tt.__)("A → Z"),value:"title/asc"},{label:(0,tt.__)("Z → A"),value:"title/desc"}];const yf=function({order:e,orderBy:t,onChange:o}){return(0,Ye.jsx)(et.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Order by"),value:`${t}/${e}`,options:bf,onChange:e=>{const[t,n]=e.split("/");o({order:n,orderBy:t})}})},ff={who:"authors",per_page:-1,_fields:"id,name",context:"view"};const vf=function({value:e,onChange:t}){const o=(0,gt.useSelect)((e=>{const{getUsers:t}=e(mt.store);return t(ff)}),[]);if(!o)return null;const n=sf(o),r=(e?e.toString().split(","):[]).reduce(((e,t)=>{const o=n.mapById[t];return o&&e.push({id:t,value:o.name}),e}),[]);return(0,Ye.jsx)(et.FormTokenField,{label:(0,tt.__)("Authors"),value:r,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})},kf=[],wf={order:"asc",_fields:"id,title",context:"view"};const Cf=function({parents:e,postType:t,onChange:o}){const[n,r]=(0,_t.useState)(""),[a,i]=(0,_t.useState)(kf),[s,l]=(0,_t.useState)(kf),c=(0,Ut.useDebounce)(r,250),{searchResults:u,searchHasResolved:d}=(0,gt.useSelect)((o=>{if(!n)return{searchResults:kf,searchHasResolved:!0};const{getEntityRecords:r,hasFinishedResolution:a}=o(mt.store),i=["postType",t,{...wf,search:n,orderby:"relevance",exclude:e,per_page:20}];return{searchResults:r(...i),searchHasResolved:a("getEntityRecords",i)}}),[n,e]),p=(0,gt.useSelect)((o=>{if(!e?.length)return kf;const{getEntityRecords:n}=o(mt.store);return n("postType",t,{...wf,include:e,per_page:e.length})}),[e]);(0,_t.useEffect)((()=>{if(e?.length||i(kf),!p?.length)return;const t=sf(cf(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,_t.useMemo)((()=>u?.length?sf(cf(u,"title.rendered")):kf),[u]);return(0,_t.useEffect)((()=>{d&&l(m.names)}),[m.names,d]),(0,Ye.jsx)(et.FormTokenField,{__next40pxDefaultSize:!0,label:(0,tt.__)("Parents"),value:a,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(kf),o({parents:t})},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0})},jf=[],Sf={order:"asc",_fields:"id,name",context:"view"},Bf=(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 Tf({onChange:e,query:t}){const{postType:o,taxQuery:n}=t,r=df(o);return r&&0!==r.length?(0,Ye.jsx)(et.__experimentalVStack,{spacing:4,children:r.map((t=>{const o=n?.[t.slug]||[];return(0,Ye.jsx)(Nf,{taxonomy:t,termIds:o,onChange:o=>e({taxQuery:{...n,[t.slug]:o}})},t.slug)}))}):null}function Nf({taxonomy:e,termIds:t,onChange:o}){const[n,r]=(0,_t.useState)(""),[a,i]=(0,_t.useState)(jf),[s,l]=(0,_t.useState)(jf),c=(0,Ut.useDebounce)(r,250),{searchResults:u,searchHasResolved:d}=(0,gt.useSelect)((o=>{if(!n)return{searchResults:jf,searchHasResolved:!0};const{getEntityRecords:r,hasFinishedResolution:a}=o(mt.store),i=["taxonomy",e.slug,{...Sf,search:n,orderby:"name",exclude:t,per_page:20}];return{searchResults:r(...i),searchHasResolved:a("getEntityRecords",i)}}),[n,t]),p=(0,gt.useSelect)((o=>{if(!t?.length)return jf;const{getEntityRecords:n}=o(mt.store);return n("taxonomy",e.slug,{...Sf,include:t,per_page:t.length})}),[t]);(0,_t.useEffect)((()=>{if(t?.length||i(jf),!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,_t.useEffect)((()=>{d&&l(u.map((e=>e.name)))}),[u,d]);return(0,Ye.jsx)("div",{className:"block-library-query-inspector__taxonomy-control",children:(0,Ye.jsx)(et.FormTokenField,{label:e.name,value:a,onInputChange:c,suggestions:s,displayTransform:Xo.decodeEntities,onChange:e=>{const t=new Set;for(const o of e){const e=Bf(u,o);e&&t.add(e)}l(jf),o(Array.from(t))},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})})}const If=[{value:"aside",label:(0,tt.__)("Aside")},{value:"audio",label:(0,tt.__)("Audio")},{value:"chat",label:(0,tt.__)("Chat")},{value:"gallery",label:(0,tt.__)("Gallery")},{value:"image",label:(0,tt.__)("Image")},{value:"link",label:(0,tt.__)("Link")},{value:"quote",label:(0,tt.__)("Quote")},{value:"standard",label:(0,tt.__)("Standard")},{value:"status",label:(0,tt.__)("Status")},{value:"video",label:(0,tt.__)("Video")}].sort(((e,t)=>{const o=e.label.toUpperCase(),n=t.label.toUpperCase();return on?1:0}));function Pf(e,t){return e.map((e=>t.find((t=>t.label.toLocaleLowerCase()===e.toLocaleLowerCase()))?.value)).filter(Boolean)}function Mf({onChange:e,query:{format:t}}){const o=Array.isArray(t)?t:[t],{supportedFormats:n}=(0,gt.useSelect)((e=>({supportedFormats:e(mt.store).getThemeSupports().formats})),[]),r=If.filter((e=>n.includes(e.value))),a=o.map((e=>r.find((t=>t.value===e))?.label)).filter(Boolean),i=r.filter((e=>!o.includes(e.value))).map((e=>e.label));return(0,Ye.jsx)(et.FormTokenField,{label:(0,tt.__)("Formats"),value:a,suggestions:i,onChange:t=>{e({format:Pf(t,r)})},__experimentalShowHowTo:!1,__experimentalExpandOnFocus:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}const zf=[{label:(0,tt.__)("Include"),value:""},{label:(0,tt.__)("Exclude"),value:"exclude"},{label:(0,tt.__)("Only"),value:"only"}];function Df({value:e,onChange:t}){return(0,Ye.jsx)(et.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Sticky posts"),options:zf,value:e,onChange:t,help:(0,tt.__)("Sticky posts always appear first, regardless of their publish date.")})}const Af=({postType:e})=>{const t=(0,pt.addQueryArgs)("post-new.php",{post_type:e}),o=(0,gt.useSelect)((t=>{const{getPostType:o}=t(mt.store);return o(e)?.labels?.add_new_item}),[e]);return(0,Ye.jsx)("div",{className:"wp-block-query__create-new-link",children:(0,_t.createInterpolateElement)(""+o+"",{a:(0,Ye.jsx)("a",{href:t})})})},Rf=({perPage:e,offset:t=0,onChange:o})=>(0,Ye.jsx)(et.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,tt.__)("Posts per page"),min:1,max:100,onChange:e=>{isNaN(e)||e<1||e>100||o({perPage:e,offset:t})},value:parseInt(e,10)}),Hf=({offset:e=0,onChange:t})=>(0,Ye.jsx)(et.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,tt.__)("Offset"),value:e,min:0,onChange:e=>{isNaN(e)||e<0||e>100||t({offset:e})}}),Lf=({pages:e,onChange:t})=>(0,Ye.jsx)(et.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,tt.__)("Max pages"),value:e,min:0,onChange:e=>{isNaN(e)||e<0||t({pages:e})},help:(0,tt.__)("Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero).")}),{BlockInfo:Ff}=Ht(ot.privateApis);function Vf(e){const{attributes:t,setQuery:o,setDisplayLayout:n,isTemplate:r}=e,{query:a,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}=a,y=function(e){return(0,gt.useSelect)((t=>t(Qe.store).getActiveBlockVariation("core/query",e)?.allowedControls),[e])}(t),[f,v]=(0,_t.useState)("post"===d),{postTypesTaxonomiesMap:k,postTypesSelectOptions:w,postTypeFormatSupportMap:C}=uf(),j=df(d),S=function(e){return(0,gt.useSelect)((t=>{const o=t(mt.store).getPostType(e);return o?.viewable&&o?.hierarchical}),[e])}(d);(0,_t.useEffect)((()=>{v("post"===d)}),[d]);const B=e=>{const t={postType:e},n=k[e],r=Object.entries(x||{}).reduce(((e,[t,o])=>(n.includes(t)&&(e[t]=o),e)),{});t.taxQuery=Object.keys(r).length?r:void 0,"post"!==e&&(t.sticky=""),t.parents=[];C[e]||(t.format=[]),o(t)},[T,N]=(0,_t.useState)(a.search),I=(0,_t.useCallback)((0,Ut.debounce)((()=>{a.search!==T&&o({search:T})}),250),[T,a.search]);(0,_t.useEffect)((()=>(I(),I.cancel)),[T,I]);const P=r&&pf(y,"inherit"),M=!h&&pf(y,"postType"),z=(0,tt.__)("Post type"),D=(0,tt.__)("Select the type of content to display: posts, pages, or custom post types."),A=!h&&pf(y,"order"),R=!h&&f&&pf(y,"sticky"),H=P||M||A||R,L=!!j?.length&&pf(y,"taxQuery"),F=pf(y,"author"),V=pf(y,"search"),E=pf(y,"parents")&&S,O=C[d],$=(0,gt.useSelect)((e=>{if(!O||!pf(y,"format"))return!1;const t=e(mt.store).getThemeSupports();return t.formats&&t.formats.length>0&&t.formats.some((e=>"standard"!==e))}),[y,O]),G=L||F||V||E||$,U=Zt(),q=pf(y,"postCount"),W=pf(y,"offset"),Z=pf(y,"pages"),Q=q||W||Z;return(0,Ye.jsxs)(Ye.Fragment,{children:[!!d&&(0,Ye.jsx)(Ff,{children:(0,Ye.jsx)(Af,{postType:d})}),H&&(0,Ye.jsxs)(et.PanelBody,{title:(0,tt.__)("Settings"),children:[P&&(0,Ye.jsxs)(et.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,tt.__)("Query type"),isBlock:!0,onChange:e=>{o({inherit:!!e})},help:h?(0,tt.__)("Display a list of posts or custom post types based on the current template."):(0,tt.__)("Display a list of posts or custom post types based on specific criteria."),value:!!h,children:[(0,Ye.jsx)(et.__experimentalToggleGroupControlOption,{value:!0,label:(0,tt.__)("Default")}),(0,Ye.jsx)(et.__experimentalToggleGroupControlOption,{value:!1,label:(0,tt.__)("Custom")})]}),M&&(w.length>2?(0,Ye.jsx)(et.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,options:w,value:d,label:z,onChange:B,help:D}):(0,Ye.jsx)(et.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,value:d,label:z,onChange:B,help:D,children:w.map((e=>(0,Ye.jsx)(et.__experimentalToggleGroupControlOption,{value:e.value,label:e.label},e.value)))})),false,A&&(0,Ye.jsx)(yf,{order:s,orderBy:l,onChange:o}),R&&(0,Ye.jsx)(Df,{value:g,onChange:e=>o({sticky:e})})]}),!h&&Q&&(0,Ye.jsxs)(et.__experimentalToolsPanel,{className:"block-library-query-toolspanel__display",label:(0,tt.__)("Display"),resetAll:()=>{o({offset:0,pages:0})},dropdownMenuProps:U,children:[(0,Ye.jsx)(et.__experimentalToolsPanelItem,{label:(0,tt.__)("Items"),hasValue:()=>p>0,children:(0,Ye.jsx)(Rf,{perPage:p,offset:m,onChange:o})}),(0,Ye.jsx)(et.__experimentalToolsPanelItem,{label:(0,tt.__)("Offset"),hasValue:()=>m>0,onDeselect:()=>o({offset:0}),children:(0,Ye.jsx)(Hf,{offset:m,onChange:o})}),(0,Ye.jsx)(et.__experimentalToolsPanelItem,{label:(0,tt.__)("Max Pages to Show"),hasValue:()=>u>0,onDeselect:()=>o({pages:0}),children:(0,Ye.jsx)(Lf,{pages:u,onChange:o})})]}),!h&&G&&(0,Ye.jsxs)(et.__experimentalToolsPanel,{className:"block-library-query-toolspanel__filters",label:(0,tt.__)("Filters"),resetAll:()=>{o({author:"",parents:[],search:"",taxQuery:null,format:[]}),N("")},dropdownMenuProps:U,children:[L&&(0,Ye.jsx)(et.__experimentalToolsPanelItem,{label:(0,tt.__)("Taxonomies"),hasValue:()=>Object.values(x||{}).some((e=>!!e.length)),onDeselect:()=>o({taxQuery:null}),children:(0,Ye.jsx)(Tf,{onChange:o,query:a})}),F&&(0,Ye.jsx)(et.__experimentalToolsPanelItem,{hasValue:()=>!!c,label:(0,tt.__)("Authors"),onDeselect:()=>o({author:""}),children:(0,Ye.jsx)(vf,{value:c,onChange:o})}),V&&(0,Ye.jsx)(et.__experimentalToolsPanelItem,{hasValue:()=>!!T,label:(0,tt.__)("Keyword"),onDeselect:()=>N(""),children:(0,Ye.jsx)(et.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Keyword"),value:T,onChange:N})}),E&&(0,Ye.jsx)(et.__experimentalToolsPanelItem,{hasValue:()=>!!_?.length,label:(0,tt.__)("Parents"),onDeselect:()=>o({parents:[]}),children:(0,Ye.jsx)(Cf,{parents:_,postType:d,onChange:o})}),$&&(0,Ye.jsx)(et.__experimentalToolsPanelItem,{hasValue:()=>!!b?.length,label:(0,tt.__)("Formats"),onDeselect:()=>o({format:[]}),children:(0,Ye.jsx)(Mf,{onChange:o,query:a})})]})]})}const Ef="wp-block-query-enhanced-pagination-modal__description";function Of({clientId:e,attributes:{enhancedPagination:t},setAttributes:o}){const[n,r]=(0,_t.useState)(!1),{hasBlocksFromPlugins:a,hasPostContentBlock:i,hasUnsupportedBlocks:s}=hf(e);(0,_t.useEffect)((()=>{t&&s&&!window.__experimentalFullPageClientSideNavigation&&(o({enhancedPagination:!1}),r(!0))}),[t,s,o]);const l=()=>{r(!1)};let c=(0,tt.__)('If you still want to prevent full page reloads, remove that block, then disable "Reload full page" again in the Query Block settings.');return a?c=(0,tt.__)("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,tt.__)("Currently, avoiding full page reloads is not possible when a Content block is present inside the Query block.")+" "+c),n&&(0,Ye.jsx)(et.Modal,{title:(0,tt.__)("Query block: Reload full page enabled"),className:"wp-block-query__enhanced-pagination-modal",aria:{describedby:Ef},role:"alertdialog",focusOnMount:"firstElement",isDismissible:!1,onRequestClose:l,children:(0,Ye.jsxs)(et.__experimentalVStack,{alignment:"right",spacing:5,children:[(0,Ye.jsx)("span",{id:Ef,children:c}),(0,Ye.jsx)(et.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:l,children:(0,tt.__)("OK")})]})})}const $f=[["core/post-template"]];function Gf({attributes:e,setAttributes:t,openPatternSelectionModal:o,name:n,clientId:r,context:a}){const{queryId:i,query:s,displayLayout:l,enhancedPagination:c,tagName:u="div",query:{inherit:d}={}}=e,{postType:p}=a,{__unstableMarkNextChangeAsNotPersistent:m}=(0,gt.useDispatch)(ot.store),g=(0,Ut.useInstanceId)(Gf),h=(0,ot.useBlockProps)(),x=(0,ot.useInnerBlocksProps)(h,{template:$f}),_=(0,gt.useSelect)((e=>{const t=e(mt.store).__experimentalGetTemplateForLink()?.type;return"wp_template"===t&&!(void 0!==p)}),[p]),{postsPerPage:b}=(0,gt.useSelect)((e=>{const{getSettings:t}=e(ot.store),{getEntityRecord:o,getEntityRecordEdits:n,canUser:r}=e(mt.store),a=r("read",{kind:"root",name:"site"})?+o("root","site")?.posts_per_page:+t().postsPerPage;return{postsPerPage:+n("root","site")?.posts_per_page||a||3}}),[]),y=(0,_t.useCallback)((e=>t({query:{...s,...e}})),[s,t]);(0,_t.useEffect)((()=>{const e={};(d&&s.perPage!==b||!s.perPage&&b)&&(e.perPage=b),!_&&s.inherit&&(e.inherit=!1),Object.keys(e).length&&(m(),y(e))}),[s.perPage,b,d,_,s.inherit,m,y]),(0,_t.useEffect)((()=>{Number.isFinite(i)||(m(),t({queryId:g}))}),[i,g,m,t]);const f={main:(0,tt.__)("The element should be used for the primary content of your document only."),section:(0,tt.__)("The element should represent a standalone portion of the document that can't be better represented by another element."),aside:(0,tt.__)("The