/*! This file is auto-generated */ (()=>{var e,t,o={3533:e=>{"use strict";e.exports=window.wp.latexToMathml},7734:e=>{"use strict";e.exports=function e(t,o){if(t===o)return!0;if(t&&o&&"object"==typeof t&&"object"==typeof o){if(t.constructor!==o.constructor)return!1;var n,r,a;if(Array.isArray(t)){if((n=t.length)!=o.length)return!1;for(r=n;0!=r--;)if(!e(t[r],o[r]))return!1;return!0}if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(r of t.entries())if(!o.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],o.get(r[0])))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(r of t.entries())if(!o.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(o)){if((n=t.length)!=o.length)return!1;for(r=n;0!=r--;)if(t[r]!==o[r])return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if((n=(a=Object.keys(t)).length)!==Object.keys(o).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(o,a[r]))return!1;for(r=n;0!=r--;){var i=a[r];if(!e(t[i],o[i]))return!1}return!0}return t!=t&&o!=o}},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},o=Object.keys(t).join("|"),n=new RegExp(o,"g"),r=new RegExp(o,"");function a(e){return t[e]}var i=function(e){return e.replace(n,a)};e.exports=i,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=i}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={exports:{}};return o[e](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var a=Object.create(null);r.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&o;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>i[e]=()=>o[e]));return i.default=()=>o,r.d(a,i),a},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};(()=>{"use strict";r.r(a),r.d(a,{__experimentalGetCoreBlocks:()=>nP,__experimentalRegisterExperimentalCoreBlocks:()=>aP,privateApis:()=>oP,registerCoreBlocks:()=>rP});var e={};r.r(e),r.d(e,{init:()=>Pt,metadata:()=>Ct,name:()=>Tt,settings:()=>Nt});var t={};r.r(t),r.d(t,{init:()=>Ht,metadata:()=>Mt,name:()=>At,settings:()=>Lt});var o={};r.r(o),r.d(o,{init:()=>$t,metadata:()=>Rt,name:()=>Ot,settings:()=>Gt});var n={};r.r(n),r.d(n,{init:()=>Jt,metadata:()=>Ut,name:()=>Wt,settings:()=>Zt});var i={};r.r(i),r.d(i,{init:()=>eo,metadata:()=>Kt,name:()=>Yt,settings:()=>Xt});var s={};r.r(s),r.d(s,{init:()=>ho,metadata:()=>oo,name:()=>mo,settings:()=>go});var l={};r.r(l),r.d(l,{init:()=>Eo,metadata:()=>Ho,name:()=>Vo,settings:()=>Fo});var c={};r.r(c),r.d(c,{init:()=>Jo,metadata:()=>Go,name:()=>Wo,settings:()=>Zo});var u={};r.r(u),r.d(u,{init:()=>wn,metadata:()=>yn,name:()=>vn,settings:()=>kn});var d={};r.r(d),r.d(d,{init:()=>Hn,metadata:()=>zn,name:()=>An,settings:()=>Ln});var p={};r.r(p),r.d(p,{init:()=>$n,metadata:()=>Vn,name:()=>On,settings:()=>Gn});var m={};r.r(m),r.d(m,{init:()=>Yn,metadata:()=>qn,name:()=>Qn,settings:()=>Kn});var g={};r.r(g),r.d(g,{init:()=>ur,metadata:()=>sr,name:()=>lr,settings:()=>cr});var h={};r.r(h),r.d(h,{init:()=>fr,metadata:()=>pr,name:()=>xr,settings:()=>br});var _={};r.r(_),r.d(_,{init:()=>Tr,metadata:()=>jr,name:()=>Sr,settings:()=>Br});var x={};r.r(x),r.d(x,{init:()=>Wr,metadata:()=>Er,name:()=>Ur,settings:()=>qr});var b={};r.r(b),r.d(b,{init:()=>ia,metadata:()=>Jr,name:()=>ra,settings:()=>aa});var f={};r.r(f),r.d(f,{init:()=>ua,metadata:()=>sa,name:()=>la,settings:()=>ca});var y={};r.r(y),r.d(y,{init:()=>xa,metadata:()=>pa,name:()=>ha,settings:()=>_a});var v={};r.r(v),r.d(v,{init:()=>ka,metadata:()=>fa,name:()=>ya,settings:()=>va});var k={};r.r(k),r.d(k,{init:()=>Pa,metadata:()=>Ca,name:()=>Ta,settings:()=>Na});var w={};r.r(w),r.d(w,{init:()=>Aa,metadata:()=>Da,name:()=>Ma,settings:()=>za});var C={};r.r(C),r.d(C,{init:()=>Ea,metadata:()=>Ha,name:()=>Va,settings:()=>Fa});var j={};r.r(j),r.d(j,{init:()=>Xa,metadata:()=>Ga,name:()=>Ka,settings:()=>Ya});var S={};r.r(S),r.d(S,{init:()=>ai,metadata:()=>ti,name:()=>ni,settings:()=>ri});var B={};r.r(B),r.d(B,{init:()=>pi,metadata:()=>si,name:()=>ui,settings:()=>di});var T={};r.r(T),r.d(T,{init:()=>bi,metadata:()=>gi,name:()=>_i,settings:()=>xi});var N={};r.r(N),r.d(N,{init:()=>Ci,metadata:()=>yi,name:()=>ki,settings:()=>wi});var P={};r.r(P),r.d(P,{init:()=>Di,metadata:()=>Si,name:()=>Pi,settings:()=>Ii});var I={};r.r(I),r.d(I,{init:()=>zl,metadata:()=>Bl,name:()=>Dl,settings:()=>Ml});var D={};r.r(D),r.d(D,{init:()=>Gl,metadata:()=>Ll,name:()=>El,settings:()=>Ol});var M={};r.r(M),r.d(M,{init:()=>Pc,metadata:()=>yo,name:()=>Tc,settings:()=>Nc});var z={};r.r(z),r.d(z,{init:()=>Wc,metadata:()=>Oc,name:()=>Uc,settings:()=>qc});var A={};r.r(A),r.d(A,{init:()=>au,metadata:()=>Yc,name:()=>nu,settings:()=>ru});var L={};r.r(L),r.d(L,{init:()=>fu,metadata:()=>gu,name:()=>xu,settings:()=>bu});var H={};r.r(H),r.d(H,{init:()=>ju,metadata:()=>ku,name:()=>wu,settings:()=>Cu});var R={};r.r(R),r.d(R,{init:()=>zu,metadata:()=>Nu,name:()=>Du,settings:()=>Mu});var V={};r.r(V),r.d(V,{init:()=>Md,metadata:()=>Td,name:()=>Id,settings:()=>Dd});var F={};r.r(F),r.d(F,{init:()=>Kd,metadata:()=>Od,name:()=>Jd,settings:()=>Qd});var E={};r.r(E),r.d(E,{init:()=>kp,metadata:()=>hp,name:()=>yp,settings:()=>vp});var O={};r.r(O),r.d(O,{init:()=>Tp,metadata:()=>Cp,name:()=>Sp,settings:()=>Bp});var G={};r.r(G),r.d(G,{init:()=>Ap,metadata:()=>Ip,name:()=>Mp,settings:()=>zp});var $={};r.r($),r.d($,{init:()=>mm,metadata:()=>im,name:()=>dm,settings:()=>pm});var U={};r.r(U),r.d(U,{init:()=>bm,metadata:()=>hm,name:()=>_m,settings:()=>xm});var q={};r.r(q),r.d(q,{init:()=>zm,metadata:()=>ym,name:()=>Dm,settings:()=>Mm});var W={};r.r(W),r.d(W,{init:()=>cg,metadata:()=>og,name:()=>sg,settings:()=>lg});var Z={};r.r(Z),r.d(Z,{init:()=>bg,metadata:()=>mg,name:()=>_g,settings:()=>xg});var J={};r.r(J),r.d(J,{init:()=>Ig,metadata:()=>yg,name:()=>Ng,settings:()=>Pg});var Q={};r.r(Q),r.d(Q,{init:()=>Lg,metadata:()=>Mg,name:()=>zg,settings:()=>Ag});var K={};r.r(K),r.d(K,{init:()=>Bh,metadata:()=>vh,name:()=>jh,settings:()=>Sh});var Y={};r.r(Y),r.d(Y,{init:()=>Ih,metadata:()=>Th,name:()=>Nh,settings:()=>Ph});var X={};r.r(X),r.d(X,{init:()=>Rh,metadata:()=>zh,name:()=>Lh,settings:()=>Hh});var ee={};r.r(ee),r.d(ee,{init:()=>Sx,metadata:()=>Fh,name:()=>Cx,settings:()=>jx});var te={};r.r(te),r.d(te,{init:()=>Gx,metadata:()=>Bx,name:()=>Ex,settings:()=>Ox});var oe={};r.r(oe),r.d(oe,{init:()=>Yx,metadata:()=>$x,name:()=>Qx,settings:()=>Kx});var ne={};r.r(ne),r.d(ne,{init:()=>rb,metadata:()=>eb,name:()=>ob,settings:()=>nb});var re={};r.r(re),r.d(re,{init:()=>gb,metadata:()=>ab,name:()=>pb,settings:()=>mb});var ae={};r.r(ae),r.d(ae,{init:()=>Sb,metadata:()=>_b,name:()=>Cb,settings:()=>jb});var ie={};r.r(ie),r.d(ie,{init:()=>Ib,metadata:()=>Bb,name:()=>Nb,settings:()=>Pb});var se={};r.r(se),r.d(se,{init:()=>Xb,metadata:()=>qb,name:()=>Kb,settings:()=>Yb});var le={};r.r(le),r.d(le,{init:()=>lf,metadata:()=>tf,name:()=>af,settings:()=>sf});var ce={};r.r(ce),r.d(ce,{init:()=>gf,metadata:()=>cf,name:()=>pf,settings:()=>mf});var ue={};r.r(ue),r.d(ue,{init:()=>ff,metadata:()=>hf,name:()=>xf,settings:()=>bf});var de={};r.r(de),r.d(de,{init:()=>jf,metadata:()=>yf,name:()=>wf,settings:()=>Cf});var pe={};r.r(pe),r.d(pe,{init:()=>If,metadata:()=>Bf,name:()=>Nf,settings:()=>Pf});var me={};r.r(me),r.d(me,{init:()=>Lf,metadata:()=>Mf,name:()=>zf,settings:()=>Af});var ge={};r.r(ge),r.d(ge,{init:()=>Of,metadata:()=>Hf,name:()=>Ff,settings:()=>Ef});var he={};r.r(he),r.d(he,{init:()=>ey,metadata:()=>$f,name:()=>Yf,settings:()=>Xf});var _e={};r.r(_e),r.d(_e,{init:()=>dy,metadata:()=>ty,name:()=>cy,settings:()=>uy});var xe={};r.r(xe),r.d(xe,{init:()=>xy,metadata:()=>my,name:()=>hy,settings:()=>_y});var be={};r.r(be),r.d(be,{init:()=>Dy,metadata:()=>fy,name:()=>Py,settings:()=>Iy});var fe={};r.r(fe),r.d(fe,{init:()=>Fy,metadata:()=>My,name:()=>Ry,settings:()=>Vy});var ye={};r.r(ye),r.d(ye,{init:()=>Wy,metadata:()=>Ey,name:()=>Uy,settings:()=>qy});var ve={};r.r(ve),r.d(ve,{init:()=>nv,metadata:()=>Jy,name:()=>tv,settings:()=>ov});var ke={};r.r(ke),r.d(ke,{init:()=>mv,metadata:()=>av,name:()=>dv,settings:()=>pv});var we={};r.r(we),r.d(we,{init:()=>fv,metadata:()=>gv,name:()=>xv,settings:()=>bv});var Ce={};r.r(Ce),r.d(Ce,{init:()=>Sv,metadata:()=>vv,name:()=>Cv,settings:()=>jv});var je={};r.r(je),r.d(je,{init:()=>qv,metadata:()=>Ev,name:()=>$v,settings:()=>Uv});var Se={};r.r(Se),r.d(Se,{init:()=>aw,metadata:()=>Zv,name:()=>nw,settings:()=>rw});var Be={};r.r(Be),r.d(Be,{init:()=>uw,metadata:()=>iw,name:()=>lw,settings:()=>cw});var Te={};r.r(Te),r.d(Te,{init:()=>bw,metadata:()=>dw,name:()=>_w,settings:()=>xw});var Ne={};r.r(Ne),r.d(Ne,{init:()=>ww,metadata:()=>fw,name:()=>vw,settings:()=>kw});var Pe={};r.r(Pe),r.d(Pe,{init:()=>Tw,metadata:()=>Cw,name:()=>Sw,settings:()=>Bw});var Ie={};r.r(Ie),r.d(Ie,{init:()=>Mw,metadata:()=>Nw,name:()=>Iw,settings:()=>Dw});var De={};r.r(De),r.d(De,{init:()=>Ow,metadata:()=>zw,name:()=>Fw,settings:()=>Ew});var Me={};r.r(Me),r.d(Me,{init:()=>Jw,metadata:()=>Gw,name:()=>Ww,settings:()=>Zw});var ze={};r.r(ze),r.d(ze,{init:()=>gC,metadata:()=>cC,name:()=>pC,settings:()=>mC});var Ae={};r.r(Ae),r.d(Ae,{init:()=>PC,metadata:()=>_C,name:()=>TC,settings:()=>NC});var Le={};r.r(Le),r.d(Le,{init:()=>zC,metadata:()=>IC,name:()=>DC,settings:()=>MC});var He={};r.r(He),r.d(He,{init:()=>VC,metadata:()=>LC,name:()=>HC,settings:()=>RC});var Re={};r.r(Re),r.d(Re,{init:()=>WC,metadata:()=>EC,name:()=>UC,settings:()=>qC});var Ve={};r.r(Ve),r.d(Ve,{init:()=>oj,metadata:()=>QC,name:()=>ej,settings:()=>tj});var Fe={};r.r(Fe),r.d(Fe,{init:()=>cj,metadata:()=>ij,name:()=>sj,settings:()=>lj});var Ee={};r.r(Ee),r.d(Ee,{init:()=>yj,metadata:()=>dj,name:()=>bj,settings:()=>fj});var Oe={};r.r(Oe),r.d(Oe,{init:()=>Bj,metadata:()=>vj,name:()=>jj,settings:()=>Sj});var Ge={};r.r(Ge),r.d(Ge,{init:()=>Aj,metadata:()=>Nj,name:()=>Mj,settings:()=>zj});var $e={};r.r($e),r.d($e,{init:()=>qj,metadata:()=>Ej,name:()=>$j,settings:()=>Uj});var Ue={};r.r(Ue),r.d(Ue,{init:()=>eS,metadata:()=>Kj,name:()=>Yj,settings:()=>Xj});var qe={};r.r(qe),r.d(qe,{init:()=>gS,metadata:()=>uS,name:()=>pS,settings:()=>mS});var We={};r.r(We),r.d(We,{init:()=>eB,metadata:()=>WS,name:()=>YS,settings:()=>XS});var Ze={};r.r(Ze),r.d(Ze,{init:()=>dB,metadata:()=>oB,name:()=>cB,settings:()=>uB});var Je={};r.r(Je),r.d(Je,{init:()=>xB,metadata:()=>mB,name:()=>hB,settings:()=>_B});var Qe={};r.r(Qe),r.d(Qe,{init:()=>QB,metadata:()=>jB,name:()=>ZB,settings:()=>JB});var Ke={};r.r(Ke),r.d(Ke,{init:()=>lT,metadata:()=>YB,name:()=>iT,settings:()=>sT});var Ye={};r.r(Ye),r.d(Ye,{init:()=>gT,metadata:()=>uT,name:()=>pT,settings:()=>mT});var Xe={};r.r(Xe),r.d(Xe,{init:()=>yT,metadata:()=>_T,name:()=>bT,settings:()=>fT});var et={};r.r(et),r.d(et,{init:()=>UT,metadata:()=>vT,name:()=>GT,settings:()=>$T});var tt={};r.r(tt),r.d(tt,{init:()=>YT,metadata:()=>qT,name:()=>QT,settings:()=>KT});var ot={};r.r(ot),r.d(ot,{init:()=>nN,metadata:()=>XT,name:()=>tN,settings:()=>oN});var nt={};r.r(nt),r.d(nt,{init:()=>pN,metadata:()=>sN,name:()=>uN,settings:()=>dN});var rt={};r.r(rt),r.d(rt,{init:()=>zN,metadata:()=>gN,name:()=>DN,settings:()=>MN});var at={};r.r(at),r.d(at,{init:()=>JN,metadata:()=>AN,name:()=>WN,settings:()=>ZN});const it=window.ReactJSXRuntime,st=window.wp.blocks,lt=window.wp.data,ct=window.wp.blockEditor,ut=window.wp.serverSideRender;var dt=r.n(ut);const pt=window.wp.i18n,mt=window.wp.components,gt=window.wp.element,ht=window.wp.blob,_t=window.wp.coreData,xt=window.wp.compose;function bt(e,t,o){return(0,lt.useSelect)((n=>n(_t.store).canUser("update",{kind:e,name:t,id:o})),[e,t,o])}function ft(e={}){const t=(0,gt.useRef)(e),o=(0,gt.useRef)(!1),{getSettings:n}=(0,lt.useSelect)(ct.store);(0,gt.useLayoutEffect)((()=>{t.current=e})),(0,gt.useEffect)((()=>{if(o.current)return;if(!t.current.url||!(0,ht.isBlobURL)(t.current.url))return;const e=(0,ht.getBlobByURL)(t.current.url);if(!e)return;const{url:r,allowedTypes:a,onChange:i,onError:s}=t.current,{mediaUpload:l}=n();l&&(o.current=!0,l({filesList:[e],allowedTypes:a,onFileChange:([e])=>{(0,ht.isBlobURL)(e?.url)||((0,ht.revokeBlobURL)(r),i(e),o.current=!1)},onError:e=>{(0,ht.revokeBlobURL)(r),s(e),o.current=!1}}))}),[n])}function yt(){const{avatarURL:e}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store),{__experimentalDiscussionSettings:o}=t();return o}));return e}function vt(){return(0,xt.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}const kt="core/accordion-item",wt={name:kt};const Ct=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion","title":"Accordion","category":"design","description":"Displays a foldable layout that groups content in collapsible sections.","example":{},"supports":{"anchor":true,"html":false,"align":["wide","full"],"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"background":true,"gradients":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"spacing":{"padding":true,"margin":["top","bottom"],"blockGap":true},"shadow":true,"layout":true,"ariaLabel":true,"interactivity":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"contentRole":true},"attributes":{"iconPosition":{"type":"string","default":"right"},"showIcon":{"type":"boolean","default":true},"autoclose":{"type":"boolean","default":false},"headingLevel":{"type":"number","default":3},"levelOptions":{"type":"array"}},"providesContext":{"core/accordion-icon-position":"iconPosition","core/accordion-show-icon":"showIcon","core/accordion-heading-level":"headingLevel"},"allowedBlocks":["core/accordion-item"],"textdomain":"default","viewScriptModule":"@wordpress/block-library/accordion/view"}');function jt(e){if(!e)return;const{metadata:t,settings:o,name:n}=e;return(0,st.registerBlockType)({name:n,...t},o)}const St=window.wp.primitives;var Bt=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 9.25L9.5 9.25L9.5 7.75L19.5 7.75L19.5 9.25Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{d:"M4.5 6L8.5 8.5L4.5 11L4.5 6Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 16.25L9.5 16.25L9.5 14.75L19.5 14.75L19.5 16.25Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{d:"M4.5 13L8.5 15.5L4.5 18L4.5 13Z",fill:"currentColor"})]});const{name:Tt}=Ct,Nt={icon:Bt,example:{innerBlocks:[{name:"core/accordion-item",innerBlocks:[{name:"core/accordion-heading",attributes:{title:(0,pt.__)("Lorem ipsum dolor sit amet, consectetur.")}}]},{name:"core/accordion-item",innerBlocks:[{name:"core/accordion-heading",attributes:{title:(0,pt.__)("Suspendisse commodo lacus, interdum et.")}}]}]},edit:function({attributes:{autoclose:e,iconPosition:t,showIcon:o,headingLevel:n,levelOptions:r},clientId:a,setAttributes:i,isSelected:s}){const l=(0,lt.useRegistry)(),{getBlockOrder:c}=(0,lt.useSelect)(ct.store),u=(0,ct.useBlockProps)({role:"group"}),d=vt(),{updateBlockAttributes:p,insertBlock:m}=(0,lt.useDispatch)(ct.store),g="contentOnly"===(0,ct.useBlockEditingMode)(),h=(0,ct.useInnerBlocksProps)(u,{template:[[kt]],defaultBlock:wt,directInsert:!0,templateInsertUpdatesSelection:!0});return(0,it.jsxs)(it.Fragment,{children:[s&&!g&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(ct.HeadingLevelDropdown,{value:n,options:r,onChange:e=>{const t=c(a),o=[];t.forEach((e=>{const t=c(e);o.push(...t)})),l.batch((()=>{i({headingLevel:e}),p(o,{level:e})}))}})})}),(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(mt.ToolbarButton,{onClick:()=>{const e=(0,st.createBlock)(kt,{},[(0,st.createBlock)("core/accordion-heading",{level:n}),(0,st.createBlock)("core/accordion-panel",{})]);m(e,void 0,a)},children:(0,pt.__)("Add item")})})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{i({autoclose:!1,showIcon:!0,iconPosition:"right"})},dropdownMenuProps:d,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Auto-close"),isShownByDefault:!0,hasValue:()=>!!e,onDeselect:()=>i({autoclose:!1}),children:(0,it.jsx)(mt.ToggleControl,{isBlock:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Auto-close"),onChange:e=>{i({autoclose:e})},checked:e,help:(0,pt.__)("Automatically close accordions when a new one is opened.")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show icon"),isShownByDefault:!0,hasValue:()=>!o,onDeselect:()=>i({showIcon:!0}),children:(0,it.jsx)(mt.ToggleControl,{isBlock:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show icon"),onChange:e=>{i({showIcon:e,iconPosition:e?t:"right"})},checked:o,help:(0,pt.__)("Display a plus icon next to the accordion header.")})}),o&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Icon Position"),isShownByDefault:!0,hasValue:()=>"right"!==t,onDeselect:()=>i({iconPosition:"right"}),children:(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,pt.__)("Icon Position"),value:t,onChange:e=>{i({iconPosition:e})},children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{label:(0,pt.__)("Left"),value:"left"}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{label:(0,pt.__)("Right"),value:"right"})]})})]})},"setting"),(0,it.jsx)("div",{...h})]})},save:function(){const e=ct.useBlockProps.save({role:"group"});return(0,it.jsx)("div",{...ct.useInnerBlocksProps.save(e)})}},Pt=()=>jt({name:Tt,metadata:Ct,settings:Nt});function It(e){var t,o,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t{const{isBlockSelected:o,hasSelectedInnerBlock:n,getBlockOrder:r}=e(ct.store);return{isSelected:o(t)||n(t,!0),getBlockOrder:r}}),[t]),l=s(t)[1],{updateBlockAttributes:c,__unstableMarkNextChangeAsNotPersistent:u}=(0,lt.useDispatch)(ct.store);(0,gt.useEffect)((()=>{l&&(u(),c(l,{isSelected:i}))}),[i,l,u,c]);const d=(0,ct.useBlockProps)({className:Dt({"is-open":r||i})}),p=n&&n["core/accordion-heading-level"],m=(0,ct.useInnerBlocksProps)(d,{template:[["core/accordion-heading",p?{level:p}:{}],["core/accordion-panel",{openByDefault:r}]],templateLock:"all",directInsert:!0,templateInsertUpdatesSelection:!0});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({openByDefault:!1}),l&&c(l,{openByDefault:!1})},dropdownMenuProps:a,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open by default"),isShownByDefault:!0,hasValue:()=>!!r,onDeselect:()=>{o({openByDefault:!1}),l&&c(l,{openByDefault:!1})},children:(0,it.jsx)(mt.ToggleControl,{label:(0,pt.__)("Open by default"),__nextHasNoMarginBottom:!0,onChange:e=>{o({openByDefault:e}),l&&c(l,{openByDefault:e})},checked:r,help:(0,pt.__)("Accordion content will be displayed by default.")})})})},"setting"),(0,it.jsx)("div",{...m})]})},save:function({attributes:e}){const{openByDefault:t}=e,o=ct.useBlockProps.save({className:Dt({"is-open":t})}),n=ct.useInnerBlocksProps.save(o);return(0,it.jsx)("div",{...n})}},Ht=()=>jt({name:At,metadata:Mt,settings:Lt});const Rt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-heading","title":"Accordion Heading","category":"design","description":"Displays a heading that toggles the accordion panel.","parent":["core/accordion-item"],"usesContext":["core/accordion-icon-position","core/accordion-show-icon","core/accordion-heading-level"],"supports":{"anchor":true,"color":{"background":true,"gradients":true},"align":false,"interactivity":true,"spacing":{"padding":true,"__experimentalDefaultControls":{"padding":true},"__experimentalSkipSerialization":true,"__experimentalSelector":".wp-block-accordion-heading__toggle"},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"__experimentalSkipSerialization":["textDecoration","letterSpacing"],"fontSize":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true,"fontFamily":true}},"shadow":true,"visibility":false,"lock":false},"selectors":{"typography":{"letterSpacing":".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title","textDecoration":".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title"}},"attributes":{"openByDefault":{"type":"boolean","default":false},"title":{"type":"rich-text","source":"rich-text","selector":".wp-block-accordion-heading__toggle-title","role":"content"},"level":{"type":"number"},"iconPosition":{"type":"string","enum":["left","right"],"default":"right"},"showIcon":{"type":"boolean","default":true}},"textdomain":"default"}');var Vt=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 12.75L9.5 12.75L9.5 11.25L19.5 11.25L19.5 12.75Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{d:"M4.5 9.5L8.5 12L4.5 14.5L4.5 9.5Z",fill:"currentColor"})]});const Ft={attributes:{openByDefault:{type:"boolean",default:!1},title:{type:"rich-text",source:"rich-text",selector:".wp-block-accordion-heading__toggle-title",role:"content"},level:{type:"number"},iconPosition:{type:"string",enum:["left","right"],default:"right"},showIcon:{type:"boolean",default:!0}},supports:{anchor:!0,color:{background:!0,gradients:!0},align:!1,interactivity:!0,spacing:{padding:!0,__experimentalDefaultControls:{padding:!0},__experimentalSkipSerialization:!0,__experimentalSelector:".wp-block-accordion-heading__toggle"},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,fontFamily:!0}},shadow:!0,visibility:!1},save({attributes:e}){const{level:t,title:o,iconPosition:n,showIcon:r}=e,a="h"+(t||3),i=ct.useBlockProps.save(),s=(0,ct.__experimentalGetSpacingClassesAndStyles)(e);return(0,it.jsx)(a,{...i,children:(0,it.jsxs)("button",{className:"wp-block-accordion-heading__toggle",style:s.style,children:[r&&"left"===n&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"}),(0,it.jsx)(ct.RichText.Content,{className:"wp-block-accordion-heading__toggle-title",tagName:"span",value:o}),r&&"right"===n&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"})]})})}};var Et=[Ft];const{name:Ot}=Rt,Gt={icon:Vt,edit:function({attributes:e,setAttributes:t,context:o}){const{title:n}=e,{"core/accordion-icon-position":r,"core/accordion-show-icon":a,"core/accordion-heading-level":i}=o,s="h"+i;(0,gt.useEffect)((()=>{void 0!==r&&void 0!==a&&t({iconPosition:r,showIcon:a})}),[r,a,t]);const[l,c]=(0,ct.useSettings)("typography.fluid","layout"),u=(0,ct.getTypographyClassesAndStyles)(e,{typography:{fluid:l},layout:{wideSize:c?.wideSize}}),d=(0,ct.useBlockProps)(),p=(0,ct.__experimentalGetSpacingClassesAndStyles)(e);return(0,it.jsx)(s,{...d,children:(0,it.jsxs)("button",{className:"wp-block-accordion-heading__toggle",style:p.style,tabIndex:"-1",children:[a&&"left"===r&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"}),(0,it.jsx)(ct.RichText,{withoutInteractiveFormatting:!0,disableLineBreaks:!0,tagName:"span",value:n,onChange:e=>t({title:e}),placeholder:(0,pt.__)("Accordion title"),className:"wp-block-accordion-heading__toggle-title",style:{letterSpacing:u.style.letterSpacing,textDecoration:u.style.textDecoration}}),a&&"right"===r&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"})]})})},save:function({attributes:e}){const{level:t,title:o,iconPosition:n,showIcon:r}=e,a="h"+(t||3),i=(0,ct.getTypographyClassesAndStyles)(e),s=ct.useBlockProps.save(),l=(0,ct.__experimentalGetSpacingClassesAndStyles)(e);return(0,it.jsx)(a,{...s,children:(0,it.jsxs)("button",{className:"wp-block-accordion-heading__toggle",style:l.style,children:[r&&"left"===n&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"}),(0,it.jsx)(ct.RichText.Content,{className:"wp-block-accordion-heading__toggle-title",tagName:"span",value:o,style:{letterSpacing:i.style.letterSpacing,textDecoration:i.style.textDecoration}}),r&&"right"===n&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"})]})})},deprecated:Et},$t=()=>jt({name:Ot,metadata:Rt,settings:Gt});const Ut=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-panel","title":"Accordion Panel","category":"design","description":"Contains the hidden or revealed content beneath the heading.","parent":["core/accordion-item"],"supports":{"html":false,"color":{"background":true,"gradients":true},"interactivity":true,"spacing":{"padding":true,"blockGap":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"shadow":true,"layout":{"allowEditing":false},"visibility":false,"contentRole":true,"allowedBlocks":true,"lock":false},"attributes":{"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false],"default":false},"openByDefault":{"type":"boolean","default":false},"isSelected":{"type":"boolean","default":false}},"textdomain":"default","style":"wp-block-accordion-panel"}');var qt=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M8.10417 6.00024H6.5C5.39543 6.00024 4.5 6.89567 4.5 8.00024V10.3336H6V8.00024C6 7.7241 6.22386 7.50024 6.5 7.50024H8.10417V6.00024ZM4.5 13.6669V16.0002C4.5 17.1048 5.39543 18.0002 6.5 18.0002H8.10417V16.5002H6.5C6.22386 16.5002 6 16.2764 6 16.0002V13.6669H4.5ZM10.3958 6.00024V7.50024H13.6042V6.00024H10.3958ZM15.8958 6.00024V7.50024H17.5C17.7761 7.50024 18 7.7241 18 8.00024V10.3336H19.5V8.00024C19.5 6.89567 18.6046 6.00024 17.5 6.00024H15.8958ZM19.5 13.6669H18V16.0002C18 16.2764 17.7761 16.5002 17.5 16.5002H15.8958V18.0002H17.5C18.6046 18.0002 19.5 17.1048 19.5 16.0002V13.6669ZM13.6042 18.0002V16.5002H10.3958V18.0002H13.6042Z",fill:"currentColor"})});const{name:Wt}=Ut,Zt={icon:qt,edit:function({attributes:e}){const{allowedBlocks:t,templateLock:o,openByDefault:n,isSelected:r}=e,a=(0,ct.useBlockProps)({"aria-hidden":!r&&!n,role:"region"}),i=(0,ct.useInnerBlocksProps)(a,{allowedBlocks:t,template:[["core/paragraph",{}]],templateLock:o});return(0,it.jsx)("div",{...i})},save:function(){const e=ct.useBlockProps.save({role:"region"}),t=ct.useInnerBlocksProps.save(e);return(0,it.jsx)("div",{...t})}},Jt=()=>jt({name:Wt,metadata:Ut,settings:Zt});var Qt=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"})});const Kt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/archives","title":"Archives","category":"widgets","description":"Display a date archive of your posts.","textdomain":"default","attributes":{"displayAsDropdown":{"type":"boolean","default":false},"showLabel":{"type":"boolean","default":true},"showPostCounts":{"type":"boolean","default":false},"type":{"type":"string","default":"monthly"}},"supports":{"align":true,"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-archives-editor"}');const{name:Yt}=Kt,Xt={icon:Qt,example:{},edit:function({attributes:e,setAttributes:t}){const{showLabel:o,showPostCounts:n,displayAsDropdown:r,type:a}=e,i=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({displayAsDropdown:!1,showLabel:!0,showPostCounts:!1,type:"monthly"})},dropdownMenuProps:i,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Display as dropdown"),isShownByDefault:!0,hasValue:()=>r,onDeselect:()=>t({displayAsDropdown:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display as dropdown"),checked:r,onChange:()=>t({displayAsDropdown:!r})})}),r&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show label"),isShownByDefault:!0,hasValue:()=>!o,onDeselect:()=>t({showLabel:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show label"),checked:o,onChange:()=>t({showLabel:!o})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show post counts"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>t({showPostCounts:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show post counts"),checked:n,onChange:()=>t({showPostCounts:!n})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Group by"),isShownByDefault:!0,hasValue:()=>"monthly"!==a,onDeselect:()=>t({type:"monthly"}),children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Group by"),options:[{label:(0,pt.__)("Year"),value:"yearly"},{label:(0,pt.__)("Month"),value:"monthly"},{label:(0,pt.__)("Week"),value:"weekly"},{label:(0,pt.__)("Day"),value:"daily"}],value:a,onChange:e=>t({type:e})})})]})}),(0,it.jsx)("div",{...(0,ct.useBlockProps)(),children:(0,it.jsx)(mt.Disabled,{children:(0,it.jsx)(dt(),{block:"core/archives",skipBlockSupportAttributes:!0,attributes:e})})})]})}},eo=()=>jt({name:Yt,metadata:Kt,settings:Xt});var to=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"})});const oo=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/avatar","title":"Avatar","category":"theme","description":"Add a user’s avatar.","textdomain":"default","attributes":{"userId":{"type":"number"},"size":{"type":"number","default":96},"isLink":{"type":"boolean","default":false},"linkTarget":{"type":"string","default":"_self"}},"usesContext":["postType","postId","commentId"],"supports":{"html":false,"align":true,"alignWide":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"__experimentalSkipSerialization":true,"radius":true,"width":true,"color":true,"style":true,"__experimentalDefaultControls":{"radius":true}},"color":{"text":false,"background":false},"filter":{"duotone":true},"interactivity":{"clientNavigation":true}},"selectors":{"border":".wp-block-avatar img","filter":{"duotone":".wp-block-avatar img"}},"editorStyle":"wp-block-avatar-editor","style":"wp-block-avatar"}'),no=window.wp.url;function ro(e){const t=e?e[0]:24,o=e?e[e.length-1]:96;return{minSize:t,maxSize:Math.floor(2.5*o)}}const ao=window.wp.htmlEntities,io={who:"authors",per_page:100,_fields:"id,name",context:"view"};function so({value:e,onChange:t}){const[o,n]=(0,gt.useState)(""),{authors:r,isLoading:a}=(0,lt.useSelect)((e=>{const{getUsers:t,isResolving:n}=e(_t.store),r={...io};return o&&(r.search=o,r.search_columns=["name"]),{authors:t(r),isLoading:n("getUsers",[r])}}),[o]),i=(0,gt.useMemo)((()=>(r??[]).map((e=>({value:e.id,label:(0,ao.decodeEntities)(e.name)})))),[r]);return(0,it.jsx)(mt.ComboboxControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("User"),help:(0,pt.__)("Select the avatar user to display, if it is blank it will use the post/page author."),value:e,onChange:t,options:i,onFilterValueChange:(0,xt.debounce)(n,300),isLoading:a})}const lo=({setAttributes:e,avatar:t,attributes:o,selectUser:n})=>{const r=vt();return(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{e({size:96,isLink:!1,linkTarget:"_self",userId:void 0})},dropdownMenuProps:r,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Image size"),isShownByDefault:!0,hasValue:()=>96!==o?.size,onDeselect:()=>e({size:96}),children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Image size"),onChange:t=>e({size:t}),min:t.minSize,max:t.maxSize,initialPosition:o?.size,value:o?.size})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link to user profile"),isShownByDefault:!0,hasValue:()=>o?.isLink,onDeselect:()=>e({isLink:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link to user profile"),onChange:()=>e({isLink:!o.isLink}),checked:o.isLink})}),o.isLink&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_self"!==o?.linkTarget,onDeselect:()=>e({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:t=>e({linkTarget:t?"_blank":"_self"}),checked:"_blank"===o.linkTarget})}),n&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("User"),isShownByDefault:!0,hasValue:()=>!!o?.userId,onDeselect:()=>e({userId:void 0}),children:(0,it.jsx)(so,{value:o?.userId,onChange:t=>{e({userId:t})}})})]})})},co=({setAttributes:e,attributes:t,avatar:o,blockProps:n,isSelected:r})=>{const a=(0,ct.__experimentalUseBorderProps)(t),i=(0,no.addQueryArgs)((0,no.removeQueryArgs)(o?.src,["s"]),{s:2*t?.size});return(0,it.jsx)("div",{...n,children:(0,it.jsx)(mt.ResizableBox,{size:{width:t.size,height:t.size},showHandle:r,onResizeStop:(o,n,r,a)=>{e({size:parseInt(t.size+(a.height||a.width),10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,pt.isRTL)(),bottom:!0,left:(0,pt.isRTL)()},minWidth:o.minSize,maxWidth:o.maxSize,children:(0,it.jsx)("img",{src:i,alt:o.alt,className:Dt("avatar","avatar-"+t.size,"photo","wp-block-avatar__image",a.className),style:a.style})})})},uo=({attributes:e,context:t,setAttributes:o,isSelected:n})=>{const{commentId:r}=t,a=(0,ct.useBlockProps)(),i=function({commentId:e}){const[t]=(0,_t.useEntityProp)("root","comment","author_avatar_urls",e),[o]=(0,_t.useEntityProp)("root","comment","author_name",e),n=t?Object.values(t):null,r=t?Object.keys(t):null,{minSize:a,maxSize:i}=ro(r),s=yt();return{src:n?n[n.length-1]:s,minSize:a,maxSize:i,alt:o?(0,pt.sprintf)((0,pt.__)("%s Avatar"),o):(0,pt.__)("Default Avatar")}}({commentId:r});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(lo,{avatar:i,setAttributes:o,attributes:e,selectUser:!1}),e.isLink?(0,it.jsx)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault(),children:(0,it.jsx)(co,{attributes:e,avatar:i,blockProps:a,isSelected:n,setAttributes:o})}):(0,it.jsx)(co,{attributes:e,avatar:i,blockProps:a,isSelected:n,setAttributes:o})]})},po=({attributes:e,context:t,setAttributes:o,isSelected:n})=>{const{postId:r,postType:a}=t,i=function({userId:e,postId:t,postType:o}){const{authorDetails:n}=(0,lt.useSelect)((n=>{const{getEditedEntityRecord:r,getUser:a}=n(_t.store);if(e)return{authorDetails:a(e)};const i=r("postType",o,t)?.author;return{authorDetails:i?a(i):null}}),[o,t,e]),r=n?.avatar_urls?Object.values(n.avatar_urls):null,a=n?.avatar_urls?Object.keys(n.avatar_urls):null,{minSize:i,maxSize:s}=ro(a),l=yt();return{src:r?r[r.length-1]:l,minSize:i,maxSize:s,alt:n?(0,pt.sprintf)((0,pt.__)("%s Avatar"),n?.name):(0,pt.__)("Default Avatar")}}({userId:e?.userId,postId:r,postType:a}),s=(0,ct.useBlockProps)();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(lo,{selectUser:!0,attributes:e,avatar:i,setAttributes:o}),e.isLink?(0,it.jsx)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault(),children:(0,it.jsx)(co,{attributes:e,avatar:i,blockProps:s,isSelected:n,setAttributes:o})}):(0,it.jsx)(co,{attributes:e,avatar:i,blockProps:s,isSelected:n,setAttributes:o})]})};const{name:mo}=oo,go={icon:to,edit:function(e){return e?.context?.commentId||null===e?.context?.commentId?(0,it.jsx)(uo,{...e}):(0,it.jsx)(po,{...e})},example:{}},ho=()=>jt({name:mo,metadata:oo,settings:go});var _o=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"})}),xo=[{attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{align:!0},save({attributes:e}){const{autoplay:t,caption:o,loop:n,preload:r,src:a}=e;return(0,it.jsxs)("figure",{children:[(0,it.jsx)("audio",{controls:"controls",src:a,autoPlay:t,loop:n,preload:r}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:o})]})}}];const bo=window.wp.notices;function fo(e,t){var o,n,r=0;function a(){var a,i,s=o,l=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(i=0;ie&&e.includes('class="wp-embedded-content"'),No=(e,t={})=>{const{preview:o,attributes:n={}}=e,{url:r,providerNameSlug:a,type:i,...s}=n;if(!r||!(0,st.getBlockType)(So))return;const l=(e=>(0,st.getBlockVariations)(So)?.find((({patterns:t})=>((e,t=[])=>t.some((t=>e.match(t))))(e,t))))(r),c="wordpress"===a||i===ko;if(!c&&l&&(l.attributes.providerNameSlug!==a||!a))return(0,st.createBlock)(So,{url:r,...s,...l.attributes});const u=(0,st.getBlockVariations)(So)?.find((({name:e})=>"wordpress"===e));return u&&o&&To(o.html)&&!c?(0,st.createBlock)(So,{url:r,...u.attributes,...t}):void 0},Po=e=>{if(!e)return e;const t=vo.reduce(((e,{className:t})=>(e.push(t),e)),["wp-has-aspect-ratio"]);let o=e;for(const e of t)o=o.replace(e,"");return o.trim()};function Io(e,t,o=!0){if(!o)return Po(t);const n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;const r=n.body.querySelector("iframe");if(r&&r.height&&r.width){const e=(r.width/r.height).toFixed(2);for(let o=0;o=n.ratio){return e-n.ratio>.1?Po(t):Dt(Po(t),n.className,"wp-has-aspect-ratio")}}}return t}const Do=fo(((e,t,o,n,r=!0)=>{if(!e)return{};const a={};let{type:i="rich"}=e;const{html:s,provider_name:l}=e,c=Bo((l||t).toLowerCase());return To(s)&&(i=ko),(s||"photo"===i)&&(a.type=i,a.providerNameSlug=c),(u=o)&&vo.some((({className:e})=>u.includes(e)))||(a.className=Io(s,o,n&&r)),a;var u}));var Mo=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5ZM4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6Zm4 10h2v-1.5H8V16Zm5 0h-2v-1.5h2V16Zm1 0h2v-1.5h-2V16Z"})});function zo({attributeKey:e="caption",attributes:t,setAttributes:o,isSelected:n,insertBlocksAfter:r,placeholder:a=(0,pt.__)("Add caption"),label:i=(0,pt.__)("Caption text"),showToolbarButton:s=!0,excludeElementClassName:l,className:c,readOnly:u,tagName:d="figcaption",addLabel:p=(0,pt.__)("Add caption"),removeLabel:m=(0,pt.__)("Remove caption"),icon:g=Mo,...h}){const _=t[e],x=(0,xt.usePrevious)(_),{PrivateRichText:b}=jo(ct.privateApis),f=b.isEmpty(_),y=b.isEmpty(x),[v,k]=(0,gt.useState)(!f);(0,gt.useEffect)((()=>{!f&&y&&k(!0)}),[f,y]),(0,gt.useEffect)((()=>{!n&&f&&k(!1)}),[n,f]);const w=(0,gt.useCallback)((e=>{e&&f&&e.focus()}),[f]);return(0,it.jsxs)(it.Fragment,{children:[s&&(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(mt.ToolbarButton,{onClick:()=>{k(!v),v&&_&&o({[e]:void 0})},icon:g,isPressed:v,label:v?m:p})}),v&&(!b.isEmpty(_)||n)&&(0,it.jsx)(b,{identifier:e,tagName:d,className:Dt(c,l?"":(0,ct.__experimentalGetElementClassName)("caption")),ref:w,"aria-label":i,placeholder:a,value:_,onChange:t=>o({[e]:t}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>r((0,st.createBlock)((0,st.getDefaultBlockName)())),readOnly:u,...h})]})}const Ao=["audio"];var Lo=function({attributes:e,className:t,setAttributes:o,onReplace:n,isSelected:r,insertBlocksAfter:a}){const{id:i,autoplay:s,loop:l,preload:c,src:u}=e,[d,p]=(0,gt.useState)(e.blob),m="default"===(0,ct.useBlockEditingMode)();function g(e){return t=>{o({[e]:t})}}function h(e){if(e!==u){const t=No({attributes:{url:e}});if(void 0!==t&&n)return void n(t);o({src:e,id:void 0,blob:void 0}),p()}}ft({url:d,allowedTypes:Ao,onChange:b,onError:x});const{createErrorNotice:_}=(0,lt.useDispatch)(bo.store);function x(e){_(e,{type:"snackbar"})}function b(e){if(!e||!e.url)return o({src:void 0,id:void 0,caption:void 0,blob:void 0}),void p();(0,ht.isBlobURL)(e.url)?p(e.url):(o({blob:void 0,src:e.url,id:e.id,caption:e.caption}),p())}const f=Dt(t,{"is-transient":!!d}),y=(0,ct.useBlockProps)({className:f}),v=vt();return u||d?(0,it.jsxs)(it.Fragment,{children:[r&&(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(ct.MediaReplaceFlow,{mediaId:i,mediaURL:u,allowedTypes:Ao,accept:"audio/*",onSelect:b,onSelectURL:h,onError:x,onReset:()=>b(void 0)})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({autoplay:!1,loop:!1,preload:void 0})},dropdownMenuProps:v,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Autoplay"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>o({autoplay:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Autoplay"),onChange:g("autoplay"),checked:!!s,help:function(e){return e?(0,pt.__)("Autoplay may cause usability issues for some users."):null}})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Loop"),isShownByDefault:!0,hasValue:()=>!!l,onDeselect:()=>o({loop:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Loop"),onChange:g("loop"),checked:!!l})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Preload"),isShownByDefault:!0,hasValue:()=>!!c,onDeselect:()=>o({preload:void 0}),children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt._x)("Preload","noun; Audio block parameter"),value:c||"",onChange:e=>o({preload:e||void 0}),options:[{value:"",label:(0,pt.__)("Browser default")},{value:"auto",label:(0,pt.__)("Auto")},{value:"metadata",label:(0,pt.__)("Metadata")},{value:"none",label:(0,pt._x)("None","Preload value")}]})})]})}),(0,it.jsxs)("figure",{...y,children:[(0,it.jsx)(mt.Disabled,{isDisabled:!r,children:(0,it.jsx)("audio",{controls:"controls",src:u??d})}),!!d&&(0,it.jsx)(mt.Spinner,{}),(0,it.jsx)(zo,{attributes:e,setAttributes:o,isSelected:r,insertBlocksAfter:a,label:(0,pt.__)("Audio caption text"),showToolbarButton:r&&m})]})]}):(0,it.jsx)("div",{...y,children:(0,it.jsx)(ct.MediaPlaceholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:_o}),onSelect:b,onSelectURL:h,accept:"audio/*",allowedTypes:Ao,value:e,onError:x})})};const Ho=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/audio","title":"Audio","category":"media","description":"Embed a simple audio player.","keywords":["music","sound","podcast","recording"],"textdomain":"default","attributes":{"blob":{"type":"string","role":"local"},"src":{"type":"string","source":"attribute","selector":"audio","attribute":"src","role":"content"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"id":{"type":"number","role":"content"},"autoplay":{"type":"boolean","source":"attribute","selector":"audio","attribute":"autoplay"},"loop":{"type":"boolean","source":"attribute","selector":"audio","attribute":"loop"},"preload":{"type":"string","source":"attribute","selector":"audio","attribute":"preload"}},"supports":{"anchor":true,"align":true,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-audio-editor","style":"wp-block-audio"}');var Ro={from:[{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("audio/"),transform(e){const t=e[0];return(0,st.createBlock)("core/audio",{blob:(0,ht.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:({named:{src:e,mp3:t,m4a:o,ogg:n,wav:r,wma:a}})=>e||t||o||n||r||a},loop:{type:"string",shortcode:({named:{loop:e}})=>e},autoplay:{type:"string",shortcode:({named:{autoplay:e}})=>e},preload:{type:"string",shortcode:({named:{preload:e}})=>e}}}]};const{name:Vo}=Ho,Fo={icon:_o,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"},viewportWidth:350},transforms:Ro,deprecated:xo,edit:Lo,save:function({attributes:e}){const{autoplay:t,caption:o,loop:n,preload:r,src:a}=e;return a&&(0,it.jsxs)("figure",{...ct.useBlockProps.save(),children:[(0,it.jsx)("audio",{controls:"controls",src:a,autoPlay:t,loop:n,preload:r}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:o,className:(0,ct.__experimentalGetElementClassName)("caption")})]})}},Eo=()=>jt({name:Vo,metadata:Ho,settings:Fo});var Oo=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 13.5h3v-3H4v3Zm6-3.5 2 2-2 2 1 1 3-3-3-3-1 1Zm7 .5v3h3v-3h-3Z"})});const Go=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/breadcrumbs","title":"Breadcrumbs","__experimental":true,"category":"theme","description":"Display a breadcrumb trail for hierarchical post types or based on taxonomy terms.","textdomain":"default","attributes":{"type":{"type":"string","default":"auto","enum":["auto","postWithTerms","postWithAncestors"]},"separator":{"type":"string","default":"/"},"showHomeLink":{"type":"boolean","default":true}},"usesContext":["postId","postType","templateSlug"],"supports":{"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":false,"color":true,"width":true,"style":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-breadcrumbs"}'),$o="/",Uo="auto",qo={auto:{help:(0,pt.__)("Try to automatically determine the best type of breadcrumb for the template.")},postWithAncestors:{help:(0,pt.__)("Shows breadcrumbs based on post hierarchy. Only works for hierarchical post types."),placeholderItems:[(0,pt.__)("Ancestor"),(0,pt.__)("Parent")]},postWithTerms:{help:(0,pt.__)("Shows breadcrumbs based on taxonomy terms. Chooses the first taxonomy with assigned terms and includes ancestors if the taxonomy is hierarchical."),placeholderItems:[(0,pt.__)("Category")]}};const{name:Wo}=Go,Zo={icon:Oo,edit:function({attributes:e,setAttributes:t,context:{postId:o,postType:n,templateSlug:r}}){const{separator:a,showHomeLink:i,type:s}=e,{post:l,isPostTypeHierarchical:c,hasTermsAssigned:u,isLoading:d}=(0,lt.useSelect)((e=>{if(!n)return{};const t=e(_t.store).getEntityRecord("postType",n,o),r=e(_t.store).getPostType(n),a=r&&r.taxonomies.length;let i;return a&&(i=e(_t.store).getTaxonomies({type:n,per_page:-1})),{post:t,isPostTypeHierarchical:r?.hierarchical,hasTermsAssigned:t&&(i||[]).filter((({visibility:e})=>e?.publicly_queryable)).some((e=>!!t[e.rest_base]?.length)),isLoading:!t||!r||a&&!i}}),[n,o]),[p,m]=(0,gt.useState)(0);(0,gt.useEffect)((()=>{m((e=>e+1))}),[l]);const g=(0,ct.useBlockProps)(),h=vt(),{content:_}=(0,ut.useServerSideRender)({attributes:e,skipBlockSupportAttributes:!0,block:"core/breadcrumbs",urlQueryArgs:{post_id:o,invalidationKey:p}});if(d)return(0,it.jsx)("div",{...g,children:(0,it.jsx)(mt.Spinner,{})});let x;const b=["postWithAncestors","postWithTerms"].includes(s);x=b?s:c?"postWithAncestors":"postWithTerms";let f=null;const y=!o||!n||r&&!n||"postWithAncestors"===x&&!c||"postWithTerms"===x&&!u;if(y){const e=[i&&(0,pt.__)("Home"),...r&&!b?[(0,pt.__)("Page")]:qo[x].placeholderItems].filter(Boolean);f=(0,it.jsx)("nav",{style:{"--separator":`'${a}'`},inert:"true",children:(0,it.jsxs)("ol",{children:[e.map(((e,t)=>(0,it.jsx)("li",{children:(0,it.jsx)("a",{href:`#breadcrumbs-pseudo-link-${t}`,children:e})},t))),(0,it.jsx)("li",{children:(0,it.jsx)("span",{"aria-current":"page",children:(0,pt.__)("Current")})})]})})}return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({separator:$o,showHomeLink:!0,type:Uo})},dropdownMenuProps:h,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Type"),isShownByDefault:!0,hasValue:()=>s!==Uo,onDeselect:()=>t({type:Uo}),children:(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Type"),value:s,onChange:e=>t({type:e}),options:[{label:(0,pt.__)("Auto"),value:"auto"},{label:(0,pt.__)("Post with ancestors"),value:"postWithAncestors"},{label:(0,pt.__)("Post with terms"),value:"postWithTerms"}],help:qo[s].help})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show home link"),isShownByDefault:!0,hasValue:()=>!i,onDeselect:()=>t({showHomeLink:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show home link"),onChange:e=>t({showHomeLink:e}),checked:i})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Separator"),isShownByDefault:!0,hasValue:()=>a!==$o,onDeselect:()=>t({separator:$o}),children:(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,pt.__)("Separator"),value:a,onChange:e=>t({separator:e}),onBlur:()=>{a||t({separator:$o})}})})]})}),(0,it.jsx)("div",{...g,children:y?f:(0,it.jsx)(gt.RawHTML,{inert:"true",children:_})})]})}},Jo=()=>jt({name:Wo,metadata:Go,settings:Zo});var Qo=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z"})});const{cleanEmptyObject:Ko}=jo(ct.privateApis);function Yo(e){if(!e?.style?.typography?.fontFamily)return e;const{fontFamily:t,...o}=e.style.typography;return{...e,style:Ko({...e.style,typography:o}),fontFamily:t.split("|").pop()}}const Xo=e=>{const{borderRadius:t,...o}=e,n=[t,o.style?.border?.radius].find((e=>"number"==typeof e&&0!==e));return n?{...o,style:{...o.style,border:{...o.style?.border,radius:`${n}px`}}}:o};const en=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customGradient)return e;const t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customGradient&&(t.color.gradient=e.customGradient);const{customTextColor:o,customBackgroundColor:n,customGradient:r,...a}=e;return{...a,style:t}},tn=e=>{const{color:t,textColor:o,...n}={...e,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0};return en(n)},on={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"}},nn={attributes:{tagName:{type:"string",enum:["a","button"],default:"a"},type:{type:"string",default:"button"},textAlign:{type:"string"},url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a,button",attribute:"title",role:"content"},text:{type:"rich-text",source:"rich-text",selector:"a,button",role:"content"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target",role:"content"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel",role:"content"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,shadow:{__experimentalSkipSerialization:!0},spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},__experimentalSelector:".wp-block-button__link",interactivity:{clientNavigation:!0}},save({attributes:e,className:t}){const{tagName:o,type:n,textAlign:r,fontSize:a,linkTarget:i,rel:s,style:l,text:c,title:u,url:d,width:p}=e,m=o||"a",g="button"===m,h=n||"button",_=(0,ct.__experimentalGetBorderClassesAndStyles)(e),x=(0,ct.__experimentalGetColorClassesAndStyles)(e),b=(0,ct.__experimentalGetSpacingClassesAndStyles)(e),f=(0,ct.__experimentalGetShadowClassesAndStyles)(e),y=Dt("wp-block-button__link",x.className,_.className,{[`has-text-align-${r}`]:r,"no-border-radius":0===l?.border?.radius},(0,ct.__experimentalGetElementClassName)("button")),v={..._.style,...x.style,...b.style,...f.style},k=Dt(t,{[`has-custom-width wp-block-button__width-${p}`]:p,"has-custom-font-size":a||l?.typography?.fontSize});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:k}),children:(0,it.jsx)(ct.RichText.Content,{tagName:m,type:g?h:null,className:y,href:g?null:d,title:u,style:v,value:c,target:g?null:i,rel:g?null:s})})}},rn={attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}},__experimentalSelector:".wp-block-button__link"},save({attributes:e,className:t}){const{fontSize:o,linkTarget:n,rel:r,style:a,text:i,title:s,url:l,width:c}=e;if(!i)return null;const u=(0,ct.__experimentalGetBorderClassesAndStyles)(e),d=(0,ct.__experimentalGetColorClassesAndStyles)(e),p=(0,ct.__experimentalGetSpacingClassesAndStyles)(e),m=Dt("wp-block-button__link",d.className,u.className,{"no-border-radius":0===a?.border?.radius}),g={...u.style,...d.style,...p.style},h=Dt(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":o||a?.typography?.fontSize});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:h}),children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:m,href:l,title:s,style:g,value:i,target:n,rel:r})})}},an={attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0},__experimentalSelector:".wp-block-button__link"},save({attributes:e,className:t}){const{fontSize:o,linkTarget:n,rel:r,style:a,text:i,title:s,url:l,width:c}=e;if(!i)return null;const u=(0,ct.__experimentalGetBorderClassesAndStyles)(e),d=(0,ct.__experimentalGetColorClassesAndStyles)(e),p=(0,ct.__experimentalGetSpacingClassesAndStyles)(e),m=Dt("wp-block-button__link",d.className,u.className,{"no-border-radius":0===a?.border?.radius}),g={...u.style,...d.style,...p.style},h=Dt(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":o||a?.typography?.fontSize});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:h}),children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:m,href:l,title:s,style:g,value:i,target:n,rel:r})})},migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily},sn=[nn,rn,an,{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},isEligible:({style:e})=>"number"==typeof e?.border?.radius,save({attributes:e,className:t}){const{fontSize:o,linkTarget:n,rel:r,style:a,text:i,title:s,url:l,width:c}=e;if(!i)return null;const u=a?.border?.radius,d=(0,ct.__experimentalGetColorClassesAndStyles)(e),p=Dt("wp-block-button__link",d.className,{"no-border-radius":0===a?.border?.radius}),m={borderRadius:u||void 0,...d.style},g=Dt(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":o||a?.typography?.fontSize});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:g}),children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:p,href:l,title:s,style:m,value:i,target:n,rel:r})})},migrate:(0,xt.compose)(Yo,Xo)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save({attributes:e,className:t}){const{borderRadius:o,linkTarget:n,rel:r,text:a,title:i,url:s,width:l}=e,c=(0,ct.__experimentalGetColorClassesAndStyles)(e),u=Dt("wp-block-button__link",c.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...c.style},p=Dt(t,{[`has-custom-width wp-block-button__width-${l}`]:l});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:p}),children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:u,href:s,title:i,style:d,value:a,target:n,rel:r})})},migrate:(0,xt.compose)(Yo,Xo)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save({attributes:e,className:t}){const{borderRadius:o,linkTarget:n,rel:r,text:a,title:i,url:s,width:l}=e,c=(0,ct.__experimentalGetColorClassesAndStyles)(e),u=Dt("wp-block-button__link",c.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...c.style},p=Dt(t,{[`has-custom-width wp-block-button__width-${l}`]:l});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:p}),children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:u,href:s,title:i,style:d,value:a,target:n,rel:r})})},migrate:(0,xt.compose)(Yo,Xo)},{supports:{align:!0,alignWide:!1,color:{gradients:!0}},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},save({attributes:e}){const{borderRadius:t,linkTarget:o,rel:n,text:r,title:a,url:i}=e,s=Dt("wp-block-button__link",{"no-border-radius":0===t}),l={borderRadius:t?t+"px":void 0};return(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:s,href:i,title:a,style:l,value:r,target:o,rel:n})},migrate:Xo},{supports:{align:!0,alignWide:!1},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},customGradient:{type:"string"},gradient:{type:"string"}},isEligible:e=>!!(e.customTextColor||e.customBackgroundColor||e.customGradient||e.align),migrate:(0,xt.compose)(Xo,en,(function(e){if(!e.align)return e;const{align:t,...o}=e;return{...o,className:Dt(o.className,`align${e.align}`)}})),save({attributes:e}){const{backgroundColor:t,borderRadius:o,customBackgroundColor:n,customTextColor:r,customGradient:a,linkTarget:i,gradient:s,rel:l,text:c,textColor:u,title:d,url:p}=e,m=(0,ct.getColorClassName)("color",u),g=!a&&(0,ct.getColorClassName)("background-color",t),h=(0,ct.__experimentalGetGradientClass)(s),_=Dt("wp-block-button__link",{"has-text-color":u||r,[m]:m,"has-background":t||n||a||s,[g]:g,"no-border-radius":0===o,[h]:h}),x={background:a||void 0,backgroundColor:g||a||s?void 0:n,color:m?void 0:r,borderRadius:o?o+"px":void 0};return(0,it.jsx)("div",{children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:_,href:p,title:d,style:x,value:c,target:i,rel:l})})}},{attributes:{...on,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"}},isEligible:e=>e.className&&e.className.includes("is-style-squared"),migrate(e){let t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),Xo(en({...e,className:t||void 0,borderRadius:0}))},save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,customTextColor:n,linkTarget:r,rel:a,text:i,textColor:s,title:l,url:c}=e,u=(0,ct.getColorClassName)("color",s),d=(0,ct.getColorClassName)("background-color",t),p=Dt("wp-block-button__link",{"has-text-color":s||n,[u]:u,"has-background":t||o,[d]:d}),m={backgroundColor:d?void 0:o,color:u?void 0:n};return(0,it.jsx)("div",{children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:p,href:c,title:l,style:m,value:i,target:r,rel:a})})}},{attributes:{...on,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},migrate:tn,save({attributes:e}){const{url:t,text:o,title:n,backgroundColor:r,textColor:a,customBackgroundColor:i,customTextColor:s}=e,l=(0,ct.getColorClassName)("color",a),c=(0,ct.getColorClassName)("background-color",r),u=Dt("wp-block-button__link",{"has-text-color":a||s,[l]:l,"has-background":r||i,[c]:c}),d={backgroundColor:c?void 0:i,color:l?void 0:s};return(0,it.jsx)("div",{children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:u,href:t,title:n,style:d,value:o})})}},{attributes:{...on,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){const{url:t,text:o,title:n,align:r,color:a,textColor:i}=e,s={backgroundColor:a,color:i};return(0,it.jsx)("div",{className:`align${r}`,children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:t,title:n,style:s,value:o})})},migrate:tn},{attributes:{...on,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){const{url:t,text:o,title:n,align:r,color:a,textColor:i}=e;return(0,it.jsx)("div",{className:`align${r}`,style:{backgroundColor:a},children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",href:t,title:n,style:{color:i},value:o})})},migrate:tn}];var ln=sn;const cn="noreferrer noopener",un="_blank",dn="nofollow";function pn(e){return e.toString().replace(/<\/?a[^>]*>/g,"")}const mn=window.wp.keycodes;var gn=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),hn=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});const{HTMLElementControl:_n}=jo(ct.privateApis),xn=[...ct.LinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,pt.__)("Mark as nofollow")}];function bn({selectedWidth:e,setAttributes:t}){const o=vt();return(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>t({width:void 0}),dropdownMenuProps:o,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Width"),isShownByDefault:!0,hasValue:()=>!!e,onDeselect:()=>t({width:void 0}),__nextHasNoMarginBottom:!0,children:(0,it.jsx)(mt.__experimentalToggleGroupControl,{label:(0,pt.__)("Width"),value:e,onChange:e=>t({width:e}),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:[25,50,75,100].map((e=>(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:e,label:(0,pt.sprintf)((0,pt.__)("%d%%"),e)},e)))})})})}var fn=function(e){const{attributes:t,setAttributes:o,className:n,isSelected:r,onReplace:a,mergeBlocks:i,clientId:s,context:l}=e,{tagName:c,textAlign:u,linkTarget:d,placeholder:p,rel:m,style:g,text:h,url:_,width:x,metadata:b}=t,f=c||"a",[y,v]=(0,gt.useState)(null),k=(0,ct.__experimentalUseBorderProps)(t),w=(0,ct.__experimentalUseColorProps)(t),C=(0,ct.__experimentalGetSpacingClassesAndStyles)(t),j=(0,ct.__experimentalGetShadowClassesAndStyles)(t),S=(0,gt.useRef)(),B=(0,gt.useRef)(),T=(0,ct.useBlockProps)({ref:(0,xt.useMergeRefs)([v,S]),onKeyDown:function(e){mn.isKeyboardEvent.primary(e,"k")?V(e):mn.isKeyboardEvent.primaryShift(e,"k")&&(F(),B.current?.focus())}}),N=(0,ct.useBlockEditingMode)(),[P,I]=(0,gt.useState)(!1),D=!!_,M=d===un,z=!!m?.includes(dn),A="a"===f,{createPageEntity:L,userCanCreatePages:H,lockUrlControls:R=!1}=(0,lt.useSelect)((e=>{if(!r)return{};const t=e(ct.store).getSettings(),o=(0,st.getBlockBindingsSource)(b?.bindings?.url?.source);return{createPageEntity:t.__experimentalCreatePageEntity,userCanCreatePages:t.__experimentalUserCanCreatePages,lockUrlControls:!!b?.bindings?.url&&!o?.canUserEditValue?.({select:e,context:l,args:b?.bindings?.url?.args})}}),[l,r,b?.bindings?.url]);function V(e){e.preventDefault(),I(!0)}function F(){o({url:void 0,linkTarget:void 0,rel:void 0}),I(!1)}(0,gt.useEffect)((()=>{r||I(!1)}),[r]);const E=(0,gt.useMemo)((()=>({url:_,opensInNewTab:M,nofollow:z})),[_,M,z]),O=function(e){const{replaceBlocks:t,selectionChange:o}=(0,lt.useDispatch)(ct.store),{getBlock:n,getBlockRootClientId:r,getBlockIndex:a}=(0,lt.useSelect)(ct.store),i=(0,gt.useRef)(e);return i.current=e,(0,xt.useRefEffect)((e=>{function s(e){if(e.defaultPrevented||e.keyCode!==mn.ENTER)return;const{content:s,clientId:l}=i.current;if(s.length)return;e.preventDefault();const c=n(r(l)),u=a(l),d=(0,st.cloneBlock)({...c,innerBlocks:c.innerBlocks.slice(0,u)}),p=(0,st.createBlock)((0,st.getDefaultBlockName)()),m=c.innerBlocks.slice(u+1),g=m.length?[(0,st.cloneBlock)({...c,innerBlocks:m})]:[];t(c.clientId,[d,p,...g],1),o(p.clientId)}return e.addEventListener("keydown",s),()=>{e.removeEventListener("keydown",s)}}),[])}({content:h,clientId:s}),G=(0,xt.useMergeRefs)([O,B]),[$,U]=(0,ct.useSettings)("typography.fluid","layout"),q=(0,ct.getTypographyClassesAndStyles)(t,{typography:{fluid:$},layout:{wideSize:U?.wideSize}}),W="default"===N,Z=W||A&&!R;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("div",{...T,className:Dt(T.className,{[`has-custom-width wp-block-button__width-${x}`]:x}),children:(0,it.jsx)(ct.RichText,{ref:G,"aria-label":(0,pt.__)("Button text"),placeholder:p||(0,pt.__)("Add text…"),value:h,onChange:e=>o({text:pn(e)}),withoutInteractiveFormatting:!0,className:Dt(n,"wp-block-button__link",w.className,k.className,q.className,{[`has-text-align-${u}`]:u,"no-border-radius":0===g?.border?.radius,"has-custom-font-size":T.style.fontSize},(0,ct.__experimentalGetElementClassName)("button")),style:{...k.style,...w.style,...C.style,...j.style,...q.style,writingMode:void 0},onReplace:a,onMerge:i,identifier:"text"})}),Z&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[W&&(0,it.jsx)(ct.AlignmentControl,{value:u,onChange:e=>{o({textAlign:e})}}),A&&!R&&(0,it.jsx)(mt.ToolbarButton,{name:"link",icon:D?hn:gn,title:D?(0,pt.__)("Unlink"):(0,pt.__)("Link"),shortcut:D?mn.displayShortcut.primaryShift("k"):mn.displayShortcut.primary("k"),onClick:D?F:V,isActive:D})]}),A&&r&&(P||D)&&!R&&(0,it.jsx)(mt.Popover,{placement:"bottom",onClose:()=>{I(!1),B.current?.focus()},anchor:y,focusOnMount:!!P&&"firstElement",__unstableSlotName:"__unstable-block-tools-after",shift:!0,children:(0,it.jsx)(ct.LinkControl,{value:E,onChange:({url:e,opensInNewTab:t,nofollow:n})=>o(function({rel:e="",url:t="",opensInNewTab:o,nofollow:n}){let r,a=e;if(o)r=un,a=a?.includes(cn)?a:a+` ${cn}`;else{const e=new RegExp(`\\b${cn}\\s*`,"g");a=a?.replace(e,"").trim()}if(n)a=a?.includes(dn)?a:(a+` ${dn}`).trim();else{const e=new RegExp(`\\b${dn}\\s*`,"g");a=a?.replace(e,"").trim()}return{url:(0,no.prependHTTP)(t),linkTarget:r,rel:a||void 0}}({rel:m,url:e,opensInNewTab:t,nofollow:n})),onRemove:()=>{F(),B.current?.focus()},forceIsEditingLink:P,settings:xn,createSuggestion:L&&async function(e){const t=await L({title:e,status:"draft"});return{id:t.id,type:t.type,title:t.title.rendered,url:t.link,kind:"post-type"}},withCreateSuggestion:H,createSuggestionButtonText:function(e){return(0,gt.createInterpolateElement)((0,pt.sprintf)((0,pt.__)("Create page: %s"),e),{mark:(0,it.jsx)("mark",{})})}})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(bn,{selectedWidth:x,setAttributes:o})}),(0,it.jsxs)(ct.InspectorControls,{group:"advanced",children:[(0,it.jsx)(_n,{tagName:c,onChange:e=>o({tagName:e}),options:[{label:(0,pt.__)("Default ()"),value:"a"},{label:""),{button:(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,onClick:()=>{n(!0),e()},variant:"link",disabled:o,accessibleWhenDisabled:!0})});return t?(0,it.jsx)(mt.Notice,{status:"warning",isDismissible:!1,children:r}):(0,it.jsx)(ct.Warning,{children:r})},F_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})}),E_=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});const O_={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},G_=["core/navigation-link","core/navigation-submenu"];function $_({block:e,onClose:t,expandedState:o,expand:n,setInsertedBlock:r}){const{insertBlock:a,replaceBlock:i,replaceInnerBlocks:s}=(0,lt.useDispatch)(ct.store),l=e.clientId,c=!G_.includes(e.name);return(0,it.jsx)(mt.MenuItem,{icon:F_,disabled:c,onClick:()=>{const c=!1,u=(0,st.createBlock)($h.name,$h.attributes);if("core/navigation-submenu"===e.name)a(u,e.innerBlocks.length,l,c);else{const t=(0,st.createBlock)("core/navigation-submenu",e.attributes,e.innerBlocks);i(l,t),s(t.clientId,[u],c)}r(u),o[e.clientId]||n(e.clientId),t()},children:(0,pt.__)("Add submenu link")})}function U_(e){const{block:t}=e,{clientId:o}=t,{moveBlocksDown:n,moveBlocksUp:r,removeBlocks:a}=(0,lt.useDispatch)(ct.store),i=(0,pt.sprintf)((0,pt.__)("Remove %s"),(0,ct.BlockTitle)({clientId:o,maximumLength:25})),s=(0,lt.useSelect)((e=>{const{getBlockRootClientId:t}=e(ct.store);return t(o)}),[o]);return(0,it.jsx)(mt.DropdownMenu,{icon:Kh,label:(0,pt.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:O_,noIcons:!0,...e,children:({onClose:l})=>(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(mt.MenuGroup,{children:[(0,it.jsx)(mt.MenuItem,{icon:E_,onClick:()=>{r([o],s),l()},children:(0,pt.__)("Move up")}),(0,it.jsx)(mt.MenuItem,{icon:qp,onClick:()=>{n([o],s),l()},children:(0,pt.__)("Move down")}),(0,it.jsx)($_,{block:t,onClose:l,expandedState:e.expandedState,expand:e.expand,setInsertedBlock:e.setInsertedBlock})]}),(0,it.jsx)(mt.MenuGroup,{children:(0,it.jsx)(mt.MenuItem,{onClick:()=>{a([o],!1),l()},children:i})})]})})}var q_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),W_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})}),Z_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});function J_({className:e,onBack:t}){return(0,it.jsx)(mt.Button,{className:e,icon:(0,pt.isRTL)()?W_:Z_,onClick:e=>{e.preventDefault(),t()},size:"small",children:(0,pt.__)("Back")})}var Q_=function e({className:t,title:o,description:n,onBack:r,children:a}){const i=(0,xt.useInstanceId)(e,"link-ui-dialog-title"),s=(0,xt.useInstanceId)(e,"link-ui-dialog-description"),l=(0,xt.useFocusOnMount)("firstElement"),c=`${t}__back`;return(0,it.jsxs)("div",{className:t,role:"dialog","aria-labelledby":i,"aria-describedby":s,ref:l,children:[(0,it.jsxs)(mt.VisuallyHidden,{children:[(0,it.jsx)("h2",{id:i,children:o}),(0,it.jsx)("p",{id:s,children:n})]}),(0,it.jsx)(J_,{className:c,onBack:r}),a]})};function K_({postType:e,onBack:t,onPageCreated:o,initialTitle:n=""}){const[r,a]=(0,gt.useState)(n),[i,s]=(0,gt.useState)(!1),l=r.trim().length>0,{lastError:c,isSaving:u}=(0,lt.useSelect)((t=>({lastError:t(_t.store).getLastEntitySaveError("postType",e),isSaving:t(_t.store).isSavingEntityRecord("postType",e)})),[e]),{saveEntityRecord:d}=(0,lt.useDispatch)(_t.store);const p=u||!l;return(0,it.jsx)(Q_,{className:"link-ui-page-creator",title:(0,pt.__)("Create page"),description:(0,pt.__)("Create a new page to add to your Navigation."),onBack:t,children:(0,it.jsx)(mt.__experimentalVStack,{className:"link-ui-page-creator__inner",spacing:4,children:(0,it.jsx)("form",{onSubmit:async function(t){if(t.preventDefault(),!u&&l)try{const t=await d("postType",e,{title:r,status:i?"publish":"draft"},{throwOnError:!0});if(t){const n={id:t.id,type:e,title:(0,ao.decodeEntities)(t.title.rendered),url:t.link,kind:"post-type"};o(n)}}catch(e){}},children:(0,it.jsxs)(mt.__experimentalVStack,{spacing:4,children:[(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Title"),onChange:a,placeholder:(0,pt.__)("No title"),value:r}),(0,it.jsx)(mt.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Publish immediately"),help:(0,pt.__)("If unchecked, the page will be created as a draft."),checked:i,onChange:s}),c&&(0,it.jsx)(mt.Notice,{status:"error",isDismissible:!1,children:c.message}),(0,it.jsxs)(mt.__experimentalHStack,{spacing:2,justify:"flex-end",children:[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:u,accessibleWhenDisabled:!0,children:(0,pt.__)("Cancel")}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:u,"aria-disabled":p,children:(0,pt.__)("Create page")})]})]})})})})}const{PrivateQuickInserter:Y_}=jo(ct.privateApis);var X_=function({clientId:e,onBack:t,onBlockInsert:o}){const{rootBlockClientId:n}=(0,lt.useSelect)((t=>{const{getBlockRootClientId:o}=t(ct.store);return{rootBlockClientId:o(e)}}),[e]);return e?(0,it.jsx)(Q_,{className:"link-ui-block-inserter",title:(0,pt.__)("Add block"),description:(0,pt.__)("Choose a block to add to your Navigation."),onBack:t,children:(0,it.jsx)(Y_,{rootClientId:n,clientId:e,isAppender:!1,prioritizePatterns:!1,selectBlockOnInsert:!o,onSelect:o||void 0,hasSearch:!1})}):null};function ex(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}}}}const tx=(0,gt.forwardRef)((function(e,t){const{label:o,url:n,opensInNewTab:r,type:a,kind:i,id:s}=e.link,{clientId:l}=e,c=a||"page",[u,d]=(0,gt.useState)(!1),[p,m]=(0,gt.useState)(!1),[g,h]=(0,gt.useState)(!1),[_,x]=(0,gt.useState)(!1),b=(0,_t.useResourcePermissions)({kind:"postType",name:c}),{isBoundEntityAvailable:f}=p_({clientId:l,attributes:e.link}),y=(0,gt.useMemo)((()=>({url:n,opensInNewTab:r,title:o&&(0,lu.__unstableStripHTML)(o),kind:i,type:a,id:s})),[o,r,n,i,a,s]),v=(0,xt.useInstanceId)(tx,"link-ui-link-control__title"),k=(0,xt.useInstanceId)(tx,"link-ui-link-control__description"),w=(0,ct.useBlockEditingMode)();return(0,it.jsxs)(mt.Popover,{ref:t,placement:"bottom",onClose:e.onClose,anchor:e.anchor,shift:!0,children:[!u&&!p&&(0,it.jsxs)("div",{role:"dialog","aria-labelledby":v,"aria-describedby":k,children:[(0,it.jsxs)(mt.VisuallyHidden,{children:[(0,it.jsx)("h2",{id:v,children:(0,pt.__)("Add link")}),(0,it.jsx)("p",{id:k,children:(0,pt.__)("Search for and add a link to your Navigation.")})]}),(0,it.jsx)(ct.LinkControl,{hasTextControl:!0,hasRichPreviews:!0,value:y,showInitialSuggestions:!0,withCreateSuggestion:!1,noDirectEntry:!!a,noURLSuggestion:!!a,suggestionsQuery:ex(a,i),onChange:e.onChange,onRemove:e.onRemove,onCancel:e.onCancel,handleEntities:f,renderControlBottom:()=>y?.url?.length?null:(0,it.jsx)(ox,{focusAddBlockButton:g,focusAddPageButton:_,setAddingBlock:()=>{d(!0),h(!1)},setAddingPage:()=>{m(!0),x(!1)},canAddPage:b?.canCreate&&"page"===a,canAddBlock:"default"===w})})]}),u&&(0,it.jsx)(X_,{clientId:e.clientId,onBack:()=>{d(!1),h(!0),x(!1)},onBlockInsert:e?.onBlockInsert}),p&&(0,it.jsx)(K_,{postType:c,onBack:()=>{m(!1),x(!0),h(!1)},onPageCreated:t=>{e.onChange(t),m(!1)},initialTitle:y?.url||""})]})})),ox=({setAddingBlock:e,setAddingPage:t,focusAddBlockButton:o,focusAddPageButton:n,canAddPage:r,canAddBlock:a})=>{const i="listbox",s=(0,gt.useRef)(),l=(0,gt.useRef)();return(0,gt.useEffect)((()=>{o&&s.current?.focus()}),[o]),(0,gt.useEffect)((()=>{n&&l.current?.focus()}),[n]),r||a?(0,it.jsxs)(mt.__experimentalVStack,{spacing:0,className:"link-ui-tools",children:[r&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,ref:l,icon:q_,onClick:e=>{e.preventDefault(),t(!0)},"aria-haspopup":i,children:(0,pt.__)("Create page")}),a&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,ref:s,icon:q_,onClick:t=>{t.preventDefault(),e(!0)},"aria-haspopup":i,children:(0,pt.__)("Add block")})]}):null};const nx=window.wp.escapeHtml,rx=(e={},t,o={})=>{const{label:n="",kind:r="",type:a=""}=o,{title:i="",label:s="",url:l,opensInNewTab:c,id:u,kind:d=r,type:p=a}=e,m=i||s,g=m.replace(/http(s?):\/\//gi,""),h=l?.replace(/http(s?):\/\//gi,"")??"",_=m&&m!==n&&g!==h?(0,nx.escapeHTML)(m):n||(0,nx.escapeHTML)(h),x="post_tag"===p?"tag":p.replace("-","_"),b=["post","page","tag","category"].indexOf(x)>-1,f=!d&&!b||"custom"===d?"custom":d,y={...void 0!==l?{url:l?encodeURI((0,no.safeDecodeURI)(l)):l}:{},..._&&{label:_},...void 0!==c&&{opensInNewTab:c},...f&&{kind:f},...x&&"URL"!==x&&{type:x}};if(l&&!u&&o.id){const e=((e,t)=>{if(!e||!t)return!1;const o=e=>e?e.replace(/\/+$/,""):"",n=(e,t=null)=>{try{const o=t||("undefined"!=typeof window?window.location.origin:"https://wordpress.org");return new URL(e,o)}catch(e){return null}},r=n(e);if(!r)return!0;const a=n(t,e);if(!a)return!0;const i=r.hostname,s=a.hostname,l=o((0,no.getPath)(r.toString())),c=o((0,no.getPath)(a.toString()));if(i!==s||l!==c)return!0;const u=r.searchParams.get("p"),d=a.searchParams.get("p");if(u&&d&&u!==d)return!0;const p=r.searchParams.get("page_id"),m=a.searchParams.get("page_id");return!(!p||!m||p===m)||!!(u&&m||p&&d)})(o.url,l);e&&(y.id=void 0,y.kind="custom",y.type="custom")}else u&&Number.isInteger(u)?y.id=u:o.id&&(y.kind=f,y.type=x);t(y);const v="id"in y?y.id:o.id,k="kind"in y?y.kind:o.kind;return{isEntityLink:!!v&&"custom"!==k,attributes:y}},ax=(0,pt.__)("Switch to '%s'"),ix=["core/navigation-link","core/navigation-submenu"],{PrivateListView:sx}=jo(ct.privateApis);function lx({block:e,insertedBlock:t,setInsertedBlock:o}){const{updateBlockAttributes:n,removeBlock:r}=(0,lt.useDispatch)(ct.store),a=ix?.includes(t?.name),i=t?.clientId===e.clientId,s=a&&i,{createBinding:l,clearBinding:c}=p_({clientId:t?.clientId,attributes:t?.attributes||{}});if(!s)return null;return(0,it.jsx)(tx,{clientId:t?.clientId,link:t?.attributes,onBlockInsert:e=>{t?.clientId&&e&&r(t.clientId,false),o(e)},onClose:()=>{!t?.attributes?.url&&t?.clientId&&r(t.clientId,!1),o(null)},onChange:e=>{const{isEntityLink:r,attributes:a}=rx(e,(i=t?.clientId,e=>{i&&n(i,e)}),t?.attributes);var i;r?l(a):c(a),o(null)}})}const cx=({clientId:e,currentMenuId:t,isLoading:o,isNavigationMenuMissing:n,onCreateNew:r})=>{const a=(0,lt.useSelect)((t=>!!t(ct.store).getBlockCount(e)),[e]),{navigationMenu:i}=Zh(t);if(t&&n)return(0,it.jsx)(V_,{onCreateNew:r,isNotice:!0});if(o)return(0,it.jsx)(mt.Spinner,{});const s=i?(0,pt.sprintf)((0,pt.__)("Structure for Navigation Menu: %s"),i?.title||(0,pt.__)("Untitled menu")):(0,pt.__)("You have not yet created any menus. Displaying a list of your Pages");return(0,it.jsxs)("div",{className:"wp-block-navigation__menu-inspector-controls",children:[!a&&(0,it.jsx)("p",{className:"wp-block-navigation__menu-inspector-controls__empty-message",children:(0,pt.__)("This Navigation Menu is empty.")}),(0,it.jsx)(sx,{rootClientId:e,isExpanded:!0,description:s,showAppender:!0,blockSettingsMenu:U_,additionalBlockContent:lx})]})};var ux=e=>{const{createNavigationMenuIsSuccess:t,createNavigationMenuIsError:o,currentMenuId:n=null,onCreateNew:r,onSelectClassicMenu:a,onSelectNavigationMenu:i,isManageMenusButtonDisabled:s,blockEditingMode:l}=e;return(0,it.jsx)(ct.InspectorControls,{group:"list",children:(0,it.jsxs)(mt.PanelBody,{title:null,children:[(0,it.jsxs)(mt.__experimentalHStack,{className:"wp-block-navigation-off-canvas-editor__header",children:[(0,it.jsx)(mt.__experimentalHeading,{className:"wp-block-navigation-off-canvas-editor__title",level:2,children:(0,pt.__)("Menu")}),"default"===l&&(0,it.jsx)(Yh,{currentMenuId:n,onSelectClassicMenu:a,onSelectNavigationMenu:i,onCreateNew:r,createNavigationMenuIsSuccess:t,createNavigationMenuIsError:o,actionLabel:ax,isManageMenusButtonDisabled:s})]}),(0,it.jsx)(cx,{...e})]})})};function dx({id:e,children:t}){return(0,it.jsx)(mt.VisuallyHidden,{children:(0,it.jsx)("div",{id:e,className:"wp-block-navigation__description",children:t})})}function px({id:e}){const[t]=(0,_t.useEntityProp)("postType","wp_navigation","title"),o=(0,pt.sprintf)((0,pt.__)('Navigation Menu: "%s"'),t);return(0,it.jsx)(dx,{id:e,children:o})}function mx({clientId:e}){const{insertBlock:t}=(0,lt.useDispatch)(ct.store),{getBlockCount:o}=(0,lt.useSelect)(ct.store),n=(0,gt.useCallback)((()=>{const n=o(e),r=(0,st.createBlock)($h.name,{kind:$h.attributes.kind,type:$h.attributes.type});t(r,n,e)}),[e,t,o]);return(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.ToolbarButton,{name:"add-page",icon:Eh,onClick:n,children:(0,pt.__)("Add page")})})})}function gx({textColor:e,setTextColor:t,backgroundColor:o,setBackgroundColor:n,overlayTextColor:r,setOverlayTextColor:a,overlayBackgroundColor:i,setOverlayBackgroundColor:s,clientId:l,navRef:c}){const[u,d]=(0,gt.useState)(),[p,m]=(0,gt.useState)(),[g,h]=(0,gt.useState)(),[_,x]=(0,gt.useState)(),b="web"===gt.Platform.OS;(0,gt.useEffect)((()=>{if(!b)return;A_(c.current,m,d);const e=c.current?.querySelector('[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]');e&&(r.color||i.color)&&A_(e,x,h)}),[b,r.color,i.color,c]);const f=(0,ct.__experimentalUseMultipleOriginColorsAndGradients)();return f.hasColorsOrGradients?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:e.color,label:(0,pt.__)("Text"),onColorChange:t,resetAllFilter:()=>t(),clearable:!0,enableAlpha:!0},{colorValue:o.color,label:(0,pt.__)("Background"),onColorChange:n,resetAllFilter:()=>n(),clearable:!0,enableAlpha:!0},{colorValue:r.color,label:(0,pt.__)("Submenu & overlay text"),onColorChange:a,resetAllFilter:()=>a(),clearable:!0,enableAlpha:!0},{colorValue:i.color,label:(0,pt.__)("Submenu & overlay background"),onColorChange:s,resetAllFilter:()=>s(),clearable:!0,enableAlpha:!0}],panelId:l,...f,gradients:[],disableCustomGradients:!0}),b&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.ContrastChecker,{backgroundColor:u,textColor:p}),(0,it.jsx)(ct.ContrastChecker,{backgroundColor:g,textColor:_})]})]}):null}var hx=(0,ct.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:_,overlayMenu:x,showSubmenuIcon:b,templateLock:f,layout:{justifyContent:y,orientation:v="horizontal",flexWrap:k="wrap"}={},hasIcon:w,icon:C="handle"}=e,j=e.ref,S=(0,gt.useCallback)((e=>{t({ref:e})}),[t]),B=`navigationMenu/${j}`,T=(0,ct.useHasRecursion)(B),N=(0,ct.useBlockEditingMode)(),{menus:P}=Jh(),[I,D]=c_({name:"block-library/core/navigation/status"}),[M,z]=c_({name:"block-library/core/navigation/classic-menu-conversion"}),[A,L]=c_({name:"block-library/core/navigation/permissions/update"}),{create:H,status:R,error:V,value:F,isPending:E,isSuccess:O,isError:G}=function(e){const[t,o]=(0,gt.useState)(D_),[n,r]=(0,gt.useState)(null),[a,i]=(0,gt.useState)(null),{saveEntityRecord:s,editEntityRecord:l}=(0,lt.useDispatch)(_t.store),c=T_(e);return{create:(0,gt.useCallback)((async(e=null,t=[],n)=>{if(e&&"string"!=typeof e)throw i("Invalid title supplied when creating Navigation Menu."),o(P_),new Error("Value of supplied title argument was not a string.");o(I_),r(null),i(null),e||(e=await c().catch((e=>{throw i(e?.message),o(P_),new Error("Failed to create title when saving new Navigation Menu.",{cause:e})})));const a={title:e,content:(0,st.serialize)(t),status:n};return s("postType","wp_navigation",a).then((e=>(r(e),o(N_),"publish"!==n&&l("postType","wp_navigation",e.id,{status:"publish"}),e))).catch((e=>{throw i(e?.message),o(P_),new Error("Unable to save new Navigation Menu",{cause:e})}))}),[s,l,c]),status:t,value:n,error:a,isIdle:t===D_,isPending:t===I_,isSuccess:t===N_,isError:t===P_}}(o),$=async()=>{await H("")},{hasUncontrolledInnerBlocks:U,uncontrolledInnerBlocks:q,isInnerBlockSelected:W,innerBlocks:Z}=function(e){return(0,lt.useSelect)((t=>{const{getBlock:o,getBlocks:n,hasSelectedInnerBlock:r}=t(ct.store),a=o(e).innerBlocks,i=!!a?.length,s=i?M_:n(e);return{innerBlocks:i?a:s,hasUncontrolledInnerBlocks:i,uncontrolledInnerBlocks:a,controlledInnerBlocks:s,isInnerBlockSelected:r(e,!0)}}),[e])}(o),J=!!Z.find((e=>"core/navigation-submenu"===e.name)),{replaceInnerBlocks:Q,selectBlock:K,__unstableMarkNextChangeAsNotPersistent:Y}=(0,lt.useDispatch)(ct.store),[X,ee]=(0,gt.useState)(!1),[te,oe]=(0,gt.useState)(!1),{hasResolvedNavigationMenus:ne,isNavigationMenuResolved:re,isNavigationMenuMissing:ae,canUserUpdateNavigationMenu:ie,hasResolvedCanUserUpdateNavigationMenu:se,canUserDeleteNavigationMenu:le,hasResolvedCanUserDeleteNavigationMenu:ce,canUserCreateNavigationMenus:ue,isResolvingCanUserCreateNavigationMenus:de,hasResolvedCanUserCreateNavigationMenus:pe}=Zh(j),me=ne&&ae,{convert:ge,status:he,error:_e}=f_(H),xe=he===x_,be=(0,gt.useCallback)(((e,t={focusNavigationBlock:!1})=>{const{focusNavigationBlock:n}=t;S(e),n&&K(o)}),[K,o,S]),fe=!ae&&re,ye=U&&!fe,{getNavigationFallbackId:ve}=jo((0,lt.useSelect)(_t.store)),ke=j||ye?null:ve();(0,gt.useEffect)((()=>{j||ye||!ke||(Y(),S(ke))}),[j,S,ye,ke,Y]);const we=(0,gt.useRef)(),Ce="nav",je=!j&&!E&&!xe&&ne&&0===P?.length&&!U,Se=!ne||E||xe||!(!j||fe||xe),Be=e.style?.typography?.textDecoration,Te=(0,lt.useSelect)((e=>e(ct.store).__unstableHasActiveBlockOverlayActive(o)),[o]),Ne="never"!==x,Pe=(0,ct.useBlockProps)({ref:we,className:Dt(r,{"items-justified-right":"right"===y,"items-justified-space-between":"space-between"===y,"items-justified-left":"left"===y,"items-justified-center":"center"===y,"is-vertical":"vertical"===v,"no-wrap":"nowrap"===k,"is-responsive":Ne,"has-text-color":!!s.color||!!s?.class,[(0,ct.getColorClassName)("color",s?.slug)]:!!s?.slug,"has-background":!!a.color||a.class,[(0,ct.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}}),Ie=async e=>ge(e.id,e.name,"draft"),De=e=>{be(e)};(0,gt.useEffect)((()=>{D(),E&&(0,dg.speak)((0,pt.__)("Creating Navigation Menu.")),O&&(be(F?.id,{focusNavigationBlock:!0}),I((0,pt.__)("Navigation Menu successfully created."))),G&&I((0,pt.__)("Failed to create Navigation Menu."))}),[R,V,F?.id,G,O,E,be,D,I]),(0,gt.useEffect)((()=>{z(),he===x_&&(0,dg.speak)((0,pt.__)("Classic menu importing.")),he===h_&&(M((0,pt.__)("Classic menu imported successfully.")),be(F?.id,{focusNavigationBlock:!0})),he===__&&M((0,pt.__)("Classic menu import failed."))}),[he,_e,z,M,F?.id,be]),(0,gt.useEffect)((()=>{n||W||L(),(n||W)&&(j&&!me&&se&&!ie&&A((0,pt.__)("You do not have permission to edit this Menu. Any changes made will not be saved.")),j||!pe||ue||A((0,pt.__)("You do not have permission to create Navigation Menus.")))}),[n,W,ie,se,ue,pe,j,L,A,me]);const Me=ue||ie,ze=Dt("wp-block-navigation__overlay-menu-preview",{open:te}),Ae=b||_?"":(0,pt.__)('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.'),Le=(0,gt.useRef)(!0);(0,gt.useEffect)((()=>{!Le.current&&Ae&&(0,dg.speak)(Ae),Le.current=!1}),[Ae]);const He=(0,xt.useInstanceId)(u_,"overlay-menu-preview"),Re=vt(),Ve=(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:m&&(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Display"),resetAll:()=>{t({showSubmenuIcon:!0,openSubmenusOnClick:!1,overlayMenu:"mobile",hasIcon:!0,icon:"handle"})},dropdownMenuProps:Re,children:[Ne&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(mt.Button,{__next40pxDefaultSize:!0,className:ze,onClick:()=>{oe(!te)},"aria-label":(0,pt.__)("Overlay menu controls"),"aria-controls":He,"aria-expanded":te,children:[w&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(t_,{icon:C}),(0,it.jsx)(Oh,{icon:Gh})]}),!w&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("span",{children:(0,pt.__)("Menu")}),(0,it.jsx)("span",{children:(0,pt.__)("Close")})]})]}),te&&(0,it.jsx)(mt.__experimentalVStack,{id:He,spacing:4,style:{gridColumn:"span 2"},children:(0,it.jsx)(u_,{setAttributes:t,hasIcon:w,icon:C,hidden:!te})})]}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"mobile"!==x,label:(0,pt.__)("Overlay Menu"),onDeselect:()=>t({overlayMenu:"mobile"}),isShownByDefault:!0,children:(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Overlay Menu"),"aria-label":(0,pt.__)("Configure overlay menu"),value:x,help:(0,pt.__)("Collapses the navigation options in a menu icon opening an overlay."),onChange:e=>t({overlayMenu:e}),isBlock:!0,children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"never",label:(0,pt.__)("Off")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"mobile",label:(0,pt.__)("Mobile")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"always",label:(0,pt.__)("Always")})]})}),J&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("h3",{className:"wp-block-navigation__submenu-header",children:(0,pt.__)("Submenus")}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>_,label:(0,pt.__)("Open on click"),onDeselect:()=>t({openSubmenusOnClick:!1,showSubmenuIcon:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:_,onChange:e=>{t({openSubmenusOnClick:e,...e&&{showSubmenuIcon:!0}})},label:(0,pt.__)("Open on click")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!b,label:(0,pt.__)("Show arrow"),onDeselect:()=>t({showSubmenuIcon:!0}),isDisabled:e.openSubmenusOnClick,isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:b,onChange:e=>{t({showSubmenuIcon:e})},disabled:e.openSubmenusOnClick,label:(0,pt.__)("Show arrow")})}),Ae&&(0,it.jsx)(mt.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,className:"wp-block-navigation__submenu-accessibility-notice",children:Ae})]})]})}),(0,it.jsx)(ct.InspectorControls,{group:"color",children:(0,it.jsx)(gx,{textColor:s,setTextColor:l,backgroundColor:a,setBackgroundColor:i,overlayTextColor:d,setOverlayTextColor:p,overlayBackgroundColor:c,setOverlayBackgroundColor:u,clientId:o,navRef:we})})]}),Fe=`${o}-desc`,Ee="always"===x,Oe=!Me||!ne;if(ye&&!E)return(0,it.jsxs)(Ce,{...Pe,"aria-describedby":je?void 0:Fe,children:[(0,it.jsx)(dx,{id:Fe,children:(0,pt.__)("Unsaved Navigation Menu.")}),(0,it.jsx)(ux,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:G,currentMenuId:j,isNavigationMenuMissing:ae,isManageMenusButtonDisabled:Oe,onCreateNew:$,onSelectClassicMenu:Ie,onSelectNavigationMenu:De,isLoading:Se,blockEditingMode:N}),"default"===N&&Ve,(0,it.jsx)(o_,{id:o,onToggle:ee,isOpen:X,hasIcon:w,icon:C,isResponsive:Ne,isHiddenByDefault:Ee,overlayBackgroundColor:c,overlayTextColor:d,children:(0,it.jsx)(s_,{createNavigationMenu:H,blocks:q,hasSelection:n||W})})]});if(j&&ae)return(0,it.jsxs)(Ce,{...Pe,children:[(0,it.jsx)(ux,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:G,currentMenuId:j,isNavigationMenuMissing:ae,isManageMenusButtonDisabled:Oe,onCreateNew:$,onSelectClassicMenu:Ie,onSelectNavigationMenu:De,isLoading:Se,blockEditingMode:N}),(0,it.jsx)(V_,{onCreateNew:$})]});if(fe&&T)return(0,it.jsx)("div",{...Pe,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Block cannot be rendered inside itself.")})});const Ge=g||Xh;return je&&g?(0,it.jsx)(Ce,{...Pe,children:(0,it.jsx)(Ge,{isSelected:n,currentMenuId:j,clientId:o,canUserCreateNavigationMenus:ue,isResolvingCanUserCreateNavigationMenus:de,onSelectNavigationMenu:De,onSelectClassicMenu:Ie,onCreateEmpty:$})}):(0,it.jsx)(_t.EntityProvider,{kind:"postType",type:"wp_navigation",id:j,children:(0,it.jsxs)(ct.RecursionProvider,{uniqueId:B,children:[(0,it.jsx)(ux,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:G,currentMenuId:j,isNavigationMenuMissing:ae,isManageMenusButtonDisabled:Oe,onCreateNew:$,onSelectClassicMenu:Ie,onSelectNavigationMenu:De,isLoading:Se,blockEditingMode:N}),"default"===N&&Ve,"contentOnly"===N&&fe&&(0,it.jsx)(mx,{clientId:o}),"default"===N&&fe&&(0,it.jsxs)(ct.InspectorControls,{group:"advanced",children:[se&&ie&&(0,it.jsx)(r_,{}),ce&&le&&(0,it.jsx)(l_,{onDelete:()=>{Q(o,[]),I((0,pt.__)("Navigation Menu successfully deleted."))}}),(0,it.jsx)(R_,{disabled:Oe,className:"wp-block-navigation-manage-menus-button"})]}),(0,it.jsxs)(Ce,{...Pe,"aria-describedby":je||Se?void 0:Fe,children:[Se&&!Ee&&(0,it.jsx)("div",{className:"wp-block-navigation__loading-indicator-container",children:(0,it.jsx)(mt.Spinner,{className:"wp-block-navigation__loading-indicator"})}),(!Se||Ee)&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(px,{id:Fe}),(0,it.jsx)(o_,{id:o,onToggle:ee,hasIcon:w,icon:C,isOpen:X,isResponsive:Ne,isHiddenByDefault:Ee,overlayBackgroundColor:c,overlayTextColor:d,children:fe&&(0,it.jsx)(n_,{clientId:o,hasCustomPlaceholder:!!g,templateLock:f,orientation:v})})]})]})]})})}));const _x={fontStyle:"var:preset|font-style|",fontWeight:"var:preset|font-weight|",textDecoration:"var:preset|text-decoration|",textTransform:"var:preset|text-transform|"},xx=({navigationMenuId:e,...t})=>({...t,ref:e}),bx=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},fx={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,it.jsx)(ct.InnerBlocks.Content,{}),isEligible:({navigationMenuId:e})=>!!e,migrate:xx},yx={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,it.jsx)(ct.InnerBlocks.Content,{}),isEligible:({itemsJustification:e,orientation:t})=>!!e||!!t,migrate:(0,xt.compose)(xx,bx)},vx={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,it.jsx)(ct.InnerBlocks.Content,{}),migrate:(0,xt.compose)(xx,bx,Yo),isEligible:({style:e})=>e?.typography?.fontFamily},kx=[fx,yx,vx,{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,xt.compose)(xx,bx,Yo,(function(e){return delete e.isResponsive,{...e,overlayMenu:"mobile"}})),save:()=>(0,it.jsx)(ct.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,it.jsx)(ct.InnerBlocks.Content,{}),isEligible(e){if(!e.style||!e.style.typography)return!1;for(const t in _x){const o=e.style.typography[t];if(o&&o.startsWith(_x[t]))return!0}return!1},migrate:(0,xt.compose)(xx,bx,Yo,(function(e){return{...e,style:{...e.style,typography:Object.fromEntries(Object.entries(e.style.typography??{}).map((([e,t])=>{const o=_x[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,xt.compose)(xx,(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,it.jsx)(ct.InnerBlocks.Content,{})}];var wx=kx;const{name:Cx}=Fh,jx={icon:Vh,example:{attributes:{overlayMenu:"never"},innerBlocks:[{name:"core/navigation-link",attributes:{label:(0,pt.__)("Home"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,pt.__)("About"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,pt.__)("Contact"),url:"https://make.wordpress.org/"}}]},edit:hx,save:function({attributes:e}){if(!e.ref)return(0,it.jsx)(ct.InnerBlocks.Content,{})},__experimentalLabel:({ref:e})=>{if(!e)return;const t=(0,lt.select)(_t.store).getEditedEntityRecord("postType","wp_navigation",e);return t?.title?(0,ao.decodeEntities)(t.title):void 0},deprecated:wx},Sx=()=>jt({name:Cx,metadata:Fh,settings:jx}),Bx=JSON.parse('{"$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","role":"content"},"type":{"type":"string"},"description":{"type":"string"},"rel":{"type":"string"},"id":{"type":"number"},"opensInNewTab":{"type":"boolean","default":false},"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":false,"html":false,"__experimentalSlashInserter":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"renaming":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-navigation-link-editor","style":"wp-block-navigation-link"}');function Tx(e,t){if("post-type"===t)switch(e){case"post":return(0,pt.__)("post");case"page":return(0,pt.__)("page");default:return e||(0,pt.__)("post")}if("taxonomy"===t)switch(e){case"category":return(0,pt.__)("category");case"tag":return(0,pt.__)("tag");default:return e||(0,pt.__)("term")}return e||(0,pt.__)("item")}function Nx({attributes:e,setAttributes:t,clientId:o}){const{label:n,url:r,description:a,rel:i,opensInNewTab:s}=e,l=(0,gt.useRef)(r),c=vt(),u=(0,gt.useRef)(),d=(0,gt.useRef)(!1),p=(0,xt.useInstanceId)(Nx,"link-input"),m=`${p}__help`,[g,h]=(0,gt.useState)(r);(0,gt.useEffect)((()=>{h(r),l.current=r}),[r]);const{hasUrlBinding:_,isBoundEntityAvailable:x,clearBinding:b}=p_({clientId:o,attributes:e}),{updateBlockAttributes:f}=(0,lt.useDispatch)(ct.store);return(0,gt.useEffect)((()=>{!_&&d.current&&u.current?.select(),d.current=!1}),[_]),(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({label:"",url:"",description:"",rel:"",opensInNewTab:!1})},dropdownMenuProps:c,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!n,label:(0,pt.__)("Text"),onDeselect:()=>t({label:""}),isShownByDefault:!0,children:(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Text"),value:n?(0,lu.__unstableStripHTML)(n):"",onChange:e=>{t({label:e})},autoComplete:"off"})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!r,label:(0,pt.__)("Link"),onDeselect:()=>t({url:""}),isShownByDefault:!0,children:(0,it.jsx)(mt.__experimentalInputControl,{ref:u,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,id:p,label:(0,pt.__)("Link"),value:_&&!x?"":g?(0,no.safeDecodeURI)(g):"",autoComplete:"off",type:"url",disabled:_,"aria-invalid":_&&!x?"true":void 0,"aria-describedby":m,className:_&&!x?"navigation-link-control__input-with-error-suffix":void 0,onChange:e=>{x||h(e)},onFocus:()=>{x||(l.current=r)},onBlur:()=>{if(x)return;const o=g||l.current;h(o),rx({url:o},t,{...e,url:l.current})},help:_&&!x?(0,it.jsx)(Dx,{id:m,type:e.type,kind:e.kind}):x&&(0,it.jsx)(Px,{type:e.type,kind:e.kind}),suffix:_&&(0,it.jsx)(mt.Button,{icon:hn,onClick:()=>{b(),f(o,{url:l.current,id:void 0}),d.current=!0},"aria-describedby":m,showTooltip:!0,label:(0,pt.__)("Unsync and edit"),__next40pxDefaultSize:!0,className:_&&!x?"navigation-link-control__error-suffix-button":void 0})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,pt.__)("Open in new tab"),onDeselect:()=>t({opensInNewTab:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),checked:s,onChange:e=>t({opensInNewTab:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!a,label:(0,pt.__)("Description"),onDeselect:()=>t({description:""}),isShownByDefault:!0,children:(0,it.jsx)(mt.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Description"),value:a||"",onChange:e=>{t({description:e})},help:(0,pt.__)("The description will be displayed in the menu if the current theme supports it.")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!i,label:(0,pt.__)("Rel attribute"),onDeselect:()=>t({rel:""}),isShownByDefault:!0,children:(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Rel attribute"),value:i||"",onChange:e=>{t({rel:e})},autoComplete:"off",help:(0,pt.__)("The relationship of the linked URL as space-separated link types.")})})]})}function Px({type:e,kind:t}){const o=Tx(e,t);return(0,pt.sprintf)((0,pt.__)("Synced with the selected %s."),o)}function Ix({type:e,kind:t}){const o=Tx(e,t);return(0,pt.sprintf)((0,pt.__)("Synced %s is missing. Please update or remove this link."),o)}function Dx({id:e,type:t,kind:o}){return(0,it.jsx)("span",{id:e,className:"navigation-link-control__error-text",children:(0,it.jsx)(Ix,{type:t,kind:o})})}const Mx={name:"core/navigation-link"},zx=["core/navigation-link","core/navigation-submenu"];var Ax=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})}),Lx=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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 Hx(e){switch(e){case"post":return fm;case"page":return Eh;case"tag":return Ax;case"category":return Un;default:return Lx}}function Rx(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:Hx(e.name)},...!e.isActive&&{isActive:t}})));return{...e,variations:o}}return e}const Vx={from:[{type:"block",blocks:["core/site-logo"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/spacer"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/home-link"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/search"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/page-list"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/buttons"],transform:()=>(0,st.createBlock)("core/navigation-link")}],to:[{type:"block",blocks:["core/navigation-submenu"],transform:(e,t)=>(0,st.createBlock)("core/navigation-submenu",e,t)},{type:"block",blocks:["core/spacer"],transform:()=>(0,st.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],transform:()=>(0,st.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],transform:()=>(0,st.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,st.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],transform:()=>(0,st.createBlock)("core/search",{showLabel:!1,buttonUseIcon:!0,buttonPosition:"button-inside"})},{type:"block",blocks:["core/page-list"],transform:()=>(0,st.createBlock)("core/page-list")},{type:"block",blocks:["core/buttons"],transform:({label:e,url:t,rel:o,title:n,opensInNewTab:r})=>(0,st.createBlock)("core/buttons",{},[(0,st.createBlock)("core/button",{text:e,url:t,rel:o,title:n,linkTarget:r?"_blank":void 0})])}]};var Fx=Vx;const{name:Ex}=Bx,Ox={icon:ed,__experimentalLabel:({label:e})=>e,merge:(e,{label:t=""})=>({...e,label:e.label+t}),edit:function e({attributes:t,isSelected:o,setAttributes:n,insertBlocksAfter:r,mergeBlocks:a,onReplace:i,context:s,clientId:l}){const{id:c,label:u,type:d,url:p,description:m,kind:g,metadata:h}=t,{maxNestingLevel:_}=s,{replaceBlock:x,__unstableMarkNextChangeAsNotPersistent:b,selectBlock:f}=(0,lt.useDispatch)(ct.store),[y,v]=(0,gt.useState)(o&&!p),[k,w]=(0,gt.useState)(null),C=(0,gt.useRef)(null),j=(e=>{const[t,o]=(0,gt.useState)(!1);return(0,gt.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})(C),S=(0,pt.__)("Add label…"),B=(0,gt.useRef)(),T=(0,gt.useRef)(),N=(0,xt.usePrevious)(p),P=(0,gt.useRef)(!p&&!h?.bindings?.url),{isAtMaxNesting:I,isTopLevelLink:D,isParentOfSelectedBlock:M,hasChildren:z,validateLinkStatus:A,parentBlockClientId:L}=(0,lt.useSelect)((e=>{const{getBlockCount:t,getBlockName:o,getBlockRootClientId:n,hasSelectedInnerBlock:r,getBlockParentsByBlockName:a,getSelectedBlockClientId:i}=e(ct.store),s=n(l),c=o(s),u="core/navigation"===c,d=i(),p=u?s:a(l,"core/navigation")[0],m="core/navigation-submenu"===c?s:p,g=d===p||r(p,!0);return{isAtMaxNesting:a(l,zx).length>=_,isTopLevelLink:u,isParentOfSelectedBlock:r(l,!0),hasChildren:!!t(l),validateLinkStatus:g,parentBlockClientId:m}}),[l,_]),{getBlocks:H}=(0,lt.useSelect)(ct.store),{clearBinding:R,createBinding:V,hasUrlBinding:F,isBoundEntityAvailable:E}=p_({clientId:l,attributes:t}),[O,G]=((e,t,o,n)=>{const r="post-type"===e||"post"===t||"page"===t,a=Number.isInteger(o),i=(0,ct.useBlockEditingMode)(),{postStatus:s,isDeleted:l}=(0,lt.useSelect)((e=>{if(!r)return{postStatus:null,isDeleted:!1};if("disabled"===i||!n)return{postStatus:null,isDeleted:!1};const{getEntityRecord:a,hasFinishedResolution:s}=e(_t.store),l=a("postType",t,o),c=s("getEntityRecord",["postType",t,o])&&void 0===l;return{postStatus:l?.status,isDeleted:c}}),[r,i,n,t,o]);return[r&&a&&(l||s&&"trash"===s),"draft"===s]})(g,d,c,A),$=(0,gt.useCallback)((()=>{let e=H(l);0===e.length&&(e=[(0,st.createBlock)("core/navigation-link")],f(e[0].clientId));const o=(0,st.createBlock)("core/navigation-submenu",t,e);x(l,o)}),[H,l,f,x,t]);(0,gt.useEffect)((()=>{P.current&&o&&!p&&f(L)}),[]),(0,gt.useEffect)((()=>{z&&(b(),$())}),[z,b,$]),(0,gt.useEffect)((()=>{!N&&p&&y&&(0,no.isURL)((0,no.prependHTTP)(u))&&/^.+\.[a-z]+/.test(u)&&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)}()}),[N,p,y,u]);const{textColor:U,customTextColor:q,backgroundColor:W,customBackgroundColor:Z}=L_(s,!D),J=(0,xt.useInstanceId)(e),Q=F&&!E,K=Q?(0,pt.sprintf)("navigation-link-edit-%d-desc",J):void 0,Y=(0,ct.useBlockProps)({ref:(0,xt.useMergeRefs)([w,C]),className:Dt("wp-block-navigation-item",{"is-editing":o||M,"is-dragging-within":j,"has-link":!!p,"has-child":z,"has-text-color":!!U||!!q,[(0,ct.getColorClassName)("color",U)]:!!U,"has-background":!!W||Z,[(0,ct.getColorClassName)("background-color",W)]:!!W}),"aria-describedby":K,"aria-invalid":Q,style:{color:!U&&q,backgroundColor:!W&&Z},onKeyDown:function(e){mn.isKeyboardEvent.primary(e,"k")&&(e.preventDefault(),e.stopPropagation(),v(!0))}}),X=(0,ct.useInnerBlocksProps)({...Y,className:"remove-outline"},{defaultBlock:Mx,directInsert:!0,renderAppender:!1});(!p||O||G||F&&!E)&&(Y.onClick=()=>{v(!0)});const ee=Dt("wp-block-navigation-item__content",{"wp-block-navigation-link__placeholder":!p||O||G||F&&!E}),te=function(e){let t="";switch(e){case"post":t=(0,pt.__)("Select post");break;case"page":t=(0,pt.__)("Select page");break;case"category":t=(0,pt.__)("Select category");break;case"tag":t=(0,pt.__)("Select tag");break;default:t=(0,pt.__)("Add link")}return t}(d),oe=`(${O?(0,pt.__)("Invalid"):(0,pt.__)("Draft")})`;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsxs)(mt.ToolbarGroup,{children:[(0,it.jsx)(mt.ToolbarButton,{name:"link",icon:gn,title:(0,pt.__)("Link"),shortcut:mn.displayShortcut.primary("k"),onClick:()=>{v(!0)}}),!I&&(0,it.jsx)(mt.ToolbarButton,{name:"submenu",icon:F_,title:(0,pt.__)("Add submenu"),onClick:$})]})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(Nx,{attributes:t,setAttributes:n,clientId:l})}),(0,it.jsxs)("div",{...Y,children:[Q&&(0,it.jsx)(mt.VisuallyHidden,{id:K,children:(0,it.jsx)(Ix,{type:d,kind:g})}),(0,it.jsxs)("a",{className:ee,children:[p||h?.bindings?.url?(0,it.jsxs)(it.Fragment,{children:[!O&&!G&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.RichText,{ref:B,identifier:"label",className:"wp-block-navigation-item__label",value:u,onChange:e=>n({label:e}),onMerge:a,onReplace:i,__unstableOnSplitAtEnd:()=>r((0,st.createBlock)("core/navigation-link")),"aria-label":(0,pt.__)("Navigation link text"),placeholder:S,withoutInteractiveFormatting:!0}),m&&(0,it.jsx)("span",{className:"wp-block-navigation-item__description",children:m})]}),(O||G)&&(0,it.jsx)("div",{className:Dt("wp-block-navigation-link__placeholder-text","wp-block-navigation-link__label",{"is-invalid":O,"is-draft":G}),children:(0,it.jsx)("span",{children:`${(0,ao.decodeEntities)(u)} ${O||G?oe:""}`.trim()})})]}):(0,it.jsx)("div",{className:"wp-block-navigation-link__placeholder-text",children:(0,it.jsx)("span",{children:te})}),y&&(0,it.jsx)(tx,{ref:T,clientId:l,link:t,onClose:()=>{v(!1),p||F?P.current&&f(l):i([])},anchor:k,onRemove:function(){n({url:void 0,label:void 0,id:void 0,kind:void 0,type:void 0,opensInNewTab:!1}),v(!1)},onChange:e=>{const{isEntityLink:o,attributes:r}=rx(e,n,t);o?V(r):R(r)}})]}),(0,it.jsx)("div",{...X})]})]})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})},example:{attributes:{label:(0,pt._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,it.jsx)(ct.InnerBlocks.Content,{})}],transforms:Fx},Gx=()=>((0,vl.addFilter)("blocks.registerBlockType","core/navigation-link",Rx),jt({name:Ex,metadata:Bx,settings:Ox})),$x=JSON.parse('{"$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","role":"content"},"type":{"type":"string"},"description":{"type":"string"},"rel":{"type":"string"},"id":{"type":"number"},"opensInNewTab":{"type":"boolean","default":false},"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":false,"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-navigation-submenu-editor","style":"wp-block-navigation-submenu"}');var Ux=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})});const qx=()=>(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,it.jsx)(mt.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})}),Wx=["core/navigation-link","core/navigation-submenu","core/page-list"];const Zx={to:[{type:"block",blocks:["core/navigation-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:e=>(0,st.createBlock)("core/navigation-link",e)},{type:"block",blocks:["core/spacer"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,st.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,st.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,st.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,st.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,st.createBlock)("core/search")}]};var Jx=Zx;const{name:Qx}=$x,Kx={icon:({context:e})=>"list-view"===e?Eh:F_,__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}=e,{showSubmenuIcon:u,maxNestingLevel:d,openSubmenusOnClick:p}=a,m="default"!==(0,ct.useBlockEditingMode)()||p,{clearBinding:g,createBinding:h}=p_({clientId:i,attributes:e}),{__unstableMarkNextChangeAsNotPersistent:_,replaceBlock:x}=(0,lt.useDispatch)(ct.store),[b,f]=(0,gt.useState)(!1),[y,v]=(0,gt.useState)(null),k=(0,gt.useRef)(null),w=(e=>{const[t,o]=(0,gt.useState)(!1);return(0,gt.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})(k),C=(0,pt.__)("Add text…"),j=(0,gt.useRef)(),{parentCount:S,isParentOfSelectedBlock:B,isImmediateParentOfSelectedBlock:T,hasChildren:N,selectedBlockHasChildren:P,onlyDescendantIsEmptyLink:I}=(0,lt.useSelect)((e=>{const{hasSelectedInnerBlock:t,getSelectedBlockClientId:o,getBlockParentsByBlockName:n,getBlock:r,getBlockCount:a,getBlockOrder:s}=e(ct.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,xt.usePrevious)(N);(0,gt.useEffect)((()=>{m||l||f(!0)}),[]),(0,gt.useEffect)((()=>{t||f(!1)}),[t]),(0,gt.useEffect)((()=>{b&&l&&(0,no.isURL)((0,no.prependHTTP)(s))&&/^.+\.[a-z]+/.test(s)&&function(){j.current.focus();const{ownerDocument:e}=j.current,{defaultView:t}=e,o=t.getSelection(),n=e.createRange();n.selectNodeContents(j.current),o.removeAllRanges(),o.addRange(n)}()}),[l]);const{textColor:M,customTextColor:z,backgroundColor:A,customBackgroundColor:L}=L_(a,S>0),H=(0,ct.useBlockProps)({ref:(0,xt.useMergeRefs)([v,k]),className:Dt("wp-block-navigation-item",{"is-editing":t||B,"is-dragging-within":w,"has-link":!!l,"has-child":N,"has-text-color":!!M||!!z,[(0,ct.getColorClassName)("color",M)]:!!M,"has-background":!!A||L,[(0,ct.getColorClassName)("background-color",A)]:!!A,"open-on-click":m}),style:{color:!M&&z,backgroundColor:!A&&L},onKeyDown:function(e){mn.isKeyboardEvent.primary(e,"k")&&(e.preventDefault(),e.stopPropagation(),f(!0))}}),R=L_(a,!0),V=S>=d?Wx.filter((e=>"core/navigation-submenu"!==e)):Wx,F=H_(R),E=(0,ct.useInnerBlocksProps)(F,{allowedBlocks:V,defaultBlock:$h,directInsert:!0,__experimentalCaptureToolbars:!0,renderAppender:!!(t||T&&!P||N)&&ct.InnerBlocks.ButtonBlockAppender}),O=m?"button":"a";function G(){const t=(0,st.createBlock)("core/navigation-link",e);x(i,t)}(0,gt.useEffect)((()=>{!N&&D&&(_(),G())}),[N,D]);const $=!P||I;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsxs)(mt.ToolbarGroup,{children:[!m&&(0,it.jsx)(mt.ToolbarButton,{name:"link",icon:gn,title:(0,pt.__)("Link"),shortcut:mn.displayShortcut.primary("k"),onClick:()=>{f(!0)}}),(0,it.jsx)(mt.ToolbarButton,{name:"revert",icon:Ux,title:(0,pt.__)("Convert to Link"),onClick:G,className:"wp-block-navigation__submenu__revert",disabled:!$})]})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(Nx,{attributes:e,setAttributes:o,clientId:i})}),(0,it.jsxs)("div",{...H,children:[(0,it.jsxs)(O,{className:"wp-block-navigation-item__content",children:[(0,it.jsx)(ct.RichText,{ref:j,identifier:"label",className:"wp-block-navigation-item__label",value:s,onChange:e=>o({label:e}),onMerge:n,onReplace:r,"aria-label":(0,pt.__)("Navigation link text"),placeholder:C,withoutInteractiveFormatting:!0,onClick:()=>{m||l||f(!0)}}),c&&(0,it.jsx)("span",{className:"wp-block-navigation-item__description",children:c}),!m&&b&&(0,it.jsx)(tx,{clientId:i,link:e,onClose:()=>{f(!1)},anchor:y,onRemove:()=>{o({url:""}),(0,dg.speak)((0,pt.__)("Link removed."),"assertive")},onChange:t=>{const{isEntityLink:n,attributes:r}=rx(t,o,e);n?h(r):g(r)}})]}),(u||m)&&(0,it.jsx)("span",{className:"wp-block-navigation__submenu-icon",children:(0,it.jsx)(qx,{})}),(0,it.jsx)("div",{...E})]})]})},example:{attributes:{label:(0,pt._x)("About","Example link text for Navigation Submenu"),type:"page"}},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})},transforms:Jx},Yx=()=>jt({name:Qx,metadata:$x,settings:Kx});var Xx=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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 eb=JSON.parse('{"$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":false,"className":false,"html":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-nextpage-editor"}');var tb={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/nextpage"===e.dataset.block,transform:()=>(0,st.createBlock)("core/nextpage",{})}]};const{name:ob}=eb,nb={icon:Xx,example:{},transforms:tb,edit:function(){return(0,it.jsx)("div",{...(0,ct.useBlockProps)(),children:(0,it.jsx)("span",{children:(0,pt.__)("Page break")})})},save:function(){return(0,it.jsx)(gt.RawHTML,{children:"\x3c!--nextpage--\x3e"})}},rb=()=>jt({name:ob,metadata:eb,settings:nb}),ab=JSON.parse('{"$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":false,"inserter":false,"renaming":false,"visibility":false,"interactivity":{"clientNavigation":true}},"textdomain":"default","attributes":{"slug":{"type":"string"}}}'),ib=new WeakMap;function sb(){const e=(0,lt.useRegistry)();if(!ib.has(e)){const t=new Map;ib.set(e,lb.bind(null,t))}return ib.get(e)}function lb(e,{name:t,blocks:o}){const n=[...o];for(;n.length;){const o=n.shift();for(const e of o.innerBlocks??[])n.unshift(e);"core/pattern"===o.name&&cb(e,t,o.attributes.slug)}}function cb(e,t,o){if(e.has(t)||e.set(t,new Set),e.get(t).add(o),ub(e,t))throw new TypeError(`Pattern ${t} has a circular dependency and cannot be rendered.`)}function ub(e,t,o=new Set,n=new Set){o.add(t),n.add(t);const r=e.get(t)??new Set;for(const t of r)if(o.has(t)){if(n.has(t))return!0}else if(ub(e,t,o,n))return!0;return n.delete(t),!1}var db=({attributes:e,clientId:t})=>{const o=(0,lt.useRegistry)(),n=(0,lt.useSelect)((t=>t(ct.store).__experimentalGetParsedPattern(e.slug)),[e.slug]),r=(0,lt.useSelect)((e=>e(_t.store).getCurrentTheme()?.stylesheet),[]),{replaceBlocks:a,setBlockEditingMode:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,lt.useDispatch)(ct.store),{getBlockRootClientId:l,getBlockEditingMode:c}=(0,lt.useSelect)(ct.store),[u,d]=(0,gt.useState)(!1),p=sb();(0,gt.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,st.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,ct.useBlockProps)();return u?(0,it.jsx)("div",{...m,children:(0,it.jsx)(ct.Warning,{children:(0,pt.sprintf)((0,pt.__)('Pattern "%s" cannot be rendered inside itself.'),n?.name)})}):(0,it.jsx)("div",{...m})};const{name:pb}=ab,mb={edit:db},gb=()=>jt({name:pb,metadata:ab,settings:mb});var hb=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,it.jsx)(St.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,it.jsx)(St.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})]});const _b=JSON.parse('{"$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":false}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],"supports":{"reusable":false,"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"color":{"text":true,"background":true,"link":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"padding":false,"margin":false}},"contentRole":true},"editorStyle":"wp-block-page-list-editor","style":"wp-block-page-list"}');function xb(e,t){for(const o of e){if(o.attributes.id===t)return o;if(o.innerBlocks&&o.innerBlocks.length){const e=xb(o.innerBlocks,t);if(e)return e}}return null}function bb(e=[],t=null){let o=function(e=[]){const t="post-type",o={},n=[];return e.forEach((({id:e,title:r,link:a,type:i,parent:s})=>{const l=o[e]?.innerBlocks??[];o[e]=(0,st.createBlock)("core/navigation-link",{id:e,label:r.rendered,url:a,type:i,kind:t,metadata:{bindings:d_(t)}},l),s?(o[s]||(o[s]={innerBlocks:[]}),o[s].innerBlocks.push(o[e])):n.push(o[e])})),n}(e);if(t){const e=xb(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,st.createBlock)("core/navigation-submenu",r,a);o[t]=e}}))};return n(o),o}function fb({clientId:e,pages:t,parentClientId:o,parentPageID:n}){const{replaceBlock:r,selectBlock:a}=(0,lt.useDispatch)(ct.store);return()=>{const i=bb(t,n);r(e,i),a(o)}}const yb=(0,pt.__)("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 vb({onClick:e,onClose:t,disabled:o}){return(0,it.jsxs)(mt.Modal,{onRequestClose:t,title:(0,pt.__)("Edit Page List"),className:"wp-block-page-list-modal",aria:{describedby:(0,xt.useInstanceId)(vb,"wp-block-page-list-modal__description")},children:[(0,it.jsx)("p",{id:(0,xt.useInstanceId)(vb,"wp-block-page-list-modal__description"),children:yb}),(0,it.jsxs)("div",{className:"wp-block-page-list-modal-buttons",children:[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,pt.__)("Cancel")}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",accessibleWhenDisabled:!0,disabled:o,onClick:e,children:(0,pt.__)("Edit")})]})]})}const kb=()=>{};function wb({blockProps:e,innerBlocksProps:t,hasResolvedPages:o,blockList:n,pages:r,parentPageID:a}){if(!o)return(0,it.jsx)("div",{...e,children:(0,it.jsx)("div",{className:"wp-block-page-list__loading-indicator-container",children:(0,it.jsx)(mt.Spinner,{className:"wp-block-page-list__loading-indicator"})})});if(null===r)return(0,it.jsx)("div",{...e,children:(0,it.jsx)(mt.Notice,{status:"warning",isDismissible:!1,children:(0,pt.__)("Page List: Cannot retrieve Pages.")})});if(0===r.length)return(0,it.jsx)("div",{...e,children:(0,it.jsx)(mt.Notice,{status:"info",isDismissible:!1,children:(0,pt.__)("Page List: Cannot retrieve Pages.")})});if(0===n.length){const t=r.find((e=>e.id===a));return t?.title?.rendered?(0,it.jsx)("div",{...e,children:(0,it.jsx)(ct.Warning,{children:(0,pt.sprintf)((0,pt.__)('Page List: "%s" page has no children.'),t.title.rendered)})}):(0,it.jsx)("div",{...e,children:(0,it.jsx)(mt.Notice,{status:"warning",isDismissible:!1,children:(0,pt.__)("Page List: Cannot retrieve Pages.")})})}return r.length>0?(0,it.jsx)("ul",{...t}):void 0}const{name:Cb}=_b,jb={icon:hb,example:{},edit:function({context:e,clientId:t,attributes:o,setAttributes:n}){const{parentPageID:r}=o,[a,i]=(0,gt.useState)(!1),s=(0,gt.useCallback)((()=>i(!0)),[]),l=vt(),{records:c,hasResolved:u}=(0,_t.useEntityRecords)("postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}),d="showSubmenuIcon"in e&&c?.length>0&&c?.length<=100,p=(0,gt.useMemo)((()=>{if(null===c)return new Map;const e=c.sort(((e,t)=>e.menu_order===t.menu_order?e.title.rendered.localeCompare(t.title.rendered):e.menu_order-t.menu_order));return e.reduce(((e,t)=>{const{parent:o}=t;return e.has(o)?e.get(o).push(t):e.set(o,[t]),e}),new Map)}),[c]),m=(0,ct.useBlockProps)({className:Dt("wp-block-page-list",{"has-text-color":!!e.textColor,[(0,ct.getColorClassName)("color",e.textColor)]:!!e.textColor,"has-background":!!e.backgroundColor,[(0,ct.getColorClassName)("background-color",e.backgroundColor)]:!!e.backgroundColor}),style:{...e.style?.color}}),g=(0,gt.useMemo)((function e(t=0,o=0){const n=p.get(t);return n?.length?n.reduce(((t,n)=>{const r=p.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}),[]):[]}),[p]),h=(0,gt.useMemo)((function e(t=r){const o=p.get(t);return o?.length?o.reduce(((t,o)=>{const n=p.has(o.id),r={id:o.id,label:""!==o.title?.rendered?.trim()?o.title?.rendered:(0,pt.__)("(no title)"),title:""!==o.title?.rendered?.trim()?o.title?.rendered:(0,pt.__)("(no title)"),link:o.url,hasChildren:n};let a=null;const i=e(o.id);return a=(0,st.createBlock)("core/page-list-item",r,i),t.push(a),t}),[]):[]}),[p,r]),{isNested:_,hasSelectedChild:x,parentClientId:b,hasDraggedChild:f,isChildOfNavigation:y}=(0,lt.useSelect)((e=>{const{getBlockParentsByBlockName:o,hasSelectedInnerBlock:n,hasDraggedInnerBlock:r}=e(ct.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]),v=fb({clientId:t,pages:c,parentClientId:b,parentPageID:r}),k=(0,ct.useInnerBlocksProps)(m,{renderAppender:!1,__unstableDisableDropZone:!0,templateLock:!y&&"all",onInput:kb,onChange:kb,value:h}),{selectBlock:w}=(0,lt.useDispatch)(ct.store);return(0,gt.useEffect)((()=>{(x||f)&&(s(),w(b))}),[x,f,b,w,s]),(0,gt.useEffect)((()=>{n({isNested:_})}),[_,n]),(0,it.jsxs)(it.Fragment,{children:[(g.length>0||d)&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{n({parentPageID:0})},dropdownMenuProps:l,children:[g.length>0&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Parent Page"),hasValue:()=>0!==r,onDeselect:()=>n({parentPageID:0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,pt.__)("Parent"),value:r,options:g,onChange:e=>n({parentPageID:e??0}),help:(0,pt.__)("Choose a page to show only its subpages.")})}),d&&(0,it.jsxs)("div",{style:{gridColumn:"1 / -1"},children:[(0,it.jsx)("p",{children:yb}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",accessibleWhenDisabled:!0,disabled:!u,onClick:v,children:(0,pt.__)("Edit")})]})]})}),d&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(mt.ToolbarButton,{title:(0,pt.__)("Edit"),onClick:s,children:(0,pt.__)("Edit")})}),a&&(0,it.jsx)(vb,{onClick:v,onClose:()=>i(!1),disabled:!u})]}),(0,it.jsx)(wb,{blockProps:m,innerBlocksProps:k,hasResolvedPages:u,blockList:h,pages:c,parentPageID:r})]})}},Sb=()=>jt({name:Cb,metadata:_b,settings:jb}),Bb=JSON.parse('{"$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":false,"html":false,"lock":false,"inserter":false,"__experimentalToolbar":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-page-list-editor","style":"wp-block-page-list"}'),Tb=()=>(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,it.jsx)(mt.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})});const{name:Nb}=Bb,Pb={__experimentalLabel:({label:e})=>e,icon:Eh,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,lt.useSelect)((e=>{if(!e(_t.store).canUser("read",{kind:"root",name:"site"}))return;const t=e(_t.store).getEntityRecord("root","site");return"page"===t?.show_on_front&&t?.page_on_front}),[]),c=H_(L_(e,!0)),u=(0,ct.useBlockProps)(c,{className:"wp-block-pages-list__item"}),d=(0,ct.useInnerBlocksProps)(u);return(0,it.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,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("button",{type:"button",className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle","aria-expanded":"false",children:(0,ao.decodeEntities)(n)}),(0,it.jsx)("span",{className:"wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon",children:(0,it.jsx)(Tb,{})})]}):(0,it.jsx)("a",{className:Dt("wp-block-pages-list__item__link",{"wp-block-navigation-item__content":s}),href:r,children:(0,ao.decodeEntities)(i)}),a&&(0,it.jsxs)(it.Fragment,{children:[!e.openSubmenusOnClick&&e.showSubmenuIcon&&(0,it.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,it.jsx)(Tb,{})}),(0,it.jsx)("ul",{...d})]})]},o)}},Ib=()=>jt({name:Nb,metadata:Bb,settings:Pb});var Db=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})});const Mb={className:!1},zb={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"}},Ab=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:Lb,...Hb}=zb,Rb=[{supports:Mb,attributes:{...Hb,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,pt.isRTL)()?"left":"right")&&"center"!==t&&n,[`has-text-align-${t}`]:t});return(0,it.jsx)("p",{...ct.useBlockProps.save({className:a,dir:r}),children:(0,it.jsx)(ct.RichText.Content,{value:o})})}},{supports:Mb,attributes:{...Hb,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:Ab,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,ct.getColorClassName)("color",a),p=(0,ct.getColorClassName)("background-color",r),m=(0,ct.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,it.jsx)(ct.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:o,dir:u})}},{supports:Mb,attributes:{...Hb,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:Ab,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,ct.getColorClassName)("color",a),p=(0,ct.getColorClassName)("background-color",r),m=(0,ct.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,it.jsx)(ct.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:o,dir:u})}},{supports:Mb,attributes:{...Hb,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"},width:{type:"string"}},migrate:Ab,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,ct.getColorClassName)("color",i),p=(0,ct.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,it.jsx)(ct.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:n})}},{supports:Mb,attributes:{...Hb,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,it.jsx)("p",{style:c,className:l||void 0,children:n})},migrate:e=>Ab({...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:Mb,attributes:{...zb,content:{type:"string",source:"html",default:""}},save:({attributes:e})=>(0,it.jsx)(gt.RawHTML,{children:e.content}),migrate:e=>e}];var Vb=Rb,Fb=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M3 9c0 2.8 2.2 5 5 5v-.2V20h1.5V5.5H12V20h1.5V5.5h3V4H8C5.2 4 3 6.2 3 9Zm15.9-1-1.1 1 2.6 3-2.6 3 1.1 1 3.4-4-3.4-4Z"})});function Eb(e){const{batch:t}=(0,lt.useRegistry)(),{moveBlocksToPosition:o,replaceInnerBlocks:n,duplicateBlocks:r,insertBlock:a}=(0,lt.useDispatch)(ct.store),{getBlockRootClientId:i,getBlockIndex:s,getBlockOrder:l,getBlockName:c,getBlock:u,getNextBlockClientId:d,canInsertBlockType:p}=(0,lt.useSelect)(ct.store),m=(0,gt.useRef)(e);return m.current=e,(0,xt.useRefEffect)((e=>{function g(e){if(e.defaultPrevented)return;if(e.keyCode!==mn.ENTER)return;const{content:g,clientId:h}=m.current;if(g.length)return;const _=i(h);if(!(0,st.hasBlockSupport)(c(_),"__experimentalOnEnter",!1))return;const x=l(_),b=x.indexOf(h);if(b===x.length-1){let t=_;for(;!p(c(h),i(t));)t=i(t);return void("string"==typeof t&&(e.preventDefault(),o([h],_,i(t),s(t)+1)))}const f=(0,st.getDefaultBlockName)();if(!p(f,i(_)))return;e.preventDefault();const y=u(_);t((()=>{r([_]);const e=s(_);n(_,y.innerBlocks.slice(0,b)),n(d(_),y.innerBlocks.slice(b+1)),a((0,st.createBlock)(f),e+1,i(_),!0)}))}return e.addEventListener("keydown",g),()=>{e.removeEventListener("keydown",g)}}),[])}function Ob({direction:e,setDirection:t}){return(0,pt.isRTL)()&&(0,it.jsx)(mt.ToolbarButton,{icon:Fb,title:(0,pt._x)("Left to right","editor button"),isActive:"ltr"===e,onClick:()=>{t("ltr"===e?void 0:"ltr")}})}function Gb(e){return e===((0,pt.isRTL)()?"left":"right")||"center"===e}function $b({clientId:e,attributes:t,setAttributes:o,name:n}){const[r]=(0,ct.useSettings)("typography.dropCap");if(!r)return null;const{align:a,dropCap:i}=t;let s;s=Gb(a)?(0,pt.__)("Not available for aligned text."):i?(0,pt.__)("Showing large initial letter."):(0,pt.__)("Show a large initial letter.");const l=(0,st.getBlockSupport)(n,"typography.defaultControls.dropCap",!1);return(0,it.jsx)(ct.InspectorControls,{group:"typography",children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!i,label:(0,pt.__)("Drop cap"),isShownByDefault:l,onDeselect:()=>o({dropCap:!1}),resetAllFilter:()=>({dropCap:!1}),panelId:e,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Drop cap"),checked:!!i,onChange:()=>o({dropCap:!i}),help:s,disabled:Gb(a)})})})}var Ub=function({attributes:e,mergeBlocks:t,onReplace:o,onRemove:n,setAttributes:r,clientId:a,isSelected:i,name:s}){const{align:l,content:c,direction:u,dropCap:d,placeholder:p}=e,m=(0,ct.useBlockProps)({ref:Eb({clientId:a,content:c}),className:Dt({"has-drop-cap":!Gb(l)&&d,[`has-text-align-${l}`]:l}),style:{direction:u}}),g=(0,ct.useBlockEditingMode)();return(0,it.jsxs)(it.Fragment,{children:["default"===g&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.AlignmentControl,{value:l,onChange:e=>r({align:e,dropCap:!Gb(e)&&d})}),(0,it.jsx)(Ob,{direction:u,setDirection:e=>r({direction:e})})]}),i&&(0,it.jsx)($b,{name:s,clientId:a,attributes:e,setAttributes:r}),(0,it.jsx)(ct.RichText,{identifier:"content",tagName:"p",...m,value:c,onChange:e=>r({content:e}),onMerge:t,onReplace:o,onRemove:n,"aria-label":ct.RichText.isEmpty(c)?(0,pt.__)("Empty block; start writing or type forward slash to choose a block"):(0,pt.__)("Block: Paragraph"),"data-empty":ct.RichText.isEmpty(c),placeholder:p||(0,pt.__)("Type / to choose a block"),"data-custom-placeholder":!!p||void 0,__unstableEmbedURLOnPaste:!0,__unstableAllowPrefixTransformations:!0})]})};const qb=JSON.parse('{"$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":false},"placeholder":{"type":"string"},"direction":{"type":"string","enum":["ltr","rtl"]}},"supports":{"splitting":true,"anchor":true,"className":false,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalWritingMode":true,"fitText":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalSelector":"p","__unstablePasteTextInline":true,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-paragraph-editor","style":"wp-block-paragraph"}');const Wb={from:[{type:"raw",priority:20,selector:"p",schema:({phrasingContentSchema:e,isPaste:t})=>({p:{children:e,attributes:t?[]:["style","id"]}}),transform(e){const t=(0,st.getBlockAttributes)(qb.name,e.outerHTML),{textAlign:o}=e.style||{};return"left"!==o&&"center"!==o&&"right"!==o||(t.align=o),(0,st.createBlock)(qb.name,t)}}]};var Zb=Wb;const Jb=[{name:"paragraph",title:(0,pt.__)("Paragraph"),description:(0,pt.__)("Start with the basic building block of all narrative."),isDefault:!0,scope:["block","inserter","transform"],attributes:{fitText:void 0},icon:Db},{name:"stretchy-paragraph",title:(0,pt.__)("Stretchy Paragraph"),description:(0,pt.__)("Paragraph that resizes to fit its container."),icon:(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M3 9c0 2.8 2.2 5 5 5v-.2V20h1.5V5.5H12V20h1.5V5.5h3V4H8C5.2 4 3 6.2 3 9Zm16.2-.2v1.5h2.2L17.7 14l1.1 1.1 3.7-3.7v2.2H24V8.8h-4.8Z"})}),attributes:{fitText:!0},scope:["inserter","transform"],isActive:e=>!0===e.fitText}];var Qb=Jb;const{name:Kb}=qb,Yb={icon:Db,example:{attributes:{content:(0,pt.__)("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,pt.__)("Empty")}},transforms:Zb,deprecated:Vb,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:Ub,save:function({attributes:e}){const{align:t,content:o,dropCap:n,direction:r}=e,a=Dt({"has-drop-cap":t!==((0,pt.isRTL)()?"left":"right")&&"center"!==t&&n,[`has-text-align-${t}`]:t});return(0,it.jsx)("p",{...ct.useBlockProps.save({className:a,dir:r}),children:(0,it.jsx)(ct.RichText.Content,{value:o})})},variations:Qb},Xb=()=>jt({name:Kb,metadata:qb,settings:Yb});var ef=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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"})});const tf=JSON.parse('{"$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":true},"showBio":{"type":"boolean"},"byline":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"usesContext":["postType","postId","queryId"],"supports":{"html":false,"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"filter":{"duotone":true}},"selectors":{"filter":{"duotone":".wp-block-post-author .wp-block-post-author__avatar img"}},"editorStyle":"wp-block-post-author-editor","style":"wp-block-post-author"}'),of={who:"authors",per_page:100,_fields:"id,name",context:"view"};function nf({value:e,onChange:t}){const[o,n]=(0,gt.useState)(""),{authors:r,isLoading:a}=(0,lt.useSelect)((e=>{const{getUsers:t,isResolving:n}=e(_t.store),r={...of};return o&&(r.search=o,r.search_columns=["name"]),{authors:t(r),isLoading:n("getUsers",[r])}}),[o]),i=(0,gt.useMemo)((()=>{const t=(r??[]).map((e=>({value:e.id,label:(0,ao.decodeEntities)(e.name)}))),o=t.findIndex((t=>e?.id===t.value));let n=[];return o<0&&e?n=[{value:e.id,label:(0,ao.decodeEntities)(e.name)}]:o<0&&!e&&(n=[{value:0,label:(0,pt.__)("(No author)")}]),[...n,...t]}),[r,e]);return(0,it.jsx)(mt.ComboboxControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Author"),options:i,value:e?.id,onFilterValueChange:(0,xt.debounce)(n,300),onChange:t,allowReset:!1,isLoading:a})}var rf=function({isSelected:e,context:{postType:t,postId:o,queryId:n},attributes:r,setAttributes:a}){const i=Number.isFinite(n),s=vt(),l=yt(),{authorDetails:c,canAssignAuthor:u,supportsAuthor:d}=(0,lt.useSelect)((e=>{const{getEditedEntityRecord:n,getUser:r,getPostType:a}=e(_t.store),i=n("postType",t,o),s=i?.author;return{authorDetails:s?r(s,{context:"view"}):null,supportsAuthor:a(t)?.supports?.author??!1,canAssignAuthor:!!i?._links?.["wp:action-assign-author"]}}),[t,o]),{editEntityRecord:p}=(0,lt.useDispatch)(_t.store),{textAlign:m,showAvatar:g,showBio:h,byline:_,isLink:x,linkTarget:b,avatarSize:f}=r,y=[],v=c?.name||(0,pt.__)("Post Author");c?.avatar_urls&&Object.keys(c.avatar_urls).forEach((e=>{y.push({value:e,label:`${e} x ${e}`})}));const k=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${m}`]:m})}),w=!!o&&!i&&u;return d||void 0===t?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{a({avatarSize:48,showAvatar:!0,isLink:!1,linkTarget:"_self"})},dropdownMenuProps:s,children:[w&&(0,it.jsx)("div",{style:{gridColumn:"1 / -1"},children:(0,it.jsx)(nf,{value:c,onChange:e=>{p("postType",t,o,{author:e})}})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show avatar"),isShownByDefault:!0,hasValue:()=>!g,onDeselect:()=>a({showAvatar:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show avatar"),checked:g,onChange:()=>a({showAvatar:!g})})}),g&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Avatar size"),isShownByDefault:!0,hasValue:()=>48!==f,onDeselect:()=>a({avatarSize:48}),children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Avatar size"),value:f,options:y,onChange:e=>{a({avatarSize:Number(e)})}})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show bio"),isShownByDefault:!0,hasValue:()=>!!h,onDeselect:()=>a({showBio:void 0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show bio"),checked:!!h,onChange:()=>a({showBio:!h})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link author name to author page"),isShownByDefault:!0,hasValue:()=>!!x,onDeselect:()=>a({isLink:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link author name to author page"),checked:x,onChange:()=>a({isLink:!x})})}),x&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link target"),isShownByDefault:!0,hasValue:()=>"_self"!==b,onDeselect:()=>a({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>a({linkTarget:e?"_blank":"_self"}),checked:"_blank"===b})})]})}),(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:m,onChange:e=>{a({textAlign:e})}})}),(0,it.jsxs)("div",{...k,children:[g&&(0,it.jsx)("div",{className:"wp-block-post-author__avatar",children:(0,it.jsx)("img",{width:f,src:c?.avatar_urls?.[f]||l,alt:c?.name||(0,pt.__)("Default Avatar")})}),(0,it.jsxs)("div",{className:"wp-block-post-author__content",children:[(!ct.RichText.isEmpty(_)||e)&&(0,it.jsx)(ct.RichText,{identifier:"byline",className:"wp-block-post-author__byline","aria-label":(0,pt.__)("Post author byline text"),placeholder:(0,pt.__)("Write byline…"),value:_,onChange:e=>a({byline:e})}),(0,it.jsx)("p",{className:"wp-block-post-author__name",children:x?(0,it.jsx)("a",{href:"#post-author-pseudo-link",onClick:e=>e.preventDefault(),children:v}):v}),h&&(0,it.jsx)("p",{className:"wp-block-post-author__bio",dangerouslySetInnerHTML:{__html:c?.description}})]})]})]}):(0,it.jsx)("div",{...k,children:(0,pt.sprintf)((0,pt.__)("This post type (%s) does not support the author."),t)})};const{name:af}=tf,sf={icon:ef,example:{viewportWidth:350,attributes:{showBio:!0,byline:(0,pt.__)("Posted by")}},edit:rf},lf=()=>jt({name:af,metadata:tf,settings:sf}),cf=JSON.parse('{"$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":false,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"usesContext":["postType","postId"],"example":{"viewportWidth":350},"supports":{"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-author-name"}');var uf=function({context:{postType:e,postId:t},attributes:{textAlign:o,isLink:n,linkTarget:r},setAttributes:a}){const{authorName:i,supportsAuthor:s}=(0,lt.useSelect)((o=>{const{getEditedEntityRecord:n,getUser:r,getPostType:a}=o(_t.store),i=n("postType",e,t)?.author;return{authorName:i?r(i):null,supportsAuthor:a(e)?.supports?.author??!1}}),[e,t]),l=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${o}`]:o})}),c=i?.name||(0,pt.__)("Author Name"),u=n?(0,it.jsx)("a",{href:"#author-pseudo-link",onClick:e=>e.preventDefault(),className:"wp-block-post-author-name__link",children:c}):c,d=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:o,onChange:e=>{a({textAlign:e})}})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{a({isLink:!1,linkTarget:"_self"})},dropdownMenuProps:d,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link to author archive"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>a({isLink:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link to author archive"),onChange:()=>a({isLink:!n}),checked:n})}),n&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_self"!==r,onDeselect:()=>a({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>a({linkTarget:e?"_blank":"_self"}),checked:"_blank"===r})})]})}),(0,it.jsx)("div",{...l,children:s||void 0===e?u:(0,pt.sprintf)((0,pt.__)("This post type (%s) does not support the author."),e)})]})};var df={from:[{type:"block",blocks:["core/post-author"],transform:({textAlign:e})=>(0,st.createBlock)("core/post-author-name",{textAlign:e})}],to:[{type:"block",blocks:["core/post-author"],transform:({textAlign:e})=>(0,st.createBlock)("core/post-author",{textAlign:e})}]};const{name:pf}=cf,mf={icon:ef,transforms:df,edit:uf},gf=()=>jt({name:pf,metadata:cf,settings:mf}),hf=JSON.parse('{"$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":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-author-biography"}');var _f=function({context:{postType:e,postId:t},attributes:{textAlign:o},setAttributes:n}){const{authorDetails:r}=(0,lt.useSelect)((o=>{const{getEditedEntityRecord:n,getUser:r}=o(_t.store),a=n("postType",e,t)?.author;return{authorDetails:a?r(a):null}}),[e,t]),a=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${o}`]:o})}),i=r?.description||(0,pt.__)("Author Biography");return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:o,onChange:e=>{n({textAlign:e})}})}),(0,it.jsx)("div",{...a,dangerouslySetInnerHTML:{__html:i}})]})};const{name:xf}=hf,bf={icon:ef,edit:_f},ff=()=>jt({name:xf,metadata:hf,settings:bf}),yf=JSON.parse('{"$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":false,"inserter":false,"interactivity":{"clientNavigation":true}}}');var vf=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})});const kf=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]];const{name:wf}=yf,Cf={icon:gm,edit:function({attributes:{commentId:e},setAttributes:t}){const[o,n]=(0,gt.useState)(e),r=(0,ct.useBlockProps)(),a=(0,ct.useInnerBlocksProps)(r,{template:kf});return e?(0,it.jsx)("div",{...a}):(0,it.jsx)("div",{...r,children:(0,it.jsxs)(mt.Placeholder,{icon:vf,label:(0,pt._x)("Post Comment","block title"),instructions:(0,pt.__)("To show a comment, input the comment ID."),children:[(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e,onChange:e=>n(parseInt(e))}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{t({commentId:o})},children:(0,pt.__)("Save")})]})})},save:function(){const e=ct.useBlockProps.save(),t=ct.useInnerBlocksProps.save(e);return(0,it.jsx)("div",{...t})}},jf=()=>jt({name:wf,metadata:yf,settings:Cf});var Sf=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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 Bf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"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"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"interactivity":{"clientNavigation":true}},"style":"wp-block-post-comments-count"}');var Tf={to:[{type:"block",blocks:["core/post-comments-link"],transform:({textAlign:e})=>(0,st.createBlock)("core/post-comments-link",{textAlign:e})}]};const{name:Nf}=Bf,Pf={icon:Sf,edit:function({attributes:e,context:t,setAttributes:o}){const{textAlign:n}=e,{postId:r}=t,[a,i]=(0,gt.useState)(),s=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${n}`]:n})});(0,gt.useEffect)((()=>{if(!r)return;const e=r;Ua()({path:(0,no.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,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:n,onChange:e=>{o({textAlign:e})}})}),(0,it.jsx)("div",{...s,style:c,children:l?a:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Post Comments Count block: post not found.")})})]})},transforms:Tf},If=()=>jt({name:Nf,metadata:Bf,settings:Pf});var Df=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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 Mf=JSON.parse('{"$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":false,"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-post-comments-form-editor","style":["wp-block-post-comments-form","wp-block-buttons","wp-block-button"],"example":{"attributes":{"textAlign":"center"}}}');const{name:zf}=Mf,Af={icon:Df,edit:function e({attributes:t,context:o,setAttributes:n}){const{textAlign:r}=t,{postId:a,postType:i}=o,s=(0,xt.useInstanceId)(e),l=(0,pt.sprintf)("comments-form-edit-%d-desc",s),c=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${r}`]:r}),"aria-describedby":l});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:r,onChange:e=>{n({textAlign:e})}})}),(0,it.jsxs)("div",{...c,children:[(0,it.jsx)(ea,{postId:a,postType:i}),(0,it.jsx)(mt.VisuallyHidden,{id:l,children:(0,pt.__)("Comments form disabled in editor.")})]})]})}},Lf=()=>jt({name:zf,metadata:Mf,settings:Af}),Hf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"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"}},"example":{"viewportWidth":350},"supports":{"html":false,"color":{"link":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-comments-link"}');var Rf=function({context:e,attributes:t,setAttributes:o}){const{textAlign:n}=t,{postType:r,postId:a}=e,[i,s]=(0,gt.useState)(),l=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${n}`]:n})});(0,gt.useEffect)((()=>{if(!a)return;const e=a;Ua()({path:(0,no.addQueryArgs)("/wp/v2/comments",{post:a}),parse:!1}).then((t=>{e===a&&s(t.headers.get("X-WP-Total"))}))}),[a]);const c=(0,lt.useSelect)((e=>e(_t.store).getEditedEntityRecord("postType",r,a)),[r,a]);if(!c)return(0,it.jsx)("div",{...l,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Post Comments Link block: post not found.")})});const{link:u}=c;let d;if(void 0!==i){const e=parseInt(i);d=0===e?(0,pt.__)("No comments"):(0,pt.sprintf)((0,pt._n)("%s comment","%s comments",e),e.toLocaleString())}return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:n,onChange:e=>{o({textAlign:e})}})}),(0,it.jsx)("div",{...l,children:u&&void 0!==d?(0,it.jsx)("a",{href:u+"#comments",onClick:e=>e.preventDefault(),children:d}):(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Post Comments Link block: post not found.")})})]})};var Vf={to:[{type:"block",blocks:["core/post-comments-count"],transform:({textAlign:e})=>(0,st.createBlock)("core/post-comments-count",{textAlign:e})}]};const{name:Ff}=Hf,Ef={edit:Rf,icon:Sf,transforms:Vf},Of=()=>jt({name:Ff,metadata:Hf,settings:Ef});var Gf=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"})});const $f=JSON.parse('{"$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"],"attributes":{"tagName":{"type":"string","default":"div"}},"example":{"viewportWidth":350},"supports":{"align":["wide","full"],"html":false,"layout":true,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"dimensions":{"minHeight":true},"spacing":{"blockGap":true,"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":false,"text":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-content","editorStyle":"wp-block-post-content-editor"}'),{HTMLElementControl:Uf}=jo(ct.privateApis);function qf({parentLayout:e,layoutClassNames:t,userCanEdit:o,postType:n,postId:r,tagName:a="div"}){const[,,i]=(0,_t.useEntityProp)("postType",n,"content",r),s=(0,ct.useBlockProps)({className:t}),l=(0,gt.useMemo)((()=>i?.raw?(0,st.parse)(i.raw):[]),[i?.raw]),c=(0,ct.__experimentalUseBlockPreview)({blocks:l,props:s,layout:e});return o?(0,it.jsx)("div",{...c}):i?.protected?(0,it.jsx)(a,{...s,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("This content is password protected.")})}):(0,it.jsx)(a,{...s,dangerouslySetInnerHTML:{__html:i?.rendered}})}function Wf({context:e={},tagName:t="div"}){const{postType:o,postId:n}=e,[r,a,i]=(0,_t.useEntityBlockEditor)("postType",o,{id:n}),s=(0,lt.useSelect)((e=>e(_t.store).getEntityRecord("postType",o,n)),[o,n]),l=!!s?.content?.raw||r?.length,c=(0,ct.useInnerBlocksProps)((0,ct.useBlockProps)({className:"entry-content"}),{value:r,onInput:a,onChange:i,template:l?void 0:[["core/paragraph"]]});return(0,it.jsx)(t,{...c})}function Zf(e){const{context:{queryId:t,postType:o,postId:n}={},layoutClassNames:r,tagName:a}=e,i=bt("postType",o,n);if(void 0===i)return null;const s=Number.isFinite(t);return i&&!s?(0,it.jsx)(Wf,{...e}):(0,it.jsx)(qf,{parentLayout:e.parentLayout,layoutClassNames:r,userCanEdit:i,postType:o,postId:n,tagName:a})}function Jf({layoutClassNames:e}){const t=(0,ct.useBlockProps)({className:e});return(0,it.jsxs)("div",{...t,children:[(0,it.jsx)("p",{children:(0,pt.__)("This is the Content block, it will display all the blocks in any single post or page.")}),(0,it.jsx)("p",{children:(0,pt.__)("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,it.jsx)("p",{children:(0,pt.__)("If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well.")})]})}function Qf(){const e=(0,ct.useBlockProps)();return(0,it.jsx)("div",{...e,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Block cannot be rendered inside itself.")})})}function Kf({tagName:e,onSelectTagName:t,clientId:o}){return(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(Uf,{tagName:e,onChange:t,clientId:o,options:[{label:(0,pt.__)("Default (
)"),value:"div"},{label:"
",value:"main"},{label:"
",value:"section"},{label:"
",value:"article"}]})})}const{name:Yf}=$f,Xf={icon:Gf,edit:function({context:e,attributes:{tagName:t="div"},setAttributes:o,clientId:n,__unstableLayoutClassNames:r,__unstableParentLayout:a}){const{postId:i,postType:s}=e,l=(0,ct.useHasRecursion)(i);return i&&s&&l?(0,it.jsx)(Qf,{}):(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(Kf,{tagName:t,onSelectTagName:e=>{o({tagName:e})},clientId:n}),(0,it.jsx)(ct.RecursionProvider,{uniqueId:i,children:i&&s?(0,it.jsx)(Zf,{context:e,parentLayout:a,layoutClassNames:r}):(0,it.jsx)(Jf,{layoutClassNames:r})})]})}},ey=()=>jt({name:Yf,metadata:$f,settings:Xf}),ty=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-date","title":"Date","category":"theme","description":"Display a custom date.","textdomain":"default","attributes":{"datetime":{"type":"string","role":"content"},"textAlign":{"type":"string"},"format":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}}}');function oy(e){return/(?:^|[^\\])[aAgh]/.test(e)}const ny={attributes:{datetime:{type:"string",role:"content"},textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1,role:"content"}},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}}},save:()=>null,migrate:({metadata:{bindings:{datetime:{source:e,args:{key:t,...o}},...n},...r},...a})=>({metadata:{bindings:{datetime:{source:e,args:{field:t,...o}},...n},...r},...a}),isEligible:e=>"core/post-data"===e?.metadata?.bindings?.datetime?.source&&!!e?.metadata?.bindings?.datetime?.args?.key},ry={attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1,role:"content"},displayType:{type:"string",default:"date"}},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}}},save:()=>null,migrate({className:e,displayType:t,metadata:o,...n}){if("date"===t||"modified"===t)return"modified"===t&&(e=Dt(e,"wp-block-post-date__modified-date")),{...n,className:e,metadata:{...o,bindings:{datetime:{source:"core/post-data",args:{field:t}}}}}},isEligible:e=>!e.datetime&&!e?.metadata?.bindings?.datetime},ay={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:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var iy=[ny,ry,ay];const sy=[{name:"post-date",title:(0,pt.__)("Post Date"),description:(0,pt.__)("Display a post's publish date."),attributes:{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"date"}}}}},scope:["inserter","transform"],isActive:e=>"core/post-data"===e?.metadata?.bindings?.datetime?.source&&"date"===e?.metadata?.bindings?.datetime?.args?.field},{name:"post-date-modified",title:(0,pt.__)("Modified Date"),description:(0,pt.__)("Display a post's last updated date."),attributes:{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"modified"}}}},className:"wp-block-post-date__modified-date"},scope:["inserter","transform"],isActive:e=>"core/post-data"===e?.metadata?.bindings?.datetime?.source&&"modified"===e?.metadata?.bindings?.datetime?.args?.field}];var ly=sy;const{name:cy}=ty,uy={icon:wa,edit:function({attributes:e,context:{postType:t,queryId:o},setAttributes:n,name:r}){const{datetime:a,textAlign:i,format:s,isLink:l}=e,c=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${i}`]:i})}),u=vt(),[d,p]=(0,gt.useState)(null),m=(0,gt.useMemo)((()=>({anchor:d})),[d]),{__unstableMarkNextChangeAsNotPersistent:g}=(0,lt.useDispatch)(ct.store);(0,gt.useEffect)((()=>{void 0===a&&(g(),n({datetime:new Date}))}),[a]);const h=Number.isFinite(o),_=(0,ja.getSettings)(),{postType:x,siteFormat:b=_.formats.date,siteTimeFormat:f=_.formats.time}=(0,lt.useSelect)((e=>{const{getPostType:o,getEntityRecord:n}=e(_t.store),r=n("root","site");return{siteFormat:r?.date_format,siteTimeFormat:r?.time_format,postType:t?o(t):null}}),[t]),y=(0,lt.useSelect)((t=>t(st.store).getActiveBlockVariation(r,e)?.name),[r,e]),v=(0,ct.useBlockEditingMode)();let k=(0,it.jsx)("time",{dateTime:(0,ja.dateI18n)("c",a),ref:p,children:"human-diff"===s?(0,ja.humanTimeDiff)(a):(0,ja.dateI18n)(s||b,a)});return l&&a&&(k=(0,it.jsx)("a",{href:"#post-date-pseudo-link",onClick:e=>e.preventDefault(),children:k})),(0,it.jsxs)(it.Fragment,{children:[("default"===v||!h)&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.AlignmentControl,{value:i,onChange:e=>{n({textAlign:e})}}),"post-date-modified"!==y&&(!h||!y)&&(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.Dropdown,{popoverProps:m,renderContent:({onClose:e})=>(0,it.jsx)(ct.__experimentalPublishDateTimePicker,{title:"post-date"===y?(0,pt.__)("Publish Date"):(0,pt.__)("Date"),currentDate:a,onChange:e=>n({datetime:e}),is12Hour:oy(f),onClose:e,dateOrder:(0,pt._x)("dmy","date order")}),renderToggle:({isOpen:e,onToggle:t})=>(0,it.jsx)(mt.ToolbarButton,{"aria-expanded":e,icon:$l,title:(0,pt.__)("Change Date"),onClick:t,onKeyDown:o=>{e||o.keyCode!==mn.DOWN||(o.preventDefault(),t())}})})})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{n({datetime:void 0,format:void 0,isLink:!1})},dropdownMenuProps:u,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,pt.__)("Date Format"),onDeselect:()=>n({format:void 0}),isShownByDefault:!0,children:(0,it.jsx)(ct.__experimentalDateFormatPicker,{format:s,defaultFormat:b,onChange:e=>n({format:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!1!==l,label:x?.labels.singular_name?(0,pt.sprintf)((0,pt.__)("Link to %s"),x.labels.singular_name.toLowerCase()):(0,pt.__)("Link to post"),onDeselect:()=>n({isLink:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:x?.labels.singular_name?(0,pt.sprintf)((0,pt.__)("Link to %s"),x.labels.singular_name.toLowerCase()):(0,pt.__)("Link to post"),onChange:()=>n({isLink:!l}),checked:l})})]})}),(0,it.jsx)("div",{...c,children:k})]})},deprecated:iy,variations:ly},dy=()=>jt({name:cy,metadata:ty,settings:uy});var py=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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 my=JSON.parse('{"$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","role":"content"},"showMoreOnNewLine":{"type":"boolean","default":true},"excerptLength":{"type":"number","default":55}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-post-excerpt-editor","style":"wp-block-post-excerpt"}');var gy={from:[{type:"block",blocks:["core/post-content"],transform:()=>(0,st.createBlock)("core/post-excerpt")}],to:[{type:"block",blocks:["core/post-content"],transform:()=>(0,st.createBlock)("core/post-content")}]};const{name:hy}=my,_y={icon:py,transforms:gy,edit:function({attributes:{textAlign:e,moreText:t,showMoreOnNewLine:o,excerptLength:n},setAttributes:r,isSelected:a,context:{postId:i,postType:s,queryId:l}}){const c="default"===(0,ct.useBlockEditingMode)(),u=Number.isFinite(l),d=bt("postType",s,i),[p,m,{rendered:g,protected:h}={}]=(0,_t.useEntityProp)("postType",s,"excerpt",i),_=vt(),x=(0,lt.useSelect)((e=>"page"===s||!!e(_t.store).getPostType(s)?.supports?.excerpt),[s]),b=d&&!u&&x,f=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${e}`]:e})}),y=(0,pt._x)("words","Word count type. Do not translate!"),v=(0,gt.useMemo)((()=>{if(!g)return"";const e=(new window.DOMParser).parseFromString(g,"text/html");return e.body.textContent||e.body.innerText||""}),[g]);if(!s||!i)return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:e,onChange:e=>r({textAlign:e})})}),(0,it.jsx)("div",{...f,children:(0,it.jsx)("p",{children:(0,pt.__)("This block will display the excerpt.")})})]});if(h&&!d)return(0,it.jsx)("div",{...f,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("The content is currently protected and does not have the available excerpt.")})});const k=(0,it.jsx)(ct.RichText,{identifier:"moreText",className:"wp-block-post-excerpt__more-link",tagName:"a","aria-label":(0,pt.__)("“Read more” link text"),placeholder:(0,pt.__)('Add "read more" link text'),value:t,onChange:e=>r({moreText:e}),withoutInteractiveFormatting:!0}),w=Dt("wp-block-post-excerpt__excerpt",{"is-inline":!o}),C=(p||v).trim();let j="";if("words"===y)j=C.split(" ",n).join(" ");else if("characters_excluding_spaces"===y){const e=C.split("",n).join(""),t=e.length-e.replaceAll(" ","").length;j=C.split("",n+t).join("")}else"characters_including_spaces"===y&&(j=C.split("",n).join(""));const S=j!==C,B=b?(0,it.jsx)(ct.RichText,{className:w,"aria-label":(0,pt.__)("Excerpt text"),value:a?C:(S?j+"…":C)||(0,pt.__)("No excerpt found"),onChange:m,tagName:"p"}):(0,it.jsx)("p",{className:w,children:S?j+"…":C||(0,pt.__)("No excerpt found")});return(0,it.jsxs)(it.Fragment,{children:[c&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:e,onChange:e=>r({textAlign:e})})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{r({showMoreOnNewLine:!0,excerptLength:55})},dropdownMenuProps:_,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!0!==o,label:(0,pt.__)("Show link on new line"),onDeselect:()=>r({showMoreOnNewLine:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show link on new line"),checked:o,onChange:e=>r({showMoreOnNewLine:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>55!==n,label:(0,pt.__)("Max number of words"),onDeselect:()=>r({excerptLength:55}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Max number of words"),value:n,onChange:e=>{r({excerptLength:e})},min:"10",max:"100"})})]})}),(0,it.jsxs)("div",{...f,children:[B,!o&&" ",o?(0,it.jsx)("p",{className:"wp-block-post-excerpt__more-text",children:k}):k]})]})}},xy=()=>jt({name:hy,metadata:my,settings:_y});var by=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})});const fy=JSON.parse('{"$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":false,"role":"content"},"aspectRatio":{"type":"string"},"width":{"type":"string"},"height":{"type":"string"},"scale":{"type":"string","default":"cover"},"sizeSlug":{"type":"string"},"rel":{"type":"string","attribute":"rel","default":"","role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"},"overlayColor":{"type":"string"},"customOverlayColor":{"type":"string"},"dimRatio":{"type":"number","default":0},"gradient":{"type":"string"},"customGradient":{"type":"string"},"useFirstImageFromPost":{"type":"boolean","default":false}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"align":["left","right","center","wide","full"],"color":{"text":false,"background":false},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true}},"filter":{"duotone":true},"shadow":{"__experimentalSkipSerialization":true},"html":false,"spacing":{"margin":true,"padding":true},"interactivity":{"clientNavigation":true}},"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"}'),yy=(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"cover",label:(0,pt._x)("Cover","Scale option for Image dimension control")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"contain",label:(0,pt._x)("Contain","Scale option for Image dimension control")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"fill",label:(0,pt._x)("Fill","Scale option for Image dimension control")})]}),vy="cover",ky={cover:(0,pt.__)("Image is scaled and cropped to fill the entire space without being distorted."),contain:(0,pt.__)("Image is scaled to fill the space without clipping nor distorting."),fill:(0,pt.__)("Image will be stretched and distorted to completely fill the space.")};var wy=({clientId:e,attributes:{aspectRatio:t,width:o,height:n,scale:r},setAttributes:a})=>{const[i,s,l,c]=(0,ct.useSettings)("spacing.units","dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),u=(0,mt.__experimentalUseCustomUnits)({availableUnits:i||["px","%","vw","em","rem"]}),d=(e,t)=>{const o=parseFloat(t);isNaN(o)&&t||a({[e]:o<0?"0":t})},p=(0,pt._x)("Scale","Image scaling options"),m=n||t&&"auto"!==t,g=l?.map((({name:e,ratio:t})=>({label:e,value:t}))),h=s?.map((({name:e,ratio:t})=>({label:e,value:t}))),_=[{label:(0,pt._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...c?h:[],...g||[]];return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:(0,pt.__)("Aspect ratio"),onDeselect:()=>a({aspectRatio:void 0}),resetAllFilter:()=>({aspectRatio:void 0}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Aspect ratio"),value:t,options:_,onChange:e=>a({aspectRatio:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!n,label:(0,pt.__)("Height"),onDeselect:()=>a({height:void 0}),resetAllFilter:()=>({height:void 0}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Height"),labelPosition:"top",value:n||"",min:0,onChange:e=>d("height",e),units:u})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!o,label:(0,pt.__)("Width"),onDeselect:()=>a({width:void 0}),resetAllFilter:()=>({width:void 0}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Width"),labelPosition:"top",value:o||"",min:0,onChange:e=>d("width",e),units:u})}),m&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!r&&r!==vy,label:p,onDeselect:()=>a({scale:vy}),resetAllFilter:()=>({scale:vy}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:p,value:r,help:ky[r],onChange:e=>a({scale:e}),isBlock:!0,children:yy})})]})};var Cy=(0,xt.compose)([(0,ct.withColors)({overlayColor:"background-color"})])((({clientId:e,attributes:t,setAttributes:o,overlayColor:n,setOverlayColor:r})=>{const{dimRatio:a}=t,{gradientValue:i,setGradient:s}=(0,ct.__experimentalUseGradient)(),l=(0,ct.__experimentalUseMultipleOriginColorsAndGradients)();return l.hasColorsOrGradients?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:n.color,gradientValue:i,label:(0,pt.__)("Overlay"),onColorChange:r,onGradientChange:s,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0}),clearable:!0}],panelId:e,...l}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>void 0!==a,label:(0,pt.__)("Overlay opacity"),onDeselect:()=>o({dimRatio:0}),resetAllFilter:()=>({dimRatio:0}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Overlay opacity"),value:a,onChange:e=>o({dimRatio:e}),min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0})})]}):null}));var jy=(0,xt.compose)([(0,ct.withColors)({overlayColor:"background-color"})])((({attributes:e,overlayColor:t})=>{const{dimRatio:o}=e,{gradientClass:n,gradientValue:r}=(0,ct.__experimentalUseGradient)(),a=(0,ct.__experimentalUseMultipleOriginColorsAndGradients)(),i=(0,ct.__experimentalUseBorderProps)(e),s={backgroundColor:t.color,backgroundImage:r,...i.style};return a.hasColorsOrGradients&&o?(0,it.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}));const Sy=["image"],{ResolutionTool:By}=jo(ct.privateApis),Ty="full";function Ny({image:e,value:t,onChange:o}){const{imageSizes:n}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store);return{imageSizes:t().imageSizes}}),[]);if(!n?.length)return null;const r=n.filter((({slug:t})=>e?.media_details?.sizes?.[t]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e})));return(0,it.jsx)(By,{value:t,defaultValue:Ty,options:r,onChange:o})}const{name:Py}=fy,Iy={icon:by,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,gt.useState)(),[b,f]=(0,_t.useEntityProp)("postType",r,"featured_media",n),[y]=(0,_t.useEntityProp)("postType",r,"content",n),v=(0,gt.useMemo)((()=>{if(b)return b;if(!h)return;const e=/).)*)?}\s+)?-->/.exec(y);return e?.groups?.attrs&&JSON.parse(e.groups.attrs)?.id}),[b,h,y]),{media:k,postType:w,postPermalink:C}=(0,lt.useSelect)((e=>{const{getEntityRecord:t,getPostType:o,getEditedEntityRecord:a}=e(_t.store);return{media:v&&t("postType","attachment",v,{context:"view"}),postType:r&&o(r),postPermalink:a("postType",r,n)?.link}}),[v,r,n]),j=k?.media_details?.sizes?.[p]?.source_url||k?.source_url,S=(0,ct.useBlockProps)({style:{width:u,height:c,aspectRatio:l},className:Dt({"is-transient":_})}),B=(0,ct.__experimentalUseBorderProps)(t),T=(0,ct.__experimentalGetShadowClassesAndStyles)(t),N=(0,ct.useBlockEditingMode)(),P=e=>(0,it.jsx)(mt.Placeholder,{className:Dt("block-editor-media-placeholder",B.className),withIllustration:!0,style:{height:!!l&&"100%",width:!!l&&"100%",...B.style,...T.style},children:e}),I=e=>{e?.id&&f(e.id),e?.url&&(0,ht.isBlobURL)(e.url)&&x(e.url)};(0,gt.useEffect)((()=>{j&&_&&x()}),[j,_]);const{createErrorNotice:D}=(0,lt.useDispatch)(bo.store),M=e=>{D(e,{type:"snackbar"}),x()},z=vt(),A="default"===N&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{group:"color",children:(0,it.jsx)(Cy,{attributes:t,setAttributes:o,clientId:e})}),(0,it.jsx)(ct.InspectorControls,{group:"dimensions",children:(0,it.jsx)(wy,{clientId:e,attributes:t,setAttributes:o,media:k})}),(v||i||!n)&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({isLink:!1,linkTarget:"_self",rel:"",sizeSlug:Ty})},dropdownMenuProps:z,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:w?.labels.singular_name?(0,pt.sprintf)((0,pt.__)("Link to %s"),w.labels.singular_name):(0,pt.__)("Link to post"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>o({isLink:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:w?.labels.singular_name?(0,pt.sprintf)((0,pt.__)("Link to %s"),w.labels.singular_name):(0,pt.__)("Link to post"),onChange:()=>o({isLink:!s}),checked:s})}),s&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_self"!==g,onDeselect:()=>o({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>o({linkTarget:e?"_blank":"_self"}),checked:"_blank"===g})}),s&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link relation"),isShownByDefault:!0,hasValue:()=>!!m,onDeselect:()=>o({rel:""}),children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link relation"),help:(0,gt.createInterpolateElement)((0,pt.__)("The Link Relation attribute defines the relationship between a linked resource and the current document."),{a:(0,it.jsx)(mt.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:m,onChange:e=>o({rel:e})})}),!!k&&(0,it.jsx)(Ny,{image:k,value:p,onChange:e=>o({sizeSlug:e})})]})})]});let L;if(!v&&(i||!n))return(0,it.jsxs)(it.Fragment,{children:[A,(0,it.jsxs)("div",{...S,children:[s?(0,it.jsx)("a",{href:C,target:g,children:P()}):P(),(0,it.jsx)(jy,{attributes:t,setAttributes:o,clientId:e})]})]});const H=(0,pt.__)("Add a featured image"),R={...B.style,...T.style,height:l?"100%":c,width:!!l&&"100%",objectFit:!(!c&&!l)&&d};return L=v||_?k||_?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("img",{className:B.className,src:_||j,alt:k&&k?.alt_text?(0,pt.sprintf)((0,pt.__)("Featured image: %s"),k.alt_text):(0,pt.__)("Featured image"),style:R}),_&&(0,it.jsx)(mt.Spinner,{})]}):P():(0,it.jsx)(ct.MediaPlaceholder,{onSelect:I,accept:"image/*",allowedTypes:Sy,onError:M,placeholder:P,mediaLibraryButton:({open:e})=>(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,icon:Jp,variant:"primary",label:H,showTooltip:!0,tooltipPosition:"top center",onClick:()=>{e()}})}),(0,it.jsxs)(it.Fragment,{children:[!_&&A,!!k&&!i&&(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(ct.MediaReplaceFlow,{mediaId:v,mediaURL:j,allowedTypes:Sy,accept:"image/*",onSelect:I,onError:M,onReset:()=>{o({isLink:!1,linkTarget:"_self",rel:"",sizeSlug:void 0}),f(0)}})}),(0,it.jsxs)("figure",{...S,children:[s?(0,it.jsx)("a",{href:C,target:g,children:L}):L,(0,it.jsx)(jy,{attributes:t,setAttributes:o,clientId:e})]})]})}},Dy=()=>jt({name:Py,metadata:fy,settings:Iy}),My=JSON.parse('{"$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","role":"content"},"showTitle":{"type":"boolean","default":false},"linkLabel":{"type":"boolean","default":false},"arrow":{"type":"string","default":"none"},"taxonomy":{"type":"string","default":""}},"usesContext":["postType"],"supports":{"reusable":false,"html":false,"color":{"link":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-post-navigation-link"}');var zy=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})}),Ay=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})});const Ly=[{name:"post-previous",title:(0,pt.__)("Previous Post"),description:(0,pt.__)("Displays the post link that precedes the current post."),icon:zy,attributes:{type:"previous"},scope:["inserter","transform"],example:{attributes:{label:(0,pt.__)("Previous post"),arrow:"arrow"}}},{isDefault:!0,name:"post-next",title:(0,pt.__)("Next Post"),description:(0,pt.__)("Displays the post link that follows the current post."),icon:Ay,attributes:{type:"next"},scope:["inserter","transform"],example:{attributes:{label:(0,pt.__)("Next post"),arrow:"arrow"}}}];Ly.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.type===t.type)}));var Hy=Ly;const{name:Ry}=My,Vy={edit:function({context:{postType:e},attributes:{type:t,label:o,showTitle:n,textAlign:r,linkLabel:a,arrow:i,taxonomy:s},setAttributes:l}){const c="default"===(0,ct.useBlockEditingMode)(),u="next"===t;let d=u?(0,pt.__)("Next"):(0,pt.__)("Previous");const p={none:"",arrow:u?"→":"←",chevron:u?"»":"«"}[i];n&&(d=u?(0,pt.__)("Next: "):(0,pt.__)("Previous: "));const m=u?(0,pt.__)("Next post"):(0,pt.__)("Previous post"),g=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${r}`]:r})}),h=(0,lt.useSelect)((t=>{const{getTaxonomies:o}=t(_t.store);return o({type:e,per_page:-1})}),[e]),_=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{l({showTitle:!1,linkLabel:!1,arrow:"none"})},dropdownMenuProps:_,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Display the title as a link"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>l({showTitle:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display the title as a link"),help:(0,pt.__)("If you have entered a custom label, it will be prepended before the title."),checked:!!n,onChange:()=>l({showTitle:!n})})}),n&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Include the label as part of the link"),isShownByDefault:!0,hasValue:()=>!!a,onDeselect:()=>l({linkLabel:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Include the label as part of the link"),checked:!!a,onChange:()=>l({linkLabel:!a})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Arrow"),isShownByDefault:!0,hasValue:()=>"none"!==i,onDeselect:()=>l({arrow:"none"}),children:(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Arrow"),value:i,onChange:e=>{l({arrow:e})},help:(0,pt.__)("A decorative arrow for the next and previous link."),isBlock:!0,children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"none",label:(0,pt._x)("None","Arrow option for Next/Previous link")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,pt._x)("Arrow","Arrow option for Next/Previous link")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,pt._x)("Chevron","Arrow option for Next/Previous link")})]})})]})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Filter by taxonomy"),value:s,options:[{label:(0,pt.__)("Unfiltered"),value:""},...(h??[]).filter((({visibility:e})=>!!e?.publicly_queryable)).map((e=>({value:e.slug,label:e.name})))],onChange:e=>l({taxonomy:e}),help:(0,pt.__)("Only link to posts that have the same taxonomy terms as the current post. For example the same tags or categories.")})}),c&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:r,onChange:e=>{l({textAlign:e})}})}),(0,it.jsxs)("div",{...g,children:[!u&&p&&(0,it.jsx)("span",{className:`wp-block-post-navigation-link__arrow-previous is-arrow-${i}`,children:p}),(0,it.jsx)(ct.RichText,{tagName:"a",identifier:"label","aria-label":m,placeholder:d,value:o,withoutInteractiveFormatting:!0,onChange:e=>l({label:e})}),n&&(0,it.jsx)("a",{href:"#post-navigation-pseudo-link",onClick:e=>e.preventDefault(),children:(0,pt.__)("An example title")}),u&&p&&(0,it.jsx)("span",{className:`wp-block-post-navigation-link__arrow-next is-arrow-${i}`,"aria-hidden":!0,children:p})]})]})},variations:Hy,example:{attributes:{label:(0,pt.__)("Next post"),arrow:"arrow"}}},Fy=()=>jt({name:Ry,metadata:My,settings:Vy}),Ey=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-template","title":"Post Template","category":"theme","ancestor":["core/query"],"description":"Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.","textdomain":"default","usesContext":["queryId","query","displayLayout","templateSlug","previewPostType","enhancedPagination","postType"],"supports":{"reusable":false,"html":false,"align":["wide","full"],"layout":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":true,"padding":true,"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true,"padding":false,"margin":false}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"style":"wp-block-post-template","editorStyle":"wp-block-post-template-editor"}'),Oy=[["core/post-title"],["core/post-date",{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"date"}}}}}],["core/post-excerpt"]];function Gy({classList:e}){const t=(0,ct.useInnerBlocksProps)({className:Dt("wp-block-post",e)},{template:Oy,__unstableDisableLayoutClassNames:!0});return(0,it.jsx)("li",{...t})}const $y=(0,gt.memo)((function({blocks:e,blockContextId:t,classList:o,isHidden:n,setActiveBlockContextId:r}){const a=(0,ct.__experimentalUseBlockPreview)({blocks:e,props:{className:Dt("wp-block-post",o)}}),i=()=>{r(t)},s={display:n?"none":void 0};return(0,it.jsx)("li",{...a,tabIndex:0,role:"button",onClick:i,onKeyPress:i,style:s})}));const{name:Uy}=Ey,qy={icon:Oa,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,..._}={},templateSlug:x,previewPostType:b},attributes:{layout:f},__unstableLayoutClassNames:y}){const{type:v,columnCount:k=3}=f||{},[w,C]=(0,gt.useState)(),{posts:j,blocks:S}=(0,lt.useSelect)((e=>{const{getEntityRecords:g,getTaxonomies:f}=e(_t.store),{getBlocks:y}=e(ct.store),v=d&&x?.startsWith("category-")&&g("taxonomy","category",{context:"view",per_page:1,_fields:["id"],slug:x.replace("category-","")}),k=d&&x?.startsWith("tag-")&&g("taxonomy","post_tag",{context:"view",per_page:1,_fields:["id"],slug:x.replace("tag-","")}),w={offset:n||0,order:a,orderby:i};if(p&&!d){const e=f({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(w,t)}o&&(w.per_page=o),s&&(w.author=s),l&&(w.search=l),c?.length&&(w.exclude=c),m?.length&&(w.parent=m),h?.length&&(w.format=h),["exclude","only"].includes(u)&&(w.sticky="only"===u),["","ignore"].includes(u)&&(delete w.sticky,w.ignore_sticky="ignore"===u);let C=r;d&&(x?.startsWith("archive-")?(w.postType=x.replace("archive-",""),C=w.postType):v?w.categories=v[0]?.id:k?w.tags=k[0]?.id:x?.startsWith("taxonomy-post_format")&&(w.format=x.replace("taxonomy-post_format-post-format-","")));return{posts:g("postType",b||C,{...w,..._}),blocks:y(t)}}),[o,n,a,i,t,s,l,r,c,u,d,x,p,m,h,_,b]),B=(0,gt.useMemo)((()=>j?.map((e=>({postType:e.type,postId:e.id,classList:e.class_list??""})))),[j]),T=(0,ct.useBlockProps)({className:Dt(y,{[`columns-${k}`]:"grid"===v&&k})});if(!j)return(0,it.jsx)("p",{...T,children:(0,it.jsx)(mt.Spinner,{})});if(!j.length)return(0,it.jsxs)("p",{...T,children:[" ",(0,pt.__)("No results found.")]});const N=t=>e({layout:{...f,...t}}),P=[{icon:Bm,title:(0,pt._x)("List view","Post template block display setting"),onClick:()=>N({type:"default"}),isActive:"default"===v||"constrained"===v},{icon:qd,title:(0,pt._x)("Grid view","Post template block display setting"),onClick:()=>N({type:"grid",columnCount:k}),isActive:"grid"===v}];return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{controls:P})}),(0,it.jsx)("ul",{...T,children:B&&B.map((e=>(0,it.jsxs)(ct.BlockContextProvider,{value:e,children:[e.postId===(w||B[0]?.postId)?(0,it.jsx)(Gy,{classList:e.classList}):null,(0,it.jsx)($y,{blocks:S,blockContextId:e.postId,classList:e.classList,setActiveBlockContextId:C,isHidden:e.postId===(w||B[0]?.postId)})]},e.postId)))})]})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})}},Wy=()=>jt({name:Uy,metadata:Ey,settings:qy});var Zy=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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"})});const Jy=JSON.parse('{"$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":"","role":"content"},"suffix":{"type":"string","default":"","role":"content"}},"usesContext":["postId","postType"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-terms"}'),Qy=[];const Ky=["core/bold","core/image","core/italic","core/link","core/strikethrough","core/text-color"];var Yy=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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"})});const Xy={category:Zy,post_tag:Yy};function ev(e,t){if("core/post-terms"!==t)return e;const o=e.variations.map((e=>({...e,icon:Xy[e.name]??Zy})));return{...e,variations:o}}const{name:tv}=Jy,ov={icon:Zy,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="default"===(0,ct.useBlockEditingMode)(),g=(0,lt.useSelect)((e=>{if(!i)return{};const{getTaxonomy:t}=e(_t.store),o=t(i);return o?.visibility?.publicly_queryable?o:{}}),[i]),{postTerms:h,hasPostTerms:_,isLoading:x}=function({postId:e,term:t}){const{slug:o}=t;return(0,lt.useSelect)((n=>{const r=t?.visibility?.publicly_queryable;if(!r)return{postTerms:Qy,isLoading:!1,hasPostTerms:!1};const{getEntityRecords:a,isResolving:i}=n(_t.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:g}),b=d&&p,f=(0,ct.useBlockDisplayInformation)(t),y=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${s}`]:s,[`taxonomy-${i}`]:i})});return(0,it.jsxs)(it.Fragment,{children:[m&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:s,onChange:e=>{r({textAlign:e})}})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,pt.__)("Separator"),value:l||"",onChange:e=>{r({separator:e})},help:(0,pt.__)("Enter character(s) used to separate terms.")})}),(0,it.jsxs)("div",{...y,children:[x&&b&&(0,it.jsx)(mt.Spinner,{}),!x&&(n||c)&&(0,it.jsx)(ct.RichText,{identifier:"prefix",allowedFormats:Ky,className:"wp-block-post-terms__prefix","aria-label":(0,pt.__)("Prefix"),placeholder:(0,pt.__)("Prefix")+" ",value:c,onChange:e=>r({prefix:e}),tagName:"span"}),(!b||!i)&&(0,it.jsx)("span",{children:f.title}),b&&!x&&_&&h.map((e=>(0,it.jsx)("a",{href:e.link,onClick:e=>e.preventDefault(),rel:"tag",children:(0,ao.decodeEntities)(e.name)},e.id))).reduce(((e,t)=>(0,it.jsxs)(it.Fragment,{children:[e,(0,it.jsx)("span",{className:"wp-block-post-terms__separator",children:l||" "}),t]}))),b&&!x&&!_&&(g?.labels?.no_terms||(0,pt.__)("Term items not found.")),!x&&(n||u)&&(0,it.jsx)(ct.RichText,{identifier:"suffix",allowedFormats:Ky,className:"wp-block-post-terms__suffix","aria-label":(0,pt.__)("Suffix"),placeholder:" "+(0,pt.__)("Suffix"),value:u,onChange:e=>r({suffix:e}),tagName:"span",__unstableOnSplitAtEnd:()=>a((0,st.createBlock)((0,st.getDefaultBlockName)()))})]})]})}},nv=()=>((0,vl.addFilter)("blocks.registerBlockType","core/template-part",ev),jt({name:tv,metadata:Jy,settings:ov}));var rv=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})});const av=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-time-to-read","title":"Time to Read","category":"theme","description":"Show minutes required to finish reading the post. Can also show a word count.","textdomain":"default","usesContext":["postId","postType"],"attributes":{"textAlign":{"type":"string"},"displayAsRange":{"type":"boolean","default":true},"displayMode":{"type":"string","default":"time"},"averageReadingSpeed":{"type":"number","default":189}},"supports":{"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}}}'),iv=window.wp.wordcount;var sv=function({attributes:e,setAttributes:t,context:o}){const{textAlign:n,displayAsRange:r,displayMode:a,averageReadingSpeed:i}=e,{postId:s,postType:l}=o,c=vt(),[u]=(0,_t.useEntityProp)("postType",l,"content",s),[d]=(0,_t.useEntityBlockEditor)("postType",l,{id:s}),p=(0,gt.useMemo)((()=>{let e;e=u instanceof Function?u({blocks:d}):d?(0,st.__unstableSerializeAndClean)(d):u;const t=(0,pt._x)("words","Word count type. Do not translate!"),o=(0,iv.count)(e||"",t);if("time"===a){if(r){let e=Math.max(1,Math.round(o/i*1.2));const t=Math.max(1,Math.round(o/i*.8));t===e&&(e+=1);const n=(0,pt._x)("%1$s–%2$s minutes","Range of minutes to read");return(0,pt.sprintf)(n,t,e)}const e=Math.max(1,Math.round(o/i));return(0,pt.sprintf)((0,pt._n)("%s minute","%s minutes",e),e)}if("words"===a)return"words"===t?(0,pt.sprintf)((0,pt._n)("%s word","%s words",o),o.toLocaleString()):(0,pt.sprintf)((0,pt._n)("%s character","%s characters",o),o.toLocaleString())}),[u,d,r,a,i]),m=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${n}`]:n})});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:n,onChange:e=>{t({textAlign:e})}})}),"time"===a&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({displayAsRange:!0})},dropdownMenuProps:c,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt._x)("Display as range","Turns reading time range display on or off"),hasValue:()=>!r,onDeselect:()=>{t({displayAsRange:!0})},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display as range"),checked:!!r,onChange:()=>t({displayAsRange:!r})})})})}),(0,it.jsx)("div",{...m,children:p})]})},lv=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 5c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2zM5 6.5c-.3 0-.5.2-.5.5v10c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V7c0-.3-.2-.5-.5-.5zM14.734 9q.714 0 1.15.253.437.247.639.84.2.591.2 1.61v1.15q0 .402.036.667.04.258.172.39.138.127.437.127h.104l-.162.828h-.08q-.5 0-.776-.097a.9.9 0 0 1-.414-.283 2 2 0 0 1-.259-.448q-.316.367-.748.598-.43.23-.977.23-.524 0-.914-.213a1.56 1.56 0 0 1-.61-.58 1.65 1.65 0 0 1-.213-.84q0-.477.207-.817.213-.345.564-.568.357-.23.794-.363.437-.139.902-.196.471-.062.902-.068 0-.805-.315-1.053-.316-.247-.915-.247-.316 0-.678.098-.356.097-.805.408l-.15-.84a2.8 2.8 0 0 1 .846-.419A3.4 3.4 0 0 1 14.734 9m-5.877 1.669H9.86l.59-1.531h.689l-.585 1.53h.898l-.249.727h-.922l-.337.866h1.019l-.354.773h-.962l-.681 1.804h-.701l.69-1.804h-.999l-.693 1.804h-.69l.685-1.804H6.3l.34-.773h.915l.333-.866h-.994l.244-.726H8.16l.594-1.531h.693zm6.832 1.264q-.823.029-1.335.16-.506.133-.74.397-.236.265-.236.685 0 .454.241.66.248.202.632.202.414 0 .8-.207.39-.207.637-.552zm-7.441.328h1l.34-.866h-1z"})});const cv=[{name:"time-to-read",title:(0,pt.__)("Time to Read"),description:(0,pt.__)("Show minutes required to finish reading the post."),attributes:{displayMode:"time"},scope:["inserter","transform"],isActive:e=>"time"===e?.displayMode,icon:rv,isDefault:!0},{name:"word-count",title:(0,pt.__)("Word Count"),description:(0,pt.__)("Show the number of words in the post."),attributes:{displayMode:"words"},scope:["inserter","transform"],isActive:e=>"words"===e?.displayMode,icon:lv}];var uv=cv;const{name:dv}=av,pv={icon:rv,edit:sv,variations:uv,example:{}},mv=()=>jt({name:dv,metadata:av,settings:pv}),gv=JSON.parse('{"$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":false,"role":"content"},"rel":{"type":"string","attribute":"rel","default":"","role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"example":{"viewportWidth":350},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-title"}');const hv={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:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var _v=[hv];const{name:xv}=gv,bv={icon:ji,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,lt.useSelect)((e=>!p&&e(_t.store).canUser("update",{kind:"postType",name:s,id:l})),[p,s,l]),[g="",h,_]=(0,_t.useEntityProp)("postType",s,"title",l),[x]=(0,_t.useEntityProp)("postType",s,"link",l),b=()=>{u((0,st.createBlock)((0,st.getDefaultBlockName)()))},f=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${o}`]:o})}),y=(0,ct.useBlockEditingMode)(),v=vt();let k=(0,it.jsx)(d,{...f,children:(0,pt.__)("Title")});return s&&l&&(k=m?(0,it.jsx)(ct.PlainText,{tagName:d,placeholder:(0,pt.__)("No title"),value:g,onChange:h,__experimentalVersion:2,__unstableOnSplitAtEnd:b,...f}):(0,it.jsx)(d,{...f,dangerouslySetInnerHTML:{__html:_?.rendered}})),n&&s&&l&&(k=m?(0,it.jsx)(d,{...f,children:(0,it.jsx)(ct.PlainText,{tagName:"a",href:x,target:a,rel:r,placeholder:g.length?null:(0,pt.__)("No title"),value:g,onChange:h,__experimentalVersion:2,__unstableOnSplitAtEnd:b})}):(0,it.jsx)(d,{...f,children:(0,it.jsx)("a",{href:x,target:a,rel:r,onClick:e=>e.preventDefault(),dangerouslySetInnerHTML:{__html:_?.rendered}})})),(0,it.jsxs)(it.Fragment,{children:["default"===y&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.HeadingLevelDropdown,{value:e,options:t,onChange:e=>i({level:e})}),(0,it.jsx)(ct.AlignmentControl,{value:o,onChange:e=>{i({textAlign:e})}})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{i({rel:"",linkTarget:"_self",isLink:!1})},dropdownMenuProps:v,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Make title a link"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>i({isLink:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Make title a link"),onChange:()=>i({isLink:!n}),checked:n})}),n&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_blank"===a,onDeselect:()=>i({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>i({linkTarget:e?"_blank":"_self"}),checked:"_blank"===a})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link relation"),isShownByDefault:!0,hasValue:()=>!!r,onDeselect:()=>i({rel:""}),children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link relation"),help:(0,gt.createInterpolateElement)((0,pt.__)("The Link Relation attribute defines the relationship between a linked resource and the current document."),{a:(0,it.jsx)(mt.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:r,onChange:e=>i({rel:e})})})]})]})})]}),k]})},deprecated:_v},fv=()=>jt({name:xv,metadata:gv,settings:bv});var yv=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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 vv=JSON.parse('{"$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":true,"role":"content"}},"supports":{"anchor":true,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-preformatted"}');const kv={from:[{type:"block",blocks:["core/code","core/paragraph","core/verse"],transform:({content:e,anchor:t})=>(0,st.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,st.createBlock)("core/paragraph",e)},{type:"block",blocks:["core/code"],transform:e=>(0,st.createBlock)("core/code",e)},{type:"block",blocks:["core/verse"],transform:e=>(0,st.createBlock)("core/verse",e)}]};var wv=kv;const{name:Cv}=vv,jv={icon:yv,example:{attributes:{content:(0,pt.__)("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:wv,edit:function({attributes:e,mergeBlocks:t,setAttributes:o,onRemove:n,insertBlocksAfter:r,style:a}){const{content:i}=e,s=(0,ct.useBlockProps)({style:a});return(0,it.jsx)(ct.RichText,{tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:i,onChange:e=>{o({content:e})},onRemove:n,"aria-label":(0,pt.__)("Preformatted text"),placeholder:(0,pt.__)("Write preformatted text…"),onMerge:t,...s,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>r((0,st.createBlock)((0,st.getDefaultBlockName)()))})},save:function({attributes:e}){const{content:t}=e;return(0,it.jsx)("pre",{...ct.useBlockProps.save(),children:(0,it.jsx)(ct.RichText.Content,{value:t})})},merge:(e,t)=>({content:e.content+"\n\n"+t.content})},Sv=()=>jt({name:Cv,metadata:vv,settings:jv});var Bv=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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"})});const Tv="is-style-solid-color",Nv={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 Pv(e){if(!e)return;const t=e.match(/border-color:([^;]+)[;]?/);return t&&t[1]?t[1]:void 0}function Iv(e){const t=`

${e=e||"

"}

`.split("

");return t.shift(),t.pop(),t.join("
")}const Dv={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=!ct.RichText.isEmpty(o);return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:Dt({[`has-text-align-${t}`]:t})}),children:(0,it.jsxs)("blockquote",{children:[(0,it.jsx)(ct.RichText.Content,{value:n,multiline:!0}),r&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:o})]})})},migrate:({value:e,...t})=>({value:Iv(e),...t})},Mv={attributes:{...Nv},save({attributes:e}){const{mainColor:t,customMainColor:o,customTextColor:n,textColor:r,value:a,citation:i,className:s}=e,l=s?.includes(Tv);let c,u;if(l){const e=(0,ct.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,ct.getColorClassName)("color",r),p=Dt({"has-text-color":r||n,[d]:d}),m=d?void 0:{color:n};return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:c,style:u}),children:(0,it.jsxs)("blockquote",{className:p,style:m,children:[(0,it.jsx)(ct.RichText.Content,{value:a,multiline:!0}),!ct.RichText.isEmpty(i)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,mainColor:o,customMainColor:n,customTextColor:r,...a}){const i=t?.includes(Tv);let s;return n&&(s=i?{color:{background:n}}:{border:{color:n}}),r&&s&&(s.color={...s.color,text:r}),{value:Iv(e),className:t,backgroundColor:i?o:void 0,borderColor:i?void 0:o,textAlign:i?"left":void 0,style:s,...a}}},zv={attributes:{...Nv,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(Tv);let u,d;if(c){const e=(0,ct.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:Pv(l)}}const p=(0,ct.getColorClassName)("color",n),m=(n||r)&&Dt("has-text-color",{[p]:p}),g=p?void 0:{color:r};return(0,it.jsx)("figure",{className:u,style:d,children:(0,it.jsxs)("blockquote",{className:m,style:g,children:[(0,it.jsx)(ct.RichText.Content,{value:a,multiline:!0}),!ct.RichText.isEmpty(i)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,figureStyle:o,mainColor:n,customMainColor:r,customTextColor:a,...i}){const s=t?.includes(Tv);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=Pv(o);if(n)return{value:Iv(e),...i,className:t,style:{border:{color:n}}}}return{value:Iv(e),className:t,backgroundColor:s?n:void 0,borderColor:s?void 0:n,textAlign:s?"left":void 0,style:l,...i}}},Av={attributes:Nv,save({attributes:e}){const{mainColor:t,customMainColor:o,textColor:n,customTextColor:r,value:a,citation:i,className:s}=e,l=s?.includes(Tv);let c,u;if(l)c=(0,ct.getColorClassName)("background-color",t),c||(u={backgroundColor:o});else if(o)u={borderColor:o};else if(t){const e=(0,lt.select)(ct.store).getSettings().colors??[];u={borderColor:(0,ct.getColorObjectByAttributeValues)(e,t).color}}const d=(0,ct.getColorClassName)("color",n),p=n||r?Dt("has-text-color",{[d]:d}):void 0,m=d?void 0:{color:r};return(0,it.jsx)("figure",{className:c,style:u,children:(0,it.jsxs)("blockquote",{className:p,style:m,children:[(0,it.jsx)(ct.RichText.Content,{value:a,multiline:!0}),!ct.RichText.isEmpty(i)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,mainColor:o,customMainColor:n,customTextColor:r,...a}){const i=t?.includes(Tv);let s={};return n&&(s=i?{color:{background:n}}:{border:{color:n}}),r&&s&&(s.color={...s.color,text:r}),{value:Iv(e),className:t,backgroundColor:i?o:void 0,borderColor:i?void 0:o,textAlign:i?"left":void 0,style:s,...a}}},Lv={attributes:{...Nv},save({attributes:e}){const{value:t,citation:o}=e;return(0,it.jsxs)("blockquote",{children:[(0,it.jsx)(ct.RichText.Content,{value:t,multiline:!0}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:o})]})},migrate:({value:e,...t})=>({value:Iv(e),...t})},Hv={attributes:{...Nv,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,it.jsxs)("blockquote",{className:`align${n}`,children:[(0,it.jsx)(ct.RichText.Content,{value:t,multiline:!0}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"footer",value:o})]})},migrate:({value:e,...t})=>({value:Iv(e),...t})};var Rv=[Dv,Mv,zv,Av,Lv,Hv];const Vv="web"===gt.Platform.OS;var Fv=function({attributes:e,setAttributes:t,isSelected:o,insertBlocksAfter:n}){const{textAlign:r,citation:a,value:i}=e,s=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${r}`]:r})}),l=!ct.RichText.isEmpty(a)||o;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:r,onChange:e=>{t({textAlign:e})}})}),(0,it.jsx)("figure",{...s,children:(0,it.jsxs)("blockquote",{children:[(0,it.jsx)(ct.RichText,{identifier:"value",tagName:"p",value:i,onChange:e=>t({value:e}),"aria-label":(0,pt.__)("Pullquote text"),placeholder:(0,pt.__)("Add quote"),textAlign:"center"}),l&&(0,it.jsx)(ct.RichText,{identifier:"citation",tagName:Vv?"cite":void 0,style:{display:"block"},value:a,"aria-label":(0,pt.__)("Pullquote citation text"),placeholder:(0,pt.__)("Add citation"),onChange:e=>t({citation:e}),className:"wp-block-pullquote__citation",__unstableMobileNoFocusOnMount:!0,textAlign:"center",__unstableOnSplitAtEnd:()=>n((0,st.createBlock)((0,st.getDefaultBlockName)()))})]})})]})};const Ev=JSON.parse('{"$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":true,"align":["left","right","wide","full"],"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"gradients":true,"background":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"dimensions":{"minHeight":true,"__experimentalDefaultControls":{"minHeight":false}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"__experimentalStyle":{"typography":{"fontSize":"1.5em","lineHeight":"1.6"}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-pullquote-editor","style":"wp-block-pullquote"}');const Ov={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,st.createBlock)("core/pullquote",{value:(0,Tn.toHTMLString)({value:(0,Tn.join)(e.map((({content:e})=>(0,Tn.create)({html:e}))),"\n")}),anchor:e.anchor})},{type:"block",blocks:["core/heading"],transform:({content:e,anchor:t})=>(0,st.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,st.createBlock)("core/paragraph",{content:e})),t&&o.push((0,st.createBlock)("core/paragraph",{content:t})),0===o.length?(0,st.createBlock)("core/paragraph",{content:""}):o}},{type:"block",blocks:["core/heading"],transform:({value:e,citation:t})=>{if(!e)return(0,st.createBlock)("core/heading",{content:t});const o=(0,st.createBlock)("core/heading",{content:e});return t?[o,(0,st.createBlock)("core/heading",{content:t})]:o}}]};var Gv=Ov;const{name:$v}=Ev,Uv={icon:Bv,example:{attributes:{value:(0,pt.__)("One of the hardest things to do in technology is disrupt yourself."),citation:(0,pt.__)("Matt Mullenweg")}},transforms:Gv,edit:Fv,save:function({attributes:e}){const{textAlign:t,citation:o,value:n}=e,r=!ct.RichText.isEmpty(o);return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:Dt({[`has-text-align-${t}`]:t})}),children:(0,it.jsxs)("blockquote",{children:[(0,it.jsx)(ct.RichText.Content,{tagName:"p",value:n}),r&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:o})]})})},deprecated:Rv},qv=()=>jt({name:$v,metadata:Ev,settings:Uv});var Wv=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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"})});const Zv=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query","title":"Query Loop","category":"theme","description":"An advanced block that allows displaying post types based on different query parameters and visual configurations.","keywords":["posts","list","blog","blogs","custom post types"],"textdomain":"default","attributes":{"queryId":{"type":"number"},"query":{"type":"object","default":{"perPage":null,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"taxQuery":null,"parents":[],"format":[]}},"tagName":{"type":"string","default":"div"},"namespace":{"type":"string"},"enhancedPagination":{"type":"boolean","default":false}},"usesContext":["templateSlug"],"providesContext":{"queryId":"queryId","query":"query","displayLayout":"displayLayout","enhancedPagination":"enhancedPagination"},"supports":{"align":["wide","full"],"html":false,"layout":true,"interactivity":true,"contentRole":true},"editorStyle":"wp-block-query-editor"}'),Jv=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}},Qv=(e,t)=>{const o=t.split(".");let n=e;return o.forEach((e=>{n=n?.[e]})),n},Kv=(e,t)=>(e||[]).map((e=>({...e,name:(0,ao.decodeEntities)(Qv(e,t))}))),Yv=e=>{const t=(0,lt.useSelect)((t=>{const{getTaxonomies:o,getPostType:n}=t(_t.store);return n(e)?.taxonomies?.length>0?o({type:e,per_page:-1}):[]}),[e]);return(0,gt.useMemo)((()=>t?.filter((({visibility:e})=>!!e?.publicly_queryable))),[t])};function Xv(e,t){return!e||e.includes(t)}const ek=e=>(0,lt.useSelect)((t=>{const{getClientIdsOfDescendants:o,getBlockName:n}=t(ct.store);return o(e).some((e=>{const t=n(e),o=Object.is((0,st.getBlockSupport)(t,"interactivity"),!0),r=(0,st.getBlockSupport)(t,"interactivity.clientNavigation");return!o&&!r}))}),[e]);function tk({enhancedPagination:e,setAttributes:t,clientId:o}){const n=ek(o);let r=(0,pt.__)("Reload the full page—instead of just the posts list—when visitors navigate between pages.");return n&&(r=(0,pt.__)("Enhancement disabled because there are non-compatible blocks inside the Query block.")),(0,it.jsx)(it.Fragment,{children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Reload full page"),help:r,checked:!e,disabled:n,onChange:e=>{t({enhancedPagination:!e})}})})}const ok=[{label:(0,pt.__)("Newest to oldest"),value:"date/desc"},{label:(0,pt.__)("Oldest to newest"),value:"date/asc"},{label:(0,pt.__)("A → Z"),value:"title/asc"},{label:(0,pt.__)("Z → A"),value:"title/desc"}];var nk=function({order:e,orderBy:t,orderByOptions:o=ok,onChange:n}){return(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Order by"),value:`${t}/${e}`,options:o,onChange:e=>{const[t,o]=e.split("/");n({order:o,orderBy:t})}})};const rk={who:"authors",per_page:-1,_fields:"id,name",context:"view"};var ak=function({value:e,onChange:t}){const o=(0,lt.useSelect)((e=>{const{getUsers:t}=e(_t.store);return t(rk)}),[]);if(!o)return null;const n=Jv(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,it.jsx)(mt.FormTokenField,{label:(0,pt.__)("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})};const ik=[],sk={order:"asc",_fields:"id,title",context:"view"};var lk=function({parents:e,postType:t,onChange:o}){const[n,r]=(0,gt.useState)(""),[a,i]=(0,gt.useState)(ik),[s,l]=(0,gt.useState)(ik),c=(0,xt.useDebounce)(r,250),{searchResults:u,searchHasResolved:d}=(0,lt.useSelect)((o=>{if(!n)return{searchResults:ik,searchHasResolved:!0};const{getEntityRecords:r,hasFinishedResolution:a}=o(_t.store),i=["postType",t,{...sk,search:n,orderby:"relevance",exclude:e,per_page:20}];return{searchResults:r(...i),searchHasResolved:a("getEntityRecords",i)}}),[n,t,e]),p=(0,lt.useSelect)((o=>{if(!e?.length)return ik;const{getEntityRecords:n}=o(_t.store);return n("postType",t,{...sk,include:e,per_page:e.length})}),[e,t]);(0,gt.useEffect)((()=>{if(e?.length||i(ik),!p?.length)return;const t=Jv(Kv(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,gt.useMemo)((()=>u?.length?Jv(Kv(u,"title.rendered")):ik),[u]);return(0,gt.useEffect)((()=>{d&&l(m.names)}),[m.names,d]),(0,it.jsx)(mt.FormTokenField,{__next40pxDefaultSize:!0,label:(0,pt.__)("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(ik),o({parents:t})},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0})};const ck=[],uk={order:"asc",_fields:"id,name",context:"view"},dk=(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 pk({onChange:e,query:t}){const{postType:o,taxQuery:n}=t,r=Yv(o);return r&&0!==r.length?(0,it.jsx)(mt.__experimentalVStack,{spacing:4,children:r.map((t=>{const o=n?.[t.slug]||[];return(0,it.jsx)(mk,{taxonomy:t,termIds:o,onChange:o=>e({taxQuery:{...n,[t.slug]:o}})},t.slug)}))}):null}function mk({taxonomy:e,termIds:t,onChange:o}){const[n,r]=(0,gt.useState)(""),[a,i]=(0,gt.useState)(ck),[s,l]=(0,gt.useState)(ck),c=(0,xt.useDebounce)(r,250),{searchResults:u,searchHasResolved:d}=(0,lt.useSelect)((o=>{if(!n)return{searchResults:ck,searchHasResolved:!0};const{getEntityRecords:r,hasFinishedResolution:a}=o(_t.store),i=["taxonomy",e.slug,{...uk,search:n,orderby:"name",exclude:t,per_page:20}];return{searchResults:r(...i),searchHasResolved:a("getEntityRecords",i)}}),[n,e.slug,t]),p=(0,lt.useSelect)((o=>{if(!t?.length)return ck;const{getEntityRecords:n}=o(_t.store);return n("taxonomy",e.slug,{...uk,include:t,per_page:t.length})}),[e.slug,t]);(0,gt.useEffect)((()=>{if(t?.length||i(ck),!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,gt.useEffect)((()=>{d&&l(u.map((e=>e.name)))}),[u,d]);return(0,it.jsx)("div",{className:"block-library-query-inspector__taxonomy-control",children:(0,it.jsx)(mt.FormTokenField,{label:e.name,value:a,onInputChange:c,suggestions:s,displayTransform:ao.decodeEntities,onChange:e=>{const t=new Set;for(const o of e){const e=dk(u,o);e&&t.add(e)}l(ck),o(Array.from(t))},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})})}const gk=[{value:"aside",label:(0,pt.__)("Aside")},{value:"audio",label:(0,pt.__)("Audio")},{value:"chat",label:(0,pt.__)("Chat")},{value:"gallery",label:(0,pt.__)("Gallery")},{value:"image",label:(0,pt.__)("Image")},{value:"link",label:(0,pt.__)("Link")},{value:"quote",label:(0,pt.__)("Quote")},{value:"standard",label:(0,pt.__)("Standard")},{value:"status",label:(0,pt.__)("Status")},{value:"video",label:(0,pt.__)("Video")}].sort(((e,t)=>{const o=e.label.toUpperCase(),n=t.label.toUpperCase();return on?1:0}));function hk(e,t){return e.map((e=>t.find((t=>t.label.toLocaleLowerCase()===e.toLocaleLowerCase()))?.value)).filter(Boolean)}function _k({onChange:e,query:{format:t}}){const o=Array.isArray(t)?t:[t],{supportedFormats:n}=(0,lt.useSelect)((e=>({supportedFormats:e(_t.store).getThemeSupports().formats})),[]),r=gk.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,it.jsx)(mt.FormTokenField,{label:(0,pt.__)("Formats"),value:a,suggestions:i,onChange:t=>{e({format:hk(t,r)})},__experimentalShowHowTo:!1,__experimentalExpandOnFocus:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}const xk=[{label:(0,pt.__)("Include"),value:""},{label:(0,pt.__)("Ignore"),value:"ignore"},{label:(0,pt.__)("Exclude"),value:"exclude"},{label:(0,pt.__)("Only"),value:"only"}];function bk({value:e,onChange:t}){return(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Sticky posts"),options:xk,value:e,onChange:t,help:(0,pt.__)("Sticky posts always appear first, regardless of their publish date.")})}var fk=({perPage:e,offset:t=0,onChange:o})=>(0,it.jsx)(mt.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Items per page"),min:1,max:100,onChange:e=>{isNaN(e)||e<1||e>100||o({perPage:e,offset:t})},value:parseInt(e,10)});var yk=({offset:e=0,onChange:t})=>(0,it.jsx)(mt.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Offset"),value:e,min:0,onChange:e=>{isNaN(e)||e<0||e>100||t({offset:e})}});var vk=({pages:e,onChange:t})=>(0,it.jsx)(mt.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Max pages to show"),value:e,min:0,onChange:e=>{isNaN(e)||e<0||t({pages:e})},help:(0,pt.__)("Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero).")});function kk(e){const{attributes:t,setQuery:o,isSingular:n}=e,{query:r}=t,{order:a,orderBy:i,author:s,pages:l,postType:c,perPage:u,offset:d,sticky:p,inherit:m,taxQuery:g,parents:h,format:_}=r,x=function(e){return(0,lt.useSelect)((t=>t(st.store).getActiveBlockVariation("core/query",e)?.allowedControls),[e])}(t),b="post"===c,{postTypesTaxonomiesMap:f,postTypesSelectOptions:y,postTypeFormatSupportMap:v}=(()=>{const e=(0,lt.useSelect)((e=>{const{getPostTypes:t}=e(_t.store),o=["attachment"],n=t({per_page:-1})?.filter((({viewable:e,slug:t})=>e&&!o.includes(t)));return n}),[]);return{postTypesTaxonomiesMap:(0,gt.useMemo)((()=>{if(e?.length)return e.reduce(((e,t)=>(e[t.slug]=t.taxonomies,e)),{})}),[e]),postTypesSelectOptions:(0,gt.useMemo)((()=>(e||[]).map((({labels:e,slug:t})=>({label:e.singular_name,value:t})))),[e]),postTypeFormatSupportMap:(0,gt.useMemo)((()=>e?.length?e.reduce(((e,t)=>(e[t.slug]=t.supports?.["post-formats"]||!1,e)),{}):{}),[e])}})(),k=Yv(c),w=function(e){return(0,lt.useSelect)((t=>{const o=t(_t.store).getPostType(e);return o?.viewable&&o?.hierarchical}),[e])}(c),C=e=>{const t={postType:e},n=f[e],r=Object.entries(g||{}).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=[];v[e]||(t.format=[]),o(t)},[j,S]=(0,gt.useState)(r.search),B=(0,gt.useMemo)((()=>(0,xt.debounce)((e=>{o({search:e})}),250)),[o]),T=function(e){const t=(0,lt.useSelect)((t=>{const o=t(_t.store).getPostType(e);return!!o?.supports?.["page-attributes"]}),[e]);return(0,gt.useMemo)((()=>{const e=[{label:(0,pt.__)("Newest to oldest"),value:"date/desc"},{label:(0,pt.__)("Oldest to newest"),value:"date/asc"},{label:(0,pt.__)("A → Z"),value:"title/asc"},{label:(0,pt.__)("Z → A"),value:"title/desc"}];return t&&e.push({label:(0,pt.__)("Ascending by order"),value:"menu_order/asc"},{label:(0,pt.__)("Descending by order"),value:"menu_order/desc"}),e}),[t])}(c),N=Xv(x,"inherit"),P=!m&&Xv(x,"postType"),I=(0,pt.__)("Post type"),D=(0,pt.__)("Select the type of content to display: posts, pages, or custom post types."),M=!m&&Xv(x,"order"),z=!m&&b&&Xv(x,"sticky"),A=N||P||M||z,L=!!k?.length&&Xv(x,"taxQuery"),H=Xv(x,"author"),R=Xv(x,"search"),V=Xv(x,"parents")&&w,F=v[c],E=(0,lt.useSelect)((e=>{if(!F||!Xv(x,"format"))return!1;const t=e(_t.store).getThemeSupports();return t.formats&&t.formats.length>0&&t.formats.some((e=>"standard"!==e))}),[x,F]),O=L||H||R||V||E,G=vt(),$=Xv(x,"postCount"),U=Xv(x,"offset"),q=Xv(x,"pages"),W=$||U||q,Z=n&&m;return(0,it.jsxs)(it.Fragment,{children:[A&&(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({postType:"post",order:"desc",orderBy:"date",sticky:"",inherit:!0})},dropdownMenuProps:G,children:[N&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!m,label:(0,pt.__)("Query type"),onDeselect:()=>o({inherit:!0}),isShownByDefault:!0,children:(0,it.jsxs)(mt.__experimentalVStack,{spacing:4,children:[(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Query type"),isBlock:!0,onChange:e=>{o({inherit:"default"===e})},help:m?(0,pt.__)("Display a list of posts or custom post types based on the current template."):(0,pt.__)("Display a list of posts or custom post types based on specific criteria."),value:m?"default":"custom",children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"default",label:(0,pt.__)("Default")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"custom",label:(0,pt.__)("Custom")})]}),Z&&(0,it.jsx)(mt.Notice,{status:"warning",isDismissible:!1,children:(0,pt.__)("Cannot inherit the current template query when placed inside the singular content (e.g., post, page, 404, blank).")})]})}),P&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"post"!==c,label:I,onDeselect:()=>C("post"),isShownByDefault:!0,children:y.length>2?(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,options:y,value:c,label:I,onChange:C,help:D}):(0,it.jsx)(mt.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,value:c,label:I,onChange:C,help:D,children:y.map((e=>(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:e.value,label:e.label},e.value)))})}),M&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"desc"!==a||"date"!==i,label:(0,pt.__)("Order by"),onDeselect:()=>o({order:"desc",orderBy:"date"}),isShownByDefault:!0,children:(0,it.jsx)(nk,{order:a,orderBy:i,orderByOptions:T,onChange:o})}),z&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!p,label:(0,pt.__)("Sticky posts"),onDeselect:()=>o({sticky:""}),isShownByDefault:!0,children:(0,it.jsx)(bk,{value:p,onChange:e=>o({sticky:e})})})]}),!m&&W&&(0,it.jsxs)(mt.__experimentalToolsPanel,{className:"block-library-query-toolspanel__display",label:(0,pt.__)("Display"),resetAll:()=>{o({offset:0,pages:0})},dropdownMenuProps:G,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Items per page"),hasValue:()=>u>0,children:(0,it.jsx)(fk,{perPage:u,offset:d,onChange:o})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Offset"),hasValue:()=>d>0,onDeselect:()=>o({offset:0}),children:(0,it.jsx)(yk,{offset:d,onChange:o})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Max pages to show"),hasValue:()=>l>0,onDeselect:()=>o({pages:0}),children:(0,it.jsx)(vk,{pages:l,onChange:o})})]}),!m&&O&&(0,it.jsxs)(mt.__experimentalToolsPanel,{className:"block-library-query-toolspanel__filters",label:(0,pt.__)("Filters"),resetAll:()=>{o({author:"",parents:[],search:"",taxQuery:null,format:[]}),S("")},dropdownMenuProps:G,children:[L&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Taxonomies"),hasValue:()=>Object.values(g||{}).some((e=>!!e.length)),onDeselect:()=>o({taxQuery:null}),children:(0,it.jsx)(pk,{onChange:o,query:r})}),H&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,pt.__)("Authors"),onDeselect:()=>o({author:""}),children:(0,it.jsx)(ak,{value:s,onChange:o})}),R&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!j,label:(0,pt.__)("Keyword"),onDeselect:()=>{o({search:""}),S("")},children:(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Keyword"),value:j,onChange:e=>{B(e),S(e)}})}),V&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!h?.length,label:(0,pt.__)("Parents"),onDeselect:()=>o({parents:[]}),children:(0,it.jsx)(lk,{parents:h,postType:c,onChange:o})}),E&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!_?.length,label:(0,pt.__)("Formats"),onDeselect:()=>o({format:[]}),children:(0,it.jsx)(_k,{onChange:o,query:r})})]})]})}const wk="wp-block-query-enhanced-pagination-modal__description";function Ck({clientId:e,attributes:{enhancedPagination:t},setAttributes:o}){const[n,r]=(0,gt.useState)(!1),a=ek(e);(0,gt.useEffect)((()=>{t&&a&&(o({enhancedPagination:!1}),r(!0))}),[t,a,o]);const i=()=>{r(!1)},s=(0,pt.__)("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.")+" "+(0,pt.__)('If you still want to prevent full page reloads, remove that block, then disable "Reload full page" again in the Query Block settings.');return n&&(0,it.jsx)(mt.Modal,{title:(0,pt.__)("Query block: Reload full page enabled"),className:"wp-block-query__enhanced-pagination-modal",aria:{describedby:wk},role:"alertdialog",focusOnMount:"firstElement",isDismissible:!1,onRequestClose:i,children:(0,it.jsxs)(mt.__experimentalVStack,{alignment:"right",spacing:5,children:[(0,it.jsx)("span",{id:wk,children:s}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:i,children:(0,pt.__)("OK")})]})})}function jk(e=""){return e=(e=su()(e)).trim().toLowerCase()}function Sk(e,t){const o=jk(t),n=jk(e.title);let r=0;if(o===n)r+=30;else if(n.startsWith(o))r+=20;else{o.split(" ").every((e=>n.includes(e)))&&(r+=10)}return r}function Bk(e=[],t=""){if(!t)return e;const o=e.map((e=>[e,Sk(e,t)])).filter((([,e])=>e>0));return o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))}function Tk({clientId:e,attributes:t,setIsPatternSelectionModalOpen:o}){return(0,it.jsx)(mt.Modal,{overlayClassName:"block-library-query-pattern__selection-modal",title:(0,pt.__)("Choose a pattern"),onRequestClose:()=>o(!1),isFullScreen:!0,children:(0,it.jsx)(Pk,{clientId:e,attributes:t})})}function Nk(e,t){const o=function(e,t){return(0,lt.useSelect)((o=>{const n=o(st.store).getActiveBlockVariation("core/query",t)?.name;if(!n)return"core/query";const{getBlockRootClientId:r,getPatternsByBlockTypes:a}=o(ct.store);return a(`core/query/${n}`,r(e)).length>0?`core/query/${n}`:"core/query"}),[e,t])}(e,t),n=((e,t)=>(0,lt.useSelect)((o=>{const{getBlockRootClientId:n,getPatternsByBlockTypes:r}=o(ct.store),a=n(e);return r(t,a)}),[t,e]))(e,o);return(0,gt.useMemo)((()=>n.filter((e=>e.blocks?.[0]?.name===o))),[n,o])}function Pk({clientId:e,attributes:t,showTitlesAsTooltip:o=!1,showSearch:n=!0}){const[r,a]=(0,gt.useState)(""),{replaceBlock:i,selectBlock:s}=(0,lt.useDispatch)(ct.store),l=Nk(e,t),c=(0,gt.useMemo)((()=>({previewPostType:t.query.postType})),[t.query.postType]),u=(0,gt.useMemo)((()=>Bk(l,r)),[l,r]);return(0,it.jsxs)("div",{className:"block-library-query-pattern__selection-content",children:[n&&(0,it.jsx)("div",{className:"block-library-query-pattern__selection-search",children:(0,it.jsx)(mt.SearchControl,{__nextHasNoMarginBottom:!0,onChange:a,value:r,label:(0,pt.__)("Search"),placeholder:(0,pt.__)("Search")})}),(0,it.jsx)(ct.BlockContextProvider,{value:c,children:(0,it.jsx)(ct.__experimentalBlockPatternsList,{blockPatterns:u,onClickPattern:(o,n)=>{const{newBlocks:r,queryClientIds:a}=((e,t)=>{const{query:{postType:o,inherit:n},namespace:r}=t,a=e.map((e=>(0,st.cloneBlock)(e))),i=[],s=[...a];for(;s.length>0;){const e=s.shift();"core/query"===e.name&&(e.attributes.query={...e.attributes.query,postType:o,inherit:n},r&&(e.attributes.namespace=r),i.push(e.clientId)),e.innerBlocks?.forEach((e=>{s.push(e)}))}return{newBlocks:a,queryClientIds:i}})(n,t);i(e,r),a[0]&&s(a[0])},showTitlesAsTooltip:o})})]})}function Ik({clientId:e,attributes:t,hasInnerBlocks:o}){if(!Nk(e,t).length)return null;const n=o?(0,pt.__)("Change design"):(0,pt.__)("Choose pattern");return(0,it.jsx)(mt.ToolbarGroup,{className:"wp-block-template-part__block-control-group",children:(0,it.jsx)(mt.__experimentalDropdownContentWrapper,{children:(0,it.jsx)(mt.Dropdown,{contentClassName:"block-editor-block-settings-menu__popover",focusOnMount:"firstElement",expandOnMobile:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,it.jsx)(mt.ToolbarButton,{"aria-haspopup":"true","aria-expanded":e,onClick:t,children:n}),renderContent:()=>(0,it.jsx)(Pk,{clientId:e,attributes:t,showSearch:!1,showTitlesAsTooltip:!0})})})})}const{HTMLElementControl:Dk}=jo(ct.privateApis),Mk=[["core/post-template"]];function zk({attributes:e,setAttributes:t,clientId:o,context:n,name:r}){const{queryId:a,query:i,enhancedPagination:s,tagName:l="div",query:{inherit:c}={}}=e,{templateSlug:u}=n,{isSingular:d}=function(e){if(!e)return{isSingular:!0};let t=!1,o="wp"===e?"custom":e;const n=e.includes("-")?e.split("-",1)[0]:e;return(e.includes("-")?e.split("-").slice(1).join("-"):"")&&(o=n),t=["404","blank","single","page","custom"].includes(o),{isSingular:t,templateType:o}}(u),{__unstableMarkNextChangeAsNotPersistent:p}=(0,lt.useDispatch)(ct.store),m=(0,xt.useInstanceId)(zk),g=(0,ct.useBlockProps)(),h=(0,ct.useInnerBlocksProps)(g,{template:Mk}),{postsPerPage:_}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store),{getEntityRecord:o,getEntityRecordEdits:n,canUser:r}=e(_t.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}}),[]),x=(0,gt.useCallback)((e=>t((t=>({query:{...t.query,...e}})))),[t]);return(0,gt.useEffect)((()=>{const e={};(c&&i.perPage!==_||!i.perPage&&_)&&(e.perPage=_),Object.keys(e).length&&(p(),x(e))}),[i.perPage,c,_,p,x]),(0,gt.useEffect)((()=>{Number.isFinite(a)||(p(),t({queryId:m}))}),[a,m,p,t]),(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(Ik,{clientId:o,attributes:e,hasInnerBlocks:!0})}),(0,it.jsx)(Ck,{attributes:e,setAttributes:t,clientId:o}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(kk,{name:r,attributes:e,setQuery:x,setAttributes:t,clientId:o,isSingular:d})}),(0,it.jsxs)(ct.InspectorControls,{group:"advanced",children:[(0,it.jsx)(Dk,{tagName:l,onChange:e=>t({tagName:e}),clientId:o,options:[{label:(0,pt.__)("Default (

)"),value:"div"},{label:"
",value:"main"},{label:"
",value:"section"},{label:"