PHP 8.1.33
Preview: block-library.min.js Size: 856.16 KB
/home/jambtst2015/public_html/cccng.org/wp-includes/js/dist/block-library.min.js

/*! This file is auto-generated */
(()=>{var e={2321:e=>{e.exports=function(e){return e&&"__experimental"in e&&!1!==e.__experimental}},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,a,r;if(Array.isArray(t)){if((n=t.length)!=o.length)return!1;for(a=n;0!=a--;)if(!e(t[a],o[a]))return!1;return!0}if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(a of t.entries())if(!o.has(a[0]))return!1;for(a of t.entries())if(!e(a[1],o.get(a[0])))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(a of t.entries())if(!o.has(a[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(o)){if((n=t.length)!=o.length)return!1;for(a=n;0!=a--;)if(t[a]!==o[a])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=(r=Object.keys(t)).length)!==Object.keys(o).length)return!1;for(a=n;0!=a--;)if(!Object.prototype.hasOwnProperty.call(o,r[a]))return!1;for(a=n;0!=a--;){var i=r[a];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"),a=new RegExp(o,"");function r(e){return t[e]}var i=function(e){return e.replace(n,r)};e.exports=i,e.exports.has=function(e){return!!e.match(a)},e.exports.remove=i}},t={};function o(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,o),r.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";o.r(n),o.d(n,{__experimentalGetCoreBlocks:()=>zB,__experimentalRegisterExperimentalCoreBlocks:()=>RB,privateApis:()=>DB,registerCoreBlocks:()=>AB});var e={};o.r(e),o.d(e,{init:()=>_t,metadata:()=>gt,name:()=>ht,settings:()=>xt});var t={};o.r(t),o.d(t,{init:()=>Dt,metadata:()=>Pt,name:()=>It,settings:()=>Mt});var a={};o.r(a),o.d(a,{init:()=>ro,metadata:()=>oo,name:()=>no,settings:()=>ao});var r={};o.r(r),o.d(r,{init:()=>Mo,metadata:()=>No,name:()=>Po,settings:()=>Io});var i={};o.r(i),o.d(i,{init:()=>qo,metadata:()=>$o,name:()=>Go,settings:()=>Uo});var s={};o.r(s),o.d(s,{init:()=>Xo,metadata:()=>Ko,name:()=>Yo,settings:()=>Jo});var l={};o.r(l),o.d(l,{init:()=>cn,metadata:()=>rn,name:()=>sn,settings:()=>ln});var c={};o.r(c),o.d(c,{init:()=>vn,metadata:()=>bn,name:()=>yn,settings:()=>fn});var u={};o.r(u),o.d(u,{init:()=>Pn,metadata:()=>Bn,name:()=>Tn,settings:()=>Nn});var d={};o.r(d),o.d(d,{init:()=>Vn,metadata:()=>Rn,name:()=>Hn,settings:()=>Ln});var p={};o.r(p),o.d(p,{init:()=>aa,metadata:()=>ta,name:()=>oa,settings:()=>na});var m={};o.r(m),o.d(m,{init:()=>_a,metadata:()=>ga,name:()=>ha,settings:()=>xa});var g={};o.r(g),o.d(g,{init:()=>va,metadata:()=>ba,name:()=>ya,settings:()=>fa});var h={};o.r(h),o.d(h,{init:()=>Ta,metadata:()=>ja,name:()=>Sa,settings:()=>Ba});var x={};o.r(x),o.d(x,{init:()=>Da,metadata:()=>Pa,name:()=>Ia,settings:()=>Ma});var _={};o.r(_),o.d(_,{init:()=>Ea,metadata:()=>La,name:()=>Va,settings:()=>Fa});var b={};o.r(b),o.d(b,{init:()=>qa,metadata:()=>$a,name:()=>Ga,settings:()=>Ua});var y={};o.r(y),o.d(y,{init:()=>Ja,metadata:()=>Qa,name:()=>Ka,settings:()=>Ya});var f={};o.r(f),o.d(f,{init:()=>ur,metadata:()=>sr,name:()=>lr,settings:()=>cr});var v={};o.r(v),o.d(v,{init:()=>xr,metadata:()=>mr,name:()=>gr,settings:()=>hr});var k={};o.r(k),o.d(k,{init:()=>wr,metadata:()=>fr,name:()=>vr,settings:()=>kr});var w={};o.r(w),o.d(w,{init:()=>Nr,metadata:()=>Sr,name:()=>Br,settings:()=>Tr});var C={};o.r(C),o.d(C,{init:()=>Ar,metadata:()=>Mr,name:()=>Dr,settings:()=>zr});var j={};o.r(j),o.d(j,{init:()=>$r,metadata:()=>Fr,name:()=>Er,settings:()=>Or});var S={};o.r(S),o.d(S,{init:()=>Os,metadata:()=>Vs,name:()=>Fs,settings:()=>Es});var B={};o.r(B),o.d(B,{init:()=>Ys,metadata:()=>Zs,name:()=>Qs,settings:()=>Ks});var T={};o.r(T),o.d(T,{init:()=>El,metadata:()=>Ll,name:()=>Vl,settings:()=>Fl});var N={};o.r(N),o.d(N,{init:()=>ac,metadata:()=>tc,name:()=>oc,settings:()=>nc});var P={};o.r(P),o.d(P,{init:()=>gc,metadata:()=>dc,name:()=>pc,settings:()=>mc});var I={};o.r(I),o.d(I,{init:()=>Tc,metadata:()=>jc,name:()=>Sc,settings:()=>Bc});var M={};o.r(M),o.d(M,{init:()=>zc,metadata:()=>Ic,name:()=>Mc,settings:()=>Dc});var D={};o.r(D),o.d(D,{init:()=>$c,metadata:()=>Fc,name:()=>Ec,settings:()=>Oc});var z={};o.r(z),o.d(z,{init:()=>Lu,metadata:()=>Au,name:()=>Ru,settings:()=>Hu});var A={};o.r(A),o.d(A,{init:()=>od,metadata:()=>Xu,name:()=>ed,settings:()=>td});var R={};o.r(R),o.d(R,{init:()=>jd,metadata:()=>kd,name:()=>wd,settings:()=>Cd});var H={};o.r(H),o.d(H,{init:()=>Id,metadata:()=>Td,name:()=>Nd,settings:()=>Pd});var L={};o.r(L),o.d(L,{init:()=>Vd,metadata:()=>Rd,name:()=>Hd,settings:()=>Ld});var V={};o.r(V),o.d(V,{init:()=>_p,metadata:()=>gp,name:()=>hp,settings:()=>xp});var F={};o.r(F),o.d(F,{init:()=>kp,metadata:()=>yp,name:()=>fp,settings:()=>vp});var E={};o.r(E),o.d(E,{init:()=>Rp,metadata:()=>Dp,name:()=>zp,settings:()=>Ap});var O={};o.r(O),o.d(O,{init:()=>um,metadata:()=>sm,name:()=>lm,settings:()=>cm});var $={};o.r($),o.d($,{init:()=>wm,metadata:()=>fm,name:()=>vm,settings:()=>km});var G={};o.r(G),o.d(G,{init:()=>Tm,metadata:()=>jm,name:()=>Sm,settings:()=>Bm});var U={};o.r(U),o.d(U,{init:()=>yg,metadata:()=>xg,name:()=>_g,settings:()=>bg});var q={};o.r(q),o.d(q,{init:()=>wg,metadata:()=>fg,name:()=>vg,settings:()=>kg});var W={};o.r(W),o.d(W,{init:()=>Pg,metadata:()=>Bg,name:()=>Tg,settings:()=>Ng});var Z={};o.r(Z),o.d(Z,{init:()=>px,metadata:()=>cx,name:()=>ux,settings:()=>dx});var Q={};o.r(Q),o.d(Q,{init:()=>Sx,metadata:()=>wx,name:()=>Cx,settings:()=>jx});var K={};o.r(K),o.d(K,{init:()=>Rx,metadata:()=>Dx,name:()=>zx,settings:()=>Ax});var Y={};o.r(Y),o.d(Y,{init:()=>Ox,metadata:()=>Vx,name:()=>Fx,settings:()=>Ex});var J={};o.r(J),o.d(J,{init:()=>Jx,metadata:()=>Qx,name:()=>Kx,settings:()=>Yx});var X={};o.r(X),o.d(X,{init:()=>u_,metadata:()=>s_,name:()=>l_,settings:()=>c_});var ee={};o.r(ee),o.d(ee,{init:()=>h_,metadata:()=>p_,name:()=>m_,settings:()=>g_});var te={};o.r(te),o.d(te,{init:()=>R_,metadata:()=>D_,name:()=>z_,settings:()=>A_});var oe={};o.r(oe),o.d(oe,{init:()=>$_,metadata:()=>F_,name:()=>E_,settings:()=>O_});var ne={};o.r(ne),o.d(ne,{init:()=>Q_,metadata:()=>q_,name:()=>W_,settings:()=>Z_});var ae={};o.r(ae),o.d(ae,{init:()=>eb,metadata:()=>Y_,name:()=>J_,settings:()=>X_});var re={};o.r(re),o.d(re,{init:()=>ib,metadata:()=>nb,name:()=>ab,settings:()=>rb});var ie={};o.r(ie),o.d(ie,{init:()=>db,metadata:()=>lb,name:()=>cb,settings:()=>ub});var se={};o.r(se),o.d(se,{init:()=>xb,metadata:()=>mb,name:()=>gb,settings:()=>hb});var le={};o.r(le),o.d(le,{init:()=>vb,metadata:()=>bb,name:()=>yb,settings:()=>fb});var ce={};o.r(ce),o.d(ce,{init:()=>Ib,metadata:()=>Tb,name:()=>Nb,settings:()=>Pb});var ue={};o.r(ue),o.d(ue,{init:()=>Fb,metadata:()=>Hb,name:()=>Lb,settings:()=>Vb});var de={};o.r(de),o.d(de,{init:()=>qb,metadata:()=>$b,name:()=>Gb,settings:()=>Ub});var pe={};o.r(pe),o.d(pe,{init:()=>iy,metadata:()=>ny,name:()=>ay,settings:()=>ry});var me={};o.r(me),o.d(me,{init:()=>gy,metadata:()=>dy,name:()=>py,settings:()=>my});var ge={};o.r(ge),o.d(ge,{init:()=>vy,metadata:()=>by,name:()=>yy,settings:()=>fy});var he={};o.r(he),o.d(he,{init:()=>Iy,metadata:()=>Ty,name:()=>Ny,settings:()=>Py});var xe={};o.r(xe),o.d(xe,{init:()=>Ly,metadata:()=>Ay,name:()=>Ry,settings:()=>Hy});var _e={};o.r(_e),o.d(_e,{init:()=>Gy,metadata:()=>Ey,name:()=>Oy,settings:()=>$y});var be={};o.r(be),o.d(be,{init:()=>Yy,metadata:()=>Zy,name:()=>Qy,settings:()=>Ky});var ye={};o.r(ye),o.d(ye,{init:()=>bf,metadata:()=>hf,name:()=>xf,settings:()=>_f});var fe={};o.r(fe),o.d(fe,{init:()=>Nv,metadata:()=>Sv,name:()=>Bv,settings:()=>Tv});var ve={};o.r(ve),o.d(ve,{init:()=>zv,metadata:()=>Iv,name:()=>Mv,settings:()=>Dv});var ke={};o.r(ke),o.d(ke,{init:()=>Ov,metadata:()=>Vv,name:()=>Fv,settings:()=>Ev});var we={};o.r(we),o.d(we,{init:()=>Wv,metadata:()=>Gv,name:()=>Uv,settings:()=>qv});var Ce={};o.r(Ce),o.d(Ce,{init:()=>Jv,metadata:()=>Qv,name:()=>Kv,settings:()=>Yv});var je={};o.r(je),o.d(je,{init:()=>nk,metadata:()=>ek,name:()=>tk,settings:()=>ok});var Se={};o.r(Se),o.d(Se,{init:()=>pk,metadata:()=>ck,name:()=>uk,settings:()=>dk});var Be={};o.r(Be),o.d(Be,{init:()=>yk,metadata:()=>xk,name:()=>_k,settings:()=>bk});var Te={};o.r(Te),o.d(Te,{init:()=>Lk,metadata:()=>Ak,name:()=>Rk,settings:()=>Hk});var Ne={};o.r(Ne),o.d(Ne,{init:()=>ew,metadata:()=>Yk,name:()=>Jk,settings:()=>Xk});var Pe={};o.r(Pe),o.d(Pe,{init:()=>aw,metadata:()=>tw,name:()=>ow,settings:()=>nw});var Ie={};o.r(Ie),o.d(Ie,{init:()=>cw,metadata:()=>iw,name:()=>sw,settings:()=>lw});var Me={};o.r(Me),o.d(Me,{init:()=>ww,metadata:()=>fw,name:()=>vw,settings:()=>kw});var De={};o.r(De),o.d(De,{init:()=>Iw,metadata:()=>Tw,name:()=>Nw,settings:()=>Pw});var ze={};o.r(ze),o.d(ze,{init:()=>Lw,metadata:()=>Aw,name:()=>Rw,settings:()=>Hw});var Ae={};o.r(Ae),o.d(Ae,{init:()=>Qw,metadata:()=>qw,name:()=>Ww,settings:()=>Zw});var Re={};o.r(Re),o.d(Re,{init:()=>oC,metadata:()=>Xw,name:()=>eC,settings:()=>tC});var He={};o.r(He),o.d(He,{init:()=>uC,metadata:()=>sC,name:()=>lC,settings:()=>cC});var Le={};o.r(Le),o.d(Le,{init:()=>vC,metadata:()=>bC,name:()=>yC,settings:()=>fC});var Ve={};o.r(Ve),o.d(Ve,{init:()=>PC,metadata:()=>BC,name:()=>TC,settings:()=>NC});var Fe={};o.r(Fe),o.d(Fe,{init:()=>GC,metadata:()=>EC,name:()=>OC,settings:()=>$C});var Ee={};o.r(Ee),o.d(Ee,{init:()=>Pj,metadata:()=>Bj,name:()=>Tj,settings:()=>Nj});var Oe={};o.r(Oe),o.d(Oe,{init:()=>Ej,metadata:()=>Lj,name:()=>Vj,settings:()=>Fj});var $e={};o.r($e),o.d($e,{init:()=>Wj,metadata:()=>Gj,name:()=>Uj,settings:()=>qj});var Ge={};o.r(Ge),o.d(Ge,{init:()=>jS,metadata:()=>kS,name:()=>wS,settings:()=>CS});var Ue={};o.r(Ue),o.d(Ue,{init:()=>PS,metadata:()=>BS,name:()=>TS,settings:()=>NS});var qe={};o.r(qe),o.d(qe,{init:()=>RS,metadata:()=>DS,name:()=>zS,settings:()=>AS});var We={};o.r(We),o.d(We,{init:()=>US,metadata:()=>OS,name:()=>$S,settings:()=>GS});var Ze={};o.r(Ze),o.d(Ze,{init:()=>mB,metadata:()=>uB,name:()=>dB,settings:()=>pB});var Qe={};o.r(Qe),o.d(Qe,{init:()=>TB,metadata:()=>jB,name:()=>SB,settings:()=>BB});const Ke=window.wp.blocks,Ye=window.wp.primitives,Je=window.ReactJSXRuntime,Xe=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.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"})});function et(e){if(!e)return;const{metadata:t,settings:o,name:n}=e;return(0,Ke.registerBlockType)({name:n,...t},o)}const tt=window.wp.components,ot=window.wp.i18n,nt=window.wp.blockEditor,at=window.wp.serverSideRender;var rt=o.n(at);const it=window.wp.data,st=window.wp.element,lt=window.wp.blob,ct=window.wp.coreData,ut=window.wp.compose;function dt(e,t,o){return(0,it.useSelect)((n=>n(ct.store).canUser("update",{kind:e,name:t,id:o})),[e,t,o])}function pt(e={}){const t=(0,st.useRef)(e),o=(0,st.useRef)(!1),{getSettings:n}=(0,it.useSelect)(nt.store);(0,st.useLayoutEffect)((()=>{t.current=e})),(0,st.useEffect)((()=>{if(o.current)return;if(!t.current.url||!(0,lt.isBlobURL)(t.current.url))return;const e=(0,lt.getBlobByURL)(t.current.url);if(!e)return;const{url:a,allowedTypes:r,onChange:i,onError:s}=t.current,{mediaUpload:l}=n();o.current=!0,l({filesList:[e],allowedTypes:r,onFileChange:([e])=>{(0,lt.isBlobURL)(e?.url)||((0,lt.revokeBlobURL)(a),i(e),o.current=!1)},onError:e=>{(0,lt.revokeBlobURL)(a),s(e),o.current=!1}})}),[n])}function mt(){return(0,ut.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}const gt={$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:!1},showLabel:{type:"boolean",default:!0},showPostCounts:{type:"boolean",default:!1},type:{type:"string",default:"monthly"}},supports:{align:!0,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},html:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-archives-editor"},{name:ht}=gt,xt={icon:Xe,example:{},edit:function({attributes:e,setAttributes:t}){const{showLabel:o,showPostCounts:n,displayAsDropdown:a,type:r}=e,i=mt();return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{t({displayAsDropdown:!1,showLabel:!1,showPostCounts:!1,type:"monthly"})},dropdownMenuProps:i,children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Display as dropdown"),isShownByDefault:!0,hasValue:()=>a,onDeselect:()=>t({displayAsDropdown:!1}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Display as dropdown"),checked:a,onChange:()=>t({displayAsDropdown:!a})})}),a&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Show label"),isShownByDefault:!0,hasValue:()=>!o,onDeselect:()=>t({showLabel:!1}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Show label"),checked:o,onChange:()=>t({showLabel:!o})})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Show post counts"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>t({showPostCounts:!1}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Show post counts"),checked:n,onChange:()=>t({showPostCounts:!n})})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Group by"),isShownByDefault:!0,hasValue:()=>"monthly"!==r,onDeselect:()=>t({type:"monthly"}),children:(0,Je.jsx)(tt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Group by"),options:[{label:(0,ot.__)("Year"),value:"yearly"},{label:(0,ot.__)("Month"),value:"monthly"},{label:(0,ot.__)("Week"),value:"weekly"},{label:(0,ot.__)("Day"),value:"daily"}],value:r,onChange:e=>t({type:e})})})]})}),(0,Je.jsx)("div",{...(0,nt.useBlockProps)(),children:(0,Je.jsx)(tt.Disabled,{children:(0,Je.jsx)(rt(),{block:"core/archives",skipBlockSupportAttributes:!0,attributes:e})})})]})}},_t=()=>et({name:ht,metadata:gt,settings:xt}),bt=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{fillRule:"evenodd",d:"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"})});function yt(e){var t,o,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(o=yt(e[t]))&&(n&&(n+=" "),n+=o)}else for(o in e)e[o]&&(n&&(n+=" "),n+=o);return n}const ft=function(){for(var e,t,o=0,n="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=yt(e))&&(n&&(n+=" "),n+=t);return n},vt=window.wp.url;function kt(e){const t=e?e[0]:24,o=e?e[e.length-1]:96;return{minSize:t,maxSize:Math.floor(2.5*o)}}function wt(){const{avatarURL:e}=(0,it.useSelect)((e=>{const{getSettings:t}=e(nt.store),{__experimentalDiscussionSettings:o}=t();return o}));return e}const Ct={who:"authors",per_page:-1,_fields:"id,name",context:"view"};const jt=function({value:e,onChange:t}){const[o,n]=(0,st.useState)(),a=(0,it.useSelect)((e=>{const{getUsers:t}=e(ct.store);return t(Ct)}),[]);if(!a)return null;const r=a.map((e=>({label:e.name,value:e.id})));return(0,Je.jsx)(tt.ComboboxControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("User"),help:(0,ot.__)("Select the avatar user to display, if it is blank it will use the post/page author."),value:e,onChange:t,options:o||r,onFilterValueChange:e=>n(r.filter((t=>t.label.toLowerCase().startsWith(e.toLowerCase()))))})},St=({setAttributes:e,avatar:t,attributes:o,selectUser:n})=>(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.PanelBody,{title:(0,ot.__)("Settings"),children:[(0,Je.jsx)(tt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Image size"),onChange:t=>e({size:t}),min:t.minSize,max:t.maxSize,initialPosition:o?.size,value:o?.size}),(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Link to user profile"),onChange:()=>e({isLink:!o.isLink}),checked:o.isLink}),o.isLink&&(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Open in new tab"),onChange:t=>e({linkTarget:t?"_blank":"_self"}),checked:"_blank"===o.linkTarget}),n&&(0,Je.jsx)(jt,{value:o?.userId,onChange:t=>{e({userId:t})}})]})}),Bt=({setAttributes:e,attributes:t,avatar:o,blockProps:n,isSelected:a})=>{const r=(0,nt.__experimentalUseBorderProps)(t),i=(0,vt.addQueryArgs)((0,vt.removeQueryArgs)(o?.src,["s"]),{s:2*t?.size});return(0,Je.jsx)("div",{...n,children:(0,Je.jsx)(tt.ResizableBox,{size:{width:t.size,height:t.size},showHandle:a,onResizeStop:(o,n,a,r)=>{e({size:parseInt(t.size+(r.height||r.width),10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,ot.isRTL)(),bottom:!0,left:(0,ot.isRTL)()},minWidth:o.minSize,maxWidth:o.maxSize,children:(0,Je.jsx)("img",{src:i,alt:o.alt,className:ft("avatar","avatar-"+t.size,"photo","wp-block-avatar__image",r.className),style:r.style})})})},Tt=({attributes:e,context:t,setAttributes:o,isSelected:n})=>{const{commentId:a}=t,r=(0,nt.useBlockProps)(),i=function({commentId:e}){const[t]=(0,ct.useEntityProp)("root","comment","author_avatar_urls",e),[o]=(0,ct.useEntityProp)("root","comment","author_name",e),n=t?Object.values(t):null,a=t?Object.keys(t):null,{minSize:r,maxSize:i}=kt(a),s=wt();return{src:n?n[n.length-1]:s,minSize:r,maxSize:i,alt:o?(0,ot.sprintf)((0,ot.__)("%s Avatar"),o):(0,ot.__)("Default Avatar")}}({commentId:a});return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(St,{avatar:i,setAttributes:o,attributes:e,selectUser:!1}),e.isLink?(0,Je.jsx)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault(),children:(0,Je.jsx)(Bt,{attributes:e,avatar:i,blockProps:r,isSelected:n,setAttributes:o})}):(0,Je.jsx)(Bt,{attributes:e,avatar:i,blockProps:r,isSelected:n,setAttributes:o})]})},Nt=({attributes:e,context:t,setAttributes:o,isSelected:n})=>{const{postId:a,postType:r}=t,i=function({userId:e,postId:t,postType:o}){const{authorDetails:n}=(0,it.useSelect)((n=>{const{getEditedEntityRecord:a,getUser:r}=n(ct.store);if(e)return{authorDetails:r(e)};const i=a("postType",o,t)?.author;return{authorDetails:i?r(i):null}}),[o,t,e]),a=n?.avatar_urls?Object.values(n.avatar_urls):null,r=n?.avatar_urls?Object.keys(n.avatar_urls):null,{minSize:i,maxSize:s}=kt(r),l=wt();return{src:a?a[a.length-1]:l,minSize:i,maxSize:s,alt:n?(0,ot.sprintf)((0,ot.__)("%s Avatar"),n?.name):(0,ot.__)("Default Avatar")}}({userId:e?.userId,postId:a,postType:r}),s=(0,nt.useBlockProps)();return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(St,{selectUser:!0,attributes:e,avatar:i,setAttributes:o}),e.isLink?(0,Je.jsx)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault(),children:(0,Je.jsx)(Bt,{attributes:e,avatar:i,blockProps:s,isSelected:n,setAttributes:o})}):(0,Je.jsx)(Bt,{attributes:e,avatar:i,blockProps:s,isSelected:n,setAttributes:o})]})};const Pt={$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:!1},linkTarget:{type:"string",default:"_self"}},usesContext:["postType","postId","commentId"],supports:{html:!1,align:!0,alignWide:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__experimentalBorder:{__experimentalSkipSerialization:!0,radius:!0,width:!0,color:!0,style:!0,__experimentalDefaultControls:{radius:!0}},color:{text:!1,background:!1,__experimentalDuotone:"img"},interactivity:{clientNavigation:!0}},selectors:{border:".wp-block-avatar img"},editorStyle:"wp-block-avatar-editor",style:"wp-block-avatar"},{name:It}=Pt,Mt={icon:bt,edit:function(e){return e?.context?.commentId||null===e?.context?.commentId?(0,Je.jsx)(Tt,{...e}):(0,Je.jsx)(Nt,{...e})},example:{}},Dt=()=>et({name:It,metadata:Pt,settings:Mt}),zt=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.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"})}),At=[{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:a,src:r}=e;return(0,Je.jsxs)("figure",{children:[(0,Je.jsx)("audio",{controls:"controls",src:r,autoPlay:t,loop:n,preload:a}),!nt.RichText.isEmpty(o)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",value:o})]})}}],Rt=window.wp.notices;function Ht(e,t){var o,n,a=0;function r(){var r,i,s=o,l=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(i=0;i<l;i++)if(s.args[i]!==arguments[i]){s=s.next;continue e}return s!==o&&(s===n&&(n=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=o,s.prev=null,o.prev=s,o=s),s.val}s=s.next}for(r=new Array(l),i=0;i<l;i++)r[i]=arguments[i];return s={args:r,val:e.apply(null,r)},o?(o.prev=s,s.next=o):n=s,a===t.maxSize?(n=n.prev).next=null:a++,o=s,s.val}return t=t||{},r.clear=function(){o=null,n=null,a=0},r}const Lt=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.78",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],Vt="wp-embed",Ft=window.wp.privateApis,{lock:Et,unlock:Ot}=(0,Ft.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/block-library"),{name:$t}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string",role:"content"},caption:{type:"rich-text",source:"rich-text",selector:"figcaption",role:"content"},type:{type:"string",role:"content"},providerNameSlug:{type:"string",role:"content"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1,role:"content"},previewable:{type:"boolean",default:!0,role:"content"}},supports:{align:!0,spacing:{margin:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},{kebabCase:Gt}=Ot(tt.privateApis),Ut=e=>e&&e.includes('class="wp-embedded-content"'),qt=(e,t={})=>{const{preview:o,attributes:n={}}=e,{url:a,providerNameSlug:r,type:i,...s}=n;if(!a||!(0,Ke.getBlockType)($t))return;const l=(e=>(0,Ke.getBlockVariations)($t)?.find((({patterns:t})=>((e,t=[])=>t.some((t=>e.match(t))))(e,t))))(a),c="wordpress"===r||i===Vt;if(!c&&l&&(l.attributes.providerNameSlug!==r||!r))return(0,Ke.createBlock)($t,{url:a,...s,...l.attributes});const u=(0,Ke.getBlockVariations)($t)?.find((({name:e})=>"wordpress"===e));return u&&o&&Ut(o.html)&&!c?(0,Ke.createBlock)($t,{url:a,...u.attributes,...t}):void 0},Wt=e=>{if(!e)return e;const t=Lt.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 Zt(e,t,o=!0){if(!o)return Wt(t);const n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;const a=n.body.querySelector("iframe");if(a&&a.height&&a.width){const e=(a.width/a.height).toFixed(2);for(let o=0;o<Lt.length;o++){const n=Lt[o];if(e>=n.ratio){return e-n.ratio>.1?Wt(t):ft(Wt(t),n.className,"wp-has-aspect-ratio")}}}return t}const Qt=Ht(((e,t,o,n,a=!0)=>{if(!e)return{};const r={};let{type:i="rich"}=e;const{html:s,provider_name:l}=e,c=Gt((l||t).toLowerCase());return Ut(s)&&(i=Vt),(s||"photo"===i)&&(r.type=i,r.providerNameSlug=c),(u=o)&&Lt.some((({className:e})=>u.includes(e)))||(r.className=Zt(s,o,n&&a)),r;var u})),Kt=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.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 Yt({attributeKey:e="caption",attributes:t,setAttributes:o,isSelected:n,insertBlocksAfter:a,placeholder:r=(0,ot.__)("Add caption"),label:i=(0,ot.__)("Caption text"),showToolbarButton:s=!0,excludeElementClassName:l,className:c,readOnly:u,tagName:d="figcaption",addLabel:p=(0,ot.__)("Add caption"),removeLabel:m=(0,ot.__)("Remove caption"),icon:g=Kt,...h}){const x=t[e],_=(0,ut.usePrevious)(x),{PrivateRichText:b}=Ot(nt.privateApis),y=b.isEmpty(x),f=b.isEmpty(_),[v,k]=(0,st.useState)(!y);(0,st.useEffect)((()=>{!y&&f&&k(!0)}),[y,f]),(0,st.useEffect)((()=>{!n&&y&&k(!1)}),[n,y]);const w=(0,st.useCallback)((e=>{e&&y&&e.focus()}),[y]);return(0,Je.jsxs)(Je.Fragment,{children:[s&&(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(tt.ToolbarButton,{onClick:()=>{k(!v),v&&x&&o({[e]:void 0})},icon:g,isPressed:v,label:v?m:p})}),v&&(!b.isEmpty(x)||n)&&(0,Je.jsx)(b,{identifier:e,tagName:d,className:ft(c,l?"":(0,nt.__experimentalGetElementClassName)("caption")),ref:w,"aria-label":i,placeholder:r,value:x,onChange:t=>o({[e]:t}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>a((0,Ke.createBlock)((0,Ke.getDefaultBlockName)())),readOnly:u,...h})]})}const Jt=["audio"];const Xt=function({attributes:e,className:t,setAttributes:o,onReplace:n,isSelected:a,insertBlocksAfter:r}){const{id:i,autoplay:s,loop:l,preload:c,src:u}=e,[d,p]=(0,st.useState)(e.blob);function m(e){return t=>{o({[e]:t})}}function g(e){if(e!==u){const t=qt({attributes:{url:e}});if(void 0!==t&&n)return void n(t);o({src:e,id:void 0,blob:void 0}),p()}}pt({url:d,allowedTypes:Jt,onChange:_,onError:x});const{createErrorNotice:h}=(0,it.useDispatch)(Rt.store);function x(e){h(e,{type:"snackbar"})}function _(e){if(!e||!e.url)return o({src:void 0,id:void 0,caption:void 0,blob:void 0}),void p();(0,lt.isBlobURL)(e.url)?p(e.url):(o({blob:void 0,src:e.url,id:e.id,caption:e.caption}),p())}const b=ft(t,{"is-transient":!!d}),y=(0,nt.useBlockProps)({className:b});return u||d?(0,Je.jsxs)(Je.Fragment,{children:[a&&(0,Je.jsx)(nt.BlockControls,{group:"other",children:(0,Je.jsx)(nt.MediaReplaceFlow,{mediaId:i,mediaURL:u,allowedTypes:Jt,accept:"audio/*",onSelect:_,onSelectURL:g,onError:x,onReset:()=>_(void 0)})}),(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.PanelBody,{title:(0,ot.__)("Settings"),children:[(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Autoplay"),onChange:m("autoplay"),checked:s,help:function(e){return e?(0,ot.__)("Autoplay may cause usability issues for some users."):null}}),(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Loop"),onChange:m("loop"),checked:l}),(0,Je.jsx)(tt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot._x)("Preload","noun; Audio block parameter"),value:c||"",onChange:e=>o({preload:e||void 0}),options:[{value:"",label:(0,ot.__)("Browser default")},{value:"auto",label:(0,ot.__)("Auto")},{value:"metadata",label:(0,ot.__)("Metadata")},{value:"none",label:(0,ot._x)("None","Preload value")}]})]})}),(0,Je.jsxs)("figure",{...y,children:[(0,Je.jsx)(tt.Disabled,{isDisabled:!a,children:(0,Je.jsx)("audio",{controls:"controls",src:null!=u?u:d})}),!!d&&(0,Je.jsx)(tt.Spinner,{}),(0,Je.jsx)(Yt,{attributes:e,setAttributes:o,isSelected:a,insertBlocksAfter:r,label:(0,ot.__)("Audio caption text"),showToolbarButton:a})]})]}):(0,Je.jsx)("div",{...y,children:(0,Je.jsx)(nt.MediaPlaceholder,{icon:(0,Je.jsx)(nt.BlockIcon,{icon:zt}),onSelect:_,onSelectURL:g,accept:"audio/*",allowedTypes:Jt,value:e,onError:x})})};const eo={from:[{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("audio/"),transform(e){const t=e[0];return(0,Ke.createBlock)("core/audio",{blob:(0,lt.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:({named:{src:e,mp3:t,m4a:o,ogg:n,wav:a,wma:r}})=>e||t||o||n||a||r},loop:{type:"string",shortcode:({named:{loop:e}})=>e},autoplay:{type:"string",shortcode:({named:{autoplay:e}})=>e},preload:{type:"string",shortcode:({named:{preload:e}})=>e}}}]},to=eo,oo={$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:!0,align:!0,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-audio-editor",style:"wp-block-audio"},{name:no}=oo,ao={icon:zt,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"},viewportWidth:350},transforms:to,deprecated:At,edit:Xt,save:function({attributes:e}){const{autoplay:t,caption:o,loop:n,preload:a,src:r}=e;return r&&(0,Je.jsxs)("figure",{...nt.useBlockProps.save(),children:[(0,Je.jsx)("audio",{controls:"controls",src:r,autoPlay:t,loop:n,preload:a}),!nt.RichText.isEmpty(o)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",value:o,className:(0,nt.__experimentalGetElementClassName)("caption")})]})}},ro=()=>et({name:no,metadata:oo,settings:ao}),io=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M8 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"})}),{cleanEmptyObject:so}=Ot(nt.privateApis);function lo(e){if(!e?.style?.typography?.fontFamily)return e;const{fontFamily:t,...o}=e.style.typography;return{...e,style:so({...e.style,typography:o}),fontFamily:t.split("|").pop()}}const co=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 uo=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:a,...r}=e;return{...r,style:t}},po=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 uo(n)},mo={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"}},go={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:a,fontSize:r,linkTarget:i,rel:s,style:l,text:c,title:u,url:d,width:p}=e,m=o||"a",g="button"===m,h=n||"button",x=(0,nt.__experimentalGetBorderClassesAndStyles)(e),_=(0,nt.__experimentalGetColorClassesAndStyles)(e),b=(0,nt.__experimentalGetSpacingClassesAndStyles)(e),y=(0,nt.__experimentalGetShadowClassesAndStyles)(e),f=ft("wp-block-button__link",_.className,x.className,{[`has-text-align-${a}`]:a,"no-border-radius":0===l?.border?.radius},(0,nt.__experimentalGetElementClassName)("button")),v={...x.style,..._.style,...b.style,...y.style},k=ft(t,{[`has-custom-width wp-block-button__width-${p}`]:p,"has-custom-font-size":r||l?.typography?.fontSize});return(0,Je.jsx)("div",{...nt.useBlockProps.save({className:k}),children:(0,Je.jsx)(nt.RichText.Content,{tagName:m,type:g?h:null,className:f,href:g?null:d,title:u,style:v,value:c,target:g?null:i,rel:g?null:s})})}},ho={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:a,style:r,text:i,title:s,url:l,width:c}=e;if(!i)return null;const u=(0,nt.__experimentalGetBorderClassesAndStyles)(e),d=(0,nt.__experimentalGetColorClassesAndStyles)(e),p=(0,nt.__experimentalGetSpacingClassesAndStyles)(e),m=ft("wp-block-button__link",d.className,u.className,{"no-border-radius":0===r?.border?.radius}),g={...u.style,...d.style,...p.style},h=ft(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":o||r?.typography?.fontSize});return(0,Je.jsx)("div",{...nt.useBlockProps.save({className:h}),children:(0,Je.jsx)(nt.RichText.Content,{tagName:"a",className:m,href:l,title:s,style:g,value:i,target:n,rel:a})})}},xo={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:a,style:r,text:i,title:s,url:l,width:c}=e;if(!i)return null;const u=(0,nt.__experimentalGetBorderClassesAndStyles)(e),d=(0,nt.__experimentalGetColorClassesAndStyles)(e),p=(0,nt.__experimentalGetSpacingClassesAndStyles)(e),m=ft("wp-block-button__link",d.className,u.className,{"no-border-radius":0===r?.border?.radius}),g={...u.style,...d.style,...p.style},h=ft(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":o||r?.typography?.fontSize});return(0,Je.jsx)("div",{...nt.useBlockProps.save({className:h}),children:(0,Je.jsx)(nt.RichText.Content,{tagName:"a",className:m,href:l,title:s,style:g,value:i,target:n,rel:a})})},migrate:lo,isEligible:({style:e})=>e?.typography?.fontFamily},_o=[go,ho,xo,{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:{...mo,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:a,style:r,text:i,title:s,url:l,width:c}=e;if(!i)return null;const u=r?.border?.radius,d=(0,nt.__experimentalGetColorClassesAndStyles)(e),p=ft("wp-block-button__link",d.className,{"no-border-radius":0===r?.border?.radius}),m={borderRadius:u||void 0,...d.style},g=ft(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":o||r?.typography?.fontSize});return(0,Je.jsx)("div",{...nt.useBlockProps.save({className:g}),children:(0,Je.jsx)(nt.RichText.Content,{tagName:"a",className:p,href:l,title:s,style:m,value:i,target:n,rel:a})})},migrate:(0,ut.compose)(lo,co)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...mo,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:a,text:r,title:i,url:s,width:l}=e,c=(0,nt.__experimentalGetColorClassesAndStyles)(e),u=ft("wp-block-button__link",c.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...c.style},p=ft(t,{[`has-custom-width wp-block-button__width-${l}`]:l});return(0,Je.jsx)("div",{...nt.useBlockProps.save({className:p}),children:(0,Je.jsx)(nt.RichText.Content,{tagName:"a",className:u,href:s,title:i,style:d,value:r,target:n,rel:a})})},migrate:(0,ut.compose)(lo,co)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...mo,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:a,text:r,title:i,url:s,width:l}=e,c=(0,nt.__experimentalGetColorClassesAndStyles)(e),u=ft("wp-block-button__link",c.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...c.style},p=ft(t,{[`has-custom-width wp-block-button__width-${l}`]:l});return(0,Je.jsx)("div",{...nt.useBlockProps.save({className:p}),children:(0,Je.jsx)(nt.RichText.Content,{tagName:"a",className:u,href:s,title:i,style:d,value:r,target:n,rel:a})})},migrate:(0,ut.compose)(lo,co)},{supports:{align:!0,alignWide:!1,color:{gradients:!0}},attributes:{...mo,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:a,title:r,url:i}=e,s=ft("wp-block-button__link",{"no-border-radius":0===t}),l={borderRadius:t?t+"px":void 0};return(0,Je.jsx)(nt.RichText.Content,{tagName:"a",className:s,href:i,title:r,style:l,value:a,target:o,rel:n})},migrate:co},{supports:{align:!0,alignWide:!1},attributes:{...mo,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,ut.compose)(co,uo,(function(e){if(!e.align)return e;const{align:t,...o}=e;return{...o,className:ft(o.className,`align${e.align}`)}})),save({attributes:e}){const{backgroundColor:t,borderRadius:o,customBackgroundColor:n,customTextColor:a,customGradient:r,linkTarget:i,gradient:s,rel:l,text:c,textColor:u,title:d,url:p}=e,m=(0,nt.getColorClassName)("color",u),g=!r&&(0,nt.getColorClassName)("background-color",t),h=(0,nt.__experimentalGetGradientClass)(s),x=ft("wp-block-button__link",{"has-text-color":u||a,[m]:m,"has-background":t||n||r||s,[g]:g,"no-border-radius":0===o,[h]:h}),_={background:r||void 0,backgroundColor:g||r||s?void 0:n,color:m?void 0:a,borderRadius:o?o+"px":void 0};return(0,Je.jsx)("div",{children:(0,Je.jsx)(nt.RichText.Content,{tagName:"a",className:x,href:p,title:d,style:_,value:c,target:i,rel:l})})}},{attributes:{...mo,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()),co(uo({...e,className:t||void 0,borderRadius:0}))},save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,customTextColor:n,linkTarget:a,rel:r,text:i,textColor:s,title:l,url:c}=e,u=(0,nt.getColorClassName)("color",s),d=(0,nt.getColorClassName)("background-color",t),p=ft("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,Je.jsx)("div",{children:(0,Je.jsx)(nt.RichText.Content,{tagName:"a",className:p,href:c,title:l,style:m,value:i,target:a,rel:r})})}},{attributes:{...mo,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},migrate:po,save({attributes:e}){const{url:t,text:o,title:n,backgroundColor:a,textColor:r,customBackgroundColor:i,customTextColor:s}=e,l=(0,nt.getColorClassName)("color",r),c=(0,nt.getColorClassName)("background-color",a),u=ft("wp-block-button__link",{"has-text-color":r||s,[l]:l,"has-background":a||i,[c]:c}),d={backgroundColor:c?void 0:i,color:l?void 0:s};return(0,Je.jsx)("div",{children:(0,Je.jsx)(nt.RichText.Content,{tagName:"a",className:u,href:t,title:n,style:d,value:o})})}},{attributes:{...mo,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){const{url:t,text:o,title:n,align:a,color:r,textColor:i}=e,s={backgroundColor:r,color:i};return(0,Je.jsx)("div",{className:`align${a}`,children:(0,Je.jsx)(nt.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:t,title:n,style:s,value:o})})},migrate:po},{attributes:{...mo,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){const{url:t,text:o,title:n,align:a,color:r,textColor:i}=e;return(0,Je.jsx)("div",{className:`align${a}`,style:{backgroundColor:r},children:(0,Je.jsx)(nt.RichText.Content,{tagName:"a",href:t,title:n,style:{color:i},value:o})})},migrate:po}],bo=_o,yo="noreferrer noopener",fo="_blank",vo="nofollow";function ko(e){return e.toString().replace(/<\/?a[^>]*>/g,"")}const wo=window.wp.keycodes,Co=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M10 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"})}),jo=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M17.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"})}),So=[...nt.LinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,ot.__)("Mark as nofollow")}];function Bo({selectedWidth:e,setAttributes:t}){const o=mt();return(0,Je.jsx)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>t({width:void 0}),dropdownMenuProps:o,children:(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Width"),isShownByDefault:!0,hasValue:()=>!!e,onDeselect:()=>t({width:void 0}),__nextHasNoMarginBottom:!0,children:(0,Je.jsx)(tt.__experimentalToggleGroupControl,{label:(0,ot.__)("Width"),value:e,onChange:e=>t({width:e}),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:[25,50,75,100].map((e=>(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:e,label:(0,ot.sprintf)((0,ot.__)("%d%%"),e)},e)))})})})}const To=function(e){const{attributes:t,setAttributes:o,className:n,isSelected:a,onReplace:r,mergeBlocks:i,clientId:s,context:l}=e,{tagName:c,textAlign:u,linkTarget:d,placeholder:p,rel:m,style:g,text:h,url:x,width:_,metadata:b}=t,y=c||"a",[f,v]=(0,st.useState)(null),k=(0,nt.__experimentalUseBorderProps)(t),w=(0,nt.__experimentalUseColorProps)(t),C=(0,nt.__experimentalGetSpacingClassesAndStyles)(t),j=(0,nt.__experimentalGetShadowClassesAndStyles)(t),S=(0,st.useRef)(),B=(0,st.useRef)(),T=(0,nt.useBlockProps)({ref:(0,ut.useMergeRefs)([v,S]),onKeyDown:function(e){wo.isKeyboardEvent.primary(e,"k")?R(e):wo.isKeyboardEvent.primaryShift(e,"k")&&(H(),B.current?.focus())}}),N=(0,nt.useBlockEditingMode)(),[P,I]=(0,st.useState)(!1),M=!!x,D=d===fo,z=!!m?.includes(vo),A="a"===y;function R(e){e.preventDefault(),I(!0)}function H(){o({url:void 0,linkTarget:void 0,rel:void 0}),I(!1)}(0,st.useEffect)((()=>{a||I(!1)}),[a]);const L=(0,st.useMemo)((()=>({url:x,opensInNewTab:D,nofollow:z})),[x,D,z]),V=function(e){const{replaceBlocks:t,selectionChange:o}=(0,it.useDispatch)(nt.store),{getBlock:n,getBlockRootClientId:a,getBlockIndex:r}=(0,it.useSelect)(nt.store),i=(0,st.useRef)(e);return i.current=e,(0,ut.useRefEffect)((e=>{function s(e){if(e.defaultPrevented||e.keyCode!==wo.ENTER)return;const{content:s,clientId:l}=i.current;if(s.length)return;e.preventDefault();const c=n(a(l)),u=r(l),d=(0,Ke.cloneBlock)({...c,innerBlocks:c.innerBlocks.slice(0,u)}),p=(0,Ke.createBlock)((0,Ke.getDefaultBlockName)()),m=c.innerBlocks.slice(u+1),g=m.length?[(0,Ke.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}),F=(0,ut.useMergeRefs)([V,B]),{lockUrlControls:E=!1}=(0,it.useSelect)((e=>{if(!a)return{};const t=(0,Ke.getBlockBindingsSource)(b?.bindings?.url?.source);return{lockUrlControls:!!b?.bindings?.url&&!t?.canUserEditValue?.({select:e,context:l,args:b?.bindings?.url?.args})}}),[l,a,b?.bindings?.url]),[O,$]=(0,nt.useSettings)("typography.fluid","layout"),G=(0,nt.getTypographyClassesAndStyles)(t,{typography:{fluid:O},layout:{wideSize:$?.wideSize}});return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("div",{...T,className:ft(T.className,{[`has-custom-width wp-block-button__width-${_}`]:_}),children:(0,Je.jsx)(nt.RichText,{ref:F,"aria-label":(0,ot.__)("Button text"),placeholder:p||(0,ot.__)("Add text…"),value:h,onChange:e=>o({text:ko(e)}),withoutInteractiveFormatting:!0,className:ft(n,"wp-block-button__link",w.className,k.className,G.className,{[`has-text-align-${u}`]:u,"no-border-radius":0===g?.border?.radius,"has-custom-font-size":T.style.fontSize},(0,nt.__experimentalGetElementClassName)("button")),style:{...k.style,...w.style,...C.style,...j.style,...G.style,writingMode:void 0},onReplace:r,onMerge:i,identifier:"text"})}),(0,Je.jsxs)(nt.BlockControls,{group:"block",children:["default"===N&&(0,Je.jsx)(nt.AlignmentControl,{value:u,onChange:e=>{o({textAlign:e})}}),!M&&A&&!E&&(0,Je.jsx)(tt.ToolbarButton,{name:"link",icon:Co,title:(0,ot.__)("Link"),shortcut:wo.displayShortcut.primary("k"),onClick:R}),M&&A&&!E&&(0,Je.jsx)(tt.ToolbarButton,{name:"link",icon:jo,title:(0,ot.__)("Unlink"),shortcut:wo.displayShortcut.primaryShift("k"),onClick:H,isActive:!0})]}),A&&a&&(P||M)&&!E&&(0,Je.jsx)(tt.Popover,{placement:"bottom",onClose:()=>{I(!1),B.current?.focus()},anchor:f,focusOnMount:!!P&&"firstElement",__unstableSlotName:"__unstable-block-tools-after",shift:!0,children:(0,Je.jsx)(nt.LinkControl,{value:L,onChange:({url:e,opensInNewTab:t,nofollow:n})=>o(function({rel:e="",url:t="",opensInNewTab:o,nofollow:n}){let a,r=e;if(o)a=fo,r=r?.includes(yo)?r:r+` ${yo}`;else{const e=new RegExp(`\\b${yo}\\s*`,"g");r=r?.replace(e,"").trim()}if(n)r=r?.includes(vo)?r:(r+` ${vo}`).trim();else{const e=new RegExp(`\\b${vo}\\s*`,"g");r=r?.replace(e,"").trim()}return{url:(0,vt.prependHTTP)(t),linkTarget:a,rel:r||void 0}}({rel:m,url:e,opensInNewTab:t,nofollow:n})),onRemove:()=>{H(),B.current?.focus()},forceIsEditingLink:P,settings:So})}),(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsx)(Bo,{selectedWidth:_,setAttributes:o})}),(0,Je.jsx)(nt.InspectorControls,{group:"advanced",children:A&&(0,Je.jsx)(tt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Link rel"),value:m||"",onChange:e=>o({rel:e})})})]})};const No={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/button",title:"Button",category:"design",parent:["core/buttons"],description:"Prompt visitors to take action with a button-style link.",keywords:["link"],textdomain:"default",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",role:"content"},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,splitting:!0,align:!1,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{__experimentalSkipSerialization:["fontSize","lineHeight","fontFamily","fontWeight","fontStyle","textTransform","textDecoration","letterSpacing"],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}},interactivity:{clientNavigation:!0}},styles:[{name:"fill",label:"Fill",isDefault:!0},{name:"outline",label:"Outline"}],editorStyle:"wp-block-button-editor",style:"wp-block-button",selectors:{root:".wp-block-button .wp-block-button__link",typography:{writingMode:".wp-block-button"}}},{name:Po}=No,Io={icon:io,example:{attributes:{className:"is-style-fill",text:(0,ot.__)("Call to action")}},edit:To,save:function({attributes:e,className:t}){const{tagName:o,type:n,textAlign:a,fontSize:r,linkTarget:i,rel:s,style:l,text:c,title:u,url:d,width:p}=e,m=o||"a",g="button"===m,h=n||"button",x=(0,nt.__experimentalGetBorderClassesAndStyles)(e),_=(0,nt.__experimentalGetColorClassesAndStyles)(e),b=(0,nt.__experimentalGetSpacingClassesAndStyles)(e),y=(0,nt.__experimentalGetShadowClassesAndStyles)(e),f=(0,nt.getTypographyClassesAndStyles)(e),v=ft("wp-block-button__link",_.className,x.className,f.className,{[`has-text-align-${a}`]:a,"no-border-radius":0===l?.border?.radius,"has-custom-font-size":r||l?.typography?.fontSize},(0,nt.__experimentalGetElementClassName)("button")),k={...x.style,..._.style,...b.style,...y.style,...f.style,writingMode:void 0},w=ft(t,{[`has-custom-width wp-block-button__width-${p}`]:p});return(0,Je.jsx)("div",{...nt.useBlockProps.save({className:w}),children:(0,Je.jsx)(nt.RichText.Content,{tagName:m,type:g?h:null,className:v,href:g?null:d,title:u,style:k,value:c,target:g?null:i,rel:g?null:s})})},deprecated:bo,merge:(e,{text:t=""})=>({...e,text:(e.text||"")+t})},Mo=()=>et({name:Po,metadata:No,settings:Io}),Do=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M14.5 17.5H9.5V16H14.5V17.5Z M14.5 8H9.5V6.5H14.5V8Z M7 3.5H17C18.1046 3.5 19 4.39543 19 5.5V9C19 10.1046 18.1046 11 17 11H7C5.89543 11 5 10.1046 5 9V5.5C5 4.39543 5.89543 3.5 7 3.5ZM17 5H7C6.72386 5 6.5 5.22386 6.5 5.5V9C6.5 9.27614 6.72386 9.5 7 9.5H17C17.2761 9.5 17.5 9.27614 17.5 9V5.5C17.5 5.22386 17.2761 5 17 5Z M7 13H17C18.1046 13 19 13.8954 19 15V18.5C19 19.6046 18.1046 20.5 17 20.5H7C5.89543 20.5 5 19.6046 5 18.5V15C5 13.8954 5.89543 13 7 13ZM17 14.5H7C6.72386 14.5 6.5 14.7239 6.5 15V18.5C6.5 18.7761 6.72386 19 7 19H17C17.2761 19 17.5 18.7761 17.5 18.5V15C17.5 14.7239 17.2761 14.5 17 14.5Z"})}),zo=e=>{if(e.layout)return e;const{contentJustification:t,orientation:o,...n}=e;return(t||o)&&Object.assign(n,{layout:{type:"flex",...t&&{justifyContent:t},...o&&{orientation:o}}}),n},Ao=[{attributes:{contentJustification:{type:"string"},orientation:{type:"string",default:"horizontal"}},supports:{anchor:!0,align:["wide","full"],__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}}},isEligible:({contentJustification:e,orientation:t})=>!!e||!!t,migrate:zo,save:({attributes:{contentJustification:e,orientation:t}})=>(0,Je.jsx)("div",{...nt.useBlockProps.save({className:ft({[`is-content-justification-${e}`]:e,"is-vertical":"vertical"===t})}),children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})},{supports:{align:["center","left","right"],anchor:!0},save:()=>(0,Je.jsx)("div",{children:(0,Je.jsx)(nt.InnerBlocks.Content,{})}),isEligible:({align:e})=>e&&["center","left","right"].includes(e),migrate:e=>zo({...e,align:void 0,contentJustification:e.align})}],Ro=Ao,Ho=window.wp.richText;function Lo(e,t,o){if(!e)return;const{supports:n}=(0,Ke.getBlockType)(t),a=[];if(["core/paragraph","core/heading","core/image","core/button"].includes(t)&&o&&a.push("id","bindings"),!1!==n.renaming&&a.push("name"),!a.length)return;const r=Object.entries(e).reduce(((e,[t,n])=>a.includes(t)?(e[t]="bindings"===t?o(n):n,e):e),{});return Object.keys(r).length?r:void 0}const Vo={from:[{type:"block",isMultiBlock:!0,blocks:["core/button"],transform:e=>(0,Ke.createBlock)("core/buttons",{},e.map((e=>(0,Ke.createBlock)("core/button",e))))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,Ke.createBlock)("core/buttons",{},e.map((e=>{const{content:t,metadata:o}=e,n=(0,Ho.__unstableCreateElement)(document,t),a=n.innerText||"",r=n.querySelector("a"),i=r?.getAttribute("href");return(0,Ke.createBlock)("core/button",{text:a,url:i,metadata:Lo(o,"core/button",(({content:e})=>({text:e})))})}))),isMatch:e=>e.every((e=>{const t=(0,Ho.__unstableCreateElement)(document,e.content),o=t.innerText||"",n=t.querySelectorAll("a");return o.length<=30&&n.length<=1}))}]},Fo=Vo,Eo={name:"core/button",attributesToCopy:["backgroundColor","border","className","fontFamily","fontSize","gradient","style","textColor","width"]};const Oo=function({attributes:e,className:t}){var o;const{fontSize:n,layout:a,style:r}=e,i=(0,nt.useBlockProps)({className:ft(t,{"has-custom-font-size":n||r?.typography?.fontSize})}),{hasButtonVariations:s}=(0,it.useSelect)((e=>({hasButtonVariations:e(Ke.store).getBlockVariations("core/button","inserter").length>0})),[]),l=(0,nt.useInnerBlocksProps)(i,{defaultBlock:Eo,directInsert:!s,template:[["core/button"]],templateInsertUpdatesSelection:!0,orientation:null!==(o=a?.orientation)&&void 0!==o?o:"horizontal"});return(0,Je.jsx)("div",{...l})};const $o={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/buttons",title:"Buttons",category:"design",allowedBlocks:["core/button"],description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",supports:{anchor:!0,align:["wide","full"],html:!1,__experimentalExposeControlsToChildren:!0,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},spacing:{blockGap:["horizontal","vertical"],padding:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"},{name:Go}=$o,Uo={icon:Do,example:{attributes:{layout:{type:"flex",justifyContent:"center"}},innerBlocks:[{name:"core/button",attributes:{text:(0,ot.__)("Find out more")}},{name:"core/button",attributes:{text:(0,ot.__)("Contact us")}}]},deprecated:Ro,transforms:Fo,edit:Oo,save:function({attributes:e,className:t}){const{fontSize:o,style:n}=e,a=nt.useBlockProps.save({className:ft(t,{"has-custom-font-size":o||n?.typography?.fontSize})}),r=nt.useInnerBlocksProps.save(a);return(0,Je.jsx)("div",{...r})}},qo=()=>et({name:Go,metadata:$o,settings:Uo}),Wo=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"})}),Zo=Ht((e=>{if(!e)return{};const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1}}));const Qo={from:[{type:"block",blocks:["core/archives"],transform:()=>(0,Ke.createBlock)("core/calendar")}],to:[{type:"block",blocks:["core/archives"],transform:()=>(0,Ke.createBlock)("core/archives")}]},Ko={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/calendar",title:"Calendar",category:"widgets",description:"A calendar of your site’s posts.",keywords:["posts","archive"],textdomain:"default",attributes:{month:{type:"integer"},year:{type:"integer"}},supports:{align:!0,color:{link:!0,__experimentalSkipSerialization:["text","background"],__experimentalDefaultControls:{background:!0,text:!0},__experimentalSelector:"table, th"},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-calendar"},{name:Yo}=Ko,Jo={icon:Wo,example:{},edit:function({attributes:e}){const t=(0,nt.useBlockProps)(),{date:o,hasPosts:n,hasPostsResolved:a}=(0,it.useSelect)((e=>{const{getEntityRecords:t,hasFinishedResolution:o}=e(ct.store),n={status:"publish",per_page:1},a=t("postType","post",n),r=o("getEntityRecords",["postType","post",n]);let i;const s=e("core/editor");if(s){"post"===s.getEditedPostAttribute("type")&&(i=s.getEditedPostAttribute("date"))}return{date:i,hasPostsResolved:r,hasPosts:r&&1===a?.length}}),[]);return n?(0,Je.jsx)("div",{...t,children:(0,Je.jsx)(tt.Disabled,{children:(0,Je.jsx)(rt(),{block:"core/calendar",attributes:{...e,...Zo(o)}})})}):(0,Je.jsx)("div",{...t,children:(0,Je.jsx)(tt.Placeholder,{icon:Wo,label:(0,ot.__)("Calendar"),children:a?(0,ot.__)("No published posts found."):(0,Je.jsx)(tt.Spinner,{})})})},transforms:Qo},Xo=()=>et({name:Yo,metadata:Ko,settings:Jo}),en=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"})}),tn=window.wp.htmlEntities,on=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z"})});const nn=[{name:"terms",title:(0,ot.__)("Terms List"),icon:en,attributes:{taxonomy:"post_tag"},isActive:e=>"category"!==e.taxonomy},{name:"categories",title:(0,ot.__)("Categories List"),description:(0,ot.__)("Display a list of all categories."),icon:en,attributes:{taxonomy:"category"},isActive:["taxonomy"],isDefault:!0}],an=nn,rn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/categories",title:"Terms List",category:"widgets",description:"Display a list of all terms of a given taxonomy.",keywords:["categories"],textdomain:"default",attributes:{taxonomy:{type:"string",default:"category"},displayAsDropdown:{type:"boolean",default:!1},showHierarchy:{type:"boolean",default:!1},showPostCounts:{type:"boolean",default:!1},showOnlyTopLevel:{type:"boolean",default:!1},showEmpty:{type:"boolean",default:!1},label:{type:"string",role:"content"},showLabel:{type:"boolean",default:!0}},usesContext:["enhancedPagination"],supports:{align:!0,html:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},editorStyle:"wp-block-categories-editor",style:"wp-block-categories"},{name:sn}=rn,ln={icon:en,example:{},edit:function e({attributes:{displayAsDropdown:t,showHierarchy:o,showPostCounts:n,showOnlyTopLevel:a,showEmpty:r,label:i,showLabel:s,taxonomy:l},setAttributes:c,className:u}){const d=(0,ut.useInstanceId)(e,"blocks-category-select"),{records:p,isResolvingTaxonomies:m}=(0,ct.useEntityRecords)("root","taxonomy"),g=p?.filter((e=>e.visibility.public)),h=g?.find((e=>e.slug===l)),x=!m&&h?.hierarchical,_={per_page:-1,hide_empty:!r,context:"view"};x&&a&&(_.parent=0);const{records:b,isResolving:y}=(0,ct.useEntityRecords)("taxonomy",l,_),f=e=>b?.length?null===e?b:b.filter((({parent:t})=>t===e)):[],v=e=>t=>c({[e]:t}),k=e=>e?(0,tn.decodeEntities)(e).trim():(0,ot.__)("(Untitled)"),w=e=>{const t=f(e.id),{id:a,link:r,count:i,name:s}=e;return(0,Je.jsxs)("li",{className:`cat-item cat-item-${a}`,children:[(0,Je.jsx)("a",{href:r,target:"_blank",rel:"noreferrer noopener",children:k(s)}),n&&` (${i})`,x&&o&&!!t.length&&(0,Je.jsx)("ul",{className:"children",children:t.map((e=>w(e)))})]},a)},C=(e,t)=>{const{id:a,count:r,name:i}=e,s=f(a);return[(0,Je.jsxs)("option",{className:`level-${t}`,children:[Array.from({length:3*t}).map((()=>" ")),k(i),n&&` (${r})`]},a),x&&o&&!!s.length&&s.map((e=>C(e,t+1)))]},j=!b?.length||t||y?"div":"ul",S=ft(u,{"wp-block-categories-list":!!b?.length&&!t&&!y,"wp-block-categories-dropdown":!!b?.length&&t&&!y}),B=(0,nt.useBlockProps)({className:S}),T=mt();return(0,Je.jsxs)(j,{...B,children:[(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{c({taxonomy:"category",displayAsDropdown:!1,showHierarchy:!1,showPostCounts:!1,showOnlyTopLevel:!1,showEmpty:!1,showLabel:!0})},dropdownMenuProps:T,children:[Array.isArray(g)&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>"category"!==l,label:(0,ot.__)("Taxonomy"),onDeselect:()=>{c({taxonomy:"category"})},isShownByDefault:!0,children:(0,Je.jsx)(tt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Taxonomy"),options:g.map((e=>({label:e.name,value:e.slug}))),value:l,onChange:e=>c({taxonomy:e})})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:(0,ot.__)("Display as dropdown"),onDeselect:()=>c({displayAsDropdown:!1}),isShownByDefault:!0,children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Display as dropdown"),checked:t,onChange:v("displayAsDropdown")})}),t&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!s,label:(0,ot.__)("Show label"),onDeselect:()=>c({showLabel:!0}),isShownByDefault:!0,children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,className:"wp-block-categories__indentation",label:(0,ot.__)("Show label"),checked:s,onChange:v("showLabel")})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!n,label:(0,ot.__)("Show post counts"),onDeselect:()=>c({showPostCounts:!1}),isShownByDefault:!0,children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Show post counts"),checked:n,onChange:v("showPostCounts")})}),x&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!a,label:(0,ot.__)("Show only top level terms"),onDeselect:()=>c({showOnlyTopLevel:!1}),isShownByDefault:!0,children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Show only top level terms"),checked:a,onChange:v("showOnlyTopLevel")})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!r,label:(0,ot.__)("Show empty terms"),onDeselect:()=>c({showEmpty:!1}),isShownByDefault:!0,children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Show empty terms"),checked:r,onChange:v("showEmpty")})}),x&&!a&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!o,label:(0,ot.__)("Show hierarchy"),onDeselect:()=>c({showHierarchy:!1}),isShownByDefault:!0,children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Show hierarchy"),checked:o,onChange:v("showHierarchy")})})]})}),y&&(0,Je.jsx)(tt.Placeholder,{icon:on,label:(0,ot.__)("Terms"),children:(0,Je.jsx)(tt.Spinner,{})}),!y&&0===b?.length&&(0,Je.jsx)("p",{children:h.labels.no_terms}),!y&&b?.length>0&&(t?(()=>{const e=f(x&&o?0:null);return(0,Je.jsxs)(Je.Fragment,{children:[s?(0,Je.jsx)(nt.RichText,{className:"wp-block-categories__label","aria-label":(0,ot.__)("Label text"),placeholder:h.name,withoutInteractiveFormatting:!0,value:i,onChange:e=>c({label:e})}):(0,Je.jsx)(tt.VisuallyHidden,{as:"label",htmlFor:d,children:i||h.name}),(0,Je.jsxs)("select",{id:d,children:[(0,Je.jsx)("option",{children:(0,ot.sprintf)((0,ot.__)("Select %s"),h.labels.singular_name)}),e.map((e=>C(e,0)))]})]})})():f(x&&o?0:null).map((e=>w(e))))]})},variations:an},cn=()=>et({name:sn,metadata:rn,settings:ln}),un=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10 10H8v2h2v-2zm-5 2h2v-2H5v2zm8-2h-2v2h2v-2zm-5 6h8v-2H8v2zm6-4h2v-2h-2v2zm3 0h2v-2h-2v2zm0 4h2v-2h-2v2zM5 16h2v-2H5v2z"})}),dn=({clientId:e})=>{const{replaceBlocks:t}=(0,it.useDispatch)(nt.store),o=(0,it.useSelect)((t=>t(nt.store).getBlock(e)),[e]);return(0,Je.jsx)(tt.ToolbarButton,{onClick:()=>t(o.clientId,(0,Ke.rawHandler)({HTML:(0,Ke.serialize)(o)})),children:(0,ot.__)("Convert to blocks")})},pn=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"})});function mn({onClick:e,isModalFullScreen:t}){return(0,ut.useViewportMatch)("small","<")?null:(0,Je.jsx)(tt.Button,{size:"compact",onClick:e,icon:pn,isPressed:t,label:t?(0,ot.__)("Exit fullscreen"):(0,ot.__)("Enter fullscreen")})}function gn(e){const t=(0,it.useSelect)((e=>e(nt.store).getSettings().styles));return(0,st.useEffect)((()=>{const{baseURL:o,suffix:n,settings:a}=window.wpEditorL10n.tinymce;return window.tinymce.EditorManager.overrideDefaults({base_url:o,suffix:n}),window.wp.oldEditor.initialize(e.id,{tinymce:{...a,setup(e){e.on("init",(()=>{const o=e.getDoc();t.forEach((({css:e})=>{const t=o.createElement("style");t.innerHTML=e,o.head.appendChild(t)}))}))}}}),()=>{window.wp.oldEditor.remove(e.id)}}),[]),(0,Je.jsx)("textarea",{...e})}function hn(e){const{clientId:t,attributes:{content:o},setAttributes:n,onReplace:a}=e,[r,i]=(0,st.useState)(!1),[s,l]=(0,st.useState)(!1),c=`editor-${t}`,u=()=>o?i(!1):a([]);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsx)(tt.ToolbarGroup,{children:(0,Je.jsx)(tt.ToolbarButton,{onClick:()=>i(!0),children:(0,ot.__)("Edit")})})}),o&&(0,Je.jsx)(st.RawHTML,{children:o}),(r||!o)&&(0,Je.jsxs)(tt.Modal,{title:(0,ot.__)("Classic Editor"),onRequestClose:u,shouldCloseOnClickOutside:!1,overlayClassName:"block-editor-freeform-modal",isFullScreen:s,className:"block-editor-freeform-modal__content",headerActions:(0,Je.jsx)(mn,{onClick:()=>l(!s),isModalFullScreen:s}),children:[(0,Je.jsx)(gn,{id:c,defaultValue:o}),(0,Je.jsxs)(tt.Flex,{className:"block-editor-freeform-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Je.jsx)(tt.FlexItem,{children:(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:u,children:(0,ot.__)("Cancel")})}),(0,Je.jsx)(tt.FlexItem,{children:(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{n({content:window.wp.oldEditor.getContent(c)}),i(!1)},children:(0,ot.__)("Save")})})]})]})]})}const{wp:xn}=window;function _n({clientId:e,attributes:{content:t},setAttributes:o,onReplace:n}){const{getMultiSelectedBlockClientIds:a}=(0,it.useSelect)(nt.store),r=(0,st.useRef)(!1);return(0,st.useEffect)((()=>{if(!r.current)return;const o=window.tinymce.get(`editor-${e}`);if(!o)return;o.getContent()!==t&&o.setContent(t||"")}),[e,t]),(0,st.useEffect)((()=>{const{baseURL:i,suffix:s}=window.wpEditorL10n.tinymce;function l(e){let r;t&&e.on("loadContent",(()=>e.setContent(t))),e.on("blur",(()=>{r=e.selection.getBookmark(2,!0);const t=document.querySelector(".interface-interface-skeleton__content"),n=t.scrollTop;return a()?.length||o({content:e.getContent()}),e.once("focus",(()=>{r&&(e.selection.moveToBookmark(r),t.scrollTop!==n&&(t.scrollTop=n))})),!1})),e.on("mousedown touchstart",(()=>{r=null}));const i=(0,ut.debounce)((()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,o({content:t}))}),250);e.on("Paste Change input Undo Redo",i),e.on("remove",i.cancel),e.on("keydown",(t=>{wo.isKeyboardEvent.primary(t,"z")&&t.stopPropagation(),t.keyCode!==wo.BACKSPACE&&t.keyCode!==wo.DELETE||!function(e){const t=e.getBody();return!(t.childNodes.length>1)&&(0===t.childNodes.length||!(t.childNodes[0].childNodes.length>1)&&/^\n?$/.test(t.innerText||t.textContent))}(e)||(n([]),t.preventDefault(),t.stopImmediatePropagation());const{altKey:o}=t;o&&t.keyCode===wo.F10&&t.stopPropagation()})),e.on("init",(()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function c(){const{settings:t}=window.wpEditorL10n.tinymce;xn.oldEditor.initialize(`editor-${e}`,{tinymce:{...t,inline:!0,content_css:!1,fixed_toolbar_container:`#toolbar-${e}`,setup:l}})}function u(){"complete"===document.readyState&&c()}return r.current=!0,window.tinymce.EditorManager.overrideDefaults({base_url:i,suffix:s}),"complete"===document.readyState?c():document.addEventListener("readystatechange",u),()=>{document.removeEventListener("readystatechange",u),xn.oldEditor.remove(`editor-${e}`),r.current=!1}}),[]),(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("div",{id:`toolbar-${e}`,className:"block-library-classic__toolbar",onClick:function(){const t=window.tinymce.get(`editor-${e}`);t&&t.focus()},"data-placeholder":(0,ot.__)("Classic"),onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}},"toolbar"),(0,Je.jsx)("div",{id:`editor-${e}`,className:"wp-block-freeform block-library-rich-text__tinymce"},"editor")]})}const bn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/freeform",title:"Classic",category:"text",description:"Use the classic WordPress editor.",textdomain:"default",attributes:{content:{type:"string",source:"raw"}},supports:{className:!1,customClassName:!1,reusable:!1},editorStyle:"wp-block-freeform-editor"},{name:yn}=bn,fn={icon:un,edit:function(e){const{clientId:t}=e,o=(0,it.useSelect)((e=>e(nt.store).canRemoveBlock(t)),[t]),[n,a]=(0,st.useState)(!1),r=(0,ut.useRefEffect)((e=>{a(e.ownerDocument!==document)}),[]);return(0,Je.jsxs)(Je.Fragment,{children:[o&&(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsx)(tt.ToolbarGroup,{children:(0,Je.jsx)(dn,{clientId:t})})}),(0,Je.jsx)("div",{...(0,nt.useBlockProps)({ref:r}),children:n?(0,Je.jsx)(hn,{...e}):(0,Je.jsx)(_n,{...e})})]})},save:function({attributes:e}){const{content:t}=e;return(0,Je.jsx)(st.RawHTML,{children:t})}},vn=()=>et({name:yn,metadata:bn,settings:fn}),kn=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"})});function wn(e){return e.replace(/\[/g,"&#91;")}function Cn(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1&#47;&#47;$2")}const jn={from:[{type:"enter",regExp:/^```$/,transform:()=>(0,Ke.createBlock)("core/code")},{type:"block",blocks:["core/paragraph"],transform:({content:e,metadata:t})=>(0,Ke.createBlock)("core/code",{content:e,metadata:Lo(t,"core/code")})},{type:"block",blocks:["core/html"],transform:({content:e,metadata:t})=>(0,Ke.createBlock)("core/code",{content:(0,Ho.toHTMLString)({value:(0,Ho.create)({text:e})}),metadata:Lo(t,"core/code")})},{type:"raw",isMatch:e=>"PRE"===e.nodeName&&1===e.children.length&&"CODE"===e.firstChild.nodeName,schema:{pre:{children:{code:{children:{"#text":{}}}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:({content:e,metadata:t})=>(0,Ke.createBlock)("core/paragraph",{content:e,metadata:Lo(t,"core/paragraph")})}]},Sn=jn,Bn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/code",title:"Code",category:"text",description:"Display code snippets that respect your spacing and tabs.",textdomain:"default",attributes:{content:{type:"rich-text",source:"rich-text",selector:"code",__unstablePreserveWhiteSpace:!0}},supports:{align:["wide"],anchor:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{width:!0,color:!0}},color:{text:!0,background:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-code"},{name:Tn}=Bn,Nn={icon:kn,example:{attributes:{content:(0,ot.__)("// A “block” is the abstract term used\n// to describe units of markup that\n// when composed together, form the\n// content or layout of a page.\nregisterBlockType( name, settings );")}},merge:(e,t)=>({content:e.content+"\n\n"+t.content}),transforms:Sn,edit:function({attributes:e,setAttributes:t,onRemove:o,insertBlocksAfter:n,mergeBlocks:a}){const r=(0,nt.useBlockProps)();return(0,Je.jsx)("pre",{...r,children:(0,Je.jsx)(nt.RichText,{tagName:"code",identifier:"content",value:e.content,onChange:e=>t({content:e}),onRemove:o,onMerge:a,placeholder:(0,ot.__)("Write code…"),"aria-label":(0,ot.__)("Code"),preserveWhiteSpace:!0,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>n((0,Ke.createBlock)((0,Ke.getDefaultBlockName)()))})})},save:function({attributes:e}){return(0,Je.jsx)("pre",{...nt.useBlockProps.save(),children:(0,Je.jsx)(nt.RichText.Content,{tagName:"code",value:(t="string"==typeof e.content?e.content:e.content.toHTMLString({preserveWhiteSpace:!0}),(0,ut.pipe)(wn,Cn)(t||""))})});var t}},Pn=()=>et({name:Tn,metadata:Bn,settings:Nn}),In=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z"})}),Mn=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible:({width:e})=>isFinite(e),migrate:e=>({...e,width:`${e.width}%`}),save({attributes:e}){const{verticalAlignment:t,width:o}=e,n=ft({[`is-vertically-aligned-${t}`]:t}),a={flexBasis:o+"%"};return(0,Je.jsx)("div",{className:n,style:a,children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})}}],Dn=Mn;function zn({width:e,setAttributes:t}){const[o]=(0,nt.useSettings)("spacing.units"),n=(0,tt.__experimentalUseCustomUnits)({availableUnits:o||["%","px","em","rem","vw"]}),a=mt();return(0,Je.jsx)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{t({width:void 0})},dropdownMenuProps:a,children:(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>void 0!==e,label:(0,ot.__)("Width"),onDeselect:()=>t({width:void 0}),isShownByDefault:!0,children:(0,Je.jsx)(tt.__experimentalUnitControl,{label:(0,ot.__)("Width"),__unstableInputWidth:"calc(50% - 8px)",__next40pxDefaultSize:!0,value:e||"",onChange:e=>{e=0>parseFloat(e)?"0":e,t({width:e})},units:n})})})}const An=function({attributes:{verticalAlignment:e,width:t,templateLock:o,allowedBlocks:n},setAttributes:a,clientId:r}){const i=ft("block-core-columns",{[`is-vertically-aligned-${e}`]:e}),{columnsIds:s,hasChildBlocks:l,rootClientId:c}=(0,it.useSelect)((e=>{const{getBlockOrder:t,getBlockRootClientId:o}=e(nt.store),n=o(r);return{hasChildBlocks:t(r).length>0,rootClientId:n,columnsIds:t(n)}}),[r]),{updateBlockAttributes:u}=(0,it.useDispatch)(nt.store),d=Number.isFinite(t)?t+"%":t,p=(0,nt.useBlockProps)({className:i,style:d?{flexBasis:d}:void 0}),m=s.length,g=s.indexOf(r)+1,h=(0,ot.sprintf)((0,ot.__)("%1$s (%2$d of %3$d)"),p["aria-label"],g,m),x=(0,nt.useInnerBlocksProps)({...p,"aria-label":h},{templateLock:o,allowedBlocks:n,renderAppender:l?void 0:nt.InnerBlocks.ButtonBlockAppender});return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsx)(nt.BlockVerticalAlignmentToolbar,{onChange:e=>{a({verticalAlignment:e}),u(c,{verticalAlignment:null})},value:e,controls:["top","center","bottom","stretch"]})}),(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsx)(zn,{width:t,setAttributes:a})}),(0,Je.jsx)("div",{...x})]})};const Rn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/column",title:"Column",category:"design",parent:["core/columns"],description:"A single column within a columns block.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},width:{type:"string"},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{__experimentalOnEnter:!0,anchor:!0,reusable:!1,html:!1,color:{gradients:!0,heading:!0,button:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},shadow:!0,spacing:{blockGap:!0,padding:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:!0,interactivity:{clientNavigation:!0}}},{name:Hn}=Rn,Ln={icon:In,edit:An,save:function({attributes:e}){const{verticalAlignment:t,width:o}=e,n=ft({[`is-vertically-aligned-${t}`]:t});let a;if(o&&/\d/.test(o)){let e=Number.isFinite(o)?o+"%":o;if(!Number.isFinite(o)&&o?.endsWith("%")){const t=1e12;e=Math.round(Number.parseFloat(o)*t)/t+"%"}a={flexBasis:e}}const r=nt.useBlockProps.save({className:n,style:a}),i=nt.useInnerBlocksProps.save(r);return(0,Je.jsx)("div",{...i})},deprecated:Dn},Vn=()=>et({name:Hn,metadata:Rn,settings:Ln}),Fn=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 7.5h-5v10h5v-10Zm1.5 0v10H19a.5.5 0 0 0 .5-.5V8a.5.5 0 0 0-.5-.5h-2.5ZM6 7.5h2.5v10H6a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5ZM6 6h13a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z"})});function En(e){let t,{doc:o}=En;o||(o=document.implementation.createHTMLDocument(""),En.doc=o),o.body.innerHTML=e;for(const e of o.body.firstChild.classList)if(t=e.match(/^layout-column-(\d+)$/))return Number(t[1])-1}const On=[{attributes:{verticalAlignment:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>{if(!e.customTextColor&&!e.customBackgroundColor)return e;const t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor);const{customTextColor:o,customBackgroundColor:n,...a}=e;return{...a,style:t,isStackedOnMobile:!0}},save({attributes:e}){const{verticalAlignment:t,backgroundColor:o,customBackgroundColor:n,textColor:a,customTextColor:r}=e,i=(0,nt.getColorClassName)("background-color",o),s=(0,nt.getColorClassName)("color",a),l=ft({"has-background":o||n,"has-text-color":a||r,[i]:i,[s]:s,[`are-vertically-aligned-${t}`]:t}),c={backgroundColor:i?void 0:n,color:s?void 0:r};return(0,Je.jsx)("div",{className:l||void 0,style:c,children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})}},{attributes:{columns:{type:"number",default:2}},isEligible:(e,t)=>!!t.some((e=>/layout-column-\d+/.test(e.originalContent)))&&t.some((e=>void 0!==En(e.originalContent))),migrate(e,t){const o=t.reduce(((e,t)=>{const{originalContent:o}=t;let n=En(o);return void 0===n&&(n=0),e[n]||(e[n]=[]),e[n].push(t),e}),[]).map((e=>(0,Ke.createBlock)("core/column",{},e))),{columns:n,...a}=e;return[{...a,isStackedOnMobile:!0},o]},save({attributes:e}){const{columns:t}=e;return(0,Je.jsx)("div",{className:`has-${t}-columns`,children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})}},{attributes:{columns:{type:"number",default:2}},migrate(e,t){const{columns:o,...n}=e;return[e={...n,isStackedOnMobile:!0},t]},save({attributes:e}){const{verticalAlignment:t,columns:o}=e,n=ft(`has-${o}-columns`,{[`are-vertically-aligned-${t}`]:t});return(0,Je.jsx)("div",{className:n,children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})}}],$n=e=>{const t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function Gn(e,t){const{width:o=100/t}=e.attributes;return $n(o)}function Un(e,t,o=e.length){const n=function(e,t=e.length){return e.reduce(((e,o)=>e+Gn(o,t)),0)}(e,o);return Object.fromEntries(Object.entries(function(e,t=e.length){return e.reduce(((e,o)=>{const n=Gn(o,t);return Object.assign(e,{[o.clientId]:n})}),{})}(e,o)).map((([e,o])=>[e,$n(t*o/n)])))}function qn(e,t){return e.map((e=>({...e,attributes:{...e.attributes,width:`${t[e.clientId]}%`}})))}const Wn={name:"core/column"};function Zn({clientId:e,setAttributes:t,isStackedOnMobile:o}){const{count:n,canInsertColumnBlock:a,minCount:r}=(0,it.useSelect)((t=>{const{canInsertBlockType:o,canRemoveBlock:n,getBlockOrder:a}=t(nt.store),r=a(e),i=r.reduce(((e,t,o)=>(n(t)||e.push(o),e)),[]);return{count:r.length,canInsertColumnBlock:o("core/column",e),minCount:Math.max(...i)+1}}),[e]),{getBlocks:i}=(0,it.useSelect)(nt.store),{replaceInnerBlocks:s}=(0,it.useDispatch)(nt.store);function l(t,o){let n=i(e);const a=n.every((e=>{const t=e.attributes.width;return Number.isFinite(t?.endsWith?.("%")?parseFloat(t):t)}));const r=o>t;if(r&&a){const e=$n(100/o),a=o-t;n=[...qn(n,Un(n,100-e*a)),...Array.from({length:a}).map((()=>(0,Ke.createBlock)("core/column",{width:`${e}%`})))]}else if(r)n=[...n,...Array.from({length:o-t}).map((()=>(0,Ke.createBlock)("core/column")))];else if(o<t&&(n=n.slice(0,-(t-o)),a)){n=qn(n,Un(n,100))}s(e,n)}const c=mt();return(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{l(n,r),t({isStackedOnMobile:!0})},dropdownMenuProps:c,children:[a&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Columns"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>l(n,r),children:(0,Je.jsxs)(tt.__experimentalVStack,{spacing:4,children:[(0,Je.jsx)(tt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Columns"),value:n,onChange:e=>l(n,Math.max(r,e)),min:Math.max(1,r),max:Math.max(6,n)}),n>6&&(0,Je.jsx)(tt.Notice,{status:"warning",isDismissible:!1,children:(0,ot.__)("This column count exceeds the recommended amount and may cause visual breakage.")})]})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Stack on mobile"),isShownByDefault:!0,hasValue:()=>!0!==o,onDeselect:()=>t({isStackedOnMobile:!0}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Stack on mobile"),checked:o,onChange:()=>t({isStackedOnMobile:!o})})})]})}function Qn({attributes:e,setAttributes:t,clientId:o}){const{isStackedOnMobile:n,verticalAlignment:a,templateLock:r}=e,i=(0,it.useRegistry)(),{getBlockOrder:s}=(0,it.useSelect)(nt.store),{updateBlockAttributes:l}=(0,it.useDispatch)(nt.store),c=ft({[`are-vertically-aligned-${a}`]:a,"is-not-stacked-on-mobile":!n}),u=(0,nt.useBlockProps)({className:c}),d=(0,nt.useInnerBlocksProps)(u,{defaultBlock:Wn,directInsert:!0,orientation:"horizontal",renderAppender:!1,templateLock:r});return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsx)(nt.BlockVerticalAlignmentToolbar,{onChange:function(e){const n=s(o);i.batch((()=>{t({verticalAlignment:e}),l(n,{verticalAlignment:e})}))},value:a})}),(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsx)(Zn,{clientId:o,setAttributes:t,isStackedOnMobile:n})}),(0,Je.jsx)("div",{...d})]})}function Kn({clientId:e,name:t,setAttributes:o}){const{blockType:n,defaultVariation:a,variations:r}=(0,it.useSelect)((e=>{const{getBlockVariations:o,getBlockType:n,getDefaultBlockVariation:a}=e(Ke.store);return{blockType:n(t),defaultVariation:a(t,"block"),variations:o(t,"block")}}),[t]),{replaceInnerBlocks:i}=(0,it.useDispatch)(nt.store),s=(0,nt.useBlockProps)();return(0,Je.jsx)("div",{...s,children:(0,Je.jsx)(nt.__experimentalBlockVariationPicker,{icon:n?.icon?.src,label:n?.title,variations:r,instructions:(0,ot.__)("Divide into columns. Select a layout:"),onSelect:(t=a)=>{t.attributes&&o(t.attributes),t.innerBlocks&&i(e,(0,Ke.createBlocksFromInnerBlocksTemplate)(t.innerBlocks),!0)},allowSkip:!0})})}const Yn=e=>{const{clientId:t}=e,o=(0,it.useSelect)((e=>e(nt.store).getBlocks(t).length>0),[t])?Qn:Kn;return(0,Je.jsx)(o,{...e})};const Jn=[{name:"one-column-full",title:(0,ot.__)("100"),description:(0,ot.__)("One column"),icon:(0,Je.jsx)(tt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Je.jsx)(tt.Path,{d:"M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z"})}),innerBlocks:[["core/column"]],scope:["block"]},{name:"two-columns-equal",title:(0,ot.__)("50 / 50"),description:(0,ot.__)("Two columns; equal split"),icon:(0,Je.jsx)(tt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Je.jsx)(tt.Path,{d:"M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z"})}),isDefault:!0,innerBlocks:[["core/column"],["core/column"]],scope:["block"]},{name:"two-columns-one-third-two-thirds",title:(0,ot.__)("33 / 66"),description:(0,ot.__)("Two columns; one-third, two-thirds split"),icon:(0,Je.jsx)(tt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Je.jsx)(tt.Path,{d:"M0 10a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm17 0a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H19a2 2 0 0 1-2-2V10Z"})}),innerBlocks:[["core/column",{width:"33.33%"}],["core/column",{width:"66.66%"}]],scope:["block"]},{name:"two-columns-two-thirds-one-third",title:(0,ot.__)("66 / 33"),description:(0,ot.__)("Two columns; two-thirds, one-third split"),icon:(0,Je.jsx)(tt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Je.jsx)(tt.Path,{d:"M0 10a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm33 0a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35a2 2 0 0 1-2-2V10Z"})}),innerBlocks:[["core/column",{width:"66.66%"}],["core/column",{width:"33.33%"}]],scope:["block"]},{name:"three-columns-equal",title:(0,ot.__)("33 / 33 / 33"),description:(0,ot.__)("Three columns; equal split"),icon:(0,Je.jsx)(tt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Je.jsx)(tt.Path,{d:"M0 10a2 2 0 0 1 2-2h10.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm16.5 0c0-1.105.864-2 1.969-2H29.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H18.47c-1.105 0-1.969-.895-1.969-2V10Zm17 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35.469c-1.105 0-1.969-.895-1.969-2V10Z"})}),innerBlocks:[["core/column"],["core/column"],["core/column"]],scope:["block"]},{name:"three-columns-wider-center",title:(0,ot.__)("25 / 50 / 25"),description:(0,ot.__)("Three columns; wide center column"),icon:(0,Je.jsx)(tt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Je.jsx)(tt.Path,{d:"M0 10a2 2 0 0 1 2-2h7.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm13.5 0c0-1.105.864-2 1.969-2H32.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H15.47c-1.105 0-1.969-.895-1.969-2V10Zm23 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2h-7.531c-1.105 0-1.969-.895-1.969-2V10Z"})}),innerBlocks:[["core/column",{width:"25%"}],["core/column",{width:"50%"}],["core/column",{width:"25%"}]],scope:["block"]}],Xn={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{const t=+(100/e.length).toFixed(2),o=e.map((({name:e,attributes:o,innerBlocks:n})=>["core/column",{width:`${t}%`},[[e,{...o},n]]]));return(0,Ke.createBlock)("core/columns",{},(0,Ke.createBlocksFromInnerBlocksTemplate)(o))},isMatch:({length:e},t)=>(1!==t.length||"core/columns"!==t[0].name)&&(e&&e<=6)},{type:"block",blocks:["core/media-text"],priority:1,transform:(e,t)=>{const{align:o,backgroundColor:n,textColor:a,style:r,mediaAlt:i,mediaId:s,mediaPosition:l,mediaSizeSlug:c,mediaType:u,mediaUrl:d,mediaWidth:p,verticalAlignment:m}=e;let g;if("image"!==u&&u)g=["core/video",{id:s,src:d}];else{g=["core/image",{...{id:s,alt:i,url:d,sizeSlug:c},...{href:e.href,linkClass:e.linkClass,linkDestination:e.linkDestination,linkTarget:e.linkTarget,rel:e.rel}}]}const h=[["core/column",{width:`${p}%`},[g]],["core/column",{width:100-p+"%"},t]];return"right"===l&&h.reverse(),(0,Ke.createBlock)("core/columns",{align:o,backgroundColor:n,textColor:a,style:r,verticalAlignment:m},(0,Ke.createBlocksFromInnerBlocksTemplate)(h))}}],ungroup:(e,t)=>t.flatMap((e=>e.innerBlocks))},ea=Xn,ta={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/columns",title:"Columns",category:"design",allowedBlocks:["core/column"],description:"Display content in multiple columns, with blocks added to each column.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0,heading:!0,button:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:{__experimentalDefault:"2em",sides:["horizontal","vertical"]},margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,allowEditing:!1,default:{type:"flex",flexWrap:"nowrap"}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},shadow:!0},editorStyle:"wp-block-columns-editor",style:"wp-block-columns"},{name:oa}=ta,na={icon:Fn,variations:Jn,example:{viewportWidth:782,innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,ot.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:(0,ot.__)("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,ot.__)("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:(0,ot.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:On,edit:Yn,save:function({attributes:e}){const{isStackedOnMobile:t,verticalAlignment:o}=e,n=ft({[`are-vertically-aligned-${o}`]:o,"is-not-stacked-on-mobile":!t}),a=nt.useBlockProps.save({className:n}),r=nt.useInnerBlocksProps.save(a);return(0,Je.jsx)("div",{...r})},transforms:ea},aa=()=>et({name:oa,metadata:ta,settings:na}),ra=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M14 10.1V4c0-.6-.4-1-1-1H5c-.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-1zm-1.5-.5H6.7l-1.2 1.2V4.5h7v5.1zM19 12h-8c-.6 0-1 .4-1 1v6.1c0 .6.4 1 1 1h5.7l1.8 1.8c.1.2.4.3.6.3.1 0 .2 0 .3-.1.4-.1.6-.5.6-.8V13c0-.6-.4-1-1-1zm-.5 7.8l-1.2-1.2h-5.8v-5.1h7v6.3z"})}),ia=[{attributes:{tagName:{type:"string",default:"div"}},apiVersion:3,supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}}},save({attributes:{tagName:e}}){const t=nt.useBlockProps.save(),{className:o}=t,n=o?.split(" ")||[],a=n?.filter((e=>"wp-block-comments"!==e)),r={...t,className:a.join(" ")};return(0,Je.jsx)(e,{...r,children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})}}],sa={article:(0,ot.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,ot.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),div:(0,ot.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),footer:(0,ot.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.)."),header:(0,ot.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,ot.__)("The <main> element should be used for the primary content of your document only."),nav:(0,ot.__)("The <nav> element should be used to identify groups of links that are intended to be used for website or page content navigation."),section:(0,ot.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element.")};function la({attributes:{tagName:e},setAttributes:t}){return(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsx)(nt.InspectorControls,{group:"advanced",children:(0,Je.jsx)(tt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("HTML element"),options:[{label:(0,ot.__)("Default (<div>)"),value:"div"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}],value:e,onChange:e=>t({tagName:e}),help:sa[e]})})})}const ca=()=>{const e=(0,ut.useInstanceId)(ca);return(0,Je.jsxs)("div",{className:"comment-respond",children:[(0,Je.jsx)("h3",{className:"comment-reply-title",children:(0,ot.__)("Leave a Reply")}),(0,Je.jsxs)("form",{noValidate:!0,className:"comment-form",onSubmit:e=>e.preventDefault(),children:[(0,Je.jsxs)("p",{children:[(0,Je.jsx)("label",{htmlFor:`comment-${e}`,children:(0,ot.__)("Comment")}),(0,Je.jsx)("textarea",{id:`comment-${e}`,name:"comment",cols:"45",rows:"8",readOnly:!0})]}),(0,Je.jsx)("p",{className:"form-submit wp-block-button",children:(0,Je.jsx)("input",{name:"submit",type:"submit",className:ft("wp-block-button__link",(0,nt.__experimentalGetElementClassName)("button")),label:(0,ot.__)("Post Comment"),value:(0,ot.__)("Post Comment"),"aria-disabled":"true"})})]})]})},ua=({postId:e,postType:t})=>{const[o,n]=(0,ct.useEntityProp)("postType",t,"comment_status",e),a=void 0===t||void 0===e,{defaultCommentStatus:r}=(0,it.useSelect)((e=>e(nt.store).getSettings().__experimentalDiscussionSettings)),i=(0,it.useSelect)((e=>!!t&&!!e(ct.store).getPostType(t)?.supports.comments));if(!a&&"open"!==o){if("closed"===o){const e=[(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,onClick:()=>n("open"),variant:"primary",children:(0,ot._x)("Enable comments","action that affects the current post")},"enableComments")];return(0,Je.jsx)(nt.Warning,{actions:e,children:(0,ot.__)("Post Comments Form block: Comments are not enabled for this item.")})}if(!i)return(0,Je.jsx)(nt.Warning,{children:(0,ot.sprintf)((0,ot.__)("Post Comments Form block: Comments are not enabled for this post type (%s)."),t)});if("open"!==r)return(0,Je.jsx)(nt.Warning,{children:(0,ot.__)("Post Comments Form block: Comments are not enabled.")})}return(0,Je.jsx)(ca,{})};function da({postType:e,postId:t}){let[o]=(0,ct.useEntityProp)("postType",e,"title",t);o=o||(0,ot.__)("Post Title");const{avatarURL:n}=(0,it.useSelect)((e=>e(nt.store).getSettings().__experimentalDiscussionSettings));return(0,Je.jsxs)("div",{className:"wp-block-comments__legacy-placeholder",inert:"true",children:[(0,Je.jsx)("h3",{children:(0,ot.sprintf)((0,ot.__)("One response to %s"),o)}),(0,Je.jsxs)("div",{className:"navigation",children:[(0,Je.jsx)("div",{className:"alignleft",children:(0,Je.jsxs)("a",{href:"#top",children:["« ",(0,ot.__)("Older Comments")]})}),(0,Je.jsx)("div",{className:"alignright",children:(0,Je.jsxs)("a",{href:"#top",children:[(0,ot.__)("Newer Comments")," »"]})})]}),(0,Je.jsx)("ol",{className:"commentlist",children:(0,Je.jsx)("li",{className:"comment even thread-even depth-1",children:(0,Je.jsxs)("article",{className:"comment-body",children:[(0,Je.jsxs)("footer",{className:"comment-meta",children:[(0,Je.jsxs)("div",{className:"comment-author vcard",children:[(0,Je.jsx)("img",{alt:(0,ot.__)("Commenter Avatar"),src:n,className:"avatar avatar-32 photo",height:"32",width:"32",loading:"lazy"}),(0,Je.jsx)("b",{className:"fn",children:(0,Je.jsx)("a",{href:"#top",className:"url",children:(0,ot.__)("A WordPress Commenter")})})," ",(0,Je.jsxs)("span",{className:"says",children:[(0,ot.__)("says"),":"]})]}),(0,Je.jsxs)("div",{className:"comment-metadata",children:[(0,Je.jsx)("a",{href:"#top",children:(0,Je.jsx)("time",{dateTime:"2000-01-01T00:00:00+00:00",children:(0,ot.__)("January 1, 2000 at 00:00 am")})})," ",(0,Je.jsx)("span",{className:"edit-link",children:(0,Je.jsx)("a",{className:"comment-edit-link",href:"#top",children:(0,ot.__)("Edit")})})]})]}),(0,Je.jsx)("div",{className:"comment-content",children:(0,Je.jsxs)("p",{children:[(0,ot.__)("Hi, this is a comment."),(0,Je.jsx)("br",{}),(0,ot.__)("To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard."),(0,Je.jsx)("br",{}),(0,st.createInterpolateElement)((0,ot.__)("Commenter avatars come from <a>Gravatar</a>."),{a:(0,Je.jsx)("a",{href:"https://gravatar.com/"})})]})}),(0,Je.jsx)("div",{className:"reply",children:(0,Je.jsx)("a",{className:"comment-reply-link",href:"#top","aria-label":(0,ot.__)("Reply to A WordPress Commenter"),children:(0,ot.__)("Reply")})})]})})}),(0,Je.jsxs)("div",{className:"navigation",children:[(0,Je.jsx)("div",{className:"alignleft",children:(0,Je.jsxs)("a",{href:"#top",children:["« ",(0,ot.__)("Older Comments")]})}),(0,Je.jsx)("div",{className:"alignright",children:(0,Je.jsxs)("a",{href:"#top",children:[(0,ot.__)("Newer Comments")," »"]})})]}),(0,Je.jsx)(ua,{postId:t,postType:e})]})}function pa({attributes:e,setAttributes:t,context:{postType:o,postId:n}}){const{textAlign:a}=e,r=[(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,onClick:()=>{t({legacy:!1})},variant:"primary",children:(0,ot.__)("Switch to editable mode")},"convert")],i=(0,nt.useBlockProps)({className:ft({[`has-text-align-${a}`]:a})});return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(nt.AlignmentControl,{value:a,onChange:e=>{t({textAlign:e})}})}),(0,Je.jsxs)("div",{...i,children:[(0,Je.jsx)(nt.Warning,{actions:r,children:(0,ot.__)("Comments block: You’re currently using the legacy version of the block. The following is just a placeholder - the final styling will likely look different. For a better representation and more customization options, switch the block to its editable mode.")}),(0,Je.jsx)(da,{postId:n,postType:o})]})]})}const ma=[["core/comments-title"],["core/comment-template",{},[["core/columns",{},[["core/column",{width:"40px"},[["core/avatar",{size:40,style:{border:{radius:"20px"}}}]]],["core/column",{},[["core/comment-author-name",{fontSize:"small"}],["core/group",{layout:{type:"flex"},style:{spacing:{margin:{top:"0px",bottom:"0px"}}}},[["core/comment-date",{fontSize:"small"}],["core/comment-edit-link",{fontSize:"small"}]]],["core/comment-content"],["core/comment-reply-link",{fontSize:"small"}]]]]]]],["core/comments-pagination"],["core/post-comments-form"]];const ga={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments",title:"Comments",category:"theme",description:"An advanced block that allows displaying post comments using different visual configurations.",textdomain:"default",attributes:{tagName:{type:"string",default:"div"},legacy:{type:"boolean",default:!1}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,heading:!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}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},editorStyle:"wp-block-comments-editor",usesContext:["postId","postType"]},{name:ha}=ga,xa={icon:ra,example:{},edit:function(e){const{attributes:t,setAttributes:o}=e,{tagName:n,legacy:a}=t,r=(0,nt.useBlockProps)(),i=(0,nt.useInnerBlocksProps)(r,{template:ma});return a?(0,Je.jsx)(pa,{...e}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(la,{attributes:t,setAttributes:o}),(0,Je.jsx)(n,{...i})]})},save:function({attributes:{tagName:e,legacy:t}}){const o=nt.useBlockProps.save(),n=nt.useInnerBlocksProps.save(o);return t?null:(0,Je.jsx)(e,{...n})},deprecated:ia},_a=()=>et({name:ha,metadata:ga,settings:xa});const ba={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/comment-author-avatar",title:"Comment Author Avatar (deprecated)",category:"theme",ancestor:["core/comment-template"],description:"This block is deprecated. Please use the Avatar block instead.",textdomain:"default",attributes:{width:{type:"number",default:96},height:{type:"number",default:96}},usesContext:["commentId"],supports:{html:!1,inserter:!1,__experimentalBorder:{radius:!0,width:!0,color:!0,style:!0},color:{background:!0,text:!1,__experimentalDefaultControls:{background:!0}},spacing:{__experimentalSkipSerialization:!0,margin:!0,padding:!0},interactivity:{clientNavigation:!0}}},{name:ya}=ba,fa={icon:bt,edit:function({attributes:e,context:{commentId:t},setAttributes:o,isSelected:n}){const{height:a,width:r}=e,[i]=(0,ct.useEntityProp)("root","comment","author_avatar_urls",t),[s]=(0,ct.useEntityProp)("root","comment","author_name",t),l=i?Object.values(i):null,c=i?Object.keys(i):null,u=c?c[0]:24,d=c?c[c.length-1]:96,p=(0,nt.useBlockProps)(),m=(0,nt.__experimentalGetSpacingClassesAndStyles)(e),g=Math.floor(2.5*d),{avatarURL:h}=(0,it.useSelect)((e=>{const{getSettings:t}=e(nt.store),{__experimentalDiscussionSettings:o}=t();return o})),x=(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsx)(tt.PanelBody,{title:(0,ot.__)("Settings"),children:(0,Je.jsx)(tt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Image size"),onChange:e=>o({width:e,height:e}),min:u,max:g,initialPosition:r,value:r})})}),_=(0,Je.jsx)(tt.ResizableBox,{size:{width:r,height:a},showHandle:n,onResizeStop:(e,t,n,i)=>{o({height:parseInt(a+i.height,10),width:parseInt(r+i.width,10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,ot.isRTL)(),bottom:!0,left:(0,ot.isRTL)()},minWidth:u,maxWidth:g,children:(0,Je.jsx)("img",{src:l?l[l.length-1]:h,alt:`${s} ${(0,ot.__)("Avatar")}`,...p})});return(0,Je.jsxs)(Je.Fragment,{children:[x,(0,Je.jsx)("div",{...m,children:_})]})}},va=()=>et({name:ya,metadata:ba,settings:fa}),ka=(0,Je.jsxs)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,Je.jsx)(Ye.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z",fillRule:"evenodd",clipRule:"evenodd"}),(0,Je.jsx)(Ye.Path,{d:"M15 15V15C15 13.8954 14.1046 13 13 13L11 13C9.89543 13 9 13.8954 9 15V15",fillRule:"evenodd",clipRule:"evenodd"}),(0,Je.jsx)(Ye.Circle,{cx:"12",cy:"9",r:"2",fillRule:"evenodd",clipRule:"evenodd"})]});const wa={attributes:{isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:lo,isEligible:({style:e})=>e?.typography?.fontFamily},Ca=[wa],ja={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-author-name",title:"Comment Author Name",category:"theme",ancestor:["core/comment-template"],description:"Displays the name of the author of the comment.",textdomain:"default",attributes:{isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"},textAlign:{type:"string"}},usesContext:["commentId"],supports:{html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-comment-author-name"},{name:Sa}=ja,Ba={icon:ka,edit:function({attributes:{isLink:e,linkTarget:t,textAlign:o},context:{commentId:n},setAttributes:a}){const r=(0,nt.useBlockProps)({className:ft({[`has-text-align-${o}`]:o})});let i=(0,it.useSelect)((e=>{const{getEntityRecord:t}=e(ct.store),o=t("root","comment",n),a=o?.author_name;if(o&&!a){var r;const e=t("root","user",o.author);return null!==(r=e?.name)&&void 0!==r?r:(0,ot.__)("Anonymous")}return null!=a?a:""}),[n]);const s=(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(nt.AlignmentControl,{value:o,onChange:e=>a({textAlign:e})})}),l=(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.PanelBody,{title:(0,ot.__)("Settings"),children:[(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Link to authors URL"),onChange:()=>a({isLink:!e}),checked:e}),e&&(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Open in new tab"),onChange:e=>a({linkTarget:e?"_blank":"_self"}),checked:"_blank"===t})]})});n&&i||(i=(0,ot._x)("Comment Author","block title"));const c=e?(0,Je.jsx)("a",{href:"#comment-author-pseudo-link",onClick:e=>e.preventDefault(),children:i}):i;return(0,Je.jsxs)(Je.Fragment,{children:[l,s,(0,Je.jsx)("div",{...r,children:c})]})},deprecated:Ca,example:{}},Ta=()=>et({name:Sa,metadata:ja,settings:Ba}),Na=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"})});const Pa={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-content",title:"Comment Content",category:"theme",ancestor:["core/comment-template"],description:"Displays the contents of a comment.",textdomain:"default",usesContext:["commentId"],attributes:{textAlign:{type:"string"}},supports:{color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}},spacing:{padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},html:!1},style:"wp-block-comment-content"},{name:Ia}=Pa,Ma={icon:Na,edit:function({setAttributes:e,attributes:{textAlign:t},context:{commentId:o}}){const n=(0,nt.useBlockProps)({className:ft({[`has-text-align-${t}`]:t})}),[a]=(0,ct.useEntityProp)("root","comment","content",o),r=(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(nt.AlignmentControl,{value:t,onChange:t=>e({textAlign:t})})});return o&&a?(0,Je.jsxs)(Je.Fragment,{children:[r,(0,Je.jsx)("div",{...n,children:(0,Je.jsx)(tt.Disabled,{children:(0,Je.jsx)(st.RawHTML,{children:a.rendered},"html")})})]}):(0,Je.jsxs)(Je.Fragment,{children:[r,(0,Je.jsx)("div",{...n,children:(0,Je.jsx)("p",{children:(0,ot._x)("Comment Content","block title")})})]})},example:{}},Da=()=>et({name:Ia,metadata:Pa,settings:Ma}),za=(0,Je.jsxs)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Je.jsx)(Ye.Path,{d:"M11.696 13.972c.356-.546.599-.958.728-1.235a1.79 1.79 0 00.203-.783c0-.264-.077-.47-.23-.618-.148-.153-.354-.23-.618-.23-.295 0-.569.07-.82.212a3.413 3.413 0 00-.738.571l-.147-1.188c.289-.234.59-.41.903-.526.313-.117.66-.175 1.041-.175.375 0 .695.08.959.24.264.153.46.362.59.626.135.265.203.556.203.876 0 .362-.08.734-.24 1.115-.154.381-.427.87-.82 1.466l-.756 1.152H14v1.106h-4l1.696-2.609z"}),(0,Je.jsx)(Ye.Path,{d:"M19.5 7h-15v12a.5.5 0 00.5.5h14a.5.5 0 00.5-.5V7zM3 7V5a2 2 0 012-2h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"})]}),Aa=window.wp.date;const Ra={attributes:{format:{type:"string"},isLink:{type:"boolean",default:!1}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:lo,isEligible:({style:e})=>e?.typography?.fontFamily},Ha=[Ra],La={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-date",title:"Comment Date",category:"theme",ancestor:["core/comment-template"],description:"Displays the date on which the comment was posted.",textdomain:"default",attributes:{format:{type:"string"},isLink:{type:"boolean",default:!0}},usesContext:["commentId"],supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-comment-date"},{name:Va}=La,Fa={icon:za,edit:function({attributes:{format:e,isLink:t},context:{commentId:o},setAttributes:n}){const a=(0,nt.useBlockProps)();let[r]=(0,ct.useEntityProp)("root","comment","date",o);const[i=(0,Aa.getSettings)().formats.date]=(0,ct.useEntityProp)("root","site","date_format"),s=(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.PanelBody,{title:(0,ot.__)("Settings"),children:[(0,Je.jsx)(nt.__experimentalDateFormatPicker,{format:e,defaultFormat:i,onChange:e=>n({format:e})}),(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Link to comment"),onChange:()=>n({isLink:!t}),checked:t})]})});o&&r||(r=(0,ot._x)("Comment Date","block title"));let l=r instanceof Date?(0,Je.jsx)("time",{dateTime:(0,Aa.dateI18n)("c",r),children:"human-diff"===e?(0,Aa.humanTimeDiff)(r):(0,Aa.dateI18n)(e||i,r)}):(0,Je.jsx)("time",{children:r});return t&&(l=(0,Je.jsx)("a",{href:"#comment-date-pseudo-link",onClick:e=>e.preventDefault(),children:l})),(0,Je.jsxs)(Je.Fragment,{children:[s,(0,Je.jsx)("div",{...a,children:l})]})},deprecated:Ha,example:{}},Ea=()=>et({name:Va,metadata:La,settings:Fa}),Oa=(0,Je.jsx)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"m6.249 11.065.44-.44h3.186l-1.5 1.5H7.31l-1.957 1.96A.792.792 0 0 1 4 13.524V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.5L12.5 8V5.5h-7v6.315l.749-.75ZM20 19.75H7v-1.5h13v1.5Zm0-12.653-8.967 9.064L8 17l.867-2.935L17.833 5 20 7.097Z"})});const $a={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-edit-link",title:"Comment Edit Link",category:"theme",ancestor:["core/comment-template"],description:"Displays a link to edit the comment in the WordPress Dashboard. This link is only visible to users with the edit comment capability.",textdomain:"default",usesContext:["commentId"],attributes:{linkTarget:{type:"string",default:"_self"},textAlign:{type:"string"}},supports:{html:!1,color:{link:!0,gradients:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0}},style:"wp-block-comment-edit-link"},{name:Ga}=$a,Ua={icon:Oa,edit:function({attributes:{linkTarget:e,textAlign:t},setAttributes:o}){const n=(0,nt.useBlockProps)({className:ft({[`has-text-align-${t}`]:t})}),a=(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(nt.AlignmentControl,{value:t,onChange:e=>o({textAlign:e})})}),r=(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsx)(tt.PanelBody,{title:(0,ot.__)("Settings"),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Open in new tab"),onChange:e=>o({linkTarget:e?"_blank":"_self"}),checked:"_blank"===e})})});return(0,Je.jsxs)(Je.Fragment,{children:[a,r,(0,Je.jsx)("div",{...n,children:(0,Je.jsx)("a",{href:"#edit-comment-pseudo-link",onClick:e=>e.preventDefault(),children:(0,ot.__)("Edit")})})]})},example:{}},qa=()=>et({name:Ga,metadata:$a,settings:Ua}),Wa=(0,Je.jsx)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M6.68822 10.625L6.24878 11.0649L5.5 11.8145L5.5 5.5L12.5 5.5V8L14 6.5V5C14 4.44772 13.5523 4 13 4H5C4.44772 4 4 4.44771 4 5V13.5247C4 13.8173 4.16123 14.086 4.41935 14.2237C4.72711 14.3878 5.10601 14.3313 5.35252 14.0845L7.31 12.125H8.375L9.875 10.625H7.31H6.68822ZM14.5605 10.4983L11.6701 13.75H16.9975C17.9963 13.75 18.7796 14.1104 19.3553 14.7048C19.9095 15.2771 20.2299 16.0224 20.4224 16.7443C20.7645 18.0276 20.7543 19.4618 20.7487 20.2544C20.7481 20.345 20.7475 20.4272 20.7475 20.4999L19.2475 20.5001C19.2475 20.4191 19.248 20.3319 19.2484 20.2394V20.2394C19.2526 19.4274 19.259 18.2035 18.973 17.1307C18.8156 16.5401 18.586 16.0666 18.2778 15.7483C17.9909 15.4521 17.5991 15.25 16.9975 15.25H11.8106L14.5303 17.9697L13.4696 19.0303L8.96956 14.5303L13.4394 9.50171L14.5605 10.4983Z"})});const Za=function({setAttributes:e,attributes:{textAlign:t}}){const o=(0,nt.useBlockProps)({className:ft({[`has-text-align-${t}`]:t})}),n=(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(nt.AlignmentControl,{value:t,onChange:t=>e({textAlign:t})})});return(0,Je.jsxs)(Je.Fragment,{children:[n,(0,Je.jsx)("div",{...o,children:(0,Je.jsx)("a",{href:"#comment-reply-pseudo-link",onClick:e=>e.preventDefault(),children:(0,ot.__)("Reply")})})]})},Qa={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-reply-link",title:"Comment Reply Link",category:"theme",ancestor:["core/comment-template"],description:"Displays a link to reply to a comment.",textdomain:"default",usesContext:["commentId"],attributes:{textAlign:{type:"string"}},supports:{color:{gradients:!0,link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},html:!1},style:"wp-block-comment-reply-link"},{name:Ka}=Qa,Ya={edit:Za,icon:Wa,example:{}},Ja=()=>et({name:Ka,metadata:Qa,settings:Ya}),Xa=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),er=window.wp.apiFetch;var tr=o.n(er);const or=({defaultPage:e,postId:t,perPage:o,queryArgs:n})=>{const[a,r]=(0,st.useState)({}),i=`${t}_${o}`,s=a[i]||0;return(0,st.useEffect)((()=>{s||"newest"!==e||tr()({path:(0,vt.addQueryArgs)("/wp/v2/comments",{...n,post:t,per_page:o,_fields:"id"}),method:"HEAD",parse:!1}).then((e=>{const t=parseInt(e.headers.get("X-WP-TotalPages"));r({...a,[i]:t<=1?1:t})}))}),[e,t,o,r]),"newest"===e?s:1},nr=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]];function ar({comment:e,activeCommentId:t,setActiveCommentId:o,firstCommentId:n,blocks:a}){const{children:r,...i}=(0,nt.useInnerBlocksProps)({},{template:nr});return(0,Je.jsxs)("li",{...i,children:[e.commentId===(t||n)?r:null,(0,Je.jsx)(rr,{blocks:a,commentId:e.commentId,setActiveCommentId:o,isHidden:e.commentId===(t||n)}),e?.children?.length>0?(0,Je.jsx)(ir,{comments:e.children,activeCommentId:t,setActiveCommentId:o,blocks:a,firstCommentId:n}):null]})}const rr=(0,st.memo)((({blocks:e,commentId:t,setActiveCommentId:o,isHidden:n})=>{const a=(0,nt.__experimentalUseBlockPreview)({blocks:e}),r=()=>{o(t)},i={display:n?"none":void 0};return(0,Je.jsx)("div",{...a,tabIndex:0,role:"button",style:i,onClick:r,onKeyPress:r})})),ir=({comments:e,blockProps:t,activeCommentId:o,setActiveCommentId:n,blocks:a,firstCommentId:r})=>(0,Je.jsx)("ol",{...t,children:e&&e.map((({commentId:e,...t},i)=>(0,Je.jsx)(nt.BlockContextProvider,{value:{commentId:e<0?null:e},children:(0,Je.jsx)(ar,{comment:{commentId:e,...t},activeCommentId:o,setActiveCommentId:n,blocks:a,firstCommentId:r})},t.commentId||i)))});const sr={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-template",title:"Comment Template",category:"design",parent:["core/comments"],description:"Contains the block elements used to display a comment, like the title, date, author, avatar and more.",textdomain:"default",usesContext:["postId"],supports:{align:!0,html:!1,reusable:!1,spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-comment-template"},{name:lr}=sr,cr={icon:Xa,edit:function({clientId:e,context:{postId:t}}){const o=(0,nt.useBlockProps)(),[n,a]=(0,st.useState)(),{commentOrder:r,threadCommentsDepth:i,threadComments:s,commentsPerPage:l,pageComments:c}=(0,it.useSelect)((e=>{const{getSettings:t}=e(nt.store);return t().__experimentalDiscussionSettings})),u=(({postId:e})=>{const t={status:"approve",order:"asc",context:"embed",parent:0,_embed:"children"},{pageComments:o,commentsPerPage:n,defaultCommentsPage:a}=(0,it.useSelect)((e=>{const{getSettings:t}=e(nt.store),{__experimentalDiscussionSettings:o}=t();return o})),r=o?Math.min(n,100):100,i=or({defaultPage:a,postId:e,perPage:r,queryArgs:t});return(0,st.useMemo)((()=>i?{...t,post:e,per_page:r,page:i}:null),[e,r,i])})({postId:t}),{topLevelComments:d,blocks:p}=(0,it.useSelect)((t=>{const{getEntityRecords:o}=t(ct.store),{getBlocks:n}=t(nt.store);return{topLevelComments:u?o("root","comment",u):null,blocks:n(e)}}),[e,u]);let m=(e=>(0,st.useMemo)((()=>e?.map((({id:e,_embedded:t})=>{const[o]=t?.children||[[]];return{commentId:e,children:o.map((e=>({commentId:e.id})))}}))),[e]))("desc"===r&&d?[...d].reverse():d);return d?(t||(m=(({perPage:e,pageComments:t,threadComments:o,threadCommentsDepth:n})=>{const a=o?Math.min(n,3):1,r=e=>e<a?[{commentId:-(e+3),children:r(e+1)}]:[],i=[{commentId:-1,children:r(1)}];return(!t||e>=2)&&a<3&&i.push({commentId:-2,children:[]}),(!t||e>=3)&&a<2&&i.push({commentId:-3,children:[]}),i})({perPage:l,pageComments:c,threadComments:s,threadCommentsDepth:i})),m.length?(0,Je.jsx)(ir,{comments:m,blockProps:o,blocks:p,activeCommentId:n,setActiveCommentId:a,firstCommentId:m[0]?.commentId}):(0,Je.jsx)("p",{...o,children:(0,ot.__)("No results found.")})):(0,Je.jsx)("p",{...o,children:(0,Je.jsx)(tt.Spinner,{})})},save:function(){return(0,Je.jsx)(nt.InnerBlocks.Content,{})}},ur=()=>et({name:lr,metadata:sr,settings:cr}),dr=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M16 10.5v3h3v-3h-3zm-5 3h3v-3h-3v3zM7 9l-3 3 3 3 1-1-2-2 2-2-1-1z"})}),pr={none:"",arrow:"←",chevron:"«"};const mr={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination-previous",title:"Comments Previous Page",category:"theme",parent:["core/comments-pagination"],description:"Displays the previous comment's page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["postId","comments/paginationArrow"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:gr}=mr,hr={icon:dr,edit:function({attributes:{label:e},setAttributes:t,context:{"comments/paginationArrow":o}}){const n=pr[o];return(0,Je.jsxs)("a",{href:"#comments-pagination-previous-pseudo-link",onClick:e=>e.preventDefault(),...(0,nt.useBlockProps)(),children:[n&&(0,Je.jsx)("span",{className:`wp-block-comments-pagination-previous-arrow is-arrow-${o}`,children:n}),(0,Je.jsx)(nt.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,ot.__)("Older comments page link"),placeholder:(0,ot.__)("Older Comments"),value:e,onChange:e=>t({label:e})})]})},example:{attributes:{label:(0,ot.__)("Older Comments")}}},xr=()=>et({name:gr,metadata:mr,settings:hr}),_r=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z"})});function br({value:e,onChange:t}){return(0,Je.jsxs)(tt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Arrow"),value:e,onChange:t,help:(0,ot.__)("A decorative arrow appended to the next and previous comments link."),isBlock:!0,children:[(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"none",label:(0,ot._x)("None","Arrow option for Comments Pagination Next/Previous blocks")}),(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,ot._x)("Arrow","Arrow option for Comments Pagination Next/Previous blocks")}),(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,ot._x)("Chevron","Arrow option for Comments Pagination Next/Previous blocks")})]})}const yr=[["core/comments-pagination-previous"],["core/comments-pagination-numbers"],["core/comments-pagination-next"]];const fr={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination",title:"Comments Pagination",category:"theme",parent:["core/comments"],allowedBlocks:["core/comments-pagination-previous","core/comments-pagination-numbers","core/comments-pagination-next"],description:"Displays a paginated navigation to next/previous set of comments, when applicable.",textdomain:"default",attributes:{paginationArrow:{type:"string",default:"none"}},example:{attributes:{paginationArrow:"none"}},providesContext:{"comments/paginationArrow":"paginationArrow"},supports:{align:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-comments-pagination-editor",style:"wp-block-comments-pagination"},{name:vr}=fr,kr={icon:_r,edit:function({attributes:{paginationArrow:e},setAttributes:t,clientId:o}){const n=(0,it.useSelect)((e=>{const{getBlocks:t}=e(nt.store),n=t(o);return n?.find((e=>["core/comments-pagination-previous","core/comments-pagination-next"].includes(e.name)))}),[]),a=(0,nt.useBlockProps)(),r=(0,nt.useInnerBlocksProps)(a,{template:yr});return(0,it.useSelect)((e=>{const{getSettings:t}=e(nt.store),{__experimentalDiscussionSettings:o}=t();return o?.pageComments}),[])?(0,Je.jsxs)(Je.Fragment,{children:[n&&(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsx)(tt.PanelBody,{title:(0,ot.__)("Settings"),children:(0,Je.jsx)(br,{value:e,onChange:e=>{t({paginationArrow:e})}})})}),(0,Je.jsx)("div",{...r})]}):(0,Je.jsx)(nt.Warning,{children:(0,ot.__)("Comments Pagination block: paging comments is disabled in the Discussion Settings")})},save:function(){return(0,Je.jsx)(nt.InnerBlocks.Content,{})}},wr=()=>et({name:vr,metadata:fr,settings:kr}),Cr=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z"})}),jr={none:"",arrow:"→",chevron:"»"};const Sr={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination-next",title:"Comments Next Page",category:"theme",parent:["core/comments-pagination"],description:"Displays the next comment's page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["postId","comments/paginationArrow"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:Br}=Sr,Tr={icon:Cr,edit:function({attributes:{label:e},setAttributes:t,context:{"comments/paginationArrow":o}}){const n=jr[o];return(0,Je.jsxs)("a",{href:"#comments-pagination-next-pseudo-link",onClick:e=>e.preventDefault(),...(0,nt.useBlockProps)(),children:[(0,Je.jsx)(nt.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,ot.__)("Newer comments page link"),placeholder:(0,ot.__)("Newer Comments"),value:e,onChange:e=>t({label:e})}),n&&(0,Je.jsx)("span",{className:`wp-block-comments-pagination-next-arrow is-arrow-${o}`,children:n})]})},example:{attributes:{label:(0,ot.__)("Newer Comments")}}},Nr=()=>et({name:Br,metadata:Sr,settings:Tr}),Pr=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M4 13.5h6v-3H4v3zm8.2-2.5.8-.3V14h1V9.3l-2.2.7.4 1zm7.1-1.2c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3-.1-.8-.3-1.1z"})}),Ir=({content:e,tag:t="a",extraClass:o=""})=>"a"===t?(0,Je.jsx)(t,{className:`page-numbers ${o}`,href:"#comments-pagination-numbers-pseudo-link",onClick:e=>e.preventDefault(),children:e}):(0,Je.jsx)(t,{className:`page-numbers ${o}`,children:e});const Mr={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination-numbers",title:"Comments Page Numbers",category:"theme",parent:["core/comments-pagination"],description:"Displays a list of page numbers for comments pagination.",textdomain:"default",usesContext:["postId"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:Dr}=Mr,zr={icon:Pr,edit:function(){return(0,Je.jsxs)("div",{...(0,nt.useBlockProps)(),children:[(0,Je.jsx)(Ir,{content:"1"}),(0,Je.jsx)(Ir,{content:"2"}),(0,Je.jsx)(Ir,{content:"3",tag:"span",extraClass:"current"}),(0,Je.jsx)(Ir,{content:"4"}),(0,Je.jsx)(Ir,{content:"5"}),(0,Je.jsx)(Ir,{content:"...",tag:"span",extraClass:"dots"}),(0,Je.jsx)(Ir,{content:"8"})]})},example:{}},Ar=()=>et({name:Dr,metadata:Mr,settings:zr}),Rr=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"})});const{attributes:Hr,supports:Lr}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-title",title:"Comments Title",category:"theme",ancestor:["core/comments"],description:"Displays a title with the number of comments.",textdomain:"default",usesContext:["postId","postType"],attributes:{textAlign:{type:"string"},showPostTitle:{type:"boolean",default:!0},showCommentsCount:{type:"boolean",default:!0},level:{type:"number",default:2},levelOptions:{type:"array"}},supports:{anchor:!1,align:!0,html:!1,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0}},interactivity:{clientNavigation:!0}}},Vr=[{attributes:{...Hr,singleCommentLabel:{type:"string"},multipleCommentsLabel:{type:"string"}},supports:Lr,migrate:e=>{const{singleCommentLabel:t,multipleCommentsLabel:o,...n}=e;return n},isEligible:({multipleCommentsLabel:e,singleCommentLabel:t})=>e||t,save:()=>null}],Fr={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-title",title:"Comments Title",category:"theme",ancestor:["core/comments"],description:"Displays a title with the number of comments.",textdomain:"default",usesContext:["postId","postType"],attributes:{textAlign:{type:"string"},showPostTitle:{type:"boolean",default:!0},showCommentsCount:{type:"boolean",default:!0},level:{type:"number",default:2},levelOptions:{type:"array"}},supports:{anchor:!1,align:!0,html:!1,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0}},interactivity:{clientNavigation:!0}}},{name:Er}=Fr,Or={icon:Rr,edit:function({attributes:{textAlign:e,showPostTitle:t,showCommentsCount:o,level:n,levelOptions:a},setAttributes:r,context:{postType:i,postId:s}}){const l="h"+n,[c,u]=(0,st.useState)(),[d]=(0,ct.useEntityProp)("postType",i,"title",s),p=void 0===s,m=(0,nt.useBlockProps)({className:ft({[`has-text-align-${e}`]:e})}),{threadCommentsDepth:g,threadComments:h,commentsPerPage:x,pageComments:_}=(0,it.useSelect)((e=>{const{getSettings:t}=e(nt.store);return t().__experimentalDiscussionSettings}));(0,st.useEffect)((()=>{if(p){const e=h?Math.min(g,3)-1:0,t=_?x:3,o=parseInt(e)+parseInt(t);return void u(Math.min(o,3))}const e=s;tr()({path:(0,vt.addQueryArgs)("/wp/v2/comments",{post:s,_fields:"id"}),method:"HEAD",parse:!1}).then((t=>{e===s&&u(parseInt(t.headers.get("X-WP-Total")))})).catch((()=>{u(0)}))}),[s]);const b=(0,Je.jsxs)(nt.BlockControls,{group:"block",children:[(0,Je.jsx)(nt.AlignmentControl,{value:e,onChange:e=>r({textAlign:e})}),(0,Je.jsx)(nt.HeadingLevelDropdown,{value:n,options:a,onChange:e=>r({level:e})})]}),y=(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.PanelBody,{title:(0,ot.__)("Settings"),children:[(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Show post title"),checked:t,onChange:e=>r({showPostTitle:e})}),(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Show comments count"),checked:o,onChange:e=>r({showCommentsCount:e})})]})}),f=p?(0,ot.__)("“Post Title”"):`"${d}"`;let v;return v=o&&void 0!==c?t?1===c?(0,ot.sprintf)((0,ot.__)("One response to %s"),f):(0,ot.sprintf)((0,ot._n)("%1$s response to %2$s","%1$s responses to %2$s",c),c,f):1===c?(0,ot.__)("One response"):(0,ot.sprintf)((0,ot._n)("%s response","%s responses",c),c):t?1===c?(0,ot.sprintf)((0,ot.__)("Response to %s"),f):(0,ot.sprintf)((0,ot.__)("Responses to %s"),f):1===c?(0,ot.__)("Response"):(0,ot.__)("Responses"),(0,Je.jsxs)(Je.Fragment,{children:[b,y,(0,Je.jsx)(l,{...m,children:v})]})},deprecated:Vr,example:{}},$r=()=>et({name:Er,metadata:Fr,settings:Or}),Gr=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h6.2v8.9l2.5-3.1 2.5 3.1V4.5h2.2c.4 0 .8.4.8.8v13.4z"})}),Ur={"top left":"is-position-top-left","top center":"is-position-top-center","top right":"is-position-top-right","center left":"is-position-center-left","center center":"is-position-center-center",center:"is-position-center-center","center right":"is-position-center-right","bottom left":"is-position-bottom-left","bottom center":"is-position-bottom-center","bottom right":"is-position-bottom-right"},qr="image",Wr="video",Zr={x:.5,y:.5},Qr=["image","video"];function Kr({x:e,y:t}=Zr){return`${Math.round(100*e)}% ${Math.round(100*t)}%`}function Yr(e){return 50===e||void 0===e?null:"has-background-dim-"+10*Math.round(e/10)}function Jr(e){return!e||"center center"===e||"center"===e}function Xr(e){return Jr(e)?"":Ur[e]}function ei(e){return e?{backgroundImage:`url(${e})`}:{}}function ti(e){return 0!==e&&50!==e&&e?"has-background-dim-"+10*Math.round(e/10):null}function oi(e){return{...e,dimRatio:e.url?e.dimRatio:100}}function ni(e){return e.tagName||(e={...e,tagName:"div"}),{...e}}const ai={url:{type:"string"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"}},ri={url:{type:"string"},id:{type:"number"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},hasParallax:{type:"boolean",default:!1},isRepeated:{type:"boolean",default:!1},dimRatio:{type:"number",default:100},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},isDark:{type:"boolean",default:!0},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},ii={...ri,useFeaturedImage:{type:"boolean",default:!1},tagName:{type:"string",default:"div"}},si={...ii,isUserOverlayColor:{type:"boolean"},sizeSlug:{type:"string"},alt:{type:"string",default:""}},li={anchor:!0,align:!0,html:!1,spacing:{padding:!0,__experimentalDefaultControls:{padding:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",text:!1,background:!1}},ci={...li,spacing:{padding:!0,margin:["top","bottom"],blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",heading:!0,text:!0,background:!1,__experimentalSkipSerialization:["gradients"],enableContrastChecker:!1},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowJustification:!1}},ui={attributes:si,supports:{...ci,shadow:!0,dimensions:{aspectRatio:!0},interactivity:{clientNavigation:!0}},save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:a,customOverlayColor:r,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:x,minHeightUnit:_,tagName:b,sizeSlug:y}=e,f=(0,nt.getColorClassName)("background-color",p),v=(0,nt.__experimentalGetGradientClass)(o),k=qr===t,w=Wr===t,C=!(c||d),j={minHeight:(x&&_?`${x}${_}`:x)||void 0},S={backgroundColor:f?void 0:r,background:a||void 0},B=s&&C?Kr(s):void 0,T=m?`url(${m})`:void 0,N=Kr(s),P=ft({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Jr(n)},Xr(n)),I=ft("wp-block-cover__image-background",h?`wp-image-${h}`:null,{[`size-${y}`]:y,"has-parallax":c,"is-repeated":d}),M=o||a;return(0,Je.jsxs)(b,{...nt.useBlockProps.save({className:P,style:j}),children:[(0,Je.jsx)("span",{"aria-hidden":"true",className:ft("wp-block-cover__background",f,Yr(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&M&&0!==i,"has-background-gradient":M,[v]:v}),style:S}),!l&&k&&m&&(C?(0,Je.jsx)("img",{className:I,alt:g,src:m,style:{objectPosition:B},"data-object-fit":"cover","data-object-position":B}):(0,Je.jsx)("div",{role:g?"img":void 0,"aria-label":g||void 0,className:I,style:{backgroundPosition:N,backgroundImage:T}})),w&&m&&(0,Je.jsx)("video",{className:ft("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:{objectPosition:B},"data-object-fit":"cover","data-object-position":B}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}},di={attributes:ii,supports:ci,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:a,customOverlayColor:r,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:x,minHeightUnit:_,tagName:b}=e,y=(0,nt.getColorClassName)("background-color",p),f=(0,nt.__experimentalGetGradientClass)(o),v=qr===t,k=Wr===t,w=!(c||d),C={minHeight:(x&&_?`${x}${_}`:x)||void 0},j={backgroundColor:y?void 0:r,background:a||void 0},S=s&&w?Kr(s):void 0,B=m?`url(${m})`:void 0,T=Kr(s),N=ft({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Jr(n)},Xr(n)),P=ft("wp-block-cover__image-background",h?`wp-image-${h}`:null,{"has-parallax":c,"is-repeated":d}),I=o||a;return(0,Je.jsxs)(b,{...nt.useBlockProps.save({className:N,style:C}),children:[(0,Je.jsx)("span",{"aria-hidden":"true",className:ft("wp-block-cover__background",y,Yr(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&I&&0!==i,"has-background-gradient":I,[f]:f}),style:j}),!l&&v&&m&&(w?(0,Je.jsx)("img",{className:P,alt:g,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}):(0,Je.jsx)("div",{role:"img",className:P,style:{backgroundPosition:T,backgroundImage:B}})),k&&m&&(0,Je.jsx)("video",{className:ft("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}},pi={attributes:ii,supports:ci,isEligible:e=>(void 0!==e.customOverlayColor||void 0!==e.overlayColor)&&void 0===e.isUserOverlayColor,migrate:e=>({...e,isUserOverlayColor:!0}),save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:a,customOverlayColor:r,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:x,minHeightUnit:_,tagName:b}=e,y=(0,nt.getColorClassName)("background-color",p),f=(0,nt.__experimentalGetGradientClass)(o),v=qr===t,k=Wr===t,w=!(c||d),C={minHeight:(x&&_?`${x}${_}`:x)||void 0},j={backgroundColor:y?void 0:r,background:a||void 0},S=s&&w?Kr(s):void 0,B=m?`url(${m})`:void 0,T=Kr(s),N=ft({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Jr(n)},Xr(n)),P=ft("wp-block-cover__image-background",h?`wp-image-${h}`:null,{"has-parallax":c,"is-repeated":d}),I=o||a;return(0,Je.jsxs)(b,{...nt.useBlockProps.save({className:N,style:C}),children:[(0,Je.jsx)("span",{"aria-hidden":"true",className:ft("wp-block-cover__background",y,Yr(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&I&&0!==i,"has-background-gradient":I,[f]:f}),style:j}),!l&&v&&m&&(w?(0,Je.jsx)("img",{className:P,alt:g,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}):(0,Je.jsx)("div",{role:"img",className:P,style:{backgroundPosition:T,backgroundImage:B}})),k&&m&&(0,Je.jsx)("video",{className:ft("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}},mi={attributes:ri,supports:li,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:a,customOverlayColor:r,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:x,minHeightUnit:_}=e,b=(0,nt.getColorClassName)("background-color",p),y=(0,nt.__experimentalGetGradientClass)(o),f=qr===t,v=Wr===t,k=!(c||d),w={minHeight:(x&&_?`${x}${_}`:x)||void 0},C={backgroundColor:b?void 0:r,background:a||void 0},j=s&&k?Kr(s):void 0,S=m?`url(${m})`:void 0,B=Kr(s),T=ft({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Jr(n)},Xr(n)),N=ft("wp-block-cover__image-background",h?`wp-image-${h}`:null,{"has-parallax":c,"is-repeated":d}),P=o||a;return(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:T,style:w}),children:[(0,Je.jsx)("span",{"aria-hidden":"true",className:ft("wp-block-cover__background",b,Yr(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&P&&0!==i,"has-background-gradient":P,[y]:y}),style:C}),!l&&f&&m&&(k?(0,Je.jsx)("img",{className:N,alt:g,src:m,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}):(0,Je.jsx)("div",{role:"img",className:N,style:{backgroundPosition:B,backgroundImage:S}})),v&&m&&(0,Je.jsx)("video",{className:ft("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:ni},gi={attributes:ri,supports:li,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:a,customOverlayColor:r,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:x,minHeightUnit:_}=e,b=(0,nt.getColorClassName)("background-color",p),y=(0,nt.__experimentalGetGradientClass)(o),f=x&&_?`${x}${_}`:x,v=qr===t,k=Wr===t,w=!(c||d),C={...!v||w||l?{}:ei(m),minHeight:f||void 0},j={backgroundColor:b?void 0:r,background:a||void 0},S=s&&w?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,B=ft({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Jr(n)},Xr(n)),T=o||a;return(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:B,style:C}),children:[(0,Je.jsx)("span",{"aria-hidden":"true",className:ft("wp-block-cover__background",b,Yr(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&T&&0!==i,"has-background-gradient":T,[y]:y}),style:j}),!l&&v&&w&&m&&(0,Je.jsx)("img",{className:ft("wp-block-cover__image-background",h?`wp-image-${h}`:null),alt:g,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),k&&m&&(0,Je.jsx)("video",{className:ft("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:ni},hi={attributes:ri,supports:li,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:a,customOverlayColor:r,dimRatio:i,focalPoint:s,hasParallax:l,isDark:c,isRepeated:u,overlayColor:d,url:p,alt:m,id:g,minHeight:h,minHeightUnit:x}=e,_=(0,nt.getColorClassName)("background-color",d),b=(0,nt.__experimentalGetGradientClass)(o),y=x?`${h}${x}`:h,f=qr===t,v=Wr===t,k=!(l||u),w={...f&&!k?ei(p):{},minHeight:y||void 0},C={backgroundColor:_?void 0:r,background:a||void 0},j=s&&k?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,S=ft({"is-light":!c,"has-parallax":l,"is-repeated":u,"has-custom-content-position":!Jr(n)},Xr(n)),B=o||a;return(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:S,style:w}),children:[(0,Je.jsx)("span",{"aria-hidden":"true",className:ft("wp-block-cover__background",_,Yr(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":p&&B&&0!==i,"has-background-gradient":B,[b]:b}),style:C}),f&&k&&p&&(0,Je.jsx)("img",{className:ft("wp-block-cover__image-background",g?`wp-image-${g}`:null),alt:m,src:p,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}),v&&p&&(0,Je.jsx)("video",{className:ft("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:p,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:ni},xi={attributes:ri,supports:li,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:a,customOverlayColor:r,dimRatio:i,focalPoint:s,hasParallax:l,isDark:c,isRepeated:u,overlayColor:d,url:p,alt:m,id:g,minHeight:h,minHeightUnit:x}=e,_=(0,nt.getColorClassName)("background-color",d),b=(0,nt.__experimentalGetGradientClass)(o),y=x?`${h}${x}`:h,f=qr===t,v=Wr===t,k=!(l||u),w={...f&&!k?ei(p):{},minHeight:y||void 0},C={backgroundColor:_?void 0:r,background:a||void 0},j=s&&k?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,S=ft({"is-light":!c,"has-parallax":l,"is-repeated":u,"has-custom-content-position":!Jr(n)},Xr(n));return(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:S,style:w}),children:[(0,Je.jsx)("span",{"aria-hidden":"true",className:ft(_,Yr(i),"wp-block-cover__gradient-background",b,{"has-background-dim":void 0!==i,"has-background-gradient":o||a,[b]:!p&&b}),style:C}),f&&k&&p&&(0,Je.jsx)("img",{className:ft("wp-block-cover__image-background",g?`wp-image-${g}`:null),alt:m,src:p,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}),v&&p&&(0,Je.jsx)("video",{className:ft("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:p,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:ni},_i={attributes:{...ai,isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""}},supports:li,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:a,customOverlayColor:r,dimRatio:i,focalPoint:s,hasParallax:l,isRepeated:c,overlayColor:u,url:d,alt:p,id:m,minHeight:g,minHeightUnit:h}=e,x=(0,nt.getColorClassName)("background-color",u),_=(0,nt.__experimentalGetGradientClass)(o),b=h?`${g}${h}`:g,y=qr===t,f=Wr===t,v=!(l||c),k={...y&&!v?ei(d):{},backgroundColor:x?void 0:r,background:a&&!d?a:void 0,minHeight:b||void 0},w=s&&v?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,C=ft(ti(i),x,{"has-background-dim":0!==i,"has-parallax":l,"is-repeated":c,"has-background-gradient":o||a,[_]:!d&&_,"has-custom-content-position":!Jr(n)},Xr(n));return(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:C,style:k}),children:[d&&(o||a)&&0!==i&&(0,Je.jsx)("span",{"aria-hidden":"true",className:ft("wp-block-cover__gradient-background",_),style:a?{background:a}:void 0}),y&&v&&d&&(0,Je.jsx)("img",{className:ft("wp-block-cover__image-background",m?`wp-image-${m}`:null),alt:p,src:d,style:{objectPosition:w},"data-object-fit":"cover","data-object-position":w}),f&&d&&(0,Je.jsx)("video",{className:ft("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:w},"data-object-fit":"cover","data-object-position":w}),(0,Je.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})]})},migrate:(0,ut.compose)(oi,ni)},bi={attributes:{...ai,isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:a,customOverlayColor:r,dimRatio:i,focalPoint:s,hasParallax:l,isRepeated:c,overlayColor:u,url:d,minHeight:p,minHeightUnit:m}=e,g=(0,nt.getColorClassName)("background-color",u),h=(0,nt.__experimentalGetGradientClass)(o),x=m?`${p}${m}`:p,_=qr===t,b=Wr===t,y=_?ei(d):{},f={};let v;g||(y.backgroundColor=r),a&&!d&&(y.background=a),y.minHeight=x||void 0,s&&(v=`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`,_&&!l&&(y.backgroundPosition=v),b&&(f.objectPosition=v));const k=ft(ti(i),g,{"has-background-dim":0!==i,"has-parallax":l,"is-repeated":c,"has-background-gradient":o||a,[h]:!d&&h,"has-custom-content-position":!Jr(n)},Xr(n));return(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:k,style:y}),children:[d&&(o||a)&&0!==i&&(0,Je.jsx)("span",{"aria-hidden":"true",className:ft("wp-block-cover__gradient-background",h),style:a?{background:a}:void 0}),b&&d&&(0,Je.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:f}),(0,Je.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})]})},migrate:(0,ut.compose)(oi,ni)},yi={attributes:{...ai,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:o,customGradient:n,customOverlayColor:a,dimRatio:r,focalPoint:i,hasParallax:s,overlayColor:l,url:c,minHeight:u}=e,d=(0,nt.getColorClassName)("background-color",l),p=(0,nt.__experimentalGetGradientClass)(o),m=t===qr?ei(c):{};d||(m.backgroundColor=a),i&&!s&&(m.backgroundPosition=`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`),n&&!c&&(m.background=n),m.minHeight=u||void 0;const g=ft(ti(r),d,{"has-background-dim":0!==r,"has-parallax":s,"has-background-gradient":n,[p]:!c&&p});return(0,Je.jsxs)("div",{className:g,style:m,children:[c&&(o||n)&&0!==r&&(0,Je.jsx)("span",{"aria-hidden":"true",className:ft("wp-block-cover__gradient-background",p),style:n?{background:n}:void 0}),Wr===t&&c&&(0,Je.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),(0,Je.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})]})},migrate:(0,ut.compose)(oi,ni)},fi={attributes:{...ai,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:o,customGradient:n,customOverlayColor:a,dimRatio:r,focalPoint:i,hasParallax:s,overlayColor:l,url:c,minHeight:u}=e,d=(0,nt.getColorClassName)("background-color",l),p=(0,nt.__experimentalGetGradientClass)(o),m=t===qr?ei(c):{};d||(m.backgroundColor=a),i&&!s&&(m.backgroundPosition=`${100*i.x}% ${100*i.y}%`),n&&!c&&(m.background=n),m.minHeight=u||void 0;const g=ft(ti(r),d,{"has-background-dim":0!==r,"has-parallax":s,"has-background-gradient":n,[p]:!c&&p});return(0,Je.jsxs)("div",{className:g,style:m,children:[c&&(o||n)&&0!==r&&(0,Je.jsx)("span",{"aria-hidden":"true",className:ft("wp-block-cover__gradient-background",p),style:n?{background:n}:void 0}),Wr===t&&c&&(0,Je.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),(0,Je.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})]})},migrate:(0,ut.compose)(oi,ni)},vi={attributes:{...ai,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,contentAlign:o,customOverlayColor:n,dimRatio:a,focalPoint:r,hasParallax:i,overlayColor:s,title:l,url:c}=e,u=(0,nt.getColorClassName)("background-color",s),d=t===qr?ei(c):{};u||(d.backgroundColor=n),r&&!i&&(d.backgroundPosition=`${100*r.x}% ${100*r.y}%`);const p=ft(ti(a),u,{"has-background-dim":0!==a,"has-parallax":i,[`has-${o}-content`]:"center"!==o});return(0,Je.jsxs)("div",{className:p,style:d,children:[Wr===t&&c&&(0,Je.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),!nt.RichText.isEmpty(l)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:l})]})},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:o,contentAlign:n,...a}=t;return[a,[(0,Ke.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,ot.__)("Write title…")})]]}},ki={attributes:{...ai,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"},align:{type:"string"}},supports:{className:!1},save({attributes:e}){const{url:t,title:o,hasParallax:n,dimRatio:a,align:r,contentAlign:i,overlayColor:s,customOverlayColor:l}=e,c=(0,nt.getColorClassName)("background-color",s),u=ei(t);c||(u.backgroundColor=l);const d=ft("wp-block-cover-image",ti(a),c,{"has-background-dim":0!==a,"has-parallax":n,[`has-${i}-content`]:"center"!==i},r?`align${r}`:null);return(0,Je.jsx)("div",{className:d,style:u,children:!nt.RichText.isEmpty(o)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:o})})},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:o,contentAlign:n,align:a,...r}=t;return[r,[(0,Ke.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,ot.__)("Write title…")})]]}},wi={attributes:{...ai,title:{type:"string",source:"html",selector:"h2"},align:{type:"string"},contentAlign:{type:"string",default:"center"}},supports:{className:!1},save({attributes:e}){const{url:t,title:o,hasParallax:n,dimRatio:a,align:r}=e,i=ei(t),s=ft("wp-block-cover-image",ti(a),{"has-background-dim":0!==a,"has-parallax":n},r?`align${r}`:null);return(0,Je.jsx)("section",{className:s,style:i,children:(0,Je.jsx)(nt.RichText.Content,{tagName:"h2",value:o})})},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:o,contentAlign:n,align:a,...r}=t;return[r,[(0,Ke.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,ot.__)("Write title…")})]]}},Ci=[ui,di,pi,mi,gi,hi,xi,_i,bi,yi,fi,vi,ki,wi],ji="full",{cleanEmptyObject:Si,ResolutionTool:Bi}=Ot(nt.privateApis);function Ti({onChange:e,onUnitChange:t,unit:o="px",value:n=""}){const a=`block-cover-height-input-${(0,ut.useInstanceId)(tt.__experimentalUnitControl)}`,r="px"===o,[i]=(0,nt.useSettings)("spacing.units"),s=(0,tt.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem","vw","vh"],defaultValues:{px:430,"%":20,em:20,rem:20,vw:20,vh:50}}),l=(0,st.useMemo)((()=>{const[e]=(0,tt.__experimentalParseQuantityAndUnitFromRawValue)(n);return[e,o].join("")}),[o,n]),c=r?50:0;return(0,Je.jsx)(tt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,ot.__)("Minimum height"),id:a,isResetValueOnUnitChange:!0,min:c,onChange:t=>{const o=""!==t?parseFloat(t):void 0;isNaN(o)&&void 0!==o||e(o)},onUnitChange:t,units:s,value:l})}function Ni({attributes:e,setAttributes:t,clientId:o,setOverlayColor:n,coverRef:a,currentSettings:r,updateDimRatio:i,featuredImage:s}){const{useFeaturedImage:l,id:c,dimRatio:u,focalPoint:d,hasParallax:p,isRepeated:m,minHeight:g,minHeightUnit:h,alt:x,tagName:_}=e,{isVideoBackground:b,isImageBackground:y,mediaElement:f,url:v,overlayColor:k}=r,w=e.sizeSlug||ji,{gradientValue:C,setGradient:j}=(0,nt.__experimentalUseGradient)(),{getSettings:S}=(0,it.useSelect)(nt.store),B=S()?.imageSizes,T=(0,it.useSelect)((e=>c&&y?e(ct.store).getMedia(c,{context:"view"}):null),[c,y]),N=l?s:T;const P=B?.filter((({slug:e})=>N?.media_details?.sizes?.[e]?.source_url))?.map((({name:e,slug:t})=>({value:t,label:e}))),I=b||y&&(!p||m),M=e=>{const[t,o]=f.current?[f.current.style,"objectPosition"]:[a.current.style,"backgroundPosition"];t[o]=Kr(e)},D=(0,nt.__experimentalUseMultipleOriginColorsAndGradients)(),z=mt();return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.InspectorControls,{children:!!v&&(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{t({hasParallax:!1,focalPoint:void 0,isRepeated:!1,alt:"",sizeSlug:void 0})},dropdownMenuProps:z,children:[y&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Fixed background"),isShownByDefault:!0,hasValue:()=>p,onDeselect:()=>t({hasParallax:!1,focalPoint:void 0}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Fixed background"),checked:p,onChange:()=>{t({hasParallax:!p,...p?{}:{focalPoint:void 0}})}})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Repeated background"),isShownByDefault:!0,hasValue:()=>m,onDeselect:()=>t({isRepeated:!1}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Repeated background"),checked:m,onChange:()=>{t({isRepeated:!m})}})})]}),I&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Focal point"),isShownByDefault:!0,hasValue:()=>!!d,onDeselect:()=>t({focalPoint:void 0}),children:(0,Je.jsx)(tt.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Focal point"),url:v,value:d,onDragStart:M,onDrag:M,onChange:e=>t({focalPoint:e})})}),!l&&v&&!b&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Alternative text"),isShownByDefault:!0,hasValue:()=>!!x,onDeselect:()=>t({alt:""}),children:(0,Je.jsx)(tt.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Alternative text"),value:x,onChange:e=>t({alt:e}),help:(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.ExternalLink,{href:(0,ot.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,ot.__)("Describe the purpose of the image.")}),(0,Je.jsx)("br",{}),(0,ot.__)("Leave empty if decorative.")]})})}),!!P?.length&&(0,Je.jsx)(Bi,{value:w,onChange:function(e){const o=N?.media_details?.sizes?.[e]?.source_url;if(!o)return null;t({url:o,sizeSlug:e})},options:P,defaultValue:ji})]})}),D.hasColorsOrGradients&&(0,Je.jsxs)(nt.InspectorControls,{group:"color",children:[(0,Je.jsx)(nt.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:k.color,gradientValue:C,label:(0,ot.__)("Overlay"),onColorChange:n,onGradientChange:j,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0}),clearable:!0}],panelId:o,...D}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>void 0!==u&&u!==(v?50:100),label:(0,ot.__)("Overlay opacity"),onDeselect:()=>i(v?50:100),resetAllFilter:()=>({dimRatio:v?50:100}),isShownByDefault:!0,panelId:o,children:(0,Je.jsx)(tt.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Overlay opacity"),value:u,onChange:e=>i(e),min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0})})]}),(0,Je.jsx)(nt.InspectorControls,{group:"dimensions",children:(0,Je.jsx)(tt.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!g,label:(0,ot.__)("Minimum height"),onDeselect:()=>t({minHeight:void 0,minHeightUnit:void 0}),resetAllFilter:()=>({minHeight:void 0,minHeightUnit:void 0}),isShownByDefault:!0,panelId:o,children:(0,Je.jsx)(Ti,{value:e?.style?.dimensions?.aspectRatio?"":g,unit:h,onChange:o=>t({minHeight:o,style:Si({...e?.style,dimensions:{...e?.style?.dimensions,aspectRatio:void 0}})}),onUnitChange:e=>t({minHeightUnit:e})})})}),(0,Je.jsx)(nt.InspectorControls,{group:"advanced",children:(0,Je.jsx)(tt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("HTML element"),options:[{label:(0,ot.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}],value:_,onChange:e=>t({tagName:e}),help:sa[_]})})]})}const{cleanEmptyObject:Pi}=Ot(nt.privateApis);function Ii({attributes:e,setAttributes:t,onSelectMedia:o,currentSettings:n,toggleUseFeaturedImage:a,onClearMedia:r}){const{contentPosition:i,id:s,useFeaturedImage:l,minHeight:c,minHeightUnit:u}=e,{hasInnerBlocks:d,url:p}=n,[m,g]=(0,st.useState)(c),[h,x]=(0,st.useState)(u),_="vh"===u&&100===c&&!e?.style?.dimensions?.aspectRatio;return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)(nt.BlockControls,{group:"block",children:[(0,Je.jsx)(nt.__experimentalBlockAlignmentMatrixControl,{label:(0,ot.__)("Change content position"),value:i,onChange:e=>t({contentPosition:e}),isDisabled:!d}),(0,Je.jsx)(nt.__experimentalBlockFullHeightAligmentControl,{isActive:_,onToggle:()=>_?t("vh"===h&&100===m?{minHeight:void 0,minHeightUnit:void 0}:{minHeight:m,minHeightUnit:h}):(g(c),x(u),t({minHeight:100,minHeightUnit:"vh",style:Pi({...e?.style,dimensions:{...e?.style?.dimensions,aspectRatio:void 0}})})),isDisabled:!d})]}),(0,Je.jsx)(nt.BlockControls,{group:"other",children:(0,Je.jsx)(nt.MediaReplaceFlow,{mediaId:s,mediaURL:p,allowedTypes:Qr,accept:"image/*,video/*",onSelect:o,onToggleFeaturedImage:a,useFeaturedImage:l,name:p?(0,ot.__)("Replace"):(0,ot.__)("Add media"),onReset:r})})]})}function Mi({disableMediaButtons:e=!1,children:t,onSelectMedia:o,onError:n,style:a,toggleUseFeaturedImage:r}){return(0,Je.jsx)(nt.MediaPlaceholder,{icon:(0,Je.jsx)(nt.BlockIcon,{icon:Gr}),labels:{title:(0,ot.__)("Cover")},onSelect:o,accept:"image/*,video/*",allowedTypes:Qr,disableMediaButtons:e,onToggleFeaturedImage:r,onError:n,style:a,children:t})}const Di={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},{ResizableBoxPopover:zi}=Ot(nt.privateApis);function Ai({className:e,height:t,minHeight:o,onResize:n,onResizeStart:a,onResizeStop:r,showHandle:i,size:s,width:l,...c}){const[u,d]=(0,st.useState)(!1),p={className:ft(e,{"is-resizing":u}),enable:Di,onResizeStart:(e,t,o)=>{a(o.clientHeight),n(o.clientHeight)},onResize:(e,t,o)=>{n(o.clientHeight),u||d(!0)},onResizeStop:(e,t,o)=>{r(o.clientHeight),d(!1)},showHandle:i,size:s,__experimentalShowTooltip:!0,__experimentalTooltipProps:{axis:"y",position:"bottom",isVisible:u}};return(0,Je.jsx)(zi,{className:"block-library-cover__resizable-box-popover",resizableBoxProps:p,...c})}var Ri={grad:.9,turn:360,rad:360/(2*Math.PI)},Hi=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Li=function(e,t,o){return void 0===t&&(t=0),void 0===o&&(o=Math.pow(10,t)),Math.round(o*e)/o+0},Vi=function(e,t,o){return void 0===t&&(t=0),void 0===o&&(o=1),e>o?o:e>t?e:t},Fi=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Ei=function(e){return{r:Vi(e.r,0,255),g:Vi(e.g,0,255),b:Vi(e.b,0,255),a:Vi(e.a)}},Oi=function(e){return{r:Li(e.r),g:Li(e.g),b:Li(e.b),a:Li(e.a,3)}},$i=/^#([0-9a-f]{3,8})$/i,Gi=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Ui=function(e){var t=e.r,o=e.g,n=e.b,a=e.a,r=Math.max(t,o,n),i=r-Math.min(t,o,n),s=i?r===t?(o-n)/i:r===o?2+(n-t)/i:4+(t-o)/i:0;return{h:60*(s<0?s+6:s),s:r?i/r*100:0,v:r/255*100,a}},qi=function(e){var t=e.h,o=e.s,n=e.v,a=e.a;t=t/360*6,o/=100,n/=100;var r=Math.floor(t),i=n*(1-o),s=n*(1-(t-r)*o),l=n*(1-(1-t+r)*o),c=r%6;return{r:255*[n,s,i,i,l,n][c],g:255*[l,n,n,s,i,i][c],b:255*[i,i,l,n,n,s][c],a}},Wi=function(e){return{h:Fi(e.h),s:Vi(e.s,0,100),l:Vi(e.l,0,100),a:Vi(e.a)}},Zi=function(e){return{h:Li(e.h),s:Li(e.s),l:Li(e.l),a:Li(e.a,3)}},Qi=function(e){return qi((o=(t=e).s,{h:t.h,s:(o*=((n=t.l)<50?n:100-n)/100)>0?2*o/(n+o)*100:0,v:n+o,a:t.a}));var t,o,n},Ki=function(e){return{h:(t=Ui(e)).h,s:(a=(200-(o=t.s))*(n=t.v)/100)>0&&a<200?o*n/100/(a<=100?a:200-a)*100:0,l:a/2,a:t.a};var t,o,n,a},Yi=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ji=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xi=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,es=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ts={string:[[function(e){var t=$i.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Li(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Li(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Xi.exec(e)||es.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Ei({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Yi.exec(e)||Ji.exec(e);if(!t)return null;var o,n,a=Wi({h:(o=t[1],n=t[2],void 0===n&&(n="deg"),Number(o)*(Ri[n]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Qi(a)},"hsl"]],object:[[function(e){var t=e.r,o=e.g,n=e.b,a=e.a,r=void 0===a?1:a;return Hi(t)&&Hi(o)&&Hi(n)?Ei({r:Number(t),g:Number(o),b:Number(n),a:Number(r)}):null},"rgb"],[function(e){var t=e.h,o=e.s,n=e.l,a=e.a,r=void 0===a?1:a;if(!Hi(t)||!Hi(o)||!Hi(n))return null;var i=Wi({h:Number(t),s:Number(o),l:Number(n),a:Number(r)});return Qi(i)},"hsl"],[function(e){var t=e.h,o=e.s,n=e.v,a=e.a,r=void 0===a?1:a;if(!Hi(t)||!Hi(o)||!Hi(n))return null;var i=function(e){return{h:Fi(e.h),s:Vi(e.s,0,100),v:Vi(e.v,0,100),a:Vi(e.a)}}({h:Number(t),s:Number(o),v:Number(n),a:Number(r)});return qi(i)},"hsv"]]},os=function(e,t){for(var o=0;o<t.length;o++){var n=t[o][0](e);if(n)return[n,t[o][1]]}return[null,void 0]},ns=function(e){return"string"==typeof e?os(e.trim(),ts.string):"object"==typeof e&&null!==e?os(e,ts.object):[null,void 0]},as=function(e,t){var o=Ki(e);return{h:o.h,s:Vi(o.s+100*t,0,100),l:o.l,a:o.a}},rs=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},is=function(e,t){var o=Ki(e);return{h:o.h,s:o.s,l:Vi(o.l+100*t,0,100),a:o.a}},ss=function(){function e(e){this.parsed=ns(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Li(rs(this.rgba),2)},e.prototype.isDark=function(){return rs(this.rgba)<.5},e.prototype.isLight=function(){return rs(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Oi(this.rgba)).r,o=e.g,n=e.b,r=(a=e.a)<1?Gi(Li(255*a)):"","#"+Gi(t)+Gi(o)+Gi(n)+r;var e,t,o,n,a,r},e.prototype.toRgb=function(){return Oi(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Oi(this.rgba)).r,o=e.g,n=e.b,(a=e.a)<1?"rgba("+t+", "+o+", "+n+", "+a+")":"rgb("+t+", "+o+", "+n+")";var e,t,o,n,a},e.prototype.toHsl=function(){return Zi(Ki(this.rgba))},e.prototype.toHslString=function(){return t=(e=Zi(Ki(this.rgba))).h,o=e.s,n=e.l,(a=e.a)<1?"hsla("+t+", "+o+"%, "+n+"%, "+a+")":"hsl("+t+", "+o+"%, "+n+"%)";var e,t,o,n,a},e.prototype.toHsv=function(){return e=Ui(this.rgba),{h:Li(e.h),s:Li(e.s),v:Li(e.v),a:Li(e.a,3)};var e},e.prototype.invert=function(){return ls({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),ls(as(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),ls(as(this.rgba,-e))},e.prototype.grayscale=function(){return ls(as(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),ls(is(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),ls(is(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?ls({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Li(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Ki(this.rgba);return"number"==typeof e?ls({h:e,s:t.s,l:t.l,a:t.a}):Li(t.h)},e.prototype.isEqual=function(e){return this.toHex()===ls(e).toHex()},e}(),ls=function(e){return e instanceof ss?e:new ss(e)},cs=[];
/*! Fast Average Color | © 2022 Denis Seleznev | MIT License | https://github.com/fast-average-color/fast-average-color */
function us(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function ds(e){return"#"+e.map(us).join("")}function ps(e){return e?(t=e,Array.isArray(t[0])?e:[e]):[];var t}function ms(e,t,o){for(var n=0;n<o.length;n++)if(gs(e,t,o[n]))return!0;return!1}function gs(e,t,o){switch(o.length){case 3:if(function(e,t,o){if(255!==e[t+3])return!0;if(e[t]===o[0]&&e[t+1]===o[1]&&e[t+2]===o[2])return!0;return!1}(e,t,o))return!0;break;case 4:if(function(e,t,o){if(e[t+3]&&o[3])return e[t]===o[0]&&e[t+1]===o[1]&&e[t+2]===o[2]&&e[t+3]===o[3];return e[t+3]===o[3]}(e,t,o))return!0;break;case 5:if(function(e,t,o){var n=o[0],a=o[1],r=o[2],i=o[3],s=o[4],l=e[t+3],c=hs(l,i,s);if(!i)return c;if(!l&&c)return!0;if(hs(e[t],n,s)&&hs(e[t+1],a,s)&&hs(e[t+2],r,s)&&c)return!0;return!1}(e,t,o))return!0;break;default:return!1}}function hs(e,t,o){return e>=t-o&&e<=t+o}function xs(e,t,o){for(var n={},a=o.ignoredColor,r=o.step,i=[0,0,0,0,0],s=0;s<t;s+=r){var l=e[s],c=e[s+1],u=e[s+2],d=e[s+3];if(!a||!ms(e,s,a)){var p=Math.round(l/24)+","+Math.round(c/24)+","+Math.round(u/24);n[p]?n[p]=[n[p][0]+l*d,n[p][1]+c*d,n[p][2]+u*d,n[p][3]+d,n[p][4]+1]:n[p]=[l*d,c*d,u*d,d,1],i[4]<n[p][4]&&(i=n[p])}}var m=i[0],g=i[1],h=i[2],x=i[3],_=i[4];return x?[Math.round(m/x),Math.round(g/x),Math.round(h/x),Math.round(x/_)]:o.defaultColor}function _s(e,t,o){for(var n=0,a=0,r=0,i=0,s=0,l=o.ignoredColor,c=o.step,u=0;u<t;u+=c){var d=e[u+3],p=e[u]*d,m=e[u+1]*d,g=e[u+2]*d;l&&ms(e,u,l)||(n+=p,a+=m,r+=g,i+=d,s++)}return i?[Math.round(n/i),Math.round(a/i),Math.round(r/i),Math.round(i/s)]:o.defaultColor}function bs(e,t,o){for(var n=0,a=0,r=0,i=0,s=0,l=o.ignoredColor,c=o.step,u=0;u<t;u+=c){var d=e[u],p=e[u+1],m=e[u+2],g=e[u+3];l&&ms(e,u,l)||(n+=d*d*g,a+=p*p*g,r+=m*m*g,i+=g,s++)}return i?[Math.round(Math.sqrt(n/i)),Math.round(Math.sqrt(a/i)),Math.round(Math.sqrt(r/i)),Math.round(i/s)]:o.defaultColor}function ys(e){return fs(e,"defaultColor",[0,0,0,0])}function fs(e,t,o){return void 0===e[t]?o:e[t]}function vs(e){if(ws(e)){var t=e.naturalWidth,o=e.naturalHeight;return e.naturalWidth||-1===e.src.search(/\.svg(\?|$)/i)||(t=o=100),{width:t,height:o}}return function(e){return"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement}(e)?{width:e.videoWidth,height:e.videoHeight}:{width:e.width,height:e.height}}function ks(e){return function(e){return"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement}(e)?"canvas":function(e){return Cs&&e instanceof OffscreenCanvas}(e)?"offscreencanvas":function(e){return"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap}(e)?"imagebitmap":e.src}function ws(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement}var Cs="undefined"!=typeof OffscreenCanvas;var js="undefined"==typeof window;function Ss(e){return Error("FastAverageColor: "+e)}function Bs(e,t){t||console.error(e)}var Ts=function(){function e(){this.canvas=null,this.ctx=null}return e.prototype.getColorAsync=function(e,t){if(!e)return Promise.reject(Ss("call .getColorAsync() without resource."));if("string"==typeof e){if("undefined"==typeof Image)return Promise.reject(Ss("resource as string is not supported in this environment"));var o=new Image;return o.crossOrigin=t&&t.crossOrigin||"",o.src=e,this.bindImageEvents(o,t)}if(ws(e)&&!e.complete)return this.bindImageEvents(e,t);var n=this.getColor(e,t);return n.error?Promise.reject(n.error):Promise.resolve(n)},e.prototype.getColor=function(e,t){var o=ys(t=t||{});if(!e)return Bs(r=Ss("call .getColor(null) without resource"),t.silent),this.prepareResult(o,r);var n=function(e,t){var o,n=fs(t,"left",0),a=fs(t,"top",0),r=fs(t,"width",e.width),i=fs(t,"height",e.height),s=r,l=i;return"precision"===t.mode||(r>i?(o=r/i,s=100,l=Math.round(s/o)):(o=i/r,l=100,s=Math.round(l/o)),(s>r||l>i||s<10||l<10)&&(s=r,l=i)),{srcLeft:n,srcTop:a,srcWidth:r,srcHeight:i,destWidth:s,destHeight:l}}(vs(e),t);if(!(n.srcWidth&&n.srcHeight&&n.destWidth&&n.destHeight))return Bs(r=Ss('incorrect sizes for resource "'.concat(ks(e),'"')),t.silent),this.prepareResult(o,r);if(!this.canvas&&(this.canvas=js?Cs?new OffscreenCanvas(1,1):null:document.createElement("canvas"),!this.canvas))return Bs(r=Ss("OffscreenCanvas is not supported in this browser"),t.silent),this.prepareResult(o,r);if(!this.ctx){if(this.ctx=this.canvas.getContext("2d",{willReadFrequently:!0}),!this.ctx)return Bs(r=Ss("Canvas Context 2D is not supported in this browser"),t.silent),this.prepareResult(o);this.ctx.imageSmoothingEnabled=!1}this.canvas.width=n.destWidth,this.canvas.height=n.destHeight;try{this.ctx.clearRect(0,0,n.destWidth,n.destHeight),this.ctx.drawImage(e,n.srcLeft,n.srcTop,n.srcWidth,n.srcHeight,0,0,n.destWidth,n.destHeight);var a=this.ctx.getImageData(0,0,n.destWidth,n.destHeight).data;return this.prepareResult(this.getColorFromArray4(a,t))}catch(n){var r;return Bs(r=Ss("security error (CORS) for resource ".concat(ks(e),".\nDetails: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image")),t.silent),!t.silent&&console.error(n),this.prepareResult(o,r)}},e.prototype.getColorFromArray4=function(e,t){t=t||{};var o=e.length,n=ys(t);if(o<4)return n;var a,r=o-o%4,i=4*(t.step||1);switch(t.algorithm||"sqrt"){case"simple":a=_s;break;case"sqrt":a=bs;break;case"dominant":a=xs;break;default:throw Ss("".concat(t.algorithm," is unknown algorithm"))}return a(e,r,{defaultColor:n,ignoredColor:ps(t.ignoredColor),step:i})},e.prototype.prepareResult=function(e,t){var o,n=e.slice(0,3),a=[e[0],e[1],e[2],e[3]/255],r=(299*(o=e)[0]+587*o[1]+114*o[2])/1e3<128;return{value:[e[0],e[1],e[2],e[3]],rgb:"rgb("+n.join(",")+")",rgba:"rgba("+a.join(",")+")",hex:ds(n),hexa:ds(e),isDark:r,isLight:!r,error:t}},e.prototype.destroy=function(){this.canvas&&(this.canvas.width=1,this.canvas.height=1,this.canvas=null),this.ctx=null},e.prototype.bindImageEvents=function(e,t){var o=this;return new Promise((function(n,a){var r=function(){l();var r=o.getColor(e,t);r.error?a(r.error):n(r)},i=function(){l(),a(Ss('Error loading image "'.concat(e.src,'".')))},s=function(){l(),a(Ss('Image "'.concat(e.src,'" loading aborted')))},l=function(){e.removeEventListener("load",r),e.removeEventListener("error",i),e.removeEventListener("abort",s)};e.addEventListener("load",r),e.addEventListener("error",i),e.addEventListener("abort",s)}))},e}();const Ns=window.wp.hooks;!function(e){e.forEach((function(e){cs.indexOf(e)<0&&(e(ss,ts),cs.push(e))}))}([function(e,t){var o={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var a in o)n[o[a]]=a;var r={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,i,s=n[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,u="black";if(!r.length)for(var d in o)r[d]=new e(o[d]).toRgb();for(var p in o){var m=(a=l,i=r[p],Math.pow(a.r-i.r,2)+Math.pow(a.g-i.g,2)+Math.pow(a.b-i.b,2));m<c&&(c=m,u=p)}return u}},t.string.push([function(t){var n=t.toLowerCase(),a="transparent"===n?"#0000":o[n];return a?new e(a).toRgb():null},"name"])}]);const Ps="#FFF";function Is(){return Is.fastAverageColor||(Is.fastAverageColor=new Ts),Is.fastAverageColor}const Ms=Ht((async e=>{if(!e)return Ps;const{r:t,g:o,b:n,a}=ls(Ps).toRgb();try{const r=(0,Ns.applyFilters)("media.crossOrigin",void 0,e);return(await Is().getColorAsync(e,{defaultColor:[t,o,n,255*a],silent:!0,crossOrigin:r})).hex}catch(e){return Ps}}));function Ds(e,t,o){if(t===o||100===e)return ls(t).isDark();const n=ls(t).alpha(e/100).toRgb(),a=ls(o).toRgb(),r=(s=a,{r:(i=n).r*i.a+s.r*s.a*(1-i.a),g:i.g*i.a+s.g*s.a*(1-i.a),b:i.b*i.a+s.b*s.a*(1-i.a),a:i.a+s.a*(1-i.a)});var i,s;return ls(r).isDark()}const zs=(0,ut.compose)([(0,nt.withColors)({overlayColor:"background-color"})])((function({attributes:e,clientId:t,isSelected:o,overlayColor:n,setAttributes:a,setOverlayColor:r,toggleSelection:i,context:{postId:s,postType:l}}){var c;const{contentPosition:u,id:d,url:p,backgroundType:m,useFeaturedImage:g,dimRatio:h,focalPoint:x,hasParallax:_,isDark:b,isRepeated:y,minHeight:f,minHeightUnit:v,alt:k,allowedBlocks:w,templateLock:C,tagName:j="div",isUserOverlayColor:S,sizeSlug:B}=e,[T]=(0,ct.useEntityProp)("postType",l,"featured_media",s),{getSettings:N}=(0,it.useSelect)(nt.store),{__unstableMarkNextChangeAsNotPersistent:P}=(0,it.useDispatch)(nt.store),{media:I}=(0,it.useSelect)((e=>({media:T&&g?e(ct.store).getMedia(T,{context:"view"}):void 0})),[T,g]),M=null!==(c=I?.media_details?.sizes?.[B]?.source_url)&&void 0!==c?c:I?.source_url;(0,st.useEffect)((()=>{(async()=>{if(!g)return;const e=await Ms(M);let t=n.color;S||(t=e,P(),r(t));const o=Ds(h,t,e);P(),a({isDark:o,isUserOverlayColor:S||!1})})()}),[M]);const D=g?M:p?.replaceAll("&amp;","&"),z=g?qr:m,{createErrorNotice:A}=(0,it.useDispatch)(Rt.store),{gradientClass:R,gradientValue:H}=(0,nt.__experimentalUseGradient)(),L=async e=>{const t=function(e){if(!e||!e.url&&!e.src)return{url:void 0,id:void 0};let t;if((0,lt.isBlobURL)(e.url)&&(e.type=(0,lt.getBlobTypeByURL)(e.url)),e.media_type)t=e.media_type===qr?qr:Wr;else{if(!e.type||e.type!==qr&&e.type!==Wr)return;t=e.type}return{url:e.url||e.src,id:e.id,alt:e?.alt,backgroundType:t,...t===Wr?{hasParallax:void 0}:{}}}(e),o=[e?.type,e?.media_type].includes(qr),i=await Ms(o?e?.url:void 0);let s=n.color;S||(s=i,r(s),P());const l=void 0===p&&100===h?50:h,c=Ds(l,s,i);if(z===qr&&t?.id){const{imageDefaultSize:o}=N();B&&(e?.sizes?.[B]||e?.media_details?.sizes?.[B])?(t.sizeSlug=B,t.url=e?.sizes?.[B]?.url||e?.media_details?.sizes?.[B]?.source_url):e?.sizes?.[o]||e?.media_details?.sizes?.[o]?(t.sizeSlug=o,t.url=e?.sizes?.[o]?.url||e?.media_details?.sizes?.[o]?.source_url):t.sizeSlug=ji}a({...t,focalPoint:void 0,useFeaturedImage:void 0,dimRatio:l,isDark:c,isUserOverlayColor:S||!1})},V=()=>{let e=n.color;S||(e="#000",r(void 0),P());const t=Ds(h,e,Ps);a({url:void 0,id:void 0,backgroundType:void 0,focalPoint:void 0,hasParallax:void 0,isRepeated:void 0,useFeaturedImage:void 0,isDark:t})},F=async e=>{const t=await Ms(D),o=Ds(h,e,t);r(e),P(),a({isUserOverlayColor:!0,isDark:o})},E=e=>{A(e,{type:"snackbar"})},O=((e,t)=>!e&&(0,lt.isBlobURL)(t))(d,D),$=qr===z,G=Wr===z,U="default"===(0,nt.useBlockEditingMode)(),[q,{height:W,width:Z}]=(0,ut.useResizeObserver)(),Q=(0,st.useMemo)((()=>({height:"px"===v?f:"auto",width:"auto"})),[f,v]),K=f&&v?`${f}${v}`:f,Y=!(_||y),J={minHeight:K||void 0},X=D?`url(${D})`:void 0,ee=Kr(x),te={backgroundColor:n.color},oe={objectPosition:x&&Y?Kr(x):void 0},ne=!!(D||n.color||H),ae=(0,it.useSelect)((e=>e(nt.store).getBlock(t).innerBlocks.length>0),[t]),re=(0,st.useRef)(),ie=(0,nt.useBlockProps)({ref:re}),[se]=(0,nt.useSettings)("typography.fontSizes"),le=function(e){return[["core/paragraph",{align:"center",placeholder:(0,ot.__)("Write title…"),...e}]]}({fontSize:se?.length>0?"large":void 0}),ce=(0,nt.useInnerBlocksProps)({className:"wp-block-cover__inner-container"},{template:ae?void 0:le,templateInsertUpdatesSelection:!0,allowedBlocks:w,templateLock:C,dropZoneElement:re.current}),ue=(0,st.useRef)(),de={isVideoBackground:G,isImageBackground:$,mediaElement:ue,hasInnerBlocks:ae,url:D,isImgElement:Y,overlayColor:n},pe=async()=>{const e=!g,t=e?await Ms(M):Ps,o=S?n.color:t;S||(r(e?o:void 0),P());const i=100===h?50:h,s=Ds(i,o,t);a({id:void 0,url:void 0,useFeaturedImage:e,dimRatio:i,backgroundType:g?qr:void 0,isDark:s})},me=(0,Je.jsx)(Ii,{attributes:e,setAttributes:a,onSelectMedia:L,currentSettings:de,toggleUseFeaturedImage:pe,onClearMedia:V}),ge=(0,Je.jsx)(Ni,{attributes:e,setAttributes:a,clientId:t,setOverlayColor:F,coverRef:re,currentSettings:de,toggleUseFeaturedImage:pe,updateDimRatio:async e=>{const t=await Ms(D),o=Ds(e,n.color,t);a({dimRatio:e,isDark:o})},onClearMedia:V,featuredImage:I}),he={className:"block-library-cover__resize-container",clientId:t,height:W,minHeight:K,onResizeStart:()=>{a({minHeightUnit:"px"}),i(!1)},onResize:e=>{a({minHeight:e})},onResizeStop:e=>{i(!0),a({minHeight:e})},showHandle:!e.style?.dimensions?.aspectRatio,size:Q,width:Z};if(!g&&!ae&&!ne)return(0,Je.jsxs)(Je.Fragment,{children:[me,ge,U&&o&&(0,Je.jsx)(Ai,{...he}),(0,Je.jsxs)(j,{...ie,className:ft("is-placeholder",ie.className),style:{...ie.style,minHeight:K||void 0},children:[q,(0,Je.jsx)(Mi,{onSelectMedia:L,onError:E,toggleUseFeaturedImage:pe,children:(0,Je.jsx)("div",{className:"wp-block-cover__placeholder-background-options",children:(0,Je.jsx)(nt.ColorPalette,{disableCustomColors:!0,value:n.color,onChange:F,clearable:!1,asButtons:!0,"aria-label":(0,ot.__)("Overlay color")})})})]})]});const xe=ft({"is-dark-theme":b,"is-light":!b,"is-transient":O,"has-parallax":_,"is-repeated":y,"has-custom-content-position":!Jr(u)},Xr(u)),_e=D||!g||g&&!D;return(0,Je.jsxs)(Je.Fragment,{children:[me,ge,(0,Je.jsxs)(j,{...ie,className:ft(xe,ie.className),style:{...J,...ie.style},"data-url":D,children:[q,!D&&g&&(0,Je.jsx)(tt.Placeholder,{className:"wp-block-cover__image--placeholder-image",withIllustration:!0}),D&&$&&(Y?(0,Je.jsx)("img",{ref:ue,className:"wp-block-cover__image-background",alt:k,src:D,style:oe}):(0,Je.jsx)("div",{ref:ue,role:k?"img":void 0,"aria-label":k||void 0,className:ft(xe,"wp-block-cover__image-background"),style:{backgroundImage:X,backgroundPosition:ee}})),D&&G&&(0,Je.jsx)("video",{ref:ue,className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:D,style:oe}),_e&&(0,Je.jsx)("span",{"aria-hidden":"true",className:ft("wp-block-cover__background",Yr(h),{[n.class]:n.class,"has-background-dim":void 0!==h,"wp-block-cover__gradient-background":D&&H&&0!==h,"has-background-gradient":H,[R]:R}),style:{backgroundImage:H,...te}}),O&&(0,Je.jsx)(tt.Spinner,{}),(0,Je.jsx)(Mi,{disableMediaButtons:!0,onSelectMedia:L,onError:E,toggleUseFeaturedImage:pe}),(0,Je.jsx)("div",{...ce})]}),U&&o&&(0,Je.jsx)(Ai,{...he})]})}));const{cleanEmptyObject:As}=Ot(nt.privateApis),Rs={from:[{type:"block",blocks:["core/image"],transform:({caption:e,url:t,alt:o,align:n,id:a,anchor:r,style:i})=>(0,Ke.createBlock)("core/cover",{dimRatio:50,url:t,alt:o,align:n,id:a,anchor:r,style:{color:{duotone:i?.color?.duotone}}},[(0,Ke.createBlock)("core/paragraph",{content:e,fontSize:"large",align:"center"})])},{type:"block",blocks:["core/video"],transform:({caption:e,src:t,align:o,id:n,anchor:a})=>(0,Ke.createBlock)("core/cover",{dimRatio:50,url:t,align:o,id:n,backgroundType:Wr,anchor:a},[(0,Ke.createBlock)("core/paragraph",{content:e,fontSize:"large",align:"center"})])},{type:"block",blocks:["core/group"],transform:(e,t)=>{const{align:o,anchor:n,backgroundColor:a,gradient:r,style:i}=e;if(1===t?.length&&"core/cover"===t[0]?.name)return(0,Ke.createBlock)("core/cover",t[0].attributes,t[0].innerBlocks);const s={align:o,anchor:n,dimRatio:a||r||i?.color?.background||i?.color?.gradient?void 0:50,overlayColor:a,customOverlayColor:i?.color?.background,gradient:r,customGradient:i?.color?.gradient},l={...e,backgroundColor:void 0,gradient:void 0,style:As({...e?.style,color:i?.color?{...i?.color,background:void 0,gradient:void 0}:void 0})};return(0,Ke.createBlock)("core/cover",s,[(0,Ke.createBlock)("core/group",l,t)])}}],to:[{type:"block",blocks:["core/image"],isMatch:({backgroundType:e,url:t,overlayColor:o,customOverlayColor:n,gradient:a,customGradient:r})=>t?e===qr:!(o||n||a||r),transform:({title:e,url:t,alt:o,align:n,id:a,anchor:r,style:i})=>(0,Ke.createBlock)("core/image",{caption:e,url:t,alt:o,align:n,id:a,anchor:r,style:{color:{duotone:i?.color?.duotone}}})},{type:"block",blocks:["core/video"],isMatch:({backgroundType:e,url:t,overlayColor:o,customOverlayColor:n,gradient:a,customGradient:r})=>t?e===Wr:!(o||n||a||r),transform:({title:e,url:t,align:o,id:n,anchor:a})=>(0,Ke.createBlock)("core/video",{caption:e,src:t,id:n,align:o,anchor:a})},{type:"block",blocks:["core/group"],isMatch:({url:e,useFeaturedImage:t})=>!e&&!t,transform:(e,t)=>{const o={backgroundColor:e?.overlayColor,gradient:e?.gradient,style:As({...e?.style,color:e?.customOverlayColor||e?.customGradient||e?.style?.color?{background:e?.customOverlayColor,gradient:e?.customGradient,...e?.style?.color}:void 0})};if(1===t?.length&&"core/group"===t[0]?.name){const e=As(t[0].attributes||{});return e?.backgroundColor||e?.gradient||e?.style?.color?.background||e?.style?.color?.gradient?(0,Ke.createBlock)("core/group",e,t[0]?.innerBlocks):(0,Ke.createBlock)("core/group",{...o,...e,style:As({...e?.style,color:o?.style?.color||e?.style?.color?{...o?.style?.color,...e?.style?.color}:void 0})},t[0]?.innerBlocks)}return(0,Ke.createBlock)("core/group",{...e,...o},t)}}]},Hs=Rs,Ls=[{name:"cover",title:(0,ot.__)("Cover"),description:(0,ot.__)("Add an image or video with a text overlay."),attributes:{layout:{type:"constrained"}},isDefault:!0,icon:Gr}],Vs={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/cover",title:"Cover",category:"media",description:"Add an image or video with a text overlay.",textdomain:"default",attributes:{url:{type:"string"},useFeaturedImage:{type:"boolean",default:!1},id:{type:"number"},alt:{type:"string",default:""},hasParallax:{type:"boolean",default:!1},isRepeated:{type:"boolean",default:!1},dimRatio:{type:"number",default:100},overlayColor:{type:"string"},customOverlayColor:{type:"string"},isUserOverlayColor:{type:"boolean"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},isDark:{type:"boolean",default:!0},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]},tagName:{type:"string",default:"div"},sizeSlug:{type:"string"}},usesContext:["postId","postType"],supports:{anchor:!0,align:!0,html:!1,shadow:!0,spacing:{padding:!0,margin:["top","bottom"],blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",heading:!0,text:!0,background:!1,__experimentalSkipSerialization:["gradients"],enableContrastChecker:!1},dimensions:{aspectRatio:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowJustification:!1},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-cover-editor",style:"wp-block-cover"},{name:Fs}=Vs,Es={icon:Gr,example:{attributes:{customOverlayColor:"#065174",dimRatio:40,url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg",style:{typography:{fontSize:48},color:{text:"white"}}},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,ot.__)("<strong>Snow Patrol</strong>"),align:"center"}}]},transforms:Hs,save:function({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:a,customOverlayColor:r,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:x,minHeightUnit:_,tagName:b,sizeSlug:y}=e,f=(0,nt.getColorClassName)("background-color",p),v=(0,nt.__experimentalGetGradientClass)(o),k=qr===t,w=Wr===t,C=!(c||d),j={minHeight:(x&&_?`${x}${_}`:x)||void 0},S={backgroundColor:f?void 0:r,background:a||void 0},B=s&&C?Kr(s):void 0,T=m?`url(${m})`:void 0,N=Kr(s),P=ft({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Jr(n)},Xr(n)),I=ft("wp-block-cover__image-background",h?`wp-image-${h}`:null,{[`size-${y}`]:y,"has-parallax":c,"is-repeated":d}),M=o||a;return(0,Je.jsxs)(b,{...nt.useBlockProps.save({className:P,style:j}),children:[!l&&k&&m&&(C?(0,Je.jsx)("img",{className:I,alt:g,src:m,style:{objectPosition:B},"data-object-fit":"cover","data-object-position":B}):(0,Je.jsx)("div",{role:g?"img":void 0,"aria-label":g||void 0,className:I,style:{backgroundPosition:N,backgroundImage:T}})),w&&m&&(0,Je.jsx)("video",{className:ft("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:{objectPosition:B},"data-object-fit":"cover","data-object-position":B}),(0,Je.jsx)("span",{"aria-hidden":"true",className:ft("wp-block-cover__background",f,Yr(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&M&&0!==i,"has-background-gradient":M,[v]:v}),style:S}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},edit:zs,deprecated:Ci,variations:Ls},Os=()=>et({name:Fs,metadata:Vs,settings:Es}),$s=(0,Je.jsxs)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,Je.jsx)(Ye.Path,{d:"M4 16h10v1.5H4V16Zm0-4.5h16V13H4v-1.5ZM10 7h10v1.5H10V7Z",fillRule:"evenodd",clipRule:"evenodd"}),(0,Je.jsx)(Ye.Path,{d:"m4 5.25 4 2.5-4 2.5v-5Z"})]}),{withIgnoreIMEEvents:Gs}=Ot(tt.privateApis),Us=[["core/paragraph",{placeholder:(0,ot.__)("Type / to add a hidden block")}]];const qs=function({attributes:e,setAttributes:t,clientId:o}){const{name:n,showContent:a,summary:r,allowedBlocks:i,placeholder:s}=e,l=(0,nt.useBlockProps)(),c=(0,nt.useInnerBlocksProps)(l,{template:Us,__experimentalCaptureToolbars:!0,allowedBlocks:i}),[u,d]=(0,st.useState)(a),p=mt(),m=(0,it.useSelect)((e=>e(nt.store).hasSelectedInnerBlock(o,!0)),[o]);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsx)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{t({showContent:!1})},dropdownMenuProps:p,children:(0,Je.jsx)(tt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,ot.__)("Open by default"),hasValue:()=>a,onDeselect:()=>{t({showContent:!1})},children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Open by default"),checked:a,onChange:()=>t({showContent:!a})})})})}),(0,Je.jsx)(nt.InspectorControls,{group:"advanced",children:(0,Je.jsx)(tt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Name attribute"),value:n||"",onChange:e=>t({name:e}),help:(0,ot.__)("Enables multiple Details blocks with the same name attribute to be connected, with only one open at a time.")})}),(0,Je.jsxs)("details",{...c,open:u||m,onToggle:e=>d(e.target.open),children:[(0,Je.jsx)("summary",{onKeyDown:Gs((e=>{"Enter"!==e.key||e.shiftKey||(d((e=>!e)),e.preventDefault())})),onKeyUp:e=>{" "===e.key&&e.preventDefault()},children:(0,Je.jsx)(nt.RichText,{identifier:"summary","aria-label":(0,ot.__)("Write summary. Press Enter to expand or collapse the details."),placeholder:s||(0,ot.__)("Write summary…"),withoutInteractiveFormatting:!0,value:r,onChange:e=>t({summary:e})})}),c.children]})]})};const Ws={from:[{type:"block",isMultiBlock:!0,blocks:["*"],isMatch:({},e)=>!(1===e.length&&"core/details"===e[0].name),__experimentalConvert:e=>(0,Ke.createBlock)("core/details",{},e.map((e=>(0,Ke.cloneBlock)(e))))}]},Zs={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/details",title:"Details",category:"text",description:"Hide and show additional content.",keywords:["accordion","summary","toggle","disclosure"],textdomain:"default",attributes:{showContent:{type:"boolean",default:!1},summary:{type:"rich-text",source:"rich-text",selector:"summary"},name:{type:"string",source:"attribute",attribute:"name",selector:".wp-block-details"},allowedBlocks:{type:"array"},placeholder:{type:"string"}},supports:{__experimentalOnEnter:!0,align:["wide","full"],anchor:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__experimentalBorder:{color:!0,width:!0,style:!0},html:!1,spacing:{margin:!0,padding:!0,blockGap:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowEditing:!1},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-details-editor",style:"wp-block-details"},{name:Qs}=Zs,Ks={icon:$s,example:{attributes:{summary:"La Mancha",showContent:!0},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,ot.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}}]},__experimentalLabel(e,{context:t}){const{summary:o}=e,n=e?.metadata?.name,a=o?.trim().length>0;return"list-view"===t&&(n||a)?n||o:"accessibility"===t?a?(0,ot.sprintf)((0,ot.__)("Details. %s"),o):(0,ot.__)("Details. Empty."):void 0},save:function({attributes:e}){const{name:t,showContent:o}=e,n=e.summary?e.summary:"Details",a=nt.useBlockProps.save();return(0,Je.jsxs)("details",{...a,name:t||void 0,open:o,children:[(0,Je.jsx)("summary",{children:(0,Je.jsx)(nt.RichText.Content,{value:n})}),(0,Je.jsx)(nt.InnerBlocks.Content,{})]})},edit:qs,transforms:Ws},Ys=()=>et({name:Qs,metadata:Zs,settings:Ks}),Js=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});function Xs(e){return e?(0,ot.__)("This embed will preserve its aspect ratio when the browser is resized."):(0,ot.__)("This embed may not preserve its aspect ratio when the browser is resized.")}const el=({blockSupportsResponsive:e,showEditButton:t,themeSupportsResponsive:o,allowResponsive:n,toggleResponsive:a,switchBackToURLInput:r})=>(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsx)(tt.ToolbarGroup,{children:t&&(0,Je.jsx)(tt.ToolbarButton,{className:"components-toolbar__control",label:(0,ot.__)("Edit URL"),icon:Js,onClick:r})})}),o&&e&&(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsx)(tt.PanelBody,{title:(0,ot.__)("Media settings"),className:"blocks-responsive",children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Resize for smaller devices"),checked:n,help:Xs,onChange:a})})})]}),tl=(0,Je.jsx)(tt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(tt.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z"})}),ol=(0,Je.jsx)(tt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(tt.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z"})}),nl=(0,Je.jsx)(tt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(tt.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})}),al=(0,Je.jsx)(tt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(tt.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z"})}),rl={foreground:"#1da1f2",src:(0,Je.jsx)(tt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(tt.G,{children:(0,Je.jsx)(tt.Path,{d:"M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z"})})})},il={foreground:"#ff0000",src:(0,Je.jsx)(tt.SVG,{viewBox:"0 0 24 24",children:(0,Je.jsx)(tt.Path,{d:"M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z"})})},sl={foreground:"#3b5998",src:(0,Je.jsx)(tt.SVG,{viewBox:"0 0 24 24",children:(0,Je.jsx)(tt.Path,{d:"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z"})})},ll=(0,Je.jsx)(tt.SVG,{viewBox:"0 0 24 24",children:(0,Je.jsx)(tt.G,{children:(0,Je.jsx)(tt.Path,{d:"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z"})})}),cl={foreground:"#0073AA",src:(0,Je.jsx)(tt.SVG,{viewBox:"0 0 24 24",children:(0,Je.jsx)(tt.G,{children:(0,Je.jsx)(tt.Path,{d:"M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z"})})})},ul={foreground:"#1db954",src:(0,Je.jsx)(tt.SVG,{viewBox:"0 0 24 24",children:(0,Je.jsx)(tt.Path,{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325"})})},dl=(0,Je.jsx)(tt.SVG,{viewBox:"0 0 24 24",children:(0,Je.jsx)(tt.Path,{d:"m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z"})}),pl={foreground:"#1ab7ea",src:(0,Je.jsx)(tt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(tt.G,{children:(0,Je.jsx)(tt.Path,{d:"M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z"})})})},ml=(0,Je.jsx)(tt.SVG,{viewBox:"0 0 24 24",children:(0,Je.jsx)(tt.Path,{d:"M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z"})}),gl={foreground:"#35465c",src:(0,Je.jsx)(tt.SVG,{viewBox:"0 0 24 24",children:(0,Je.jsx)(tt.Path,{d:"M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z"})})},hl=(0,Je.jsxs)(tt.SVG,{viewBox:"0 0 24 24",children:[(0,Je.jsx)(tt.Path,{d:"M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z"}),(0,Je.jsx)(tt.Path,{d:"M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z"}),(0,Je.jsx)(tt.Path,{d:"M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z"})]}),xl=(0,Je.jsxs)(tt.SVG,{viewBox:"0 0 24 24",children:[(0,Je.jsx)(tt.Path,{d:"m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",fill:"#4bc7ee"}),(0,Je.jsx)(tt.Path,{d:"m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z",fill:"#d4cdcb"}),(0,Je.jsx)(tt.Path,{d:"m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",fill:"#c3d82e"}),(0,Je.jsx)(tt.Path,{d:"m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z",fill:"#e4ecb0"}),(0,Je.jsx)(tt.Path,{d:"m.0206909 21 19.5468091-9.063 1.6621 2.8344z",fill:"#209dbd"}),(0,Je.jsx)(tt.Path,{d:"m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",fill:"#7cb3c9"})]}),_l=(0,Je.jsx)(tt.SVG,{viewBox:"0 0 24 24",children:(0,Je.jsx)(tt.Path,{d:"M11.903 16.568c-1.82 0-3.124-1.281-3.124-2.967a2.987 2.987 0 0 1 2.989-2.989c1.663 0 2.944 1.304 2.944 3.034 0 1.663-1.281 2.922-2.81 2.922ZM17.997 3l-3.308.73v5.107c-.809-1.034-2.045-1.37-3.505-1.37-1.529 0-2.9.561-4.023 1.662-1.259 1.214-1.933 2.764-1.933 4.495 0 1.888.72 3.506 2.113 4.742 1.056.944 2.314 1.415 3.775 1.415 1.438 0 2.517-.382 3.573-1.415v1.415h3.308V3Z",fill:"#333436"})}),bl=(0,Je.jsx)(tt.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,Je.jsx)(tt.Path,{d:"M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"})}),yl=(0,Je.jsx)(tt.SVG,{viewBox:"0 0 44 44",children:(0,Je.jsx)(tt.Path,{d:"M32.59521,22.001l4.31885-4.84473-6.34131-1.38379.646-6.459-5.94336,2.61035L22,6.31934l-3.27344,5.60351L12.78418,9.3125l.645,6.458L7.08643,17.15234,11.40479,21.999,7.08594,26.84375l6.34131,1.38379-.64551,6.458,5.94287-2.60938L22,37.68066l3.27344-5.60351,5.94287,2.61035-.64551-6.458,6.34277-1.38183Zm.44385,2.75244L30.772,23.97827l-1.59558-2.07391,1.97888.735Zm-8.82147,6.1579L22.75,33.424V30.88977l1.52228-2.22168ZM18.56226,13.48816,19.819,15.09534l-2.49219-.88642L15.94037,12.337Zm6.87719.00116,2.62043-1.15027-1.38654,1.86981L24.183,15.0946Zm3.59357,2.6029-1.22546,1.7381.07525-2.73486,1.44507-1.94867ZM22,29.33008l-2.16406-3.15686L22,23.23688l2.16406,2.93634Zm-4.25458-9.582-.10528-3.836,3.60986,1.284v3.73242Zm5.00458-2.552,3.60986-1.284-.10528,3.836L22.75,20.92853Zm-7.78174-1.10559-.29352-2.94263,1.44245,1.94739.07519,2.73321Zm2.30982,5.08319,3.50817,1.18164-2.16247,2.9342-3.678-1.08447Zm2.4486,7.49285L21.25,30.88977v2.53485L19.78052,30.91Zm3.48707-6.31121,3.50817-1.18164,2.33228,3.03137-3.678,1.08447Zm10.87219-4.28113-2.714,3.04529L28.16418,19.928l1.92176-2.72565ZM24.06036,12.81769l-2.06012,2.6322-2.059-2.63318L22,9.292ZM9.91455,18.07227l4.00079-.87195,1.921,2.72735-3.20794,1.19019Zm2.93024,4.565,1.9801-.73462L13.228,23.97827l-2.26838.77429Zm-1.55591,3.58819L13.701,25.4021l2.64935.78058-2.14447.67853Zm3.64868,1.977L18.19,27.17334l.08313,3.46332L14.52979,32.2793Zm10.7876,2.43549.08447-3.464,3.25165,1.03052.407,4.07684Zm4.06824-3.77478-2.14545-.68,2.65063-.781,2.41266.825Z"})}),fl={foreground:"#f43e37",src:(0,Je.jsxs)(tt.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Je.jsx)(tt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z"}),(0,Je.jsx)(tt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M2.67,12a9.33,9.33,0,0,1,18.66,0H19a7,7,0,1,0-7,7v2.33A9.33,9.33,0,0,1,2.67,12ZM12,17.6A5.6,5.6,0,1,1,17.6,12h-2A3.56,3.56,0,1,0,12,15.56Z",fill:"#fff"})]})},vl=(0,Je.jsx)(tt.SVG,{viewBox:"0 0 24 24",children:(0,Je.jsx)(tt.Path,{fill:"#0a7aff",d:"M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"})}),kl=()=>(0,Je.jsx)("div",{className:"wp-block-embed is-loading",children:(0,Je.jsx)(tt.Spinner,{})}),wl=({icon:e,label:t,value:o,onSubmit:n,onChange:a,cannotEmbed:r,fallback:i,tryAgain:s})=>(0,Je.jsxs)(tt.Placeholder,{icon:(0,Je.jsx)(nt.BlockIcon,{icon:e,showColors:!0}),label:t,className:"wp-block-embed",instructions:(0,ot.__)("Paste a link to the content you want to display on your site."),children:[(0,Je.jsxs)("form",{onSubmit:n,children:[(0,Je.jsx)(tt.__experimentalInputControl,{__next40pxDefaultSize:!0,type:"url",value:o||"",className:"wp-block-embed__placeholder-input",label:t,hideLabelFromVision:!0,placeholder:(0,ot.__)("Enter URL to embed here…"),onChange:a}),(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,ot._x)("Embed","button label")})]}),(0,Je.jsx)("div",{className:"wp-block-embed__learn-more",children:(0,Je.jsx)(tt.ExternalLink,{href:(0,ot.__)("https://wordpress.org/documentation/article/embeds/"),children:(0,ot.__)("Learn more about embeds")})}),r&&(0,Je.jsxs)(tt.__experimentalVStack,{spacing:3,className:"components-placeholder__error",children:[(0,Je.jsx)("div",{className:"components-placeholder__instructions",children:(0,ot.__)("Sorry, this content could not be embedded.")}),(0,Je.jsxs)(tt.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",children:[(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:s,children:(0,ot._x)("Try again","button label")})," ",(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:i,children:(0,ot._x)("Convert to link","button label")})]})]})]}),Cl={class:"className",frameborder:"frameBorder",marginheight:"marginHeight",marginwidth:"marginWidth"};function jl({html:e}){const t=(0,st.useRef)(),o=(0,st.useMemo)((()=>{const t=(new window.DOMParser).parseFromString(e,"text/html").querySelector("iframe"),o={};return t?(Array.from(t.attributes).forEach((({name:e,value:t})=>{"style"!==e&&(o[Cl[e]||e]=t)})),o):o}),[e]);return(0,st.useEffect)((()=>{const{ownerDocument:e}=t.current,{defaultView:n}=e;function a({data:{secret:e,message:n,value:a}={}}){"height"===n&&e===o["data-secret"]&&(t.current.height=a)}return n.addEventListener("message",a),()=>{n.removeEventListener("message",a)}}),[]),(0,Je.jsx)("div",{className:"wp-block-embed__wrapper",children:(0,Je.jsx)("iframe",{ref:(0,ut.useMergeRefs)([t,(0,ut.useFocusableIframe)()]),title:o.title,...o})})}function Sl({preview:e,previewable:t,url:o,type:n,isSelected:a,className:r,icon:i,label:s}){const[l,c]=(0,st.useState)(!1);!a&&l&&c(!1);const u=()=>{c(!0)},{scripts:d}=e,p="photo"===n?(e=>{const t=e.url||e.thumbnail_url,o=(0,Je.jsx)("p",{children:(0,Je.jsx)("img",{src:t,alt:e.title,width:"100%"})});return(0,st.renderToString)(o)})(e):e.html,m=(0,vt.getAuthority)(o),g=(0,ot.sprintf)((0,ot.__)("Embedded content from %s"),m),h=ft(n,r,"wp-block-embed__wrapper"),x="wp-embed"===n?(0,Je.jsx)(jl,{html:p}):(0,Je.jsxs)("div",{className:"wp-block-embed__wrapper",children:[(0,Je.jsx)(tt.SandBox,{html:p,scripts:d,title:g,type:h,onFocus:u}),!l&&(0,Je.jsx)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:u})]});return(0,Je.jsx)(Je.Fragment,{children:t?x:(0,Je.jsxs)(tt.Placeholder,{icon:(0,Je.jsx)(nt.BlockIcon,{icon:i,showColors:!0}),label:s,children:[(0,Je.jsx)("p",{className:"components-placeholder__error",children:(0,Je.jsx)("a",{href:o,children:o})}),(0,Je.jsx)("p",{className:"components-placeholder__error",children:(0,ot.sprintf)((0,ot.__)("Embedded content from %s can't be previewed in the editor."),m)})]})})}const Bl=e=>{const{attributes:{providerNameSlug:t,previewable:o,responsive:n,url:a},attributes:r,isSelected:i,onReplace:s,setAttributes:l,insertBlocksAfter:c,onFocus:u}=e,d={title:(0,ot._x)("Embed","block title"),icon:tl},{icon:p,title:m}=(g=t,(0,Ke.getBlockVariations)($t)?.find((({name:e})=>e===g))||d);var g;const[h,x]=(0,st.useState)(a),[_,b]=(0,st.useState)(!1),{invalidateResolution:y}=(0,it.useDispatch)(ct.store),{preview:f,fetching:v,themeSupportsResponsive:k,cannotEmbed:w,hasResolved:C}=(0,it.useSelect)((e=>{const{getEmbedPreview:t,isPreviewEmbedFallback:o,isRequestingEmbedPreview:n,getThemeSupports:r,hasFinishedResolution:i}=e(ct.store);if(!a)return{fetching:!1,cannotEmbed:!1};const s=t(a),l=o(a),c=!!s&&!(!1===s?.html&&void 0===s?.type)&&!(404===s?.data?.status);return{preview:c?s:void 0,fetching:n(a),themeSupportsResponsive:r()["responsive-embeds"],cannotEmbed:!c||l,hasResolved:i("getEmbedPreview",[a])}}),[a]),j=()=>((e,t,o,n)=>{const{allowResponsive:a,className:r}=e;return{...e,...Qt(t,o,r,n,a)}})(r,f,m,n);(0,st.useEffect)((()=>{if(f?.html||!w||!C)return;const e=a.replace(/\/$/,"");x(e),b(!1),l({url:e})}),[f?.html,a,w,C,l]),(0,st.useEffect)((()=>{if(w&&!v&&h&&"x.com"===(0,vt.getAuthority)(h)){const e=new URL(h);e.host="twitter.com",l({url:e.toString()})}}),[h,w,v,l]),(0,st.useEffect)((()=>{if(f&&!_){const t=j();if(l(t),s){const o=qt(e,t);o&&s(o)}}}),[f,_]);const S=(0,nt.useBlockProps)();if(v)return(0,Je.jsx)(Ye.View,{...S,children:(0,Je.jsx)(kl,{})});const B=(0,ot.sprintf)((0,ot.__)("%s URL"),m);if(!f||w||_)return(0,Je.jsx)(Ye.View,{...S,children:(0,Je.jsx)(wl,{icon:p,label:B,onFocus:u,onSubmit:e=>{e&&e.preventDefault();const t=Wt(r.className);b(!1),l({url:h,className:t})},value:h,cannotEmbed:w,onChange:e=>x(e),fallback:()=>function(e,t){const o=(0,Je.jsx)("a",{href:e,children:e});t((0,Ke.createBlock)("core/paragraph",{content:(0,st.renderToString)(o)}))}(h,s),tryAgain:()=>{y("getEmbedPreview",[h])}})});const{caption:T,type:N,allowResponsive:P,className:I}=j(),M=ft(I,e.className);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(el,{showEditButton:f&&!w,themeSupportsResponsive:k,blockSupportsResponsive:n,allowResponsive:P,toggleResponsive:()=>{const{allowResponsive:e,className:t}=r,{html:o}=f,a=!e;l({allowResponsive:a,className:Zt(o,t,n&&a)})},switchBackToURLInput:()=>b(!0)}),(0,Je.jsxs)("figure",{...S,className:ft(S.className,M,{[`is-type-${N}`]:N,[`is-provider-${t}`]:t,[`wp-block-embed-${t}`]:t}),children:[(0,Je.jsx)(Sl,{preview:f,previewable:o,className:M,url:h,type:N,caption:T,onCaptionChange:e=>l({caption:e}),isSelected:i,icon:p,label:B,insertBlocksAfter:c,attributes:r,setAttributes:l}),(0,Je.jsx)(Yt,{attributes:r,setAttributes:l,isSelected:i,insertBlocksAfter:c,label:(0,ot.__)("Embed caption text"),showToolbarButton:i})]})]})};const{name:Tl}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string",role:"content"},caption:{type:"rich-text",source:"rich-text",selector:"figcaption",role:"content"},type:{type:"string",role:"content"},providerNameSlug:{type:"string",role:"content"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1,role:"content"},previewable:{type:"boolean",default:!0,role:"content"}},supports:{align:!0,spacing:{margin:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},Nl={from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&/^\s*(https?:\/\/\S+)\s*$/i.test(e.textContent)&&1===e.textContent?.match(/https/gi)?.length,transform:e=>(0,Ke.createBlock)(Tl,{url:e.textContent.trim()})}],to:[{type:"block",blocks:["core/paragraph"],isMatch:({url:e})=>!!e,transform:({url:e,caption:t,className:o})=>{let n=`<a href="${e}">${e}</a>`;return t?.trim()&&(n+=`<br />${t}`),(0,Ke.createBlock)("core/paragraph",{content:n,className:Wt(o)})}}]},Pl=Nl;function Il(e){return(0,ot.sprintf)((0,ot.__)("%s Embed"),e)}const Ml=[{name:"twitter",title:Il("Twitter"),icon:rl,keywords:["tweet",(0,ot.__)("social")],description:(0,ot.__)("Embed a tweet."),patterns:[/^https?:\/\/(www\.)?twitter\.com\/.+/i],attributes:{providerNameSlug:"twitter",responsive:!0}},{name:"youtube",title:Il("YouTube"),icon:il,keywords:[(0,ot.__)("music"),(0,ot.__)("video")],description:(0,ot.__)("Embed a YouTube video."),patterns:[/^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,/^https?:\/\/youtu\.be\/.+/i],attributes:{providerNameSlug:"youtube",responsive:!0}},{name:"facebook",title:Il("Facebook"),icon:sl,keywords:[(0,ot.__)("social")],description:(0,ot.__)("Embed a Facebook post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}},{name:"instagram",title:Il("Instagram"),icon:ll,keywords:[(0,ot.__)("image"),(0,ot.__)("social")],description:(0,ot.__)("Embed an Instagram post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"instagram",responsive:!0}},{name:"wordpress",title:Il("WordPress"),icon:cl,keywords:[(0,ot.__)("post"),(0,ot.__)("blog")],description:(0,ot.__)("Embed a WordPress post."),attributes:{providerNameSlug:"wordpress"}},{name:"soundcloud",title:Il("SoundCloud"),icon:ol,keywords:[(0,ot.__)("music"),(0,ot.__)("audio")],description:(0,ot.__)("Embed SoundCloud content."),patterns:[/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],attributes:{providerNameSlug:"soundcloud",responsive:!0}},{name:"spotify",title:Il("Spotify"),icon:ul,keywords:[(0,ot.__)("music"),(0,ot.__)("audio")],description:(0,ot.__)("Embed Spotify content."),patterns:[/^https?:\/\/(open|play)\.spotify\.com\/.+/i],attributes:{providerNameSlug:"spotify",responsive:!0}},{name:"flickr",title:Il("Flickr"),icon:dl,keywords:[(0,ot.__)("image")],description:(0,ot.__)("Embed Flickr content."),patterns:[/^https?:\/\/(www\.)?flickr\.com\/.+/i,/^https?:\/\/flic\.kr\/.+/i],attributes:{providerNameSlug:"flickr",responsive:!0}},{name:"vimeo",title:Il("Vimeo"),icon:pl,keywords:[(0,ot.__)("video")],description:(0,ot.__)("Embed a Vimeo video."),patterns:[/^https?:\/\/(www\.)?vimeo\.com\/.+/i],attributes:{providerNameSlug:"vimeo",responsive:!0}},{name:"animoto",title:Il("Animoto"),icon:xl,description:(0,ot.__)("Embed an Animoto video."),patterns:[/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],attributes:{providerNameSlug:"animoto",responsive:!0}},{name:"cloudup",title:Il("Cloudup"),icon:tl,description:(0,ot.__)("Embed Cloudup content."),patterns:[/^https?:\/\/cloudup\.com\/.+/i],attributes:{providerNameSlug:"cloudup",responsive:!0}},{name:"collegehumor",title:Il("CollegeHumor"),icon:al,description:(0,ot.__)("Embed CollegeHumor content."),scope:["block"],patterns:[],attributes:{providerNameSlug:"collegehumor",responsive:!0}},{name:"crowdsignal",title:Il("Crowdsignal"),icon:tl,keywords:["polldaddy",(0,ot.__)("survey")],description:(0,ot.__)("Embed Crowdsignal (formerly Polldaddy) content."),patterns:[/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.crowdsignal\.net|.+\.survey\.fm)\/.+/i],attributes:{providerNameSlug:"crowdsignal",responsive:!0}},{name:"dailymotion",title:Il("Dailymotion"),icon:_l,keywords:[(0,ot.__)("video")],description:(0,ot.__)("Embed a Dailymotion video."),patterns:[/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],attributes:{providerNameSlug:"dailymotion",responsive:!0}},{name:"imgur",title:Il("Imgur"),icon:nl,description:(0,ot.__)("Embed Imgur content."),patterns:[/^https?:\/\/(.+\.)?imgur\.com\/.+/i],attributes:{providerNameSlug:"imgur",responsive:!0}},{name:"issuu",title:Il("Issuu"),icon:tl,description:(0,ot.__)("Embed Issuu content."),patterns:[/^https?:\/\/(www\.)?issuu\.com\/.+/i],attributes:{providerNameSlug:"issuu",responsive:!0}},{name:"kickstarter",title:Il("Kickstarter"),icon:tl,description:(0,ot.__)("Embed Kickstarter content."),patterns:[/^https?:\/\/(www\.)?kickstarter\.com\/.+/i,/^https?:\/\/kck\.st\/.+/i],attributes:{providerNameSlug:"kickstarter",responsive:!0}},{name:"mixcloud",title:Il("Mixcloud"),icon:ol,keywords:[(0,ot.__)("music"),(0,ot.__)("audio")],description:(0,ot.__)("Embed Mixcloud content."),patterns:[/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],attributes:{providerNameSlug:"mixcloud",responsive:!0}},{name:"pocket-casts",title:Il("Pocket Casts"),icon:fl,keywords:[(0,ot.__)("podcast"),(0,ot.__)("audio")],description:(0,ot.__)("Embed a podcast player from Pocket Casts."),patterns:[/^https:\/\/pca.st\/\w+/i],attributes:{providerNameSlug:"pocket-casts",responsive:!0}},{name:"reddit",title:Il("Reddit"),icon:ml,description:(0,ot.__)("Embed a Reddit thread."),patterns:[/^https?:\/\/(www\.)?reddit\.com\/.+/i],attributes:{providerNameSlug:"reddit",responsive:!0}},{name:"reverbnation",title:Il("ReverbNation"),icon:ol,description:(0,ot.__)("Embed ReverbNation content."),patterns:[/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],attributes:{providerNameSlug:"reverbnation",responsive:!0}},{name:"scribd",title:Il("Scribd"),icon:tl,description:(0,ot.__)("Embed Scribd content."),patterns:[/^https?:\/\/(www\.)?scribd\.com\/.+/i],attributes:{providerNameSlug:"scribd",responsive:!0}},{name:"smugmug",title:Il("SmugMug"),icon:nl,description:(0,ot.__)("Embed SmugMug content."),patterns:[/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],attributes:{providerNameSlug:"smugmug",previewable:!1,responsive:!0}},{name:"speaker-deck",title:Il("Speaker Deck"),icon:tl,description:(0,ot.__)("Embed Speaker Deck content."),patterns:[/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],attributes:{providerNameSlug:"speaker-deck",responsive:!0}},{name:"tiktok",title:Il("TikTok"),icon:al,keywords:[(0,ot.__)("video")],description:(0,ot.__)("Embed a TikTok video."),patterns:[/^https?:\/\/(www\.)?tiktok\.com\/.+/i],attributes:{providerNameSlug:"tiktok",responsive:!0}},{name:"ted",title:Il("TED"),icon:al,description:(0,ot.__)("Embed a TED video."),patterns:[/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],attributes:{providerNameSlug:"ted",responsive:!0}},{name:"tumblr",title:Il("Tumblr"),icon:gl,keywords:[(0,ot.__)("social")],description:(0,ot.__)("Embed a Tumblr post."),patterns:[/^https?:\/\/(.+)\.tumblr\.com\/.+/i],attributes:{providerNameSlug:"tumblr",responsive:!0}},{name:"videopress",title:Il("VideoPress"),icon:al,keywords:[(0,ot.__)("video")],description:(0,ot.__)("Embed a VideoPress video."),patterns:[/^https?:\/\/videopress\.com\/.+/i],attributes:{providerNameSlug:"videopress",responsive:!0}},{name:"wordpress-tv",title:Il("WordPress.tv"),icon:al,description:(0,ot.__)("Embed a WordPress.tv video."),patterns:[/^https?:\/\/wordpress\.tv\/.+/i],attributes:{providerNameSlug:"wordpress-tv",responsive:!0}},{name:"amazon-kindle",title:Il("Amazon Kindle"),icon:hl,keywords:[(0,ot.__)("ebook")],description:(0,ot.__)("Embed Amazon Kindle content."),patterns:[/^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i,/^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i],attributes:{providerNameSlug:"amazon-kindle"}},{name:"pinterest",title:Il("Pinterest"),icon:bl,keywords:[(0,ot.__)("social"),(0,ot.__)("bookmark")],description:(0,ot.__)("Embed Pinterest pins, boards, and profiles."),patterns:[/^https?:\/\/([a-z]{2}|www)\.pinterest\.com(\.(au|mx))?\/.*/i],attributes:{providerNameSlug:"pinterest"}},{name:"wolfram-cloud",title:Il("Wolfram"),icon:yl,description:(0,ot.__)("Embed Wolfram notebook content."),patterns:[/^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i],attributes:{providerNameSlug:"wolfram-cloud",responsive:!0}},{name:"bluesky",title:Il("Bluesky"),icon:vl,description:(0,ot.__)("Embed a Bluesky post."),patterns:[/^https?:\/\/bsky\.app\/profile\/.+\/post\/.+/i],attributes:{providerNameSlug:"bluesky"}}];Ml.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.providerNameSlug===t.providerNameSlug)}));const Dl=Ml,{attributes:zl}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string",role:"content"},caption:{type:"rich-text",source:"rich-text",selector:"figcaption",role:"content"},type:{type:"string",role:"content"},providerNameSlug:{type:"string",role:"content"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1,role:"content"},previewable:{type:"boolean",default:!0,role:"content"}},supports:{align:!0,spacing:{margin:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},Al={attributes:zl,save({attributes:e}){const{url:t,caption:o,type:n,providerNameSlug:a}=e;if(!t)return null;const r=ft("wp-block-embed",{[`is-type-${n}`]:n,[`is-provider-${a}`]:a,[`wp-block-embed-${a}`]:a});return(0,Je.jsxs)("figure",{...nt.useBlockProps.save({className:r}),children:[(0,Je.jsx)("div",{className:"wp-block-embed__wrapper",children:`\n${t}\n`}),!nt.RichText.isEmpty(o)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",value:o})]})}},Rl={attributes:zl,save({attributes:{url:e,caption:t,type:o,providerNameSlug:n}}){if(!e)return null;const a=ft("wp-block-embed",{[`is-type-${o}`]:o,[`is-provider-${n}`]:n});return(0,Je.jsxs)("figure",{className:a,children:[`\n${e}\n`,!nt.RichText.isEmpty(t)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",value:t})]})}},Hl=[Al,Rl],Ll={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string",role:"content"},caption:{type:"rich-text",source:"rich-text",selector:"figcaption",role:"content"},type:{type:"string",role:"content"},providerNameSlug:{type:"string",role:"content"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1,role:"content"},previewable:{type:"boolean",default:!0,role:"content"}},supports:{align:!0,spacing:{margin:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},{name:Vl}=Ll,Fl={icon:tl,edit:Bl,save:function({attributes:e}){const{url:t,caption:o,type:n,providerNameSlug:a}=e;if(!t)return null;const r=ft("wp-block-embed",{[`is-type-${n}`]:n,[`is-provider-${a}`]:a,[`wp-block-embed-${a}`]:a});return(0,Je.jsxs)("figure",{...nt.useBlockProps.save({className:r}),children:[(0,Je.jsx)("div",{className:"wp-block-embed__wrapper",children:`\n${t}\n`}),!nt.RichText.isEmpty(o)&&(0,Je.jsx)(nt.RichText.Content,{className:(0,nt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:o})]})},transforms:Pl,variations:Dl,deprecated:Hl},El=()=>et({name:Vl,metadata:Ll,settings:Fl}),Ol=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})}),$l={attributes:{id:{type:"number"},href:{type:"string"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){const{href:t,fileId:o,fileName:n,textLinkHref:a,textLinkTarget:r,showDownloadButton:i,downloadButtonText:s,displayPreview:l,previewHeight:c}=e,u=nt.RichText.isEmpty(n)?(0,ot.__)("PDF embed"):(0,ot.sprintf)((0,ot.__)("Embed of %s."),n),d=!nt.RichText.isEmpty(n),p=d?o:void 0;return t&&(0,Je.jsxs)("div",{...nt.useBlockProps.save(),children:[l&&(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":u})}),d&&(0,Je.jsx)("a",{id:p,href:a,target:r,rel:r?"noreferrer noopener":void 0,children:(0,Je.jsx)(nt.RichText.Content,{value:n})}),i&&(0,Je.jsx)("a",{href:t,className:ft("wp-block-file__button",(0,nt.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":p,children:(0,Je.jsx)(nt.RichText.Content,{value:s})})]})}},Gl={attributes:{id:{type:"number"},href:{type:"string"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){const{href:t,fileId:o,fileName:n,textLinkHref:a,textLinkTarget:r,showDownloadButton:i,downloadButtonText:s,displayPreview:l,previewHeight:c}=e,u=nt.RichText.isEmpty(n)?(0,ot.__)("PDF embed"):(0,ot.sprintf)((0,ot.__)("Embed of %s."),n),d=!nt.RichText.isEmpty(n),p=d?o:void 0;return t&&(0,Je.jsxs)("div",{...nt.useBlockProps.save(),children:[l&&(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":u})}),d&&(0,Je.jsx)("a",{id:p,href:a,target:r,rel:r?"noreferrer noopener":void 0,children:(0,Je.jsx)(nt.RichText.Content,{value:n})}),i&&(0,Je.jsx)("a",{href:t,className:"wp-block-file__button",download:!0,"aria-describedby":p,children:(0,Je.jsx)(nt.RichText.Content,{value:s})})]})}},Ul={attributes:{id:{type:"number"},href:{type:"string"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){const{href:t,fileName:o,textLinkHref:n,textLinkTarget:a,showDownloadButton:r,downloadButtonText:i,displayPreview:s,previewHeight:l}=e,c=nt.RichText.isEmpty(o)?(0,ot.__)("PDF embed"):(0,ot.sprintf)((0,ot.__)("Embed of %s."),o);return t&&(0,Je.jsxs)("div",{...nt.useBlockProps.save(),children:[s&&(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${l}px`},"aria-label":c})}),!nt.RichText.isEmpty(o)&&(0,Je.jsx)("a",{href:n,target:a,rel:a?"noreferrer noopener":void 0,children:(0,Je.jsx)(nt.RichText.Content,{value:o})}),r&&(0,Je.jsx)("a",{href:t,className:"wp-block-file__button",download:!0,children:(0,Je.jsx)(nt.RichText.Content,{value:i})})]})}},ql=[$l,Gl,Ul];function Wl({hrefs:e,openInNewWindow:t,showDownloadButton:o,changeLinkDestinationOption:n,changeOpenInNewWindow:a,changeShowDownloadButton:r,displayPreview:i,changeDisplayPreview:s,previewHeight:l,changePreviewHeight:c}){const{href:u,textLinkHref:d,attachmentPage:p}=e;let m=[{value:u,label:(0,ot.__)("URL")}];return p&&(m=[{value:u,label:(0,ot.__)("Media file")},{value:p,label:(0,ot.__)("Attachment page")}]),(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsxs)(nt.InspectorControls,{children:[u.endsWith(".pdf")&&(0,Je.jsxs)(tt.PanelBody,{title:(0,ot.__)("PDF settings"),children:[(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Show inline embed"),help:i?(0,ot.__)("Note: Most phone and tablet browsers won't display embedded PDFs."):null,checked:!!i,onChange:s}),i&&(0,Je.jsx)(tt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Height in pixels"),min:Ql,max:Math.max(Kl,l),value:l,onChange:c})]}),(0,Je.jsxs)(tt.PanelBody,{title:(0,ot.__)("Settings"),children:[(0,Je.jsx)(tt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Link to"),value:d,options:m,onChange:n}),(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Open in new tab"),checked:t,onChange:a}),(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Show download button"),checked:o,onChange:r})]})]})})}const Zl=e=>{let t;try{t=new window.ActiveXObject(e)}catch(e){t=void 0}return t},Ql=200,Kl=2e3;function Yl({text:e,disabled:t}){const{createNotice:o}=(0,it.useDispatch)(Rt.store),n=(0,ut.useCopyToClipboard)(e,(()=>{o("info",(0,ot.__)("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,Je.jsx)(tt.ToolbarButton,{className:"components-clipboard-toolbar-button",ref:n,disabled:t,children:(0,ot.__)("Copy URL")})}const Jl=function({attributes:e,isSelected:t,setAttributes:o,clientId:n}){const{id:a,fileName:r,href:i,textLinkHref:s,textLinkTarget:l,showDownloadButton:c,downloadButtonText:u,displayPreview:d,previewHeight:p}=e,[m,g]=(0,st.useState)(e.blob),{media:h}=(0,it.useSelect)((e=>({media:void 0===a?void 0:e(ct.store).getMedia(a)})),[a]),{createErrorNotice:x}=(0,it.useDispatch)(Rt.store),{toggleSelection:_,__unstableMarkNextChangeAsNotPersistent:b}=(0,it.useDispatch)(nt.store);function y(t){var a,r;if(!t||!t.url)return o({href:void 0,fileName:void 0,textLinkHref:void 0,id:void 0,fileId:void 0,displayPreview:void 0,previewHeight:void 0}),void g();if((0,lt.isBlobURL)(t.url))return void g(t.url);const i=t.url.endsWith(".pdf"),s={displayPreview:i?null===(a=e.displayPreview)||void 0===a||a:void 0,previewHeight:i?null!==(r=e.previewHeight)&&void 0!==r?r:600:void 0};o({href:t.url,fileName:t.title,textLinkHref:t.url,id:t.id,fileId:`wp-block-file--media-${n}`,blob:void 0,...s}),g()}function f(e){o({href:void 0}),x(e,{type:"snackbar"})}pt({url:m,onChange:y,onError:f}),(0,st.useEffect)((()=>{nt.RichText.isEmpty(u)&&(b(),o({downloadButtonText:(0,ot._x)("Download","button label")}))}),[]);const v=h&&h.link,k=(0,nt.useBlockProps)({className:ft(!!m&&(0,tt.__unstableGetAnimateClassName)({type:"loading"}),{"is-transient":!!m})}),w=!(window.navigator.userAgent.indexOf("Mobi")>-1||window.navigator.userAgent.indexOf("Android")>-1||window.navigator.userAgent.indexOf("Macintosh")>-1&&window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2||(window.ActiveXObject||"ActiveXObject"in window)&&!Zl("AcroPDF.PDF")&&!Zl("PDF.PdfCtrl"))&&d;return i||m?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Wl,{hrefs:{href:i||m,textLinkHref:s,attachmentPage:v},openInNewWindow:!!l,showDownloadButton:c,changeLinkDestinationOption:function(e){o({textLinkHref:e})},changeOpenInNewWindow:function(e){o({textLinkTarget:!!e&&"_blank"})},changeShowDownloadButton:function(e){o({showDownloadButton:e})},displayPreview:d,changeDisplayPreview:function(e){o({displayPreview:e})},previewHeight:p,changePreviewHeight:function(e){const t=Math.max(parseInt(e,10),Ql);o({previewHeight:t})}}),(0,Je.jsxs)(nt.BlockControls,{group:"other",children:[(0,Je.jsx)(nt.MediaReplaceFlow,{mediaId:a,mediaURL:i,accept:"*",onSelect:y,onError:f,onReset:()=>y(void 0)}),(0,Je.jsx)(Yl,{text:i,disabled:(0,lt.isBlobURL)(i)})]}),(0,Je.jsxs)("div",{...k,children:[w&&(0,Je.jsxs)(tt.ResizableBox,{size:{height:p,width:"100%"},minHeight:Ql,maxHeight:Kl,grid:[1,10],enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:()=>_(!1),onResizeStop:function(e,t,n,a){_(!0);const r=parseInt(p+a.height,10);o({previewHeight:r})},showHandle:t,children:[(0,Je.jsx)("object",{className:"wp-block-file__preview",data:i,type:"application/pdf","aria-label":(0,ot.__)("Embed of the selected PDF file.")}),!t&&(0,Je.jsx)("div",{className:"wp-block-file__preview-overlay"})]}),(0,Je.jsxs)("div",{className:"wp-block-file__content-wrapper",children:[(0,Je.jsx)(nt.RichText,{identifier:"fileName",tagName:"a",value:r,placeholder:(0,ot.__)("Write file name…"),withoutInteractiveFormatting:!0,onChange:e=>o({fileName:ko(e)}),href:s}),c&&(0,Je.jsx)("div",{className:"wp-block-file__button-richtext-wrapper",children:(0,Je.jsx)(nt.RichText,{identifier:"downloadButtonText",tagName:"div","aria-label":(0,ot.__)("Download button text"),className:ft("wp-block-file__button",(0,nt.__experimentalGetElementClassName)("button")),value:u,withoutInteractiveFormatting:!0,placeholder:(0,ot.__)("Add text…"),onChange:e=>o({downloadButtonText:ko(e)})})})]})]})]}):(0,Je.jsx)("div",{...k,children:(0,Je.jsx)(nt.MediaPlaceholder,{icon:(0,Je.jsx)(nt.BlockIcon,{icon:Ol}),labels:{title:(0,ot.__)("File"),instructions:(0,ot.__)("Drag and drop a file, upload, or choose from your library.")},onSelect:y,onError:f,accept:"*"})})};const Xl={from:[{type:"files",isMatch:e=>e.length>0,priority:15,transform:e=>{const t=[];return e.forEach((e=>{const o=(0,lt.createBlobURL)(e);e.type.startsWith("video/")?t.push((0,Ke.createBlock)("core/video",{blob:(0,lt.createBlobURL)(e)})):e.type.startsWith("image/")?t.push((0,Ke.createBlock)("core/image",{blob:(0,lt.createBlobURL)(e)})):e.type.startsWith("audio/")?t.push((0,Ke.createBlock)("core/audio",{blob:(0,lt.createBlobURL)(e)})):t.push((0,Ke.createBlock)("core/file",{blob:o,fileName:e.name}))})),t}},{type:"block",blocks:["core/audio"],transform:e=>(0,Ke.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],transform:e=>(0,Ke.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],transform:e=>(0,Ke.createBlock)("core/file",{href:e.url,fileName:e.caption||(0,vt.getFilename)(e.url),textLinkHref:e.url,id:e.id,anchor:e.anchor})}],to:[{type:"block",blocks:["core/audio"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=(0,it.select)(ct.store),o=t(e);return!!o&&o.mime_type.includes("audio")},transform:e=>(0,Ke.createBlock)("core/audio",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=(0,it.select)(ct.store),o=t(e);return!!o&&o.mime_type.includes("video")},transform:e=>(0,Ke.createBlock)("core/video",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=(0,it.select)(ct.store),o=t(e);return!!o&&o.mime_type.includes("image")},transform:e=>(0,Ke.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})}]},ec=Xl,tc={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/file",title:"File",category:"media",description:"Add a link to a downloadable file.",keywords:["document","pdf","download"],textdomain:"default",attributes:{id:{type:"number"},blob:{type:"string",role:"local"},href:{type:"string",role:"content"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"rich-text",source:"rich-text",selector:"a:not([download])",role:"content"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href",role:"content"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"rich-text",source:"rich-text",selector:"a[download]",role:"content"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}},interactivity:!0},editorStyle:"wp-block-file-editor",style:"wp-block-file"},{name:oc}=tc,nc={icon:Ol,example:{attributes:{href:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",fileName:(0,ot._x)("Armstrong_Small_Step","Name of the file")}},transforms:ec,deprecated:ql,edit:Jl,save:function({attributes:e}){const{href:t,fileId:o,fileName:n,textLinkHref:a,textLinkTarget:r,showDownloadButton:i,downloadButtonText:s,displayPreview:l,previewHeight:c}=e,u=nt.RichText.isEmpty(n)?"PDF embed":n.toString(),d=!nt.RichText.isEmpty(n),p=d?o:void 0;return t&&(0,Je.jsxs)("div",{...nt.useBlockProps.save(),children:[l&&(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":u})}),d&&(0,Je.jsx)("a",{id:p,href:a,target:r,rel:r?"noreferrer noopener":void 0,children:(0,Je.jsx)(nt.RichText.Content,{value:n})}),i&&(0,Je.jsx)("a",{href:t,className:ft("wp-block-file__button",(0,nt.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":p,children:(0,Je.jsx)(nt.RichText.Content,{value:s})})]})}},ac=()=>et({name:oc,metadata:tc,settings:nc}),rc=["core/form-submission-notification",{type:"success"},[["core/paragraph",{content:'<mark style="background-color:rgba(0, 0, 0, 0);color:#345C00" class="has-inline-color">'+(0,ot.__)("Your form has been submitted successfully")+"</mark>"}]]],ic=["core/form-submission-notification",{type:"error"},[["core/paragraph",{content:'<mark style="background-color:rgba(0, 0, 0, 0);color:#CF2E2E" class="has-inline-color">'+(0,ot.__)("There was an error submitting your form.")+"</mark>"}]]],sc=[rc,ic,["core/form-input",{type:"text",label:(0,ot.__)("Name"),required:!0}],["core/form-input",{type:"email",label:(0,ot.__)("Email"),required:!0}],["core/form-input",{type:"textarea",label:(0,ot.__)("Comment"),required:!0}],["core/form-submit-button",{}]],lc=({attributes:e,setAttributes:t,clientId:o})=>{const{action:n,method:a,email:r,submissionMethod:i}=e,s=(0,nt.useBlockProps)(),{hasInnerBlocks:l}=(0,it.useSelect)((e=>{const{getBlock:t}=e(nt.store),n=t(o);return{hasInnerBlocks:!(!n||!n.innerBlocks.length)}}),[o]),c=(0,nt.useInnerBlocksProps)(s,{template:sc,renderAppender:l?void 0:nt.InnerBlocks.ButtonBlockAppender});return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.PanelBody,{title:(0,ot.__)("Settings"),children:[(0,Je.jsx)(tt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Submissions method"),options:[{label:(0,ot.__)("Send email"),value:"email"},{label:(0,ot.__)("- Custom -"),value:"custom"}],value:i,onChange:e=>t({submissionMethod:e}),help:"custom"===i?(0,ot.__)('Select the method to use for form submissions. Additional options for the "custom" mode can be found in the "Advanced" section.'):(0,ot.__)("Select the method to use for form submissions.")}),"email"===i&&(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,ot.__)("Email for form submissions"),value:r,required:!0,onChange:e=>{t({email:e}),t({action:`mailto:${e}`}),t({method:"post"})},help:(0,ot.__)("The email address where form submissions will be sent. Separate multiple email addresses with a comma."),type:"email"})]})}),"email"!==i&&(0,Je.jsxs)(nt.InspectorControls,{group:"advanced",children:[(0,Je.jsx)(tt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Method"),options:[{label:"Get",value:"get"},{label:"Post",value:"post"}],value:a,onChange:e=>t({method:e}),help:(0,ot.__)("Select the method to use for form submissions.")}),(0,Je.jsx)(tt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,ot.__)("Form action"),value:n,onChange:e=>{t({action:e})},help:(0,ot.__)("The URL where the form should be submitted."),type:"url"})]}),(0,Je.jsx)("form",{...c,className:"wp-block-form",encType:"email"===i?"text/plain":null})]})};const cc=[{name:"comment-form",title:(0,ot.__)("Experimental Comment form"),description:(0,ot.__)("A comment form for posts and pages."),attributes:{submissionMethod:"custom",action:"{SITE_URL}/wp-comments-post.php",method:"post",anchor:"comment-form"},isDefault:!1,innerBlocks:[["core/form-input",{type:"text",name:"author",label:(0,ot.__)("Name"),required:!0,visibilityPermissions:"logged-out"}],["core/form-input",{type:"email",name:"email",label:(0,ot.__)("Email"),required:!0,visibilityPermissions:"logged-out"}],["core/form-input",{type:"textarea",name:"comment",label:(0,ot.__)("Comment"),required:!0,visibilityPermissions:"all"}],["core/form-submit-button",{}]],scope:["inserter","transform"],isActive:e=>!e?.type||"text"===e?.type},{name:"wp-privacy-form",title:(0,ot.__)("Experimental Privacy Request Form"),keywords:["GDPR"],description:(0,ot.__)("A form to request data exports and/or deletion."),attributes:{submissionMethod:"custom",action:"",method:"post",anchor:"gdpr-form"},isDefault:!1,innerBlocks:[rc,ic,["core/paragraph",{content:(0,ot.__)("To request an export or deletion of your personal data on this site, please fill-in the form below. You can define the type of request you wish to perform, and your email address. Once the form is submitted, you will receive a confirmation email with instructions on the next steps.")}],["core/form-input",{type:"email",name:"email",label:(0,ot.__)("Enter your email address."),required:!0,visibilityPermissions:"all"}],["core/form-input",{type:"checkbox",name:"export_personal_data",label:(0,ot.__)("Request data export"),required:!1,visibilityPermissions:"all"}],["core/form-input",{type:"checkbox",name:"remove_personal_data",label:(0,ot.__)("Request data deletion"),required:!1,visibilityPermissions:"all"}],["core/form-submit-button",{}],["core/form-input",{type:"hidden",name:"wp-action",value:"wp_privacy_send_request"}],["core/form-input",{type:"hidden",name:"wp-privacy-request",value:"1"}]],scope:["inserter","transform"],isActive:e=>!e?.type||"text"===e?.type}],uc=cc,dc={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form",title:"Form",category:"common",allowedBlocks:["core/paragraph","core/heading","core/form-input","core/form-submit-button","core/form-submission-notification","core/group","core/columns"],description:"A form.",keywords:["container","wrapper","row","section"],textdomain:"default",icon:"feedback",attributes:{submissionMethod:{type:"string",default:"email"},method:{type:"string",default:"post"},action:{type:"string"},email:{type:"string"}},supports:{anchor:!0,className:!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,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalSelector:"form"}},{name:pc}=dc,mc={edit:lc,save:function({attributes:e}){const t=nt.useBlockProps.save(),{submissionMethod:o}=e;return(0,Je.jsx)("form",{...t,className:"wp-block-form",encType:"email"===o?"text/plain":null,children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})},variations:uc},gc=()=>{const e=["core/form"];return(0,Ns.addFilter)("blockEditor.__unstableCanInsertBlockType","core/block-library/preventInsertingFormIntoAnotherForm",((t,o,n,{getBlock:a,getBlockParentsByBlockName:r})=>{if("core/form"!==o.name)return t;for(const t of e){if(a(n)?.name===t||r(n,t).length)return!1}return!0})),et({name:pc,metadata:dc,settings:mc})};var hc=o(9681),xc=o.n(hc);const _c=window.wp.dom,bc=e=>xc()((0,_c.__unstableStripHTML)(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,""),yc={attributes:{type:{type:"string",default:"text"},name:{type:"string"},label:{type:"string",default:"Label",selector:".wp-block-form-input__label-content",source:"html",role:"content"},inlineLabel:{type:"boolean",default:!1},required:{type:"boolean",default:!1,selector:".wp-block-form-input__input",source:"attribute",attribute:"required"},placeholder:{type:"string",selector:".wp-block-form-input__input",source:"attribute",attribute:"placeholder",role:"content"},value:{type:"string",default:"",selector:"input",source:"attribute",attribute:"value"},visibilityPermissions:{type:"string",default:"all"}},supports:{anchor:!0,reusable:!1,spacing:{margin:["top","bottom"]},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}}},save({attributes:e}){const{type:t,name:o,label:n,inlineLabel:a,required:r,placeholder:i,value:s}=e,l=(0,nt.__experimentalGetBorderClassesAndStyles)(e),c=(0,nt.__experimentalGetColorClassesAndStyles)(e),u={...l.style,...c.style},d=ft("wp-block-form-input__input",c.className,l.className),p="textarea"===t?"textarea":"input",m=nt.useBlockProps.save();return"hidden"===t?(0,Je.jsx)("input",{type:t,name:o,value:s}):(0,Je.jsx)("div",{...m,children:(0,Je.jsxs)("label",{className:ft("wp-block-form-input__label",{"is-label-inline":a}),children:[(0,Je.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,Je.jsx)(nt.RichText.Content,{value:n})}),(0,Je.jsx)(p,{className:d,type:"textarea"===t?void 0:t,name:o||bc(n),required:r,"aria-required":r,placeholder:i||void 0,style:u})]})})}},fc={attributes:{type:{type:"string",default:"text"},name:{type:"string"},label:{type:"string",default:"Label",selector:".wp-block-form-input__label-content",source:"html",role:"content"},inlineLabel:{type:"boolean",default:!1},required:{type:"boolean",default:!1,selector:".wp-block-form-input__input",source:"attribute",attribute:"required"},placeholder:{type:"string",selector:".wp-block-form-input__input",source:"attribute",attribute:"placeholder",role:"content"},value:{type:"string",default:"",selector:"input",source:"attribute",attribute:"value"},visibilityPermissions:{type:"string",default:"all"}},supports:{className:!1,anchor:!0,reusable:!1,spacing:{margin:["top","bottom"]},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}}},save({attributes:e}){const{type:t,name:o,label:n,inlineLabel:a,required:r,placeholder:i,value:s}=e,l=(0,nt.__experimentalGetBorderClassesAndStyles)(e),c=(0,nt.__experimentalGetColorClassesAndStyles)(e),u={...l.style,...c.style},d=ft("wp-block-form-input__input",c.className,l.className),p="textarea"===t?"textarea":"input";return"hidden"===t?(0,Je.jsx)("input",{type:t,name:o,value:s}):(0,Je.jsxs)("label",{className:ft("wp-block-form-input__label",{"is-label-inline":a}),children:[(0,Je.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,Je.jsx)(nt.RichText.Content,{value:n})}),(0,Je.jsx)(p,{className:d,type:"textarea"===t?void 0:t,name:o||bc(n),required:r,"aria-required":r,placeholder:i||void 0,style:u})]})}},vc=[yc,fc];const kc=function({attributes:e,setAttributes:t,className:o}){const{type:n,name:a,label:r,inlineLabel:i,required:s,placeholder:l,value:c}=e,u=(0,nt.useBlockProps)(),d=(0,st.useRef)(),p="textarea"===n?"textarea":"input",m=(0,nt.__experimentalUseBorderProps)(e),g=(0,nt.__experimentalUseColorProps)(e);d.current&&d.current.focus();const h="checkbox"===n||"radio"===n,x=(0,Je.jsxs)(Je.Fragment,{children:["hidden"!==n&&(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.PanelBody,{title:(0,ot.__)("Settings"),children:["checkbox"!==n&&(0,Je.jsx)(tt.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Inline label"),checked:i,onChange:e=>{t({inlineLabel:e})}}),(0,Je.jsx)(tt.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Required"),checked:s,onChange:e=>{t({required:e})}})]})}),(0,Je.jsx)(nt.InspectorControls,{group:"advanced",children:(0,Je.jsx)(tt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,ot.__)("Name"),value:a,onChange:e=>{t({name:e})},help:(0,ot.__)('Affects the "name" attribute of the input element, and is used as a name for the form submission results.')})})]}),_=(0,Je.jsx)(nt.RichText,{tagName:"span",className:"wp-block-form-input__label-content",value:r,onChange:e=>t({label:e}),"aria-label":r?(0,ot.__)("Label"):(0,ot.__)("Empty label"),"data-empty":!r,placeholder:(0,ot.__)("Type the label for this input")});return"hidden"===n?(0,Je.jsxs)(Je.Fragment,{children:[x,(0,Je.jsx)("input",{type:"hidden",className:ft(o,"wp-block-form-input__input",g.className,m.className),"aria-label":(0,ot.__)("Value"),value:c,onChange:e=>t({value:e.target.value})})]}):(0,Je.jsxs)("div",{...u,children:[x,(0,Je.jsxs)("span",{className:ft("wp-block-form-input__label",{"is-label-inline":i||"checkbox"===n}),children:[!h&&_,(0,Je.jsx)(p,{type:"textarea"===n?void 0:n,className:ft(o,"wp-block-form-input__input",g.className,m.className),"aria-label":(0,ot.__)("Optional placeholder text"),placeholder:l?void 0:(0,ot.__)("Optional placeholder…"),value:l,onChange:e=>t({placeholder:e.target.value}),"aria-required":s,style:{...m.style,...g.style}}),h&&_]})]})};const wc=[{name:"text",title:(0,ot.__)("Text Input"),icon:"edit-page",description:(0,ot.__)("A generic text input."),attributes:{type:"text"},isDefault:!0,scope:["inserter","transform"],isActive:e=>!e?.type||"text"===e?.type},{name:"textarea",title:(0,ot.__)("Textarea Input"),icon:"testimonial",description:(0,ot.__)("A textarea input to allow entering multiple lines of text."),attributes:{type:"textarea"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"textarea"===e?.type},{name:"checkbox",title:(0,ot.__)("Checkbox Input"),description:(0,ot.__)("A simple checkbox input."),icon:"forms",attributes:{type:"checkbox",inlineLabel:!0},isDefault:!0,scope:["inserter","transform"],isActive:e=>"checkbox"===e?.type},{name:"email",title:(0,ot.__)("Email Input"),icon:"email",description:(0,ot.__)("Used for email addresses."),attributes:{type:"email"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"email"===e?.type},{name:"url",title:(0,ot.__)("URL Input"),icon:"admin-site",description:(0,ot.__)("Used for URLs."),attributes:{type:"url"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"url"===e?.type},{name:"tel",title:(0,ot.__)("Telephone Input"),icon:"phone",description:(0,ot.__)("Used for phone numbers."),attributes:{type:"tel"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"tel"===e?.type},{name:"number",title:(0,ot.__)("Number Input"),icon:"edit-page",description:(0,ot.__)("A numeric input."),attributes:{type:"number"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"number"===e?.type}],Cc=wc,jc={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-input",title:"Input Field",category:"common",ancestor:["core/form"],description:"The basic building block for forms.",keywords:["input","form"],textdomain:"default",icon:"forms",attributes:{type:{type:"string",default:"text"},name:{type:"string"},label:{type:"rich-text",default:"Label",selector:".wp-block-form-input__label-content",source:"rich-text",role:"content"},inlineLabel:{type:"boolean",default:!1},required:{type:"boolean",default:!1,selector:".wp-block-form-input__input",source:"attribute",attribute:"required"},placeholder:{type:"string",selector:".wp-block-form-input__input",source:"attribute",attribute:"placeholder",role:"content"},value:{type:"string",default:"",selector:"input",source:"attribute",attribute:"value"},visibilityPermissions:{type:"string",default:"all"}},supports:{anchor:!0,reusable:!1,spacing:{margin:["top","bottom"]},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}}},style:["wp-block-form-input"]},{name:Sc}=jc,Bc={deprecated:vc,edit:kc,save:function({attributes:e}){const{type:t,name:o,label:n,inlineLabel:a,required:r,placeholder:i,value:s}=e,l=(0,nt.__experimentalGetBorderClassesAndStyles)(e),c=(0,nt.__experimentalGetColorClassesAndStyles)(e),u={...l.style,...c.style},d=ft("wp-block-form-input__input",c.className,l.className),p="textarea"===t?"textarea":"input",m=nt.useBlockProps.save(),g="checkbox"===t||"radio"===t;return"hidden"===t?(0,Je.jsx)("input",{type:t,name:o,value:s}):(0,Je.jsx)("div",{...m,children:(0,Je.jsxs)("label",{className:ft("wp-block-form-input__label",{"is-label-inline":a}),children:[!g&&(0,Je.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,Je.jsx)(nt.RichText.Content,{value:n})}),(0,Je.jsx)(p,{className:d,type:"textarea"===t?void 0:t,name:o||(h=n,xc()((0,_c.__unstableStripHTML)(h)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,"")),required:r,"aria-required":r,placeholder:i||void 0,style:u}),g&&(0,Je.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,Je.jsx)(nt.RichText.Content,{value:n})})]})});var h},variations:Cc},Tc=()=>et({name:Sc,metadata:jc,settings:Bc}),Nc=[["core/buttons",{},[["core/button",{text:(0,ot.__)("Submit"),tagName:"button",type:"submit"}]]]],Pc=()=>{const e=(0,nt.useBlockProps)(),t=(0,nt.useInnerBlocksProps)(e,{template:Nc,templateLock:"all"});return(0,Je.jsx)("div",{className:"wp-block-form-submit-wrapper",...t})};const Ic={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-submit-button",title:"Form Submit Button",category:"common",icon:"button",ancestor:["core/form"],allowedBlocks:["core/buttons","core/button"],description:"A submission button for forms.",keywords:["submit","button","form"],textdomain:"default",style:["wp-block-form-submit-button"]},{name:Mc}=Ic,Dc={edit:Pc,save:function(){const e=nt.useBlockProps.save();return(0,Je.jsx)("div",{className:"wp-block-form-submit-wrapper",...e,children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})}},zc=()=>et({name:Mc,metadata:Ic,settings:Dc}),Ac=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"})}),Rc=[["core/paragraph",{content:(0,ot.__)("Enter the message you wish displayed for form submission error/success, and select the type of the message (success/error) from the block's options.")}]],Hc=({attributes:e,clientId:t})=>{const{type:o}=e,n=(0,nt.useBlockProps)({className:ft("wp-block-form-submission-notification",{[`form-notification-type-${o}`]:o})}),{hasInnerBlocks:a}=(0,it.useSelect)((e=>{const{getBlock:o}=e(nt.store),n=o(t);return{hasInnerBlocks:!(!n||!n.innerBlocks.length)}}),[t]),r=(0,nt.useInnerBlocksProps)(n,{template:Rc,renderAppender:a?void 0:nt.InnerBlocks.ButtonBlockAppender});return(0,Je.jsx)("div",{...r,"data-message-success":(0,ot.__)("Submission success notification"),"data-message-error":(0,ot.__)("Submission error notification")})};const Lc=[{name:"form-submission-success",title:(0,ot.__)("Form Submission Success"),description:(0,ot.__)("Success message for form submissions."),attributes:{type:"success"},isDefault:!0,innerBlocks:[["core/paragraph",{content:(0,ot.__)("Your form has been submitted successfully."),backgroundColor:"#00D084",textColor:"#000000",style:{elements:{link:{color:{text:"#000000"}}}}}]],scope:["inserter","transform"],isActive:e=>!e?.type||"success"===e?.type},{name:"form-submission-error",title:(0,ot.__)("Form Submission Error"),description:(0,ot.__)("Error/failure message for form submissions."),attributes:{type:"error"},isDefault:!1,innerBlocks:[["core/paragraph",{content:(0,ot.__)("There was an error submitting your form."),backgroundColor:"#CF2E2E",textColor:"#FFFFFF",style:{elements:{link:{color:{text:"#FFFFFF"}}}}}]],scope:["inserter","transform"],isActive:e=>!e?.type||"error"===e?.type}],Vc=Lc,Fc={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-submission-notification",title:"Form Submission Notification",category:"common",ancestor:["core/form"],description:"Provide a notification message after the form has been submitted.",keywords:["form","feedback","notification","message"],textdomain:"default",icon:"feedback",attributes:{type:{type:"string",default:"success"}}},{name:Ec}=Fc,Oc={icon:Ac,edit:Hc,save:function({attributes:e}){const{type:t}=e;return(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save(nt.useBlockProps.save({className:ft("wp-block-form-submission-notification",{[`form-notification-type-${t}`]:t})}))})},variations:Vc},$c=()=>et({name:Ec,metadata:Fc,settings:Oc}),Gc=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M16.375 4.5H4.625a.125.125 0 0 0-.125.125v8.254l2.859-1.54a.75.75 0 0 1 .68-.016l2.384 1.142 2.89-2.074a.75.75 0 0 1 .874 0l2.313 1.66V4.625a.125.125 0 0 0-.125-.125Zm.125 9.398-2.75-1.975-2.813 2.02a.75.75 0 0 1-.76.067l-2.444-1.17L4.5 14.583v1.792c0 .069.056.125.125.125h11.75a.125.125 0 0 0 .125-.125v-2.477ZM4.625 3C3.728 3 3 3.728 3 4.625v11.75C3 17.273 3.728 18 4.625 18h11.75c.898 0 1.625-.727 1.625-1.625V4.625C18 3.728 17.273 3 16.375 3H4.625ZM20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z",fillRule:"evenodd",clipRule:"evenodd"})}),Uc="none",qc="media",Wc="lightbox",Zc="attachment",Qc="file",Kc="post";function Yc(e){return Math.min(3,e?.images?.length)}function Jc(e,t){switch(t){case Qc:return{href:e?.source_url||e?.url,linkDestination:qc};case Kc:return{href:e?.link,linkDestination:Zc};case qc:return{href:e?.source_url||e?.url,linkDestination:qc};case Zc:return{href:e?.link,linkDestination:Zc};case Uc:return{href:void 0,linkDestination:Uc}}return{}}function Xc(e){let t=e.linkTo?e.linkTo:"none";"post"===t?t="attachment":"file"===t&&(t="media");const o=e.images.map((o=>function(e,t,o){return(0,Ke.createBlock)("core/image",{...e.id&&{id:parseInt(e.id)},url:e.url,alt:e.alt,caption:e.caption,sizeSlug:t,...Jc(e,o)})}(o,e.sizeSlug,t))),{images:n,ids:a,...r}=e;return[{...r,linkTo:t,allowResize:!1},o]}const eu={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},shortCodeTransforms:{type:"array",default:[],items:{type:"object"}},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},fixedHeight:{type:"boolean",default:!0},linkTarget:{type:"string"},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"},allowResize:{type:"boolean",default:!1}},save({attributes:e}){const{caption:t,columns:o,imageCrop:n}=e,a=ft("has-nested-images",{[`columns-${o}`]:void 0!==o,"columns-default":void 0===o,"is-cropped":n}),r=nt.useBlockProps.save({className:a}),i=nt.useInnerBlocksProps.save(r);return(0,Je.jsxs)("figure",{...i,children:[i.children,!nt.RichText.isEmpty(t)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:t})]})}},tu={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},fixedHeight:{type:"boolean",default:!0},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"}},supports:{anchor:!0,align:!0},save({attributes:e}){const{images:t,columns:o=Yc(e),imageCrop:n,caption:a,linkTo:r}=e,i=`columns-${o} ${n?"is-cropped":""}`;return(0,Je.jsxs)("figure",{...nt.useBlockProps.save({className:i}),children:[(0,Je.jsx)("ul",{className:"blocks-gallery-grid",children:t.map((e=>{let t;switch(r){case Qc:t=e.fullUrl||e.url;break;case Kc:t=e.link}const o=(0,Je.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,Je.jsx)("li",{className:"blocks-gallery-item",children:(0,Je.jsxs)("figure",{children:[t?(0,Je.jsx)("a",{href:t,children:o}):o,!nt.RichText.isEmpty(e.caption)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})]})},e.id||e.url)}))}),!nt.RichText.isEmpty(a)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:a})]})},migrate:e=>Xc(e)},ou={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},sizeSlug:{type:"string",default:"large"}},supports:{align:!0},isEligible:({linkTo:e})=>!e||"attachment"===e||"media"===e,migrate:e=>Xc(e),save({attributes:e}){const{images:t,columns:o=Yc(e),imageCrop:n,caption:a,linkTo:r}=e;return(0,Je.jsxs)("figure",{className:`columns-${o} ${n?"is-cropped":""}`,children:[(0,Je.jsx)("ul",{className:"blocks-gallery-grid",children:t.map((e=>{let t;switch(r){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const o=(0,Je.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,Je.jsx)("li",{className:"blocks-gallery-item",children:(0,Je.jsxs)("figure",{children:[t?(0,Je.jsx)("a",{href:t,children:o}):o,!nt.RichText.isEmpty(e.caption)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})]})},e.id||e.url)}))}),!nt.RichText.isEmpty(a)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:a})]})}},nu={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},link:{source:"attribute",selector:"img",attribute:"data-link"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",default:[]},columns:{type:"number"},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},isEligible:({ids:e})=>e&&e.some((e=>"string"==typeof e)),migrate:e=>Xc(e),save({attributes:e}){const{images:t,columns:o=Yc(e),imageCrop:n,caption:a,linkTo:r}=e;return(0,Je.jsxs)("figure",{className:`columns-${o} ${n?"is-cropped":""}`,children:[(0,Je.jsx)("ul",{className:"blocks-gallery-grid",children:t.map((e=>{let t;switch(r){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const o=(0,Je.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,Je.jsx)("li",{className:"blocks-gallery-item",children:(0,Je.jsxs)("figure",{children:[t?(0,Je.jsx)("a",{href:t,children:o}):o,!nt.RichText.isEmpty(e.caption)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})]})},e.id||e.url)}))}),!nt.RichText.isEmpty(a)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:a})]})}},au={attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"string",source:"html",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},save({attributes:e}){const{images:t,columns:o=Yc(e),imageCrop:n,linkTo:a}=e;return(0,Je.jsx)("ul",{className:`columns-${o} ${n?"is-cropped":""}`,children:t.map((e=>{let t;switch(a){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const o=(0,Je.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,Je.jsx)("li",{className:"blocks-gallery-item",children:(0,Je.jsxs)("figure",{children:[t?(0,Je.jsx)("a",{href:t,children:o}):o,e.caption&&e.caption.length>0&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",value:e.caption})]})},e.id||e.url)}))})},migrate:e=>Xc(e)},ru={attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"string",source:"html",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},isEligible:({images:e,ids:t})=>e&&e.length>0&&(!t&&e||t&&e&&t.length!==e.length||e.some(((e,o)=>!e&&null!==t[o]||parseInt(e,10)!==t[o]))),migrate:e=>Xc(e),supports:{align:!0},save({attributes:e}){const{images:t,columns:o=Yc(e),imageCrop:n,linkTo:a}=e;return(0,Je.jsx)("ul",{className:`columns-${o} ${n?"is-cropped":""}`,children:t.map((e=>{let t;switch(a){case"media":t=e.url;break;case"attachment":t=e.link}const o=(0,Je.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,Je.jsx)("li",{className:"blocks-gallery-item",children:(0,Je.jsxs)("figure",{children:[t?(0,Je.jsx)("a",{href:t,children:o}):o,e.caption&&e.caption.length>0&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",value:e.caption})]})},e.id||e.url)}))})}},iu={attributes:{images:{type:"array",default:[],source:"query",selector:"div.wp-block-gallery figure.blocks-gallery-image img",query:{url:{source:"attribute",attribute:"src"},alt:{source:"attribute",attribute:"alt",default:""},id:{source:"attribute",attribute:"data-id"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},align:{type:"string",default:"none"}},supports:{align:!0},save({attributes:e}){const{images:t,columns:o=Yc(e),align:n,imageCrop:a,linkTo:r}=e,i=ft(`columns-${o}`,{alignnone:"none"===n,"is-cropped":a});return(0,Je.jsx)("div",{className:i,children:t.map((e=>{let t;switch(r){case"media":t=e.url;break;case"attachment":t=e.link}const o=(0,Je.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id});return(0,Je.jsx)("figure",{className:"blocks-gallery-image",children:t?(0,Je.jsx)("a",{href:t,children:o}):o},e.id||e.url)}))})},migrate:e=>Xc(e)},su=[eu,tu,ou,nu,au,ru,iu],lu=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M12.5 14.5h-1V16h1c2.2 0 4-1.8 4-4s-1.8-4-4-4h-1v1.5h1c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5zm-4 1.5v-1.5h-1C6.1 14.5 5 13.4 5 12s1.1-2.5 2.5-2.5h1V8h-1c-2.2 0-4 1.8-4 4s1.8 4 4 4h1zm-1-3.2h5v-1.5h-5v1.5zM18 4H9c-1.1 0-2 .9-2 2v.5h1.5V6c0-.3.2-.5.5-.5h9c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5v-.5H7v.5c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2z"})}),cu=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})}),uu=(0,Je.jsx)(nt.BlockIcon,{icon:Gc});const du=(e,t="large")=>{const o=Object.fromEntries(Object.entries(null!=e?e:{}).filter((([e])=>["alt","id","link"].includes(e))));o.url=e?.sizes?.[t]?.url||e?.media_details?.sizes?.[t]?.source_url||e?.url||e?.source_url;const n=e?.sizes?.full?.url||e?.media_details?.sizes?.full?.source_url;return n&&(o.fullUrl=n),o},pu=20,mu="none",gu="media",hu="attachment",xu="custom",_u=["noreferrer","noopener"],bu=["image"];function yu(e,t,o,n,a){switch(o||t){case"file":case qc:return{href:e?.source_url||e?.url,linkDestination:gu,lightbox:a?.enabled?{...n?.lightbox,enabled:!1}:void 0};case"post":case Zc:return{href:e?.link,linkDestination:hu,lightbox:a?.enabled?{...n?.lightbox,enabled:!1}:void 0};case Wc:return{href:void 0,lightbox:a?.enabled?void 0:{...n?.lightbox,enabled:!0},linkDestination:mu};case Uc:return{href:void 0,linkDestination:mu,lightbox:void 0}}return{}}function fu(e,{rel:t}){const o=e?"_blank":void 0;let n;return n=o||t?function(e){let t=e;return void 0!==e&&t&&(_u.forEach((e=>{const o=new RegExp("\\b"+e+"\\b","gi");t=t.replace(o,"")})),t!==e&&(t=t.trim()),t||(t=void 0)),t}(t):void 0,{linkTarget:o,rel:n}}function vu(e){return bu.some((t=>0===e.type.indexOf(t)))}function ku(e){const{attributes:t,isSelected:o,setAttributes:n,mediaPlaceholder:a,insertBlocksAfter:r,blockProps:i,__unstableLayoutClassNames:s,isContentLocked:l,multiGallerySelection:c}=e,{align:u,columns:d,imageCrop:p}=t;return(0,Je.jsxs)("figure",{...i,className:ft(i.className,s,"blocks-gallery-grid",{[`align${u}`]:u,[`columns-${d}`]:void 0!==d,"columns-default":void 0===d,"is-cropped":p}),children:[i.children,o&&!i.children&&(0,Je.jsx)(Ye.View,{className:"blocks-gallery-media-placeholder-wrapper",children:a}),(0,Je.jsx)(Yt,{attributes:t,setAttributes:n,isSelected:o,insertBlocksAfter:r,showToolbarButton:!c&&!l,className:"blocks-gallery-caption",label:(0,ot.__)("Gallery caption text"),placeholder:(0,ot.__)("Add gallery caption")})]})}function wu(e,t,o){return(0,st.useMemo)((()=>function(){if(!e||0===e.length)return;const{imageSizes:n}=o();let a={};t&&(a=e.reduce(((e,t)=>{if(!t.id)return e;const o=n.reduce(((e,o)=>{const n=t.sizes?.[o.slug]?.url,a=t.media_details?.sizes?.[o.slug]?.source_url;return{...e,[o.slug]:n||a}}),{});return{...e,[parseInt(t.id,10)]:o}}),{}));const r=Object.values(a);return n.filter((({slug:e})=>r.some((t=>t[e])))).map((({name:e,slug:t})=>({value:t,label:e})))}()),[e,t])}function Cu(e,t){const[o,n]=(0,st.useState)([]);return(0,st.useMemo)((()=>function(){let a=!1;const r=o.filter((t=>e.find((e=>t.clientId===e.clientId))));r.length<o.length&&(a=!0);e.forEach((e=>{e.fromSavedContent&&!r.find((t=>t.id===e.id))&&(a=!0,r.push(e))}));const i=e.filter((e=>!r.find((t=>e.clientId&&t.clientId===e.clientId))&&t?.find((t=>t.id===e.id))&&!e.fromSavedContent));(a||i?.length>0)&&n([...r,...i]);return i.length>0?i:null}()),[e,t])}const ju=[];function Su({blockGap:e,clientId:t}){const o="var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )";let n,a=o,r=o;e&&(n="string"==typeof e?(0,nt.__experimentalGetGapCSSValue)(e):(0,nt.__experimentalGetGapCSSValue)(e?.top)||o,r="string"==typeof e?(0,nt.__experimentalGetGapCSSValue)(e):(0,nt.__experimentalGetGapCSSValue)(e?.left)||o,a=n===r?n:`${n} ${r}`);const i=`#block-${t} {\n\t\t--wp--style--unstable-gallery-gap: ${"0"===r?"0px":r};\n\t\tgap: ${a}\n\t}`;return(0,nt.useStyleOverride)({css:i}),null}const Bu=[{icon:lu,label:(0,ot.__)("Link images to attachment pages"),value:Zc,noticeText:(0,ot.__)("Attachment Pages")},{icon:cu,label:(0,ot.__)("Link images to media files"),value:qc,noticeText:(0,ot.__)("Media Files")},{icon:pn,label:(0,ot.__)("Enlarge on click"),value:Wc,noticeText:(0,ot.__)("Lightbox effect"),infoText:(0,ot.__)("Scale images with a lightbox effect")},{icon:jo,label:(0,ot._x)("None","Media item link option"),value:Uc,noticeText:(0,ot.__)("None")}],Tu=["image"],Nu=st.Platform.isNative?(0,ot.__)("Add media"):(0,ot.__)("Drag and drop images, upload, or choose from your library."),Pu=st.Platform.isNative?{type:"stepper"}:{},Iu={name:"core/image"},Mu=[];(0,Ns.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-to",(function(e){if("core/gallery"===e.name&&e.attributes?.images.length>0){const t=e.attributes.images.map((({url:t,id:o,alt:n})=>(0,Ke.createBlock)("core/image",{url:t,id:o?parseInt(o,10):null,alt:n,sizeSlug:e.attributes.sizeSlug,linkDestination:e.attributes.linkDestination})));delete e.attributes.ids,delete e.attributes.images,e.innerBlocks=t}return e})),(0,Ns.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-from",(function(e,t){const o=(Array.isArray(t)?t:[t]).find((t=>"core/gallery"===t.name&&t.innerBlocks.length>0&&!t.attributes.images?.length>0&&!e.name.includes("core/")));if(o){const e=o.innerBlocks.map((({attributes:{url:e,id:t,alt:o}})=>({url:e,id:t?parseInt(t,10):null,alt:o}))),t=e.map((({id:e})=>e));o.attributes.images=e,o.attributes.ids=t}return e}));const Du={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:e=>{let{align:t,sizeSlug:o}=e[0];t=e.every((e=>e.align===t))?t:void 0,o=e.every((e=>e.sizeSlug===o))?o:void 0;const n=e.filter((({url:e})=>e)).map((e=>(e.width=void 0,e.height=void 0,(0,Ke.createBlock)("core/image",e))));return(0,Ke.createBlock)("core/gallery",{align:t,sizeSlug:o},n)}},{type:"shortcode",tag:"gallery",transform({named:{ids:e,columns:t=3,link:o,orderby:n}}){const a=(e=>e?e.split(",").map((e=>parseInt(e,10))):[])(e).map((e=>parseInt(e,10)));let r=Uc;"post"===o?r=Zc:"file"===o&&(r=qc);return(0,Ke.createBlock)("core/gallery",{columns:parseInt(t,10),linkTo:r,randomOrder:"rand"===n},a.map((e=>(0,Ke.createBlock)("core/image",{id:e}))))},isMatch:({named:e})=>void 0!==e.ids},{type:"files",priority:1,isMatch:e=>1!==e.length&&e.every((e=>0===e.type.indexOf("image/"))),transform(e){const t=e.map((e=>(0,Ke.createBlock)("core/image",{blob:(0,lt.createBlobURL)(e)})));return(0,Ke.createBlock)("core/gallery",{},t)}}],to:[{type:"block",blocks:["core/image"],transform:({align:e},t)=>t.length>0?t.map((({attributes:{url:t,alt:o,caption:n,title:a,href:r,rel:i,linkClass:s,id:l,sizeSlug:c,linkDestination:u,linkTarget:d,anchor:p,className:m}})=>(0,Ke.createBlock)("core/image",{align:e,url:t,alt:o,caption:n,title:a,href:r,rel:i,linkClass:s,id:l,sizeSlug:c,linkDestination:u,linkTarget:d,anchor:p,className:m}))):(0,Ke.createBlock)("core/image",{align:e})}]},zu=Du,Au={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/gallery",title:"Gallery",category:"media",allowedBlocks:["core/image"],description:"Display multiple images in a rich gallery.",keywords:["images","photos"],textdomain:"default",attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"rich-text",source:"rich-text",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},shortCodeTransforms:{type:"array",items:{type:"object"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"rich-text",source:"rich-text",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},randomOrder:{type:"boolean",default:!1},fixedHeight:{type:"boolean",default:!0},linkTarget:{type:"string"},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"},allowResize:{type:"boolean",default:!1}},providesContext:{allowResize:"allowResize",imageCrop:"imageCrop",fixedHeight:"fixedHeight"},supports:{anchor:!0,align:!0,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{color:!0,radius:!0}},html:!1,units:["px","em","rem","vh","vw"],spacing:{margin:!0,padding:!0,blockGap:["horizontal","vertical"],__experimentalSkipSerialization:["blockGap"],__experimentalDefaultControls:{blockGap:!0,margin:!1,padding:!1}},color:{text:!1,background:!0,gradients:!0},layout:{allowSwitching:!1,allowInheriting:!1,allowEditing:!1,default:{type:"flex"}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-gallery-editor",style:"wp-block-gallery"},{name:Ru}=Au,Hu={icon:Gc,example:{attributes:{columns:2},innerBlocks:[{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg"}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"}}]},transforms:zu,edit:function(e){const{setAttributes:t,attributes:o,className:n,clientId:a,isSelected:r,insertBlocksAfter:i,isContentLocked:s,onFocus:l}=e,[c]=(0,nt.useSettings)("blocks.core/image.lightbox"),u=c?.allowEditing?Bu:Bu.filter((e=>e.value!==Wc)),{columns:d,imageCrop:p,randomOrder:m,linkTarget:g,linkTo:h,sizeSlug:x}=o,{__unstableMarkNextChangeAsNotPersistent:_,replaceInnerBlocks:b,updateBlockAttributes:y,selectBlock:f}=(0,it.useDispatch)(nt.store),{createSuccessNotice:v,createErrorNotice:k}=(0,it.useDispatch)(Rt.store),{getBlock:w,getSettings:C,innerBlockImages:j,blockWasJustInserted:S,multiGallerySelection:B}=(0,it.useSelect)((e=>{var t;const{getBlockName:o,getMultiSelectedBlockClientIds:n,getSettings:r,getBlock:i,wasBlockJustInserted:s}=e(nt.store),l=n();return{getBlock:i,getSettings:r,innerBlockImages:null!==(t=i(a)?.innerBlocks)&&void 0!==t?t:Mu,blockWasJustInserted:s(a,"inserter_menu"),multiGallerySelection:l.length&&l.every((e=>"core/gallery"===o(e)))}}),[a]),T=(0,st.useMemo)((()=>j?.map((e=>({clientId:e.clientId,id:e.attributes.id,url:e.attributes.url,attributes:e.attributes,fromSavedContent:Boolean(e.originalContent)})))),[j]),N=function(e){return(0,it.useSelect)((t=>{var o;const n=e.map((e=>e.attributes.id)).filter((e=>void 0!==e));return 0===n.length?ju:null!==(o=t(ct.store).getMediaItems({include:n.join(","),per_page:-1,orderby:"include"}))&&void 0!==o?o:ju}),[e])}(j),P=Cu(T,N);(0,st.useEffect)((()=>{P?.forEach((e=>{_(),y(e.clientId,{...M(e.attributes),id:e.id,align:void 0})}))}),[P]);const I=wu(N,r,C);function M(e){const t=e.id?N.find((({id:t})=>t===e.id)):null;let n,a;return e.className&&""!==e.className&&(n=e.className),a=e.linkTarget||e.rel?{linkTarget:e.linkTarget,rel:e.rel}:fu(g,o),{...du(t,x),...yu(t,h,e?.linkDestination),...a,className:n,sizeSlug:x,caption:e.caption||t.caption?.raw,alt:e.alt||t.alt_text}}function D(e){const t=st.Platform.isNative&&e.id?N.find((({id:t})=>t===e.id)):null,o=t?t?.media_type:e.type;return Tu.some((e=>0===o?.indexOf(e)))||e.blob}function z(e){const t="[object FileList]"===Object.prototype.toString.call(e),o=t?Array.from(e).map((e=>e.url?e:{blob:(0,lt.createBlobURL)(e)})):e;o.every(D)||k((0,ot.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-upload-invalid-file",type:"snackbar"});const n=o.filter((e=>e.url||D(e))).map((e=>e.url?e:{blob:e.blob||(0,lt.createBlobURL)(e)})),r=n.reduce(((e,t,o)=>(e[t.id]=o,e)),{}),i=t?j:j.filter((e=>n.find((t=>t.id===e.attributes.id)))),s=n.filter((e=>!i.find((t=>e.id===t.attributes.id)))).map((e=>(0,Ke.createBlock)("core/image",{id:e.id,blob:e.blob,url:e.url,caption:e.caption,alt:e.alt})));b(a,i.concat(s).sort(((e,t)=>r[e.attributes.id]-r[t.attributes.id]))),s?.length>0&&f(s[0].clientId)}function A(e){t({linkTo:e});const o={},n=[];w(a).innerBlocks.forEach((t=>{n.push(t.clientId);const a=t.attributes.id?N.find((({id:e})=>e===t.attributes.id)):null;o[t.clientId]=yu(a,e,!1,t.attributes,c)})),y(n,o,!0);const r=[...u].find((t=>t.value===e));v((0,ot.sprintf)((0,ot.__)("All gallery image links updated to: %s"),r.noticeText),{id:"gallery-attributes-linkTo",type:"snackbar"})}(0,st.useEffect)((()=>{h||(_(),t({linkTo:window?.wp?.media?.view?.settings?.defaultProps?.link||Uc}))}),[h]);const R=!!T.length,H=R&&T.some((e=>!!e.id)),L=T.some((e=>st.Platform.isNative?0===e.url?.indexOf("file:"):!e.id&&0===e.url?.indexOf("blob:"))),V=st.Platform.select({web:{addToGallery:!1,disableMediaButtons:L,value:{}},native:{addToGallery:H,isAppender:R,disableMediaButtons:R&&!r||L,value:H?T:{},autoOpenMediaUpload:!R&&r&&S,onFocus:l}}),F=(0,Je.jsx)(nt.MediaPlaceholder,{handleUpload:!1,icon:uu,labels:{title:(0,ot.__)("Gallery"),instructions:Nu},onSelect:z,accept:"image/*",allowedTypes:Tu,multiple:!0,onError:function(e){k(e,{type:"snackbar"})},...V}),E=(0,nt.useBlockProps)({className:ft(n,"has-nested-images")}),O=st.Platform.isNative&&{marginHorizontal:0,marginVertical:0},$=(0,nt.useInnerBlocksProps)(E,{defaultBlock:Iu,directInsert:!0,orientation:"horizontal",renderAppender:!1,...O});if(!R)return(0,Je.jsxs)(Ye.View,{...$,children:[$.children,F]});const G=h&&"none"!==h;return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.PanelBody,{title:(0,ot.__)("Settings"),children:[T.length>1&&(0,Je.jsx)(tt.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Columns"),value:d||(U=T.length,U?Math.min(3,U):3),onChange:function(e){t({columns:e})},min:1,max:Math.min(8,T.length),...Pu,required:!0,__next40pxDefaultSize:!0}),I?.length>0&&(0,Je.jsx)(tt.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Resolution"),help:(0,ot.__)("Select the size of the source images."),value:x,options:I,onChange:function(e){t({sizeSlug:e});const o={},n=[];w(a).innerBlocks.forEach((t=>{n.push(t.clientId);const a=t.attributes.id?N.find((({id:e})=>e===t.attributes.id)):null;o[t.clientId]=function(e,t){const o=e?.media_details?.sizes?.[t]?.source_url;return o?{url:o,width:void 0,height:void 0,sizeSlug:t}:{}}(a,e)})),y(n,o,!0);const r=I.find((t=>t.value===e));v((0,ot.sprintf)((0,ot.__)("All gallery image sizes updated to: %s"),r.label),{id:"gallery-attributes-sizeSlug",type:"snackbar"})},hideCancelButton:!0,size:"__unstable-large"}),st.Platform.isNative?(0,Je.jsx)(tt.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Link"),value:h,onChange:A,options:u,hideCancelButton:!0,size:"__unstable-large"}):null,(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Crop images to fit"),checked:!!p,onChange:function(){t({imageCrop:!p})}}),(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Randomize order"),checked:!!m,onChange:function(){t({randomOrder:!m})}}),G&&(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Open images in new tab"),checked:"_blank"===g,onChange:function(e){const o=e?"_blank":void 0;t({linkTarget:o});const n={},r=[];w(a).innerBlocks.forEach((e=>{r.push(e.clientId),n[e.clientId]=fu(o,e.attributes)})),y(r,n,!0);const i=e?(0,ot.__)("All gallery images updated to open in new tab"):(0,ot.__)("All gallery images updated to not open in new tab");v(i,{id:"gallery-attributes-openInNewTab",type:"snackbar"})}}),st.Platform.isWeb&&!I&&H&&(0,Je.jsxs)(tt.BaseControl,{className:"gallery-image-sizes",__nextHasNoMarginBottom:!0,children:[(0,Je.jsx)(tt.BaseControl.VisualLabel,{children:(0,ot.__)("Resolution")}),(0,Je.jsxs)(Ye.View,{className:"gallery-image-sizes__loading",children:[(0,Je.jsx)(tt.Spinner,{}),(0,ot.__)("Loading options…")]})]})]})}),st.Platform.isWeb?(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(tt.ToolbarDropdownMenu,{icon:Co,label:(0,ot.__)("Link"),children:({onClose:e})=>(0,Je.jsx)(tt.MenuGroup,{children:u.map((t=>{const o=h===t.value;return(0,Je.jsx)(tt.MenuItem,{isSelected:o,className:ft("components-dropdown-menu__menu-item",{"is-active":o}),iconPosition:"left",icon:t.icon,onClick:()=>{A(t.value),e()},role:"menuitemradio",info:t.infoText,children:t.label},t.value)}))})})}):null,st.Platform.isWeb&&(0,Je.jsxs)(Je.Fragment,{children:[!B&&(0,Je.jsx)(nt.BlockControls,{group:"other",children:(0,Je.jsx)(nt.MediaReplaceFlow,{allowedTypes:Tu,accept:"image/*",handleUpload:!1,onSelect:z,name:(0,ot.__)("Add"),multiple:!0,mediaIds:T.filter((e=>e.id)).map((e=>e.id)),addToGallery:H})}),(0,Je.jsx)(Su,{blockGap:o.style?.spacing?.blockGap,clientId:a})]}),(0,Je.jsx)(ku,{...e,isContentLocked:s,images:T,mediaPlaceholder:!R||st.Platform.isNative?F:void 0,blockProps:$,insertBlocksAfter:i,multiGallerySelection:B})]});var U},save:function({attributes:e}){const{caption:t,columns:o,imageCrop:n}=e,a=ft("has-nested-images",{[`columns-${o}`]:void 0!==o,"columns-default":void 0===o,"is-cropped":n}),r=nt.useBlockProps.save({className:a}),i=nt.useInnerBlocksProps.save(r);return(0,Je.jsxs)("figure",{...i,children:[i.children,!nt.RichText.isEmpty(t)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",className:ft("blocks-gallery-caption",(0,nt.__experimentalGetElementClassName)("caption")),value:t})]})},deprecated:su},Lu=()=>et({name:Ru,metadata:Au,settings:Hu}),Vu=e=>{if(e.tagName||(e={...e,tagName:"div"}),!e.customTextColor&&!e.customBackgroundColor)return e;const t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor);const{customTextColor:o,customBackgroundColor:n,...a}=e;return{...a,style:t}},Fu=[{attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},supports:{__experimentalOnEnter:!0,__experimentalSettings:!0,align:["wide","full"],anchor:!0,ariaLabel:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:["top","bottom"],padding:!0,blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},layout:!0},save:({attributes:{tagName:e}})=>(0,Je.jsx)(e,{...nt.useInnerBlocksProps.save(nt.useBlockProps.save())}),isEligible:({layout:e})=>e?.inherit||e?.contentSize&&"constrained"!==e?.type,migrate:e=>{const{layout:t=null}=e;if(t?.inherit||t?.contentSize)return{...e,layout:{...t,type:"constrained"}}}},{attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},supports:{align:["wide","full"],anchor:!0,color:{gradients:!0,link:!0},spacing:{padding:!0},__experimentalBorder:{radius:!0}},save({attributes:e}){const{tagName:t}=e;return(0,Je.jsx)(t,{...nt.useBlockProps.save(),children:(0,Je.jsx)("div",{className:"wp-block-group__inner-container",children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:Vu,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,textColor:n,customTextColor:a}=e,r=(0,nt.getColorClassName)("background-color",t),i=(0,nt.getColorClassName)("color",n),s=ft(r,i,{"has-text-color":n||a,"has-background":t||o}),l={backgroundColor:r?void 0:o,color:i?void 0:a};return(0,Je.jsx)("div",{className:s,style:l,children:(0,Je.jsx)("div",{className:"wp-block-group__inner-container",children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},migrate:Vu,supports:{align:["wide","full"],anchor:!0,html:!1},save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,textColor:n,customTextColor:a}=e,r=(0,nt.getColorClassName)("background-color",t),i=(0,nt.getColorClassName)("color",n),s=ft(r,{"has-text-color":n||a,"has-background":t||o}),l={backgroundColor:r?void 0:o,color:i?void 0:a};return(0,Je.jsx)("div",{className:s,style:l,children:(0,Je.jsx)("div",{className:"wp-block-group__inner-container",children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:Vu,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o}=e,n=(0,nt.getColorClassName)("background-color",t),a=ft(n,{"has-background":t||o}),r={backgroundColor:n?void 0:o};return(0,Je.jsx)("div",{className:a,style:r,children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})}}],Eu=Fu,Ou=(e="group")=>{const t={group:(0,Je.jsx)(tt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Je.jsx)(tt.Path,{d:"M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z"})}),"group-row":(0,Je.jsx)(tt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Je.jsx)(tt.Path,{d:"M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z"})}),"group-stack":(0,Je.jsx)(tt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Je.jsx)(tt.Path,{d:"M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm0 17a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Z"})}),"group-grid":(0,Je.jsx)(tt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Je.jsx)(tt.Path,{d:"M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10ZM0 27a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V27Z"})})};return t?.[e]};const $u=function({name:e,onSelect:t}){const o=(0,it.useSelect)((t=>t(Ke.store).getBlockVariations(e,"block")),[e]),n=(0,nt.useBlockProps)({className:"wp-block-group__placeholder"});return(0,st.useEffect)((()=>{o&&1===o.length&&t(o[0])}),[t,o]),(0,Je.jsx)("div",{...n,children:(0,Je.jsx)(tt.Placeholder,{instructions:(0,ot.__)("Group blocks together. Select a layout:"),children:(0,Je.jsx)("ul",{role:"list",className:"wp-block-group-placeholder__variations","aria-label":(0,ot.__)("Block variations"),children:o.map((e=>(0,Je.jsx)("li",{children:(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:Ou(e.name),iconSize:48,onClick:()=>t(e),className:"wp-block-group-placeholder__variation-button",label:`${e.title}: ${e.description}`})},e.name)))})})})};function Gu({tagName:e,onSelectTagName:t}){return(0,Je.jsx)(nt.InspectorControls,{group:"advanced",children:(0,Je.jsx)(tt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("HTML element"),options:[{label:(0,ot.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}],value:e,onChange:t,help:sa[e]})})}const Uu=function({attributes:e,name:t,setAttributes:o,clientId:n}){const{hasInnerBlocks:a,themeSupportsLayout:r}=(0,it.useSelect)((e=>{const{getBlock:t,getSettings:o}=e(nt.store),a=t(n);return{hasInnerBlocks:!(!a||!a.innerBlocks.length),themeSupportsLayout:o()?.supportsLayout}}),[n]),{tagName:i="div",templateLock:s,allowedBlocks:l,layout:c={}}=e,{type:u="default"}=c,d=r||"flex"===u||"grid"===u,p=(0,st.useRef)(),m=(0,nt.useBlockProps)({ref:p}),[g,h]=function({attributes:e={style:void 0,backgroundColor:void 0,textColor:void 0,fontSize:void 0},usedLayoutType:t="",hasInnerBlocks:o=!1}){const{style:n,backgroundColor:a,textColor:r,fontSize:i}=e,[s,l]=(0,st.useState)(!(o||a||i||r||n||"flex"===t||"grid"===t));return(0,st.useEffect)((()=>{(o||a||i||r||n||"flex"===t)&&l(!1)}),[a,i,r,n,t,o]),[s,l]}({attributes:e,usedLayoutType:u,hasInnerBlocks:a});let x;g?x=!1:a||(x=nt.InnerBlocks.ButtonBlockAppender);const _=(0,nt.useInnerBlocksProps)(d?m:{className:"wp-block-group__inner-container"},{dropZoneElement:p.current,templateLock:s,allowedBlocks:l,renderAppender:x}),{selectBlock:b}=(0,it.useDispatch)(nt.store);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Gu,{tagName:i,onSelectTagName:e=>o({tagName:e})}),g&&(0,Je.jsxs)(Ye.View,{children:[_.children,(0,Je.jsx)($u,{name:t,onSelect:e=>{o(e.attributes),b(n,-1),h(!1)}})]}),d&&!g&&(0,Je.jsx)(i,{..._}),!d&&!g&&(0,Je.jsx)(i,{...m,children:(0,Je.jsx)("div",{..._})})]})};const qu={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert(e){const t=["wide","full"],o=e.reduce(((e,o)=>{const{align:n}=o.attributes;return t.indexOf(n)>t.indexOf(e)?n:e}),void 0),n=e.map((e=>(0,Ke.createBlock)(e.name,e.attributes,e.innerBlocks)));return(0,Ke.createBlock)("core/group",{align:o,layout:{type:"constrained"}},n)}}]},Wu=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z"})}),Zu=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z"})}),Qu=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})}),Ku={innerBlocks:[{name:"core/paragraph",attributes:{customTextColor:"#cf2e2e",fontSize:"large",content:(0,ot.__)("One.")}},{name:"core/paragraph",attributes:{customTextColor:"#ff6900",fontSize:"large",content:(0,ot.__)("Two.")}},{name:"core/paragraph",attributes:{customTextColor:"#fcb900",fontSize:"large",content:(0,ot.__)("Three.")}},{name:"core/paragraph",attributes:{customTextColor:"#00d084",fontSize:"large",content:(0,ot.__)("Four.")}},{name:"core/paragraph",attributes:{customTextColor:"#0693e3",fontSize:"large",content:(0,ot.__)("Five.")}},{name:"core/paragraph",attributes:{customTextColor:"#9b51e0",fontSize:"large",content:(0,ot.__)("Six.")}}]},Yu=[{name:"group",title:(0,ot.__)("Group"),description:(0,ot.__)("Gather blocks in a container."),attributes:{layout:{type:"constrained"}},isDefault:!0,scope:["block","inserter","transform"],isActive:e=>!e.layout||!e.layout?.type||"default"===e.layout?.type||"constrained"===e.layout?.type,icon:Ac},{name:"group-row",title:(0,ot._x)("Row","single horizontal line"),description:(0,ot.__)("Arrange blocks horizontally."),attributes:{layout:{type:"flex",flexWrap:"nowrap"}},scope:["block","inserter","transform"],isActive:e=>"flex"===e.layout?.type&&(!e.layout?.orientation||"horizontal"===e.layout?.orientation),icon:Wu,example:Ku},{name:"group-stack",title:(0,ot.__)("Stack"),description:(0,ot.__)("Arrange blocks vertically."),attributes:{layout:{type:"flex",orientation:"vertical"}},scope:["block","inserter","transform"],isActive:e=>"flex"===e.layout?.type&&"vertical"===e.layout?.orientation,icon:Zu,example:Ku},{name:"group-grid",title:(0,ot.__)("Grid"),description:(0,ot.__)("Arrange blocks in a grid."),attributes:{layout:{type:"grid"}},scope:["block","inserter","transform"],isActive:e=>"grid"===e.layout?.type,icon:Qu,example:Ku}],Ju=Yu,Xu={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/group",title:"Group",category:"design",description:"Gather blocks in a layout container.",keywords:["container","wrapper","row","section"],textdomain:"default",attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]},allowedBlocks:{type:"array"}},supports:{__experimentalOnEnter:!0,__experimentalOnMerge:!0,__experimentalSettings:!0,align:["wide","full"],anchor:!0,ariaLabel:!0,html:!1,background:{backgroundImage:!0,backgroundSize:!0,__experimentalDefaultControls:{backgroundImage:!0}},color:{gradients:!0,heading:!0,button:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},shadow:!0,spacing:{margin:["top","bottom"],padding:!0,blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},dimensions:{minHeight:!0},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},position:{sticky:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowSizingOnChildren:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-group-editor",style:"wp-block-group"},{name:ed}=Xu,td={icon:Ac,example:{attributes:{layout:{type:"constrained",justifyContent:"center"},style:{spacing:{padding:{top:"4em",right:"3em",bottom:"4em",left:"3em"}}}},innerBlocks:[{name:"core/heading",attributes:{content:(0,ot.__)("La Mancha"),textAlign:"center"}},{name:"core/paragraph",attributes:{align:"center",content:(0,ot.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}},{name:"core/spacer",attributes:{height:"10px"}},{name:"core/button",attributes:{text:(0,ot.__)("Read more")}}],viewportWidth:600},transforms:qu,edit:Uu,save:function({attributes:{tagName:e}}){return(0,Je.jsx)(e,{...nt.useInnerBlocksProps.save(nt.useBlockProps.save())})},deprecated:Eu,variations:Ju},od=()=>et({name:ed,metadata:Xu,settings:td}),nd=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M6 5V18.5911L12 13.8473L18 18.5911V5H6Z"})}),ad={className:!1,anchor:!0},rd={align:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:""},level:{type:"number",default:2},placeholder:{type:"string"}},id=e=>{if(!e.customTextColor)return e;const t={color:{text:e.customTextColor}},{customTextColor:o,...n}=e;return{...n,style:t}},sd=["left","right","center"],ld=e=>{const{align:t,...o}=e;return sd.includes(t)?{...o,textAlign:t}:e},cd={supports:ad,attributes:{...rd,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>id(ld(e)),save({attributes:e}){const{align:t,level:o,content:n,textColor:a,customTextColor:r}=e,i="h"+o,s=(0,nt.getColorClassName)("color",a),l=ft({[s]:s});return(0,Je.jsx)(nt.RichText.Content,{className:l||void 0,tagName:i,style:{textAlign:t,color:s?void 0:r},value:n})}},ud={attributes:{...rd,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>id(ld(e)),save({attributes:e}){const{align:t,content:o,customTextColor:n,level:a,textColor:r}=e,i="h"+a,s=(0,nt.getColorClassName)("color",r),l=ft({[s]:s,[`has-text-align-${t}`]:t});return(0,Je.jsx)(nt.RichText.Content,{className:l||void 0,tagName:i,style:{color:s?void 0:n},value:o})},supports:ad},dd={supports:ad,attributes:{...rd,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>id(ld(e)),save({attributes:e}){const{align:t,content:o,customTextColor:n,level:a,textColor:r}=e,i="h"+a,s=(0,nt.getColorClassName)("color",r),l=ft({[s]:s,"has-text-color":r||n,[`has-text-align-${t}`]:t});return(0,Je.jsx)(nt.RichText.Content,{className:l||void 0,tagName:i,style:{color:s?void 0:n},value:o})}},pd={supports:{align:["wide","full"],anchor:!0,className:!1,color:{link:!0},fontSize:!0,lineHeight:!0,__experimentalSelector:{"core/heading/h1":"h1","core/heading/h2":"h2","core/heading/h3":"h3","core/heading/h4":"h4","core/heading/h5":"h5","core/heading/h6":"h6"},__unstablePasteTextInline:!0},attributes:rd,isEligible:({align:e})=>sd.includes(e),migrate:ld,save({attributes:e}){const{align:t,content:o,level:n}=e,a="h"+n,r=ft({[`has-text-align-${t}`]:t});return(0,Je.jsx)(a,{...nt.useBlockProps.save({className:r}),children:(0,Je.jsx)(nt.RichText.Content,{value:o})})}},md={supports:{align:["wide","full"],anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0,textTransform:!0}},__experimentalSelector:"h1,h2,h3,h4,h5,h6",__unstablePasteTextInline:!0,__experimentalSlashInserter:!0},attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",role:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},save({attributes:e}){const{textAlign:t,content:o,level:n}=e,a="h"+n,r=ft({[`has-text-align-${t}`]:t});return(0,Je.jsx)(a,{...nt.useBlockProps.save({className:r}),children:(0,Je.jsx)(nt.RichText.Content,{value:o})})}},gd=[md,pd,dd,ud,cd],hd={},xd=e=>xc()((e=>{const t=document.createElement("div");return t.innerHTML=e,t.innerText})(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,""),_d=(e,t)=>{const o=xd(t);if(""===o)return null;delete hd[e];let n=o,a=0;for(;Object.values(hd).includes(n);)a+=1,n=o+"-"+a;return n},bd=(e,t)=>{hd[e]=t};const yd=function({attributes:e,setAttributes:t,mergeBlocks:o,onReplace:n,style:a,clientId:r}){const{textAlign:i,content:s,level:l,levelOptions:c,placeholder:u,anchor:d}=e,p="h"+l,m=(0,nt.useBlockProps)({className:ft({[`has-text-align-${i}`]:i}),style:a}),g=(0,nt.useBlockEditingMode)(),{canGenerateAnchors:h}=(0,it.useSelect)((e=>{const{getGlobalBlockCount:t,getSettings:o}=e(nt.store);return{canGenerateAnchors:!!o().generateAnchors||t("core/table-of-contents")>0}}),[]),{__unstableMarkNextChangeAsNotPersistent:x}=(0,it.useDispatch)(nt.store);return(0,st.useEffect)((()=>{if(h)return!d&&s&&(x(),t({anchor:_d(r,s)})),bd(r,d),()=>bd(r,null)}),[d,s,r,h]),(0,Je.jsxs)(Je.Fragment,{children:["default"===g&&(0,Je.jsxs)(nt.BlockControls,{group:"block",children:[(0,Je.jsx)(nt.HeadingLevelDropdown,{value:l,options:c,onChange:e=>t({level:e})}),(0,Je.jsx)(nt.AlignmentControl,{value:i,onChange:e=>{t({textAlign:e})}})]}),(0,Je.jsx)(nt.RichText,{identifier:"content",tagName:p,value:s,onChange:e=>{const o={content:e};!h||d&&e&&_d(r,s)!==d||(o.anchor=_d(r,e)),t(o)},onMerge:o,onReplace:n,onRemove:()=>n([]),placeholder:u||(0,ot.__)("Heading"),textAlign:i,...st.Platform.isNative&&{deleteEnter:!0},...m})]})};const fd={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((({content:e,anchor:t,align:o,metadata:n})=>(0,Ke.createBlock)("core/heading",{content:e,anchor:t,textAlign:o,metadata:Lo(n,"core/heading",(({content:e})=>({content:e})))})))},{type:"raw",selector:"h1,h2,h3,h4,h5,h6",schema:({phrasingContentSchema:e,isPaste:t})=>{const o={children:e,attributes:t?[]:["style","id"]};return{h1:o,h2:o,h3:o,h4:o,h5:o,h6:o}},transform(e){const t=(0,Ke.getBlockAttributes)("core/heading",e.outerHTML),{textAlign:o}=e.style||{};var n;return t.level=(n=e.nodeName,Number(n.substr(1))),"left"!==o&&"center"!==o&&"right"!==o||(t.align=o),(0,Ke.createBlock)("core/heading",t)}},...[1,2,3,4,5,6].map((e=>({type:"prefix",prefix:Array(e+1).join("#"),transform:t=>(0,Ke.createBlock)("core/heading",{level:e,content:t})}))),...[1,2,3,4,5,6].map((e=>({type:"enter",regExp:new RegExp(`^/(h|H)${e}$`),transform:()=>(0,Ke.createBlock)("core/heading",{level:e})})))],to:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((({content:e,textAlign:t,metadata:o})=>(0,Ke.createBlock)("core/paragraph",{content:e,align:t,metadata:Lo(o,"core/paragraph",(({content:e})=>({content:e})))})))}]},vd=fd,kd={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/heading",title:"Heading",category:"text",description:"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",keywords:["title","subtitle"],textdomain:"default",attributes:{textAlign:{type:"string"},content:{type:"rich-text",source:"rich-text",selector:"h1,h2,h3,h4,h5,h6",role:"content"},level:{type:"number",default:2},levelOptions:{type:"array"},placeholder:{type:"string"}},supports:{align:["wide","full"],anchor:!0,className:!0,splitting:!0,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},__unstablePasteTextInline:!0,__experimentalSlashInserter:!0,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-heading-editor",style:"wp-block-heading"},{name:wd}=kd,Cd={icon:nd,example:{attributes:{content:(0,ot.__)("Code is Poetry"),level:2,textAlign:"center"}},__experimentalLabel(e,{context:t}){const{content:o,level:n}=e,a=e?.metadata?.name,r=o?.trim().length>0;return"list-view"===t&&(a||r)?a||o:"accessibility"===t?r?(0,ot.sprintf)((0,ot.__)("Level %1$s. %2$s"),n,o):(0,ot.sprintf)((0,ot.__)("Level %s. Empty."),n):void 0},transforms:vd,deprecated:gd,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:yd,save:function({attributes:e}){const{textAlign:t,content:o,level:n}=e,a="h"+n,r=ft({[`has-text-align-${t}`]:t});return(0,Je.jsx)(a,{...nt.useBlockProps.save({className:r}),children:(0,Je.jsx)(nt.RichText.Content,{value:o})})}},jd=()=>et({name:wd,metadata:kd,settings:Cd}),Sd=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})}),Bd=e=>e.preventDefault();const Td={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/home-link",category:"design",parent:["core/navigation"],title:"Home Link",description:"Create a link that always points to the homepage of the site. Usually not necessary if there is already a site title link present in the header.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","fontSize","customFontSize","style"],supports:{reusable:!1,html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-home-link-editor",style:"wp-block-home-link"},{name:Nd}=Td,Pd={icon:Sd,edit:function({attributes:e,setAttributes:t,context:o}){var n;const a=(0,it.useSelect)((e=>e(ct.store).getEntityRecord("root","__unstableBase")?.home),[]),{textColor:r,backgroundColor:i,style:s}=o,l=(0,nt.useBlockProps)({className:ft("wp-block-navigation-item",{"has-text-color":!!r||!!s?.color?.text,[`has-${r}-color`]:!!r,"has-background":!!i||!!s?.color?.background,[`has-${i}-background-color`]:!!i}),style:{color:s?.color?.text,backgroundColor:s?.color?.background}});return(0,Je.jsx)("div",{...l,children:(0,Je.jsx)("a",{className:"wp-block-home-link__content wp-block-navigation-item__content",href:a,onClick:Bd,children:(0,Je.jsx)(nt.RichText,{identifier:"label",className:"wp-block-home-link__label",value:null!==(n=e.label)&&void 0!==n?n:(0,ot.__)("Home"),onChange:e=>{t({label:e})},"aria-label":(0,ot.__)("Home link text"),placeholder:(0,ot.__)("Add home link"),withoutInteractiveFormatting:!0})})})},save:function(){return(0,Je.jsx)(nt.InnerBlocks.Content,{})},example:{attributes:{label:(0,ot._x)("Home Link","block example")}}},Id=()=>et({name:Nd,metadata:Td,settings:Pd}),Md=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z"})});function Dd({content:e,isSelected:t}){const o=(0,it.useSelect)((e=>e(nt.store).getSettings().styles),[]),n=(0,st.useMemo)((()=>["\n\thtml,body,:root {\n\t\tmargin: 0 !important;\n\t\tpadding: 0 !important;\n\t\toverflow: visible !important;\n\t\tmin-height: auto !important;\n\t}\n",...(0,nt.transformStyles)((null!=o?o:[]).filter((e=>e.css)))]),[o]);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.SandBox,{html:e,styles:n,title:(0,ot.__)("Custom HTML Preview"),tabIndex:-1}),!t&&(0,Je.jsx)("div",{className:"block-library-html__preview-overlay"})]})}const zd={from:[{type:"block",blocks:["core/code"],transform:({content:e})=>(0,Ke.createBlock)("core/html",{content:(0,Ho.create)({html:e}).text})}]},Ad=zd,Rd={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/html",title:"Custom HTML",category:"widgets",description:"Add custom HTML code and preview it as you edit.",keywords:["embed"],textdomain:"default",attributes:{content:{type:"string",source:"raw"}},supports:{customClassName:!1,className:!1,html:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-html-editor"},{name:Hd}=Rd,Ld={icon:Md,example:{attributes:{content:"<marquee>"+(0,ot.__)("Welcome to the wonderful world of blocks…")+"</marquee>"}},edit:function e({attributes:t,setAttributes:o,isSelected:n}){const[a,r]=(0,st.useState)(),i=(0,st.useContext)(tt.Disabled.Context),s=(0,ut.useInstanceId)(e,"html-edit-desc"),l=(0,it.useSelect)((e=>e(nt.store).getSettings().isPreviewMode),[]),c=(0,nt.useBlockProps)({className:"block-library-html__edit","aria-describedby":a?s:void 0});return(0,Je.jsxs)("div",{...c,children:[(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsxs)(tt.ToolbarGroup,{children:[(0,Je.jsx)(tt.ToolbarButton,{isPressed:!a,onClick:function(){r(!1)},children:"HTML"}),(0,Je.jsx)(tt.ToolbarButton,{isPressed:a,onClick:function(){r(!0)},children:(0,ot.__)("Preview")})]})}),a||l||i?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Dd,{content:t.content,isSelected:n}),(0,Je.jsx)(tt.VisuallyHidden,{id:s,children:(0,ot.__)("HTML preview is not yet fully accessible. Please switch screen reader to virtualized mode to navigate the below iFrame.")})]}):(0,Je.jsx)(nt.PlainText,{value:t.content,onChange:e=>o({content:e}),placeholder:(0,ot.__)("Write HTML…"),"aria-label":(0,ot.__)("HTML")})]})},save:function({attributes:e}){return(0,Je.jsx)(st.RawHTML,{children:e.content})},transforms:Ad},Vd=()=>et({name:Hd,metadata:Rd,settings:Ld}),Fd={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"}},save({attributes:e}){const{url:t,alt:o,caption:n,align:a,href:r,width:i,height:s}=e,l=i||s?{width:i,height:s}:{},c=(0,Je.jsx)("img",{src:t,alt:o,...l});let u={};return i?u={width:i}:"left"!==a&&"right"!==a||(u={maxWidth:"50%"}),(0,Je.jsxs)("figure",{className:a?`align${a}`:null,style:u,children:[r?(0,Je.jsx)("a",{href:r,children:c}):c,!nt.RichText.isEmpty(n)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",value:n})]})}},Ed={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"}},save({attributes:e}){const{url:t,alt:o,caption:n,align:a,href:r,width:i,height:s,id:l}=e,c=(0,Je.jsx)("img",{src:t,alt:o,className:l?`wp-image-${l}`:null,width:i,height:s});return(0,Je.jsxs)("figure",{className:a?`align${a}`:null,children:[r?(0,Je.jsx)("a",{href:r,children:c}):c,!nt.RichText.isEmpty(n)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",value:n})]})}},Od={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"},linkDestination:{type:"string",default:"none"}},save({attributes:e}){const{url:t,alt:o,caption:n,align:a,href:r,width:i,height:s,id:l}=e,c=ft({[`align${a}`]:a,"is-resized":i||s}),u=(0,Je.jsx)("img",{src:t,alt:o,className:l?`wp-image-${l}`:null,width:i,height:s});return(0,Je.jsxs)("figure",{className:c,children:[r?(0,Je.jsx)("a",{href:r,children:u}):u,!nt.RichText.isEmpty(n)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",value:n})]})}},$d={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0},save({attributes:e}){const{url:t,alt:o,caption:n,align:a,href:r,rel:i,linkClass:s,width:l,height:c,id:u,linkTarget:d,sizeSlug:p,title:m}=e,g=i||void 0,h=ft({[`align${a}`]:a,[`size-${p}`]:p,"is-resized":l||c}),x=(0,Je.jsx)("img",{src:t,alt:o,className:u?`wp-image-${u}`:null,width:l,height:c,title:m}),_=(0,Je.jsxs)(Je.Fragment,{children:[r?(0,Je.jsx)("a",{className:s,href:r,target:d,rel:g,children:x}):x,!nt.RichText.isEmpty(n)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",value:n})]});return"left"===a||"right"===a||"center"===a?(0,Je.jsx)("div",{...nt.useBlockProps.save(),children:(0,Je.jsx)("figure",{className:h,children:_})}):(0,Je.jsx)("figure",{...nt.useBlockProps.save({className:h}),children:_})}},Gd={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{__experimentalDuotone:"img",text:!1,background:!1},__experimentalBorder:{radius:!0,__experimentalDefaultControls:{radius:!0}},__experimentalStyle:{spacing:{margin:"0 0 1em 0"}}},save({attributes:e}){const{url:t,alt:o,caption:n,align:a,href:r,rel:i,linkClass:s,width:l,height:c,id:u,linkTarget:d,sizeSlug:p,title:m}=e,g=i||void 0,h=ft({[`align${a}`]:a,[`size-${p}`]:p,"is-resized":l||c}),x=(0,Je.jsx)("img",{src:t,alt:o,className:u?`wp-image-${u}`:null,width:l,height:c,title:m}),_=(0,Je.jsxs)(Je.Fragment,{children:[r?(0,Je.jsx)("a",{className:s,href:r,target:d,rel:g,children:x}):x,!nt.RichText.isEmpty(n)&&(0,Je.jsx)(nt.RichText.Content,{tagName:"figcaption",value:n})]});return(0,Je.jsx)("figure",{...nt.useBlockProps.save({className:h}),children:_})}},Ud={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",role:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",role:"content"},caption:{type:"string",source:"html",selector:"figcaption",role:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",role:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",role:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",role:"content"},width:{type:"number"},height:{type:"number"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate(e){const{height:t,width:o}=e;return{...e,width:"number"==typeof o?`${o}px`:o,height:"number"==typeof t?`${t}px`:t}},save({attributes:e}){const{url:t,alt:o,caption:n,align:a,href:r,rel:i,linkClass:s,width:l,height:c,aspectRatio:u,scale:d,id:p,linkTarget:m,sizeSlug:g,title:h}=e,x=i||void 0,_=(0,nt.__experimentalGetBorderClassesAndStyles)(e),b=ft({[`align${a}`]:a,[`size-${g}`]:g,"is-resized":l||c,"has-custom-border":!!_.className||_.style&&Object.keys(_.style).length>0}),y=ft(_.className,{[`wp-image-${p}`]:!!p}),f=(0,Je.jsx)("img",{src:t,alt:o,className:y||void 0,style:{..._.style,aspectRatio:u,objectFit:d},width:l,height:c,title:h}),v=(0,Je.jsxs)(Je.Fragment,{children:[r?(0,Je.jsx)("a",{className:s,href:r,target:m,rel:x,children:f}):f,!nt.RichText.isEmpty(n)&&(0,Je.jsx)(nt.RichText.Content,{className:(0,nt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:n})]});return(0,Je.jsx)("figure",{...nt.useBlockProps.save({className:b}),children:v})}},qd={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",role:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",role:"content"},caption:{type:"string",source:"html",selector:"figcaption",role:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",role:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",role:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",role:"content"},width:{type:"number"},height:{type:"number"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate:({width:e,height:t,...o})=>({...o,width:`${e}px`,height:`${t}px`}),save({attributes:e}){const{url:t,alt:o,caption:n,align:a,href:r,rel:i,linkClass:s,width:l,height:c,aspectRatio:u,scale:d,id:p,linkTarget:m,sizeSlug:g,title:h}=e,x=i||void 0,_=(0,nt.__experimentalGetBorderClassesAndStyles)(e),b=ft({[`align${a}`]:a,[`size-${g}`]:g,"is-resized":l||c,"has-custom-border":!!_.className||_.style&&Object.keys(_.style).length>0}),y=ft(_.className,{[`wp-image-${p}`]:!!p}),f=(0,Je.jsx)("img",{src:t,alt:o,className:y||void 0,style:{..._.style,aspectRatio:u,objectFit:d,width:l,height:c},width:l,height:c,title:h}),v=(0,Je.jsxs)(Je.Fragment,{children:[r?(0,Je.jsx)("a",{className:s,href:r,target:m,rel:x,children:f}):f,!nt.RichText.isEmpty(n)&&(0,Je.jsx)(nt.RichText.Content,{className:(0,nt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:n})]});return(0,Je.jsx)("figure",{...nt.useBlockProps.save({className:b}),children:v})}},Wd={attributes:{align:{type:"string"},behaviors:{type:"object"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",role:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",role:"content"},caption:{type:"string",source:"html",selector:"figcaption",role:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",role:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",role:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",role:"content"},width:{type:"string"},height:{type:"string"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate({width:e,height:t,...o}){if(!o.behaviors?.lightbox)return o;const{behaviors:{lightbox:{enabled:n}}}=o,a={...o,lightbox:{enabled:n}};return delete a.behaviors,a},isEligible:e=>!!e.behaviors,save({attributes:e}){const{url:t,alt:o,caption:n,align:a,href:r,rel:i,linkClass:s,width:l,height:c,aspectRatio:u,scale:d,id:p,linkTarget:m,sizeSlug:g,title:h}=e,x=i||void 0,_=(0,nt.__experimentalGetBorderClassesAndStyles)(e),b=ft({[`align${a}`]:a,[`size-${g}`]:g,"is-resized":l||c,"has-custom-border":!!_.className||_.style&&Object.keys(_.style).length>0}),y=ft(_.className,{[`wp-image-${p}`]:!!p}),f=(0,Je.jsx)("img",{src:t,alt:o,className:y||void 0,style:{..._.style,aspectRatio:u,objectFit:d,width:l,height:c},title:h}),v=(0,Je.jsxs)(Je.Fragment,{children:[r?(0,Je.jsx)("a",{className:s,href:r,target:m,rel:x,children:f}):f,!nt.RichText.isEmpty(n)&&(0,Je.jsx)(nt.RichText.Content,{className:(0,nt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:n})]});return(0,Je.jsx)("figure",{...nt.useBlockProps.save({className:b}),children:v})}},Zd=[Wd,qd,Ud,Gd,$d,Od,Ed,Fd],Qd=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})}),Kd=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),Yd=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M18 20v-2h2v-1.5H7.75a.25.25 0 0 1-.25-.25V4H6v2H4v1.5h2v8.75c0 .966.784 1.75 1.75 1.75h8.75v2H18ZM9.273 7.5h6.977a.25.25 0 0 1 .25.25v6.977H18V7.75A1.75 1.75 0 0 0 16.25 6H9.273v1.5Z"})}),Jd=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z"})}),Xd=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})}),{DimensionsTool:ep,ResolutionTool:tp}=Ot(nt.privateApis),op=[{value:"cover",label:(0,ot._x)("Cover","Scale option for dimensions control"),help:(0,ot.__)("Image covers the space evenly.")},{value:"contain",label:(0,ot._x)("Contain","Scale option for dimensions control"),help:(0,ot.__)("Image is contained without distortion.")}],np={placement:"bottom-start"},ap=({href:e,children:t})=>e?(0,Je.jsx)("a",{href:e,onClick:e=>e.preventDefault(),"aria-disabled":!0,style:{pointerEvents:"none",cursor:"default",display:"inline"},children:t}):t;function rp({attributes:e,setAttributes:t,lockAltControls:o,lockAltControlsMessage:n,lockTitleControls:a,lockTitleControlsMessage:r}){const[i,s]=(0,st.useState)(null),[l,c]=(0,st.useState)(!1),[u,d]=(0,st.useState)(!1);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.ToolbarItem,{ref:s,children:e=>(0,Je.jsx)(tt.DropdownMenu,{icon:Kd,label:(0,ot.__)("More"),toggleProps:{...e,description:(0,ot.__)("Displays more controls.")},popoverProps:np,children:({onClose:e})=>(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.MenuItem,{onClick:()=>{c(!0),e()},"aria-haspopup":"dialog",children:(0,ot._x)("Alternative text","Alternative text for an image. Block toolbar label, a low character count is preferred.")}),(0,Je.jsx)(tt.MenuItem,{onClick:()=>{d(!0),e()},"aria-haspopup":"dialog",children:(0,ot.__)("Title text")})]})})}),l&&(0,Je.jsx)(tt.Popover,{placement:"bottom-start",anchor:i,onClose:()=>c(!1),offset:13,variant:"toolbar",children:(0,Je.jsx)("div",{className:"wp-block-image__toolbar_content_textarea__container",children:(0,Je.jsx)(tt.TextareaControl,{className:"wp-block-image__toolbar_content_textarea",label:(0,ot.__)("Alternative text"),value:e.alt||"",onChange:e=>t({alt:e}),disabled:o,help:o?(0,Je.jsx)(Je.Fragment,{children:n}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.ExternalLink,{href:(0,ot.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,ot.__)("Describe the purpose of the image.")}),(0,Je.jsx)("br",{}),(0,ot.__)("Leave empty if decorative.")]}),__nextHasNoMarginBottom:!0})})}),u&&(0,Je.jsx)(tt.Popover,{placement:"bottom-start",anchor:i,onClose:()=>d(!1),offset:13,variant:"toolbar",children:(0,Je.jsx)("div",{className:"wp-block-image__toolbar_content_textarea__container",children:(0,Je.jsx)(tt.TextControl,{__next40pxDefaultSize:!0,className:"wp-block-image__toolbar_content_textarea",__nextHasNoMarginBottom:!0,label:(0,ot.__)("Title attribute"),value:e.title||"",onChange:e=>t({title:e}),disabled:a,help:a?(0,Je.jsx)(Je.Fragment,{children:r}):(0,Je.jsxs)(Je.Fragment,{children:[(0,ot.__)("Describe the role of this image on the page."),(0,Je.jsx)(tt.ExternalLink,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute",children:(0,ot.__)("(Note: many devices and browsers do not display this text.)")})]})})})})]})}function ip({temporaryURL:e,attributes:t,setAttributes:o,isSingleSelected:n,insertBlocksAfter:a,onReplace:r,onSelectImage:i,onSelectURL:s,onUploadError:l,context:c,clientId:u,blockEditingMode:d,parentLayoutType:p,maxContentWidth:m}){const{url:g="",alt:h,align:x,id:_,href:b,rel:y,linkClass:f,linkDestination:v,title:k,width:w,height:C,aspectRatio:j,scale:S,linkTarget:B,sizeSlug:T,lightbox:N,metadata:P}=t,I=w?parseInt(w,10):void 0,M=C?parseInt(C,10):void 0,D=(0,st.useRef)(),{allowResize:z=!0}=c,{getBlock:A,getSettings:R}=(0,it.useSelect)(nt.store),H=(0,it.useSelect)((e=>_&&n?e(ct.store).getMedia(_,{context:"view"}):null),[_,n]),{canInsertCover:L,imageEditing:V,imageSizes:F,maxWidth:E}=(0,it.useSelect)((e=>{const{getBlockRootClientId:t,canInsertBlockType:o}=e(nt.store),n=t(u),a=R();return{imageEditing:a.imageEditing,imageSizes:a.imageSizes,maxWidth:a.maxWidth,canInsertCover:o("core/cover",n)}}),[u]),{replaceBlocks:O,toggleSelection:$}=(0,it.useDispatch)(nt.store),{createErrorNotice:G,createSuccessNotice:U}=(0,it.useDispatch)(Rt.store),q=(0,ut.useViewportMatch)("medium"),W=["wide","full"].includes(x),[{loadedNaturalWidth:Z,loadedNaturalHeight:Q},K]=(0,st.useState)({}),[Y,J]=(0,st.useState)(!1),[X,ee]=(0,st.useState)(),[te,oe]=(0,st.useState)(!1),ne="default"===d,ae="contentOnly"===d,re=z&&ne&&!W&&q,ie=F.filter((({slug:e})=>H?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e})));(0,st.useEffect)((()=>{sp(_,g)&&n&&R().mediaUpload?X||window.fetch(g.includes("?")?g:g+"?").then((e=>e.blob())).then((e=>ee(e))).catch((()=>{})):ee()}),[_,g,n,X]);const{naturalWidth:se,naturalHeight:le}=(0,st.useMemo)((()=>({naturalWidth:D.current?.naturalWidth||Z||void 0,naturalHeight:D.current?.naturalHeight||Q||void 0})),[Z,Q,D.current?.complete]);(0,st.useEffect)((()=>{n||J(!1)}),[n]);const ce=_&&se&&le&&V,ue=n&&ce&&!Y&&!ae;const de=(0,tt.__experimentalUseCustomUnits)({availableUnits:["px"]}),[pe]=(0,nt.useSettings)("lightbox"),me=!!N&&N?.enabled!==pe?.enabled||pe?.allowEditing,ge=!!N?.enabled||!N&&!!pe?.enabled,he=mt(),xe=(0,Je.jsx)(ep,{value:{width:w,height:C,scale:S,aspectRatio:j},onChange:({width:e,height:t,scale:n,aspectRatio:a})=>{o({width:!e&&t?"auto":e,height:t,scale:n,aspectRatio:a})},defaultScale:"cover",defaultAspectRatio:"auto",scaleOptions:op,unitsOptions:de}),_e=(0,Je.jsx)(ep,{value:{aspectRatio:j},onChange:({aspectRatio:e})=>{o({aspectRatio:e,scale:"cover"})},defaultAspectRatio:"auto",tools:["aspectRatio"]}),be=()=>{o({alt:void 0,width:void 0,height:void 0,scale:void 0,aspectRatio:void 0,lightbox:void 0})},ye=(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsx)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:be,dropdownMenuProps:he,children:re&&("grid"===p?_e:xe)})}),fe="core/pattern-overrides"===P?.bindings?.__default?.source,{lockUrlControls:ve=!1,lockHrefControls:ke=!1,lockAltControls:we=!1,lockAltControlsMessage:Ce,lockTitleControls:je=!1,lockTitleControlsMessage:Se,lockCaption:Be=!1}=(0,it.useSelect)((e=>{if(!n)return{};const{url:t,alt:o,title:a}=P?.bindings||{},r=!!c["pattern/overrides"],i=(0,Ke.getBlockBindingsSource)(t?.source),s=(0,Ke.getBlockBindingsSource)(o?.source),l=(0,Ke.getBlockBindingsSource)(a?.source);return{lockUrlControls:!!t&&!i?.canUserEditValue?.({select:e,context:c,args:t?.args}),lockHrefControls:r||fe,lockCaption:r,lockAltControls:!!o&&!s?.canUserEditValue?.({select:e,context:c,args:o?.args}),lockAltControlsMessage:s?.label?(0,ot.sprintf)((0,ot.__)("Connected to %s"),s.label):(0,ot.__)("Connected to dynamic data"),lockTitleControls:!!a&&!l?.canUserEditValue?.({select:e,context:c,args:a?.args}),lockTitleControlsMessage:l?.label?(0,ot.sprintf)((0,ot.__)("Connected to %s"),l.label):(0,ot.__)("Connected to dynamic data")}}),[fe,c,n,P?.bindings]),Te=n&&!Y&&!ke&&!ve,Ne=n&&L,Pe=Te||ue||Ne,Ie=n&&!Y&&!ve&&(0,Je.jsx)(nt.BlockControls,{group:ae?"inline":"other",children:(0,Je.jsx)(nt.MediaReplaceFlow,{mediaId:_,mediaURL:g,allowedTypes:bu,accept:"image/*",onSelect:i,onSelectURL:s,onError:l,name:g?(0,ot.__)("Replace"):(0,ot.__)("Add image"),onReset:()=>i(void 0)})}),Me=(0,Je.jsxs)(Je.Fragment,{children:[Pe&&(0,Je.jsxs)(nt.BlockControls,{group:"block",children:[Te&&(0,Je.jsx)(nt.__experimentalImageURLInputUI,{url:b||"",onChangeUrl:function(e){o(e)},linkDestination:v,mediaUrl:H&&H.source_url||g,mediaLink:H&&H.link,linkTarget:B,linkClass:f,rel:y,showLightboxSetting:me,lightboxEnabled:ge,onSetLightbox:function(e){o(e&&!pe?.enabled?{lightbox:{enabled:!0}}:!e&&pe?.enabled?{lightbox:{enabled:!1}}:{lightbox:void 0})},resetLightbox:function(){o(pe?.enabled&&pe?.allowEditing?{lightbox:{enabled:!1}}:{lightbox:void 0})}}),ue&&(0,Je.jsx)(tt.ToolbarButton,{onClick:()=>J(!0),icon:Yd,label:(0,ot.__)("Crop")}),Ne&&(0,Je.jsx)(tt.ToolbarButton,{icon:Jd,label:(0,ot.__)("Add text over image"),onClick:function(){O(u,(0,Ke.switchToBlockType)(A(u),"core/cover"))}})]}),n&&X&&(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsx)(tt.ToolbarGroup,{children:(0,Je.jsx)(tt.ToolbarButton,{onClick:function(){const{mediaUpload:e}=R();e&&e({filesList:[X],onFileChange([e]){i(e),(0,lt.isBlobURL)(e.url)||(ee(),U((0,ot.__)("Image uploaded."),{type:"snackbar"}))},allowedTypes:bu,onError(e){G(e,{type:"snackbar"})}})},icon:Xd,label:(0,ot.__)("Upload to Media Library")})})}),ae&&(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(rp,{attributes:t,setAttributes:o,lockAltControls:we,lockAltControlsMessage:Ce,lockTitleControls:je,lockTitleControlsMessage:Se})}),(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:be,dropdownMenuProps:he,children:[n&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Alternative text"),isShownByDefault:!0,hasValue:()=>!!h,onDeselect:()=>o({alt:void 0}),children:(0,Je.jsx)(tt.TextareaControl,{label:(0,ot.__)("Alternative text"),value:h||"",onChange:function(e){o({alt:e})},readOnly:we,help:we?(0,Je.jsx)(Je.Fragment,{children:Ce}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.ExternalLink,{href:(0,ot.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,ot.__)("Describe the purpose of the image.")}),(0,Je.jsx)("br",{}),(0,ot.__)("Leave empty if decorative.")]}),__nextHasNoMarginBottom:!0})}),re&&("grid"===p?_e:xe),!!ie.length&&(0,Je.jsx)(tp,{value:T,onChange:function(e){const t=H?.media_details?.sizes?.[e]?.source_url;if(!t)return null;o({url:t,sizeSlug:e})},options:ie})]})}),(0,Je.jsx)(nt.InspectorControls,{group:"advanced",children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Title attribute"),value:k||"",onChange:function(e){o({title:e})},readOnly:je,help:je?(0,Je.jsx)(Je.Fragment,{children:Se}):(0,Je.jsxs)(Je.Fragment,{children:[(0,ot.__)("Describe the role of this image on the page."),(0,Je.jsx)(tt.ExternalLink,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute",children:(0,ot.__)("(Note: many devices and browsers do not display this text.)")})]})})})]}),De=(0,vt.getFilename)(g);let ze;ze=h||(De?(0,ot.sprintf)((0,ot.__)("This image has an empty alt attribute; its file name is %s"),De):(0,ot.__)("This image has an empty alt attribute"));const Ae=(0,nt.__experimentalUseBorderProps)(t),Re=(0,nt.__experimentalGetShadowClassesAndStyles)(t),He=t.className?.includes("is-style-rounded"),{postType:Le,postId:Ve,queryId:Fe}=c,Ee=Number.isFinite(Fe),[,Oe]=(0,ct.useEntityProp)("postType",Le,"featured_media",Ve);let $e=e&&te?(0,Je.jsx)(tt.Placeholder,{className:"wp-block-image__placeholder",withIllustration:!0,children:(0,Je.jsx)(tt.Spinner,{})}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("img",{src:e||g,alt:ze,onError:function(){oe(!0);const e=qt({attributes:{url:g}});void 0!==e&&r(e)},onLoad:function(e){oe(!1),K({loadedNaturalWidth:e.target?.naturalWidth,loadedNaturalHeight:e.target?.naturalHeight})},ref:D,className:Ae.className,style:{width:w&&C||j?"100%":void 0,height:w&&C||j?"100%":void 0,objectFit:S,...Ae.style,...Re.style}}),e&&(0,Je.jsx)(tt.Spinner,{})]});if(ce&&Y)$e=(0,Je.jsx)(ap,{href:b,children:(0,Je.jsx)(nt.__experimentalImageEditor,{id:_,url:g,width:I,height:M,naturalHeight:le,naturalWidth:se,onSaveImage:e=>o(e),onFinishEditing:()=>{J(!1)},borderProps:He?void 0:Ae})});else if(re&&"grid"!==p){const e=j&&function(e){const[t,o=1]=e.split("/").map(Number),n=t/o;return n===1/0||0===n?NaN:n}(j),t=se/le,a=e||I/M||t||1,r=!I&&M?M*a:I,i=!M&&I?I/a:M,s=se<le?pu:pu*a,l=le<se?pu:pu/a,c=m||2.5*E;let u=!1,d=!1;"center"===x?(u=!0,d=!0):(0,ot.isRTL)()?"left"===x?u=!0:d=!0:"right"===x?d=!0:u=!0,$e=(0,Je.jsx)(tt.ResizableBox,{style:{display:"block",objectFit:S,aspectRatio:w||C||!j?void 0:j},size:{width:null!=r?r:"auto",height:null!=i?i:"auto"},showHandle:n,minWidth:s,maxWidth:c,minHeight:l,maxHeight:c/a,lockAspectRatio:a,enable:{top:!1,right:u,bottom:!0,left:d},onResizeStart:function(){$(!1)},onResizeStop:(e,n,r)=>{$(!0),m&&se>=m&&Math.abs(r.offsetWidth-m)<10?o({width:void 0,height:void 0}):o({width:`${r.offsetWidth}px`,height:"auto",aspectRatio:a===t?void 0:String(a)})},resizeRatio:"center"===x?2:1,children:(0,Je.jsx)(ap,{href:b,children:$e})})}else $e=(0,Je.jsx)("div",{style:{width:w,height:C,aspectRatio:j},children:(0,Je.jsx)(ap,{href:b,children:$e})});if(!g&&!e)return(0,Je.jsxs)(Je.Fragment,{children:[Ie,P?.bindings?Me:ye]});const Ge=()=>{Oe(_),U((0,ot.__)("Post featured image updated."),{type:"snackbar"})},Ue=(0,Je.jsx)(nt.BlockSettingsMenuControls,{children:({selectedClientIds:e})=>1===e.length&&!Ee&&Ve&&_&&u===e[0]&&(0,Je.jsx)(tt.MenuItem,{onClick:Ge,children:(0,ot.__)("Set as featured image")})});return(0,Je.jsxs)(Je.Fragment,{children:[Ie,Me,Ue,$e,(0,Je.jsx)(Yt,{attributes:t,setAttributes:o,isSelected:n,insertBlocksAfter:a,label:(0,ot.__)("Image caption text"),showToolbarButton:n&&ne&&!fe,readOnly:Be})]})}const sp=(e,t)=>t&&!e&&!(0,lt.isBlobURL)(t);function lp(e,t){var o,n;return"url"in(null!==(o=e?.sizes?.[t])&&void 0!==o?o:{})||"source_url"in(null!==(n=e?.media_details?.sizes?.[t])&&void 0!==n?n:{})}const cp=function({attributes:e,setAttributes:t,isSelected:o,className:n,insertBlocksAfter:a,onReplace:r,context:i,clientId:s,__unstableParentLayout:l}){const{url:c="",alt:u,caption:d,id:p,width:m,height:g,sizeSlug:h,aspectRatio:x,scale:_,align:b,metadata:y}=e,[f,v]=(0,st.useState)(e.blob),k=(0,st.useRef)(),w=!l||"flex"!==l.type&&"grid"!==l.type,[C,j]=function(){const[e,{width:t}]=(0,ut.useResizeObserver)(),o=(0,st.useRef)();return[(0,Je.jsx)("div",{className:"wp-block","aria-hidden":"true",style:{position:"absolute",inset:0,width:"100%",height:0,margin:0},ref:o,children:e}),t]}(),[S,{width:B}]=(0,ut.useResizeObserver)(),T=B&&B<160,N=(0,st.useRef)();(0,st.useEffect)((()=>{N.current=u}),[u]);const P=(0,st.useRef)();(0,st.useEffect)((()=>{P.current=d}),[d]);const{__unstableMarkNextChangeAsNotPersistent:I,replaceBlock:M}=(0,it.useDispatch)(nt.store);(0,st.useEffect)((()=>{["wide","full"].includes(b)&&(I(),t({width:void 0,height:void 0,aspectRatio:void 0,scale:void 0}))}),[I,b,t]);const{getSettings:D,getBlockRootClientId:z,getBlockName:A,canInsertBlockType:R}=(0,it.useSelect)(nt.store),H=(0,nt.useBlockEditingMode)(),{createErrorNotice:L}=(0,it.useDispatch)(Rt.store);function V(e){L(e,{type:"snackbar"}),t({src:void 0,id:void 0,url:void 0,blob:void 0})}function F(o){if(Array.isArray(o))return void function(e){const t=k.current?.ownerDocument.defaultView;if(e.every((e=>e instanceof t.File))){const t=e,o=z(s);t.some((e=>!vu(e)))&&L((0,ot.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-upload-invalid-file",type:"snackbar"});const n=t.filter((e=>vu(e))).map((e=>(0,Ke.createBlock)("core/image",{blob:(0,lt.createBlobURL)(e)})));if("core/gallery"===A(o))M(s,n);else if(R("core/gallery",o)){const e=(0,Ke.createBlock)("core/gallery",{},n);M(s,e)}}}(o);if(!o||!o.url)return t({url:void 0,alt:void 0,id:void 0,title:void 0,caption:void 0,blob:void 0}),void v();if((0,lt.isBlobURL)(o.url))return void v(o.url);const{imageDefaultSize:n}=D();let a="full";h&&lp(o,h)?a=h:lp(o,n)&&(a=n);let r,i=((e,t)=>{const o=Object.fromEntries(Object.entries(null!=e?e:{}).filter((([e])=>["alt","id","link","caption"].includes(e))));return o.url=e?.sizes?.[t]?.url||e?.media_details?.sizes?.[t]?.source_url||e.url,o})(o,a);if(P.current&&!i.caption){const{caption:e,...t}=i;i=t}o.id&&o.id===p||(r={sizeSlug:a});let l,c=e.linkDestination;if(!c)switch(window?.wp?.media?.view?.settings?.defaultProps?.link||mu){case"file":case gu:c=gu;break;case"post":case hu:c=hu;break;case xu:c=xu;break;case mu:c=mu}switch(c){case gu:l=o.url;break;case hu:l=o.link}i.href=l,t({blob:void 0,...i,...r,linkDestination:c}),v()}function E(e){e!==c&&(t({blob:void 0,url:e,id:void 0,sizeSlug:D().imageDefaultSize}),v())}pt({url:f,allowedTypes:bu,onChange:F,onError:V});const O=sp(p,c)?c:void 0,$=!!c&&(0,Je.jsx)("img",{alt:(0,ot.__)("Edit image"),title:(0,ot.__)("Edit image"),className:"edit-image-preview",src:c}),G=(0,nt.__experimentalUseBorderProps)(e),U=(0,nt.__experimentalGetShadowClassesAndStyles)(e),q=ft(n,{"is-transient":!!f,"is-resized":!!m||!!g,[`size-${h}`]:h,"has-custom-border":!!G.className||G.style&&Object.keys(G.style).length>0}),W=(0,nt.useBlockProps)({ref:k,className:q}),{lockUrlControls:Z=!1,lockUrlControlsMessage:Q}=(0,it.useSelect)((e=>{if(!o)return{};const t=(0,Ke.getBlockBindingsSource)(y?.bindings?.url?.source);return{lockUrlControls:!!y?.bindings?.url&&!t?.canUserEditValue?.({select:e,context:i,args:y?.bindings?.url?.args}),lockUrlControlsMessage:t?.label?(0,ot.sprintf)((0,ot.__)("Connected to %s"),t.label):(0,ot.__)("Connected to dynamic data")}}),[i,o,y?.bindings?.url]);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)("figure",{...W,children:[(0,Je.jsx)(ip,{temporaryURL:f,attributes:e,setAttributes:t,isSingleSelected:o,insertBlocksAfter:a,onReplace:r,onSelectImage:F,onSelectURL:E,onUploadError:V,context:i,clientId:s,blockEditingMode:H,parentLayoutType:l?.type,maxContentWidth:j}),(0,Je.jsx)(nt.MediaPlaceholder,{icon:(0,Je.jsx)(nt.BlockIcon,{icon:cu}),onSelect:F,onSelectURL:E,onError:V,placeholder:e=>(0,Je.jsxs)(tt.Placeholder,{className:ft("block-editor-media-placeholder",{[G.className]:!!G.className&&!o}),icon:!T&&(Z?Qd:cu),withIllustration:!o||T,label:!T&&(0,ot.__)("Image"),instructions:!Z&&!T&&(0,ot.__)("Drag and drop an image, upload, or choose from your library."),style:{aspectRatio:m&&g||!x?void 0:x,width:g&&x?"100%":m,height:m&&x?"100%":g,objectFit:_,...G.style,...U.style},children:[Z&&!T&&Q,!Z&&!T&&e,S]}),accept:"image/*",allowedTypes:bu,handleUpload:e=>1===e.length,value:{id:p,src:O},mediaPreview:$,disableMediaButtons:f||c})]}),o&&w&&C]})};function up(e,t){const{body:o}=document.implementation.createHTMLDocument("");o.innerHTML=e;const{firstElementChild:n}=o;if(n&&"A"===n.nodeName)return n.getAttribute(t)||void 0}const dp={img:{attributes:["src","alt","title"],classes:["alignleft","aligncenter","alignright","alignnone",/^wp-image-\d+$/]}},pp={from:[{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&!!e.querySelector("img"),schema:({phrasingContentSchema:e})=>({figure:{require:["img"],children:{...dp,a:{attributes:["href","rel","target"],classes:["*"],children:dp},figcaption:{children:e}}}}),transform:e=>{const t=e.className+" "+e.querySelector("img").className,o=/(?:^|\s)align(left|center|right)(?:$|\s)/.exec(t),n=""===e.id?void 0:e.id,a=o?o[1]:void 0,r=/(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(t),i=r?Number(r[1]):void 0,s=e.querySelector("a"),l=s&&s.href?"custom":void 0,c=s&&s.href?s.href:void 0,u=s&&s.rel?s.rel:void 0,d=s&&s.className?s.className:void 0,p=(0,Ke.getBlockAttributes)("core/image",e.outerHTML,{align:a,id:i,linkDestination:l,href:c,rel:u,linkClass:d,anchor:n});return(0,lt.isBlobURL)(p.url)&&(p.blob=p.url,delete p.url),(0,Ke.createBlock)("core/image",p)}},{type:"files",isMatch:e=>e.every((e=>0===e.type.indexOf("image/"))),transform(e){const t=e.map((e=>(0,Ke.createBlock)("core/image",{blob:(0,lt.createBlobURL)(e)})));return t}},{type:"shortcode",tag:"caption",attributes:{url:{type:"string",source:"attribute",attribute:"src",selector:"img"},alt:{type:"string",source:"attribute",attribute:"alt",selector:"img"},caption:{shortcode:function(e,{shortcode:t}){const{body:o}=document.implementation.createHTMLDocument("");o.innerHTML=t.content;let n=o.querySelector("img");for(;n&&n.parentNode&&n.parentNode!==o;)n=n.parentNode;return n&&n.parentNode.removeChild(n),o.innerHTML.trim()}},href:{shortcode:(e,{shortcode:t})=>up(t.content,"href")},rel:{shortcode:(e,{shortcode:t})=>up(t.content,"rel")},linkClass:{shortcode:(e,{shortcode:t})=>up(t.content,"class")},id:{type:"number",shortcode:({named:{id:e}})=>{if(e)return parseInt(e.replace("attachment_",""),10)}},align:{type:"string",shortcode:({named:{align:e="alignnone"}})=>e.replace("align","")}}}]},mp=pp,gp={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/image",title:"Image",category:"media",usesContext:["allowResize","imageCrop","fixedHeight","postId","postType","queryId"],description:"Insert an image to make a visual statement.",keywords:["img","photo","picture"],textdomain:"default",attributes:{blob:{type:"string",role:"local"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",role:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",role:"content"},caption:{type:"rich-text",source:"rich-text",selector:"figcaption",role:"content"},lightbox:{type:"object",enabled:{type:"boolean"}},title:{type:"string",source:"attribute",selector:"img",attribute:"title",role:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",role:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",role:"content"},width:{type:"string"},height:{type:"string"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{interactivity:!0,align:["left","center","right","wide","full"],anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},spacing:{margin:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}},shadow:{__experimentalSkipSerialization:!0}},selectors:{border:".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder",shadow:".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder",filter:{duotone:".wp-block-image img, .wp-block-image .components-placeholder"}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"rounded",label:"Rounded"}],editorStyle:"wp-block-image-editor",style:"wp-block-image"},{name:hp}=gp,xp={icon:cu,example:{attributes:{sizeSlug:"large",url:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",caption:(0,ot.__)("Mont Blanc appears—still, snowy, and serene.")}},__experimentalLabel(e,{context:t}){const o=e?.metadata?.name;if("list-view"===t&&o)return o;if("accessibility"===t){const{caption:t,alt:o,url:n}=e;return n?o?o+(t?". "+t:""):t||"":(0,ot.__)("Empty")}},getEditWrapperProps:e=>({"data-align":e.align}),transforms:mp,edit:cp,save:function({attributes:e}){const{url:t,alt:o,caption:n,align:a,href:r,rel:i,linkClass:s,width:l,height:c,aspectRatio:u,scale:d,id:p,linkTarget:m,sizeSlug:g,title:h}=e,x=i||void 0,_=(0,nt.__experimentalGetBorderClassesAndStyles)(e),b=(0,nt.__experimentalGetShadowClassesAndStyles)(e),y=ft({alignnone:"none"===a,[`size-${g}`]:g,"is-resized":l||c,"has-custom-border":!!_.className||_.style&&Object.keys(_.style).length>0}),f=ft(_.className,{[`wp-image-${p}`]:!!p}),v=(0,Je.jsx)("img",{src:t,alt:o,className:f||void 0,style:{..._.style,...b.style,aspectRatio:u,objectFit:d,width:l,height:c},title:h}),k=(0,Je.jsxs)(Je.Fragment,{children:[r?(0,Je.jsx)("a",{className:s,href:r,target:m,rel:x,children:v}):v,!nt.RichText.isEmpty(n)&&(0,Je.jsx)(nt.RichText.Content,{className:(0,nt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:n})]});return(0,Je.jsx)("figure",{...nt.useBlockProps.save({className:y}),children:k})},deprecated:Zd},_p=()=>et({name:hp,metadata:gp,settings:xp}),bp=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"})});const yp={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/latest-comments",title:"Latest Comments",category:"widgets",description:"Display a list of your most recent comments.",keywords:["recent comments"],textdomain:"default",attributes:{commentsToShow:{type:"number",default:5,minimum:1,maximum:100},displayAvatar:{type:"boolean",default:!0},displayDate:{type:"boolean",default:!0},displayExcerpt:{type:"boolean",default:!0}},supports:{align:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},html:!1,spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-latest-comments-editor",style:"wp-block-latest-comments"},{name:fp}=yp,vp={icon:bp,example:{},edit:function({attributes:e,setAttributes:t}){const{commentsToShow:o,displayAvatar:n,displayDate:a,displayExcerpt:r}=e,i={...e,style:{...e?.style,spacing:void 0}},s=mt();return(0,Je.jsxs)("div",{...(0,nt.useBlockProps)(),children:[(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{t({commentsToShow:5,displayAvatar:!0,displayDate:!0,displayExcerpt:!0})},dropdownMenuProps:s,children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!n,label:(0,ot.__)("Display avatar"),onDeselect:()=>t({displayAvatar:!0}),isShownByDefault:!0,children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Display avatar"),checked:n,onChange:()=>t({displayAvatar:!n})})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!a,label:(0,ot.__)("Display date"),onDeselect:()=>t({displayDate:!0}),isShownByDefault:!0,children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Display date"),checked:a,onChange:()=>t({displayDate:!a})})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!r,label:(0,ot.__)("Display excerpt"),onDeselect:()=>t({displayExcerpt:!0}),isShownByDefault:!0,children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Display excerpt"),checked:r,onChange:()=>t({displayExcerpt:!r})})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>5!==o,label:(0,ot.__)("Number of comments"),onDeselect:()=>t({commentsToShow:5}),isShownByDefault:!0,children:(0,Je.jsx)(tt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Number of comments"),value:o,onChange:e=>t({commentsToShow:e}),min:1,max:100,required:!0})})]})}),(0,Je.jsx)(tt.Disabled,{children:(0,Je.jsx)(rt(),{block:"core/latest-comments",attributes:i,urlQueryArgs:{_locale:"site"}})})]})}},kp=()=>et({name:fp,metadata:yp,settings:vp}),wp=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})}),{attributes:Cp}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/latest-posts",title:"Latest Posts",category:"widgets",description:"Display a list of your most recent posts.",keywords:["recent posts"],textdomain:"default",attributes:{categories:{type:"array",items:{type:"object"}},selectedAuthor:{type:"number"},postsToShow:{type:"number",default:5},displayPostContent:{type:"boolean",default:!1},displayPostContentRadio:{type:"string",default:"excerpt"},excerptLength:{type:"number",default:55},displayAuthor:{type:"boolean",default:!1},displayPostDate:{type:"boolean",default:!1},postLayout:{type:"string",default:"list"},columns:{type:"number",default:3},order:{type:"string",default:"desc"},orderBy:{type:"string",default:"date"},displayFeaturedImage:{type:"boolean",default:!1},featuredImageAlign:{type:"string",enum:["left","center","right"]},featuredImageSizeSlug:{type:"string",default:"thumbnail"},featuredImageSizeWidth:{type:"number",default:null},featuredImageSizeHeight:{type:"number",default:null},addLinkToFeaturedImage:{type:"boolean",default:!1}},supports:{align:!0,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}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-latest-posts-editor",style:"wp-block-latest-posts"},jp=[{attributes:{...Cp,categories:{type:"string"}},supports:{align:!0,html:!1},migrate:e=>({...e,categories:[{id:Number(e.categories)}]}),isEligible:({categories:e})=>e&&"string"==typeof e,save:()=>null}],Sp=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})}),Bp=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})}),Tp=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})}),Np=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),Pp=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})}),Ip={per_page:-1,context:"view"},Mp={per_page:-1,has_published_posts:["post"],context:"view"};const Dp={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/latest-posts",title:"Latest Posts",category:"widgets",description:"Display a list of your most recent posts.",keywords:["recent posts"],textdomain:"default",attributes:{categories:{type:"array",items:{type:"object"}},selectedAuthor:{type:"number"},postsToShow:{type:"number",default:5},displayPostContent:{type:"boolean",default:!1},displayPostContentRadio:{type:"string",default:"excerpt"},excerptLength:{type:"number",default:55},displayAuthor:{type:"boolean",default:!1},displayPostDate:{type:"boolean",default:!1},postLayout:{type:"string",default:"list"},columns:{type:"number",default:3},order:{type:"string",default:"desc"},orderBy:{type:"string",default:"date"},displayFeaturedImage:{type:"boolean",default:!1},featuredImageAlign:{type:"string",enum:["left","center","right"]},featuredImageSizeSlug:{type:"string",default:"thumbnail"},featuredImageSizeWidth:{type:"number",default:null},featuredImageSizeHeight:{type:"number",default:null},addLinkToFeaturedImage:{type:"boolean",default:!1}},supports:{align:!0,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}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-latest-posts-editor",style:"wp-block-latest-posts"},{name:zp}=Dp,Ap={icon:wp,example:{},edit:function e({attributes:t,setAttributes:o}){var n;const a=(0,ut.useInstanceId)(e),r=mt(),{postsToShow:i,order:s,orderBy:l,categories:c,selectedAuthor:u,displayFeaturedImage:d,displayPostContentRadio:p,displayPostContent:m,displayPostDate:g,displayAuthor:h,postLayout:x,columns:_,excerptLength:b,featuredImageAlign:y,featuredImageSizeSlug:f,featuredImageSizeWidth:v,featuredImageSizeHeight:k,addLinkToFeaturedImage:w}=t,{imageSizes:C,latestPosts:j,defaultImageWidth:S,defaultImageHeight:B,categoriesList:T,authorList:N}=(0,it.useSelect)((e=>{var t,o;const{getEntityRecords:n,getUsers:a}=e(ct.store),r=e(nt.store).getSettings(),d=c&&c.length>0?c.map((e=>e.id)):[],p=Object.fromEntries(Object.entries({categories:d,author:u,order:s,orderby:l,per_page:i,_embed:"wp:featuredmedia",ignore_sticky:!0}).filter((([,e])=>void 0!==e)));return{defaultImageWidth:null!==(t=r.imageDimensions?.[f]?.width)&&void 0!==t?t:0,defaultImageHeight:null!==(o=r.imageDimensions?.[f]?.height)&&void 0!==o?o:0,imageSizes:r.imageSizes,latestPosts:n("postType","post",p),categoriesList:n("taxonomy","category",Ip),authorList:a(Mp)}}),[f,i,s,l,c,u]),{createWarningNotice:P}=(0,it.useDispatch)(Rt.store),I=e=>{e.preventDefault(),P((0,ot.__)("Links are disabled in the editor."),{id:`block-library/core/latest-posts/redirection-prevented/${a}`,type:"snackbar"})},M=C.filter((({slug:e})=>"full"!==e)).map((({name:e,slug:t})=>({value:t,label:e}))),D=null!==(n=T?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==n?n:{},z=[{value:"none",icon:Sp,label:(0,ot.__)("None")},{value:"left",icon:Bp,label:(0,ot.__)("Left")},{value:"center",icon:Tp,label:(0,ot.__)("Center")},{value:"right",icon:Np,label:(0,ot.__)("Right")}],A=!!j?.length,R=(0,Je.jsxs)(nt.InspectorControls,{children:[(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Post content"),resetAll:()=>o({displayPostContent:!1,displayPostContentRadio:"excerpt",excerptLength:55}),dropdownMenuProps:r,children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!m,label:(0,ot.__)("Post content"),onDeselect:()=>o({displayPostContent:!1}),isShownByDefault:!0,children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Post content"),checked:m,onChange:e=>o({displayPostContent:e})})}),m&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>"excerpt"!==p,label:(0,ot.__)("Show"),onDeselect:()=>o({displayPostContentRadio:"excerpt"}),isShownByDefault:!0,children:(0,Je.jsx)(tt.RadioControl,{label:(0,ot.__)("Show"),selected:p,options:[{label:(0,ot.__)("Excerpt"),value:"excerpt"},{label:(0,ot.__)("Full post"),value:"full_post"}],onChange:e=>o({displayPostContentRadio:e})})}),m&&"excerpt"===p&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>55!==b,label:(0,ot.__)("Max number of words"),onDeselect:()=>o({excerptLength:55}),isShownByDefault:!0,children:(0,Je.jsx)(tt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Max number of words"),value:b,onChange:e=>o({excerptLength:e}),min:10,max:100})})]}),(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Post meta"),resetAll:()=>o({displayAuthor:!1,displayPostDate:!1}),dropdownMenuProps:r,children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!h,label:(0,ot.__)("Display author name"),onDeselect:()=>o({displayAuthor:!1}),isShownByDefault:!0,children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Display author name"),checked:h,onChange:e=>o({displayAuthor:e})})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!g,label:(0,ot.__)("Display post date"),onDeselect:()=>o({displayPostDate:!1}),isShownByDefault:!0,children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Display post date"),checked:g,onChange:e=>o({displayPostDate:e})})})]}),(0,Je.jsxs)(tt.PanelBody,{title:(0,ot.__)("Featured image"),children:[(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Display featured image"),checked:d,onChange:e=>o({displayFeaturedImage:e})}),d&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.__experimentalImageSizeControl,{onChange:e=>{const t={};e.hasOwnProperty("width")&&(t.featuredImageSizeWidth=e.width),e.hasOwnProperty("height")&&(t.featuredImageSizeHeight=e.height),o(t)},slug:f,width:v,height:k,imageWidth:S,imageHeight:B,imageSizeOptions:M,imageSizeHelp:(0,ot.__)("Select the size of the source image."),onChangeImage:e=>o({featuredImageSizeSlug:e,featuredImageSizeWidth:void 0,featuredImageSizeHeight:void 0})}),(0,Je.jsx)(tt.__experimentalToggleGroupControl,{className:"editor-latest-posts-image-alignment-control",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Image alignment"),value:y||"none",onChange:e=>o({featuredImageAlign:"none"!==e?e:void 0}),children:z.map((({value:e,icon:t,label:o})=>(0,Je.jsx)(tt.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:o},e)))}),(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Add link to featured image"),checked:w,onChange:e=>o({addLinkToFeaturedImage:e})})]})]}),(0,Je.jsxs)(tt.PanelBody,{title:(0,ot.__)("Sorting and filtering"),children:[(0,Je.jsx)(tt.QueryControls,{order:s,orderBy:l,numberOfItems:i,onOrderChange:e=>o({order:e}),onOrderByChange:e=>o({orderBy:e}),onNumberOfItemsChange:e=>o({postsToShow:e}),categorySuggestions:D,onCategoryChange:e=>{if(e.some((e=>"string"==typeof e&&!D[e])))return;const t=e.map((e=>"string"==typeof e?D[e]:e));if(t.includes(null))return!1;o({categories:t})},selectedCategories:c,onAuthorChange:e=>o({selectedAuthor:""!==e?Number(e):void 0}),authorList:null!=N?N:[],selectedAuthorId:u}),"grid"===x&&(0,Je.jsx)(tt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Columns"),value:_,onChange:e=>o({columns:e}),min:2,max:A?Math.min(6,j.length):6,required:!0})]})]}),H=(0,nt.useBlockProps)({className:ft({"wp-block-latest-posts__list":!0,"is-grid":"grid"===x,"has-dates":g,"has-author":h,[`columns-${_}`]:"grid"===x})});if(!A)return(0,Je.jsxs)("div",{...H,children:[R,(0,Je.jsx)(tt.Placeholder,{icon:on,label:(0,ot.__)("Latest Posts"),children:Array.isArray(j)?(0,ot.__)("No posts found."):(0,Je.jsx)(tt.Spinner,{})})]});const L=j.length>i?j.slice(0,i):j,V=[{icon:Pp,title:(0,ot._x)("List view","Latest posts block display setting"),onClick:()=>o({postLayout:"list"}),isActive:"list"===x},{icon:Qu,title:(0,ot._x)("Grid view","Latest posts block display setting"),onClick:()=>o({postLayout:"grid"}),isActive:"grid"===x}],F=(0,Aa.getSettings)().formats.date;return(0,Je.jsxs)(Je.Fragment,{children:[R,(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsx)(tt.ToolbarGroup,{controls:V})}),(0,Je.jsx)("ul",{...H,children:L.map((e=>{const t=e.title.rendered.trim();let o=e.excerpt.rendered;const n=N?.find((t=>t.id===e.author)),a=document.createElement("div");a.innerHTML=o,o=a.textContent||a.innerText||"";const{url:r,alt:i}=function(e,t){var o;const n=e._embedded?.["wp:featuredmedia"]?.[0];return{url:null!==(o=n?.media_details?.sizes?.[t]?.source_url)&&void 0!==o?o:n?.source_url,alt:n?.alt_text}}(e,f),s=ft({"wp-block-latest-posts__featured-image":!0,[`align${y}`]:!!y}),l=d&&r,c=l&&(0,Je.jsx)("img",{src:r,alt:i,style:{maxWidth:v,maxHeight:k}}),u=b<o.trim().split(" ").length&&""===e.excerpt.raw?(0,Je.jsxs)(Je.Fragment,{children:[o.trim().split(" ",b).join(" "),(0,st.createInterpolateElement)((0,ot.sprintf)((0,ot.__)("… <a>Read more<span>: %1$s</span></a>"),t||(0,ot.__)("(no title)")),{a:(0,Je.jsx)("a",{className:"wp-block-latest-posts__read-more",href:e.link,rel:"noopener noreferrer",onClick:I}),span:(0,Je.jsx)("span",{className:"screen-reader-text"})})]}):o;return(0,Je.jsxs)("li",{children:[l&&(0,Je.jsx)("div",{className:s,children:w?(0,Je.jsx)("a",{href:e.link,rel:"noreferrer noopener",onClick:I,children:c}):c}),(0,Je.jsx)("a",{className:"wp-block-latest-posts__post-title",href:e.link,rel:"noreferrer noopener",dangerouslySetInnerHTML:t?{__html:t}:void 0,onClick:I,children:t?null:(0,ot.__)("(no title)")}),h&&n&&(0,Je.jsx)("div",{className:"wp-block-latest-posts__post-author",children:(0,ot.sprintf)((0,ot.__)("by %s"),n.name)}),g&&e.date_gmt&&(0,Je.jsx)("time",{dateTime:(0,Aa.format)("c",e.date_gmt),className:"wp-block-latest-posts__post-date",children:(0,Aa.dateI18n)(F,e.date_gmt)}),m&&"excerpt"===p&&(0,Je.jsx)("div",{className:"wp-block-latest-posts__post-excerpt",children:u}),m&&"full_post"===p&&(0,Je.jsx)("div",{className:"wp-block-latest-posts__post-full-content",dangerouslySetInnerHTML:{__html:e.content.raw.trim()}})]},e.id)}))})]})},deprecated:jp},Rp=()=>et({name:zp,metadata:Dp,settings:Ap}),Hp={A:"upper-alpha",a:"lower-alpha",I:"upper-roman",i:"lower-roman"};function Lp(e){const{values:t,start:o,reversed:n,ordered:a,type:r,...i}=e,s=document.createElement(a?"ol":"ul");s.innerHTML=t,o&&s.setAttribute("start",o),n&&s.setAttribute("reversed",!0),r&&s.setAttribute("type",r);const[l]=(0,Ke.rawHandler)({HTML:s.outerHTML});return[{...i,...l.attributes},l.innerBlocks]}const Vp={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0},color:{gradients:!0,link:!0},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,values:o,type:n,reversed:a,start:r}=e,i=t?"ol":"ul";return(0,Je.jsx)(i,{...nt.useBlockProps.save({type:n,reversed:a,start:r}),children:(0,Je.jsx)(nt.RichText.Content,{value:o,multiline:"li"})})},migrate:lo,isEligible:({style:e})=>e?.typography?.fontFamily},Fp={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,values:o,type:n,reversed:a,start:r}=e,i=t?"ol":"ul";return(0,Je.jsx)(i,{...nt.useBlockProps.save({type:n,reversed:a,start:r}),children:(0,Je.jsx)(nt.RichText.Content,{value:o,multiline:"li"})})},migrate:Lp},Ep={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},isEligible:({type:e})=>!!e,save({attributes:e}){const{ordered:t,type:o,reversed:n,start:a}=e,r=t?"ol":"ul";return(0,Je.jsx)(r,{...nt.useBlockProps.save({type:o,reversed:n,start:a}),children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})},migrate:function(e){const{type:t}=e;return t&&Hp[t]?{...e,type:Hp[t]}:e}},Op={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalOnMerge:"true",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,type:o,reversed:n,start:a}=e,r=t?"ol":"ul";return(0,Je.jsx)(r,{...nt.useBlockProps.save({reversed:n,start:a,style:{listStyleType:t&&"decimal"!==o?o:void 0}}),children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})}},$p=[Op,Ep,Fp,Vp],Gp=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM15.4697 14.9697L18.4393 12L15.4697 9.03033L16.5303 7.96967L20.0303 11.4697L20.5607 12L20.0303 12.5303L16.5303 16.0303L15.4697 14.9697Z"})}),Up=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z"})}),qp=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})}),Wp=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),Zp=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M3.8 15.8h8.9v-1.5H3.8v1.5zm0-7h8.9V7.2H3.8v1.6zm14.7-2.1V10h1V5.3l-2.2.7.3 1 .9-.3zm1.2 6.1c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5H20v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3 0-.8-.3-1.1z"})}),Qp=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM5 6.7V10h1V5.3L3.8 6l.4 1 .8-.3zm-.4 5.7c-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-1c.3-.6.8-1.4.9-2.1.1-.3 0-.8-.2-1.1-.5-.6-1.3-.5-1.7-.4z"})}),Kp=window.wp.deprecated;var Yp=o.n(Kp);const Jp=({setAttributes:e,reversed:t,start:o,type:n})=>(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.PanelBody,{title:(0,ot.__)("Settings"),children:[(0,Je.jsx)(tt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("List style"),options:[{label:(0,ot.__)("Numbers"),value:"decimal"},{label:(0,ot.__)("Uppercase letters"),value:"upper-alpha"},{label:(0,ot.__)("Lowercase letters"),value:"lower-alpha"},{label:(0,ot.__)("Uppercase Roman numerals"),value:"upper-roman"},{label:(0,ot.__)("Lowercase Roman numerals"),value:"lower-roman"}],value:n,onChange:t=>e({type:t})}),(0,Je.jsx)(tt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Start value"),type:"number",onChange:t=>{const o=parseInt(t,10);e({start:isNaN(o)?void 0:o})},value:Number.isInteger(o)?o.toString(10):"",step:"1"}),(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Reverse order"),checked:t||!1,onChange:t=>{e({reversed:t||void 0})}})]})});const Xp=(0,st.forwardRef)((function(e,t){const{ordered:o,...n}=e,a=o?"ol":"ul";return(0,Je.jsx)(a,{ref:t,...n})})),em={name:"core/list-item"},tm=[["core/list-item"]];function om({clientId:e}){const t=function(e){const{replaceBlocks:t,selectionChange:o}=(0,it.useDispatch)(nt.store),{getBlockRootClientId:n,getBlockAttributes:a,getBlock:r}=(0,it.useSelect)(nt.store);return(0,st.useCallback)((()=>{const i=n(e),s=a(i),l=(0,Ke.createBlock)("core/list-item",s),{innerBlocks:c}=r(e);t([i],[l,...c]),o(c[c.length-1].clientId)}),[e])}(e),o=(0,it.useSelect)((t=>{const{getBlockRootClientId:o,getBlockName:n}=t(nt.store);return"core/list-item"===n(o(e))}),[e]);return(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)(tt.ToolbarButton,{icon:(0,ot.isRTL)()?Gp:Up,title:(0,ot.__)("Outdent"),description:(0,ot.__)("Outdent list item"),disabled:!o,onClick:t})})}function nm({phrasingContentSchema:e}){const t={...e,ul:{},ol:{attributes:["type","start","reversed"]}};return["ul","ol"].forEach((e=>{t[e].children={li:{children:t}}})),t}function am(e){return e.flatMap((({name:e,attributes:t,innerBlocks:o=[]})=>"core/list-item"===e?[t.content,...am(o)]:am(o)))}const rm={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph","core/heading"],transform:e=>{let t=[];if(e.length>1)t=e.map((({content:e})=>(0,Ke.createBlock)("core/list-item",{content:e})));else if(1===e.length){const o=(0,Ho.create)({html:e[0].content});t=(0,Ho.split)(o,"\n").map((e=>(0,Ke.createBlock)("core/list-item",{content:(0,Ho.toHTMLString)({value:e})})))}return(0,Ke.createBlock)("core/list",{anchor:e.anchor},t)}},{type:"raw",selector:"ol,ul",schema:e=>({ol:nm(e).ol,ul:nm(e).ul}),transform:function e(t){const o=t.getAttribute("type"),n={ordered:"OL"===t.tagName,anchor:""===t.id?void 0:t.id,start:t.getAttribute("start")?parseInt(t.getAttribute("start"),10):void 0,reversed:!!t.hasAttribute("reversed")||void 0,type:o&&Hp[o]?Hp[o]:void 0},a=Array.from(t.children).map((t=>{const o=Array.from(t.childNodes).filter((e=>e.nodeType!==e.TEXT_NODE||0!==e.textContent.trim().length));o.reverse();const[n,...a]=o;if(!("UL"===n?.tagName||"OL"===n?.tagName))return(0,Ke.createBlock)("core/list-item",{content:t.innerHTML});const r=a.map((e=>e.nodeType===e.TEXT_NODE?e.textContent:e.outerHTML));r.reverse();const i={content:r.join("").trim()},s=[e(n)];return(0,Ke.createBlock)("core/list-item",i,s)}));return(0,Ke.createBlock)("core/list",n,a)}},...["*","-"].map((e=>({type:"prefix",prefix:e,transform:e=>(0,Ke.createBlock)("core/list",{},[(0,Ke.createBlock)("core/list-item",{content:e})])}))),...["1.","1)"].map((e=>({type:"prefix",prefix:e,transform:e=>(0,Ke.createBlock)("core/list",{ordered:!0},[(0,Ke.createBlock)("core/list-item",{content:e})])})))],to:[...["core/paragraph","core/heading"].map((e=>({type:"block",blocks:[e],transform:(t,o)=>am(o).map((t=>(0,Ke.createBlock)(e,{content:t})))})))]},im=rm,sm={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/list",title:"List",category:"text",allowedBlocks:["core/list-item"],description:"An organized collection of items displayed in a specific order.",keywords:["bullet list","ordered list","numbered list"],textdomain:"default",attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,html:!1,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalOnMerge:!0,__experimentalSlashInserter:!0,interactivity:{clientNavigation:!0}},selectors:{border:".wp-block-list:not(.wp-block-list .wp-block-list)"},editorStyle:"wp-block-list-editor",style:"wp-block-list"},{name:lm}=sm,cm={icon:Pp,example:{innerBlocks:[{name:"core/list-item",attributes:{content:(0,ot.__)("Alice.")}},{name:"core/list-item",attributes:{content:(0,ot.__)("The White Rabbit.")}},{name:"core/list-item",attributes:{content:(0,ot.__)("The Cheshire Cat.")}},{name:"core/list-item",attributes:{content:(0,ot.__)("The Mad Hatter.")}},{name:"core/list-item",attributes:{content:(0,ot.__)("The Queen of Hearts.")}}]},transforms:im,edit:function({attributes:e,setAttributes:t,clientId:o,style:n}){const{ordered:a,type:r,reversed:i,start:s}=e,l=(0,nt.useBlockProps)({style:{...st.Platform.isNative&&n,listStyleType:a&&"decimal"!==r?r:void 0}}),c=(0,nt.useInnerBlocksProps)(l,{defaultBlock:em,directInsert:!0,template:tm,templateLock:!1,templateInsertUpdatesSelection:!0,...st.Platform.isNative&&{marginVertical:8,marginHorizontal:8,renderAppender:!1},__experimentalCaptureToolbars:!0});!function(e,t){const o=(0,it.useRegistry)(),{updateBlockAttributes:n,replaceInnerBlocks:a}=(0,it.useDispatch)(nt.store);(0,st.useEffect)((()=>{if(!e.values)return;const[r,i]=Lp(e);Yp()("Value attribute on the list block",{since:"6.0",version:"6.5",alternative:"inner blocks"}),o.batch((()=>{n(t,r),a(t,i)}))}),[e.values])}(e,o);const u=(0,Je.jsxs)(nt.BlockControls,{group:"block",children:[(0,Je.jsx)(tt.ToolbarButton,{icon:(0,ot.isRTL)()?qp:Wp,title:(0,ot.__)("Unordered"),description:(0,ot.__)("Convert to unordered list"),isActive:!1===a,onClick:()=>{t({ordered:!1})}}),(0,Je.jsx)(tt.ToolbarButton,{icon:(0,ot.isRTL)()?Zp:Qp,title:(0,ot.__)("Ordered"),description:(0,ot.__)("Convert to ordered list"),isActive:!0===a,onClick:()=>{t({ordered:!0})}}),(0,Je.jsx)(om,{clientId:o})]});return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Xp,{ordered:a,reversed:i,start:s,...c}),u,a&&(0,Je.jsx)(Jp,{setAttributes:t,reversed:i,start:s,type:r})]})},save:function({attributes:e}){const{ordered:t,type:o,reversed:n,start:a}=e,r=t?"ol":"ul";return(0,Je.jsx)(r,{...nt.useBlockProps.save({reversed:n,start:a,style:{listStyleType:t&&"decimal"!==o?o:void 0}}),children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})},deprecated:$p},um=()=>et({name:lm,metadata:sm,settings:cm}),dm=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M12 11v1.5h8V11h-8zm-6-1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),pm=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM20.0303 9.03033L17.0607 12L20.0303 14.9697L18.9697 16.0303L15.4697 12.5303L14.9393 12L15.4697 11.4697L18.9697 7.96967L20.0303 9.03033Z"})}),mm=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-8-3.5l3 3-3 3 1 1 4-4-4-4-1 1z"})});function gm(e){const{replaceBlocks:t,selectionChange:o,multiSelect:n}=(0,it.useDispatch)(nt.store),{getBlock:a,getPreviousBlockClientId:r,getSelectionStart:i,getSelectionEnd:s,hasMultiSelection:l,getMultiSelectedBlockClientIds:c}=(0,it.useSelect)(nt.store);return(0,st.useCallback)((()=>{const u=l(),d=u?c():[e],p=d.map((e=>(0,Ke.cloneBlock)(a(e)))),m=r(e),g=(0,Ke.cloneBlock)(a(m));g.innerBlocks?.length||(g.innerBlocks=[(0,Ke.createBlock)("core/list")]),g.innerBlocks[g.innerBlocks.length-1].innerBlocks.push(...p);const h=i(),x=s();return t([m,...d],[g]),u?n(p[0].clientId,p[p.length-1].clientId):o(p[0].clientId,x.attributeKey,x.clientId===h.clientId?h.offset:x.offset,x.offset),!0}),[e])}function hm(){const e=(0,it.useRegistry)(),{moveBlocksToPosition:t,removeBlock:o,insertBlock:n,updateBlockListSettings:a}=(0,it.useDispatch)(nt.store),{getBlockRootClientId:r,getBlockName:i,getBlockOrder:s,getBlockIndex:l,getSelectedBlockClientIds:c,getBlock:u,getBlockListSettings:d}=(0,it.useSelect)(nt.store);return(0,st.useCallback)(((p=c())=>{if(Array.isArray(p)||(p=[p]),!p.length)return;const m=p[0];if("core/list-item"!==i(m))return;const g=function(e){const t=r(e),o=r(t);if(o&&"core/list-item"===i(o))return o}(m);if(!g)return;const h=r(m),x=p[p.length-1],_=s(h).slice(l(x)+1);return e.batch((()=>{if(_.length){let e=s(m)[0];if(!e){const t=(0,Ke.cloneBlock)(u(h),{},[]);e=t.clientId,n(t,0,m,!1),a(e,d(h))}t(_,h,e)}if(t(p,h,r(g),l(g)+1),!s(h).length){o(h,!1)}})),!0}),[])}function xm(e,t){const o=(0,it.useRegistry)(),{getPreviousBlockClientId:n,getNextBlockClientId:a,getBlockOrder:r,getBlockRootClientId:i,getBlockName:s}=(0,it.useSelect)(nt.store),{mergeBlocks:l,moveBlocksToPosition:c}=(0,it.useDispatch)(nt.store),u=hm();function d(e){const t=r(e);return t.length?d(t[t.length-1]):e}function p(e){const t=i(e),o=i(t);if(o&&"core/list-item"===s(o))return o}function m(e){const t=a(e);if(t)return t;const o=p(e);return o?m(o):void 0}function g(e){const t=r(e);return t.length?r(t[0])[0]:m(e)}return a=>{function s(e,t){o.batch((()=>{const[o]=r(t);o&&(n(t)!==e||r(e).length?c(r(o),o,i(e)):c([o],t,e)),l(e,t)}))}if(a){const o=g(e);if(!o)return void t(a);p(o)?u(o):s(e,o)}else{const o=n(e);if(p(e))u(e);else if(o){s(d(o),e)}else t(a)}}}function _m({clientId:e}){const t=gm(e),o=hm(),{canIndent:n,canOutdent:a}=(0,it.useSelect)((t=>{const{getBlockIndex:o,getBlockRootClientId:n,getBlockName:a}=t(nt.store);return{canIndent:o(e)>0,canOutdent:"core/list-item"===a(n(n(e)))}}),[e]);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.ToolbarButton,{icon:(0,ot.isRTL)()?Gp:Up,title:(0,ot.__)("Outdent"),description:(0,ot.__)("Outdent list item"),disabled:!a,onClick:()=>o()}),(0,Je.jsx)(tt.ToolbarButton,{icon:(0,ot.isRTL)()?pm:mm,title:(0,ot.__)("Indent"),description:(0,ot.__)("Indent list item"),disabled:!n,onClick:()=>t()})]})}const bm={to:[{type:"block",blocks:["core/paragraph"],transform:(e,t=[])=>[(0,Ke.createBlock)("core/paragraph",e),...t.map((e=>(0,Ke.cloneBlock)(e)))]}]},ym=bm,fm={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/list-item",title:"List Item",category:"text",parent:["core/list"],allowedBlocks:["core/list"],description:"An individual item within a list.",textdomain:"default",attributes:{placeholder:{type:"string"},content:{type:"rich-text",source:"rich-text",selector:"li",role:"content"}},supports:{anchor:!0,className:!1,splitting:!0,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},color:{gradients:!0,link:!0,background:!0,__experimentalDefaultControls:{text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},selectors:{root:".wp-block-list > li",border:".wp-block-list:not(.wp-block-list .wp-block-list) > li"}},{name:vm}=fm,km={icon:dm,edit:function({attributes:e,setAttributes:t,clientId:o,mergeBlocks:n}){const{placeholder:a,content:r}=e,i=(0,nt.useBlockProps)(),s=(0,nt.useInnerBlocksProps)(i,{renderAppender:!1,__unstableDisableDropZone:!0}),l=function(e){const{replaceBlocks:t,selectionChange:o}=(0,it.useDispatch)(nt.store),{getBlock:n,getBlockRootClientId:a,getBlockIndex:r,getBlockName:i}=(0,it.useSelect)(nt.store),s=(0,st.useRef)(e);s.current=e;const l=hm();return(0,ut.useRefEffect)((e=>{function c(e){if(e.defaultPrevented||e.keyCode!==wo.ENTER)return;const{content:c,clientId:u}=s.current;if(c.length)return;if(e.preventDefault(),"core/list-item"===i(a(a(s.current.clientId))))return void l();const d=n(a(u)),p=r(u),m=(0,Ke.cloneBlock)({...d,innerBlocks:d.innerBlocks.slice(0,p)}),g=(0,Ke.createBlock)((0,Ke.getDefaultBlockName)()),h=[...d.innerBlocks[p].innerBlocks[0]?.innerBlocks||[],...d.innerBlocks.slice(p+1)],x=h.length?[(0,Ke.cloneBlock)({...d,innerBlocks:h})]:[];t(d.clientId,[m,g,...x],1),o(g.clientId)}return e.addEventListener("keydown",c),()=>{e.removeEventListener("keydown",c)}}),[])}({content:r,clientId:o}),c=function(e){const{getSelectionStart:t,getSelectionEnd:o,getBlockIndex:n}=(0,it.useSelect)(nt.store),a=gm(e),r=hm();return(0,ut.useRefEffect)((i=>{function s(i){const{keyCode:s,shiftKey:l,altKey:c,metaKey:u,ctrlKey:d}=i;if(i.defaultPrevented||s!==wo.SPACE&&s!==wo.TAB||c||u||d)return;const p=t(),m=o();0===p.offset&&0===m.offset&&(l?s===wo.TAB&&r()&&i.preventDefault():0!==n(e)&&a()&&i.preventDefault())}return i.addEventListener("keydown",s),()=>{i.removeEventListener("keydown",s)}}),[e,a])}(o),u=xm(o,n);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)("li",{...s,children:[(0,Je.jsx)(nt.RichText,{ref:(0,ut.useMergeRefs)([l,c]),identifier:"content",tagName:"div",onChange:e=>t({content:e}),value:r,"aria-label":(0,ot.__)("List text"),placeholder:a||(0,ot.__)("List"),onMerge:u}),s.children]}),(0,Je.jsx)(nt.BlockControls,{group:"block",children:(0,Je.jsx)(_m,{clientId:o})})]})},save:function({attributes:e}){return(0,Je.jsxs)("li",{...nt.useBlockProps.save(),children:[(0,Je.jsx)(nt.RichText.Content,{value:e.content}),(0,Je.jsx)(nt.InnerBlocks.Content,{})]})},merge:(e,t)=>({...e,content:e.content+t.content}),transforms:ym,[Ot(nt.privateApis).requiresWrapperOnCopy]:!0},wm=()=>et({name:vm,metadata:fm,settings:km}),Cm=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M11 14.5l1.1 1.1 3-3 .5-.5-.6-.6-3-3-1 1 1.7 1.7H5v1.5h7.7L11 14.5zM16.8 5h-7c-1.1 0-2 .9-2 2v1.5h1.5V7c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v10c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5v-1.5H7.8V17c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z"})});const jm={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/loginout",title:"Login/out",category:"theme",description:"Show login & logout links.",keywords:["login","logout","form"],textdomain:"default",attributes:{displayLoginAsForm:{type:"boolean",default:!1},redirectToCurrent:{type:"boolean",default:!0}},example:{viewportWidth:350},supports:{className:!0,color:{background:!0,text:!1,gradients:!0,link:!0},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},interactivity:{clientNavigation:!0}},style:"wp-block-loginout"},{name:Sm}=jm,Bm={icon:Cm,edit:function({attributes:e,setAttributes:t}){const{displayLoginAsForm:o,redirectToCurrent:n}=e,a=mt();return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{t({displayLoginAsForm:!1,redirectToCurrent:!0})},dropdownMenuProps:a,children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Display login as form"),isShownByDefault:!0,hasValue:()=>o,onDeselect:()=>t({displayLoginAsForm:!1}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Display login as form"),checked:o,onChange:()=>t({displayLoginAsForm:!o})})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Redirect to current URL"),isShownByDefault:!0,hasValue:()=>!n,onDeselect:()=>t({redirectToCurrent:!0}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Redirect to current URL"),checked:n,onChange:()=>t({redirectToCurrent:!n})})})]})}),(0,Je.jsx)("div",{...(0,nt.useBlockProps)({className:"logged-in"}),children:(0,Je.jsx)("a",{href:"#login-pseudo-link",children:(0,ot.__)("Log out")})})]})}},Tm=()=>et({name:Sm,metadata:jm,settings:Bm}),Nm=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z"})}),Pm="full",Im=[["core/paragraph",{placeholder:(0,ot._x)("Content…","content placeholder")}]],Mm=(e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${100*t.x}% ${100*t.y}%`:"50% 50%"}:{},Dm=(e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{},zm=50,Am=()=>{},Rm=e=>{if(!e.customBackgroundColor)return e;const t={color:{background:e.customBackgroundColor}},{customBackgroundColor:o,...n}=e;return{...n,style:t}},Hm=e=>e.align?e:{...e,align:"wide"},Lm={align:{type:"string",default:"wide"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:""},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},isStackedOnMobile:{type:"boolean",default:!1}},Vm={...Lm,isStackedOnMobile:{type:"boolean",default:!0},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},mediaSizeSlug:{type:"string"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},Fm={...Vm,mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:"",role:"content"},mediaId:{type:"number",role:"content"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src",role:"content"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href",role:"content"},mediaType:{type:"string",role:"content"}},Em={...Fm,align:{type:"string",default:"none"},useFeaturedImage:{type:"boolean",default:!1}},Om={anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0}},$m={...Om,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},Gm={attributes:Em,supports:{...$m,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},interactivity:{clientNavigation:!0}},usesContext:["postId","postType"],save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:a,mediaUrl:r,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Pm,x=g||void 0,_=ft({[`wp-image-${s}`]:s&&"image"===a,[`size-${h}`]:s&&"image"===a});let b=r?(0,Je.jsx)("img",{src:r,alt:o,className:_||null}):null;p&&(b=(0,Je.jsx)("a",{className:d,href:p,target:m,rel:x,children:b}));const y={image:()=>b,video:()=>(0,Je.jsx)("video",{controls:!0,src:r})},f=ft({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Dm(r,u):{};let k;i!==zm&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:f,style:w}),children:[(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[a]||Am)()})]}):(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:f,style:w}),children:[(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[a]||Am)()}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})}},Um={attributes:Fm,supports:$m,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:a,mediaUrl:r,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Pm,x=g||void 0,_=ft({[`wp-image-${s}`]:s&&"image"===a,[`size-${h}`]:s&&"image"===a});let b=(0,Je.jsx)("img",{src:r,alt:o,className:_||null});p&&(b=(0,Je.jsx)("a",{className:d,href:p,target:m,rel:x,children:b}));const y={image:()=>b,video:()=>(0,Je.jsx)("video",{controls:!0,src:r})},f=ft({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Dm(r,u):{};let k;i!==zm&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:f,style:w}),children:[(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[a]||Am)()})]}):(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:f,style:w}),children:[(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[a]||Am)()}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Hm,isEligible(e,t,{block:o}){const{attributes:n}=o;return void 0===e.align&&!!n.className?.includes("alignwide")}},qm={attributes:Vm,supports:Om,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:a,mediaUrl:r,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Pm,x=g||void 0,_=ft({[`wp-image-${s}`]:s&&"image"===a,[`size-${h}`]:s&&"image"===a});let b=(0,Je.jsx)("img",{src:r,alt:o,className:_||null});p&&(b=(0,Je.jsx)("a",{className:d,href:p,target:m,rel:x,children:b}));const y={image:()=>b,video:()=>(0,Je.jsx)("video",{controls:!0,src:r})},f=ft({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Mm(r,u):{};let k;i!==zm&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:f,style:w}),children:[(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[a]||Am)()})]}):(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:f,style:w}),children:[(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[a]||Am)()}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Hm},Wm={attributes:Vm,supports:Om,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:a,mediaUrl:r,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Pm,x=g||void 0,_=ft({[`wp-image-${s}`]:s&&"image"===a,[`size-${h}`]:s&&"image"===a});let b=(0,Je.jsx)("img",{src:r,alt:o,className:_||null});p&&(b=(0,Je.jsx)("a",{className:d,href:p,target:m,rel:x,children:b}));const y={image:()=>b,video:()=>(0,Je.jsx)("video",{controls:!0,src:r})},f=ft({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Mm(r,u):{};let k;i!==zm&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:f,style:w}),children:[(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(y[a]||Am)()}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Hm},Zm={attributes:{...Lm,isStackedOnMobile:{type:"boolean",default:!0},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:(0,ut.compose)(Rm,Hm),save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,isStackedOnMobile:n,mediaAlt:a,mediaPosition:r,mediaType:i,mediaUrl:s,mediaWidth:l,mediaId:c,verticalAlignment:u,imageFill:d,focalPoint:p,linkClass:m,href:g,linkTarget:h,rel:x}=e,_=x||void 0;let b=(0,Je.jsx)("img",{src:s,alt:a,className:c&&"image"===i?`wp-image-${c}`:null});g&&(b=(0,Je.jsx)("a",{className:m,href:g,target:h,rel:_,children:b}));const y={image:()=>b,video:()=>(0,Je.jsx)("video",{controls:!0,src:s})},f=(0,nt.getColorClassName)("background-color",t),v=ft({"has-media-on-the-right":"right"===r,"has-background":f||o,[f]:f,"is-stacked-on-mobile":n,[`is-vertically-aligned-${u}`]:u,"is-image-fill":d}),k=d?Mm(s,p):{};let w;l!==zm&&(w="right"===r?`auto ${l}%`:`${l}% auto`);const C={backgroundColor:f?void 0:o,gridTemplateColumns:w};return(0,Je.jsxs)("div",{className:v,style:C,children:[(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:k,children:(y[i]||Am)()}),(0,Je.jsx)("div",{className:"wp-block-media-text__content",children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})]})}},Qm={attributes:{...Lm,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:(0,ut.compose)(Rm,Hm),save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,isStackedOnMobile:n,mediaAlt:a,mediaPosition:r,mediaType:i,mediaUrl:s,mediaWidth:l,mediaId:c,verticalAlignment:u,imageFill:d,focalPoint:p}=e,m={image:()=>(0,Je.jsx)("img",{src:s,alt:a,className:c&&"image"===i?`wp-image-${c}`:null}),video:()=>(0,Je.jsx)("video",{controls:!0,src:s})},g=(0,nt.getColorClassName)("background-color",t),h=ft({"has-media-on-the-right":"right"===r,[g]:g,"is-stacked-on-mobile":n,[`is-vertically-aligned-${u}`]:u,"is-image-fill":d}),x=d?Mm(s,p):{};let _;l!==zm&&(_="right"===r?`auto ${l}%`:`${l}% auto`);const b={backgroundColor:g?void 0:o,gridTemplateColumns:_};return(0,Je.jsxs)("div",{className:h,style:b,children:[(0,Je.jsx)("figure",{className:"wp-block-media-text__media",style:x,children:(m[i]||Am)()}),(0,Je.jsx)("div",{className:"wp-block-media-text__content",children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})]})}},Km={attributes:{...Lm,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"}},migrate:Hm,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,isStackedOnMobile:n,mediaAlt:a,mediaPosition:r,mediaType:i,mediaUrl:s,mediaWidth:l}=e,c={image:()=>(0,Je.jsx)("img",{src:s,alt:a}),video:()=>(0,Je.jsx)("video",{controls:!0,src:s})},u=(0,nt.getColorClassName)("background-color",t),d=ft({"has-media-on-the-right":"right"===r,[u]:u,"is-stacked-on-mobile":n});let p;l!==zm&&(p="right"===r?`auto ${l}%`:`${l}% auto`);const m={backgroundColor:u?void 0:o,gridTemplateColumns:p};return(0,Je.jsxs)("div",{className:d,style:m,children:[(0,Je.jsx)("figure",{className:"wp-block-media-text__media",children:(c[i]||Am)()}),(0,Je.jsx)("div",{className:"wp-block-media-text__content",children:(0,Je.jsx)(nt.InnerBlocks.Content,{})})]})}},Ym=[Gm,Um,qm,Wm,Zm,Qm,Km],Jm=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})}),Xm=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})}),eg=(0,Je.jsxs)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Je.jsx)(Ye.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,Je.jsx)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})]});function tg(e,t){return e?{objectPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{}}const og=["image","video"],ng=()=>{},ag=(0,st.forwardRef)((({isSelected:e,isStackedOnMobile:t,...o},n)=>{const a=(0,ut.useViewportMatch)("small","<");return(0,Je.jsx)(tt.ResizableBox,{ref:n,showHandle:e&&(!a||!t),...o})}));function rg({mediaId:e,mediaUrl:t,onSelectMedia:o,toggleUseFeaturedImage:n,useFeaturedImage:a}){return(0,Je.jsx)(nt.BlockControls,{group:"other",children:(0,Je.jsx)(nt.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:og,accept:"image/*,video/*",onSelect:o,onToggleFeaturedImage:n,useFeaturedImage:a,onReset:()=>o(void 0)})})}function ig({className:e,mediaUrl:t,onSelectMedia:o,toggleUseFeaturedImage:n}){const{createErrorNotice:a}=(0,it.useDispatch)(Rt.store);return(0,Je.jsx)(nt.MediaPlaceholder,{icon:(0,Je.jsx)(nt.BlockIcon,{icon:eg}),labels:{title:(0,ot.__)("Media area")},className:e,onSelect:o,accept:"image/*,video/*",onToggleFeaturedImage:n,allowedTypes:og,onError:e=>{a(e,{type:"snackbar"})},disableMediaButtons:t})}const sg=(0,st.forwardRef)((function(e,t){const{className:o,commitWidthChange:n,focalPoint:a,imageFill:r,isSelected:i,isStackedOnMobile:s,mediaAlt:l,mediaId:c,mediaPosition:u,mediaType:d,mediaUrl:p,mediaWidth:m,onSelectMedia:g,onWidthChange:h,enableResize:x,toggleUseFeaturedImage:_,useFeaturedImage:b,featuredImageURL:y,featuredImageAlt:f,refMedia:v}=e,k=!c&&(0,lt.isBlobURL)(p),{toggleSelection:w}=(0,it.useDispatch)(nt.store);if(p||y||b){const C=()=>{w(!1)},j=(e,t,o)=>{h(parseInt(o.style.width))},S=(e,t,o)=>{w(!0),n(parseInt(o.style.width))},B={right:x&&"left"===u,left:x&&"right"===u},T="image"===d&&r?tg(p||y,a):{},N={image:()=>b&&y?(0,Je.jsx)("img",{ref:v,src:y,alt:f,style:T}):p&&(0,Je.jsx)("img",{ref:v,src:p,alt:l,style:T}),video:()=>(0,Je.jsx)("video",{controls:!0,ref:v,src:p})};return(0,Je.jsxs)(ag,{as:"figure",className:ft(o,"editor-media-container__resizer",{"is-transient":k}),size:{width:m+"%"},minWidth:"10%",maxWidth:"100%",enable:B,onResizeStart:C,onResize:j,onResizeStop:S,axis:"x",isSelected:i,isStackedOnMobile:s,ref:t,children:[(0,Je.jsx)(rg,{onSelectMedia:g,mediaUrl:b&&y?y:p,mediaId:c,toggleUseFeaturedImage:_}),(N[d]||ng)(),k&&(0,Je.jsx)(tt.Spinner,{}),!b&&(0,Je.jsx)(ig,{...e}),!y&&b&&(0,Je.jsx)(tt.Placeholder,{className:"wp-block-media-text--placeholder-image",style:T,withIllustration:!0})]})}return(0,Je.jsx)(ig,{...e})})),{ResolutionTool:lg}=Ot(nt.privateApis),cg=e=>Math.max(15,Math.min(e,85));function ug(e,t){return e?.media_details?.sizes?.[t]?.source_url}function dg({image:e,value:t,onChange:o}){const{imageSizes:n}=(0,it.useSelect)((e=>{const{getSettings:t}=e(nt.store);return{imageSizes:t().imageSizes}}),[]);if(!n?.length)return null;const a=n.filter((({slug:t})=>ug(e,t))).map((({name:e,slug:t})=>({value:t,label:e})));return(0,Je.jsx)(lg,{value:t,defaultValue:Pm,options:a,onChange:o})}const pg=function({attributes:e,isSelected:t,setAttributes:o,context:{postId:n,postType:a}}){const{focalPoint:r,href:i,imageFill:s,isStackedOnMobile:l,linkClass:c,linkDestination:u,linkTarget:d,mediaAlt:p,mediaId:m,mediaPosition:g,mediaType:h,mediaUrl:x,mediaWidth:_,mediaSizeSlug:b,rel:y,verticalAlignment:f,allowedBlocks:v,useFeaturedImage:k}=e,[w]=(0,ct.useEntityProp)("postType",a,"featured_media",n),{featuredImageMedia:C}=(0,it.useSelect)((e=>({featuredImageMedia:w&&k?e(ct.store).getMedia(w,{context:"view"}):void 0})),[w,k]),{image:j}=(0,it.useSelect)((e=>({image:m&&t?e(ct.store).getMedia(m,{context:"view"}):null})),[t,m]),S=k?C?.source_url:"",B=k?C?.alt_text:"",T=(0,st.useRef)(),N=e=>{const{style:t}=T.current,{x:o,y:n}=e;t.objectPosition=`${100*o}% ${100*n}%`},[P,I]=(0,st.useState)(null),M=function({attributes:{linkDestination:e,href:t},setAttributes:o}){return n=>{if(!n||!n.url)return void o({mediaAlt:void 0,mediaId:void 0,mediaType:void 0,mediaUrl:void 0,mediaLink:void 0,href:void 0,focalPoint:void 0,useFeaturedImage:!1});let a,r;(0,lt.isBlobURL)(n.url)&&(n.type=(0,lt.getBlobTypeByURL)(n.url)),a=n.media_type?"image"===n.media_type?"image":"video":n.type,"image"===a&&(r=n.sizes?.large?.url||n.media_details?.sizes?.large?.source_url);let i=t;"media"===e&&(i=n.url),"attachment"===e&&(i=n.link),o({mediaAlt:n.alt,mediaId:n.id,mediaType:a,mediaUrl:r||n.url,mediaLink:n.link||void 0,href:i,focalPoint:void 0,useFeaturedImage:!1})}}({attributes:e,setAttributes:o}),D=e=>{o({mediaWidth:cg(e)}),I(null)},z=ft({"has-media-on-the-right":"right"===g,"is-selected":t,"is-stacked-on-mobile":l,[`is-vertically-aligned-${f}`]:f,"is-image-fill-element":s}),A=`${P||_}%`,R="right"===g?`1fr ${A}`:`${A} 1fr`,H={gridTemplateColumns:R,msGridColumns:R},L=mt(),V=(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{o({isStackedOnMobile:!0,imageFill:!1,mediaAlt:"",focalPoint:void 0,mediaWidth:50,mediaSizeSlug:void 0})},dropdownMenuProps:L,children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Media width"),isShownByDefault:!0,hasValue:()=>50!==_,onDeselect:()=>o({mediaWidth:50}),children:(0,Je.jsx)(tt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Media width"),value:P||_,onChange:D,min:15,max:85})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Stack on mobile"),isShownByDefault:!0,hasValue:()=>!l,onDeselect:()=>o({isStackedOnMobile:!0}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Stack on mobile"),checked:l,onChange:()=>o({isStackedOnMobile:!l})})}),"image"===h&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Crop image to fill"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>o({imageFill:!1}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Crop image to fill"),checked:!!s,onChange:()=>o({imageFill:!s})})}),s&&(x||S)&&"image"===h&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Focal point"),isShownByDefault:!0,hasValue:()=>!!r,onDeselect:()=>o({focalPoint:void 0}),children:(0,Je.jsx)(tt.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Focal point"),url:k&&S?S:x,value:r,onChange:e=>o({focalPoint:e}),onDragStart:N,onDrag:N})}),"image"===h&&x&&!k&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Alternative text"),isShownByDefault:!0,hasValue:()=>!!p,onDeselect:()=>o({mediaAlt:""}),children:(0,Je.jsx)(tt.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Alternative text"),value:p,onChange:e=>{o({mediaAlt:e})},help:(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.ExternalLink,{href:(0,ot.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,ot.__)("Describe the purpose of the image.")}),(0,Je.jsx)("br",{}),(0,ot.__)("Leave empty if decorative.")]})})}),"image"===h&&!k&&(0,Je.jsx)(dg,{image:j,value:b,onChange:e=>{const t=ug(j,e);if(!t)return null;o({mediaUrl:t,mediaSizeSlug:e})}})]}),F=(0,nt.useBlockProps)({className:z,style:H}),E=(0,nt.useInnerBlocksProps)({className:"wp-block-media-text__content"},{template:Im,allowedBlocks:v}),O=(0,nt.useBlockEditingMode)();return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.InspectorControls,{children:V}),(0,Je.jsxs)(nt.BlockControls,{group:"block",children:["default"===O&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockVerticalAlignmentControl,{onChange:e=>{o({verticalAlignment:e})},value:f}),(0,Je.jsx)(tt.ToolbarButton,{icon:Jm,title:(0,ot.__)("Show media on left"),isActive:"left"===g,onClick:()=>o({mediaPosition:"left"})}),(0,Je.jsx)(tt.ToolbarButton,{icon:Xm,title:(0,ot.__)("Show media on right"),isActive:"right"===g,onClick:()=>o({mediaPosition:"right"})})]}),"image"===h&&!k&&(0,Je.jsx)(nt.__experimentalImageURLInputUI,{url:i||"",onChangeUrl:e=>{o(e)},linkDestination:u,mediaType:h,mediaUrl:j&&j.source_url,mediaLink:j&&j.link,linkTarget:d,linkClass:c,rel:y})]}),(0,Je.jsxs)("div",{...F,children:["right"===g&&(0,Je.jsx)("div",{...E}),(0,Je.jsx)(sg,{className:"wp-block-media-text__media",onSelectMedia:M,onWidthChange:e=>{I(cg(e))},commitWidthChange:D,refMedia:T,enableResize:"default"===O,toggleUseFeaturedImage:()=>{o({imageFill:!1,mediaType:"image",mediaId:void 0,mediaUrl:void 0,mediaAlt:void 0,mediaLink:void 0,linkDestination:void 0,linkTarget:void 0,linkClass:void 0,rel:void 0,href:void 0,useFeaturedImage:!k})},focalPoint:r,imageFill:s,isSelected:t,isStackedOnMobile:l,mediaAlt:p,mediaId:m,mediaPosition:g,mediaType:h,mediaUrl:x,mediaWidth:_,useFeaturedImage:k,featuredImageURL:S,featuredImageAlt:B}),"right"!==g&&(0,Je.jsx)("div",{...E})]})]})},mg=()=>{};const gg={from:[{type:"block",blocks:["core/image"],transform:({alt:e,url:t,id:o,anchor:n})=>(0,Ke.createBlock)("core/media-text",{mediaAlt:e,mediaId:o,mediaUrl:t,mediaType:"image",anchor:n})},{type:"block",blocks:["core/video"],transform:({src:e,id:t,anchor:o})=>(0,Ke.createBlock)("core/media-text",{mediaId:t,mediaUrl:e,mediaType:"video",anchor:o})},{type:"block",blocks:["core/cover"],transform:({align:e,alt:t,anchor:o,backgroundType:n,customGradient:a,customOverlayColor:r,gradient:i,id:s,overlayColor:l,style:c,textColor:u,url:d},p)=>{let m={};return a?m={style:{color:{gradient:a}}}:r&&(m={style:{color:{background:r}}}),c?.color?.text&&(m.style={color:{...m.style?.color,text:c.color.text}}),(0,Ke.createBlock)("core/media-text",{align:e,anchor:o,backgroundColor:l,gradient:i,mediaAlt:t,mediaId:s,mediaType:n,mediaUrl:d,textColor:u,...m},p)}}],to:[{type:"block",blocks:["core/image"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"image"===e,transform:({mediaAlt:e,mediaId:t,mediaUrl:o,anchor:n})=>(0,Ke.createBlock)("core/image",{alt:e,id:t,url:o,anchor:n})},{type:"block",blocks:["core/video"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"video"===e,transform:({mediaId:e,mediaUrl:t,anchor:o})=>(0,Ke.createBlock)("core/video",{id:e,src:t,anchor:o})},{type:"block",blocks:["core/cover"],transform:({align:e,anchor:t,backgroundColor:o,focalPoint:n,gradient:a,mediaAlt:r,mediaId:i,mediaType:s,mediaUrl:l,style:c,textColor:u},d)=>{const p={};c?.color?.gradient?p.customGradient=c.color.gradient:c?.color?.background&&(p.customOverlayColor=c.color.background),c?.color?.text&&(p.style={color:{text:c.color.text}});const m={align:e,alt:r,anchor:t,backgroundType:s,dimRatio:l?50:100,focalPoint:n,gradient:a,id:i,overlayColor:o,textColor:u,url:l,...p};return(0,Ke.createBlock)("core/cover",m,d)}}]},hg=gg,xg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/media-text",title:"Media & Text",category:"media",description:"Set media and words side-by-side for a richer layout.",keywords:["image","video"],textdomain:"default",attributes:{align:{type:"string",default:"none"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:"",role:"content"},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number",role:"content"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src",role:"content"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href",role:"content"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},mediaType:{type:"string",role:"content"},mediaWidth:{type:"number",default:50},mediaSizeSlug:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"},allowedBlocks:{type:"array"},useFeaturedImage:{type:"boolean",default:!1}},usesContext:["postId","postType"],supports:{anchor:!0,align:["wide","full"],html:!1,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-media-text-editor",style:"wp-block-media-text"},{name:_g}=xg,bg={icon:Nm,example:{viewportWidth:601,attributes:{mediaType:"image",mediaUrl:"https://s.w.org/images/core/5.3/Biologia_Centrali-Americana_-_Cantorchilus_semibadius_1902.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,ot.__)("The wren<br>Earns his living<br>Noiselessly.")}},{name:"core/paragraph",attributes:{content:(0,ot.__)("— Kobayashi Issa (一茶)")}}]},transforms:hg,edit:pg,save:function({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:a,mediaUrl:r,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Pm,x=g||void 0,_=ft({[`wp-image-${s}`]:s&&"image"===a,[`size-${h}`]:s&&"image"===a}),b=c?tg(r,u):{};let y=r?(0,Je.jsx)("img",{src:r,alt:o,className:_||null,style:b}):null;p&&(y=(0,Je.jsx)("a",{className:d,href:p,target:m,rel:x,children:y}));const f={image:()=>y,video:()=>(0,Je.jsx)("video",{controls:!0,src:r})},v=ft({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill-element":c});let k;50!==i&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:v,style:w}),children:[(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Je.jsx)("figure",{className:"wp-block-media-text__media",children:(f[a]||mg)()})]}):(0,Je.jsxs)("div",{...nt.useBlockProps.save({className:v,style:w}),children:[(0,Je.jsx)("figure",{className:"wp-block-media-text__media",children:(f[a]||mg)()}),(0,Je.jsx)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},deprecated:Ym},yg=()=>et({name:_g,metadata:xg,settings:bg});const fg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/missing",title:"Unsupported",category:"text",description:"Your site doesn’t include support for this block.",textdomain:"default",attributes:{originalName:{type:"string"},originalUndelimitedContent:{type:"string"},originalContent:{type:"string",source:"raw"}},supports:{className:!1,customClassName:!1,inserter:!1,html:!1,reusable:!1,interactivity:{clientNavigation:!0}}},{name:vg}=fg,kg={name:vg,__experimentalLabel(e,{context:t}){if("accessibility"===t){const{originalName:t}=e,o=t?(0,Ke.getBlockType)(t):void 0;return o?o.settings.title||t:""}},edit:function({attributes:e,clientId:t}){const{originalName:o,originalUndelimitedContent:n}=e,a=!!n,{hasFreeformBlock:r,hasHTMLBlock:i}=(0,it.useSelect)((e=>{const{canInsertBlockType:o,getBlockRootClientId:n}=e(nt.store);return{hasFreeformBlock:o("core/freeform",n(t)),hasHTMLBlock:o("core/html",n(t))}}),[t]),{replaceBlock:s}=(0,it.useDispatch)(nt.store),l=[];let c;const u=(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,onClick:function(){s(t,(0,Ke.createBlock)("core/html",{content:n}))},variant:"primary",children:(0,ot.__)("Keep as HTML")},"convert");return!a||r||o?a&&i?(c=(0,ot.sprintf)((0,ot.__)('Your site doesn’t include support for the "%s" block. You can leave it as-is, convert it to custom HTML, or remove it.'),o),l.push(u)):c=(0,ot.sprintf)((0,ot.__)('Your site doesn’t include support for the "%s" block. You can leave it as-is or remove it.'),o):i?(c=(0,ot.__)("It appears you are trying to use the deprecated Classic block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."),l.push(u)):c=(0,ot.__)("It appears you are trying to use the deprecated Classic block. You can leave this block intact, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."),(0,Je.jsxs)("div",{...(0,nt.useBlockProps)({className:"has-warning"}),children:[(0,Je.jsx)(nt.Warning,{actions:l,children:c}),(0,Je.jsx)(st.RawHTML,{children:(0,_c.safeHTML)(n)})]})},save:function({attributes:e}){return(0,Je.jsx)(st.RawHTML,{children:e.originalContent})}},wg=()=>et({name:vg,metadata:fg,settings:kg}),Cg=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"})}),jg=(0,ot.__)("Read more");const Sg={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/more"===e.dataset.block,transform(e){const{customText:t,noTeaser:o}=e.dataset,n={};return t&&(n.customText=t),""===o&&(n.noTeaser=!0),(0,Ke.createBlock)("core/more",n)}}]},Bg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/more",title:"More",category:"design",description:"Content before this block will be shown in the excerpt on your archives page.",keywords:["read more"],textdomain:"default",attributes:{customText:{type:"string",default:""},noTeaser:{type:"boolean",default:!1}},supports:{customClassName:!1,className:!1,html:!1,multiple:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-more-editor"},{name:Tg}=Bg,Ng={icon:Cg,example:{},__experimentalLabel(e,{context:t}){const o=e?.metadata?.name;return"list-view"===t&&o?o:"accessibility"===t?e.customText:void 0},transforms:Sg,edit:function({attributes:{customText:e,noTeaser:t},insertBlocksAfter:o,setAttributes:n}){const a={width:`${(e||jg).length+1.2}em`},r=mt();return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsx)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{n({noTeaser:!1})},dropdownMenuProps:r,children:(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Hide excerpt"),isShownByDefault:!0,hasValue:()=>t,onDeselect:()=>n({noTeaser:!1}),children:(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Hide the excerpt on the full content page"),checked:!!t,onChange:()=>n({noTeaser:!t}),help:e=>e?(0,ot.__)("The excerpt is hidden."):(0,ot.__)("The excerpt is visible.")})})})}),(0,Je.jsx)("div",{...(0,nt.useBlockProps)(),children:(0,Je.jsx)("input",{"aria-label":(0,ot.__)("“Read more” link text"),type:"text",value:e,placeholder:jg,onChange:e=>{n({customText:e.target.value})},onKeyDown:({keyCode:e})=>{e===wo.ENTER&&o([(0,Ke.createBlock)((0,Ke.getDefaultBlockName)())])},style:a})})]})},save:function({attributes:{customText:e,noTeaser:t}}){const o=e?`\x3c!--more ${e}--\x3e`:"\x3c!--more--\x3e",n=t?"\x3c!--noteaser--\x3e":"";return(0,Je.jsx)(st.RawHTML,{children:[o,n].filter(Boolean).join("\n")})}},Pg=()=>et({name:Tg,metadata:Bg,settings:Ng}),Ig=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})}),Mg=window.wp.a11y;const Dg=(0,st.forwardRef)((function({icon:e,size:t=24,...o},n){return(0,st.cloneElement)(e,{width:t,height:t,...o,ref:n})})),zg=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})}),Ag={name:"core/navigation-link"},Rg=["core/navigation-link/page","core/navigation-link"],Hg={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"},Lg=["postType","wp_navigation",Hg];function Vg(e){const t=(0,ct.useResourcePermissions)({kind:"postType",name:"wp_navigation",id:e}),{navigationMenu:o,isNavigationMenuResolved:n,isNavigationMenuMissing:a}=(0,it.useSelect)((t=>function(e,t){if(!t)return{isNavigationMenuResolved:!1,isNavigationMenuMissing:!0};const{getEntityRecord:o,getEditedEntityRecord:n,hasFinishedResolution:a}=e(ct.store),r=["postType","wp_navigation",t],i=o(...r),s=n(...r),l=a("getEditedEntityRecord",r),c="publish"===s.status||"draft"===s.status;return{isNavigationMenuResolved:l,isNavigationMenuMissing:l&&(!i||!c),navigationMenu:c?s:null}}(t,e)),[e]),{canCreate:r,canUpdate:i,canDelete:s,isResolving:l,hasResolved:c}=t,{records:u,isResolving:d,hasResolved:p}=(0,ct.useEntityRecords)("postType","wp_navigation",Hg);return{navigationMenu:o,isNavigationMenuResolved:n,isNavigationMenuMissing:a,navigationMenus:u,isResolvingNavigationMenus:d,hasResolvedNavigationMenus:p,canSwitchNavigationMenu:e?u?.length>1:u?.length>0,canUserCreateNavigationMenus:r,isResolvingCanUserCreateNavigationMenus:l,hasResolvedCanUserCreateNavigationMenus:c,canUserUpdateNavigationMenu:i,hasResolvedCanUserUpdateNavigationMenu:e?c:void 0,canUserDeleteNavigationMenu:s,hasResolvedCanUserDeleteNavigationMenu:e?c:void 0}}function Fg(e){const{records:t,isResolving:o,hasResolved:n}=(0,ct.useEntityRecords)("root","menu",{per_page:-1,context:"view"}),{records:a,isResolving:r,hasResolved:i}=(0,ct.useEntityRecords)("postType","page",{parent:0,order:"asc",orderby:"id",per_page:-1,context:"view"}),{records:s,hasResolved:l}=(0,ct.useEntityRecords)("root","menuItem",{menus:e,per_page:-1,context:"view"},{enabled:!!e});return{pages:a,isResolvingPages:r,hasResolvedPages:i,hasPages:!(!i||!a?.length),menus:t,isResolvingMenus:o,hasResolvedMenus:n,hasMenus:!(!n||!t?.length),menuItems:s,hasResolvedMenuItems:l}}const Eg=({isVisible:e=!0})=>(0,Je.jsx)("div",{"aria-hidden":!e||void 0,className:"wp-block-navigation-placeholder__preview",children:(0,Je.jsxs)("div",{className:"wp-block-navigation-placeholder__actions__indicator",children:[(0,Je.jsx)(Dg,{icon:Ig}),(0,ot.__)("Navigation")]})}),Og=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});const $g=function({currentMenuId:e,onSelectNavigationMenu:t,onSelectClassicMenu:o,onCreateNew:n,actionLabel:a,createNavigationMenuIsSuccess:r,createNavigationMenuIsError:i}){const s=(0,ot.__)("Create from '%s'"),[l,c]=(0,st.useState)(!1);a=a||s;const{menus:u}=Fg(),{navigationMenus:d,isResolvingNavigationMenus:p,hasResolvedNavigationMenus:m,canUserCreateNavigationMenus:g,canSwitchNavigationMenu:h,isNavigationMenuMissing:x}=Vg(e),[_]=(0,ct.useEntityProp)("postType","wp_navigation","title"),b=(0,st.useMemo)((()=>d?.map((({id:e,title:t,status:o},n)=>{const r=function(e,t,o){return e?"publish"===o?(0,tn.decodeEntities)(e):(0,ot.sprintf)((0,ot.__)("%1$s (%2$s)"),(0,tn.decodeEntities)(e),o):(0,ot.sprintf)((0,ot.__)("(no title %s)"),t)}(t?.rendered,n+1,o);return{value:e,label:r,ariaLabel:(0,ot.sprintf)(a,r),disabled:l||p||!m}}))||[]),[d,a,p,m,l]),y=!!d?.length,f=!!u?.length,v=!!h,k=!!g,w=y&&!e,C=!y&&m,j=m&&null===e,S=e&&x;let B="";B=p?(0,ot.__)("Loading…"):w||C||j||S?(0,ot.__)("Choose or create a Navigation Menu"):_,(0,st.useEffect)((()=>{l&&(r||i)&&c(!1)}),[m,r,g,i,l,j,C,w]);const T=(0,Je.jsx)(tt.DropdownMenu,{label:B,icon:Og,toggleProps:{size:"small"},children:({onClose:a})=>(0,Je.jsxs)(Je.Fragment,{children:[v&&y&&(0,Je.jsx)(tt.MenuGroup,{label:(0,ot.__)("Menus"),children:(0,Je.jsx)(tt.MenuItemsChoice,{value:e,onSelect:e=>{t(e),a()},choices:b})}),k&&f&&(0,Je.jsx)(tt.MenuGroup,{label:(0,ot.__)("Import Classic Menus"),children:u?.map((e=>{const t=(0,tn.decodeEntities)(e.name);return(0,Je.jsx)(tt.MenuItem,{onClick:async()=>{c(!0),await o(e),c(!1),a()},"aria-label":(0,ot.sprintf)(s,t),disabled:l||p||!m,children:t},e.id)}))}),g&&(0,Je.jsx)(tt.MenuGroup,{label:(0,ot.__)("Tools"),children:(0,Je.jsx)(tt.MenuItem,{onClick:async()=>{c(!0),await n(),c(!1),a()},disabled:l||p||!m,children:(0,ot.__)("Create new Menu")})})]})});return T};function Gg({isSelected:e,currentMenuId:t,clientId:o,canUserCreateNavigationMenus:n=!1,isResolvingCanUserCreateNavigationMenus:a,onSelectNavigationMenu:r,onSelectClassicMenu:i,onCreateEmpty:s}){const{isResolvingMenus:l,hasResolvedMenus:c}=Fg();(0,st.useEffect)((()=>{e&&(l&&(0,Mg.speak)((0,ot.__)("Loading navigation block setup options…")),c&&(0,Mg.speak)((0,ot.__)("Navigation block setup options ready.")))}),[c,l,e]);const u=l&&a;return(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsxs)(tt.Placeholder,{className:"wp-block-navigation-placeholder",children:[(0,Je.jsx)(Eg,{isVisible:!e}),(0,Je.jsx)("div",{"aria-hidden":!e||void 0,className:"wp-block-navigation-placeholder__controls",children:(0,Je.jsxs)("div",{className:"wp-block-navigation-placeholder__actions",children:[(0,Je.jsxs)("div",{className:"wp-block-navigation-placeholder__actions__indicator",children:[(0,Je.jsx)(Dg,{icon:Ig})," ",(0,ot.__)("Navigation")]}),(0,Je.jsx)("hr",{}),u&&(0,Je.jsx)(tt.Spinner,{}),(0,Je.jsx)($g,{currentMenuId:t,clientId:o,onSelectNavigationMenu:r,onSelectClassicMenu:i}),(0,Je.jsx)("hr",{}),n&&(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:s,children:(0,ot.__)("Start empty")})]})})]})})}const Ug=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"})});function qg({icon:e}){return"menu"===e?(0,Je.jsx)(Dg,{icon:Ug}):(0,Je.jsxs)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,Je.jsx)(Ye.Rect,{x:"4",y:"7.5",width:"16",height:"1.5"}),(0,Je.jsx)(Ye.Rect,{x:"4",y:"15",width:"16",height:"1.5"})]})}function Wg({children:e,id:t,isOpen:o,isResponsive:n,onToggle:a,isHiddenByDefault:r,overlayBackgroundColor:i,overlayTextColor:s,hasIcon:l,icon:c}){if(!n)return e;const u=ft("wp-block-navigation__responsive-container",{"has-text-color":!!s.color||!!s?.class,[(0,nt.getColorClassName)("color",s?.slug)]:!!s?.slug,"has-background":!!i.color||i?.class,[(0,nt.getColorClassName)("background-color",i?.slug)]:!!i?.slug,"is-menu-open":o,"hidden-by-default":r}),d={color:!s?.slug&&s?.color,backgroundColor:!i?.slug&&i?.color&&i.color},p=ft("wp-block-navigation__responsive-container-open",{"always-shown":r}),m=`${t}-modal`,g={className:"wp-block-navigation__responsive-dialog",...o&&{role:"dialog","aria-modal":!0,"aria-label":(0,ot.__)("Menu")}};return(0,Je.jsxs)(Je.Fragment,{children:[!o&&(0,Je.jsxs)(tt.Button,{__next40pxDefaultSize:!0,"aria-haspopup":"true","aria-label":l&&(0,ot.__)("Open menu"),className:p,onClick:()=>a(!0),children:[l&&(0,Je.jsx)(qg,{icon:c}),!l&&(0,ot.__)("Menu")]}),(0,Je.jsx)("div",{className:u,style:d,id:m,children:(0,Je.jsx)("div",{className:"wp-block-navigation__responsive-close",tabIndex:"-1",children:(0,Je.jsxs)("div",{...g,children:[(0,Je.jsxs)(tt.Button,{__next40pxDefaultSize:!0,className:"wp-block-navigation__responsive-container-close","aria-label":l&&(0,ot.__)("Close menu"),onClick:()=>a(!1),children:[l&&(0,Je.jsx)(Dg,{icon:zg}),!l&&(0,ot.__)("Close")]}),(0,Je.jsx)("div",{className:"wp-block-navigation__responsive-container-content",id:`${m}-content`,children:e})]})})})]})}function Zg({clientId:e,hasCustomPlaceholder:t,orientation:o,templateLock:n}){const{isImmediateParentOfSelectedBlock:a,selectedBlockHasChildren:r,isSelected:i}=(0,it.useSelect)((t=>{const{getBlockCount:o,hasSelectedInnerBlock:n,getSelectedBlockClientId:a}=t(nt.store),r=a();return{isImmediateParentOfSelectedBlock:n(e,!1),selectedBlockHasChildren:!!o(r),isSelected:r===e}}),[e]),[s,l,c]=(0,ct.useEntityBlockEditor)("postType","wp_navigation"),u=i||a&&!r,d=(0,st.useMemo)((()=>(0,Je.jsx)(Eg,{})),[]),p=!t&&!!!s?.length&&!i,m=(0,nt.useInnerBlocksProps)({className:"wp-block-navigation__container"},{value:s,onInput:l,onChange:c,prioritizedInserterBlocks:Rg,defaultBlock:Ag,directInsert:!0,orientation:o,templateLock:n,renderAppender:!!(i||a&&!r||u)&&nt.InnerBlocks.ButtonBlockAppender,placeholder:p?d:void 0,__experimentalCaptureToolbars:!0,__unstableDisableLayoutClassNames:!0});return(0,Je.jsx)("div",{...m})}function Qg(){const[e,t]=(0,ct.useEntityProp)("postType","wp_navigation","title");return(0,Je.jsx)(tt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Menu name"),value:e,onChange:t})}const Kg=(e,t,o)=>{if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){if(!t.hasOwnProperty(n))return!1;if(o&&o(n,e))return!0;if(!Kg(e[n],t[n],o))return!1}return!0}return!1},Yg={};function Jg({blocks:e,createNavigationMenu:t,hasSelection:o}){const n=(0,st.useRef)();(0,st.useEffect)((()=>{n?.current||(n.current=e)}),[e]);const a=function(e,t){return!Kg(e,t,((e,t)=>{if("core/page-list"===t?.name&&"innerBlocks"===e)return!0}))}(n?.current,e),r=(0,st.useContext)(tt.Disabled.Context),i=(0,nt.useInnerBlocksProps)({className:"wp-block-navigation__container"},{renderAppender:!!o&&void 0,defaultBlock:Ag,directInsert:!0}),{isSaving:s,hasResolvedAllNavigationMenus:l}=(0,it.useSelect)((e=>{if(r)return Yg;const{hasFinishedResolution:t,isSavingEntityRecord:o}=e(ct.store);return{isSaving:o("postType","wp_navigation"),hasResolvedAllNavigationMenus:t("getEntityRecords",Lg)}}),[r]);(0,st.useEffect)((()=>{!r&&!s&&l&&o&&a&&t(null,e)}),[e,t,r,s,l,a,o]);const c=s?tt.Disabled:"div";return(0,Je.jsx)(c,{...i})}function Xg({onDelete:e}){const[t,o]=(0,st.useState)(!1),n=(0,ct.useEntityId)("postType","wp_navigation"),{deleteEntityRecord:a}=(0,it.useDispatch)(ct.store);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,className:"wp-block-navigation-delete-menu-button",variant:"secondary",isDestructive:!0,onClick:()=>{o(!0)},children:(0,ot.__)("Delete menu")}),t&&(0,Je.jsx)(tt.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{a("postType","wp_navigation",n,{force:!0}),e()},onCancel:()=>{o(!1)},confirmButtonText:(0,ot.__)("Delete"),size:"medium",children:(0,ot.__)("Are you sure you want to delete this Navigation Menu?")})]})}const eh=function({name:e,message:t=""}={}){const o=(0,st.useRef)(),{createWarningNotice:n,removeNotice:a}=(0,it.useDispatch)(Rt.store);return[(0,st.useCallback)((a=>{o.current||(o.current=e,n(a||t,{id:o.current,type:"snackbar"}))}),[o,n,t,e]),(0,st.useCallback)((()=>{o.current&&(a(o.current),o.current=null)}),[o,a])]};function th({setAttributes:e,hasIcon:t,icon:o}){return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Show icon button"),help:(0,ot.__)("Configure the visual appearance of the button that toggles the overlay menu."),onChange:t=>e({hasIcon:t}),checked:t}),(0,Je.jsxs)(tt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"wp-block-navigation__overlay-menu-icon-toggle-group",label:(0,ot.__)("Icon"),value:o,onChange:t=>e({icon:t}),isBlock:!0,children:[(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"handle","aria-label":(0,ot.__)("handle"),label:(0,Je.jsx)(qg,{icon:"handle"})}),(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"menu","aria-label":(0,ot.__)("menu"),label:(0,Je.jsx)(qg,{icon:"menu"})})]})]})}function oh(e){if(!e)return null;const t=nh(function(e,t="id",o="parent"){const n=Object.create(null),a=[];for(const r of e)n[r[t]]={...r,children:[]},r[o]?(n[r[o]]=n[r[o]]||{},n[r[o]].children=n[r[o]].children||[],n[r[o]].children.push(n[r[t]])):a.push(n[r[t]]);return a}(e));return(0,Ns.applyFilters)("blocks.navigation.__unstableMenuItemsToBlocks",t,e)}function nh(e,t=0){let o={};const n=[...e].sort(((e,t)=>e.menu_order-t.menu_order)),a=n.map((e=>{if("block"===e.type){const[t]=(0,Ke.parse)(e.content.raw);return t||(0,Ke.createBlock)("core/freeform",{content:e.content})}const n=e.children?.length?"core/navigation-submenu":"core/navigation-link",a=function({title:e,xfn:t,classes:o,attr_title:n,object:a,object_id:r,description:i,url:s,type:l,target:c},u,d){a&&"post_tag"===a&&(a="tag");return{label:e?.rendered||"",...a?.length&&{type:a},kind:l?.replace("_","-")||"custom",url:s||"",...t?.length&&t.join(" ").trim()&&{rel:t.join(" ").trim()},...o?.length&&o.join(" ").trim()&&{className:o.join(" ").trim()},...n?.length&&{title:n},...r&&"custom"!==a&&{id:r},...i?.length&&{description:i},..."_blank"===c&&{opensInNewTab:!0},..."core/navigation-submenu"===u&&{isTopLevelItem:0===d},..."core/navigation-link"===u&&{isTopLevelLink:0===d}}}(e,n,t),{innerBlocks:r=[],mapping:i={}}=e.children?.length?nh(e.children,t+1):{};o={...o,...i};const s=(0,Ke.createBlock)(n,a,r);return o[e.id]=s.clientId,s}));return{innerBlocks:a,mapping:o}}const ah="success",rh="error",ih="pending";let sh=null;const lh=function(e,{throwOnError:t=!1}={}){const o=(0,it.useRegistry)(),{editEntityRecord:n}=(0,it.useDispatch)(ct.store),[a,r]=(0,st.useState)("idle"),[i,s]=(0,st.useState)(null),l=(0,st.useCallback)((async(t,a,r="publish")=>{let i,s;try{s=await o.resolveSelect(ct.store).getMenuItems({menus:t,per_page:-1,context:"view"})}catch(e){throw new Error((0,ot.sprintf)((0,ot.__)('Unable to fetch classic menu "%s" from API.'),a),{cause:e})}if(null===s)throw new Error((0,ot.sprintf)((0,ot.__)('Unable to fetch classic menu "%s" from API.'),a));const{innerBlocks:l}=oh(s);try{i=await e(a,l,r),await n("postType","wp_navigation",i.id,{status:"publish"},{throwOnError:!0})}catch(e){throw new Error((0,ot.sprintf)((0,ot.__)('Unable to create Navigation Menu "%s".'),a),{cause:e})}return i}),[e,n,o]);return{convert:(0,st.useCallback)((async(e,o,n)=>{if(sh!==e)return sh=e,e&&o?(r(ih),s(null),await l(e,o,n).then((e=>(r(ah),sh=null,e))).catch((e=>{if(s(e?.message),r(rh),sh=null,t)throw new Error((0,ot.sprintf)((0,ot.__)('Unable to create Navigation Menu "%s".'),o),{cause:e})}))):(s("Unable to convert menu. Missing menu details."),void r(rh))}),[l,t]),status:a,error:i}};function ch(e,t){return e&&t?e+"//"+t:null}const uh=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),dh=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),ph=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),mh=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),gh=e=>"header"===e?uh:"footer"===e?dh:"sidebar"===e?ph:mh;const hh=["postType","wp_navigation",{status:"draft",per_page:-1}],xh=["postType","wp_navigation",{per_page:-1,status:"publish"}];function _h(e){const t=(0,st.useContext)(tt.Disabled.Context),o=function(e){return(0,it.useSelect)((t=>{if(!e)return;const{getBlock:o,getBlockParentsByBlockName:n}=t(nt.store),a=n(e,"core/template-part",!0);if(!a?.length)return;const{getCurrentTheme:r,getEditedEntityRecord:i}=t(ct.store),s=r(),l=(s?.default_template_part_areas||[]).map((e=>({...e,icon:gh(e.icon)})));for(const e of a){const t=o(e),{theme:n=s?.stylesheet,slug:a}=t.attributes,r=i("postType","wp_template_part",ch(n,a));if(r?.area)return l.find((e=>"uncategorized"!==e.area&&e.area===r.area))?.label}}),[e])}(t?void 0:e),n=(0,it.useRegistry)();return(0,st.useCallback)((async()=>{if(t)return"";const{getEntityRecords:e}=n.resolveSelect(ct.store),[a,r]=await Promise.all([e(...hh),e(...xh)]),i=o?(0,ot.sprintf)((0,ot.__)("%s menu"),o):(0,ot.__)("Menu"),s=[...a,...r].reduce(((e,t)=>t?.title?.raw?.startsWith(i)?e+1:e),0);return(s>0?`${i} ${s+1}`:i)||""}),[t,o,n])}const bh="success",yh="error",fh="pending",vh="idle";const kh=[];function wh(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function Ch(e,t,o){if(!e)return;t(wh(e).color);let n=e,a=wh(n).backgroundColor;for(;"rgba(0, 0, 0, 0)"===a&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,a=wh(n).backgroundColor;o(a)}function jh(e,t){const{textColor:o,customTextColor:n,backgroundColor:a,customBackgroundColor:r,overlayTextColor:i,customOverlayTextColor:s,overlayBackgroundColor:l,customOverlayBackgroundColor:c,style:u}=e,d={};return t&&s?d.customTextColor=s:t&&i?d.textColor=i:n?d.customTextColor=n:o?d.textColor=o:u?.color?.text&&(d.customTextColor=u.color.text),t&&c?d.customBackgroundColor=c:t&&l?d.backgroundColor=l:r?d.customBackgroundColor=r:a?d.backgroundColor=a:u?.color?.background&&(d.customTextColor=u.color.background),d}function Sh(e){return{className:ft("wp-block-navigation__submenu-container",{"has-text-color":!(!e.textColor&&!e.customTextColor),[`has-${e.textColor}-color`]:!!e.textColor,"has-background":!(!e.backgroundColor&&!e.customBackgroundColor),[`has-${e.backgroundColor}-background-color`]:!!e.backgroundColor}),style:{color:e.customTextColor,backgroundColor:e.customBackgroundColor}}}const Bh=({className:e="",disabled:t,isMenuItem:o=!1})=>{let n=tt.Button;return o&&(n=tt.MenuItem),(0,Je.jsx)(n,{variant:"link",disabled:t,className:e,href:(0,vt.addQueryArgs)("edit.php",{post_type:"wp_navigation"}),children:(0,ot.__)("Manage menus")})};const Th=function({onCreateNew:e,isNotice:t=!1}){const[o,n]=(0,st.useState)(!1),a=(0,st.createInterpolateElement)((0,ot.__)("Navigation Menu has been deleted or is unavailable. <button>Create a new Menu?</button>"),{button:(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,onClick:()=>{n(!0),e()},variant:"link",disabled:o,accessibleWhenDisabled:!0})});return t?(0,Je.jsx)(tt.Notice,{status:"warning",isDismissible:!1,children:a}):(0,Je.jsx)(nt.Warning,{children:a})},Nh=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z"})}),Ph=(0,Je.jsx)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)(Ye.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Ih={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},Mh=["core/navigation-link","core/navigation-submenu"];function Dh({block:e,onClose:t,expandedState:o,expand:n,setInsertedBlock:a}){const{insertBlock:r,replaceBlock:i,replaceInnerBlocks:s}=(0,it.useDispatch)(nt.store),l=e.clientId,c=!Mh.includes(e.name);return(0,Je.jsx)(tt.MenuItem,{icon:Nh,disabled:c,onClick:()=>{const c=!1,u=(0,Ke.createBlock)("core/navigation-link");if("core/navigation-submenu"===e.name)r(u,e.innerBlocks.length,l,c);else{const t=(0,Ke.createBlock)("core/navigation-submenu",e.attributes,e.innerBlocks);i(l,t),s(t.clientId,[u],c)}a(u),o[e.clientId]||n(e.clientId),t()},children:(0,ot.__)("Add submenu link")})}function zh(e){const{block:t}=e,{clientId:o}=t,{moveBlocksDown:n,moveBlocksUp:a,removeBlocks:r}=(0,it.useDispatch)(nt.store),i=(0,ot.sprintf)((0,ot.__)("Remove %s"),(0,nt.BlockTitle)({clientId:o,maximumLength:25})),s=(0,it.useSelect)((e=>{const{getBlockRootClientId:t}=e(nt.store);return t(o)}),[o]);return(0,Je.jsx)(tt.DropdownMenu,{icon:Og,label:(0,ot.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Ih,noIcons:!0,...e,children:({onClose:l})=>(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)(tt.MenuGroup,{children:[(0,Je.jsx)(tt.MenuItem,{icon:Ph,onClick:()=>{a([o],s),l()},children:(0,ot.__)("Move up")}),(0,Je.jsx)(tt.MenuItem,{icon:Kd,onClick:()=>{n([o],s),l()},children:(0,ot.__)("Move down")}),(0,Je.jsx)(Dh,{block:t,onClose:l,expanded:!0,expandedState:e.expandedState,expand:e.expand,setInsertedBlock:e.setInsertedBlock})]}),(0,Je.jsx)(tt.MenuGroup,{children:(0,Je.jsx)(tt.MenuItem,{onClick:()=>{r([o],!1),l()},children:i})})]})})}const Ah=window.wp.escapeHtml,Rh=(e={},t,o={})=>{const{label:n="",kind:a="",type:r=""}=o,{title:i="",url:s="",opensInNewTab:l,id:c,kind:u=a,type:d=r}=e,p=i.replace(/http(s?):\/\//gi,""),m=s.replace(/http(s?):\/\//gi,""),g=i&&i!==n&&p!==m?(0,Ah.escapeHTML)(i):n||(0,Ah.escapeHTML)(m),h="post_tag"===d?"tag":d.replace("-","_"),x=["post","page","tag","category"].indexOf(h)>-1,_=!u&&!x||"custom"===u?"custom":u;t({...s&&{url:encodeURI((0,vt.safeDecodeURI)(s))},...g&&{label:g},...void 0!==l&&{opensInNewTab:l},...c&&Number.isInteger(c)&&{id:c},..._&&{kind:_},...h&&"URL"!==h&&{type:h}})},Hh=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})}),Lh=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})}),Vh=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),{PrivateQuickInserter:Fh}=Ot(nt.privateApis);function Eh(e,t){switch(e){case"post":case"page":return{type:"post",subtype:e};case"category":return{type:"term",subtype:"category"};case"tag":return{type:"term",subtype:"post_tag"};case"post_format":return{type:"post-format"};default:return"taxonomy"===t?{type:"term",subtype:e}:"post-type"===t?{type:"post",subtype:e}:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}}}function Oh({clientId:e,onBack:t}){const{rootBlockClientId:o}=(0,it.useSelect)((t=>{const{getBlockRootClientId:o}=t(nt.store);return{rootBlockClientId:o(e)}}),[e]),n=(0,ut.useFocusOnMount)("firstElement"),a=(0,ut.useInstanceId)(nt.LinkControl,"link-ui-block-inserter__title"),r=(0,ut.useInstanceId)(nt.LinkControl,"link-ui-block-inserter__description");return e?(0,Je.jsxs)("div",{className:"link-ui-block-inserter",role:"dialog","aria-labelledby":a,"aria-describedby":r,ref:n,children:[(0,Je.jsxs)(tt.VisuallyHidden,{children:[(0,Je.jsx)("h2",{id:a,children:(0,ot.__)("Add block")}),(0,Je.jsx)("p",{id:r,children:(0,ot.__)("Choose a block to add to your Navigation.")})]}),(0,Je.jsx)(tt.Button,{className:"link-ui-block-inserter__back",icon:(0,ot.isRTL)()?Hh:Lh,onClick:e=>{e.preventDefault(),t()},size:"small",children:(0,ot.__)("Back")}),(0,Je.jsx)(Fh,{rootClientId:o,clientId:e,isAppender:!1,prioritizePatterns:!1,selectBlockOnInsert:!0,hasSearch:!1})]}):null}const $h=(0,st.forwardRef)((function(e,t){const{label:o,url:n,opensInNewTab:a,type:r,kind:i}=e.link,s=r||"page",[l,c]=(0,st.useState)(!1),[u,d]=(0,st.useState)(!1),{saveEntityRecord:p}=(0,it.useDispatch)(ct.store),m=(0,ct.useResourcePermissions)({kind:"postType",name:s}),g=(0,st.useMemo)((()=>({url:n,opensInNewTab:a,title:o&&(0,_c.__unstableStripHTML)(o)})),[o,a,n]),h=(0,ut.useInstanceId)($h,"link-ui-link-control__title"),x=(0,ut.useInstanceId)($h,"link-ui-link-control__description");return(0,Je.jsxs)(tt.Popover,{ref:t,placement:"bottom",onClose:e.onClose,anchor:e.anchor,shift:!0,children:[!l&&(0,Je.jsxs)("div",{role:"dialog","aria-labelledby":h,"aria-describedby":x,children:[(0,Je.jsxs)(tt.VisuallyHidden,{children:[(0,Je.jsx)("h2",{id:h,children:(0,ot.__)("Add link")}),(0,Je.jsx)("p",{id:x,children:(0,ot.__)("Search for and add a link to your Navigation.")})]}),(0,Je.jsx)(nt.LinkControl,{hasTextControl:!0,hasRichPreviews:!0,value:g,showInitialSuggestions:!0,withCreateSuggestion:m.canCreate,createSuggestion:async function(e){const t=await p("postType",s,{title:e,status:"draft"});return{id:t.id,type:s,title:(0,tn.decodeEntities)(t.title.rendered),url:t.link,kind:"post-type"}},createSuggestionButtonText:e=>{let t;return t="post"===r?(0,ot.__)("Create draft post: <mark>%s</mark>"):(0,ot.__)("Create draft page: <mark>%s</mark>"),(0,st.createInterpolateElement)((0,ot.sprintf)(t,e),{mark:(0,Je.jsx)("mark",{})})},noDirectEntry:!!r,noURLSuggestion:!!r,suggestionsQuery:Eh(r,i),onChange:e.onChange,onRemove:e.onRemove,onCancel:e.onCancel,renderControlBottom:()=>!g?.url?.length&&(0,Je.jsx)(Gh,{focusAddBlockButton:u,setAddingBlock:()=>{c(!0),d(!1)}})})]}),l&&(0,Je.jsx)(Oh,{clientId:e.clientId,onBack:()=>{c(!1),d(!0)}})]})})),Gh=({setAddingBlock:e,focusAddBlockButton:t})=>{const o=(0,st.useRef)();return(0,st.useEffect)((()=>{t&&o.current?.focus()}),[t]),(0,Je.jsx)(tt.__experimentalVStack,{className:"link-ui-tools",children:(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,ref:o,icon:Vh,onClick:t=>{t.preventDefault(),e(!0)},"aria-haspopup":"listbox",children:(0,ot.__)("Add block")})})},Uh=(0,ot.__)("Switch to '%s'"),qh=["core/navigation-link","core/navigation-submenu"],{PrivateListView:Wh}=Ot(nt.privateApis);function Zh({block:e,insertedBlock:t,setInsertedBlock:o}){const{updateBlockAttributes:n}=(0,it.useDispatch)(nt.store),a=qh?.includes(t?.name),r=t?.clientId===e.clientId;if(!(a&&r))return null;return(0,Je.jsx)($h,{clientId:t?.clientId,link:t?.attributes,onClose:()=>{o(null)},onChange:e=>{var a;Rh(e,(a=t?.clientId,e=>{a&&n(a,e)}),t?.attributes),o(null)},onCancel:()=>{o(null)}})}const Qh=({clientId:e,currentMenuId:t,isLoading:o,isNavigationMenuMissing:n,onCreateNew:a})=>{const r=(0,it.useSelect)((t=>!!t(nt.store).getBlockCount(e)),[e]),{navigationMenu:i}=Vg(t);if(t&&n)return(0,Je.jsx)(Th,{onCreateNew:a,isNotice:!0});if(o)return(0,Je.jsx)(tt.Spinner,{});const s=i?(0,ot.sprintf)((0,ot.__)("Structure for Navigation Menu: %s"),i?.title||(0,ot.__)("Untitled menu")):(0,ot.__)("You have not yet created any menus. Displaying a list of your Pages");return(0,Je.jsxs)("div",{className:"wp-block-navigation__menu-inspector-controls",children:[!r&&(0,Je.jsx)("p",{className:"wp-block-navigation__menu-inspector-controls__empty-message",children:(0,ot.__)("This Navigation Menu is empty.")}),(0,Je.jsx)(Wh,{rootClientId:e,isExpanded:!0,description:s,showAppender:!0,blockSettingsMenu:zh,additionalBlockContent:Zh})]})},Kh=e=>{const{createNavigationMenuIsSuccess:t,createNavigationMenuIsError:o,currentMenuId:n=null,onCreateNew:a,onSelectClassicMenu:r,onSelectNavigationMenu:i,isManageMenusButtonDisabled:s,blockEditingMode:l}=e;return(0,Je.jsx)(nt.InspectorControls,{group:"list",children:(0,Je.jsxs)(tt.PanelBody,{title:null,children:[(0,Je.jsxs)(tt.__experimentalHStack,{className:"wp-block-navigation-off-canvas-editor__header",children:[(0,Je.jsx)(tt.__experimentalHeading,{className:"wp-block-navigation-off-canvas-editor__title",level:2,children:(0,ot.__)("Menu")}),"default"===l&&(0,Je.jsx)($g,{currentMenuId:n,onSelectClassicMenu:r,onSelectNavigationMenu:i,onCreateNew:a,createNavigationMenuIsSuccess:t,createNavigationMenuIsError:o,actionLabel:Uh,isManageMenusButtonDisabled:s})]}),(0,Je.jsx)(Qh,{...e})]})})};function Yh({id:e,children:t}){return(0,Je.jsx)(tt.VisuallyHidden,{children:(0,Je.jsx)("div",{id:e,className:"wp-block-navigation__description",children:t})})}function Jh({id:e}){const[t]=(0,ct.useEntityProp)("postType","wp_navigation","title"),o=(0,ot.sprintf)((0,ot.__)('Navigation Menu: "%s"'),t);return(0,Je.jsx)(Yh,{id:e,children:o})}function Xh({textColor:e,setTextColor:t,backgroundColor:o,setBackgroundColor:n,overlayTextColor:a,setOverlayTextColor:r,overlayBackgroundColor:i,setOverlayBackgroundColor:s,clientId:l,navRef:c}){const[u,d]=(0,st.useState)(),[p,m]=(0,st.useState)(),[g,h]=(0,st.useState)(),[x,_]=(0,st.useState)(),b="web"===st.Platform.OS;(0,st.useEffect)((()=>{if(!b)return;Ch(c.current,m,d);const e=c.current?.querySelector('[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]');e&&(a.color||i.color)&&Ch(e,_,h)}),[b,a.color,i.color,c]);const y=(0,nt.__experimentalUseMultipleOriginColorsAndGradients)();return y.hasColorsOrGradients?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:e.color,label:(0,ot.__)("Text"),onColorChange:t,resetAllFilter:()=>t(),clearable:!0},{colorValue:o.color,label:(0,ot.__)("Background"),onColorChange:n,resetAllFilter:()=>n(),clearable:!0},{colorValue:a.color,label:(0,ot.__)("Submenu & overlay text"),onColorChange:r,resetAllFilter:()=>r(),clearable:!0},{colorValue:i.color,label:(0,ot.__)("Submenu & overlay background"),onColorChange:s,resetAllFilter:()=>s(),clearable:!0}],panelId:l,...y,gradients:[],disableCustomGradients:!0}),b&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.ContrastChecker,{backgroundColor:u,textColor:p}),(0,Je.jsx)(nt.ContrastChecker,{backgroundColor:g,textColor:x})]})]}):null}const ex=(0,nt.withColors)({textColor:"color"},{backgroundColor:"color"},{overlayBackgroundColor:"color"},{overlayTextColor:"color"})((function({attributes:e,setAttributes:t,clientId:o,isSelected:n,className:a,backgroundColor:r,setBackgroundColor:i,textColor:s,setTextColor:l,overlayBackgroundColor:c,setOverlayBackgroundColor:u,overlayTextColor:d,setOverlayTextColor:p,hasSubmenuIndicatorSetting:m=!0,customPlaceholder:g=null,__unstableLayoutClassNames:h}){const{openSubmenusOnClick:x,overlayMenu:_,showSubmenuIcon:b,templateLock:y,layout:{justifyContent:f,orientation:v="horizontal",flexWrap:k="wrap"}={},hasIcon:w,icon:C="handle"}=e,j=e.ref,S=(0,st.useCallback)((e=>{t({ref:e})}),[t]),B=`navigationMenu/${j}`,T=(0,nt.useHasRecursion)(B),N=(0,nt.useBlockEditingMode)(),{menus:P}=Fg(),[I,M]=eh({name:"block-library/core/navigation/status"}),[D,z]=eh({name:"block-library/core/navigation/classic-menu-conversion"}),[A,R]=eh({name:"block-library/core/navigation/permissions/update"}),{create:H,status:L,error:V,value:F,isPending:E,isSuccess:O,isError:$}=function(e){const[t,o]=(0,st.useState)(vh),[n,a]=(0,st.useState)(null),[r,i]=(0,st.useState)(null),{saveEntityRecord:s,editEntityRecord:l}=(0,it.useDispatch)(ct.store),c=_h(e),u=(0,st.useCallback)((async(e=null,t=[],n)=>{if(e&&"string"!=typeof e)throw i("Invalid title supplied when creating Navigation Menu."),o(yh),new Error("Value of supplied title argument was not a string.");o(fh),a(null),i(null),e||(e=await c().catch((e=>{throw i(e?.message),o(yh),new Error("Failed to create title when saving new Navigation Menu.",{cause:e})})));const r={title:e,content:(0,Ke.serialize)(t),status:n};return s("postType","wp_navigation",r).then((e=>(a(e),o(bh),"publish"!==n&&l("postType","wp_navigation",e.id,{status:"publish"}),e))).catch((e=>{throw i(e?.message),o(yh),new Error("Unable to save new Navigation Menu",{cause:e})}))}),[s,l,c]);return{create:u,status:t,value:n,error:r,isIdle:t===vh,isPending:t===fh,isSuccess:t===bh,isError:t===yh}}(o),G=async()=>{await H("")},{hasUncontrolledInnerBlocks:U,uncontrolledInnerBlocks:q,isInnerBlockSelected:W,innerBlocks:Z}=function(e){return(0,it.useSelect)((t=>{const{getBlock:o,getBlocks:n,hasSelectedInnerBlock:a}=t(nt.store),r=o(e).innerBlocks,i=!!r?.length,s=i?kh:n(e);return{innerBlocks:i?r:s,hasUncontrolledInnerBlocks:i,uncontrolledInnerBlocks:r,controlledInnerBlocks:s,isInnerBlockSelected:a(e,!0)}}),[e])}(o),Q=!!Z.find((e=>"core/navigation-submenu"===e.name)),{replaceInnerBlocks:K,selectBlock:Y,__unstableMarkNextChangeAsNotPersistent:J}=(0,it.useDispatch)(nt.store),[X,ee]=(0,st.useState)(!1),[te,oe]=(0,st.useState)(!1),{hasResolvedNavigationMenus:ne,isNavigationMenuResolved:ae,isNavigationMenuMissing:re,canUserUpdateNavigationMenu:ie,hasResolvedCanUserUpdateNavigationMenu:se,canUserDeleteNavigationMenu:le,hasResolvedCanUserDeleteNavigationMenu:ce,canUserCreateNavigationMenus:ue,isResolvingCanUserCreateNavigationMenus:de,hasResolvedCanUserCreateNavigationMenus:pe}=Vg(j),me=ne&&re,{convert:ge,status:he,error:xe}=lh(H),_e=he===ih,be=(0,st.useCallback)(((e,t={focusNavigationBlock:!1})=>{const{focusNavigationBlock:n}=t;S(e),n&&Y(o)}),[Y,o,S]),ye=!re&&ae,fe=U&&!ye,{getNavigationFallbackId:ve}=Ot((0,it.useSelect)(ct.store)),ke=j||fe?null:ve();(0,st.useEffect)((()=>{j||fe||!ke||(J(),S(ke))}),[j,S,fe,ke,J]);const we=(0,st.useRef)(),Ce="nav",je=!j&&!E&&!_e&&ne&&0===P?.length&&!U,Se=!ne||E||_e||!(!j||ye||_e),Be=e.style?.typography?.textDecoration,Te=(0,it.useSelect)((e=>e(nt.store).__unstableHasActiveBlockOverlayActive(o)),[o]),Ne="never"!==_,Pe=(0,nt.useBlockProps)({ref:we,className:ft(a,{"items-justified-right":"right"===f,"items-justified-space-between":"space-between"===f,"items-justified-left":"left"===f,"items-justified-center":"center"===f,"is-vertical":"vertical"===v,"no-wrap":"nowrap"===k,"is-responsive":Ne,"has-text-color":!!s.color||!!s?.class,[(0,nt.getColorClassName)("color",s?.slug)]:!!s?.slug,"has-background":!!r.color||r.class,[(0,nt.getColorClassName)("background-color",r?.slug)]:!!r?.slug,[`has-text-decoration-${Be}`]:Be,"block-editor-block-content-overlay":Te},h),style:{color:!s?.slug&&s?.color,backgroundColor:!r?.slug&&r?.color}}),Ie=async e=>ge(e.id,e.name,"draft"),Me=e=>{be(e)};(0,st.useEffect)((()=>{M(),E&&(0,Mg.speak)((0,ot.__)("Creating Navigation Menu.")),O&&(be(F?.id,{focusNavigationBlock:!0}),I((0,ot.__)("Navigation Menu successfully created."))),$&&I((0,ot.__)("Failed to create Navigation Menu."))}),[L,V,F?.id,$,O,E,be,M,I]),(0,st.useEffect)((()=>{z(),he===ih&&(0,Mg.speak)((0,ot.__)("Classic menu importing.")),he===ah&&(D((0,ot.__)("Classic menu imported successfully.")),be(F?.id,{focusNavigationBlock:!0})),he===rh&&D((0,ot.__)("Classic menu import failed."))}),[he,xe,z,D,F?.id,be]),(0,st.useEffect)((()=>{n||W||R(),(n||W)&&(j&&!me&&se&&!ie&&A((0,ot.__)("You do not have permission to edit this Menu. Any changes made will not be saved.")),j||!pe||ue||A((0,ot.__)("You do not have permission to create Navigation Menus.")))}),[n,W,ie,se,ue,pe,j,R,A,me]);const De=ue||ie,ze=ft("wp-block-navigation__overlay-menu-preview",{open:te}),Ae=b||x?"":(0,ot.__)('The current menu options offer reduced accessibility for users and are not recommended. Enabling either "Open on Click" or "Show arrow" offers enhanced accessibility by allowing keyboard users to browse submenus selectively.'),Re=(0,st.useRef)(!0);(0,st.useEffect)((()=>{!Re.current&&Ae&&(0,Mg.speak)(Ae),Re.current=!1}),[Ae]);const He=(0,ut.useInstanceId)(th,"overlay-menu-preview"),Le=(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.InspectorControls,{children:m&&(0,Je.jsxs)(tt.PanelBody,{title:(0,ot.__)("Display"),children:[Ne&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)(tt.Button,{__next40pxDefaultSize:!0,className:ze,onClick:()=>{oe(!te)},"aria-label":(0,ot.__)("Overlay menu controls"),"aria-controls":He,"aria-expanded":te,children:[w&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(qg,{icon:C}),(0,Je.jsx)(Dg,{icon:zg})]}),!w&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("span",{children:(0,ot.__)("Menu")}),(0,Je.jsx)("span",{children:(0,ot.__)("Close")})]})]}),(0,Je.jsx)("div",{id:He,children:te&&(0,Je.jsx)(th,{setAttributes:t,hasIcon:w,icon:C,hidden:!te})})]}),(0,Je.jsxs)(tt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ot.__)("Overlay Menu"),"aria-label":(0,ot.__)("Configure overlay menu"),value:_,help:(0,ot.__)("Collapses the navigation options in a menu icon opening an overlay."),onChange:e=>t({overlayMenu:e}),isBlock:!0,children:[(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"never",label:(0,ot.__)("Off")}),(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"mobile",label:(0,ot.__)("Mobile")}),(0,Je.jsx)(tt.__experimentalToggleGroupControlOption,{value:"always",label:(0,ot.__)("Always")})]}),Q&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("h3",{children:(0,ot.__)("Submenus")}),(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:x,onChange:e=>{t({openSubmenusOnClick:e,...e&&{showSubmenuIcon:!0}})},label:(0,ot.__)("Open on click")}),(0,Je.jsx)(tt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:b,onChange:e=>{t({showSubmenuIcon:e})},disabled:e.openSubmenusOnClick,label:(0,ot.__)("Show arrow")}),Ae&&(0,Je.jsx)("div",{children:(0,Je.jsx)(tt.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:Ae})})]})]})}),(0,Je.jsx)(nt.InspectorControls,{group:"color",children:(0,Je.jsx)(Xh,{textColor:s,setTextColor:l,backgroundColor:r,setBackgroundColor:i,overlayTextColor:d,setOverlayTextColor:p,overlayBackgroundColor:c,setOverlayBackgroundColor:u,clientId:o,navRef:we})})]}),Ve=`${o}-desc`,Fe="always"===_,Ee=!De||!ne;if(fe&&!E)return(0,Je.jsxs)(Ce,{...Pe,"aria-describedby":je?void 0:Ve,children:[(0,Je.jsx)(Yh,{id:Ve,children:(0,ot.__)("Unsaved Navigation Menu.")}),(0,Je.jsx)(Kh,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:$,currentMenuId:j,isNavigationMenuMissing:re,isManageMenusButtonDisabled:Ee,onCreateNew:G,onSelectClassicMenu:Ie,onSelectNavigationMenu:Me,isLoading:Se,blockEditingMode:N}),"default"===N&&Le,(0,Je.jsx)(Wg,{id:o,onToggle:ee,isOpen:X,hasIcon:w,icon:C,isResponsive:Ne,isHiddenByDefault:Fe,overlayBackgroundColor:c,overlayTextColor:d,children:(0,Je.jsx)(Jg,{createNavigationMenu:H,blocks:q,hasSelection:n||W})})]});if(j&&re)return(0,Je.jsxs)(Ce,{...Pe,children:[(0,Je.jsx)(Kh,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:$,currentMenuId:j,isNavigationMenuMissing:re,isManageMenusButtonDisabled:Ee,onCreateNew:G,onSelectClassicMenu:Ie,onSelectNavigationMenu:Me,isLoading:Se,blockEditingMode:N}),(0,Je.jsx)(Th,{onCreateNew:G})]});if(ye&&T)return(0,Je.jsx)("div",{...Pe,children:(0,Je.jsx)(nt.Warning,{children:(0,ot.__)("Block cannot be rendered inside itself.")})});const Oe=g||Gg;return je&&g?(0,Je.jsx)(Ce,{...Pe,children:(0,Je.jsx)(Oe,{isSelected:n,currentMenuId:j,clientId:o,canUserCreateNavigationMenus:ue,isResolvingCanUserCreateNavigationMenus:de,onSelectNavigationMenu:Me,onSelectClassicMenu:Ie,onCreateEmpty:G})}):(0,Je.jsx)(ct.EntityProvider,{kind:"postType",type:"wp_navigation",id:j,children:(0,Je.jsxs)(nt.RecursionProvider,{uniqueId:B,children:[(0,Je.jsx)(Kh,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:$,currentMenuId:j,isNavigationMenuMissing:re,isManageMenusButtonDisabled:Ee,onCreateNew:G,onSelectClassicMenu:Ie,onSelectNavigationMenu:Me,isLoading:Se,blockEditingMode:N}),"default"===N&&Le,"default"===N&&ye&&(0,Je.jsxs)(nt.InspectorControls,{group:"advanced",children:[se&&ie&&(0,Je.jsx)(Qg,{}),ce&&le&&(0,Je.jsx)(Xg,{onDelete:()=>{K(o,[]),I((0,ot.__)("Navigation Menu successfully deleted."))}}),(0,Je.jsx)(Bh,{disabled:Ee,className:"wp-block-navigation-manage-menus-button"})]}),(0,Je.jsxs)(Ce,{...Pe,"aria-describedby":je||Se?void 0:Ve,children:[Se&&!Fe&&(0,Je.jsx)("div",{className:"wp-block-navigation__loading-indicator-container",children:(0,Je.jsx)(tt.Spinner,{className:"wp-block-navigation__loading-indicator"})}),(!Se||Fe)&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Jh,{id:Ve}),(0,Je.jsx)(Wg,{id:o,onToggle:ee,hasIcon:w,icon:C,isOpen:X,isResponsive:Ne,isHiddenByDefault:Fe,overlayBackgroundColor:c,overlayTextColor:d,children:ye&&(0,Je.jsx)(Zg,{clientId:o,hasCustomPlaceholder:!!g,templateLock:y,orientation:v})})]})]})]})})}));const tx={fontStyle:"var:preset|font-style|",fontWeight:"var:preset|font-weight|",textDecoration:"var:preset|text-decoration|",textTransform:"var:preset|text-transform|"},ox=({navigationMenuId:e,...t})=>({...t,ref:e}),nx=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},ax={attributes:{navigationMenuId:{type:"number"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"mobile"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},save:()=>(0,Je.jsx)(nt.InnerBlocks.Content,{}),isEligible:({navigationMenuId:e})=>!!e,migrate:ox},rx={attributes:{navigationMenuId:{type:"number"},orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save:()=>(0,Je.jsx)(nt.InnerBlocks.Content,{}),isEligible:({itemsJustification:e,orientation:t})=>!!e||!!t,migrate:(0,ut.compose)(ox,nx)},ix={attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save:()=>(0,Je.jsx)(nt.InnerBlocks.Content,{}),migrate:(0,ut.compose)(ox,nx,lo),isEligible:({style:e})=>e?.typography?.fontFamily},sx=[ax,rx,ix,{attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},isResponsive:{type:"boolean",default:"false"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0}},isEligible:e=>e.isResponsive,migrate:(0,ut.compose)(ox,nx,lo,(function(e){return delete e.isResponsive,{...e,overlayMenu:"mobile"}})),save:()=>(0,Je.jsx)(nt.InnerBlocks.Content,{})},{attributes:{orientation:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,fontSize:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,color:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},save:()=>(0,Je.jsx)(nt.InnerBlocks.Content,{}),isEligible(e){if(!e.style||!e.style.typography)return!1;for(const t in tx){const o=e.style.typography[t];if(o&&o.startsWith(tx[t]))return!0}return!1},migrate:(0,ut.compose)(ox,nx,lo,(function(e){var t;return{...e,style:{...e.style,typography:Object.fromEntries(Object.entries(null!==(t=e.style.typography)&&void 0!==t?t:{}).map((([e,t])=>{const o=tx[e];if(o&&t.startsWith(o)){const n=t.slice(o.length);return"textDecoration"===e&&"strikethrough"===n?[e,"line-through"]:[e,n]}return[e,t]})))}}}))},{attributes:{className:{type:"string"},textColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean"}},isEligible:e=>e.rgbTextColor||e.rgbBackgroundColor,supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0},migrate:(0,ut.compose)(ox,(e=>{const{rgbTextColor:t,rgbBackgroundColor:o,...n}=e;return{...n,customTextColor:e.textColor?void 0:e.rgbTextColor,customBackgroundColor:e.backgroundColor?void 0:e.rgbBackgroundColor}})),save:()=>(0,Je.jsx)(nt.InnerBlocks.Content,{})}],lx=sx,cx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation",title:"Navigation",category:"theme",allowedBlocks:["core/navigation-link","core/search","core/social-links","core/page-list","core/spacer","core/home-link","core/site-title","core/site-logo","core/navigation-submenu","core/loginout","core/buttons"],description:"A collection of blocks that allow visitors to get around your site.",keywords:["menu","navigation","links"],textdomain:"default",attributes:{ref:{type:"number"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"mobile"},icon:{type:"string",default:"handle"},hasIcon:{type:"boolean",default:!0},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"},maxNestingLevel:{type:"number",default:5},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},providesContext:{textColor:"textColor",customTextColor:"customTextColor",backgroundColor:"backgroundColor",customBackgroundColor:"customBackgroundColor",overlayTextColor:"overlayTextColor",customOverlayTextColor:"customOverlayTextColor",overlayBackgroundColor:"overlayBackgroundColor",customOverlayBackgroundColor:"customOverlayBackgroundColor",fontSize:"fontSize",customFontSize:"customFontSize",showSubmenuIcon:"showSubmenuIcon",openSubmenusOnClick:"openSubmenusOnClick",style:"style",maxNestingLevel:"maxNestingLevel"},supports:{align:["wide","full"],ariaLabel:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalLetterSpacing:!0,__experimentalTextDecoration:!0,__experimentalSkipSerialization:["textDecoration"],__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,allowVerticalAlignment:!1,allowSizingOnChildren:!0,default:{type:"flex"}},interactivity:!0,renaming:!1},editorStyle:"wp-block-navigation-editor",style:"wp-block-navigation"},{name:ux}=cx,dx={icon:Ig,example:{attributes:{overlayMenu:"never"},innerBlocks:[{name:"core/navigation-link",attributes:{label:(0,ot.__)("Home"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,ot.__)("About"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,ot.__)("Contact"),url:"https://make.wordpress.org/"}}]},edit:ex,save:function({attributes:e}){if(!e.ref)return(0,Je.jsx)(nt.InnerBlocks.Content,{})},__experimentalLabel:({ref:e})=>{if(!e)return;const t=(0,it.select)(ct.store).getEditedEntityRecord("postType","wp_navigation",e);return t?.title?(0,tn.decodeEntities)(t.title):void 0},deprecated:lx},px=()=>et({name:ux,metadata:cx,settings:dx}),mx={name:"core/navigation-link"},gx=["core/navigation-link","core/navigation-submenu"];function hx({attributes:e,setAttributes:t,setIsLabelFieldFocused:o}){const{label:n,url:a,description:r,title:i,rel:s}=e;return(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!n,label:(0,ot.__)("Text"),onDeselect:()=>t({label:""}),isShownByDefault:!0,children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Text"),value:n?(0,_c.__unstableStripHTML)(n):"",onChange:e=>{t({label:e})},autoComplete:"off",onFocus:()=>o(!0),onBlur:()=>o(!1)})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!a,label:(0,ot.__)("Link"),onDeselect:()=>t({url:""}),isShownByDefault:!0,children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Link"),value:a?(0,vt.safeDecodeURI)(a):"",onChange:o=>{Rh({url:o},t,e)},autoComplete:"off",type:"url"})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!r,label:(0,ot.__)("Description"),onDeselect:()=>t({description:""}),isShownByDefault:!0,children:(0,Je.jsx)(tt.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,ot.__)("Description"),value:r||"",onChange:e=>{t({description:e})},help:(0,ot.__)("The description will be displayed in the menu if the current theme supports it.")})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!i,label:(0,ot.__)("Title attribute"),onDeselect:()=>t({title:""}),isShownByDefault:!0,children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Title attribute"),value:i||"",onChange:e=>{t({title:e})},autoComplete:"off",help:(0,ot.__)("Additional information to help clarify the purpose of the link.")})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,ot.__)("Rel attribute"),onDeselect:()=>t({rel:""}),isShownByDefault:!0,children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,ot.__)("Rel attribute"),value:s||"",onChange:e=>{t({rel:e})},autoComplete:"off",help:(0,ot.__)("The relationship of the linked URL as space-separated link types.")})})]})}const xx=(0,Je.jsxs)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Je.jsx)(Ye.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,Je.jsx)(Ye.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),_x=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"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"})}),bx=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z"})});function yx(e){switch(e){case"post":return wp;case"page":return xx;case"tag":return _x;case"category":return en;default:return bx}}function fx(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:yx(e.name)},...!e.isActive&&{isActive:t}})));return{...e,variations:o}}return e}const vx={from:[{type:"block",blocks:["core/site-logo"],transform:()=>(0,Ke.createBlock)("core/navigation-link")},{type:"block",blocks:["core/spacer"],transform:()=>(0,Ke.createBlock)("core/navigation-link")},{type:"block",blocks:["core/home-link"],transform:()=>(0,Ke.createBlock)("core/navigation-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,Ke.createBlock)("core/navigation-link")},{type:"block",blocks:["core/search"],transform:()=>(0,Ke.createBlock)("core/navigation-link")},{type:"block",blocks:["core/page-list"],transform:()=>(0,Ke.createBlock)("core/navigation-link")},{type:"block",blocks:["core/buttons"],transform:()=>(0,Ke.createBlock)("core/navigation-link")}],to:[{type:"block",blocks:["core/navigation-submenu"],transform:(e,t)=>(0,Ke.createBlock)("core/navigation-submenu",e,t)},{type:"block",blocks:["core/spacer"],transform:()=>(0,Ke.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],transform:()=>(0,Ke.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],transform:()=>(0,Ke.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,Ke.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],transform:()=>(0,Ke.createBlock)("core/search",{showLabel:!1,buttonUseIcon:!0,buttonPosition:"button-inside"})},{type:"block",blocks:["core/page-list"],transform:()=>(0,Ke.createBlock)("core/page-list")},{type:"block",blocks:["core/buttons"],transform:({label:e,url:t,rel:o,title:n,opensInNewTab:a})=>(0,Ke.createBlock)("core/buttons",{},[(0,Ke.createBlock)("core/button",{text:e,url:t,rel:o,title:n,linkTarget:a?"_blank":void 0})])}]},kx=vx,wx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation-link",title:"Custom Link",category:"design",parent:["core/navigation"],allowedBlocks:["core/navigation-link","core/navigation-submenu","core/page-list"],description:"Add a page, link, or another item to your navigation.",textdomain:"default",attributes:{label:{type:"string"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"},title:{type:"string"},kind:{type:"string"},isTopLevelLink:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","style"],supports:{reusable:!1,html:!1,__experimentalSlashInserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},renaming:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-navigation-link-editor",style:"wp-block-navigation-link"},{name:Cx}=wx,jx={icon:lu,__experimentalLabel:({label:e})=>e,merge:(e,{label:t=""})=>({...e,label:e.label+t}),edit:function({attributes:e,isSelected:t,setAttributes:o,insertBlocksAfter:n,mergeBlocks:a,onReplace:r,context:i,clientId:s}){const{id:l,label:c,type:u,url:d,description:p,kind:m}=e,{maxNestingLevel:g}=i,{replaceBlock:h,__unstableMarkNextChangeAsNotPersistent:x,selectBlock:_,selectPreviousBlock:b}=(0,it.useDispatch)(nt.store),[y,f]=(0,st.useState)(t&&!d),[v,k]=(0,st.useState)(null),[w,C]=(0,st.useState)(null),j=(0,st.useRef)(null),S=(e=>{const[t,o]=(0,st.useState)(!1);return(0,st.useEffect)((()=>{const{ownerDocument:t}=e.current;function n(e){r(e)}function a(){o(!1)}function r(t){e.current.contains(t.target)?o(!0):o(!1)}return t.addEventListener("dragstart",n),t.addEventListener("dragend",a),t.addEventListener("dragenter",r),()=>{t.removeEventListener("dragstart",n),t.removeEventListener("dragend",a),t.removeEventListener("dragenter",r)}}),[e]),t})(j),B=(0,ot.__)("Add label…"),T=(0,st.useRef)(),N=(0,st.useRef)(),P=(0,ut.usePrevious)(d),[I,M]=(0,st.useState)(!1),{isAtMaxNesting:D,isTopLevelLink:z,isParentOfSelectedBlock:A,hasChildren:R,validateLinkStatus:H}=(0,it.useSelect)((e=>{const{getBlockCount:t,getBlockName:o,getBlockRootClientId:n,hasSelectedInnerBlock:a,getBlockParentsByBlockName:r,getSelectedBlockClientId:i}=e(nt.store),l=n(s),c="core/navigation"===o(l),u=i(),d=c?l:r(s,"core/navigation")[0],p=u===d||a(d,!0);return{isAtMaxNesting:r(s,gx).length>=g,isTopLevelLink:c,isParentOfSelectedBlock:a(s,!0),hasChildren:!!t(s),validateLinkStatus:p}}),[s,g]),{getBlocks:L}=(0,it.useSelect)(nt.store),[V,F]=((e,t,o,n)=>{const a="post-type"===e||"post"===t||"page"===t,r=Number.isInteger(o),i=(0,nt.useBlockEditingMode)(),s=(0,it.useSelect)((e=>{if(!a)return null;if("disabled"===i||!n)return null;const{getEntityRecord:r}=e(ct.store);return r("postType",t,o)?.status}),[a,i,n,t,o]);return[a&&r&&s&&"trash"===s,"draft"===s]})(m,u,l,H),E=()=>{let t=L(s);0===t.length&&(t=[(0,Ke.createBlock)("core/navigation-link")],_(t[0].clientId));const o=(0,Ke.createBlock)("core/navigation-submenu",e,t);h(s,o)};(0,st.useEffect)((()=>{R&&(x(),E())}),[R]),(0,st.useEffect)((()=>{!P&&d&&y&&(0,vt.isURL)((0,vt.prependHTTP)(c))&&/^.+\.[a-z]+/.test(c)&&function(){T.current.focus();const{ownerDocument:e}=T.current,{defaultView:t}=e,o=t.getSelection(),n=e.createRange();n.selectNodeContents(T.current),o.removeAllRanges(),o.addRange(n)}()}),[P,d,y,c]);const{textColor:O,customTextColor:$,backgroundColor:G,customBackgroundColor:U}=jh(i,!z),q=(0,nt.useBlockProps)({ref:(0,ut.useMergeRefs)([C,j]),className:ft("wp-block-navigation-item",{"is-editing":t||A,"is-dragging-within":S,"has-link":!!d,"has-child":R,"has-text-color":!!O||!!$,[(0,nt.getColorClassName)("color",O)]:!!O,"has-background":!!G||U,[(0,nt.getColorClassName)("background-color",G)]:!!G}),style:{color:!O&&$,backgroundColor:!G&&U},onKeyDown:function(e){wo.isKeyboardEvent.primary(e,"k")&&(e.preventDefault(),e.stopPropagation(),f(!0),k(T.current))}}),W=(0,nt.useInnerBlocksProps)({...q,className:"remove-outline"},{defaultBlock:mx,directInsert:!0,renderAppender:!1});(!d||V||F)&&(q.onClick=()=>{f(!0),k(T.current)});const Z=ft("wp-block-navigation-item__content",{"wp-block-navigation-link__placeholder":!d||V||F}),Q=function(e){let t="";switch(e){case"post":t=(0,ot.__)("Select post");break;case"page":t=(0,ot.__)("Select page");break;case"category":t=(0,ot.__)("Select category");break;case"tag":t=(0,ot.__)("Select tag");break;default:t=(0,ot.__)("Add link")}return t}(u),K=`(${V?(0,ot.__)("Invalid"):(0,ot.__)("Draft")})`;return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsxs)(tt.ToolbarGroup,{children:[(0,Je.jsx)(tt.ToolbarButton,{name:"link",icon:Co,title:(0,ot.__)("Link"),shortcut:wo.displayShortcut.primary("k"),onClick:e=>{f(!0),k(e.currentTarget)}}),!D&&(0,Je.jsx)(tt.ToolbarButton,{name:"submenu",icon:Nh,title:(0,ot.__)("Add submenu"),onClick:E})]})}),(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsx)(hx,{attributes:e,setAttributes:o,setIsLabelFieldFocused:M})}),(0,Je.jsxs)("div",{...q,children:[(0,Je.jsxs)("a",{className:Z,children:[d?(0,Je.jsxs)(Je.Fragment,{children:[!V&&!F&&!I&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.RichText,{ref:T,identifier:"label",className:"wp-block-navigation-item__label",value:c,onChange:e=>o({label:e}),onMerge:a,onReplace:r,__unstableOnSplitAtEnd:()=>n((0,Ke.createBlock)("core/navigation-link")),"aria-label":(0,ot.__)("Navigation link text"),placeholder:B,withoutInteractiveFormatting:!0}),p&&(0,Je.jsx)("span",{className:"wp-block-navigation-item__description",children:p})]}),(V||F||I)&&(0,Je.jsx)("div",{className:ft("wp-block-navigation-link__placeholder-text","wp-block-navigation-link__label",{"is-invalid":V,"is-draft":F}),children:(0,Je.jsx)("span",{children:`${(0,tn.decodeEntities)(c)} ${V||F?K:""}`.trim()})})]}):(0,Je.jsx)("div",{className:"wp-block-navigation-link__placeholder-text",children:(0,Je.jsx)("span",{children:Q})}),y&&(0,Je.jsx)($h,{ref:N,clientId:s,link:e,onClose:()=>{if(!d)return N.current.contains(window.document.activeElement)&&b(s,!0),void r([]);f(!1),v?(v.focus(),k(null)):T.current?T.current.focus():b(s,!0)},anchor:w,onRemove:function(){o({url:void 0,label:void 0,id:void 0,kind:void 0,type:void 0,opensInNewTab:!1}),f(!1)},onChange:t=>{Rh(t,o,e)}})]}),(0,Je.jsx)("div",{...W})]})]})},save:function(){return(0,Je.jsx)(nt.InnerBlocks.Content,{})},example:{attributes:{label:(0,ot._x)("Example Link","navigation link preview example"),url:"https://example.com"}},deprecated:[{isEligible:e=>e.nofollow,attributes:{label:{type:"string"},type:{type:"string"},nofollow:{type:"boolean"},description:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"}},migrate:({nofollow:e,...t})=>({rel:e?"nofollow":"",...t}),save:()=>(0,Je.jsx)(nt.InnerBlocks.Content,{})}],transforms:kx},Sx=()=>((0,Ns.addFilter)("blocks.registerBlockType","core/navigation-link",fx),et({name:Cx,metadata:wx,settings:jx})),Bx=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m13.955 20.748 8-17.5-.91-.416L19.597 6H13.5v1.5h5.411l-1.6 3.5H13.5v1.5h3.126l-1.6 3.5H13.5l.028 1.5h.812l-1.295 2.832.91.416ZM17.675 16l-.686 1.5h4.539L21.5 16h-3.825Zm2.286-5-.686 1.5H21.5V11h-1.54ZM2 12c0 3.58 2.42 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.48 0-4.5-1.52-4.5-4S5.52 7.5 8 7.5h3.5V6H8c-3.58 0-6 2.42-6 6Z"})}),Tx=()=>(0,Je.jsx)(tt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,Je.jsx)(tt.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})}),Nx=["core/navigation-link","core/navigation-submenu","core/page-list"],Px={name:"core/navigation-link"};const Ix={to:[{type:"block",blocks:["core/navigation-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:e=>(0,Ke.createBlock)("core/navigation-link",e)},{type:"block",blocks:["core/spacer"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Ke.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Ke.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Ke.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Ke.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Ke.createBlock)("core/search")}]},Mx=Ix,Dx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation-submenu",title:"Submenu",category:"design",parent:["core/navigation"],description:"Add a submenu to your navigation.",textdomain:"default",attributes:{label:{type:"string"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"},title:{type:"string"},kind:{type:"string"},isTopLevelItem:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","openSubmenusOnClick","style"],supports:{reusable:!1,html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-navigation-submenu-editor",style:"wp-block-navigation-submenu"},{name:zx}=Dx,Ax={icon:({context:e})=>"list-view"===e?xx:Nh,__experimentalLabel(e,{context:t}){const{label:o}=e,n=e?.metadata?.name;return"list-view"===t&&(n||o)&&e?.metadata?.name||o},edit:function({attributes:e,isSelected:t,setAttributes:o,mergeBlocks:n,onReplace:a,context:r,clientId:i}){const{label:s,url:l,description:c,rel:u,title:d}=e,{showSubmenuIcon:p,maxNestingLevel:m,openSubmenusOnClick:g}=r,{__unstableMarkNextChangeAsNotPersistent:h,replaceBlock:x,selectBlock:_}=(0,it.useDispatch)(nt.store),[b,y]=(0,st.useState)(!1),[f,v]=(0,st.useState)(null),[k,w]=(0,st.useState)(null),C=(0,st.useRef)(null),j=(e=>{const[t,o]=(0,st.useState)(!1);return(0,st.useEffect)((()=>{const{ownerDocument:t}=e.current;function n(e){r(e)}function a(){o(!1)}function r(t){e.current.contains(t.target)?o(!0):o(!1)}return t.addEventListener("dragstart",n),t.addEventListener("dragend",a),t.addEventListener("dragenter",r),()=>{t.removeEventListener("dragstart",n),t.removeEventListener("dragend",a),t.removeEventListener("dragenter",r)}}),[]),t})(C),S=(0,ot.__)("Add text…"),B=(0,st.useRef)(),T=mt(),{parentCount:N,isParentOfSelectedBlock:P,isImmediateParentOfSelectedBlock:I,hasChildren:M,selectedBlockHasChildren:D,onlyDescendantIsEmptyLink:z}=(0,it.useSelect)((e=>{const{hasSelectedInnerBlock:t,getSelectedBlockClientId:o,getBlockParentsByBlockName:n,getBlock:a,getBlockCount:r,getBlockOrder:s}=e(nt.store);let l;const c=s(o());if(1===c?.length){const e=a(c[0]);l="core/navigation-link"===e?.name&&!e?.attributes?.label}return{parentCount:n(i,"core/navigation-submenu").length,isParentOfSelectedBlock:t(i,!0),isImmediateParentOfSelectedBlock:t(i,!1),hasChildren:!!r(i),selectedBlockHasChildren:!!c?.length,onlyDescendantIsEmptyLink:l}}),[i]),A=(0,ut.usePrevious)(M);(0,st.useEffect)((()=>{g||l||y(!0)}),[]),(0,st.useEffect)((()=>{t||y(!1)}),[t]),(0,st.useEffect)((()=>{b&&l&&(0,vt.isURL)((0,vt.prependHTTP)(s))&&/^.+\.[a-z]+/.test(s)&&function(){B.current.focus();const{ownerDocument:e}=B.current,{defaultView:t}=e,o=t.getSelection(),n=e.createRange();n.selectNodeContents(B.current),o.removeAllRanges(),o.addRange(n)}()}),[l]);const{textColor:R,customTextColor:H,backgroundColor:L,customBackgroundColor:V}=jh(r,N>0),F=(0,nt.useBlockProps)({ref:(0,ut.useMergeRefs)([w,C]),className:ft("wp-block-navigation-item",{"is-editing":t||P,"is-dragging-within":j,"has-link":!!l,"has-child":M,"has-text-color":!!R||!!H,[(0,nt.getColorClassName)("color",R)]:!!R,"has-background":!!L||V,[(0,nt.getColorClassName)("background-color",L)]:!!L,"open-on-click":g}),style:{color:!R&&H,backgroundColor:!L&&V},onKeyDown:function(e){wo.isKeyboardEvent.primary(e,"k")&&(e.preventDefault(),e.stopPropagation(),y(!0),v(B.current))}}),E=jh(r,!0),O=N>=m?Nx.filter((e=>"core/navigation-submenu"!==e)):Nx,$=Sh(E),G=(0,nt.useInnerBlocksProps)($,{allowedBlocks:O,defaultBlock:Px,directInsert:!0,__experimentalCaptureToolbars:!0,renderAppender:!!(t||I&&!D||M)&&nt.InnerBlocks.ButtonBlockAppender}),U=g?"button":"a";function q(){const t=(0,Ke.createBlock)("core/navigation-link",e);x(i,t)}(0,st.useEffect)((()=>{!M&&A&&(h(),q())}),[M,A]);const W=!D||z;return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(nt.BlockControls,{children:(0,Je.jsxs)(tt.ToolbarGroup,{children:[!g&&(0,Je.jsx)(tt.ToolbarButton,{name:"link",icon:Co,title:(0,ot.__)("Link"),shortcut:wo.displayShortcut.primary("k"),onClick:e=>{y(!0),v(e.currentTarget)}}),(0,Je.jsx)(tt.ToolbarButton,{name:"revert",icon:Bx,title:(0,ot.__)("Convert to Link"),onClick:q,className:"wp-block-navigation__submenu__revert",disabled:!W})]})}),(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{o({label:"",url:"",description:"",title:"",rel:""})},dropdownMenuProps:T,children:[(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Text"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>o({label:""}),children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:s||"",onChange:e=>{o({label:e})},label:(0,ot.__)("Text"),autoComplete:"off"})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Link"),isShownByDefault:!0,hasValue:()=>!!l,onDeselect:()=>o({url:""}),children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:l||"",onChange:e=>{o({url:e})},label:(0,ot.__)("Link"),autoComplete:"off",type:"url"})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Description"),isShownByDefault:!0,hasValue:()=>!!c,onDeselect:()=>o({description:""}),children:(0,Je.jsx)(tt.TextareaControl,{__nextHasNoMarginBottom:!0,value:c||"",onChange:e=>{o({description:e})},label:(0,ot.__)("Description"),help:(0,ot.__)("The description will be displayed in the menu if the current theme supports it.")})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Title attribute"),isShownByDefault:!0,hasValue:()=>!!d,onDeselect:()=>o({title:""}),children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:d||"",onChange:e=>{o({title:e})},label:(0,ot.__)("Title attribute"),autoComplete:"off",help:(0,ot.__)("Additional information to help clarify the purpose of the link.")})}),(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Rel attribute"),isShownByDefault:!0,hasValue:()=>!!u,onDeselect:()=>o({rel:""}),children:(0,Je.jsx)(tt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:u||"",onChange:e=>{o({rel:e})},label:(0,ot.__)("Rel attribute"),autoComplete:"off",help:(0,ot.__)("The relationship of the linked URL as space-separated link types.")})})]})}),(0,Je.jsxs)("div",{...F,children:[(0,Je.jsxs)(U,{className:"wp-block-navigation-item__content",children:[(0,Je.jsx)(nt.RichText,{ref:B,identifier:"label",className:"wp-block-navigation-item__label",value:s,onChange:e=>o({label:e}),onMerge:n,onReplace:a,"aria-label":(0,ot.__)("Navigation link text"),placeholder:S,withoutInteractiveFormatting:!0,onClick:()=>{g||l||(y(!0),v(B.current))}}),c&&(0,Je.jsx)("span",{className:"wp-block-navigation-item__description",children:c}),!g&&b&&(0,Je.jsx)($h,{clientId:i,link:e,onClose:()=>{y(!1),f?(f.focus(),v(null)):_(i)},anchor:k,onRemove:()=>{o({url:""}),(0,Mg.speak)((0,ot.__)("Link removed."),"assertive")},onChange:t=>{Rh(t,o,e)}})]}),(p||g)&&(0,Je.jsx)("span",{className:"wp-block-navigation__submenu-icon",children:(0,Je.jsx)(Tx,{})}),(0,Je.jsx)("div",{...G})]})]})},example:{attributes:{label:(0,ot._x)("About","Example link text for Navigation Submenu"),type:"page"}},save:function(){return(0,Je.jsx)(nt.InnerBlocks.Content,{})},transforms:Mx},Rx=()=>et({name:zx,metadata:Dx,settings:Ax}),Hx=(0,Je.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Je.jsx)(Ye.Path,{d:"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 Lx={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/nextpage"===e.dataset.block,transform:()=>(0,Ke.createBlock)("core/nextpage",{})}]},Vx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/nextpage",title:"Page Break",category:"design",description:"Separate your content into a multi-page experience.",keywords:["next page","pagination"],parent:["core/post-content"],textdomain:"default",supports:{customClassName:!1,className:!1,html:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-nextpage-editor"},{name:Fx}=Vx,Ex={icon:Hx,example:{},transforms:Lx,edit:function(){return(0,Je.jsx)("div",{...(0,nt.useBlockProps)(),children:(0,Je.jsx)("span",{children:(0,ot.__)("Page break")})})},save:function(){return(0,Je.jsx)(st.RawHTML,{children:"\x3c!--nextpage--\x3e"})}},Ox=()=>et({name:Fx,metadata:Vx,settings:Ex}),$x=new WeakMap;function Gx(){const e=(0,it.useRegistry)();if(!$x.has(e)){const t=new Map;$x.set(e,Ux.bind(null,t))}return $x.get(e)}function Ux(e,{name:t,blocks:o}){const n=[...o];for(;n.length;){const o=n.shift();for(const e of null!==(a=o.innerBlocks)&&void 0!==a?a:[]){var a;n.unshift(e)}"core/pattern"===o.name&&qx(e,t,o.attributes.slug)}}function qx(e,t,o){if(e.has(t)||e.set(t,new Set),e.get(t).add(o),Wx(e,t))throw new TypeError(`Pattern ${t} has a circular dependency and cannot be rendered.`)}function Wx(e,t,o=new Set,n=new Set){var a;o.add(t),n.add(t);const r=null!==(a=e.get(t))&&void 0!==a?a:new Set;for(const t of r)if(o.has(t)){if(n.has(t))return!0}else if(Wx(e,t,o,n))return!0;return n.delete(t),!1}const Zx=({attributes:e,clientId:t})=>{const o=(0,it.useRegistry)(),n=(0,it.useSelect)((t=>t(nt.store).__experimentalGetParsedPattern(e.slug)),[e.slug]),a=(0,it.useSelect)((e=>e(ct.store).getCurrentTheme()?.stylesheet),[]),{replaceBlocks:r,setBlockEditingMode:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,it.useDispatch)(nt.store),{getBlockRootClientId:l,getBlockEditingMode:c}=(0,it.useSelect)(nt.store),[u,d]=(0,st.useState)(!1),p=Gx();(0,st.useEffect)((()=>{if(!u&&n?.blocks){try{p(n)}catch(e){return void d(!0)}window.queueMicrotask((()=>{const e=l(t),u=n.blocks.map((e=>(0,Ke.cloneBlock)(function(e){return e.innerBlocks.find((e=>"core/template-part"===e.name))&&(e.innerBlocks=e.innerBlocks.map((e=>("core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=a),e)))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=a),e}(e))));1===u.length&&n.categories?.length>0&&(u[0].attributes={...u[0].attributes,metadata:{...u[0].attributes.metadata,categories:n.categories,patternName:n.name,name:u[0].attributes.metadata.name||n.title}});const d=c(e);o.batch((()=>{s(),i(e,"default"),s(),r(t,u),s(),i(e,d)}))}))}}),[t,u,n,s,r,c,i,l]);const m=(0,nt.useBlockProps)();return u?(0,Je.jsx)("div",{...m,children:(0,Je.jsx)(nt.Warning,{children:(0,ot.sprintf)((0,ot.__)('Pattern "%s" cannot be rendered inside itself.'),n?.name)})}):(0,Je.jsx)("div",{...m})},Qx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/pattern",title:"Pattern Placeholder",category:"theme",description:"Show a block pattern.",supports:{html:!1,inserter:!1,renaming:!1,interactivity:{clientNavigation:!0}},textdomain:"default",attributes:{slug:{type:"string"}}},{name:Kx}=Qx,Yx={edit:Zx},Jx=()=>et({name:Kx,metadata:Qx,settings:Yx}),Xx=(0,Je.jsxs)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Je.jsx)(Ye.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,Je.jsx)(Ye.Path,{d:"M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z"}),(0,Je.jsx)(Ye.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})]});function e_(e,t){for(const o of e){if(o.attributes.id===t)return o;if(o.innerBlocks&&o.innerBlocks.length){const e=e_(o.innerBlocks,t);if(e)return e}}return null}function t_(e=[],t=null){let o=function(e=[]){const t={},o=[];return e.forEach((({id:e,title:n,link:a,type:r,parent:i})=>{var s;const l=null!==(s=t[e]?.innerBlocks)&&void 0!==s?s:[];t[e]=(0,Ke.createBlock)("core/navigation-link",{id:e,label:n.rendered,url:a,type:r,kind:"post-type"},l),i?(t[i]||(t[i]={innerBlocks:[]}),t[i].innerBlocks.push(t[e])):o.push(t[e])})),o}(e);if(t){const e=e_(o,t);e&&e.innerBlocks&&(o=e.innerBlocks)}const n=e=>{e.forEach(((e,t,o)=>{const{attributes:a,innerBlocks:r}=e;if(0!==r.length){n(r);const e=(0,Ke.createBlock)("core/navigation-submenu",a,r);o[t]=e}}))};return n(o),o}function o_({clientId:e,pages:t,parentClientId:o,parentPageID:n}){const{replaceBlock:a,selectBlock:r}=(0,it.useDispatch)(nt.store);return()=>{const i=t_(t,n);a(e,i),r(o)}}const n_=(0,ot.__)("This Navigation Menu displays your website's pages. Editing it will enable you to add, delete, or reorder pages. However, new pages will no longer be added automatically.");function a_({onClick:e,onClose:t,disabled:o}){return(0,Je.jsxs)(tt.Modal,{onRequestClose:t,title:(0,ot.__)("Edit Page List"),className:"wp-block-page-list-modal",aria:{describedby:(0,ut.useInstanceId)(a_,"wp-block-page-list-modal__description")},children:[(0,Je.jsx)("p",{id:(0,ut.useInstanceId)(a_,"wp-block-page-list-modal__description"),children:n_}),(0,Je.jsxs)("div",{className:"wp-block-page-list-modal-buttons",children:[(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,ot.__)("Cancel")}),(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,variant:"primary",accessibleWhenDisabled:!0,disabled:o,onClick:e,children:(0,ot.__)("Edit")})]})]})}const r_=()=>{};function i_({blockProps:e,innerBlocksProps:t,hasResolvedPages:o,blockList:n,pages:a,parentPageID:r}){if(!o)return(0,Je.jsx)("div",{...e,children:(0,Je.jsx)("div",{className:"wp-block-page-list__loading-indicator-container",children:(0,Je.jsx)(tt.Spinner,{className:"wp-block-page-list__loading-indicator"})})});if(null===a)return(0,Je.jsx)("div",{...e,children:(0,Je.jsx)(tt.Notice,{status:"warning",isDismissible:!1,children:(0,ot.__)("Page List: Cannot retrieve Pages.")})});if(0===a.length)return(0,Je.jsx)("div",{...e,children:(0,Je.jsx)(tt.Notice,{status:"info",isDismissible:!1,children:(0,ot.__)("Page List: Cannot retrieve Pages.")})});if(0===n.length){const t=a.find((e=>e.id===r));return t?.title?.rendered?(0,Je.jsx)("div",{...e,children:(0,Je.jsx)(nt.Warning,{children:(0,ot.sprintf)((0,ot.__)('Page List: "%s" page has no children.'),t.title.rendered)})}):(0,Je.jsx)("div",{...e,children:(0,Je.jsx)(tt.Notice,{status:"warning",isDismissible:!1,children:(0,ot.__)("Page List: Cannot retrieve Pages.")})})}return a.length>0?(0,Je.jsx)("ul",{...t}):void 0}const s_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/page-list",title:"Page List",category:"widgets",allowedBlocks:["core/page-list-item"],description:"Display a list of all pages.",keywords:["menu","navigation"],textdomain:"default",attributes:{parentPageID:{type:"integer",default:0},isNested:{type:"boolean",default:!1}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],supports:{reusable:!1,html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},color:{text:!0,background:!0,link:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},spacing:{padding:!0,margin:!0,__experimentalDefaultControls:{padding:!1,margin:!1}}},editorStyle:"wp-block-page-list-editor",style:"wp-block-page-list"},{name:l_}=s_,c_={icon:Xx,example:{},edit:function({context:e,clientId:t,attributes:o,setAttributes:n}){const{parentPageID:a}=o,[r,i]=(0,st.useState)(!1),s=(0,st.useCallback)((()=>i(!0)),[]),l=mt(),{records:c,hasResolved:u}=(0,ct.useEntityRecords)("postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}),d="showSubmenuIcon"in e&&c?.length>0&&c?.length<=100,p=(0,st.useMemo)((()=>{if(null===c)return new Map;const e=c.sort(((e,t)=>e.menu_order===t.menu_order?e.title.rendered.localeCompare(t.title.rendered):e.menu_order-t.menu_order));return e.reduce(((e,t)=>{const{parent:o}=t;return e.has(o)?e.get(o).push(t):e.set(o,[t]),e}),new Map)}),[c]),m=(0,nt.useBlockProps)({className:ft("wp-block-page-list",{"has-text-color":!!e.textColor,[(0,nt.getColorClassName)("color",e.textColor)]:!!e.textColor,"has-background":!!e.backgroundColor,[(0,nt.getColorClassName)("background-color",e.backgroundColor)]:!!e.backgroundColor}),style:{...e.style?.color}}),g=(0,st.useMemo)((function e(t=0,o=0){const n=p.get(t);return n?.length?n.reduce(((t,n)=>{const a=p.has(n.id),r={value:n.id,label:"— ".repeat(o)+n.title.rendered,rawName:n.title.rendered};return t.push(r),a&&t.push(...e(n.id,o+1)),t}),[]):[]}),[p]),h=(0,st.useMemo)((function e(t=a){const o=p.get(t);return o?.length?o.reduce(((t,o)=>{const n=p.has(o.id),a={id:o.id,label:""!==o.title?.rendered?.trim()?o.title?.rendered:(0,ot.__)("(no title)"),title:""!==o.title?.rendered?.trim()?o.title?.rendered:(0,ot.__)("(no title)"),link:o.url,hasChildren:n};let r=null;const i=e(o.id);return r=(0,Ke.createBlock)("core/page-list-item",a,i),t.push(r),t}),[]):[]}),[p,a]),{isNested:x,hasSelectedChild:_,parentClientId:b,hasDraggedChild:y,isChildOfNavigation:f}=(0,it.useSelect)((e=>{const{getBlockParentsByBlockName:o,hasSelectedInnerBlock:n,hasDraggedInnerBlock:a}=e(nt.store),r=o(t,"core/navigation-submenu",!0),i=o(t,"core/navigation",!0);return{isNested:r.length>0,isChildOfNavigation:i.length>0,hasSelectedChild:n(t,!0),hasDraggedChild:a(t,!0),parentClientId:i[0]}}),[t]),v=o_({clientId:t,pages:c,parentClientId:b,parentPageID:a}),k=(0,nt.useInnerBlocksProps)(m,{renderAppender:!1,__unstableDisableDropZone:!0,templateLock:!f&&"all",onInput:r_,onChange:r_,value:h}),{selectBlock:w}=(0,it.useDispatch)(nt.store);return(0,st.useEffect)((()=>{(_||y)&&(s(),w(b))}),[_,y,b,w,s]),(0,st.useEffect)((()=>{n({isNested:x})}),[x,n]),(0,Je.jsxs)(Je.Fragment,{children:[(g.length>0||d)&&(0,Je.jsx)(nt.InspectorControls,{children:(0,Je.jsxs)(tt.__experimentalToolsPanel,{label:(0,ot.__)("Settings"),resetAll:()=>{n({parentPageID:0})},dropdownMenuProps:l,children:[g.length>0&&(0,Je.jsx)(tt.__experimentalToolsPanelItem,{label:(0,ot.__)("Parent Page"),hasValue:()=>0!==a,onDeselect:()=>n({parentPageID:0}),isShownByDefault:!0,children:(0,Je.jsx)(tt.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,ot.__)("Parent"),value:a,options:g,onChange:e=>n({parentPageID:null!=e?e:0}),help:(0,ot.__)("Choose a page to show only its subpages.")})}),d&&(0,Je.jsxs)("div",{style:{gridColumn:"1 / -1"},children:[(0,Je.jsx)("p",{children:n_}),(0,Je.jsx)(tt.Button,{__next40pxDefaultSize:!0,variant:"primary",accessibleWhenDisabled:!0,disabled:!u,onClick:v,children:(0,ot.__
Showing 512.00 KB of 856.16 KB. Use Edit/Download for full content.

Directory Contents

Dirs: 3 × Files: 118

Name Size Perms Modified Actions
- drwxr-xr-x 2024-12-30 07:14:41
Edit Download
- drwxr-xr-x 2024-12-17 21:37:28
Edit Download
vendor DIR
- drwxr-xr-x 2024-12-30 07:14:41
Edit Download
8.37 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
2.30 KB lrw-r--r-- 2024-12-17 21:37:28
Edit Download
22.79 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
5.39 KB lrw-r--r-- 2024-05-24 05:09:28
Edit Download
23.31 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
5.70 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
15.61 KB lrw-r--r-- 2024-12-17 21:37:28
Edit Download
5.48 KB lrw-r--r-- 2024-01-31 23:29:56
Edit Download
4.51 KB lrw-r--r-- 2024-12-17 21:37:28
Edit Download
1.08 KB lrw-r--r-- 2024-01-31 23:29:56
Edit Download
78.64 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
20.25 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
2.60 MB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
845.65 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
2.13 MB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
856.16 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
14.87 KB lrw-r--r-- 2024-01-31 23:29:56
Edit Download
2.34 KB lrw-r--r-- 2024-01-31 23:29:56
Edit Download
554.02 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
169.49 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
178.44 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
48.27 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
2.25 MB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
702.18 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
195.61 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
35.99 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
23.83 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
9.20 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
261.22 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
64.24 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
95.33 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
34.18 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
7.07 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
1.44 KB lrw-r--r-- 2024-01-31 23:29:56
Edit Download
141.55 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
25.00 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
798.41 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
765.06 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
4.58 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
684 B lrw-r--r-- 2024-01-31 23:29:56
Edit Download
2.41 KB lrw-r--r-- 2024-01-31 23:29:56
Edit Download
457 B lrw-r--r-- 2024-01-31 23:29:56
Edit Download
60.67 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
12.25 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
120.43 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
41.27 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
1.56 MB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
626.11 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
171.49 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
57.23 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
1.16 MB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
387.69 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
66.53 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
11.69 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
5.86 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
1000 B lrw-r--r-- 2024-01-31 23:29:56
Edit Download
66.86 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
22.24 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
20.20 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
4.66 KB lrw-r--r-- 2024-12-17 21:37:28
Edit Download
3.62 KB lrw-r--r-- 2024-05-24 05:09:28
Edit Download
788 B lrw-r--r-- 2024-01-31 23:29:56
Edit Download
48.46 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
8.93 KB lrw-r--r-- 2024-02-16 03:23:16
Edit Download
4.19 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
1018 B lrw-r--r-- 2024-01-31 23:29:56
Edit Download
23.91 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
2.95 KB lrw-r--r-- 2024-06-01 04:29:00
Edit Download
13.78 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
2.58 KB lrw-r--r-- 2024-01-31 23:29:56
Edit Download
30.62 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
4.63 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
30.72 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
9.73 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
21.47 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
2.02 KB lrw-r--r-- 2024-01-31 23:29:56
Edit Download
12.98 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
3.43 KB lrw-r--r-- 2024-12-17 21:37:28
Edit Download
62.55 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
20.95 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
17.85 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
4.18 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
29.31 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
5.49 KB lrw-r--r-- 2024-05-24 05:09:28
Edit Download
25.04 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
6.85 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
6.56 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
1.62 KB lrw-r--r-- 2024-06-01 04:29:00
Edit Download
13.88 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
3.30 KB lrw-r--r-- 2024-02-16 03:23:16
Edit Download
8.30 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
2.75 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
23.18 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
8.68 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
19.95 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
5.97 KB lrw-r--r-- 2024-12-17 21:37:28
Edit Download
117.86 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
30.28 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
52.01 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
13.21 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
14.26 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
4.27 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
14.24 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
2.83 KB lrw-r--r-- 2024-01-31 23:29:56
Edit Download
39.07 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
5.91 KB lrw-r--r-- 2024-12-17 21:37:28
Edit Download
5.91 KB lrw-r--r-- 2024-12-17 21:37:28
Edit Download
1.24 KB lrw-r--r-- 2024-12-17 21:37:28
Edit Download
34.01 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
8.32 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
10.22 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
1.82 KB lrw-r--r-- 2024-06-01 04:29:00
Edit Download
2.39 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
311 B lrw-r--r-- 2024-01-31 23:29:56
Edit Download
52.48 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
19.56 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
14.40 KB lrw-r--r-- 2025-10-08 17:06:31
Edit Download
2.42 KB lrw-r--r-- 2024-01-31 23:29:56
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).